gui::check_button Class Reference

A button with two additional states : checked and unchecked. More...

#include <gui_checkbutton.hpp>

Inheritance diagram for gui::check_button:
gui::button gui::frame gui::event_receiver gui::region gui::uiobject

List of all members.

Public Member Functions

 check_button (manager *pManager)
 Constructor.
virtual ~check_button ()
 Destructor.
virtual std::string serialize (const std::string &sTab) const
 Prints all relevant information about this widget in a string.
virtual void copy_from (uiobject *pObj)
 Copies an uiobject's parameters into this CheckButton (inheritance).
virtual void check ()
 Checks this button.
virtual void uncheck ()
 UnChecks this button.
virtual void disable ()
 Disables this CheckButton.
virtual void enable ()
 Enables this CheckButton.
virtual void release ()
 Releases this CheckButton.
bool is_checked ()
 Checks if this CheckButton is checked :).
textureget_checked_texture ()
 Returns this button's checked texture.
textureget_disabled_checked_texture ()
 Returns this button's disabled checked texture.
void set_checked_texture (texture *pTexture)
 Sets this button's checked texture.
void set_disabled_checked_texture (texture *pTexture)
 Sets this button's disabled checked texture.
virtual void create_glue ()
 Returns this widget's Lua glue.
virtual void parse_block (xml::block *pBlock)
 Parses data from an xml::block.

Static Public Member Functions

static void register_glue (utils::wptr< lua::state > pLua)
 Registers this widget to the provided lua::state.

Protected Member Functions

texturecreate_checked_texture_ ()
texturecreate_disabled_checked_texture_ ()

Protected Attributes

bool bChecked_
texturepCheckedTexture_
texturepDisabledCheckedTexture_

Detailed Description

A button with two additional states : checked and unchecked.

This widget works exactly like a classic Button, but is has two additional special textures for the check sign.

Definition at line 13 of file gui_checkbutton.hpp.


Constructor & Destructor Documentation

gui::check_button::check_button ( manager pManager  )  [explicit]

Constructor.

Definition at line 9 of file gui_checkbutton.cpp.

gui::check_button::~check_button (  )  [virtual]

Destructor.

Definition at line 15 of file gui_checkbutton.cpp.


Member Function Documentation

void gui::check_button::check (  )  [virtual]

Checks this button.

Definition at line 81 of file gui_checkbutton.cpp.

void gui::check_button::copy_from ( uiobject pObj  )  [virtual]

Copies an uiobject's parameters into this CheckButton (inheritance).

Parameters:
pObj The uiobject to copy

Reimplemented from gui::button.

Definition at line 24 of file gui_checkbutton.cpp.

texture * gui::check_button::create_checked_texture_ (  )  [protected]

Definition at line 197 of file gui_checkbutton.cpp.

texture * gui::check_button::create_disabled_checked_texture_ (  )  [protected]

Definition at line 210 of file gui_checkbutton.cpp.

void gui::check_button::create_glue (  )  [virtual]

Returns this widget's Lua glue.

Reimplemented from gui::button.

Definition at line 177 of file gui_checkbutton.cpp.

void gui::check_button::disable (  )  [virtual]

Disables this CheckButton.

Note:
A disabled button doesn't receive any input.

Reimplemented from gui::button.

Definition at line 116 of file gui_checkbutton.cpp.

void gui::check_button::enable (  )  [virtual]

Enables this CheckButton.

Reimplemented from gui::button.

Definition at line 129 of file gui_checkbutton.cpp.

texture * gui::check_button::get_checked_texture (  ) 

Returns this button's checked texture.

Returns:
This button's checked texture

Definition at line 157 of file gui_checkbutton.cpp.

texture * gui::check_button::get_disabled_checked_texture (  ) 

Returns this button's disabled checked texture.

Returns:
This button's disabled checked texture

Definition at line 162 of file gui_checkbutton.cpp.

bool gui::check_button::is_checked (  ) 

Checks if this CheckButton is checked :).

Returns:
... well you get my point.

Definition at line 152 of file gui_checkbutton.cpp.

void gui::check_button::parse_block ( xml::block *  pBlock  )  [virtual]

Parses data from an xml::block.

Parameters:
pBlock The Checkbutton's xml::block

Reimplemented from gui::button.

Definition at line 8 of file gui_checkbutton_parser.cpp.

void gui::check_button::register_glue ( utils::wptr< lua::state >  pLua  )  [static]

Registers this widget to the provided lua::state.

Reimplemented from gui::button.

Definition at line 10 of file gui_checkbutton_glues.cpp.

void gui::check_button::release (  )  [virtual]

Releases this CheckButton.

Note:
This function only has a visual impact : the OnClick() handler is not called.

Reimplemented from gui::button.

Definition at line 142 of file gui_checkbutton.cpp.

std::string gui::check_button::serialize ( const std::string &  sTab  )  const [virtual]

Prints all relevant information about this widget in a string.

Parameters:
sTab The offset to give to all lines
Returns:
All relevant information about this widget

Reimplemented from gui::button.

Definition at line 19 of file gui_checkbutton.cpp.

void gui::check_button::set_checked_texture ( texture pTexture  ) 

Sets this button's checked texture.

Parameters:
pTexture The new texture

Definition at line 167 of file gui_checkbutton.cpp.

void gui::check_button::set_disabled_checked_texture ( texture pTexture  ) 

Sets this button's disabled checked texture.

Parameters:
pTexture The new texture

Definition at line 172 of file gui_checkbutton.cpp.

void gui::check_button::uncheck (  )  [virtual]

UnChecks this button.

Definition at line 102 of file gui_checkbutton.cpp.


Member Data Documentation

bool gui::check_button::bChecked_ [protected]

Definition at line 95 of file gui_checkbutton.hpp.

Definition at line 97 of file gui_checkbutton.hpp.

Definition at line 98 of file gui_checkbutton.hpp.


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

Generated on Tue Jan 1 21:58:12 2013 for gui by  doxygen 1.6.1