Menus
This section summarizes the four menu types:
Application menu
Command menu
View menu
Submenu
The three menu types are structured like the widgets in the previous section. Each entry includes a brief description, repeating some of the information from Chapter 4, followed by an enumeration of the widget’s attribute and model properties, as well as relevant events. Unlike the other menu types, Submenu is accessed through a direct API, so the format for this entry will be structured as an API entry.
AppMenu
The Application menu appears in the upper-left corner of the screen when the user taps the left side of the status bar. It includes some system-defined and some application-defined actions, and is intended to have an application-wide scope for the most part.
Attribute properties | Type | Description |
---|---|---|
omitDefaultItems | Boolean | If true, default menu items will not be added to this menu |
richTextEditItems | Boolean | If true, the Edit menu will also include Bold/Italics/Underline |
Model properties | Type | Description |
---|---|---|
label | String | Currently not supported |
visible | Boolean | Current visibility of this menu |
Items | Object | Object containing items for this menu, structured as: |
label | String | User-visible label for this item, not rendered for groups |
icon | String | CSS class for icon to display in this item |
iconPath | String | Path to image to display in menu item, relative to application’s directory |
width | Integer | Calculated based on item’s width; specifies the width in pixels of this menu item; overrides default calculations; ignored for groups |
items ... |
Get Palm webOS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.