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

Method CalculateRequisition

src/SFGUI/Table.cpp:15–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15sf::Vector2f Table::CalculateRequisition() {
16 float gap( Context::Get().GetEngine().GetProperty<float>( "Gap", shared_from_this() ) );
17 sf::Vector2f size( 2 * gap, 2 * gap );
18
19 UpdateRequisitions();
20
21 // Count requisitions of columns and rows.
22 for( const auto& column : m_columns ) {
23 size.x += column.requisition;
24 }
25
26 for( const auto& row : m_rows ) {
27 size.y += row.requisition;
28 }
29
30 return size;
31}
32
33void Table::Attach( Widget::Ptr widget, const sf::Rect<std::uint32_t>& rect, int x_options, int y_options, const sf::Vector2f& padding ) {
34 assert( rect.size.x > 0 );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected