-
Notifications
You must be signed in to change notification settings - Fork 0
MUI_Menustrip
Menustrip class is the base class for MUI's object oriented menus. Its children are objects of Menu class, each of them describes exactly one menu.
A Menustrip object doesn't feature many options itself, but as a subclass of Family class, it simply acts as father for multiple Menu objects.
The Menustrip object is usually specified as a child of either Application class or Window class with the attributes MUIA_Application_Menustrip or MUIA_Window_Menustrip.
Attribute | Version | ISG | Type |
---|---|---|---|
MUIA_Menustrip_CaseSensitive | V20 | I.G | BOOL |
MUIA_Menustrip_Enabled | V8 | ISG | BOOL |
Method | Version |
---|---|
MUIM_Menustrip_ExitChange | V20 |
MUIM_Menustrip_InitChange | V20 |
MUIM_Menustrip_Popup | V20 |
MUIM_Menustrip_WillOpen | V22 |
MUIA_Menustrip_CaseSensitive -- V20 [I.G], BOOL
, 0x8042d718
Set this attribute to TRUE in case the menu strip is using items with the same upper and lower case shortcuts, i.e. 'a' and 'A'. Otherwise MUI will not be able to distinguish between the two and will most probably find the upper case shortcut only and trigger the corresponding action.
Defaults to FALSE.
MUIA_Menustrip_Enabled -- V8 [ISG], BOOL
, 0x8042815b
Enable or disable the complete menu strip.
MUIM_Menustrip_ExitChange -- V20, 0x8042ce4d
DoMethod(obj, MUIM_Menustrip_ExitChange);
Terminates MUIM_Menustrip_InitChange state.
MUIM_Menustrip_InitChange -- V20, 0x8042dcd9
DoMethod(obj, MUIM_Menustrip_InitChange);
Prepares a menustrip for dynamic adding/removing of items. MUI 3 offers the possibility to dynamically add/remove items from menustrips, even when the window that contains these items is currently open. To be able to do this, you must first put the menustrip into a special "exchange" state by using this method. Then, you can add/remove item at will. When you're done, use MUIM_Menustrip_ExitChange to make MUI relayout the menustrip.
/* remove two items, add another one */
if(DoMethod(strip, MUIM_Menustrip_InitChange))
{
DoMethod(strip, OM_REMMEMBER, someitem);
DoMethod(strip, OM_REMMEMBER, someitem2);
DoMethod(strip, OM_ADDMEMBER, somenewitem);
DoMethod(strip, MUIM_Menustrip_ExitChange);
}
MUIM_Menustrip_Popup -- V20, 0x80420e76
DoMethod(obj, MUIM_Menustrip_Popup, Object *parent, ULONG flags, LONG x, LONG y);
Open a menustrip for user input even without active user interaction.
Object *parent
the parent object relative to which the menustrip will be opened.
ULONG flags
none defined yet, set to 0.
LONG x
additional horizontal offset which will be added to
the parent object's left coordinate.
LONG y
additional vertical offset which will be added to
the parent object's top coordinate.
Returns the MUIA_UserData attribute of the selected item.
MUIM_Menustrip_WillOpen -- V22, 0x804230e9
DoMethod(obj, MUIM_Menustrip_WillOpen);
Inform the application about a menustrip to opened right after this method.
The key function of the method is to let the application update the menu strip before it is actually opened.
Copyright © 1992-2006 by Stefan Stuntz Copyright © 2006-2021 by Thore Böckelmann, Jens Maus |
MUI for AmigaOS Homepage MUI for AmigaOS Wiki |
Updated: 11-Oct-2021 |