| | 6 | Note: when talking about 'icon' in the following text an icon built by the icon engine is meant not one of the default eCS system icons. |
| | 7 | |
| | 8 | |
| | 9 | == How icons are stored == |
| | 10 | |
| | 11 | The engine uses paint commands recorded in an initialization file which are interpreted during icon loading. A pointer to the folder holding this ini file is stored in the users ini file '''OS2.INI''': |
| | 12 | |
| | 13 | |
| | 14 | {{{ |
| | 15 | Application key name: IconTheme |
| | 16 | Key name: IconFolder |
| | 17 | Contents: Path to folder holding the INI file |
| | 18 | }}} |
| | 19 | |
| | 20 | Be sure to keep the spelling for the keys. |
| | 21 | |
| | 22 | |
| | 23 | === Format of the initialization file === |
| | 24 | |
| | 25 | The name of the initialization file must be: |
| | 26 | |
| | 27 | |
| | 28 | {{{ |
| | 29 | WPSWIZ-THEME.INI |
| | 30 | }}} |
| | 31 | |
| | 32 | |
| | 33 | All images used for composing icons are located in the directory holding the ini file or a subdirectory of it. The engine uses the ini file loction as an anchor and searches all parts referenced in paint commands relative to this anchor point. |
| | 34 | |
| | 35 | Icons are searched based on the objects class name and the object ID. Custom icons created from the settings notebook of an object are referenced using a numeric key. This is not described here. |
| | 36 | |
| | 37 | ---- |
| | 38 | |
| | 39 | For every class in the system there may be a unique icon. This is used when no object specific icon can be found. |
| | 40 | |
| | 41 | {{{ |
| | 42 | Application key name: Class name, e.g. CWDataFile, WPFolder, AMouse |
| | 43 | Key names: Various, will be described later |
| | 44 | Contents: Paint commands and references to files |
| | 45 | }}} |
| | 46 | |
| | 47 | Note that the application key name must reflect the exact spelling of the class. |
| | 48 | |
| | 49 | ---- |
| | 50 | |
| | 51 | For an object specific icon the object ID is used as the application key: |
| | 52 | |
| | 53 | {{{ |
| | 54 | Application key name: Object ID, e.g. <XWP_SCREEN>, <WP_OS2SYS>, <WP_DESKTOP> |
| | 55 | Key names: Various, will be described later |
| | 56 | Contents: Paint commands and references to files |
| | 57 | }}} |
| | 58 | |
| | 59 | The application key must be exactly like the ID, this includes the opening and closing braces. |
| | 60 | |
| | 61 | ---- |
| | 62 | |
| | 63 | The Search order for icons is the following: |
| | 64 | |
| | 65 | 1. Object specific icon referenced by numeric ID |
| | 66 | 1. Object specific icon referenced by object ID |
| | 67 | 1. Class specific icon referenced by class name |
| | 68 | 1. Object specific eCS icon |
| | 69 | 1. Class specific eCS icon |
| | 70 | |
| | 71 | As can be seen the icon engine will fall back to the eCS icon handling when no engine icon can be found. |
| | 72 | |