[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

GadTools menus are regular Intuition menus.  Once the menus have been laid
out, the program may do anything with them, including attaching them or
removing them from windows, enabling or disabling items, checking or
unchecking checkmarked menu items, etc.  See the documentation for
SetMenuStrip(), ClearMenuStrip(), ResetMenuStrip(), OnMenu() and OffMenu()
in the "Intuition Menus" chapter for full details.

If a GadTools-created menu strip is not currently attached to any window,
the program may change the text in the menu headers (Menu->MenuName), the
command-key equivalents (MenuItem->Command) or the text or imagery of menu
items and sub-items, which can be reached as:

    ((struct IntuiText *)MenuItem->ItemFill)->IText
or
    ((struct Image *)MenuItem->ItemFill)

The application may also link in or unlink menus, menu items or sub-items.
However, do not add sub-items to a menu item that was not created with
sub-items and do not remove all the sub-items from an item that was
created with some.

Any of these changes may be made, provided the program subsequently calls
LayoutMenus() or LayoutMenuItems() as appropriate.  Then, reattach the
menu strip using SetMenuStrip().

Some of these manipulations require walking the menu strip using the usual
Intuition-specified linkages.  Beginning with the first Menu structure,
simply follow its FirstItem pointer to get to the first MenuItem.  The
MenuItem->SubItem pointer will lead to the sub-menus.  MenuItems are
connected via the MenuItem->NextItem field.  Successive menus are linked
together with the Menu->NextMenu pointer.  Again, see the chapter
"Intuition Menus" for details.