#include <label.hpp>


Public Member Functions | |
| label (CVideo &video, const std::string &text, int size=font::SIZE_NORMAL, const SDL_Color &color=font::NORMAL_COLOR, const bool auto_join=true) | |
| const std::string & | set_text (const std::string &text) |
| const std::string & | get_text () const |
| const SDL_Color & | set_color (const SDL_Color &color) |
| const SDL_Color & | get_color () const |
| virtual void | draw_contents () |
Private Member Functions | |
| void | update_label_size () |
Private Attributes | |
| std::string | text_ |
| int | size_ |
| SDL_Color | color_ |
Definition at line 25 of file label.hpp.
| gui::label::label | ( | CVideo & | video, | |
| const std::string & | text, | |||
| int | size = font::SIZE_NORMAL, |
|||
| const SDL_Color & | color = font::NORMAL_COLOR, |
|||
| const bool | auto_join = true | |||
| ) |
Definition at line 25 of file label.cpp.
References update_label_size().

| void gui::label::draw_contents | ( | ) | [virtual] |
Reimplemented from gui::widget.
Definition at line 58 of file label.cpp.
References font::draw_text(), get_color(), gui::widget::location(), size_, text_, and gui::widget::video().

| const SDL_Color & gui::label::get_color | ( | ) | const |
Definition at line 53 of file label.cpp.
References color_, font::DISABLED_COLOR, and gui::widget::enabled().
Referenced by draw_contents(), and set_color().


| const std::string & gui::label::get_text | ( | ) | const |
Definition at line 41 of file label.cpp.
References text_.
Referenced by mp::ui::append_to_title(), gui::dialog::layout(), and gui::dialog::show().

| const SDL_Color & gui::label::set_color | ( | const SDL_Color & | color | ) |
Definition at line 46 of file label.cpp.
References color_, get_color(), and gui::widget::set_dirty().

| const std::string & gui::label::set_text | ( | const std::string & | text | ) |
Definition at line 30 of file label.cpp.
References gui::widget::set_dirty(), text_, and update_label_size().
Referenced by mp::ui::append_to_title(), mp::create::process_event(), mp::connect::side::process_event(), mp::connect::update_playerlist_state(), and mp::connect::side::update_ui().


| void gui::label::update_label_size | ( | ) | [private] |
Definition at line 65 of file label.cpp.
References gui::widget::set_measurements(), size_, text_, and font::text_area().
Referenced by label(), and set_text().


SDL_Color gui::label::color_ [private] |
Definition at line 42 of file label.hpp.
Referenced by get_color(), and set_color().
int gui::label::size_ [private] |
Definition at line 41 of file label.hpp.
Referenced by draw_contents(), and update_label_size().
std::string gui::label::text_ [private] |
Definition at line 40 of file label.hpp.
Referenced by draw_contents(), get_text(), set_text(), and update_label_size().
| Generated by doxygen 1.7.1 on Thu May 24 2012 01:21:18 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |