[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.