| 13 | } |
| 14 | |
| 15 | sf::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 | |
| 33 | void 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 ); |
nothing calls this directly
no outgoing calls
no test coverage detected