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

Method requestCreateWidgetItem

Tools/LayoutEditor/WidgetsWindow.cpp:147–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145 }
146
147 void WidgetsWindow::requestCreateWidgetItem(MyGUI::ItemBox* _sender, MyGUI::Widget* _item)
148 {
149 MyGUI::Button* button = _item->createWidget<MyGUI::Button>(
150 mButtonSkinName,
151 MyGUI::IntCoord(
152 mWidgetsButtonOffset,
153 mWidgetsButtonOffset,
154 _item->getWidth() - mWidgetsButtonOffset - mWidgetsButtonOffset,
155 _item->getHeight() - mWidgetsButtonOffset - mWidgetsButtonOffset),
156 MyGUI::Align::Stretch);
157
158 button->setTextAlign(MyGUI::Align::Center);
159 button->eventMouseButtonClick += MyGUI::newDelegate(this, &WidgetsWindow::notifySelectWidgetType);
160 button->setNeedToolTip(true);
161 button->eventToolTip += MyGUI::newDelegate(this, &WidgetsWindow::notifyToolTip);
162
163 _item->setUserData(button);
164 }
165
166 void WidgetsWindow::requestCoordItem(MyGUI::ItemBox* _sender, MyGUI::IntCoord& _coord, bool _drag) const
167 {

Callers

nothing calls this directly

Calls 7

newDelegateFunction · 0.85
setNeedToolTipMethod · 0.80
IntCoordFunction · 0.50
getWidthMethod · 0.45
getHeightMethod · 0.45
setTextAlignMethod · 0.45
setUserDataMethod · 0.45

Tested by

no test coverage detected