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

Public Types

typedef std::map< std::string,
std::map< std::string,
tcontrol_definition_ptr > > 
tcontrol_definition_map
 

Public Member Functions

 tgui_definition ()
 
const std::stringread (const config &cfg)
 
void activate () const
 Activates a gui. More...
 
void load_widget_definitions (const std::string &definition_type, const std::vector< tcontrol_definition_ptr > &definitions)
 

Public Attributes

std::string id
 
t_string description
 
tcontrol_definition_map control_definition
 
std::map< std::string,
twindow_definition
windows
 
std::map< std::string,
twindow_builder
window_types
 

Private Attributes

unsigned popup_show_delay_
 
unsigned popup_show_time_
 
unsigned help_show_time_
 
unsigned double_click_time_
 
unsigned repeat_button_repeat_time_
 
std::string sound_button_click_
 
std::string sound_toggle_button_click_
 
std::string sound_toggle_panel_click_
 
std::string sound_slider_adjust_
 
t_string has_helptip_message_
 
std::vector< ttiptips_
 

Detailed Description

Definition at line 98 of file settings.cpp.

Member Typedef Documentation

Definition at line 130 of file settings.cpp.

Constructor & Destructor Documentation

gui2::tgui_definition::tgui_definition ( )
inline

Definition at line 100 of file settings.cpp.

Member Function Documentation

void gui2::tgui_definition::activate ( ) const
void gui2::tgui_definition::load_widget_definitions ( const std::string definition_type,
const std::vector< tcontrol_definition_ptr > &  definitions 
)
const std::string & gui2::tgui_definition::read ( const config cfg)
Todo:
Regarding sounds: Need to evaluate but probably we want the widget definition be able to:
  • Override the default (and clear it). This will allow toggle buttons in a listbox to sound like a toggle panel.
  • Override the default and above per instance of the widget, some buttons can give a different sound.

Definition at line 336 of file settings.cpp.

References config::child(), config::child_range(), DBG_GUI_P, description, double_click_time_, t_string::empty(), has_helptip_message_, help_show_time_, id, itor, gui2::tips::load(), missing_mandatory_wml_key(), popup_show_delay_, popup_show_time_, gui2::registered_window_types(), gui2::registred_widget_type(), repeat_button_repeat_time_, sound_button_click_, sound_slider_adjust_, sound_toggle_button_click_, sound_toggle_panel_click_, tips_, VALIDATE, and window_types.

Member Data Documentation

tcontrol_definition_map gui2::tgui_definition::control_definition

Definition at line 132 of file settings.cpp.

Referenced by load_widget_definitions().

t_string gui2::tgui_definition::description

Definition at line 121 of file settings.cpp.

Referenced by read().

unsigned gui2::tgui_definition::double_click_time_
private

Definition at line 146 of file settings.cpp.

Referenced by activate(), and read().

t_string gui2::tgui_definition::has_helptip_message_
private

Definition at line 154 of file settings.cpp.

Referenced by activate(), and read().

unsigned gui2::tgui_definition::help_show_time_
private

Definition at line 145 of file settings.cpp.

Referenced by activate(), and read().

std::string gui2::tgui_definition::id

Definition at line 120 of file settings.cpp.

Referenced by read().

unsigned gui2::tgui_definition::popup_show_delay_
private

Definition at line 143 of file settings.cpp.

Referenced by activate(), and read().

unsigned gui2::tgui_definition::popup_show_time_
private

Definition at line 144 of file settings.cpp.

Referenced by activate(), and read().

unsigned gui2::tgui_definition::repeat_button_repeat_time_
private

Definition at line 147 of file settings.cpp.

Referenced by activate(), and read().

std::string gui2::tgui_definition::sound_button_click_
private

Definition at line 149 of file settings.cpp.

Referenced by activate(), and read().

std::string gui2::tgui_definition::sound_slider_adjust_
private

Definition at line 152 of file settings.cpp.

Referenced by activate(), and read().

std::string gui2::tgui_definition::sound_toggle_button_click_
private

Definition at line 150 of file settings.cpp.

Referenced by activate(), and read().

std::string gui2::tgui_definition::sound_toggle_panel_click_
private

Definition at line 151 of file settings.cpp.

Referenced by activate(), and read().

std::vector<ttip> gui2::tgui_definition::tips_
private

Definition at line 156 of file settings.cpp.

Referenced by activate(), and read().

std::map<std::string, twindow_builder> gui2::tgui_definition::window_types

Definition at line 136 of file settings.cpp.

Referenced by read().

std::map<std::string, twindow_definition> gui2::tgui_definition::windows

Definition at line 134 of file settings.cpp.


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