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

#include <game_load.hpp>

Inheritance diagram for gui2::tgame_load:
Inheritance graph

Public Member Functions

 tgame_load (const config &cache_config)
 
const std::stringfilename () const
 
bool change_difficulty () const
 
bool show_replay () const
 
bool cancel_orders () const
 
const configsummary ()
 
- Public Member Functions inherited from gui2::tdialog
 tdialog ()
 
virtual ~tdialog ()
 
bool show (CVideo &video, const unsigned auto_close_time=0)
 Shows the window. More...
 
int get_retval () const
 
void set_always_save_fields (const bool always_save_fields)
 
void set_restore (const bool restore)
 

Protected Member Functions

void pre_show (twindow &window)
 Inherited from tdialog. More...
 
void post_show (twindow &window)
 Inherited from tdialog. More...
 
- Protected Member Functions inherited from gui2::tdialog
tfield_boolregister_bool (const std::string &id, const bool mandatory, const std::function< bool()> &callback_load_value=std::function< bool()>(), const std::function< void(const bool)> &callback_save_value=std::function< void(const bool)>(), const std::function< void(twidget &)> &callback_change=std::function< void(twidget &)>())
 Creates a new boolean field. More...
 
tfield_boolregister_bool (const std::string &id, const bool mandatory, bool &linked_variable, const std::function< void(twidget &)> &callback_change=std::function< void(twidget &)>())
 Creates a new boolean field. More...
 
tfield_integerregister_integer (const std::string &id, const bool mandatory, const std::function< int()> &callback_load_value=std::function< int()>(), const std::function< void(const int)> &callback_save_value=std::function< void(const int)>())
 Creates a new integer field. More...
 
tfield_integerregister_integer (const std::string &id, const bool mandatory, int &linked_variable)
 Creates a new integer field. More...
 
tfield_textregister_text (const std::string &id, const bool mandatory, const std::function< std::string()> &callback_load_value=std::function< std::string()>(), const std::function< void(const std::string &)> &callback_save_value=std::function< void(const std::string &)>(), const bool capture_focus=false)
 Creates a new text field. More...
 
tfield_textregister_text (const std::string &id, const bool mandatory, std::string &linked_variable, const bool capture_focus=false)
 Creates a new text field. More...
 
tfield_labelregister_label (const std::string &id, const bool mandatory, const std::string &text, const bool use_markup=false)
 Registers a new control as a label. More...
 
tfield_labelregister_image (const std::string &id, const bool mandatory, const std::string &filename)
 Registers a new control as image. More...
 

Private Member Functions

virtual const std::stringwindow_id () const
 Inherited from tdialog, implemented by REGISTER_DIALOG. More...
 
void filter_text_changed (ttext_ *textbox, const std::string &text)
 
void list_item_clicked (twindow &window)
 
void delete_button_callback (twindow &window)
 
void display_savegame (twindow &window)
 
void evaluate_summary_string (std::stringstream &str, const config &cfg_summary)
 
bool compare_name (unsigned i1, unsigned i2) const
 
bool compare_date (unsigned i1, unsigned i2) const
 
bool compare_name_rev (unsigned i1, unsigned i2) const
 
bool compare_date_rev (unsigned i1, unsigned i2) const
 
void fill_game_list (twindow &window, std::vector< savegame::save_info > &games)
 

Private Attributes

tfield_texttxtFilter_
 
tfield_boolchk_change_difficulty_
 
tfield_boolchk_show_replay_
 
tfield_boolchk_cancel_orders_
 
std::string filename_
 
bool change_difficulty_
 
bool show_replay_
 
bool cancel_orders_
 
std::vector< savegame::save_infogames_
 
const configcache_config_
 
std::vector< std::stringlast_words_
 
config summary_
 

Detailed Description

Definition at line 28 of file game_load.hpp.

Constructor & Destructor Documentation

gui2::tgame_load::tgame_load ( const config cache_config)
explicit

Definition at line 91 of file game_load.cpp.

Member Function Documentation

bool gui2::tgame_load::cancel_orders ( ) const
inline

Definition at line 45 of file game_load.hpp.

References cancel_orders_.

Referenced by savegame::loadgame::show_dialog().

