RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Software | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

The Window Manager RISC OS System Icons

Programmer's Reference Manuals
» Part 7 - The Desktop
» The Window Manager
» Technical Details
» RISC OS System Icons

Overview

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.

Icon Sets

So that system icons look as well as possible regardless of screen mode, up to four different sets of system icons may be provided, each tailored to a particular 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 × 45 |<^. 34 × 17 |<^. 12 |<^. 15|<^. new format |
|<^. 2 |<^. !Sprites22 |<^. 90 × 90 |<^. 34 × 34|<^. 20 or 27|<^. 21 or 28|<^. new format |
|<^. 3 |<^. !Sprites23 |\5=^{background:#ccc}. (obsolete hi res mono mode 23)|
|<^. 4 |<^. !Sprites11 |<^. 180 × 180 |<^. 68 × 68 |<^. new format |<^. new format |<^. 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 icons should based on the same ‘look and feel’, and be designed for optimised appearance in a specific screen mode.

The minimum requirement is the !Sprites file, and the Wimp will fall back to this icon set if no other can be found.

RISC OS automatically decides which sprite set to use by checking the nx and ny values of the current screen mode and using these returned values as a suffix to the !Sprites file to load (see above).

The code below returns the nx and ny suffix.

  "Wimp_ReadSysInfo", 2

Thus a returned value of 11 would mean that the Wimp would automatically try to load !Sprites11, and fall back to !Sprites if no such file existed.

Naming Convention

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

Top Bar Icons

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:

  1. All these icons have the same height with the exception of Title Bar middle sprites.
  2. Title bars on window menus are drawn using the same sprites as those for windows.

Vertical Scroll Bar

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.

Horizontal Scroll Bar

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

fn1. 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.

Icon Borders

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

Common Icons

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 Icons1 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

Icon Design

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.

Speed Optimisation

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.

The Wimp caches the memory addresses of all the icons in use so that it does not have to search by sprite name. The cache is updated after an screen mode change or *ToolSprites equivalent command.

Searching for the most common icons is faster when they are placed at the beginning of the |!Sprite file.

Colour Support

From RISC OS 3 onwards, the Wimp uses a module called ColourTrans when preparing sprites for plotting, so that logical colours are mapped to the available colours.

Revised on January 26, 2010 19:47:22 by GavinWraith (26)? (127.0.0.1)
Edit | Back in time (2 revisions) | See changes | History | Views: Print | Source | Linked from: The Window Manager Technical Details, Wimp_Extend (sprite suffix)

Search the Wiki

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

The official C/C++ Development kit and more here.

Donate! Why?

Help ROOL make things happen – please consider donating!

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys