One common element between applications built on the Macintosh, Microsoft Windows and X is a menu bar. This contains a list of menus, which contain different commands that can be executed. The menu manager classes described here are designed to support menus and menu bars.
Menus and Menu Bars
A menu bar is generally defined in a resource file. This definition defines the different menus and their relative positions in the menu bar, as well as a corispondance between menu items and menu command numbers. (A menu command ID is a 16-bit integer giving a unique ID for each menu item.)
Both menu bars and menus are encapsulated as an object by YAAF. The XGMenu class encapsulates access to a single menu, and an XGMenuBar encapsulates access to the menu bar. There can be one global menu bar (such as on the Macintosh or on a MDI-style Microsoft Windows application), or one menu bar per window (such as with SDI-style Microsoft Windows applications or with X applications).
Generally you would only access the menu in a menu bar if you wanted to customize the menus or change their name. More likely you would not use these classes. Instead you would use respond to the YAAF menu messages.
This is the class which encapsulates access to a single menu.
This encapsulates access to a menu bar. There can either be one global XGMenuBar object (such as on the Macintosh), or one menu bar per window (as with X).