Public Member Functions | |
float | getItemSpacing (void) const |
Get the item spacing for this menu. | |
bool | isMultiplePopupsAllowed (void) const |
Return whether this menu allows multiple popup menus to open at the same time. | |
MenuItem * | getPopupMenuItem (void) const |
Get currently opened MenuItem in this menu. Returns NULL if no menu item is open. | |
void | setItemSpacing (float spacing) |
Set the item spacing for this menu. | |
void | changePopupMenuItem (MenuItem *item) |
Change the currently open MenuItem in this menu. | |
void | setAllowMultiplePopups (bool setting) |
Set whether this menu allows multiple popup menus to be opened simultaneously. | |
MenuBase (const String &type, const String &name) | |
Constructor for MenuBase objects. | |
virtual | ~MenuBase (void) |
Destructor for MenuBase objects. | |
Static Public Attributes | |
static const String | EventNamespace |
Namespace for global events. | |
static const String | EventPopupOpened |
A MenuItem attached to this menu opened a PopupMenu. | |
static const String | EventPopupClosed |
A MenuItem attached to this menu opened a PopupMenu. | |
Protected Member Functions | |
virtual void | onPopupOpened (WindowEventArgs &e) |
handler invoked internally when the a MenuItem attached to this menu opens its popup. | |
virtual void | onPopupClosed (WindowEventArgs &e) |
handler invoked internally when the a MenuItem attached to this menu closes its popup. | |
virtual void | onChildRemoved (WindowEventArgs &e) |
Handler called when a child window is removed from this window. | |
virtual bool | testClassName_impl (const String &class_name) const |
Return whether this window was inherited from the given class name at some point in the inheritance hierarchy. | |
Protected Attributes | |
float | d_itemSpacing |
The spacing in pixels between items. | |
MenuItem * | d_popupItem |
The currently open MenuItem. NULL if no item is open. If multiple popups are allowed, this means nothing. | |
bool | d_allowMultiplePopups |
true if multiple popup menus are allowed simultaneously. false if not. |
void CEGUI::MenuBase::changePopupMenuItem | ( | MenuItem * | item | ) |
Change the currently open MenuItem in this menu.
item | Pointer to a MenuItem to open or NULL to close any opened. |
References CEGUI::MenuItem::closePopupMenu(), d_allowMultiplePopups, d_popupItem, CEGUI::MenuItem::getPopupMenu(), onPopupClosed(), onPopupOpened(), and CEGUI::MenuItem::openPopupMenu().
Referenced by CEGUI::MenuItem::closePopupMenu().
float CEGUI::MenuBase::getItemSpacing | ( | void | ) | const [inline] |
Get the item spacing for this menu.
MenuItem* CEGUI::MenuBase::getPopupMenuItem | ( | void | ) | const [inline] |
Get currently opened MenuItem in this menu. Returns NULL if no menu item is open.
Referenced by CEGUI::MenuItem::updateInternalState().
bool CEGUI::MenuBase::isMultiplePopupsAllowed | ( | void | ) | const [inline] |
Return whether this menu allows multiple popup menus to open at the same time.
Referenced by CEGUI::MenuItem::closePopupMenu(), and CEGUI::MenuItem::updateInternalState().
void CEGUI::MenuBase::onChildRemoved | ( | WindowEventArgs & | e | ) | [protected, virtual] |
Handler called when a child window is removed from this window.
e | WindowEventArgs object whose 'window' pointer field is set the window that has been removed. |
Reimplemented from CEGUI::Window.
References d_popupItem, and CEGUI::WindowEventArgs::window.
virtual bool CEGUI::MenuBase::testClassName_impl | ( | const String & | class_name | ) | const [inline, protected, virtual] |
Return whether this window was inherited from the given class name at some point in the inheritance hierarchy.
class_name | The class name that is to be checked. |
Reimplemented from CEGUI::ItemListBase.
Reimplemented in CEGUI::Menubar, and CEGUI::PopupMenu.
References CEGUI::ItemListBase::testClassName_impl().
Referenced by CEGUI::PopupMenu::testClassName_impl(), and CEGUI::Menubar::testClassName_impl().