| 1 |
#pattern
|
| 2 |
<span class=secno>* </span><dfn
|
| 3 |
>Building menus and tool bars</dfn>
|
| 4 |
#ja
|
| 5 |
<span class=secno>$1 </span><dfn
|
| 6 |
>メニューとツールバーの構築</dfn>
|
| 7 |
|
| 8 |
#en
|
| 9 |
A menu (or tool bar) consists of a list of zero or more of the following
|
| 10 |
components:
|
| 11 |
#ja
|
| 12 |
メニュー (やツールバー) は、次の部品の零以上の並びで構成されます。
|
| 13 |
|
| 14 |
#en
|
| 15 |
<a href=#concept-command title=concept-command>Commands</a>, which can be
|
| 16 |
marked as default commands
|
| 17 |
#ja
|
| 18 |
<a href=#concept-command title=concept-command>命令</a> (これは既定命令として印付けできます。)
|
| 19 |
|
| 20 |
#en
|
| 21 |
Separators
|
| 22 |
#ja
|
| 23 |
分離子
|
| 24 |
|
| 25 |
#en
|
| 26 |
Other menus (which allows the list to be nested)
|
| 27 |
#ja
|
| 28 |
他のメニュー (並びを入れ子にできます)
|
| 29 |
|
| 30 |
#en
|
| 31 |
The list corresponding to a particular <code><a
|
| 32 |
href=#menus>menu</a></code> element is built by iterating over its child
|
| 33 |
nodes. For each child node in <a href=#tree-order>tree order</a>, the
|
| 34 |
required behavior depends on what the node is, as follows:
|
| 35 |
#ja
|
| 36 |
特定の <code><a
|
| 37 |
href=#menus>menu</a></code> 要素に対応する並びは、
|
| 38 |
その子供節点に対して反復 (iteration) を行うことで構築できます。
|
| 39 |
各子供節点について、<a href=#tree-order>木順</a>で、
|
| 40 |
節点の種類によって次に示すような動作が[[REQUIRED:要求されます]]。
|
| 41 |
|
| 42 |
#en
|
| 43 |
An element that <a href=#concept-command title=concept-command>defines a
|
| 44 |
command</a>
|
| 45 |
#ja
|
| 46 |
<a href=#concept-command title=concept-command>命令を定義</a>する要素
|
| 47 |
|
| 48 |
#en
|
| 49 |
Append the command to the menu. If the element is a <code><a
|
| 50 |
href=#the-command>command</a></code> element with a <code
|
| 51 |
title=attr-command-default><a href=#attr-area-shape-default>default</a></code>
|
| 52 |
|
| 53 |
attribute, mark the command as being a default command.
|
| 54 |
#ja
|
| 55 |
命令をメニューの最後に追加します。要素が <code
|
| 56 |
title=attr-command-default><a href=#attr-area-shape-default>default</a></code>
|
| 57 |
属性のある <code><a
|
| 58 |
href=#the-command>command</a></code> 要素であれば、
|
| 59 |
この命令を既定命令として印付けします。
|
| 60 |
|
| 61 |
#pattern
|
| 62 |
An * element
|
| 63 |
#ja
|
| 64 |
$1 要素
|
| 65 |
|
| 66 |
#pattern
|
| 67 |
A * element
|
| 68 |
#ja
|
| 69 |
$1 要素
|
| 70 |
|
| 71 |
#en
|
| 72 |
An <code>option</code> element that has a <code
|
| 73 |
title=attr-option-value>value</code> attribute set to the empty string,
|
| 74 |
and has a <code title=attr-option-disabled>disabled</code> attribute, and
|
| 75 |
whose <code><a href=#textcontent>textContent</a></code> consists of a
|
| 76 |
string of one or more hyphens (U+002D HYPHEN-MINUS)
|
| 77 |
#ja
|
| 78 |
<code
|
| 79 |
title=attr-option-value>value</code> 属性が空文字列であり、
|
| 80 |
<code title=attr-option-disabled>disabled</code> 属性を有し、
|
| 81 |
その <code><a href=#textcontent>textContent</a></code> が1文字以上のハイフン
|
| 82 |
(U+002D HYPHEN-MINUS) から成る文字列で構成される <code>option</code>
|
| 83 |
要素
|
| 84 |
|
| 85 |
#en
|
| 86 |
Append a separator to the menu.
|
| 87 |
#ja
|
| 88 |
区切子をメニューの最後に追加します。
|
| 89 |
|
| 90 |
#en
|
| 91 |
Iterate over the children of the <code><a href=#the-li-element>li</a></code>
|
| 92 |
element.
|
| 93 |
#ja
|
| 94 |
<code><a href=#the-li-element>li</a></code> 要素の子供について反復
|
| 95 |
(iteration) します。
|
| 96 |
|
| 97 |
#en
|
| 98 |
A <code><a href=#menus>menu</a></code> element with no <code
|
| 99 |
title=attr-menu-label><a href=#dom-command-label>label</a></code> attribute
|
| 100 |
#ja
|
| 101 |
<code
|
| 102 |
title=attr-menu-label><a href=#dom-command-label>label</a></code>
|
| 103 |
属性のない <code><a href=#menus>menu</a></code> 要素
|
| 104 |
|
| 105 |
#en
|
| 106 |
Append a separator to the menu, then iterate over the children of the
|
| 107 |
<code><a href=#menus>menu</a></code> or <code>select</code> element,
|
| 108 |
then append another separator.
|
| 109 |
#ja
|
| 110 |
区切子をメニューの最後に追加し、 <code><a href=#menus>menu</a></code>
|
| 111 |
要素または <code>select</code> 要素の子供について反復 (iteration)
|
| 112 |
し、更に区切子を最後に追加します。
|
| 113 |
|
| 114 |
#en
|
| 115 |
A <code><a href=#menus>menu</a></code> element with a <code
|
| 116 |
title=attr-menu-label><a href=#dom-command-label>label</a></code> attribute
|
| 117 |
#ja
|
| 118 |
<code
|
| 119 |
title=attr-menu-label><a href=#dom-command-label>label</a></code> 属性のある
|
| 120 |
<code><a href=#menus>menu</a></code> 要素
|
| 121 |
|
| 122 |
#en
|
| 123 |
Append a submenu to the menu, using the value of the element's <code
|
| 124 |
title="">label</code> attribute as the label of the menu. The submenu
|
| 125 |
must be constructed by taking the element and creating a new menu for it
|
| 126 |
using the complete process described in this section.
|
| 127 |
#ja
|
| 128 |
部分メニューをメニューの最後に追加します。このとき、その要素の <code
|
| 129 |
title="">label</code> 属性の値をメニューの名札として使います。
|
| 130 |
部分メニューは、その要素をもってこの節で説明した処理全体を用いて新たなメニューを作成することにより構築しなければ[[MUST:なりません]]。
|
| 131 |
|
| 132 |
#en
|
| 133 |
Any other node
|
| 134 |
#ja
|
| 135 |
その他の節点
|
| 136 |
|
| 137 |
#en
|
| 138 |
<a href=#ignore>Ignore</a> the node.
|
| 139 |
#ja
|
| 140 |
その節点を<a href=#ignore>無視</a>します。
|
| 141 |
|
| 142 |
#en
|
| 143 |
Once all the nodes have been processed as described above, the user
|
| 144 |
agent must the post-process the menu as follows:
|
| 145 |
#ja
|
| 146 |
利用者エージェントは、すべての節点が前述のように処理されたら、
|
| 147 |
メニューを次のように後処理しなければ[[MUST:なりません]]。
|
| 148 |
|
| 149 |
#en
|
| 150 |
Any menu item with no label, or whose label is the empty string, must
|
| 151 |
be removed.
|
| 152 |
#ja
|
| 153 |
名札がないか名札が空文字列であるメニュー項目は削除しなければ[[MUST:なりません]]。
|
| 154 |
|
| 155 |
#en
|
| 156 |
Any sequence of two or more separators in a row must be collapsed to a
|
| 157 |
single separator.
|
| 158 |
#ja
|
| 159 |
2つ以上の連続した区切子の列は1つの区切子に折り畳まなければ[[MUST:なりません]]。
|
| 160 |
|
| 161 |
#en
|
| 162 |
Any separator at the start or end of the menu must be removed.
|
| 163 |
#ja
|
| 164 |
メニューの最初と最後の区切子は削除しなければ[[MUST:なりません]]。 |