MCPcopy Create free account
hub / github.com/MyGUI/mygui / onWidgetCreated

Method onWidgetCreated

MyGUIEngine/src/MyGUI_TabControl.cpp:133–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 }
132
133 void TabControl::onWidgetCreated(Widget* _widget)
134 {
135 Base::onWidgetCreated(_widget);
136
137 TabItem* child = _widget->castType<TabItem>(false);
138 if (child != nullptr)
139 {
140 child->setCoord(
141 _getWidgetTemplate()->getAbsoluteLeft() - getAbsoluteLeft(),
142 _getWidgetTemplate()->getAbsoluteTop() - getAbsoluteTop(),
143 _getWidgetTemplate()->getWidth(),
144 _getWidgetTemplate()->getHeight());
145 child->setAlign(_getWidgetTemplate()->getAlign());
146
147 _insertItem(ITEM_NONE, UString(), child, Any::Null);
148 }
149 }
150
151 TabItem* TabControl::insertItemAt(size_t _index, const UString& _name, Any _data)
152 {

Callers

nothing calls this directly

Calls 8

getAbsoluteLeftFunction · 0.85
getAbsoluteTopFunction · 0.85
UStringFunction · 0.85
getAlignMethod · 0.80
setCoordMethod · 0.45
getWidthMethod · 0.45
getHeightMethod · 0.45
setAlignMethod · 0.45

Tested by

no test coverage detected