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

gui2::tscroll_label Class Reference

Label showing a text. More...

#include <scroll_label.hpp>

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

List of all members.

Public Member Functions

 tscroll_label ()
void set_label (const t_string &label)
 Inherited from tcontrol.
void set_use_markup (bool use_markup)
 Inherited from tcontrol.
void set_self_active (const bool active)
 Inherited from tcontainer_.
bool get_active () const
 Inherited from tcontainer_.
unsigned get_state () const
 Inherited from tcontainer_.

Private Types

enum  tstate { ENABLED, DISABLED, COUNT }
 

Possible states of the widget.

More...

Private Member Functions

void finalize_subclass ()
 Function for the subclasses to do their setup.
const std::string & get_control_type () const
 Inherited from tcontrol.
void signal_handler_left_button_down (const event::tevent event)

Private Attributes

tstate state_
 Current state of the widget.

Friends

struct implementation::tbuilder_scroll_label

Detailed Description

Label showing a text.

This version shows a scrollbar if the text gets too long and has some scrolling features. In general this widget is slower as the normal label so the normal label should be preferred.

Definition at line 37 of file scroll_label.hpp.


Member Enumeration Documentation

Possible states of the widget.

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

Enumerator:
ENABLED 
DISABLED 
COUNT 

Reimplemented from gui2::tscrollbar_container.

Definition at line 66 of file scroll_label.hpp.


Constructor & Destructor Documentation

gui2::tscroll_label::tscroll_label (  ) 

Definition at line 38 of file scroll_label.cpp.

References signal_handler_left_button_down().

Here is the call graph for this function:


Member Function Documentation

void gui2::tscroll_label::finalize_subclass (  )  [private, virtual]

Function for the subclasses to do their setup.

This function is called at the end of finalize_setup().

Todo:
wrapping should be a label setting. This setting shoul be mutual exclusive with the horizontal scrollbar. Also the scroll_grid needs to set the status for the scrollbars.

Reimplemented from gui2::tscrollbar_container.

Definition at line 76 of file scroll_label.cpp.

References gui2::tscrollbar_container::content_grid(), gui2::tgrid::find(), gui2::tcontrol::label(), gui2::tlabel::set_can_wrap(), and gui2::tcontrol::set_label().

Here is the call graph for this function:

bool gui2::tscroll_label::get_active (  )  const [inline, virtual]

Inherited from tcontainer_.

Reimplemented from gui2::tscrollbar_container.

Definition at line 56 of file scroll_label.hpp.

References state_.

const std::string & gui2::tscroll_label::get_control_type (  )  const [private, virtual]

Inherited from tcontrol.

Reimplemented from gui2::tscrollbar_container.

Definition at line 93 of file scroll_label.cpp.

References type.

unsigned gui2::tscroll_label::get_state (  )  const [inline, virtual]

Inherited from tcontainer_.

Reimplemented from gui2::tscrollbar_container.

Definition at line 58 of file scroll_label.hpp.

References state_.

void gui2::tscroll_label::set_label ( const t_string label  )  [virtual]

Inherited from tcontrol.

Reimplemented from gui2::tcontrol.

Definition at line 50 of file scroll_label.cpp.

References gui2::tscrollbar_container::content_grid(), gui2::tscrollbar_container::content_resize_request(), and gui2::tcontrol::set_label().

Referenced by gui2::tlobby_main::append_to_chatbox().

Here is the call graph for this function:

Here is the caller graph for this function:

void gui2::tscroll_label::set_self_active ( const bool  active  )  [inline, virtual]

Inherited from tcontainer_.

Implements gui2::tcontainer_.

Definition at line 51 of file scroll_label.hpp.

References ENABLED, and state_.

void gui2::tscroll_label::set_use_markup ( bool  use_markup  )  [virtual]

Inherited from tcontrol.

Reimplemented from gui2::tcontrol.

Definition at line 64 of file scroll_label.cpp.

References gui2::tscrollbar_container::content_grid(), and gui2::tcontrol::set_use_markup().

Here is the call graph for this function:

void gui2::tscroll_label::signal_handler_left_button_down ( const event::tevent  event  )  [private]

Definition at line 99 of file scroll_label.cpp.

References DBG_GUI_E, gui2::twidget::get_window(), gui2::twindow::keyboard_capture(), and LOG_HEADER.

Referenced by tscroll_label().

Here is the call graph for this function:

Here is the caller graph for this function:


Friends And Related Function Documentation

friend struct implementation::tbuilder_scroll_label [friend]

Reimplemented from gui2::tscrollbar_container.

Definition at line 39 of file scroll_label.hpp.


Member Data Documentation

Current state of the widget.

The state of the widget determines what to render and how the widget reacts to certain 'events'.

Reimplemented from gui2::tscrollbar_container.

Definition at line 77 of file scroll_label.hpp.

Referenced by get_active(), get_state(), and set_self_active().


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