Skip to content

MUI_Menustrip

Thore Böckelmann edited this page Jul 24, 2021 · 4 revisions

Menustrip.mui

Super class

Family.mui

Background

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.

Attributes

Attribute Version ISG Type
MUIA_Menustrip_CaseSensitive V20 I.G BOOL
MUIA_Menustrip_Enabled V8 ISG BOOL

Methods

Method Version
MUIM_Menustrip_ExitChange V20
MUIM_Menustrip_InitChange V20
MUIM_Menustrip_Popup V20
MUIM_Menustrip_WillOpen V22

MUIA_Menustrip_CaseSensitive

NAME

MUIA_Menustrip_CaseSensitive -- V20 [I.G], BOOL, 0x8042d718

FUNCTION

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

NAME

MUIA_Menustrip_Enabled -- V8 [ISG], BOOL, 0x8042815b

FUNCTION

Enable or disable the complete menu strip.

MUIM_Menustrip_ExitChange

NAME

MUIM_Menustrip_ExitChange -- V20, 0x8042ce4d

SYNOPSIS

DoMethod(obj, MUIM_Menustrip_ExitChange);

FUNCTION

Terminates MUIM_Menustrip_InitChange state.

SEE ALSO

MUIM_Menustrip_InitChange

MUIM_Menustrip_InitChange

NAME

MUIM_Menustrip_InitChange -- V20, 0x8042dcd9

SYNOPSIS

DoMethod(obj, MUIM_Menustrip_InitChange);

FUNCTION

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.

EXAMPLE

/* 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);
}

SEE ALSO

MUIM_Menustrip_ExitChange

MUIM_Menustrip_Popup

NAME

MUIM_Menustrip_Popup -- V20, 0x80420e76

SYNOPSIS

DoMethod(obj, MUIM_Menustrip_Popup, Object *parent, ULONG flags, LONG x, LONG y);

FUNCTION

Open a menustrip for user input even without active user interaction.

INPUTS

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.

RESULT

Returns the MUIA_UserData attribute of the selected item.

MUIM_Menustrip_WillOpen

NAME

MUIM_Menustrip_WillOpen -- V22, 0x804230e9

SYNOPSIS

DoMethod(obj, MUIM_Menustrip_WillOpen);

FUNCTION

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.

SEE ALSO

MUIM_Menustrip_Popup


Copyright © 1992-2006 by Stefan Stuntz
Copyright © 2006-2021 by Thore Böckelmann, Jens Maus
MUI for AmigaOS Homepage
MUI for AmigaOS Wiki
Updated: 24-Jul-2021
Clone this wiki locally