The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
game_version.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2013 - 2016 by Ignacio Riquelme Morelle <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef GUI_DIALOGS_GAME_VERSION_HPP_INCLUDED
16 #define GUI_DIALOGS_GAME_VERSION_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
20 #include "build_info.hpp"
21 
22 #include <map>
23 
24 #include <boost/array.hpp>
25 
26 namespace gui2
27 {
28 
29 #ifdef GUI2_EXPERIMENTAL_LISTBOX
30 class tlist;
31 #else
32 class tlistbox;
33 #endif
34 class tstacked_widget;
35 
36 class tgame_version : public tdialog
37 {
38 public:
39  /**
40  * Constructor.
41  */
42  tgame_version();
43 
44  /**
45  * The display function.
46  *
47  * See @ref tdialog for more information.
48  */
49  static void display(CVideo& video)
50  {
51  tgame_version().show(video);
52  }
53 
54 private:
58 
59  std::map<std::string, std::string> path_map_;
60 
61 #ifdef _WIN32
62  const std::string log_path_;
63 #endif
64 
65  typedef boost::array<std::string, 4> deplist_entry;
66  std::vector<deplist_entry> deps_;
67 
68  std::vector<game_config::optional_feature> opts_;
69 
71 
73 
74  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
75  virtual const std::string& window_id() const;
76 
77  /** Inherited from tdialog. */
78  void pre_show(twindow& window);
79 
80  //
81  // Widget event callbacks.
82  //
83 
84  /**
85  * Callback function called when switching tabs.
86  */
87  void tab_switch_callback(twindow& window);
88 
89  /**
90  * Callback function for the dialog-wide copy-to-clipboard button.
91  */
92  void report_copy_callback();
93 
94  /**
95  * Callback function for copy-to-clipboard action buttons.
96  *
97  * @param path Filesystem path associated with the widget.
98  */
100 
101  /**
102  * Callback function for browse-directory action buttons.
103  *
104  * @param path Filesystem path associated with the widget.
105  */
107 };
108 }
109 
110 #endif
void pre_show(twindow &window)
Inherited from tdialog.
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
Definition: video.hpp:58
void browse_directory_callback(const std::string &path)
Callback function for browse-directory action buttons.
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:62
void copy_to_clipboard_callback(const std::string &path)
Callback function for copy-to-clipboard action buttons.
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
const std::string copy_wid_stem_
GLsizei const char ** path
Definition: glew.h:4654
static void display(CVideo &video)
The display function.
Abstract base class for all dialogs.
Definition: dialog.hpp:121
const std::string path_wid_stem_
const std::string browse_wid_stem_
std::map< std::string, std::string > path_map_
std::vector< deplist_entry > deps_
boost::array< std::string, 4 > deplist_entry
std::vector< game_config::optional_feature > opts_
tgame_version()
Constructor.
void report_copy_callback()
Callback function for the dialog-wide copy-to-clipboard button.
void generate_plain_text_report()
void tab_switch_callback(twindow &window)
Callback function called when switching tabs.
GLsizei const GLcharARB ** string
Definition: glew.h:4503