bool gui2::tgame_load::change_difficulty ( ) const
inline

Definition at line 37 of file game_load.hpp.

References change_difficulty_.

Referenced by savegame::loadgame::show_dialog().

bool gui2::tgame_load::compare_date ( unsigned  i1,
unsigned  i2 
) const
private

Definition at line 153 of file game_load.cpp.

References games_.

Referenced by fill_game_list().

bool gui2::tgame_load::compare_date_rev ( unsigned  i1,
unsigned  i2 
) const
private

Definition at line 163 of file game_load.cpp.

References games_.

Referenced by fill_game_list().

bool gui2::tgame_load::compare_name ( unsigned  i1,
unsigned  i2 
) const
private

Definition at line 148 of file game_load.cpp.

References games_.

Referenced by fill_game_list().

bool gui2::tgame_load::compare_name_rev ( unsigned  i1,
unsigned  i2 
) const
private

Definition at line 158 of file game_load.cpp.

References games_.

Referenced by fill_game_list().

void gui2::tgame_load::delete_button_callback ( twindow window)
private
void gui2::tgame_load::display_savegame ( twindow window)
private
void gui2::tgame_load::evaluate_summary_string ( std::stringstream &  str,
const config cfg_summary 
)
private
const std::string& gui2::tgame_load::filename ( ) const
inline

Definition at line 33 of file game_load.hpp.

References filename_.

Referenced by savegame::loadgame::show_dialog().

void gui2::tgame_load::fill_game_list ( twindow window,
std::vector< savegame::save_info > &  games 
)
private
void gui2::tgame_load::filter_text_changed ( ttext_ textbox,
const std::string text 
)
private
void gui2::tgame_load::list_item_clicked ( twindow window)
private

Definition at line 198 of file game_load.cpp.

References display_savegame().

Referenced by pre_show().

void gui2::tgame_load::post_show ( twindow window)
protectedvirtual
void gui2::tgame_load::pre_show ( twindow window)
protectedvirtual
bool gui2::tgame_load::show_replay ( ) const
inline

Definition at line 41 of file game_load.hpp.

References show_replay_.

Referenced by savegame::loadgame::show_dialog().

const config& gui2::tgame_load::summary ( )
inline

Definition at line 49 of file game_load.hpp.

References summary_.

Referenced by display_savegame(), and savegame::loadgame::show_dialog().

virtual const std::string& gui2::tgame_load::window_id ( ) const
privatevirtual

Inherited from tdialog, implemented by REGISTER_DIALOG.

Implements gui2::tdialog.

Member Data Documentation

const config& gui2::tgame_load::cache_config_
private

Definition at line 92 of file game_load.hpp.

Referenced by evaluate_summary_string(), and pre_show().

bool gui2::tgame_load::cancel_orders_
private

Definition at line 89 of file game_load.hpp.

Referenced by cancel_orders(), and post_show().

bool gui2::tgame_load::change_difficulty_
private

Definition at line 87 of file game_load.hpp.

Referenced by change_difficulty(), and post_show().

tfield_bool* gui2::tgame_load::chk_cancel_orders_
private

Definition at line 84 of file game_load.hpp.

Referenced by post_show().

tfield_bool* gui2::tgame_load::chk_change_difficulty_
private

Definition at line 82 of file game_load.hpp.

Referenced by post_show().

tfield_bool* gui2::tgame_load::chk_show_replay_
private

Definition at line 83 of file game_load.hpp.

Referenced by post_show().

std::string gui2::tgame_load::filename_
private

Definition at line 86 of file game_load.hpp.

Referenced by display_savegame(), and filename().

std::vector<savegame::save_info> gui2::tgame_load::games_
private
std::vector<std::string> gui2::tgame_load::last_words_
private

Definition at line 94 of file game_load.hpp.

Referenced by filter_text_changed().

bool gui2::tgame_load::show_replay_
private

Definition at line 88 of file game_load.hpp.

Referenced by post_show(), and show_replay().

config gui2::tgame_load::summary_
private

Definition at line 96 of file game_load.hpp.

Referenced by post_show(), and summary().

tfield_text* gui2::tgame_load::txtFilter_
private

Definition at line 81 of file game_load.hpp.

Referenced by pre_show().


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