16 #define GETTEXT_DOMAIN "wesnoth-lib"
30 #define LOG_SCOPE_HEADER get_control_type() + " [" + id() + "] " + __func__
31 #define LOG_HEADER LOG_SCOPE_HEADER + ':'
43 , wrap_on_(builder.wrap_on)
44 , text_alignment_(builder.text_alignment)
45 , link_aware_(builder.link_aware)
47 connect_signal<event::LEFT_BUTTON_DOWN>(
94 widget->set_use_markup(use_markup);
101 widget->set_text_alpha(alpha);
110 widget->set_link_aware(l);
169 load_resolutions<resolution>(cfg);
180 grid = std::make_shared<builder_grid>(child);
188 builder_scroll_label::builder_scroll_label(
const config& cfg)
192 , wrap_on(cfg[
"wrap"].to_bool(true))
194 , link_aware(cfg[
"link_aware"].to_bool(false))
200 auto widget = std::make_unique<scroll_label>(*
this);
208 widget->init_grid(*conf->grid);
211 DBG_GUI_G <<
"Window builder: placed scroll label '" <<
id
212 <<
"' with definition '" <<
definition <<
"'.";
A config object defines a single node in a WML file, with access to child nodes.
widget * find(const std::string &id, const bool must_be_active) override
See widget::find.
void set_can_wrap(const bool wrap)
void set_link_aware(bool l)
void keyboard_capture(widget *widget)
Define the common log macros for the gui toolkit.
void point(int x, int y)
Draw a single point.
ui_event
The event sent to the dispatcher.
scrollbar_mode get_scrollbar_mode(const std::string &scrollbar_mode)
Returns the scrollbar mode flags.
PangoAlignment decode_text_alignment(const std::string &alignment)
Converts a text alignment string to a text alignment.
Contains the implementation details for lexical_cast and shouldn't be used directly.
std::vector< state_definition > state
std::string missing_mandatory_wml_tag(const std::string §ion, const std::string &tag)
Returns a standard message for a missing wml child (tag).
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
#define VALIDATE_WML_CHILD(cfg, key, message)