15 #ifndef GUI_WIDGETS_MATRIX_HPP_INCLUDED
16 #define GUI_WIDGETS_MATRIX_HPP_INCLUDED
32 struct tbuilder_matrix;
68 template <
class STATE>
74 :
tcontrol(builder, STATE::COUNT, control_type)
82 STATE::set_active(active);
88 return STATE::get_active();
94 return STATE::get_state();
113 unsigned create_item(
const std::map<std::string, string_map>& item_data,
114 const std::map<std::string, std::string>& tags);
128 int y_offset)
override;
136 const std::vector<twidget*>& call_stack)
override;
143 const bool must_be_active)
override;
147 const bool must_be_active)
const override;
154 const bool must_be_active)
const override;
216 const tgrid*
grid(
const unsigned id)
const;
tbuilder_grid_ptr content
void filter(const tfilter_functor &filter_functor)
Filters the contents of the pane.
virtual void request_reduce_width(const unsigned maximum_width) override
See twidget::request_reduce_width.
virtual void layout_children() override
See twidget::layout_children.
virtual bool get_active() const override
See tcontrol::get_active.
virtual void set_active(const bool active) override
See tcontrol::set_active.
tbuilder_grid_ptr builder_right
virtual void layout_initialise(const bool full_initialisation) override
See twidget::layout_initialise.
std::function< bool(const titem &, const titem &)> tcompare_functor
tbuilder_grid_ptr builder_top
virtual const std::string & get_control_type() const override
See tcontrol::get_control_type.
tscrollbar_container::tscrollbar_mode vertical_scrollbar_mode
tcontrol_NEW(const implementation::tbuilder_control &builder, const std::string &control_type)
tresolution(const config &cfg)
virtual twidget * find_at(const tpoint &coordinate, const bool must_be_active) override
See twidget::find_at.
bool disable_click_dismiss() const override
See twidget::disable_click_dismiss.
virtual tpoint calculate_best_size() const override
See twidget::calculate_best_size.
friend class tdebug_layout_graph
twidget * find(const std::string &id, const bool must_be_active) override
See twidget::find.
tstate
Possible states of the widget.
Base class of a resolution, contains the common keys for a resolution.
base class of top level items, the only item which needs to store the final canvases to draw on ...
A class inherited from ttext_box that displays its input as stars.
unsigned get_state() const
virtual void impl_draw_children(surface &frame_buffer, int x_offset, int y_offset) override
See twidget::impl_draw_children.
std::function< bool(const titem &)> tfilter_functor
unsigned create_item(const std::map< std::string, string_map > &item_data, const std::map< std::string, std::string > &tags)
tmatrix_definition(const config &cfg)
tmatrix(const implementation::tbuilder_matrix &builder)
tbuilder_matrix(const config &cfg)
void sort(const tpane::tcompare_functor &compare_functor)
Sorts the contents of the pane.
void set_active(const bool active)
Base class for all visible items.
tscrollbar_container::tscrollbar_mode horizontal_scrollbar_mode
tbuilder_grid_ptr builder_bottom
tgrid content_
The grid containing our children.
tbuilder_grid_ptr builder_left
tstate state_
Current state of the widget.
void filter(const tpane::tfilter_functor &filter_functor)
Filters the contents of the pane.
tpane * pane_
Contains the pane used for adding new items to the matrix.
The walker abstract base class.
virtual unsigned get_state() const override
See tcontrol::get_state.
virtual void place(const tpoint &origin, const tpoint &size) override
See twidget::place.
static tmatrix * build(const implementation::tbuilder_matrix &builder)
A config object defines a single node in a WML file, with access to child nodes.
tgrid * grid(const unsigned id)
Returns a grid in the pane.
GLsizei const GLcharARB ** string
virtual iterator::twalker_ * create_walker() override
See twidget::create_walker.
Contains the implementation details for lexical_cast and shouldn't be used directly.
tcontrol_NEW< tstate_default > tbase
virtual void child_populate_dirty_list(twindow &caller, const std::vector< twidget * > &call_stack) override
See twidget::child_populate_dirty_list.
void sort(const tcompare_functor &compare_functor)
Sorts the contents of the pane.
tbuilder_widget_ptr builder_main