M_Insert [Menu_Id,] Item,
Txt$,R Entry |
Menu_Id |
Menu identification number. |
Item |
Number of the menu item behind which the new item is to be inserted.
If you indicated here -Item instead Item ,
then the new menu option is not added behind but rather in front of Item. |
Txt$ |
Text of the menu item. |
Entry |
Number of the menu item. |
This command makes it possible to insert a menu option subsequently.
For example, you can create a window menu with nothing more than the titles of the
currently opened windows. Users can then select the corresponding menu item and thus
move the desired window to the front. Of course, you have to program this operation
yourself.
Note: EasyGem
searches for a free number for Entry. This means that if you make any subsequent menu changes, you can no longer
assume that sequential menu items also have sequential numbers. |
M_Modifier [[Menu_Id,]Entry,]Modifier |
Menu_Id |
Menu identification number. |
Entry |
Number of the menu item. |
Modifier |
Bit mask for the desired keys:
Bit 0: Shift Key
Bit 1: Alt Key
Bit 2: Ctrl Key
Bit 3: NOT Cmd Key
Please note: Bit 3 is a negative bit. If this bit is set, the Cmd key is not used. |
Defines additional modifier keys (Shift, Ctrl, Alt, Cmd), which have
to be pressed in addition to trigger a menu item. The Mac traditionally uses the
command key to define shortcuts for the menus. Starting with Mac OS 8.0, it is possible
to utilize the other modifier keys for menu shortcuts as well.
Available starting with Mac OS 8.0 |
M_Show_Popup Menu_Id,X,Y,R
Entry |
Menu_Id |
Menu identification number. |
X |
X-position where the pop-up menu is to be displayed. |
Y |
Y-position where the pop-up menu is to be displayed. |
Entry |
Number of the menu item selected by the user from the pop-up menu. |
This command depicts a pop-up menu. After the user has selected a
menu item, the number of the item is returned in Entry
and the pop-up menu is removed again.
First, the pop-up menu has to be defined with Def_Popup.
Warning: Do not
use Menu_Id to pass
identification numbers of entire menu bars as returned with Def_Menu or Make_Menu. |