Public Member Functions | Private Member Functions | Private Attributes

gui::label Class Reference

#include <label.hpp>

Inheritance diagram for gui::label:
Inheritance graph
[legend]
Collaboration diagram for gui::label:
Collaboration graph
[legend]

List of all members.

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_

Detailed Description

Definition at line 25 of file label.hpp.


Constructor & Destructor Documentation

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().

Here is the call graph for this function:


Member Function Documentation

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Thu May 24 2012 01:21:18 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs