#include <Pt/Forms/MenuBase.h>
Defines the coordination interface shared by menu containers. More...
Inherited by Menu [protected], and MenuBar [protected].
Public Member Functions | |
| MenuBase () | |
| Creates an unassociated menu coordination interface. | |
| virtual | ~MenuBase () |
| Destroys the menu coordination interface. | |
| void | cancel () |
| Cancels the active menu interaction. | |
| Pt::Forms::Widget * | findMenu (const Pt::Gfx::PointF &screenPos) |
| Returns the menu widget at screenPos, or 0 when none is found. | |
| void | closeMenu (MenuSubItem &item) |
| Closes the submenu associated with item. | |
| void | openMenu (MenuSubItem &item) |
| Opens the submenu associated with item. | |
| const MenuItemBase * | parentItem () const |
| Returns the item associated with this nested menu, or 0 for a root menu. | |
| MenuItemBase * | parentItem () |
| Returns the item associated with this nested menu, or 0 for a root menu. | |
| void | setParentItem (MenuItemBase *item) |
| Associates this nested menu with item. More... | |
| void | addMenu (MenuSubItem &item) |
| Registers item as a submenu entry. | |
| void | removeMenu (MenuSubItem &item) |
| Unregisters item as a submenu entry. | |
Menu and MenuBar use this interface to register submenu items, track their parent item, and coordinate opening, closing, and cancellation. Applications use a concrete menu container instead of deriving from this type.
| void setParentItem | ( | MenuItemBase * | item | ) |
The menu does not own item.