Subroutines > Detailed Descriptions > AUI > Menu > AUI_Menu Traditional Method
Mnutxt

Updated May 2011

mnutxt (String) specifies the text that will appear in the menu item, and optionally, a bitmap or icon to display alongside the text. You may precede one letter with “&” to allow that letter to be used with the Alt key as a hot key for the menu. For example, “&Custom” would display as “Custom” and could be selected via Alt+C. mnutxt may also serve as the identifier for the menu item, allowing it to be selected for later deletion, so it should be a unique string.

When modifying or deleting menu items, you may identify the item by setting mnutxt to either the original text used when the menu was created, or to the string representation of its ordinal position (starting from 1). The numeric version has the advantage of allowing you to modify or delete built-in menu items, as well as being more flexible in cases where the menu text may be multi-lingual or configurable by the user. For example, to delete the built-in "Exit" option on the File menu:

xcall AUI, AUI_MENU, MNUOP_DEL, 1, "5", 0, 0, "", "", status

In the above example, the parameter 1 references the first item on the top menu bar (File), and "5" references the 5th item on that drop-down menu (Exit).

Internal Menu Identifiers:

Symbol

Value

Description

IDM_ABOUT

101

Help...About

IDM_LOAD

107

File...Load Settings

IDM_SAVEAS

109

File..Save Settings As

IDM_SAVE

108

File..Save Settings

IDM_DEFAULTS

112

File...Default Settings

IDM_PRINTS

111

File..Print Screen

IDM_AUTOMOUSE

124

Edit..AutoMouse

IDM_COPY

115

Edit..Copy

IDM_PASTE

116

Edit...Paste

IDM_SCHEDULE

106

Settings...Scheduling

IDM_COLORS

113

Settings..Colors

IDM_BEVELING

122

Settings...Beveling

IDM_FONTSYS

123

Settings...Font...System

IDM_FONTGUI

132

Settings...Font...GUI

IDM_FONTGRID

144

Settings..Font..Grid

IDM_MISC

130

Settings...Misc Settings

IDM_RESET

131

Settings...Reset

IDM_DLGSIZING

134

Settings...Dialog Sizing

IDM_KBDLOCK

117

Settings...Keyboard Lock

IDM_PVPREF

142

Settings...Preview Preferences

IDM_RESET

131

Settings..Reset

 

History

2011 May: Updated table to agree with ashell.def

2009 July, 5.1.1155

You can also reference built-in menu items by setting mnutxt to the string representation of the item’s internal command ID (in the range of 100-199); see the Internal Menu Modifiers table, above.

2009 July, 5.1.1154

You can specify a bitmap or icon to display next to the menu item; see Menu Icons.