The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
description.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 - 2016 by Ignacio R. 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_DESCRIPTION_HPP_INCLUDED
16 #define GUI_DIALOGS_ADDON_DESCRIPTION_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
20 #include "addon/info.hpp"
21 #include "addon/state.hpp"
22 
23 namespace gui2
24 {
25 
27 {
28 public:
29  /**
30  * Constructor.
31  *
32  * @param addon_id The requested add-on's id.
33  * @param addons_list Complete list of add-ons including the
34  * requested add-on and its dependencies.
35  * @param addon_states Local installation status of the add-ons in
36  * @a addons_list.
37  */
38  taddon_description(const std::string& addon_id,
39  const addons_list& addons_list,
40  const addons_tracking_list& addon_states);
41 
42  /**
43  * The display function.
44  *
45  * See @ref tdialog for more information.
46  */
47  static void display(const std::string& addon_id,
48  const addons_list& addons_list,
49  const addons_tracking_list& addon_states,
50  CVideo& video)
51  {
52  taddon_description(addon_id, addons_list, addon_states).show(video);
53  }
54 
55 private:
57 
58  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
59  virtual const std::string& window_id() const;
60 
61  /** Inherited from tdialog. */
62  void pre_show(twindow& window);
63 
64  void browse_url_callback();
65  void copy_url_callback();
66 };
67 }
68 
69 #endif
static void display(const std::string &addon_id, const addons_list &addons_list, const addons_tracking_list &addon_states, CVideo &video)
The display function.
Definition: description.hpp:47
Definition: video.hpp:58
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
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
std::map< std::string, addon_info > addons_list
Definition: info.hpp:26
void pre_show(twindow &window)
Inherited from tdialog.
std::map< std::string, addon_tracking_info > addons_tracking_list
Definition: state.hpp:62
GLsizei const GLcharARB ** string
Definition: glew.h:4503
taddon_description(const std::string &addon_id, const addons_list &addons_list, const addons_tracking_list &addon_states)
Constructor.