16 #define GETTEXT_DOMAIN "wesnoth-lib" 33 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__ 34 #define LOG_HEADER LOG_SCOPE_HEADER + ':' 46 , wrap_on_(builder.wrap_on)
47 , text_alignment_(builder.text_alignment)
48 , link_aware_(builder.link_aware)
50 connect_signal<event::LEFT_BUTTON_DOWN>(
97 widget->set_use_markup(use_markup);
104 widget->set_text_alpha(alpha);
113 widget->set_link_aware(l);
172 load_resolutions<resolution>(cfg);
179 state.emplace_back(cfg.
child(
"state_enabled"));
180 state.emplace_back(cfg.
child(
"state_disabled"));
185 grid = std::make_shared<builder_grid>(child);
193 builder_scroll_label::builder_scroll_label(
const config& cfg)
197 , wrap_on(cfg[
"wrap"].to_bool(true))
199 , link_aware(cfg[
"link_aware"].to_bool(false))
205 auto widget = std::make_unique<scroll_label>(*this);
213 widget->init_grid(*conf->grid);
216 DBG_GUI_G <<
"Window builder: placed scroll label '" <<
id 217 <<
"' with definition '" <<
definition <<
"'.";
Define the common log macros for the gui toolkit.
Base class of a resolution, contains the common keys for a resolution.
void keyboard_capture(widget *widget)
config & child(config_key_type key, int n=0)
Returns the nth child with the given key, or a reference to an invalid config if there is none...
std::vector< state_definition > state
void set_can_wrap(const bool wrap)
ui_event
The event sent to the dispatcher.
A label displays a text, the text can be wrapped but no scrollbars are provided.
PangoAlignment decode_text_alignment(const std::string &alignment)
Converts a text alignment string to a text alignment.
static std::string _(const char *str)
#define VALIDATE(cond, message)
The macro to use for the validation of WML.
This file contains the settings handling of the widget library.
widget * find(const std::string &id, const bool must_be_active) override
See widget::find.
scrollbar_mode get_scrollbar_mode(const std::string &scrollbar_mode)
Returns the scrollbar mode flags.
void point(int x, int y)
Draw a single point.
A config object defines a single node in a WML file, with access to child nodes.
void set_link_aware(bool l)
Contains the implementation details for lexical_cast and shouldn't be used directly.