2. Menu Library -turn page- 3. Dialog Library

Contents | Start

Reference List Menu Library


Clear_Menu [Menu_Id]
Menu_Id Menu identification number.
Delete menu.
 
 
Def_Menu [R Menu_Id,] Copyright$, R Copyright
Menu_Id Menu identification number.
Copyright$ First item in the apple menu.
Copyright Returned number of the copyright item.
Initiates the definition of a menu. Do not use Make_Menu but rather the procedure Def_Menu available starting with EasyGem 4.0, because this one does not contain any superfluous parameters and the Menu_Id is returned already during the start of the definition.
 
 
Def_Popup R Menu_Id
Menu_Id Menu identification number of the pop-up menu.
Initiates the definition of a pop-up menu.
 
 
Easy_Mesag R Entry
Entry Number of the chosen entry.
Query menu.
 
 
End_Menu [R Menu_Id]
Menu_Id Menu identification number.
Conclude menu definition.
 
 
End_Popup
Concludes the definition of a pop-up menu.
 
 
FN M_Checked([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu entry.
Querying for "checked" (check mark): Returns -1, if the entry is "checked," otherwise 0.
 
 
FN M_Command([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu entry.
Querying for "shortcut" (shortcut for menu item): Returns the ASCII code of the shortcut belonging to the menu item.
 
 
FN M_Crossed([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu entry.
Querying for "crossed" (crossed out rectangular or square): Returns -1, if the entry is "crossed," otherwise 0.
 
 
FN M_Enabled([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu entry.
Querying for "disabled" (grayed out - cannot be selected): Returns -1, if the entry is "enabled," (if entry can be selected), otherwise 0.
 
 
FN M_Font([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu item.
Returns the font number of the text font used to display the menu text.
 
 
FN M_Handle([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu item.
This function is only of interest to pros. It returns the handle used to manage the menu, which is associated with the item with the number Entry. If you want to apply the functions of the the Mac OS Toolbox (MAC_OS command) to your EasyGem menus, you will need this handle.
 
 
FN M_Icon([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu item.
Returns the resource number of the icon, which is displayed in this menu item. The value must be between 256 and 510.
 
 
FN M_Mark([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu entry.
Querying for "mark" (marking of the menu item): Returns the ASCII code of the marking of the menu item.
 
 
FN M_Modifier([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu item.
Queries for the bits of the modifier keys, which are used to trigger the menu item. The individual bits returned in a bit mask have the following meaning:

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.

Available starting with Mac OS 8.0
 
 
FN M_Style([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu entry.
Querying for "style" (font of menu item): Returns the text style (significance is same as for TEXT STYLE).
 
 
FN M_Text$([Menu_Id,]Entry)
Menu_Id Menu identification number.
Entry Number of the menu entry.
Querying for "text" (text of the menu item): Returns text of the menu item as a string.
 
 
FN M_Which
Returns the menu identification number of the displayed menu.
 
 
Make_Menu Apple$,Copyright$,R Copyright [,Menuname$]
Apple$ Here, allways the apple logo is displayed. Therefore the parameter has no meaning but for the reason of compatibility with older EasyGem versions it allways has to be passed as well.
Copyright$ First entry in the apple menu.
Copyright Returned number of the copyright entry.
Menuename$ Has no meaning and can be omitted.
Initiates the definition of a menu.
 
 
M_Check [[Menu_Id,]Entry]
Menu_Id Menu identification number.
Entry Number of the menu entry.
Sets the attribute "checked" (preceding check mark).
 
 
M_Checked_Entry Txt$,R Entry
Txt$ Text des Menüeintrags.
Entry Number of the menu entry.
Defines an entry analogously to M_Entry, with the difference that the entry is "checked" at once.
 
 
M_Command [[Menu_Id,]Entry,]Cmd
Menu_Id Menu identification number.
Entry Number of the menu entry.
Cmd ASCII-Code of the desired character.
Defines a "shortcut" for the menu entry.
 
 
M_Cross [[Menu_Id,]Entry]
Menu_Id Menu identification number.
Entry Number of the menu entry.
Sets the attribute "crossed" (crossed out rectangular or square).
 
 
M_Crossed_Entry Txt$,R Entry
Txt$ Text of the menu entry.
Entry Number of the menu entry.
Defines an entry analogously to M_Entry, with the difference that the entry is "crossed" at once.
 
 
M_Delete [Menu_Id,] Item
Menu_Id Menu identification number.
Item Number of the menu item to be removed.
This command makes it possible to delete a menu option subsequently.
 
 
M_Disable [[Menu_Id,]Entry]
Menu_Id Menu identification number.
Entry Number of the menu entry.
Sets then attribute "disabled" (grayed out - cannot be selected).
 
 
M_Disabled_Entry Txt$[,R Entry]
Txt$ Text of the menu entry.
Entry Nummer des Menüeintrags.
Defines an entry analogously to M_Entry, with the difference that the entry is "disabled" at once.
 
 
M_Draw
Redraws the currently displayed menu. You will need this command, for example, to make the inactive status visible after having deactivated one or several menu titles using M_Deactivate.
 
 
M_Enable [Menu_Id,]Entry
Menu_Id Menu identification number.
Entry Number of the menu entry.
Clears the attribute "disabled" (grayed out - cannot be selected). The entry can be selected again.
 
 
M_End_Title
Finishes definition of a menu title (M_Title) or submenu (M_Subtitle).
 
 
M_Entry Txt$,R Entry
Txt$ Text of the menu entry.
Entry Number of the menu entry.
Define a menu entry.
 
 
M_Font [[Menu_Id,]Entry,]Font
Menu_Id Menu identification number.
Entry Number of the menu item.
Font Font number of the desired font.
Defines the font for the menu item. If you do not know the number of the desired font, you can use the FN Get_Font_Number function from the Extension Library to find out the number using the font name.

Available starting with Mac OS 8.0
 
 
M_Hide
The actually displayed menu is made unselectable. Using M_Show the so inactivated menu can be reactivated again.
 
 
M_Icon [[Menu_Id,]Entry,]Icon
Menu_Id Menu identification number.
Entry Number of the menu item.
Icon Resource number of the desired icon. The resource has to be of the type 'cicn' or ICON'. The value must be between 256 and 510.
Determines which icon is displayed in the item numbered Entry. The icon's size is usually 32 x 32 pixels. Using the command M_Command([[Menu_Id,]Entry,]$1D)has the effect that the icon is reduced to 16 x 16 pixels.
 
 
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_Line_Entry
Defines a separator.
 
 
M_Mark [[Menu_Id,]Entry,]Mark
Menu_Id Menu identification number.
Entry Number of the menu entry.
Mark ASCII code of the desired character.
Defines a mark (character in front of the menu text).
 
 
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_Normal [Menu_Id,]Entry
Menu_Id Menu identification number.
Entry Number of the menu entry.
Clear all attributes.
 
 
M_Show [Menu_Id]
Menu_Id Menu identification number.
Display menu.
 
 
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.
 
 
M_Style [[Menu_Id,]Entry,]Style
Menu_Id Menu identification number.
Entry Number of the menu entry.
Style Text style of the menu text (significance is same as for TEXT STYLE).
Defines the text style of the menu text.
 
 
M_Subtitle Subtitle$[,R Entry]
Subtitle$ Menu item used to call the submenu.
Entry Number of the subtitle item.
Starts a new submenu. All subsequent menu items are entered into a submenu, which can be called using this menu item.
 
 
M_Text [Menu_Id,]Entry,Txt$
Menu_Id Menu identification number.
Entry Number of the menu entry.
Txt$ Text of the menu entry.
Defines the text of the menu entry.
 
 
M_Title Title$[,R Entry]
Title$ Menu title.
Entry Number of the menu item.
Starts a new menu title.
 
 
M_Uncheck [Menu_Id,]Entry
Menu_Id Menu identification number.
Entry Number of the menu entry.
Clear the attribute "checked" (preceding check mark).
 
 
M_Uncross [Menu_Id,]Entry
Menu_Id Menu identification number.
Entry Number of the menu entry.
Clear the attribute "crossed" (crossed out rectangular or square).
 
 
M_Waitmesag R Entry
Entry Number of the chosen menu entry.
Wait until the user selects a menu entry.
 
 

2. Menu Library -turn page- 3. Dialog Library

Contents | Start



© 1998-2000 Berkhan-Software
www.berkhan.com | Home