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

Method CalculateRequisition

src/SFGUI/Fixed.cpp:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7}
8
9sf::Vector2f Fixed::CalculateRequisition() {
10 sf::Vector2f requisition( 0.f, 0.f );
11
12 // Find size needed to accomodate all widgets without overlapping any other widgets
13 for( const auto& child_position : m_children_position_map ) {
14 requisition.x = std::max( requisition.x, child_position.second.x + child_position.first->GetRequisition().x );
15 requisition.y = std::max( requisition.y, child_position.second.y + child_position.first->GetRequisition().y );
16 }
17
18 return requisition;
19}
20
21const std::string& Fixed::GetName() const {
22 static const std::string name( "Fixed" );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected