The Battle for Wesnoth  1.15.1+dev
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
gui2::dialogs::game_version Class Reference

#include <game_version_dialog.hpp>

Inheritance diagram for gui2::dialogs::game_version:
Inheritance graph

Public Member Functions

 game_version ()
 Constructor. More...
 
- Public Member Functions inherited from gui2::dialogs::modal_dialog
 modal_dialog ()
 
virtual ~modal_dialog ()
 
bool show (const unsigned auto_close_time=0)
 Shows the window. More...
 
windowget_window () const
 Returns a pointer to the dialog's window. More...
 
int get_retval () const
 
void set_always_save_fields (const bool always_save_fields)
 
void set_restore (const bool restore)
 
void set_allow_plugin_skip (const bool allow_plugin_skip)
 
void set_show_even_without_video (const bool show_even_without_video)
 

Private Types

typedef std::array< std::string, 4 > deplist_entry
 

Private Member Functions

void generate_plain_text_report ()
 
virtual const std::string & window_id () const override
 Inherited from modal_dialog, implemented by REGISTER_DIALOG. More...
 
virtual void pre_show (window &window) override
 Inherited from modal_dialog. More...
 
void tab_switch_callback (window &window)
 Callback function called when switching tabs. More...
 
void report_copy_callback ()
 Callback function for the dialog-wide copy-to-clipboard button. More...
 
void copy_to_clipboard_callback (const std::string &path)
 Callback function for copy-to-clipboard action buttons. More...
 
void browse_directory_callback (const std::string &path)
 Callback function for browse-directory action buttons. More...
 

Private Attributes

const std::string path_wid_stem_
 The display function. More...
 
const std::string copy_wid_stem_
 
const std::string browse_wid_stem_
 
std::map< std::string, std::string > path_map_
 
std::vector< deplist_entrydeps_
 
std::vector< game_config::optional_featureopts_
 
std::string report_
 

Additional Inherited Members

- Protected Member Functions inherited from gui2::dialogs::modal_dialog
field_boolregister_bool (const std::string &id, const bool mandatory, const std::function< bool()> callback_load_value=nullptr, const std::function< void(bool)> callback_save_value=nullptr, const std::function< void(widget &)> callback_change=nullptr, const bool initial_fire=false)
 Creates a new boolean field. More...
 
field_boolregister_bool (const std::string &id, const bool mandatory, bool &linked_variable, const std::function< void(widget &)> callback_change=nullptr, const bool initial_fire=false)
 Creates a new boolean field. More...
 
field_integerregister_integer (const std::string &id, const bool mandatory, const std::function< int()> callback_load_value=nullptr, const std::function< void(int)> callback_save_value=nullptr)
 Creates a new integer field. More...
 
field_integerregister_integer (const std::string &id, const bool mandatory, int &linked_variable)
 Creates a new integer field. More...
 
field_textregister_text (const std::string &id, const bool mandatory, const std::function< std::string()> callback_load_value=nullptr, const std::function< void(const std::string &)> callback_save_value=nullptr, const bool capture_focus=false)
 Creates a new text field. More...
 
field_textregister_text (const std::string &id, const bool mandatory, std::string &linked_variable, const bool capture_focus=false)
 Creates a new text field. More...
 
field_labelregister_label (const std::string &id, const bool mandatory, const std::string &text, const bool use_markup=false)
 Registers a new styled_widget as a label. More...
 
field_labelregister_image (const std::string &id, const bool mandatory, const std::string &filename)
 Registers a new styled_widget as image. More...
 
- Protected Attributes inherited from gui2::dialogs::modal_dialog
std::unique_ptr< windowwindow_
 The window object build for this dialog. More...
 

Detailed Description

Definition at line 32 of file game_version_dialog.hpp.

Member Typedef Documentation

◆ deplist_entry

typedef std::array<std::string, 4> gui2::dialogs::game_version::deplist_entry
private

Definition at line 58 of file game_version_dialog.hpp.

Constructor & Destructor Documentation

◆ game_version()

gui2::dialogs::game_version::game_version ( )

Member Function Documentation

◆ browse_directory_callback()

void gui2::dialogs::game_version::browse_directory_callback ( const std::string &  path)
private

Callback function for browse-directory action buttons.

Parameters
pathFilesystem path associated with the widget.

Definition at line 285 of file game_version_dialog.cpp.

References desktop::open_object().

Referenced by pre_show().

◆ copy_to_clipboard_callback()

void gui2::dialogs::game_version::copy_to_clipboard_callback ( const std::string &  path)
private

Callback function for copy-to-clipboard action buttons.

Parameters
pathFilesystem path associated with the widget.

Definition at line 290 of file game_version_dialog.cpp.

References desktop::clipboard::copy_to_clipboard().

Referenced by pre_show().

◆ generate_plain_text_report()

void gui2::dialogs::game_version::generate_plain_text_report ( )
private

Definition at line 300 of file game_version_dialog.cpp.

References game_config::full_build_report(), and report_.

◆ pre_show()

void gui2::dialogs::game_version::pre_show ( window window)
overrideprivatevirtual

◆ report_copy_callback()

void gui2::dialogs::game_version::report_copy_callback ( )
private

Callback function for the dialog-wide copy-to-clipboard button.

Definition at line 295 of file game_version_dialog.cpp.

References desktop::clipboard::copy_to_clipboard(), and report_.

Referenced by pre_show().

◆ tab_switch_callback()

void gui2::dialogs::game_version::tab_switch_callback ( window window)
private

Callback function called when switching tabs.

Definition at line 275 of file game_version_dialog.cpp.

References gui2::stacked_widget::select_layer().

Referenced by pre_show().

◆ window_id()

virtual const std::string& gui2::dialogs::game_version::window_id ( ) const
overrideprivatevirtual

Inherited from modal_dialog, implemented by REGISTER_DIALOG.

Implements gui2::dialogs::modal_dialog.

Member Data Documentation

◆ browse_wid_stem_

const std::string gui2::dialogs::game_version::browse_wid_stem_
private

Definition at line 50 of file game_version_dialog.hpp.

Referenced by pre_show().

◆ copy_wid_stem_

const std::string gui2::dialogs::game_version::copy_wid_stem_
private

Definition at line 49 of file game_version_dialog.hpp.

Referenced by pre_show().

◆ deps_

std::vector<deplist_entry> gui2::dialogs::game_version::deps_
private

Definition at line 59 of file game_version_dialog.hpp.

Referenced by pre_show().

◆ opts_

std::vector<game_config::optional_feature> gui2::dialogs::game_version::opts_
private

Definition at line 61 of file game_version_dialog.hpp.

Referenced by pre_show().

◆ path_map_

std::map<std::string, std::string> gui2::dialogs::game_version::path_map_
private

Definition at line 52 of file game_version_dialog.hpp.

Referenced by pre_show().

◆ path_wid_stem_

const std::string gui2::dialogs::game_version::path_wid_stem_
private

The display function.

See modal_dialog for more information.

Definition at line 48 of file game_version_dialog.hpp.

Referenced by pre_show().

◆ report_

std::string gui2::dialogs::game_version::report_
private

Definition at line 63 of file game_version_dialog.hpp.

Referenced by generate_plain_text_report(), and report_copy_callback().


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