23 #ifndef __MYGUI_MENU_ITEM_H__
24 #define __MYGUI_MENU_ITEM_H__
42 virtual
void setCaption(const
UString& _value);
45 void setItemName(const
UString& _value);
50 void setItemData(
Any _value);
53 template <typename ValueType>
54 ValueType* getItemData(
bool _throw = true)
56 return mOwner->getItemData<ValueType>(
this, _throw);
63 void setItemId(
const std::string& _value);
65 const std::string& getItemId();
68 size_t getItemIndex();
74 template <
typename Type>
75 Type * createItemChildT()
77 return mOwner->createItemChildT<Type>(
this);
86 void setItemChildVisible(
bool _value);
95 virtual void setProperty(
const std::string& _key,
const std::string& _value);
102 #ifndef MYGUI_DONT_USE_OBSOLETE
105 void showItemChild() { setItemChildVisible(
true); }
107 void hideItemChild() { setItemChildVisible(
false); }
109 #endif // MYGUI_DONT_USE_OBSOLETE
114 virtual Widget* baseCreateWidget(
WidgetStyle _style,
const std::string& _type,
const std::string& _skin,
const IntCoord& _coord,
Align _align,
const std::string& _layer,
const std::string& _name);
118 void shutdownWidgetSkin();
121 virtual void onMouseButtonPressed(
int _left,
int _top,
MouseButton _id);
122 virtual void onMouseButtonReleased(
int _left,
int _top,
MouseButton _id);
131 #endif // __MYGUI_MENU_ITEM_H__