31 struct builder_matrix;
66 template <
class STATE>
71 const std::string& control_type)
80 STATE::set_active(active);
86 return STATE::get_active();
92 return STATE::get_state();
108 const std::map<std::string, std::string>& tags);
130 const bool must_be_active)
override;
134 const bool must_be_active)
const override;
137 widget*
find(
const std::string_view
id,
const bool must_be_active)
override;
140 const widget*
find(
const std::string_view
id,
const bool must_be_active)
const override;
217 static const std::string&
type();
250 virtual std::unique_ptr<widget>
build()
const override;
A config object defines a single node in a WML file, with access to child nodes.
virtual void set_active(const bool active) override
See styled_widget::set_active.
virtual unsigned get_state() const override
See styled_widget::get_state.
virtual bool get_active() const override
See styled_widget::get_active.
control_NEW(const implementation::builder_styled_widget &builder, const std::string &control_type)
virtual void impl_draw_children() override
See widget::impl_draw_children.
virtual void request_reduce_width(const unsigned maximum_width) override
See widget::request_reduce_width.
void sort(const pane::compare_functor_t &compare_functor)
Sorts the contents of the pane.
virtual void layout_children() override
See widget::layout_children.
static const std::string & type()
Static type getter that does not rely on the widget being constructed.
grid * get_grid(const unsigned id)
Returns a grid in the pane.
const grid * get_grid(const unsigned id) const
Returns a grid in the pane.
virtual widget * find_at(const point &coordinate, const bool must_be_active) override
See widget::find_at.
virtual point calculate_best_size() const override
See widget::calculate_best_size.
virtual void place(const point &origin, const point &size) override
See widget::place.
pane * pane_
Contains the pane used for adding new items to the matrix.
friend class debug_layout_graph
void filter(const pane::filter_functor_t &filter_functor)
Filters the contents of the pane.
matrix(const implementation::builder_matrix &builder)
virtual void layout_initialize(const bool full_initialization) override
See widget::layout_initialize.
virtual const std::string & get_control_type() const override
Inherited from styled_widget, implemented by REGISTER_WIDGET.
virtual iteration::walker_ptr create_walker() override
See widget::create_walker.
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.
widget * find(const std::string_view id, const bool must_be_active) override
See widget::find.
grid content_
The grid containing our children.
unsigned create_item(const widget_data &item_data, const std::map< std::string, std::string > &tags)
A pane is a container where new members can be added and removed during run-time.
std::function< bool(const item &, const item &)> compare_functor_t
std::function< bool(const item &)> filter_functor_t
void sort(const compare_functor_t &compare_functor)
Sorts the contents of the pane.
void filter(const filter_functor_t &filter_functor)
Filters the contents of the pane.
state_t
Possible states of the widget.
unsigned get_state() const
void set_active(const bool active)
state_t state_
Current state of the widget.
std::unique_ptr< class walker_base > walker_ptr
std::shared_ptr< builder_grid > builder_grid_ptr
std::shared_ptr< builder_widget > builder_widget_ptr
std::map< std::string, widget_item > widget_data
control_NEW< state_default > tbase
Contains the implementation details for lexical_cast and shouldn't be used directly.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.
std::size_t size(std::string_view str)
Length in characters of a UTF-8 string.
builder_widget_ptr builder_main
builder_grid_ptr builder_left
builder_matrix(const config &cfg)
builder_grid_ptr builder_top
scrollbar_container::scrollbar_mode horizontal_scrollbar_mode
scrollbar_container::scrollbar_mode vertical_scrollbar_mode
virtual std::unique_ptr< widget > build() const override
builder_grid_ptr builder_bottom
builder_grid_ptr builder_right
resolution(const config &cfg)
matrix_definition(const config &cfg)