16#define GETTEXT_DOMAIN "wesnoth-lib"
32 : maximum_columns_(maximum_columns)
33 , rows_(1,
std::pair(0, 0))
34 , columns_(maximum_columns, 0)
44 rows_.emplace_back(0, 0);
65 const int origin =
rows_.back().first +
rows_.back().second;
66 rows_.emplace_back(origin, 0);
73 const int height =
rows_.back().first +
rows_.back().second;
74 return point(width, height);
82 const int width = column == 0 ? 0
std::vector< std::pair< int, int > > rows_
Holds the row sizes.
std::vector< int > columns_
Holds the widths of the columns.
unsigned row_
The row to add an item to.
virtual void add_item(const point &size)
Adds a item to be placed.
virtual point get_origin(const unsigned index) const
Gets the origin for an item.
virtual void initialize()
Initialises the placer.
unsigned column_
The column to add an item to.
unsigned maximum_columns_
The maximum number of columns to use.
virtual point get_size() const
Gets the required size of all items.
placer_vertical_list(const unsigned maximum_columns)
Contains the implementation details for lexical_cast and shouldn't be used directly.
Placement helper for the vertical list.