The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
set_starting_position.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_EDITOR_SET_STARTING_POSITION_HPP_INCLUDED
16 #define GUI_DIALOGS_EDITOR_SET_STARTING_POSITION_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 
20 #include <vector>
21 
22 struct map_location;
23 
24 namespace gui2
25 {
26 
28 {
29 public:
31  unsigned current_player,
32  unsigned maximum_players,
33  const std::vector<map_location>& starting_positions);
34 
35  unsigned result() const
36  {
37  return selection_;
38  }
39 
40 private:
41  unsigned selection_;
42  std::vector<map_location> starting_positions_;
43 
44  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
45  virtual const std::string& window_id() const;
46 
47  /** Inherited from tdialog. */
48  void pre_show(twindow& window);
49 
50  /** Inherited from tdialog. */
51  void post_show(twindow& window);
52 };
53 }
54 
55 #endif /* ! GUI_DIALOGS_EDITOR_SET_STARTING_POSITION_HPP_INCLUDED */
void pre_show(twindow &window)
Inherited from tdialog.
teditor_set_starting_position(unsigned current_player, unsigned maximum_players, const std::vector< map_location > &starting_positions)
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 post_show(twindow &window)
Inherited from tdialog.
std::vector< map_location > starting_positions_
virtual const std::string & window_id() const
Inherited from tdialog, implemented by REGISTER_DIALOG.
Encapsulates the map of the game.
Definition: location.hpp:38
GLsizei const GLcharARB ** string
Definition: glew.h:4503