Showing changes from revision #1 to #2:
Added | Removed | Changed
Warning: The current and/or previous revision contained markup errors which prevented proper diff analysis. A guess at markup correction has been made but the diff may not be a truly accurate reflection of the real changes.
Since RISC OS 2, the Wimp provided support for numerous screen resolutions and colour depths, but it was with the introduction of RISC OS 3 that saw the introduction of using alternate sprites for displaying system icons.
RISC OS provides a method to customise the system icons (title bar, close icon, scroll bars etc…) with relative ease.
Please note: This document assumes RISC OS 3 or above.
To ensure that system icons look as good as possible regardless of screen mode, RISC OS can provide up to four different sets of system icons specifically tailored to resolution and colour depth.
The four sets of system area icons are:
| <. <^. # | <. <^. Name | <. <^.DPI |_<. |_<^. Standard Dimensions | <. <^. 16 Cols | <. <^. 256 Cols | <. <^. 32K/16M Cols |
|1 |<^. |!Sprites|90 1 |<^. !Sprites|<^. 90 × 45 | |<^. 34 × 17 | |<^. 12 | |<^. 15| 15|<^. new format |
|2 |<^. |!Sprites22 2 | |<^. !Sprites22 |<^. 90 × 90 | |<^. 34 × 34| 34|<^. 20 or 27| 27|<^. 21 or 28| 28|<^. new format |
|3 |<^. |!Sprites23 3 |\5={background:#ccc}. |<^. !Sprites23 |\5=^{background:#ccc}. (obsolete hi res mono mode 23)|
|4 |<^. |!Sprites11 4 | |<^. !Sprites11 |<^. 180 × 180 |68 |<^. 68 × 68 |new |<^. new format |new |<^. new format |new |<^. new format|
Note: Sprites with a full alpha mask do not currently work on RISC OS 5.xx and should be avoided.
Each set of system area icons should based on the same ‘look and feel’, but designed for optimised appearance on a specific screen mode.
The minimum requirement is the !Sprites file, as the Wimp will fall back to this icon set if no other can be found.
RISC OS automatically decides which sprite set is best used by checking the nx and ny values of the current screen mode and using this returned value as a suffix to the !Sprites file to load (see above).
The code below returns the nx and ny suffix.
"Wimp_ReadSysInfo", 2
i.e. A value returned of 11 would mean that the Wimp would automatically try and load a !Sprites11, and fall back to the !Sprites file is no such file existed.
For the Wimp to know which sprite to map to each system icon, a name must be assigned to each.
For sake of simplicity, the icons will be divided into how they are shown within a window. This being:
1 | 1 | Top Bar consisting of the Title Bar, Close Icon, Back Icon etc… | |
2 | 2 | Vertical Scroll Bar | Vertical Scroll Bar |
3 | 3 | Horizontal Scroll Bar | Horizontal Scroll Bar |
Description | Un-clicked | Clicked | Plot Order | ||||
---|---|---|---|---|---|---|---|
Back icon | Back icon | 1st | 1st | ||||
Close icon | Close icon | 2nd | 2nd | ||||
Title bar (left end cap) | Title bar (left end cap) | tbarlcap | tbarlcap | ptbarlcap | ptbarlcap | 3rd | 3rd |
Title bar1 (middle bottom) | tbarmidb | tbarmidb | 4th | 4th | |||
Title bar1 (middle top) | tbarmidt | tbarmidt | 5th | 5th | |||
Title bar (right end cap) | Title bar (right end cap) | tbarrcap | tbarrcap | ptbarrcap | ptbarrcap | 6th | 6th |
Iconize icon | Iconize icon | iicon | iicon | piicon | piicon | 7th | 7th |
Notes:
Description | Un-clicked | Clicked | Plot Order | ||||
---|---|---|---|---|---|---|---|
Scroll Up Arrow | Scroll Up Arrow | uicon | uicon | 1st | 1st | ||
Scroll Down Arrow | Scroll Down Arrow | dicon | dicon | pdicon | pdicon | 2nd | 2nd |
Page Down Area (end cap) | Page Down Area (end cap) | vwellbcap | vwellbcap | - | - | 3rd | 3rd |
Page Down Area (section) | Page Down Area (section) | vwellb | vwellb | ||||
Slider (bottom end cap) | Slider (bottom end cap) | vbarb | vbarb | pvbarb | pvbarb | 5th | 5th |
Slider (middle section) | Slider (middle section) | vbarmid | vbarmid | 6th | 6th | ||
Slider (top end cap) | Slider (top end cap) | vbart | vbart | 7th | 7th | ||
Page Up Area (section) | Page Up Area (section) | vwellt | vwellt | - | - | 8rd | 8rd |
Page Up Area (end cap) | Page Up Area (end cap) | vwelltcap | vwelltcap | 9nd | 9nd | ||
Toggle Size icon2 | ticon, ticon1 | ticon, ticon1 | pticon, pticon1 | pticon, pticon1 | 10th | 10th | |
Adjust Size icon3 | sicon, blicon | sicon, blicon | psicon | psicon | 11th | 11th |
Note: All these icons have to be the same width.
Description | Un-clicked | Clicked | Plot Order | ||||
---|---|---|---|---|---|---|---|
Scroll Left Arrow | Scroll Left Arrow | licon | licon | 1st | 1st | ||
Scroll Right Arrow | Scroll Right Arrow | ricon | ricon | pricon | pricon | 2nd | 2nd |
Page Left Area (end cap) | Page Left Area (end cap) | hwelllcap | hwelllcap | - | - | 3rd | 3rd |
Page Left Area (section) | Page Left Area (section) | hwelll | hwelll | ||||
Slider (left end cap) | Slider (left end cap) | hbarl | hbarl | phbarl | phbarl | 5th | 5th |
Slider (middle section) | Slider (middle section) | hbarmid | hbarmid | 6th | 6th | ||
Slider (right end cap) | Slider (right end cap) | hbarr | hbarr | 7th | 7th | ||
Page Right Area (section) | Page Right Area (section) | hwellr | hwellr | - | - | 8rd | 8rd |
Page Right Area (end cap) | Page Right Area (end cap) | hwellrcap | hwellrcap | 9nd | 9nd |
Note: All these icons have to be the same height.
Annotations
fn1. These Title Bar icons must be the same width, but can be different heights.
2 The Toggle Size icon must be the same height as the icons in the Top bar and Horizontal scroll bar (see above and below). Two different icons may be used depending on the state of the window (maximum size or previous size). The width of these icons must also be the same as the vertical scroll bar.
3 The blicon sprite is used when it is not present but both horizontal and vertical scrollbars are shown.
To ensure that some icons do not overlap others and results in an unwanted effect, it is necessary for some rows and columns to be made transparent.
The table below details which icons must be designed to cater for this.
Description | Location | Transparency | |||
---|---|---|---|---|---|
Back icon | Back icon | right edge 1 pixel | right edge 1 pixel | ||
Close icon | Close icon | right edge 1 pixel | right edge 1 pixel | ||
Title bar (left end cap) | Title bar (left end cap) | solid | solid | ||
Title bar (right end cap) | Title bar (right end cap) | Top Bar | Top Bar | solid | solid |
Toggle Size icon | Toggle Size icon | Vertical Scroll Bar | Vertical Scroll Bar | left edge 1 pixel | left edge 1 pixel |
Adjust Size icon2 | Vertical Scroll Bar | Vertical Scroll Bar | top edge 1 pixel | top edge 1 pixel | |
Scroll Up Arrow | Scroll Up Arrow | top edge 1 pixel | top edge 1 pixel | ||
Scroll Down Arrow | Scroll Down Arrow | top edge 1 pixel | top edge 1 pixel | ||
Page Up Area (end cap) | Page Up Area (end cap) | solid | solid | ||
Page Down Area (end cap) | Page Down Area (end cap) | solid | solid | ||
Scroll Left Arrow | Scroll Left Arrow | left edge = black vertical | left edge = black vertical | ||
Scroll Left Arrow | Scroll Left Arrow | Vertical Scroll Bar | Vertical Scroll Bar | right edge 1 pixel | right edge 1 pixel |
Page Left Area (end cap) | Page Left Area (end cap) | Horizontal Scroll Bar | Horizontal Scroll Bar | solid | solid |
Page Right Area (end cap) | Page Right Area (end cap) | Horizontal Scroll Bar | Horizontal Scroll Bar | solid | solid |
Icon sprite sets can be further sub divided into 7 categories. They are:
# | Category | Most Commonly used Icons | |||
---|---|---|---|---|---|
1 | 1 | Filer Icons | Filer Icons | directory, directory, directoryo, small_dir, small_diro, small_app, file_xxx, small_xxx | |
2 | 2 | Icon Bar Icons | Icon Bar Icons | switcher, !configure, display, floppydisc, harddisc, ramfs, romapps, small_fs, network | |
3 | 3 | Dialog Box Icons | Dialog Box Icons | yes, no, dontcare, radiooff, radioon, optoff, opton, tick, up, down, left, right, tick, ←, → | |
4 | 4 | Pointer Icons1 | |||
5 | 5 | Pinboard Icons | Pinboard Icons | ic_edit, ic_filer, ic_draw, ic_paint, ic_? | |
6 | 6 | Application Icons | Application Icons | !Draw, !Edit, !Paint, etc… | !Draw, !Edit, !Paint, etc… |
7 | 7 | Miscellaneous Icons | Miscellaneous Icons | error | error |
Each icon set (!Sprites22 etc…) should be styled as similar as possible.
Text is not recommended in icons.
Icons should not attempt to be photographic quality pictures. They should be clear, iconic representations of whatever is trying to be communicated.
To define the active point of a pointer icon, the pixel should be set as to a transparent mask. If the mask is present.
To get the fastest method of drawing system icons, it is recommended that the most appropriate icon set be used. That is, the same number of bits per pixel as the screen mode with which they are to be used.
The Wimp caches all memory addresses of all the icons in use so it does not have to search by sprite name. The cache is updated after an screen mode change or *ToolSprites equivalent command.*ToolSprites equivalent command.
To further speed up searching for the most common icons by the Wimp, they should be placed at the beginning of the |!Sprite file.
From RISC OS 3 onwards, the Wimp utilizes a module called ColourTrans when preparing sprites for plotting so that it can map the sprites logical colours to the actual available colours.