The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
campaign_selection.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2009 - 2016 by Mark de Wever <[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_CAMPAIGN_SELECTION_HPP_INCLUDED
16 #define GUI_DIALOGS_CAMPAIGN_SELECTION_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
21 
22 namespace gui2
23 {
24 
26 {
27 public:
29  engine_(eng),
30  choice_(-1),
31  deterministic_(false)
32  {
33  set_restore(true);
34  }
35 
36  /***** ***** ***** setters / getters for members ***** ****** *****/
37 
38  int get_choice() const
39  {
40  return choice_;
41  }
42 
43  bool get_deterministic() const
44  {
45  return deterministic_;
46  }
47 
48 private:
49  /** Called when another campaign is selected. */
50  void campaign_selected(twindow& window);
51 
52  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
53  virtual const std::string& window_id() const;
54 
55  void show_settings(CVideo& video);
56 
57  /** Inherited from tdialog. */
58  void pre_show(twindow& window);
59 
60  /** Inherited from tdialog. */
61  void post_show(twindow& window);
62 
63 
64  void mod_toggled(int id, twidget &);
65 
67 
68  /** The chosen campaign. */
69  int choice_;
70 
71  /** whether the player checked the "Deterministic" checkbox. */
73 };
74 
75 } // namespace gui2
76 
77 #endif
Definition: video.hpp:58
int choice_
The chosen campaign.
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
bool deterministic_
whether the player checked the "Deterministic" checkbox.
void pre_show(twindow &window)
Inherited from tdialog.
Abstract base class for all dialogs.
Definition: dialog.hpp:121
void set_restore(const bool restore)
Definition: dialog.hpp:171
void post_show(twindow &window)
Inherited from tdialog.
void mod_toggled(int id, twidget &)
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
void show_settings(CVideo &video)
Base class for all widgets.
Definition: widget.hpp:49
GLsizei const GLcharARB ** string
Definition: glew.h:4503
void campaign_selected(twindow &window)
Called when another campaign is selected.
tcampaign_selection(ng::create_engine &eng)