内に含まその他のドキュメントサポート リソース | PDF 文書ファイルをダウンロードする (871 KB)
Chapter 14 Creating Icons for the DesktopDesktop icons are associated with:
Note - The development environment documentation contains additional information about desktop icons. See Chapter 4, "Visual Design," in the Common Desktop Environment: 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 name mail when the file is actually stored as: /usr/dt/appconfig/icons/language/mail.l.pm 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: basename--the image base name used to reference the image size--a letter indicating the size: l (large) m (medium) s (small) t (tiny) format--file format: pm (pixmap) bm (bitmap) Icon Size ConventionsTable 14-1 shows the recommended pixel dimensions for desktop icons. Table 14-1 Icon Sizes and File Names
Table 14-2 shows the icon sizes used by the desktop components. In some cases, the size of the icon used depends on the display resolution. Table 14-2 Desktop Components and Their Icon Sizes
For example, if you specify an icon named mail for a data type, have a color display, and have set the File Manager preferences to small icons, the icon image used is mail.t.pm. 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 Paint drawing tool. The icons Ipaint.l and Ipaint.s are associated with the action. ACTION IslandPaintOpenDoc
{
WINDOW_TYPE NO-STDIO
ICON Ipaint
EXEC_STRING /usr/bin/IslandPaint %Arg_1"File to open:"%
}
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: DATA_ATTRIBUTES COMPRESSED
{
ICON comprsd ACTIONS Uncompress DESCRIPTION A COMPRESSED file has been compressed by the \ 'compress' command to take up less space. } 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. CONTROL MonitorReport
{
CONTAINER_NAME container_name
TYPE ICON
MONITOR_TYPE file
FILE_NAME /doc/ftp/pub/report
ICON NoReport
ALTERNATE_ICON Report
}
To Associate an Icon with an Application Window
To Use File Manager as an Icon Browser
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 the colors 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 14-1. Color UsageDesktop icons use a palette of 22 colors including:
|
|||||||||||||||||||||||||||||||||||||||||||