You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dictionary/keyword/menu.lcdoc
+50-37Lines changed: 50 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -26,49 +26,62 @@ If a button's <style> is set to "menu", its <menuMode> <property> determines how
26
26
You can use the <menu> <keyword> to refer to one of the <button(object)|buttons> in the current <menu bar>. For example, if the first <menu> in the <menu bar> is called "File", the <expression> the name of menu 1 <evaluate|evaluates> to "button "File"". (Remember that in LiveCode, <menus> are usually implemented as <button(object)|buttons>: the <button(object)|button's> <style> and <menuMode> <properties> control how it is displayed, and the <button(object)|button's> <text> <property> is used as the list of <menu item|menu items>.)
<modifiers> <keyname> (Specified modifiers + named key)
42
-
43
-
Here <modifiers> is either:
44
-
1) a space separated list of:
45
-
'command' or 'cmd', 'control' or 'ctrl', 'option' or 'opt', 'alt', 'shift'
46
-
in this case the keyname/char should be separated from the list by a space
47
-
2) a sequence of characters:
48
-
^ (Command)
49
-
@ (Shift)
50
-
# (Option)
51
-
% (Control)
52
-
in this case no space between the sequence and keyname/char is required.
29
+
30
+
[<flags>] <label> ['/' <accelerator> ['|' <tag>]]
31
+
32
+
Where `<flags>` may include:
33
+
34
+
* `!c`, `!n`, `!r`: the menu item has respectively, a check, no check, or a selected radio button
35
+
* `(`: the menu item is disabled
36
+
* `-`: the menu item is replaced with a menu separator
37
+
* multiple tab characters: the number of tabs specifes the depth of the menu item; use this to create submenus
38
+
39
+
The `<accelerator>` can be specified as one of:
40
+
41
+
* `<char>`: Command key + specified char
42
+
* `<keyname>`: Named key without modifiers
43
+
* `<modifiers> <char>`: Specified modifiers + character
44
+
* `<modifiers> <keyname>`: Specified modifiers + named key
45
+
46
+
In the `<accelerator>`, `<modifiers>` is either:
47
+
48
+
* a space separated list of: 'command' or 'cmd', 'control' or 'ctrl', 'option' or 'opt', 'alt', 'shift'; in this case the keyname/char should be separated from the list by a space
49
+
* a sequence of characters, including:
50
+
* `^`: Command
51
+
* `@`: Shift
52
+
* `#`: Option
53
+
* `%`: Control
54
+
55
+
In this case no space between the sequence and keyname/char is required
53
56
54
57
The following named keys are supported:
55
-
F1, F2, F3, F4, ... F15,
56
-
Left, Up, Right, Down,
57
-
Backspace, Delete,
58
-
Tab, Space,
59
-
Return, Enter,
60
-
Home, End, Escape,
61
-
PgUp, PgDown,
62
-
Insert (not on Mac OS X)
63
-
58
+
59
+
* F1, F2, F3, F4, ... F15,
60
+
* Left, Up, Right, Down,
61
+
* Backspace, Delete,
62
+
* Tab, Space,
63
+
* Return, Enter,
64
+
* Home, End, Escape,
65
+
* PgUp, PgDown,
66
+
* Insert (not on Mac OS X)
67
+
64
68
On Mac OS X, these keys will be replaced with the appropriate system standard glyph.
65
69
66
-
A tag can be specified as a '|' character followed by a string of ascii characters. If such a tag is present then that tag will take the place of the menu label as the parameter to the <menuPick message>.
67
-
A tag will only be recognised following <accelerator>. To specify a menu tag without an accelerator shortcut, an empty <accelerator> can be specified using '/|' followed by the tag text.
70
+
A tag can be specified as a `|` character followed by a string of ASCII characters. If such a tag is present then that tag will take the place of the menu label as the parameter to the <menuPick message>.
71
+
72
+
A tag will only be recognised following the `<accelerator>`. To specify a menu tag without an accelerator shortcut, an empty `<accelerator>` can be specified using `/|` followed by the tag text.
68
73
69
-
>*Note:* As Windows and Linux do not have the 'Command' modifier, on those platforms 'Command' is an synonym for 'Control'. To ensure cross-platform uniformity it is important that you use 'Command' in preference to 'Control' since 'Control' on Mac OS X is a less frequently used modifier.
74
+
**Note:** As Windows and Linux do not have the 'Command' modifier, on
75
+
those platforms 'Command' is an synonym for 'Control'. To ensure
76
+
cross-platform uniformity it is important that you use 'Command' in
77
+
preference to 'Control' since 'Control' on Mac OS X is a less
78
+
frequently used modifier.
70
79
71
-
>*Cross-platform note:* The <menu> decoration has no effect on <Mac OS> and <OS X|OS X systems>. On <Windows|Windows systems>, the <menu> decoration must be set along with the <maximize> or <minimize> decorations: you cannot use <maximize> or <minimize> without including <menu>.
80
+
**Cross-platform note:** The <menu> decoration has no effect on <Mac OS>
81
+
and <OS X|OS X systems>. On <Windows|Windows systems>, the <menu>
82
+
decoration must be set along with the <maximize> or <minimize>
83
+
decorations: you cannot use <maximize> or <minimize> without including
84
+
<menu>.
72
85
73
86
References: style (property), properties (property), menuMode (property), decorations (property), menuPick message (message), menu (keyword), button (keyword), minimize (keyword), text (keyword), maximize (keyword), menuItem (keyword), property (glossary), menu item (glossary), OS X (glossary), Windows (glossary), menu bar (glossary), keyword (glossary), expression (glossary), Mac OS (glossary), evaluate (glossary), Unix (glossary), menus (function), doMenu (command), button (object)
0 commit comments