19 MYGUI_ASSERT(parent,
"MenuItem must have parent MenuControl");
24 MYGUI_ASSERT(parent,
"MenuItem must have parent MenuControl");
45 mOwner->_notifyDeleteItem(
this);
57 mOwner->_wrapItemChild(
this, child);
64 mOwner->_notifyUpdateName(
this);
71 mOwner->_notifyUpdateName(
this);
78 mOwner->_notifyUpdateName(
this);
83 return mOwner->getItemName(
this);
88 mOwner->setItemName(
this, _value);
93 mOwner->setItemData(
this, _data);
98 mOwner->removeItem(
this);
103 mOwner->setItemId(
this, _id);
108 return mOwner->getItemId(
this);
113 return mOwner->getItemIndex(
this);
128 return mOwner->getItemType(
this);
133 mOwner->setItemChildVisible(
this, _visible);
144 if (_key ==
"MenuItemId")
148 else if (_key ==
"MenuItemType")
152 else if (_key ==
"MenuItemChecked")
183 void MenuItem::updateCheck()
185 if (mCheck !=
nullptr)
196 mCheckValue = _value;
#define MYGUI_ASSERT(exp, dest)
Type * castType(bool _throw=true)
virtual IntSize getTextSize() const
ISubWidgetText * getSubWidgetText() const
virtual void setCaption(const UString &_caption)
virtual const UString & getCaption() const
virtual void setFontName(std::string_view _value)
virtual void setFontHeight(int _height)
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
T parseValue(std::string_view _value)
types::TSize< int > IntSize