| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (4 out of 6)

GMS Menu Types

The types of GMS menus include:

Both pulldown menus and popup menus can contain cascade menus or "walking menus" that display choices for a menu entry.

When this document refers to a GMS menu, the reference applies equally to pulldown menus, popup menus, and cascade menus.

Popup and cascade menus both appear only when needed. Because they come and go, this document refers to popup and cascade menus as transient menus.

Pulldown Menus in Menu Bars

A pulldown menu appears in a horizontal menu bar that extends along the top of a G2 window, as shown in the following figure.


GMS automatically positions a menu bar at the top of the G2 window. If the window is not wide enough to show all menu entries in one row, GMS automatically wraps the menu onto additional rows as needed.

GMS automatically positions a transient menu to be near the site of the mouse click that activated it and to be completely visible within the G2 window. If GMS cannot display the complete menu at an acceptable location, it automatically displays the menu with scroll indicators. If you hold the mouse pressed over a scroll indicator, the menu scrolls to display additional entries.

Menu bars typically remain on display over time. You can use API calls to make them appear, change, and disappear as needed, but they do not change merely because you have chosen an entry. A G2 window can contain at most one menu bar at a time.

By convention, a menu bar:

GMS does not enforce these conventions, However, we recommend that you follow them for consistency with Windows standards.

Popup Menus

A popup menu is a freestanding menu that can appear anywhere in a G2 window in response to a mouse click. A popup menu is associated with an item in a G2 window. Any G2 item can be configured to display a GMS popup menu instead of its G2 menu. An example is shown in the following figure:


Popup menus appear only when they are needed. A popup menu typically appears in response to a mouse click, and disappears as soon as you have chosen an entry from the menu or from a cascade menu that is subsidiary to it.

A popup menu can have a title block called a header that describes the purpose of the menu. Menu bars and cascade menus do not have headers. In the example of a popup menu, the term "object" is a header for the popup menu.

Cascade Menus

A cascade menu is a subsidiary menu that appears when you choose a higher-level menu entry. The presence of a cascade menu in one of the pulldown menu entries is indicated by a right-pointing arrow. To display the cascade menu, click on the arrow.


Cascade menus are similar in appearance to popup menus, except that a cascade menu cannot have a header. Cascade and popup menus follow the same conventions for marking entries.

A cascade menu appears when you choose a cascading entry from a higher-level menu. The higher-level menu remains on display after the cascade menu appears. Cascade menus can contain cascading entries, to a maximum of 256 levels.

When you choose an entry from a cascade menu, the menu and any higher-level transient menus immediately disappear. If the highest-level menu is a menu bar, it remains on display unless an API call explicitly removes it.

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (4 out of 6)

Copyright © 1997 Gensym Corporation, Inc.