Creates a main menu for the application. The structure of the menu is defined as an indented text (with spaces) representing the menu's structure.

The following example creates a menu with two top-level items, File and Edit, where File has three sub-items (Open, Save and a separator) and Edit has two sub-items (Command 1 and Command 2) where Command 1 has two sub-items (Sub Command 1 and Sub Command 2).
File
Open
Save
Edit
Command 1
Sub Command 1
Sub Command 2
Command 2
The menu structure is defined as an indented text. Each line represents a menu item. Sub-menus are defined by indenting the menu item with spaces: one more space than the parent item for each level.
Each menu item (except separators) creates an outlet named after its caption:
For the example above, the outlets are File, Open, Save, Edit, Command 1, Sub Command 1, Sub Command 2 and Command 2. The connections are restored by name when the structure is edited.
On macOS an empty first menu is added so that the menu items are not placed in the application menu.
The tag image= add an image at the left of the menu item. Images must be present in the Usine package or specified as an absolute path. Image names must not contain the comma character.
File
Open,image=open.png
Save,image=c:\users\test\images\save.png
To set a shortcut for the menu item, set the shortcut= tag.
File
Open,shortcut=Ctrl+O
Save,shortcut=Ctrl+S
Save All,shortcut=Shift+Ctrl+S
The allowed shortcuts modifiers and special characters are:
To avoid shortcut conflicts with the main Usine's shortcuts, activate the setup-panel-tab-expert disable-all-key-learn option
With the tag checkbox the menu item is defined as a checkbox.
Options
Auto Save,checkbox
Snap to grid,checkbox
Lock,checkbox
Additional options can be mixed. They must be separated by commas ,.
Options
Auto Save,checkbox,image=save.png,shortcut=Alt+Enter
Snap to grid,checkbox,image=snap.png,shortcut=Shift+Alt+Enter
If the caption of the menu is - (hyphen) the menu item becomes a separator line.
File
Open
Save
-
Save All
Button. Opens the manual page of the selected object (or of its parent module for a control) in the web browser. If no page exists for this object, an error is traced in the trace panel.
For more details about information/help creation, see create-help-file.
Free multi-line text attached to the module, saved with the patch. When it is not empty, it is shown as the hint of the module (mouse over the module header in the patch) in place of the default module hint, even when the module hints are disabled.
visible only in god mode, see setup-panel-tab-expert.
Read-only, not saved. Current private numeric ID of the object, used internally to identify it (for example as the target of a bind ID).
Read-only, not saved. Private ID used to store and recall the values of this control in presets.
Button. Generates a new unique ID, original ID and preset ID for the object. Use it if you experience difficulties in Polyphonic mode or if two objects share the same ID. Preset values and binds referring to the old IDs are lost.
Read-only, not saved. Absolute address of the object in the Usine objects tree, built from the workspace root. This is the address to use to reach the object from scripts, the objects panel or remote messages. Only shown for objects that are registered in the objects list. See objects-address.
Read-only, not saved. Address of the object relative to the current patch, valid inside that patch only. See objects-address.
Free user-defined address for the object (empty by default). When set, the object is also registered in the objects tree under this name, so it can be reached independently of its position in the workspace (the value is also reported in the mouse-over and mouse-down chunks). Changing it rebuilds the objects list. Only available on objects that support a user address. See objects-address.
version 7.0.250921
Edit All Pages