Specifying User-Defined Icons in UNIX Environments

Why Specify User-Defined Icons?

You can add your own icons to those icons that are supplied with SAS. For example, if you want to use your own color icons in the toolbox, define the SAS.colorUiconPath, SAS.colorUiconCount, and SAS.sasUiconx resources. Then, when you are defining tools in the Tool Editor, the Tool Editor will include your icons in the display of icons that you can choose for each tool.

How SAS Locates a User-Defined Icon

The resource name that is used to locate the icon bitmap filename for user icon number x is SAS.sasUiconx. For example, the following resource defines the filename myicon for the user icon 1:
SAS.sasUicon1: myicon
If the resource name is not defined, SAS generates a filename of the form sasuinnn.xbm or sasuinnn.xpm. The path elements from the SAS.uiconPath or SAS.colorUiconpath resource are searched in sequence until the icon file is found or until the search path is exhausted.
For example, the following set of X resources defines a collection of color icons:
SAS.colorUiconPath: /users/jackaroe/pixmaps/
SAS.colorUiconCount: 7
SAS.sasUicon1: adsetup
SAS.sasUicon2: adverse
SAS.sasUicon3: altmenu
SAS.sasUicon4: batch
SAS.sasUicon5: is
SAS.sasUicon6: patgrps
SAS.sasUicon7: pctchg
The Motif interface will search for icon sasUicon1 in a file named /users/jackaroe/pixmaps/adsetup.xpm.

X Resources for Specifying User-Defined Icons

SAS uses the following resources to determine the number of user-defined icons that are available and their location.
SAS.colorUiconPath: search-path
specifies the file search path for locating user-defined color icon files. This string resource specifies the directory paths to be searched for an icon file. These files should be in X Pixmap (xpm) format. Use a comma to separate individual directory pathnames. For example, the following string first searches for icon files in the /usr/lib/X11/pixmaps directory and then in the /usr/lib/X11/pixmaps/SAS directory:
SAS.colorUiconPath : /usr/lib/X11/pixmaps, \ 
/usr/lib/X11/pixmaps/SAS
SAS.colorUiconCount: num-icons
specifies the number of user-defined color icons that are available for SAS to use.
SAS.uiconCount: num-icons
specifies the number of user-defined icons that are available for use in the SAS session.
SAS.uiconPath: search-path
specifies the file search path for locating user-defined icon bitmap files. This string resource specifies the directory paths to be searched for an icon file. These files should be in X Bitmap (xbm) format. Use a comma to separate individual directory pathnames. For example, the following string will first search for bitmap files in the /usr/lib/X11/bitmaps directory and then in the /usr/lib/X11/bitmaps/SAS directory:
SAS.uiconPath : /usr/lib/X11/bitmaps,\ 
/usr/lib/X11/bitmaps/SAS
SAS.sasUiconx: name
associates a value with the filename of an X Bitmap or Pixmap file. x is a number assigned to the file. A file extension of .xbm or .xpm is automatically supplied.