Showing changes from revision #6 to #7:
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.
In RISC OS 2 the Wimp provided support for numerous screen resolutions and colour depths. In RISC OS 3 it became possible to use alternative sprites for system icons.
The system icons (title bar, close icon, scroll bars etc…) can easily be customized.
Please note: This document assumes RISC OS 3 or above.
Software may provide several different sets of icons, each tailored to a particular screen resolution and colour depth. The Wimp will then pick the most appropriate set to use when loading the icons (e.g. via *IconSprites or *ToolSprites).
Filename suffixes are used to identify the different icon set variants. The table below summarises the different filenames (assuming a base name of ‘!Sprites’), the dimensions for a standard icon sprite, and the different sprite modes that are acceptable.
Name | DPI | Standard Dimensions | Sprite mode/format | |||
---|---|---|---|---|---|---|
16 Cols | 256 Cols | 32K/16M Cols | ||||
!Sprites | 90 × 45 | 34 × 17 | 12 | 15 | RISC OS 3.5 | |
!Sprites22 | 90 × 90 | 34 × 34 | 20 or 27 | 21 or 28 | RISC OS 3.5 | |
!Sprites23 | (obsolete 90 × 90 DPI mono mode 23) | |||||
!Sprites11 | 180 × 180 | 68 × 68 | RISC OS 3.5 | RISC OS 3.5 | RISC OS 3.5 | |
!SpritesA | 90 × 45 | 34 × 17 | RISC OS Select alpha mask | |||
!SpritesA2 | 90 × 90 | 34 × 34 | RISC OS Select alpha mask | |||
!SpritesA1 | 180 × 180 | 68 × 68 | RISC OS Select alpha mask |
Each set of system icons should be based on the same ‘look and feel’, and be designed for optimised appearance in screen modes with the above characteristics. See also colour support for information about which sprite formats are acceptable for different Wimp versions.
The minimum requirement is for the base !Sprites file to be supplied, and the Wimp will fall back to this icon set if no other can be found.
For software which loads sprites manually, Wimp_Extend (sprite suffix), Wimp_ReadSysInfo 29, and Wimp_ReadSysInfo 2 may be used to read information about which icon set the Wimp would prefer to use for the current screen mode.
Note that alpha-masked sprites are only supported for use as icon sprites; tool sprites do not support their use.
Each system icon has a special name.
For sake of simplicity, the icons will be grouped by where they are shown within a window. Thus:
1 | Top Bar consisting of the Title Bar, Close Icon, Back Icon etc… |
2 | Vertical Scroll Bar |
3 | Horizontal Scroll Bar |
Description | Un-clicked | Clicked | Plot Order |
---|---|---|---|
Back icon | bicon | pbicon | 1st |
Close icon | cicon | pcicon | 2nd |
Title bar (left end cap) | tbarlcap | ptbarlcap | 3rd |
Title bar1 (middle bottom) | tbarmidb | ptbarmidb | 4th |
Title bar1 (middle top) | tbarmidt | ptbarmidt | 5th |
Title bar (right end cap) | tbarrcap | ptbarrcap | 6th |
Iconize icon | iicon | piicon | 7th |
Notes:
Description | Un-clicked | Clicked | Plot Order |
---|---|---|---|
Scroll Up Arrow | uicon | puicon | 1st |
Scroll Down Arrow | dicon | pdicon | 2nd |
Page Down Area (end cap) | vwellbcap | - | 3rd |
Page Down Area (section) | vwellb | - | 4th |
Slider (bottom end cap) | vbarb | pvbarb | 5th |
Slider (middle section) | vbarmid | pvbarmid | 6th |
Slider (top end cap) | vbart | pvbart | 7th |
Page Up Area (section) | vwellt | - | 8rd |
Page Up Area (end cap) | vwelltcap | - | 9nd |
Toggle Size icon2 | ticon, ticon1 | pticon, pticon1 | 10th |
Adjust Size icon3 | sicon, blicon | psicon | 11th |
Note: All these icons have the same width.
Description | Un-clicked | Clicked | Plot Order |
---|---|---|---|
Scroll Left Arrow | licon | plicon | 1st |
Scroll Right Arrow | ricon | pricon | 2nd |
Page Left Area (end cap) | hwelllcap | - | 3rd |
Page Left Area (section) | hwelll | - | 4th |
Slider (left end cap) | hbarl | phbarl | 5th |
Slider (middle section) | hbarmid | phbarmid | 6th |
Slider (right end cap) | hbarr | phbarr | 7th |
Page Right Area (section) | hwellr | - | 8rd |
Page Right Area (end cap) | hwellrcap | - | 9nd |
Note: All these icons have the same height.
Annotations
1 These Title Bar icons must have the same width, but can have different heights.
2 The Toggle Size icon must have 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 that of the vertical scroll bar.
3 The blicon sprite is used when the Adjust Size icon is not present but both horizontal and vertical scrollbars are shown.
So that icons do not overlap and so produce unwanted effects, it is necessary for some rows and columns to be transparent.
The table below details which icons must cater for this.
Description | Location | Transparency |
---|---|---|
Back icon | Top Bar | right edge 1 pixel |
Close icon | Top Bar | right edge 1 pixel |
Title bar (left end cap) | Top Bar | solid |
Title bar (right end cap) | Top Bar | solid |
Toggle Size icon | Vertical Scroll Bar | left edge 1 pixel |
Adjust Size icon2 | Vertical Scroll Bar | top edge 1 pixel |
Scroll Up Arrow | Vertical Scroll Bar | top edge 1 pixel |
Scroll Down Arrow | Vertical Scroll Bar | top edge 1 pixel |
Page Up Area (end cap) | Vertical Scroll Bar | solid |
Page Down Area (end cap) | Vertical Scroll Bar | solid |
Scroll Left Arrow | Vertical Scroll Bar | left edge = black vertical |
Scroll Left Arrow | Vertical Scroll Bar | right edge 1 pixel |
Page Left Area (end cap) | Horizontal Scroll Bar | solid |
Page Right Area (end cap) | Horizontal Scroll Bar | solid |
Icon sprite sets can be further subdivided into 7 categories. They are:
# | Category | Most Commonly used Icons |
---|---|---|
1 | Filer Icons | directory, directory, directoryo, small_dir, small_diro, small_app, file_xxx, small_xxx |
2 | Icon Bar Icons | switcher, !configure, display, floppydisc, harddisc, ramfs, romapps, small_fs, network |
3 | Dialog Box Icons | yes, no, dontcare, radiooff, radioon, optoff, opton, tick, up, down, left, right, tick, ←, → |
4 | Pointer Icons | ptr_default, ptr_double, ptr_menu, ptr_write, ptr_hand, ptr_direct, ptr_cross, ptr_confirm |
5 | Pinboard Icons | ic_edit, ic_filer, ic_draw, ic_paint, ic_? |
6 | Application Icons | !Draw, !Edit, !Paint, etc… |
7 | Miscellaneous Icons | error |
Each icon set (!Sprites22 etc…) should have a similar style.
Text is not recommended in system icons.
Icons should not attempt to be photographic-quality pictures. They should be clear, iconic representations of their referends.
The active point of a pointer-icon, should be a transparent pixel, if the mask is present.
System icons get drawn fastest when the iconset appropriate to the screen mode is used. That is, the number of bits per pixel should be the same as the screen mode, and when the palette matches the default Wimp palette. If the standard Wimp palette is in use then it’s customary to not give the sprite any palette at all – the Wimp will automatically use the standard palette when plotting it, and it will help to reduce both RAM and disc space, especially when dealing with large numbers of icons.
The Wimp caches the memory addresses of all the icons in use so that it does not have to search by sprite name. This cache is automatically updated as required, making it maintenance-free and fully transparent to other software.
Searching for the most common icons is faster when they are placed at the beginning of the !Sprites file.
For RISC OS 2, sprites should all use the standard Wimp palette, as the Wimp will not perform any colour translation when plotting the sprites.
From RISC OS 3 onwards, the Wimp uses ColourTrans when preparing sprites for plotting, allowing the sprites to make use of arbitrary palettes. When RISC OS 3.5 was introduced it became possible to use true-colour sprites for Wimp icons. However note that in both these cases the same sprite suffixes are used as for RISC OS 2 – and so when designing software for older systems, authors must be careful to only supply sprites that will work with the oldest supported OS version, or to implement their own logic to select between different icon sets.
With RISC OS 5.21 (Wimp 5.34) support was introduced for alpha-masked Wimp icons. These have their own filename suffixes, and the Wimp will only attempt to use them if it detects that the rest of the OS understands the required sprite formats, making it safe to supply the sprites with software which also needs to be compatible with older systems. Note that when enabling this feature, the Wimp only checks if RISC OS Select alpha-channel sprites are supported – support for RISC OS 5 alpha-masked sprites is not checked nor guaranteed. This is to allow the same sprites to be used with compatible versions of RISC OS Select (although current versions of the Wimp supplied with RISC OS Select will not look for and load alpha-masked sprites automatically).