63 virtual void set_active(
const bool active)
override;
169 static const std::string&
type();
229 virtual std::unique_ptr<widget>
build()
const override;
A config object defines a single node in a WML file, with access to child nodes.
virtual const std::string & get_control_type() const override
Inherited from styled_widget, implemented by REGISTER_WIDGET.
void set_can_shrink(bool can_shrink)
unsigned short text_alpha_
virtual bool get_link_aware() const override
See styled_widget::get_link_aware.
void signal_handler_left_button_click(bool &handled)
Left click signal handler: checks if we clicked on a hyperlink.
virtual bool text_can_shrink() override
Inherited from styled_widget.
static const std::string & type()
Static type getter that does not rely on the widget being constructed.
void set_link_color(const color_t &color)
void signal_handler_mouse_leave(bool &handled)
Mouse leave signal handler: checks if the cursor left a hyperlink.
color_t link_color_
What color links will be rendered in.
void signal_handler_right_button_click(bool &handled)
Right click signal handler: checks if we clicked on a hyperlink, copied to clipboard.
bool disable_click_dismiss() const override
See widget::disable_click_dismiss.
bool link_aware_
Whether the label is link aware, rendering links with special formatting and handling click events.
virtual unsigned get_state() const override
See styled_widget::get_state.
void set_can_wrap(const bool wrap)
virtual void update_canvas() override
See styled_widget::update_canvas.
void set_state(const state_t state)
void set_characters_per_line(const unsigned characters_per_line)
state_t
Possible states of the widget.
virtual bool get_active() const override
See styled_widget::get_active.
state_t state_
Current state of the widget.
virtual void set_active(const bool active) override
See styled_widget::set_active.
virtual unsigned get_characters_per_line() const override
See styled_widget::get_characters_per_line.
unsigned characters_per_line_
The maximum number of characters per line.
void update_mouse_cursor(bool enable)
Implementation detail for (re)setting the hyperlink cursor.
virtual color_t get_link_color() const override
See styled_widget::get_link_aware.
virtual bool can_mouse_focus() const override
See widget::can_mouse_focus.
label(const implementation::builder_label &builder)
void set_link_aware(bool l)
void set_text_alpha(unsigned short alpha)
virtual bool can_wrap() const override
See widget::can_wrap.
void signal_handler_mouse_motion(bool &handled, const point &coordinate)
Mouse motion signal handler: checks if the cursor is on a hyperlink.
bool can_wrap_
Holds the label can wrap or not.
Contains the implementation details for lexical_cast and shouldn't be used directly.
map_location coordinate
Contains an x and y coordinate used for starting positions in maps.
The basic class for representing 8-bit RGB or RGBA colour values.
virtual std::unique_ptr< widget > build() const override
builder_label(const config &cfg)
unsigned characters_per_line
PangoAlignment text_alignment
resolution(const config &cfg)
label_definition(const config &cfg)