15 #define GETTEXT_DOMAIN "wesnoth-lib"
61 DBG_GUI_P <<
"Parsing scrollbar panel " <<
id <<
'\n';
63 load_resolutions<tresolution>(cfg);
138 tbuilder_scrollbar_panel::tbuilder_scrollbar_panel(
const config& cfg)
140 , vertical_scrollbar_mode(
142 , horizontal_scrollbar_mode(
148 VALIDATE(definition,
_(
"No list defined."));
162 DBG_GUI_G <<
"Window builder: placed scrollbar_panel '" <<
id
163 <<
"' with definition '" <<
definition <<
"'.\n";
172 widget->finalize_setup();
176 assert(content_grid);
178 const unsigned rows =
grid->rows;
179 const unsigned cols =
grid->cols;
183 for(
unsigned x = 0;
x < rows; ++
x) {
185 for(
unsigned y = 0;
y < cols; ++
y) {
189 grid->col_grow_factor[
y]);
196 grid->flags[
x * cols +
y],
197 grid->border_size[
x * cols +
y]);
void set_row_grow_factor(const unsigned row, const unsigned factor)
Sets the grow factor for a row.
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()
GLint GLint GLint GLint GLint GLint y
tscrollbar_container::tscrollbar_mode get_scrollbar_mode(const std::string &scrollbar_mode)
Returns the scrollbar mode flags.
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 set_column_grow_factor(const unsigned column, const unsigned factor)
Sets the grow factor for a column.
void init_grid(const boost::intrusive_ptr< tbuilder_grid > &grid_builder)
Initializes and builds the grid.
Contains the state info for a resolution.
GLint GLint GLint GLint GLint x
void set_rows_cols(const unsigned rows, const unsigned cols)
Wrapper to set_rows and set_cols.
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...
void set_child(twidget *widget, const unsigned row, const unsigned col, const unsigned flags, const unsigned border_size)
Sets a child in the grid.
A config object defines a single node in a WML file, with access to child nodes.
GLsizei const GLcharARB ** string
Contains the implementation details for lexical_cast and shouldn't be used directly.