The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
gui2::tfield_bool Class Reference

Specialized field class for boolean. More...

#include <field.hpp>

Inheritance diagram for gui2::tfield_bool:
Inheritance graph

Public Member Functions

 tfield_bool (const std::string &id, const bool mandatory, const std::function< bool()> &callback_load_value, const std::function< void(const bool)> &callback_save_value, const std::function< void(twidget &)> &callback_change)
 
 tfield_bool (const std::string &id, const bool mandatory, bool &linked_variable, const std::function< void(twidget &)> &callback_change)
 
- Public Member Functions inherited from gui2::tfield< bool, tselectable_ >
 tfield (const std::string &id, const bool mandatory, const std::function< bool()> &callback_load_value, const std::function< void(CT)> &callback_save_value)
 Constructor. More...
 
 tfield (const std::string &id, const bool mandatory, bool &linked_variable)
 Constructor. More...
 
 tfield (const std::string &id, const bool mandatory, const bool &value)
 Constructor. More...
 
void widget_restore (twindow &window)
 Inherited from tfield_. More...
 
void set_widget_value (twindow &window, CT value)
 Sets the value of the field. More...
 
void set_cache_value (CT value)
 Sets the value of the field. More...
 
void widget_save (twindow &window)
 Inherited from tfield_. More...
 
bool get_widget_value (twindow &window)
 Gets the value of the field. More...
 
- Public Member Functions inherited from gui2::tfield_
 tfield_ (const std::string &id, const bool mandatory)
 Constructor. More...
 
virtual ~tfield_ ()
 
void attach_to_window (twindow &window)
 Attaches the field to a window. More...
 
void widget_init (twindow &window)
 Initializes the widget. More...
 
void widget_finalize (twindow &window)
 Finalizes the widget. More...
 
void detach_from_window ()
 Detaches the field from a window. More...
 
void widget_set_enabled (twindow &window, const bool enable, const bool sync)
 Enables a widget. More...
 
const std::stringid () const
 
bool is_mandatory () const
 
tcontrolwidget ()
 
const tcontrolwidget () const
 

Private Member Functions

void init_specialized (twindow &window)
 Overridden from tfield_. More...
 

Private Attributes

std::function< void(twidget &)> callback_change_
 

Detailed Description

Specialized field class for boolean.

Definition at line 547 of file field.hpp.

Constructor & Destructor Documentation

gui2::tfield_bool::tfield_bool ( const std::string id,
const bool  mandatory,
const std::function< bool()> &  callback_load_value,
const std::function< void(const bool)> &  callback_save_value,
const std::function< void(twidget &)> &  callback_change 
)
inline

Definition at line 550 of file field.hpp.

gui2::tfield_bool::tfield_bool ( const std::string id,
const bool  mandatory,
bool &  linked_variable,
const std::function< void(twidget &)> &  callback_change 
)
inline

Definition at line 561 of file field.hpp.

Member Function Documentation

void gui2::tfield_bool::init_specialized ( twindow window)
inlineprivatevirtual

Overridden from tfield_.

Reimplemented from gui2::tfield_.

Definition at line 572 of file field.hpp.

References gui2::twindow::find(), and gui2::tselectable_::set_callback_state_change().

Member Data Documentation

std::function<void(twidget&)> gui2::tfield_bool::callback_change_
private

Definition at line 584 of file field.hpp.


The documentation for this class was generated from the following file: