Components: menubar, menupopup, menu, menuitem and menuseparator.
A menu bar contains a collection of menu items and sub menus. A sub menu contains a collection of menu items and other sub menus. They, therefore, constructs a tree of menu items that user could select to execute.
An example of menu bars is as follows.
<menubar> <menu label="File"> <menupopup> <menuitem label="New"/> <menuitem label="Open"/> <menuseparator/> <menuitem label="Exit"/> </menupopup> </menu> <menu label="Help"> <menupopup> <menuitem label="Index"/> <menu label="About"> <menupopup> <menuitem label="About ZK"/> <menuitem label="About Potix"/> </menupopup> </menu> </menupopup> </menu> </menubar>
menubar: The topmost container for a collection of menu items (menuitem) and menus (menu).
menu: The container of a popup menu. It also defines the label to be displayed at part of its parent. When user clicks on the label, the popup menu appears.
menupopup: A container for a collection of menu items (menuitem) and menus (menu). It is a child of menu and appears when the label of menu is clicked.
menuitem: An individual command on a menu. This could be placed in a menu bar, or a popup menu.
menuseparator: A separator bar on a menu. This would be placed in a popup menu.