Public Member Functions | Private Types | Private Member Functions | Private Attributes

gui2::tlabel Class Reference

Label showing a text. More...

#include <label.hpp>

Inheritance diagram for gui2::tlabel:
Inheritance graph
[legend]
Collaboration diagram for gui2::tlabel:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

Label showing a text.

Definition at line 24 of file label.hpp.


Member Enumeration Documentation

enum gui2::tlabel::tstate [private]

Possible states of the widget.

Note the order of the states must be the same as defined in settings.hpp.

Enumerator:
ENABLED 
DISABLED 
COUNT 

Definition at line 68 of file label.hpp.


Constructor & Destructor Documentation

gui2::tlabel::tlabel (  )  [inline]

Definition at line 28 of file label.hpp.


Member Function Documentation

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.

Definition at line 53 of file label.hpp.

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

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

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

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

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


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:22:59 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs