Icons

The user should also have ultimate control over what icons look like.

Under past releases of the operating system, most applications hardcoded their project icons into the program. Under Release 2, you should name your default project icons in a standard manner and store them where the user can access them.

These rules for icon naming and storage are designed so the user can control the look of your program's default icons.

Naming Conventions

Use the following naming convention:

def_<icon type>.info

The placeholder <icon type> indicates the type of file represented. For example, the types of icons in the system are: disk, drawer, tool, project and trashcan.

The default icons for IFF files should use the FORM name as the <icon type>. For instance, a default icon for an IFF picture would be def_ILBM.info since ILBM is the FORM name. See Chapter 11 for more information on the IFF standard.

Storage and Access Conventions

Store your default icons in ENV:<basename> and in ENVARC:<basename>. If the user wants to change the default icon he can find it in that directory.

When your application needs an icon, direct it to look in ENV:<basename> first, then ENV:sys for the system default icon for that type of file. If it fails to find that, it should revert to the system's default project icon.

Here's an example: when the user saves a text file in an application named MystrEd, the application will first look in ENV:mysed for an icon file named def_TXT.info. Finding none, it will then look in ENV:sys for a file named the same. None is found there, so it uses the system's default project icon.

If, however, the MyStred user creates a default TXT icon in IconEdit and stores it as ENV:mysed/def_TXT.info, that icon should be used as the default.