📄 api.html
字号:
</p><h3>Syntax</h3><p><code>
new MenuBar()</code></p><h3>Parameters</h3><h3>Static Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td colspan="2">None.</td></tr></tbody></table><h3>Static Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="3">None.</td></tr></tbody></table><h3>Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">backupFocused</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.backupFocused()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Saves a reference to the currently focused element for later use</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">create</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.create()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>HTMLElement</code></p></div></div></td><td>Creates the HTMLElement needed to render the menu bar. This can later be inserted into the tree.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">getActiveState</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.getActiveState()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>String</code></p></div></div></td><td>Returns the active state. The state can be one of three values: "active" (this occurs when the menu bar is active and no menu is opened), "open" (the menu bar us active but a menu is open) and "inactive" (no menus open and not active).</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">restoreFocused</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.restoreFocused()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Restores the backuped focused element</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">setActive</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.setActive(<span class="methodArgument">bActive</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>bActive</code></td><td><code>Boolean</code></td><td>Whether the menu bar should be active or not</td></tr></tbody></table><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Sets whether the menu bar should be active. When active, the user can use the keyboard to navigate on the menu bar.</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">toggleActive</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.toggleActive()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Toggles the active state. If active it becomes inactive and the other way around</td></tr><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">write</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code><span class="object">object</span>.write()</code></p><h4>Arguments</h4><p>No Arguments.</p><h4>Return Type</h4><p><code>void</code></p></div></div></td><td>Writes the HTML code needed to render the menu bar into the document where this is called</td></tr></tbody></table><h3>Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="3">None.</td></tr></tbody></table><h3>Events</h3><table><thead><tr><td>Name</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="2">None.</td></tr></tbody></table><h3>Remarks</h3><p>
None.
</p><h2 id="MenuButton">MenuButton</h2><p>This class extends
<code><a href="#MenuItem">MenuItem</a></code>
and therefore all methods and field available for
<code><a href="#MenuItem">MenuItem</a></code>
are also available for <code>MenuButton</code>.</p><p>
This is a menu button that is used on the menu bar.
</p><h3>Syntax</h3><p><code>
new MenuButton(<span class="methodArgument">sLabelText</span>, <span class="methodArgument">oSubMenu</span>)</code></p><h3>Parameters</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>sLabelText</code></td><td><code>String</code></td><td>The text to show on the menu button</td></tr><tr><td><code>oSubMenu</code></td><td><code>Menu</code></td><td>The Menu object to use as a sub menu</td></tr></tbody></table><h3>Static Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td colspan="2">None.</td></tr></tbody></table><h3>Static Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="3">None.</td></tr></tbody></table><h3>Methods</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td colspan="2">None.</td></tr></tbody></table><h3>Fields</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="3">None.</td></tr></tbody></table><h3>Events</h3><table><thead><tr><td>Name</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="2">None.</td></tr></tbody></table><h3>Remarks</h3><p>
None.
</p><h2>Globals</h2><h3>Functions</h3><table><thead><tr><td>Name</td><td>Description</td></tr></thead><tbody><tr><td><a class="helpLink" href="javascript://" onclick="toggleMethodArguments( event, this ); return false;">getMenuItemElement</a><div class="methodContainer"><div class="methodInfo"><h4>Syntax</h4><p><code>getMenuItemElement(<span class="methodArgument">el</span>)</code></p><h4>Arguments</h4><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td><code>el</code></td><td><code>Element</code></td><td>The element to check its ancestors</td></tr></tbody></table><h4>Return Type</h4><p><code>Element</code></p></div></div></td><td>Returns the first element that represents a menu item</td></tr></tbody></table><h3>Objects</h3><table><thead><tr><td>Name</td><td>Type</td><td>Descripton</td></tr></thead><tbody><tr><td colspan="3">None.</td></tr></tbody></table><!-- end main output -->
<p>
<a href="menu4.html">Introduction</a><br />
<a href="menucreation.html">Menu Creation</a><br />
<a href="menubarcreation.html">Menu Bar Creation</a><br />
<a href="usage.html">Usage</a><br />
<a href="api.html">API</a><br />
<a href="looknfeel.html">Customizing look & feel<br />
<a href="demos.html">Demos</a><br />
<a href="http://webfx.eae.net/download/menu428.zip">Download</a>
</p>
<p class="author">Author: Erik Arvidsson</p>
<!-- end webfx-main-body -->
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -