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

Method OnInitialise

Tools/ImageEditor/AnimationViewControl.cpp:19–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 FACTORY_ITEM_ATTRIBUTE(AnimationViewControl)
18
19 void AnimationViewControl::OnInitialise(Control* _parent, MyGUI::Widget* _place, std::string_view _layoutName)
20 {
21 Control::OnInitialise(_parent, _place, _layoutName);
22
23 InitialiseByAttributes(this);
24
25 std::string parentType = "Index";
26 DataSelectorManager::getInstance()
27 .getEvent(parentType)
28 ->connect(this, &AnimationViewControl::notifyChangeDataSelector);
29 mParentData = DataUtility::getSelectedDataByType(parentType);
30 notifyChangeDataSelector(mParentData, false);
31
32 mImage->getParent()->eventChangeCoord += MyGUI::newDelegate(this, &AnimationViewControl::notifyChangeCoord);
33 updateImageCoord();
34
35 MyGUI::Gui::getInstance().eventFrameStart += MyGUI::newDelegate(this, &AnimationViewControl::notifyFrameStart);
36
37 mButtonPlay->eventMouseButtonClick += MyGUI::newDelegate(this, &AnimationViewControl::notifyMouseButtonClick);
38 mButtonLeft->eventMouseButtonClick += MyGUI::newDelegate(this, &AnimationViewControl::notifyMouseButtonClick);
39 mButtonRight->eventMouseButtonClick += MyGUI::newDelegate(this, &AnimationViewControl::notifyMouseButtonClick);
40 }
41
42 void AnimationViewControl::notifyChangeDataSelector(DataPtr _parent, bool _changeSelectOnly)
43 {

Callers

nothing calls this directly

Calls 5

InitialiseByAttributesFunction · 0.85
newDelegateFunction · 0.85
connectMethod · 0.45
getEventMethod · 0.45
getParentMethod · 0.45

Tested by

no test coverage detected