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

Method bindEvents

UnitTests/TestApp/DataListUI.cpp:29–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27 }
28
29 void DataListUI::bindEvents(MyGUI::Widget* _widget)
30 {
31 MyGUI::Button* button = _widget->castType<MyGUI::Button>(false);
32 if (button != nullptr)
33 {
34 std::string_view event = button->getUserString("Event");
35 if (!event.empty())
36 button->eventMouseButtonClick += MyGUI::newDelegate(this, &DataListUI::notifyMouseButtonClick);
37 }
38
39 for (size_t index = 0; index < _widget->getChildCount(); index++)
40 bindEvents(_widget->getChildAt(index));
41 }
42
43 void DataListUI::notifyMouseButtonClick(MyGUI::Widget* _sender)
44 {

Callers

nothing calls this directly

Calls 5

newDelegateFunction · 0.85
getUserStringMethod · 0.80
getChildCountMethod · 0.80
getChildAtMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected