PixelLightAPI
.
|
Abstract representation of a menu structure. More...
#include <Menu.h>
Public Member Functions | |
PLGUI_API | Menu (Gui &cGui) |
Constructor. | |
virtual PLGUI_API | ~Menu () |
Destructor. | |
PLGUI_API void | Clear () |
Clear menu. | |
PLGUI_API const PLCore::Container< MenuItem * > & | GetItems () const |
Get items. | |
PLGUI_API PLCore::int32 | GetShortcutItem (char nShortcut) const |
Get item that belongs to a certain shortcut. | |
PLGUI_API void | AddItem (MenuItem *pItem, bool bDelete=true) |
Adds a new item to the menu. | |
PLGUI_API void | AddItemAtIndex (PLCore::uint32 nIndex, MenuItem *pItem, bool bDelete=true) |
Adds a new item to the menu at a specific index. | |
PLGUI_API void | RemoveItem (MenuItem *pItem) |
Removes an item from the menu. | |
PLGUI_API MenuItem * | AddItem (const PLCore::String &sText) |
Adds a standard item with a text. | |
PLGUI_API MenuItem * | AddItem (const PLCore::String &sText, const Image &cIcon) |
Adds a standard item with a text and an icon. | |
PLGUI_API MenuItem * | AddSeparator () |
Adds a separator item to the menu. | |
PLGUI_API MenuItem * | AddSubMenu (Menu *pMenu, bool bDelete=true) |
Adds a sub menu to the menu. | |
Protected Attributes | |
PLCore::List< MenuItem * > | m_lstItems |
PLCore::List< MenuItem * > | m_lstNoDeletion |
Abstract representation of a menu structure.
PLGUI_API PLGui::Menu::Menu | ( | Gui & | cGui | ) |
Constructor.
[in] | cGui | Owner GUI |
virtual PLGUI_API PLGui::Menu::~Menu | ( | ) | [virtual] |
Destructor.
PLGUI_API void PLGui::Menu::Clear | ( | ) |
Clear menu.
PLGUI_API const PLCore::Container<MenuItem*>& PLGui::Menu::GetItems | ( | ) | const |
Get items.
PLGUI_API PLCore::int32 PLGui::Menu::GetShortcutItem | ( | char | nShortcut | ) | const |
Get item that belongs to a certain shortcut.
[in] | nShortcut | Shortcut (ASCII) |
PLGUI_API void PLGui::Menu::AddItem | ( | MenuItem * | pItem, |
bool | bDelete = true |
||
) |
Adds a new item to the menu.
[in] | pItem | Pointer to the menu item (must be valid!) |
[in] | bDelete | 'true' if the menu item shall be deleted automatically, else 'false' |
PLGUI_API void PLGui::Menu::AddItemAtIndex | ( | PLCore::uint32 | nIndex, |
MenuItem * | pItem, | ||
bool | bDelete = true |
||
) |
Adds a new item to the menu at a specific index.
[in] | nIndex | Index at which the menu item will be inserted |
[in] | pItem | Pointer to the menu item (must be valid!) |
[in] | bDelete | 'true' if the menu item shall be deleted automatically, else 'false' |
PLGUI_API void PLGui::Menu::RemoveItem | ( | MenuItem * | pItem | ) |
Removes an item from the menu.
[in] | pItem | Pointer to the menu item (must be valid!) |
PLGUI_API MenuItem* PLGui::Menu::AddItem | ( | const PLCore::String & | sText | ) |
Adds a standard item with a text.
[in] | sText | Text of the menu item |
PLGUI_API MenuItem* PLGui::Menu::AddItem | ( | const PLCore::String & | sText, |
const Image & | cIcon | ||
) |
Adds a standard item with a text and an icon.
[in] | sText | Text of the menu item |
[in] | cIcon | Icon of the menu item |
PLGUI_API MenuItem* PLGui::Menu::AddSeparator | ( | ) |
Adds a separator item to the menu.
PLGUI_API MenuItem* PLGui::Menu::AddSubMenu | ( | Menu * | pMenu, |
bool | bDelete = true |
||
) |
Adds a sub menu to the menu.
[in] | pMenu | Pointer to the sub menu (must be valid!) |
[in] | bDelete | 'true' if the menu item shall be deleted automatically, else 'false' |
PLCore::List<MenuItem*> PLGui::Menu::m_lstItems [protected] |
List of menu items
PLCore::List<MenuItem*> PLGui::Menu::m_lstNoDeletion [protected] |
List of menu items that are not automatically deleted
|