The Battle for Wesnoth  1.19.0-dev
Public Member Functions | Private Member Functions | List of all members
gui2::field_text Class Reference

Specialized field class for text. More...

#include <field.hpp>

Inheritance diagram for gui2::field_text:

Public Member Functions

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

Private Member Functions

void finalize_specialized ()
 Overridden from field_base. More...
 

Detailed Description

Specialized field class for text.

Definition at line 536 of file field.hpp.

Constructor & Destructor Documentation

◆ field_text() [1/2]

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

Definition at line 539 of file field.hpp.

◆ field_text() [2/2]

gui2::field_text::field_text ( const std::string &  id,
const bool  mandatory,
std::string &  linked_variable 
)
inline

Definition at line 549 of file field.hpp.

Member Function Documentation

◆ finalize_specialized()

void gui2::field_text::finalize_specialized ( )
inlineprivatevirtual

Overridden from field_base.

Reimplemented from gui2::field_base.

Definition at line 559 of file field.hpp.

References gui2::field_base::get_widget().


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