15 #define GETTEXT_DOMAIN "wesnoth-lib"
27 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
28 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
37 SDL_Rect
tpanel::get_client_rect()
const
44 SDL_Rect
result = get_rectangle();
45 result.x += conf->left_border;
46 result.y += conf->top_border;
47 result.w -= conf->left_border + conf->right_border;
48 result.h -= conf->top_border + conf->bottom_border;
67 canvas(0).blit(frame_buffer,
73 canvas(1).blit(frame_buffer,
84 return tpoint(conf->left_border + conf->right_border,
85 conf->top_border + conf->bottom_border);
104 DBG_GUI_P <<
"Parsing panel " <<
id <<
'\n';
106 load_resolutions<tresolution>(cfg);
149 , top_border(cfg[
"top_border"])
150 , bottom_border(cfg[
"bottom_border"])
151 , left_border(cfg[
"left_border"])
152 , right_border(cfg[
"right_border"])
192 tbuilder_panel::tbuilder_panel(
const config& cfg)
208 DBG_GUI_G <<
"Window builder: placed panel '" <<
id <<
"' with definition '"
Define the common log macros for the gui toolkit.
virtual bool get_active() const override
See tcontrol::get_active.
tpanel_definition(const config &cfg)
virtual const std::string & get_control_type() const override
See tcontrol::get_control_type.
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
GLuint GLuint GLsizei GLenum type
tresolution_definition_ptr config()
virtual void set_self_active(const bool active) override
See tcontainer_::set_self_active.
tresolution(const config &cfg)
Base class of a resolution, contains the common keys for a resolution.
A class inherited from ttext_box that displays its input as stars.
void init_control(tcontrol *control) const
std::string definition
Parameters for the control.
static UNUSEDNOWARN std::string _(const char *str)
#define VALIDATE(cond, message)
The macro to use for the validation of WML.
void init_grid(const boost::intrusive_ptr< tbuilder_grid > &grid_builder)
Initializes and builds the grid.
Visible container to hold multiple widgets.
Contains the state info for a resolution.
virtual unsigned get_state() const override
See tcontrol::get_state.
std::vector< tcanvas > & canvas()
virtual void impl_draw_foreground(surface &frame_buffer, int x_offset, int y_offset) override
See twidget::impl_draw_foreground.
virtual void impl_draw_background(surface &frame_buffer, int x_offset, int y_offset) override
See twidget::impl_draw_background.
std::vector< tstate_definition > state
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...
A config object defines a single node in a WML file, with access to child nodes.
virtual tpoint border_space() const override
See tcontainer_::border_space.
GLsizei const GLcharARB ** string
Contains the implementation details for lexical_cast and shouldn't be used directly.