15 #define GETTEXT_DOMAIN "wesnoth-lib"
29 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
30 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
61 :
tbase(builder, get_control_type()), content_(), pane_(nullptr)
68 replacements.insert(std::make_pair(
"_main", builder.
builder_main));
71 replacements.insert(std::make_pair(
"_top", builder.
builder_top));
75 replacements.insert(std::make_pair(
"_left", builder.
builder_left));
79 replacements.insert(std::make_pair(
"_right", builder.
builder_right));
83 replacements.insert(std::make_pair(
"_bottom", builder.
builder_bottom));
86 cfg->content->build(
content_, replacements);
99 const std::map<std::string, std::string>& tags)
128 const std::vector<twidget*>& call_stack)
130 std::vector<twidget*> child_call_stack = call_stack;
144 const bool must_be_active)
const
220 DBG_GUI_P <<
"Parsing matrix " <<
id <<
'\n';
222 load_resolutions<tresolution>(cfg);
227 , content(new
tbuilder_grid(cfg.child(
"content",
"[matrix_definition]")))
276 tbuilder_matrix::tbuilder_matrix(
const config& cfg)
278 , vertical_scrollbar_mode(
280 , horizontal_scrollbar_mode(
282 , builder_top(nullptr)
283 , builder_bottom(nullptr)
284 , builder_left(nullptr)
285 , builder_right(nullptr)
Define the common log macros for the gui toolkit.
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 void layout_children() override
See twidget::layout_children.
GLuint GLuint GLsizei GLenum type
tbuilder_grid_ptr builder_right
virtual void layout_initialise(const bool full_initialisation) override
See twidget::layout_initialise.
tresolution_definition_ptr config()
tbuilder_grid_ptr builder_top
virtual const std::string & get_control_type() const override
See tcontrol::get_control_type.
virtual void place(const tpoint &origin, const tpoint &size) override
See twidget::place.
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.
tscrollbar_container::tscrollbar_mode get_scrollbar_mode(const std::string &scrollbar_mode)
Returns the scrollbar mode flags.
twidget * find(const std::string &id, const bool must_be_active) override
See twidget::find.
unsigned create_item(const std::map< std::string, string_map > &item_data, const std::map< std::string, std::string > &tags)
Creates a new item.
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.
Contains the state info for a resolution.
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)
void set_active(const bool active)
tbuilder_widget_ptr create_builder_widget(const config &cfg)
Create a widget builder.
std::vector< tstate_definition > state
tbuilder_grid_ptr builder_bottom
config & child(const std::string &key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
tgrid content_
The grid containing our children.
tbuilder_grid_ptr builder_left
tstate state_
Current state of the widget.
virtual void layout_initialise(const bool full_initialisation) override
See twidget::layout_initialise.
twidget * find(const std::string &id, const bool must_be_active) override
See twidget::find.
tpane * pane_
Contains the pane used for adding new items to the matrix.
The walker abstract base class.
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.
GLsizei const GLcharARB ** string
virtual twidget * find_at(const tpoint &coordinate, const bool must_be_active) override
See twidget::find_at.
virtual iterator::twalker_ * create_walker() override
See twidget::create_walker.
Contains the implementation details for lexical_cast and shouldn't be used directly.
virtual void child_populate_dirty_list(twindow &caller, const std::vector< twidget * > &call_stack) override
See twidget::child_populate_dirty_list.
tbuilder_widget_ptr builder_main