Previous Page | Next Page

Customizing the SAS Windowing Environment

Specifying User-Defined Icons under OpenVMS


Why Specify User-Defined Icons?

You can add your own icons to the 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, your icons appear 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 a user icon number x is SAS.sasUiconx . For example, to define the filename MYICON for the user icon 1, you should define the resource:

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 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: MYDISK:[MYDIR1.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 MYDISK:[MYDIR1.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.colorUiconCount

specifies the number of user-defined color icons that are available for SAS to use. The default is 0.

SAS.colorUiconPath

specifies the file search path for locating user-defined color icon files. The default is NULL. This string resource can contain multiple directory paths to be searched for a SAS icon file stored in X PixMap (.xpm) format. Use a comma to separate individual directory path elements in the icon path string. For example, the following string first searches for icon files in the MYDISK:[MYDIR1.PIXMAPS] directory, then searches in the MYDISK:[MYDIR2.PIXMAPS] directory:

SAS.colorUiconPath : MYDISK:[MYDIR1.PIXMAPS],
                     MYDISK:[MYDIR2.PIXMAPS]
SAS.uiconCount

specifies the maximum number of user-defined icons that are available for use in SAS. The default is 0.

SAS.uiconPath

specifies the search path for locating bitmap files for user-defined icons. The default is NULL. This string resource can contain multiple directory paths to be searched for the existence of a particular icon file. These files are assumed to be in the X11 X Bitmap (.xbm) format. A comma delimits individual directory-path elements in the icon-path string.

For example, the following string first searches for bitmap files in the MYDISK:[MYDIR1.BITMAPS] directory, then in the MYDISK:[MYDIR2.BITMAPS] directory:

SAS.uiconPath: MYDISK:[MYDIR1.BITMAPS],
               MYDISK:[MYDIR2.BITMAPS]

The directory-path elements must contain the complete path syntax.

SAS.sasUiconx

associates a value with the filename of an X Bitmap or Pixmap file. The value of x is a number assigned to the file. The default is NULL. A file extension of .xbm or .xpm is automatically supplied.

Previous Page | Next Page | Top of Page