#include <label.hpp>
Public Member Functions | |
label (CVideo &video, const std::string &text, int size=font::SIZE_NORMAL, const SDL_Color &colour=font::NORMAL_COLOUR, const bool auto_join=true) | |
const std::string & | set_text (const std::string &text) |
const std::string & | get_text () const |
int | set_size (int size) |
int | get_size () const |
const SDL_Color & | set_colour (const SDL_Color &colour) |
const SDL_Color & | get_colour () const |
virtual void | draw_contents () |
Private Member Functions | |
void | update_label_size () |
Private Attributes | |
std::string | text_ |
int | size_ |
SDL_Color | colour_ |
Definition at line 24 of file widgets/label.hpp.
gui::label::label | ( | CVideo & | video, | |
const std::string & | text, | |||
int | size = font::SIZE_NORMAL , |
|||
const SDL_Color & | colour = font::NORMAL_COLOUR , |
|||
const bool | auto_join = true | |||
) |
const std::string & gui::label::set_text | ( | const std::string & | text | ) |
Definition at line 28 of file widgets/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().
const std::string & gui::label::get_text | ( | ) | const |
Definition at line 39 of file widgets/label.cpp.
References text_.
Referenced by mp::ui::append_to_title(), gui::dialog::layout(), and gui::dialog::show().
int gui::label::set_size | ( | int | size | ) |
Definition at line 44 of file widgets/label.cpp.
References gui::widget::set_dirty(), size_, and update_label_size().
int gui::label::get_size | ( | ) | const |
const SDL_Color & gui::label::set_colour | ( | const SDL_Color & | colour | ) |
Definition at line 57 of file widgets/label.cpp.
References colour_, get_colour(), and gui::widget::set_dirty().
const SDL_Color & gui::label::get_colour | ( | ) | const |
Definition at line 64 of file widgets/label.cpp.
References colour_, font::DISABLED_COLOUR, and gui::widget::enabled().
Referenced by draw_contents(), and set_colour().
void gui::label::draw_contents | ( | ) | [virtual] |
Reimplemented from gui::widget.
Definition at line 69 of file widgets/label.cpp.
References font::draw_text(), get_colour(), gui::widget::location(), size_, text_, and gui::widget::video().
void gui::label::update_label_size | ( | ) | [private] |
Definition at line 74 of file widgets/label.cpp.
References gui::widget::set_measurements(), size_, text_, and font::text_area().
Referenced by label(), set_size(), and set_text().
std::string gui::label::text_ [private] |
Definition at line 42 of file widgets/label.hpp.
Referenced by draw_contents(), get_text(), set_text(), and update_label_size().
int gui::label::size_ [private] |
Definition at line 43 of file widgets/label.hpp.
Referenced by draw_contents(), get_size(), set_size(), and update_label_size().
SDL_Color gui::label::colour_ [private] |
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |