Skip to content

Commit 65d86ee

Browse files
committed
docs: Unmangle "menu" format definition entry
Too many formatting issues to count -- but this restores intelligibility.
1 parent 505f715 commit 65d86ee

1 file changed

Lines changed: 50 additions & 37 deletions

File tree

docs/dictionary/keyword/menu.lcdoc

Lines changed: 50 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -26,49 +26,62 @@ If a button's <style> is set to "menu", its <menuMode> <property> determines how
2626
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>.)
2727

2828
The syntax for menu item strings is:
29-
[&lt;flags&gt;] &lt;label&gt; ['/' &lt;accelerator&gt; ['|' &lt;tag&gt;]]
30-
31-
Where &lt;flags&gt; may include:
32-
!&lt;c|n|r&gt; (the menu item has respectively, a check, no check, or a selected radio button)
33-
( (the menu item is disabled)
34-
- (the menu item is replaced with a menu separator)
35-
multiple tab characters (where the number of tabs specifes the depth of the menu item. Use this to create submenus)
36-
37-
The &lt;accelerator&gt; can be specified as one of:
38-
&lt;char&gt; (Command key + specified char)
39-
&lt;keyname&gt; (Named key without modifiers)
40-
&lt;modifiers&gt; &lt;char&gt; (Specified modifiers + character)
41-
&lt;modifiers&gt; &lt;keyname&gt; (Specified modifiers + named key)
42-
43-
Here &lt;modifiers&gt; 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
5356

5457
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+
6468
On Mac OS X, these keys will be replaced with the appropriate system standard glyph.
6569

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 &lt;accelerator&gt;. To specify a menu tag without an accelerator shortcut, an empty &lt;accelerator&gt; 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.
6873

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.
7079

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>.
7285

7386
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)
7487

0 commit comments

Comments
 (0)