A button with two additional states : checked and unchecked. More...
#include <gui_checkbutton.hpp>
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 :). | |
texture * | get_checked_texture () |
Returns this button's checked texture. | |
texture * | get_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 | |
texture * | create_checked_texture_ () |
texture * | create_disabled_checked_texture_ () |
Protected Attributes | |
bool | bChecked_ |
texture * | pCheckedTexture_ |
texture * | pDisabledCheckedTexture_ |
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.
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.
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).
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.
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.
Definition at line 157 of file gui_checkbutton.cpp.
texture * gui::check_button::get_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 :).
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.
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.
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.
sTab | The offset to give to all lines |
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.
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.
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.
bool gui::check_button::bChecked_ [protected] |
Definition at line 95 of file gui_checkbutton.hpp.
texture* gui::check_button::pCheckedTexture_ [protected] |
Definition at line 97 of file gui_checkbutton.hpp.
texture* gui::check_button::pDisabledCheckedTexture_ [protected] |
Definition at line 98 of file gui_checkbutton.hpp.