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

Method checkContainer

Tools/LayoutEditor/WidgetSelectorManager.cpp:107–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 }
106
107 void WidgetSelectorManager::checkContainer(
108 WidgetContainer* _container,
109 MyGUI::Widget*& _result,
110 const MyGUI::IntPoint& _point)
111 {
112 if (!_container->getWidget()->getVisible())
113 return;
114
115 if (_container->getWidget()->getAbsoluteCoord().inside(_point))
116 {
117 if (_result != nullptr)
118 {
119 if (_result->getParent() == _container->getWidget()->getParent())
120 {
121 if (_result->getDepth() < _container->getWidget()->getDepth())
122 return;
123 }
124 }
125
126 _result = _container->getWidget();
127 }
128
129 for (std::vector<WidgetContainer*>::iterator item = _container->childContainers.begin();
130 item != _container->childContainers.end();
131 ++item)
132 {
133 if (_container->getWidget()->isType<MyGUI::TabControl>() && (*item)->getWidget()->isType<MyGUI::TabItem>())
134 {
135 if (_container->getWidget()->castType<MyGUI::TabControl>()->getItemSelected() !=
136 (*item)->getWidget()->castType<MyGUI::TabItem>())
137 continue;
138 }
139
140 checkContainer(*item, _result, _point);
141 }
142 }
143
144 void WidgetSelectorManager::resetDepth()
145 {

Callers

nothing calls this directly

Calls 9

getWidgetMethod · 0.80
getAbsoluteCoordMethod · 0.80
getItemSelectedMethod · 0.80
getVisibleMethod · 0.45
insideMethod · 0.45
getParentMethod · 0.45
getDepthMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected