Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials |
#include <IGUIContextMenu.h>
Public Member Functions | |
virtual u32 | addItem (const wchar_t *text, s32 commandId=-1, bool enabled=true, bool hasSubMenu=false, bool checked=false)=0 |
Adds a menu item. | |
virtual void | addSeparator ()=0 |
Adds a separator item to the menu. | |
virtual s32 | getItemCommandId (u32 idx) const =0 |
Get the command id of a menu item. | |
virtual u32 | getItemCount () const =0 |
Get amount of menu items. | |
virtual const wchar_t * | getItemText (u32 idx) const =0 |
Get text of the menu item. | |
virtual s32 | getSelectedItem () const =0 |
Get the selected item in the menu. | |
virtual IGUIContextMenu * | getSubMenu (u32 idx) const =0 |
Get a pointer to the submenu of an item. | |
IGUIContextMenu (IGUIEnvironment *environment, IGUIElement *parent, s32 id, core::rect< s32 > rectangle) | |
constructor | |
virtual bool | isItemChecked (u32 idx) const =0 |
Check if a menu item is checked. | |
virtual bool | isItemEnabled (u32 idx) const =0 |
Check if a menu item is enabled. | |
virtual void | removeAllItems ()=0 |
Removes all menu items. | |
virtual void | removeItem (u32 idx)=0 |
Removes a menu item. | |
virtual void | setItemChecked (u32 idx, bool enabled)=0 |
Sets if the menu item should be checked. | |
virtual void | setItemCommandId (u32 idx, s32 id)=0 |
Sets the command id of a menu item. | |
virtual void | setItemEnabled (u32 idx, bool enabled)=0 |
Sets if the menu item should be enabled. | |
virtual void | setItemText (u32 idx, const wchar_t *text)=0 |
Sets text of the menu item. |
Definition at line 16 of file IGUIContextMenu.h.
irr::gui::IGUIContextMenu::IGUIContextMenu | ( | IGUIEnvironment * | environment, | |
IGUIElement * | parent, | |||
s32 | id, | |||
core::rect< s32 > | rectangle | |||
) | [inline] |
virtual u32 irr::gui::IGUIContextMenu::addItem | ( | const wchar_t * | text, | |
s32 | commandId = -1 , |
|||
bool | enabled = true , |
|||
bool | hasSubMenu = false , |
|||
bool | checked = false | |||
) | [pure virtual] |
Adds a menu item.
text,: | Text of menu item. Set this to 0 to create an separator instead of a real item, which is the same like calling addSeparator(); | |
commandId,: | Command id of menu item, a simple id you may set to whatever you want. | |
enabled,: | Specifies if the menu item should be enabled. | |
hasSubMenu,: | Set this to true if there should be a submenu at this item. You can acess this submenu via getSubMenu(). | |
checked,: | Specifies if the menu item should be initially checked. |
virtual void irr::gui::IGUIContextMenu::addSeparator | ( | ) | [pure virtual] |
Adds a separator item to the menu.
Get the command id of a menu item.
idx,: | Zero based index of the menu item |
virtual u32 irr::gui::IGUIContextMenu::getItemCount | ( | ) | const [pure virtual] |
Get amount of menu items.
virtual const wchar_t* irr::gui::IGUIContextMenu::getItemText | ( | u32 | idx | ) | const [pure virtual] |
Get text of the menu item.
idx,: | Zero based index of the menu item |
virtual s32 irr::gui::IGUIContextMenu::getSelectedItem | ( | ) | const [pure virtual] |
Get the selected item in the menu.
virtual IGUIContextMenu* irr::gui::IGUIContextMenu::getSubMenu | ( | u32 | idx | ) | const [pure virtual] |
Get a pointer to the submenu of an item.
0 is returned if there is no submenu
idx,: | Zero based index of the menu item |
virtual bool irr::gui::IGUIContextMenu::isItemChecked | ( | u32 | idx | ) | const [pure virtual] |
Check if a menu item is checked.
idx,: | Zero based index of the menu item |
virtual bool irr::gui::IGUIContextMenu::isItemEnabled | ( | u32 | idx | ) | const [pure virtual] |
Check if a menu item is enabled.
idx,: | Zero based index of the menu item |
virtual void irr::gui::IGUIContextMenu::removeAllItems | ( | ) | [pure virtual] |
Removes all menu items.
virtual void irr::gui::IGUIContextMenu::removeItem | ( | u32 | idx | ) | [pure virtual] |
Removes a menu item.
idx,: | Zero based index of the menu item |
virtual void irr::gui::IGUIContextMenu::setItemChecked | ( | u32 | idx, | |
bool | enabled | |||
) | [pure virtual] |
Sets if the menu item should be checked.
idx,: | Zero based index of the menu item | |
enabled,: | True if it is enabled, otherwise false. |
Sets the command id of a menu item.
idx,: | Zero based index of the menu item | |
id,: | Command id of menu item, a simple id you may set to whatever you want. |
virtual void irr::gui::IGUIContextMenu::setItemEnabled | ( | u32 | idx, | |
bool | enabled | |||
) | [pure virtual] |
Sets if the menu item should be enabled.
idx,: | Zero based index of the menu item | |
enabled,: | True if it is enabled, otherwise false. |
virtual void irr::gui::IGUIContextMenu::setItemText | ( | u32 | idx, | |
const wchar_t * | text | |||
) | [pure virtual] |
Sets text of the menu item.
idx,: | Zero based index of the menu item | |
text,: | New text of the item. |
The Irrlicht
Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated
on Sun Jan 10 09:24:10 2010 by Doxygen
(1.5.6) |