Extension point for defining kit menubars/toolbars.(c) SAP AG 2003-2006. All rights reserved.Defines a new menubar (or toolbar).The menubar id - must be prefixed with namespace e.g. com.sap.mypackag:id.The menubar category.The menubar description.Indicates whether the menubar can be edited by the user.The newly defined menubar.<h2>Xml definition of a menubar in a configuration file</h2>
<pre>
<CONFIGURE type="MENUBARS">
? <HEADER>
? <PRAGMA># Pragmas section</PRAGMA>
? <SCRIPT># Code section. Place here functions\variables
which you want to address from within the menubar tags
</SCRIPT>
</HEADER>
<MENUBARS>
+ <MENUBAR id="com.sap.mypackage:menubarId">
? <PROPERTIES>
<category># The menubar category</category>
<description># The menubar description</description>
<editable># Indicates whether the menubar can
be edited by the user</editable>
</PROPERTIES>
* <MENUITEM>
<PROPERTIES>
* <propertyName type="[function | ]"/>
# Represents a property of the menu item
You can assign the 'type' attribute for
evaluating the value of the property
as a function.
see <q ref="core.env:KitMenubars!MENU_ITEM">MENU_ITEM</q>
</PROPERTIES>
</MENUITEM>
</MENUBAR>
</MENUBARS>
</CONFIGURE>
</pre>
<h2>Example</h2>
<pre>
<CONFIGURE type="MENUBARS">
<MENUBARS>
<MENUBAR id="MAIN_TOOLBAR">
<PROPERTIES>
<category>STANDARD</category>
<description>Standard</description>
<editable>true</editable>
</PROPERTIES>
<MENUITEM>
<button>FILE_NEW</button>
</MENUITEM>
<MENUITEM>
<button>FILE_OPEN</button>
</MENUITEM>
</MENUBAR>
</MENUBARS>
</CONFIGURE>
</pre>Returns the kit-default version of a specified menubar.The menubar id.The requested menubar.Returns the complete menubars table (kit-default versions).Table of menubar objects, indexed by menubar id.Menuber id's are stored in uppercase. Use <q ref="core.lib:Basic!UPPER">UPPER</q> macro to convert the menubar id to uppercase
before using it as the index in this table.Returns the user-tailored version of a specified menubar.The menubar id.The tailored menubar.Returns the complete table of user-tailored menubars.Table of menubar objects, indexed by menubar id.Menuber id's are stored in uppercase. Use <q ref="core.lib:Basic!UPPER">UPPER</q> macro to convert the menubar id to uppercase
before using it as the index in this table.Removes a specified menubar definition.The menubar id.Resets a specified menubar to kit defaults.The menubar Id.Tailors a specified menubar for the current user.The menubar Id.The tailored menubar items array.Represents a Storyboard menubar or toolbar definition.The MENU_BAR structure is made of:
<table class="BOTH"><tr><td class="H V">Name </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>id </td><td>QName </td><td>Menubar Id - must be prefixed with namespace e.g. com.sap.mypackage:id </td></tr><tr><td class=V>category </td><td>String </td><td>The menubar category </td></tr><tr><td class=V>description </td><td>String </td><td>The menubar description </td></tr><tr><td class=V>editable </td><td>Boolean </td><td>Indicates whether the menubar can be edited by the user </td></tr><tr><td class=V>0..n </td><td><q ref="core.env:KitMenubars!MENU_ITEM">MENU_ITEM</q> </td><td>The menubar items, indexed by display order </td></tr></table>
In addition, the structure has the following methods:
<h2><i>menubar</i>.append(menuitem, after)</h2>
Appends a menu item just after another item in the menubar, where:
<table class="SIMPLE" style="width:70%"><tr><td class="H V">Parameter </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>menuitem </td><td><q ref="core.env:KitMenubars!MENU_ITEM">MENU_ITEM</q> </td><td>The menu item to append </td></tr><tr><td class=V>after </td><td>QName </td><td>Optional. The id of the menu item after which the new item will be appended </td></tr></table>
<ul><li>If <code>after</code> is omitted or not found, the new menu item will be appended at the end of the menubar. </li></ul>
<h2>menuitem = <i>menubar</i>.getItem(id)</h2>
Gets a specified menu item by Id or by position, where:
<table class="SIMPLE" style="width:70%"><tr><td class="H V">Parameter </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>id </td><td>QName/Number </td><td>The menu item id or ordinal position </td></tr><tr><td class=V>menuitem </td><td><q ref="core.env:KitMenubars!MENU_ITEM">MENU_ITEM</q> </td><td>The requested menu item </td></tr></table>
<h2><i>menubar</i>.insert(menuitem, before)</h2>
Inserts a menu item just before another item in the menubar, where:
<table class="SIMPLE" style="width:70%"><tr><td class="H V">Parameter </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>menuitem </td><td><q ref="core.env:KitMenubars!MENU_ITEM">MENU_ITEM</q> </td><td>The menu item to insert </td></tr><tr><td class=V>before </td><td>QName </td><td>Optional. The id of the menu item before which the new item will be inserted </td></tr></table>
<ul><li>If <code>before</code> is omitted, the new menu item will be inserted at the beginning of the menubar. </li><li>If <code>before</code> is not found, the new menu item will be inserted at the end of the menubar. </li></ul>
<h2><i>menubar</i>.remove(id)</h2>
Removes a menu item from the menubar, where:
<table class="SIMPLE" style="width:70%"><tr><td class="H V">Parameter </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>id </td><td>QName </td><td>The Id of the menu item to remove </td></tr></table>
<h2><i>menubar</i>.clear()</h2>
Clears all items from the menubar.A union representing a menubar/toolbar item.The MenuItem is a union of the following menu item structure types:
<h2>Menu Button</h2>
<table class="BOTH"><tr><td class="H V">Name </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>button </td><td>QName </td><td>Id of command to invoke when this menu button is clicked (can be omitted if the signal and the text/icon properties are provided) </td></tr><tr><td class=V>signal </td><td>String </td><td>Menu button signal (overrides corresponding property on associated command) </td></tr><tr><td class=V>text </td><td>String </td><td>Menu button label (overrides corresponding property on associated command) </td></tr><tr><td class=V>icon </td><td>String </td><td>Menu button icon (overrides corresponding property on associated command) </td></tr><tr><td class=V>key </td><td>String </td><td>Shortcut key mnemonic (overrides corresponding property on associated command) </td></tr><tr><td class=V>check </td><td>Boolean </td><td>A predicate indicating whether to display the button as a checkbox. </td></tr><tr><td class=V>radio </td><td>Boolean </td><td>A predicate indicating whether to display the button as a radio button. </td></tr><tr><td class=V>toggle </td><td>Boolean </td><td>A predicate indicating whether to display the button as a toggle icon. </td></tr><tr><td class=V>disable </td><td>Boolean </td><td>A predicate indicating whether to display the button as disabled. </td></tr></table>
Alternatively, if the MenuItem is a plain string it will be interpreted as a command button identifier,
and the rest of the structure members will be filled automatically from the correspondig command definition.
<h2>Menu Input</h2>
<table class="BOTH"><tr><td class="H V">Name </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>input </td><td>QName </td><td>Id of command to invoke when this menu input is changed (can be omitted if the signal and the text/icon properties are provided) </td></tr><tr><td class=V>signal </td><td>String </td><td>Menu input signal (overrides corresponding property on associated command) </td></tr><tr><td class=V>text </td><td>String </td><td>Menu input label (overrides corresponding property on associated command) </td></tr></table>
<h2>Menu Group</h2>
<table class="BOTH"><tr><td class="H V">Name </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>group </td><td>String </td><td>Menu group Id (can be omitted) </td></tr><tr><td class=V>text </td><td>String </td><td>Menu group label </td></tr><tr><td class=V>show </td><td>Boolean </td><td>Indicates whether the group should be initially expanded </td></tr></table>
<h2>Menu Dropdown</h2>
<table class="BOTH"><tr><td class="H V">Name </td><td class=H>Type </td><td class=H>Description </td></tr><tr><td class=V>menu </td><td>QName </td><td>Id of submenu to open when this menu dropdown is clicked </td></tr><tr><td class=V>text </td><td>String </td><td>Menu display label </td></tr><tr><td class=V>icon </td><td>String </td><td>Menu display icon </td></tr></table>
<h2>Menu Separator</h2>
A <code>null</code> or empty object.