15 #define GETTEXT_DOMAIN "wesnoth-lib"
21 #define LOG_SCOPE_HEADER \
22 "tcontainer(" + get_control_type() + ") [" + id() + "] " + __func__
23 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
81 const tpoint client_size(rect.w, rect.h);
82 const tpoint client_position(rect.x, rect.y);
102 result.x += border_size.x;
104 if(minimum_size.
x != 0 &&
result.x < minimum_size.
x) {
109 result.y += border_size.y;
111 if(minimum_size.
y != 0 &&
result.y < minimum_size.
y) {
128 const tpoint client_position(rect.x, rect.y);
157 const std::vector<twidget*>& call_stack)
159 std::vector<twidget*> child_call_stack = call_stack;
164 const bool must_be_active)
170 const bool must_be_active)
const
178 return result ? result :
grid_.
find(
id, must_be_active);
182 const bool must_be_active)
const
185 return result ? result :
grid_.
find(
id, must_be_active);
virtual void request_reduce_height(const unsigned maximum_height) override
See twidget::request_reduce_height.
Define the common log macros for the gui toolkit.
virtual void layout_initialise(const bool full_initialisation) override
See twidget::layout_initialise.
void reduce_height(const unsigned maximum_height)
Tries to reduce the height of a container.
virtual bool has_widget(const twidget &widget) const override
See twidget::has_widget.
virtual void demand_reduce_height(const unsigned maximum_height) override
See twidget::demand_reduce_height.
virtual void set_visible_rectangle(const SDL_Rect &rectangle) override
See twidget::set_visible_rectangle.
virtual void layout_children() override
See twidget::layout_children.
twidget * find(const std::string &id, const bool must_be_active) override
See twidget::find.
virtual void set_active(const bool active) override
See tcontrol::set_active.
virtual void impl_draw_children(surface &frame_buffer, int x_offset, int y_offset) override
See twidget::impl_draw_children.
twidget * find(const std::string &id, const bool must_be_active) override
See twidget::find.
tgrid grid_
The grid which holds the child objects.
lg::log_domain log_gui_layout("gui/layout")
virtual void place(const tpoint &origin, const tpoint &size) override
See twidget::place.
bool disable_click_dismiss() const override
See twidget::disable_click_dismiss.
virtual void set_self_active(const bool active)=0
Helper for set_active.
virtual void request_reduce_width(const unsigned maximum_width) override
See twidget::request_reduce_width.
GLint GLint GLint GLint GLint GLint y
virtual void set_origin(const tpoint &origin) override
See twidget::set_origin.
virtual void set_origin(const tpoint &origin) override
See twidget::set_origin.
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.
virtual bool can_wrap() const override
See twidget::can_wrap.
virtual void request_reduce_height(const unsigned maximum_height) override
See twidget::request_reduce_height.
bool disable_click_dismiss() const override
See twidget::disable_click_dismiss.
unsigned int get_cols() const
void init_grid(const boost::intrusive_ptr< tbuilder_grid > &grid_builder)
Initializes and builds the grid.
virtual void place(const tpoint &origin, const tpoint &size) override
See twidget::place.
void set_active(const bool active)
Activates all children.
virtual void request_reduce_width(const unsigned maximum_width) override
See twidget::request_reduce_width.
virtual void place(const tpoint &origin, const tpoint &size) override
See twidget::place.
#define log_scope2(domain, description)
virtual bool has_widget(const twidget &widget) const override
See twidget::has_widget.
void reduce_width(const unsigned maximum_width)
Tries to reduce the width of a container.
virtual void set_visible_rectangle(const SDL_Rect &rectangle) override
See twidget::set_visible_rectangle.
virtual void layout_children() override
See twidget::layout_children.
tpoint get_config_minimum_size() const
Gets the minimum size as defined in the config.
virtual tpoint calculate_best_size() const override
See twidget::calculate_best_size.
virtual void child_populate_dirty_list(twindow &caller, const std::vector< twidget * > &call_stack) override
See twidget::child_populate_dirty_list.
virtual SDL_Rect get_client_rect() const
Returns the client rect.
virtual tgrid & initial_grid()
Returns the grid to initialize while building.
virtual bool can_wrap() const override
See twidget::can_wrap.
GLint GLint GLint GLint GLint x
virtual void demand_reduce_width(const unsigned maximum_width) override
See twidget::demand_reduce_width.
virtual twidget * find_at(const tpoint &coordinate, const bool must_be_active) override
See twidget::find_at.
lg::log_domain log_gui_general("gui/general")
bool disable_click_dismiss() const override
See twidget::disable_click_dismiss.
void reduce_height(const unsigned maximum_height)
Tries to reduce the height of a container.
unsigned int get_rows() const
virtual tpoint border_space() const
Returns the space used by the border.
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.
virtual void demand_reduce_width(const unsigned maximum_width) override
See twidget::demand_reduce_width.
void reduce_width(const unsigned maximum_width)
Tries to reduce the width of a container.
virtual bool get_active() const =0
Gets the active state of the control.
virtual void layout_initialise(const bool full_initialisation) override
See twidget::layout_initialise.
GLsizei const GLcharARB ** string
virtual twidget * find_at(const tpoint &coordinate, const bool must_be_active) override
See twidget::find_at.
virtual void demand_reduce_height(const unsigned maximum_height) override
See twidget::demand_reduce_height.