MCPcopy Create free account
hub / github.com/TankOs/SFGUI / RecalculateWidgetLevels

Method RecalculateWidgetLevels

src/SFGUI/Desktop.cpp:215–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215void Desktop::RecalculateWidgetLevels() {
216 auto children_size = m_children.size();
217 auto current_level = 0;
218
219 std::reverse_iterator<WidgetsList::iterator> iter( std::end( m_children ) );
220 std::reverse_iterator<WidgetsList::iterator> finish( std::begin( m_children ) );
221
222 for( ; iter != finish; ++iter ) {
223 (*iter)->SetHierarchyLevel( current_level );
224 (*iter)->Invalidate();
225 current_level += std::numeric_limits<int>::max() / static_cast<int>( children_size );
226 }
227}
228
229bool Desktop::SetProperties( const std::string& properties ) {
230 if( !m_context.GetEngine().SetProperties( properties ) ) {

Callers

nothing calls this directly

Calls 5

endFunction · 0.85
beginFunction · 0.85
sizeMethod · 0.80
SetHierarchyLevelMethod · 0.80
InvalidateMethod · 0.45

Tested by

no test coverage detected