31 struct builder_matrix;
39 void set_active(
const bool active);
41 bool get_active()
const;
43 unsigned get_state()
const;
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();
109 friend class debug_layout_graph;
119 unsigned create_item(
const std::map<std::string, string_map>& item_data,
120 const std::map<std::string, std::string>& tags);
126 virtual void place(
const point& origin,
const point&
size)
override;
129 virtual void layout_initialize(
const bool full_initialization)
override;
132 virtual void impl_draw_children(
surface& frame_buffer,
134 int y_offset)
override;
137 virtual void layout_children()
override;
141 child_populate_dirty_list(
window& caller,
142 const std::vector<widget*>&
call_stack)
override;
145 virtual void request_reduce_width(
const unsigned maximum_width)
override;
149 const bool must_be_active)
override;
153 const bool must_be_active)
const override;
156 widget* find(
const std::string&
id,
const bool must_be_active)
override;
159 const widget* find(
const std::string&
id,
160 const bool must_be_active)
const override;
171 pane_->sort(compare_functor);
186 pane_->filter(filter_functor);
191 virtual point calculate_best_size()
const override;
195 bool disable_click_dismiss()
const override;
210 grid* get_grid(
const unsigned id);
222 const grid* get_grid(
const unsigned id)
const;
237 static const std::string&
type();
241 virtual const std::string& get_control_type()
const override;
Base class of a resolution, contains the common keys for a resolution.
builder_grid_ptr builder_top
List with the matrix specific variables: Key Type Default Description vertical_scrollbar_mode scroll...
void sort(const pane::compare_functor_t &compare_functor)
Sorts the contents of the pane.
grid content_
The grid containing our children.
std::function< bool(const item &)> filter_functor_t
void filter(const pane::filter_functor_t &filter_functor)
Filters the contents of the pane.
std::shared_ptr< builder_widget > builder_widget_ptr
virtual unsigned get_state() const override
See styled_widget::get_state.
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
control_NEW(const implementation::builder_styled_widget &builder, const std::string &control_type)
builder_grid_ptr builder_right
The walker abstract base class.
static thread_local std::deque< std::string > call_stack
For printing error messages when WFL parsing or evaluation fails, this contains the names of the WFL ...
virtual void set_active(const bool active) override
See styled_widget::set_active.
scrollbar_container::scrollbar_mode vertical_scrollbar_mode
builder_grid_ptr builder_bottom
A pane is a container where new members can be added and removed during run-time. ...
scrollbar_container::scrollbar_mode horizontal_scrollbar_mode
control_NEW< state_default > tbase
virtual bool get_active() const override
See styled_widget::get_active.
state_t state_
Current state of the widget.
std::function< bool(const item &, const item &)> compare_functor_t
builder_widget_ptr builder_main
state_t
Possible states of the widget.
pane * pane_
Contains the pane used for adding new items to the matrix.
builder_grid_ptr builder_left
std::unique_ptr< window > build(const builder_window::window_resolution &definition)
Builds a window.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.
A config object defines a single node in a WML file, with access to child nodes.
base class of top level items, the only item which needs to store the final canvases to draw on...
std::shared_ptr< builder_grid > builder_grid_ptr
Contains the implementation details for lexical_cast and shouldn't be used directly.