umenu
Description
Displays text as a pop-up menu. Selections can be made manually, or set incoming numbers. Outputs both selection number and selection text.
Arguments
None.
Attributes
align [atom]!
Sets the text alignment mode. Alignment modes are:
0 left (the default)
1 center (1)
2 right alignment (2)
allowdrag [int] (default: 1)7.0.2
Toggles the ability of using drag & drop from a folder to populate the umenu object (default = 1).
applycolors [int] (default: 0)
Apply Box Colors to Menu
arrow [int]
Toggles the drawing of the down arrow on the umenu object (default = 1).
autopopulate [int] (default: 0)
Toggles the automatic population of an umenu object with folder contents (default = 0). The automatic population will occur when it receives a valid folder path as the argument to a prefix message, or at patcher load, if a valid prefix is stored with the object. See the prefix, populate, and types message descriptions for more information.
bgfillcolor [4 floats]7.0.0
Sets the background color of the umenu object object in RGBA format.
collection [symbol] (default: )7.0.0
Toggles the automatic population of an umenu object with the contents of a Collections folder (default = 1). The automatic population will occur when the attribute is enabled.
Possible values:
''
'Plug-ins'
'Sample Collection'
'Lessons'
'Vizzie Controllers'
'Vizzie Effects'
'Vizzie Generators'
'Vizzie PVR'
color [4 floats]7.0.0
Sets the toggle highlight color in RGBA format.
depth [int] (default: 0)
Sets the folder recursion depth used by the umenu object when populating from a valid file path.
elementcolor [4 floats]7.0.0
Sets the toggle off color in RGBA format.
items [atom]
The items attribute, which is only accessible using the umenu object's Inspector, lets you enter the items which you want to appear on the menu by typing into a dialog box. Menu items are separated by by commas (e.g., red, orange, yellow, green).
labelclick [int] (default: 0)
Toggles Label Click mode on or off. In this mode, when the object is in Label mode, you can click in the object's rectangle and the current value of the menu is sent out the left outlet. In addition, the text of the current item is shown underlined.
menumode [int] (default: 0)
Sets the appearance and behavior of the umenu object. The modes are:
0: Normal mode - the normal pop-up menu (default).
1: Scrolling mode - lets you scroll through the individual menu items by dragging the mouse up or down, displaying one item at a time.
2: Label mode - shows the text of the selected menu item with no border around it, and does not respond to the mouse.
3: Toggle mode - Clicking on the object in mode 3 causes it to alternate between an active and inactive state. When changing from inactive to active, the object sends the message from its rightmost outlet. When changing from active to inactive, the object sends the message from its rightmost outlet, and changes to the color set using the attribute. Whether activating or deactivating, the object also sends its current message from the middle outlet and its current item number from the left outlet.
Control-clicking allows you to change the current state of a umenu object in toggle mode.
Possible values:
0 = 'Normal'
1 = 'Scrolling'
2 = 'Label'
3 = 'Toggle'
parameter_enable [int]
Enables use of this object with Max for Live Parameters and allows for setting initial parameter values in the Max environment.
parameter_mappable [int] (default: 1)
When parameter_mappable is enabled, the object will be available for mapping to keyboard or MIDI input using the Mappings feature. (default = 1).
pattrmode [int] (default: 0)
Sets the method used by the umenu object object to report its internal state to the pattr object. When the argument is 0 (default), the umenu object reports its internal state by number (e.g. item 3 of the list of items). When the argument is 1, the umenu object reports its internal state by symbol (e.g. item 'carrots' of the list of items).
prefix [symbol] (default: )
Sets a menu-wide prefix, which can be concatenated or prepended to all menu item text before output. If the prefix is a valid folder path, the populate and types messages can be used to automatically fill the umenu object with a list of files in the folder. See the entries for those messages for more information. Sending a prefix message without any argument clears the currently stored prefix.
prefix_mode [int] (default: 0)
Sets the output behavior of the prefix mode. The modes are:
0: concatenate mode; the prefix is added to the front of the outgoing message without a space.
1: prepend mode; the prefix is added to the front of the outgoing message list as a discrete symbol.
2: ignore mode; the prefix is not used for output.
Possible values:
0 = 'Concatenate'
1 = 'Prepend'
2 = 'Ignore'
showdotfiles [int] (default: 0)
Toggles the display of files whose names begin with a dot (.). The default is off.
style [symbol] (default: )7.0.0
Sets the style to be applied to the object. Styles can be set using the Format palette.
textcolor [4 floats]
Sets the text color of the umenu object in RGBA format. The attribute is mapped to the style color.
truncate [int] (default: 1)
Toggles the location of the truncation of text in the umenu object when the text is too long. The default is 1 (truncate the end of the text on the right-hand side). A value of 2 will cause the text to truncate in the middle in the same manner as the textbutton object.
Possible values:
0 = 'Truncation full words'
1 = 'Truncate from the right'
2 = 'Truncate from the middle'
types [symbol]
Sets a file type filter for use by the Filetypes Recognized in Max Guide.
message. Up to 64 file types may be entered as a list. By default, no file types are filtered. For a list of valid four-letter filetype codes, see theunderline [int] (default: 0)
Toggles the underlining of text in the umenu object. The default is 0 (no underlining).
Common Box Attributes
Parameter Attributes
Messages
bang
int
Arguments
float
Arguments
(drag)
When a file folder is dragged from the Max File Browser to a blank space in an unlocked patcher window, a umenu object containing the folder's contents loaded will be created.
append
Arguments
checkitem
Arguments
checked [int]
clear
clearchecks
count
delete
Arguments
dictionary
Arguments
"items" : [ "hank", "carol", "andreas", "roland" ]
dump8.0.0
enableitem
Arguments
enable [int]
gettoggle
insert
Arguments
message [list]
mode
Arguments
(mouse)
next
populate
prev
set
Arguments
setcheck
Arguments
setitem
Arguments
message [list]
setrgb
Arguments
fore-green [int]
fore-blue [int]
back-red [int]
back-green [int]
back-blue [int]
setsymbol
Arguments
settoggle
Arguments
showchecked
symbol
Arguments
toggle
Arguments
Output
anything
Out middle outlet: The text of the selected menu item is sent out as a message.
Out right outlet: The , , and , messages will cause status messages to be sent out the right outlet.
int
Out left outlet: The number of the selected menu item is sent out. Menu items are numbered beginning with 0.
See Also
Name | Description |
---|---|
coll | |
fontlist | |
Max Basic Tutorial 13: Movie Sequencing | Max Basic Tutorial 13: Movie Sequencing |