| Prev | Next | Start of Chapter | Next Chapter | Contents | Glossary | Index | Comments | (5 out of 5)

Specifying User Preferences

You cannot change the system default preferences. The rest of this chapter shows you how to specify generic or individual user preferences. A reference to particular preference refers to the value of the relevant attribute in the applicable User Preferences object.

Specifying Font and Separator Size

You can specify the font in which GMS displays menu entries, and the height of any separators that appear between them.

To specify the font size used to display menu entries:

To specify the height of separators between menu entries:

Specifying default tells GMS to make separators the same height as a menu entry. That height depends on the setting of Gms-font-size. Specifying a positive integer tells GMS to give separators the indicated height in workspace units.


Caution: If you set the gms-separator-height to be any value other than the default, and a separator exists on a panel that is a candidate for scrolling, the panel will not scroll.

Controlling Help Information

You can turn Help information on and off, and control the font in which GMS displays it.

To set GMS to display Help information:

  1. Set Gms-show-help-message to be true.

  2. Set Gms-priority to be a higher number than that of any of the other preference objects.

To set GMS to not display Help information:

To specify the font size used to display Help information:

Controlling Colors

You can control the text and background colors of menu entries and popup menu headers. Menu entry colors can vary depending on whether the entry is unselected, selected, or disabled. The following table lists each user preference that controls color, its default, and the color that it controls:

Preference Default Description
Gms-normal-text-color
black
The color of the text in a menu entry that is neither selected nor disabled.
Gms-normal-background-color
white
The color of the background in a menu entry that is neither selected nor disabled.
Gms-highlighted-text-color
white
The color of the text in a selected menu entry.
Gms-highlighted-background-color
medium-blue
The color of the background in a selected menu entry.
Gms-disabled-text-color
gray
The color of the text in a disabled menu entry.
Gms-header-text-color
light-goldenrod-yellow
The color of the text in a popup menu header.
Gms-header-background-color
black
The color of the background in a popup menu header.

Specifying Menu Navigation Modes

GMS provides two menu navigation modes, called walking menus and sticky menus, as described under Choosing a Menu Entry. Walking menus are always available. Sticky menus are optional.

To specify that sticky menus are available:

To specify that sticky menus are not available:

Controlling Menu Blinking

By default, GMS undisplays transient menus and invokes a leaf entry's callback procedure as soon as you choose the entry. You can set GMS to first blink a chosen menu entry one or more times.

To specify that GMS does not blink a chosen menu entry:

To specify that GMS blinks a chosen menu entry:

Designating an Initial Menu Bar

You can set GMS to display a particular menu bar to the user whenever G2 starts.

To specify that GMS does not display a menu bar on startup:

This setting does not prevent a subsequent API call from showing a menu bar. It specifies only that GMS does not do so automatically on startup.

To specify that GMS displays a designated menu bar on startup:

If no menu bar has the specified key, GMS does not display any menu bar, just as if the value were false or none.

To specify that GMS displays a randomly selected menu bar on startup:

This setting is appropriate when only one menu bar is defined, because only one application is loaded, and the user wants to use the application without needing any information about GMS internals.

Raising the Menu Bar to the Top

Displaying other workspaces in a window may obscure any menu bar in that particular window. Obscuring a menu bar may make it inaccessible. You may specify an interval, in seconds, at which GMS displays the menu bar on top of all other workspaces.

To specify that GMS should raise the menu bar to the top regularly:

If you specify 0 for this attribute, GMS does not perform this function.

Specifying Internationalization

Several factors, including the user preference Gms-language, control GMS internationalization. For information on internationalizing GMS menus, see Chapter 12, Internationalizing GMS Menus.

| Prev | Next | Start of Chapter | Next Chapter | Contents | Glossary | Index | Comments | (5 out of 5)

Copyright © 1997 Gensym Corporation, Inc.