HP OpenVMS Systems Documentation |
Common Desktop Environment: Advanced User's and System Administrator's Guide 12 Creating Icons for the DesktopContents of Chapter: Desktop icons are associated with:
Note: The development environment documentation contains additional information about desktop icons. See Chapter 4, "Visual Design," in the CDE Style Guide and Certification Checklist. Icon Image FilesFor the desktop to use an icon image, the icon image file must:
Icon File FormatsFor a color display, use X pixmap (XPM) format icon files, which typically have a.pm suffix. Otherwise, use X bitmap (XBM) format files, which typically have a .bm suffix. If transparency is used in the pixmap file, a mask file (_m.bm) is generated when the .bm file is created. See "Icon Search Path" for more information about how the desktop finds these files.Icon File NamesEach icon and backdrop image is stored as a separate file. Typically, an icon is specified with the base part of its file name. For example, an icon might be referenced with the namemail when the file is actually stored as:
The file-naming convention of adding suffixes helps group icons by size and type. Icon names for desktop components are in these general formats: basename.size.format Or basename.format where:
Icon Size ConventionsTable 12-1 shows the recommended pixel dimensions for desktop iconsTable 12-2 shows the icon sizes used by the desktop components. In some cases, the size of the icon used depends on the display resolution.
For example, if you specify an icon named Icon Search PathThe desktop finds an icon file, or image, by searching for the file in a list of directories. This list of directories, called the icon search path, is determined by the value of several environment variables. Which variables are used and how they are put together to create the icon search path are discussed in "Icon Search Path".The default search path is:
Accessing Icons across the NetworkThe desktop can access icons on remote systems. For information on creating an icon server, see "Configuring Database, Icon, and Help Services".Icon AssociationsTo enable quicker object recognition, you can associate icons with:
Specifying Icon FilesFor icons used for actions, data types, and in the Front Panel or subpanels, specify only the base name of the icon (no suffixes). The correct suffixes are added automatically based on your display resolution, color support, and File Manager view options (such as By Small Icons).To override the search path, provide the complete path and name of the icon. To Associate an Icon with an Action or Data Type
Example of an Action DefinitionThe following example is an action definition for starting the Island PaintTM drawing tool. The icons Ipaint.l and Ipaint.s are associated with the action.
If you are using color icons, the desktop first appends.pm when looking for the actual icon files. Otherwise (or if no match is found with.pm), the desktop appends.bm.
Example of Data Type DefinitionThe following data type definition associates the icons comprsd.l and comprsd.s with compressed files:
To Display an Icon in a Front Panel Control
ExampleThe following control changes appearance when a file named report is placed in the /doc/ftp/pub/ directory. When the file is not there, the NoReport.pm icon is displayed; when the file is there, Report.pm is displayed.
To Associate an Icon with an Application Window
Note: Some applications do not allow their default window icon to be overridden. To Use File Manager as an Icon Browser
Note: Enabling icon browsing on low-memory systems may cause File Manager to display directories more slowly. Images larger than 256 x 256 are not displayed in the default configuration. To disable icon browsing:
Icon Design RecommendationsUse a common theme among related icons. For example, if you are designing icons for an application, have purposeful similarities between the application's icon and icons for data files.Be sure the two-color version of any color icon you design is acceptable. If the icon is displayed on a monochrome or grayscale display (or if there are not enough colors available), the icon is automatically displayed in its two-color form. To conserve system color usage, try to limit icon color use to those provided by the desktop.(Icons created using Icon Editor will be use only desktop colors.) For the sizes used by the desktop components, see Table 12-1, "Icon Sizes and File Names,". Color UsageDesktop icons use a palette of 22 colors including:
The transparent color is useful for creating icons that have the illusion of being nonrectangular because the color behind the icon shows through.
|