The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
uninstall_list.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 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_ADDON_UNINSTALL_LIST_HPP_INCLUDED
16 #define GUI_DIALOGS_ADDON_UNINSTALL_LIST_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
20 #include <map>
21 
22 namespace gui2
23 {
24 
26 {
27 public:
28  /**
29  * Constructor.
30  *
31  * @param addon_titles_map
32  * Internal id <-> user-visible title mappings for
33  * the add-ons to display.
34  */
36  const std::map<std::string, std::string>& addon_titles_map)
37  : titles_map_(addon_titles_map), ids_(), selections_()
38  {
39  }
40 
41  std::vector<std::string> selected_addons() const;
42 
43 private:
44  std::map<std::string, std::string> titles_map_;
45  std::vector<std::string> ids_;
46  std::map<std::string, bool> selections_;
47 
48  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
49  virtual const std::string& window_id() const;
50 
51  /** Inherited from tdialog. */
52  void pre_show(twindow& window);
53 
54  /** Inherited from tdialog. */
55  void post_show(twindow& window);
56 };
57 
58 } // namespace gui2
59 
60 #endif
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
std::vector< std::string > ids_
taddon_uninstall_list(const std::map< std::string, std::string > &addon_titles_map)
Constructor.
void post_show(twindow &window)
Inherited from tdialog.
base class of top level items, the only item which needs to store the final canvases to draw on ...
Definition: window.hpp:62
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
Abstract base class for all dialogs.
Definition: dialog.hpp:121
void pre_show(twindow &window)
Inherited from tdialog.
std::map< std::string, bool > selections_
GLsizei const GLcharARB ** string
Definition: glew.h:4503
std::vector< std::string > selected_addons() const
std::map< std::string, std::string > titles_map_