Label showing a text. More...
#include <label.hpp>


Public Member Functions | |
| tlabel () | |
| bool | can_wrap () const |
| Inherited from twidget. | |
| unsigned | get_characters_per_line () const |
| Inherited from tcontrol. | |
| void | set_active (const bool active) |
| Inherited from tcontrol. | |
| bool | get_active () const |
| Inherited from tcontrol. | |
| unsigned | get_state () const |
| Inherited from tcontrol. | |
| bool | disable_click_dismiss () const |
| Inherited from tcontrol. | |
| void | set_can_wrap (const bool wrap) |
| void | set_characters_per_line (const unsigned set_characters_per_line) |
Private Types | |
| enum | tstate { ENABLED, DISABLED, COUNT } |
Possible states of the widget. More... | |
Private Member Functions | |
| void | set_state (const tstate state) |
| const std::string & | get_control_type () const |
| Inherited from tcontrol. | |
Private Attributes | |
| tstate | state_ |
| Current state of the widget. | |
| bool | can_wrap_ |
| Holds the label can wrap or not. | |
| unsigned | characters_per_line_ |
| The maximum number of characters per line. | |
Label showing a text.
Definition at line 24 of file label.hpp.
enum gui2::tlabel::tstate [private] |
| bool gui2::tlabel::can_wrap | ( | ) | const [virtual] |
Inherited from twidget.
Reimplemented from gui2::twidget.
Definition at line 30 of file label.cpp.
References characters_per_line_.
| bool gui2::tlabel::disable_click_dismiss | ( | ) | const [inline, virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
| bool gui2::tlabel::get_active | ( | ) | const [inline, virtual] |
Inherited from tcontrol.
Implements gui2::tcontrol.
Definition at line 47 of file label.hpp.
References state_.
Referenced by set_active().

| unsigned gui2::tlabel::get_characters_per_line | ( | ) | const [virtual] |
Inherited from tcontrol.
Reimplemented from gui2::tcontrol.
Definition at line 35 of file label.cpp.
References characters_per_line_.
| const std::string & gui2::tlabel::get_control_type | ( | ) | const [private, virtual] |
Inherited from tcontrol.
Implements gui2::tcontrol.
Definition at line 53 of file label.cpp.
References type.
| unsigned gui2::tlabel::get_state | ( | ) | const [inline, virtual] |
Inherited from tcontrol.
Implements gui2::tcontrol.
Definition at line 50 of file label.hpp.
References state_.
| void gui2::tlabel::set_active | ( | const bool | active | ) | [inline, virtual] |
Inherited from tcontrol.
Implements gui2::tcontrol.
Definition at line 43 of file label.hpp.
References DISABLED, ENABLED, get_active(), and set_state().
Referenced by gui2::teditor_settings::update_selected_tod_info().


| void gui2::tlabel::set_can_wrap | ( | const bool | wrap | ) | [inline] |
Definition at line 57 of file label.hpp.
References can_wrap_.
Referenced by gui2::tscroll_label::finalize_subclass(), and gui2::twml_message_::pre_show().

| void gui2::tlabel::set_characters_per_line | ( | const unsigned | set_characters_per_line | ) |
Definition at line 40 of file label.cpp.
References characters_per_line_.
| void gui2::tlabel::set_state | ( | const tstate | state | ) | [private] |
Definition at line 45 of file label.cpp.
References gui2::twidget::set_dirty(), and state_.
Referenced by set_active().


bool gui2::tlabel::can_wrap_ [private] |
Holds the label can wrap or not.
Definition at line 81 of file label.hpp.
Referenced by set_can_wrap().
unsigned gui2::tlabel::characters_per_line_ [private] |
The maximum number of characters per line.
The maximum is not an exact maximum, it uses the average character width.
Definition at line 88 of file label.hpp.
Referenced by get_characters_per_line(), and set_characters_per_line().
tstate gui2::tlabel::state_ [private] |
Current state of the widget.
The state of the widget determines what to render and how the widget reacts to certain 'events'.
Definition at line 78 of file label.hpp.
Referenced by get_active(), get_state(), and set_state().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:22:59 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |