Put up a custom menu bar
Name | Type | Opt | Description |
---|---|---|---|
display and behavior | int | opt | The argument sets the number of menus in the object's menu bar. If present, it must be at least 5 (one additional menu). The four default menus, which are always present, are File, Edit, Windows., and Help. On Macintosh, the Standard System Menu with the Apple icon and the Max/MSP application menu will appear to the left of the other menus. |
int | show-menus-flag (0 or non-zero) [int] |
A non-zero number displays the menubar object's menus, 0 restores the previous contents of the menu bar (either the Max menus or the menus of another menubar object). |
about | text of first menu item [list] |
This is a script message (see above) used to modify standard menus, and is the first item to appear in a script. It takes the following arguments: • Text of the first menu item (i.e. About My Program…). On the Macintosh the About item appears as the first item in the application menu (Max/MSP menu). On Windows, it appears as the first item in the Help menu. The message apple may be used optionally for compatibility with older Macintosh versions of Max. |
append | menu number item number text [list] |
This is a script message (see above) used to append new menu items. It takes the following arguments: • Menu number • Item number • Text of item • metacharacters (Optional.) The message appends an item to an additional menu previously defined with a message. You can alter the appearance of a menu item by including metacharacters in the item text (see the listing below for more information). |
apple | text of first menu item [list] |
(Macintosh only) This is a script message (see above) used to modify standard menus, and, when used, is the first item to appear in a script. It takes the following arguments: • Text of the first menu item (i.e. About My Program…). On the Macintosh the About item appears as the first item in the application menu (Max/MSP menu). On Windows, it appears as the first item in the Help menu. This message may be used optionally for compatibility with older Macintosh versions of Max. |
(mouse) | Double-clicking on the menubar object in a locked patcher will open a text editor window where you can insert a script to configure the menubar's appearance and behavior. | |
checkitem | checkitem [list] |
Followed by a menu number, an item number, and a code 0 or 1, | puts a check before the specified item if the code is 1, otherwise it removes the check.
closeitem | This is a script message (see above) used to modify standard menus. It causes a Close item to appear in the File menu, for closing the active window. | |
edit | item number text [list] |
This is a script message (see above) used to modify standard menus. It takes the following arguments: • Item number to output • Text of item to add to edit menu The message inserts items into the standard Edit menu after the Clear item and before the Overdrive and Resume items (which are moved into the Edit menu when menubar is activated). A blank line separates the custom inserted items from the default items. Each item has a number associated with it which is sent out the third outlet of menubar when the item is chosen. The order in which your additional items appear in the Edit menu is determined by their order in the script, not by the (arbitrary) number associated with each item. |
enableitem | menu-number item-number and enable/disable-flag (0 or 1) [list] |
Followed by a menu number, an item number, and a code 0 or 1, | enables the specified item if the code is 1, otherwise it disables (and grays out) the item.
end | This is a script message (see above) used to complete a script definition. The builds the menus and reports any errors encountered. | |
file | item number text [list] |
This is a script message (see above) used to modify standard menus. It takes the following arguments: • Item number to output • Text of item to add to file menu The message inserts items at the top of the standard File menu (before the Midi Setup... menu item). Each item has a number associated with it which is sent out the when the item is chosen. The order in which your additional items appear in the File menu is determined by their order in the script, not by the (arbitrary) number associated with each item. |
item | menu number item number text [list] |
This is a script message (see above) used to create new menus and menu items. It takes the following arguments: • Menu number • Item number • Text of item • metacharacters (Optional.) The message adds an item to an additional menu previously defined with a message. The order in which your items appear in the menu is determined by their order in the script, not by the (arbitrary) number associated with each item. The item number argument only specifies the number which is sent out the menubar object’s outlet when the user chooses this item. It’s a good idea to start your item numbers at 1 and list the items in the order you want them to appear in a menu. You can alter the appearance of a menu item by including metacharacters in the item text. For more on metacharacters, consult the Apple QuickTime Developer documentation found at: developer.apple.com A few of the recognized meta-characters are: / : followed by a character, assigns that character as a Command-key equivalent < : followed by B, I, O, S, or U, specifies a font style (such as O for outline) ! : followed by a character, marks the menu item with that character (: disables the menu item Thus, these special characters cannot appear as part of the actual item text. For example, the text will appear as , not as . |
markitem | menu-number item-number and ASCII-code [list] |
(Macintosh only) Followed by a menu number, an item number, and an ASCII character code, | places the character next to the specified item. Common mark character ASCII codes are 18 for the check mark and 19 for the diamond mark. You may also wish to use the em dash (209) or bullet (165).
menutitle | item number name of menu [list] |
This is a script message (see above) used to create new menus and menu items. It takes the following arguments: • Menu number (must be at least 5 and must not exceed the number of outlets specified in the argument to the menubar object. • Name of menu The message adds a new menu before the Window menu. The first additional menu is number 5. The menu number determines both the order of the additional menu in the menu bar and the outlet it uses when the user chooses its items. A message must appear in the script before any messages that refer to its menu number. |
newitem | menu item number [int] |
This is a script message (see above) used to modify standard menus. It takes the following arguments: • Item number to output. The message followed by a non-zero number directs Max to send the specified number out the menubar object’s File menu outlet when the user chooses the New command from the File menu, instead of opening a new patcher window. The message (or the absence of any message) causes the New command to behave normally. |
open | menu item number [int] |
This is a script message (see above) used to modify standard menus. It takes the following arguments: • Item number to output. The message followed by a non-zero number directs Max to send the specified number out the menubar object’s File menu outlet when the user chooses the Open... command from the File menu, instead of displaying the Open Document dialog box. The message (or the absence of any message) causes the Open... command to behave normally. |
saveas | menu item number [int] |
This is a script message (see above) used to modify standard menus. It takes the following arguments: • Item number to output. The message followed by a non-zero number directs Max to send the specified number out the menubar object’s File menu outlet when the user chooses Save or Save As... from the File menu, instead of performing the standard Save actions. The number sent out the outlet when Save is chosen will be 1 less than the number sent when Save As... is chosen. The message (or the absence of any message) causes the Save and Save As... commands to behave normally. |
Name | Description |
---|---|
umenu | Pop-up menu, to display and send commands |