The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
generate_map.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 - 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_EDITOR_GENERATE_MAP_HPP_INCLUDED
16 #define GUI_DIALOGS_EDITOR_GENERATE_MAP_HPP_INCLUDED
17 
18 #include "gui/dialogs/dialog.hpp"
19 #include <boost/optional/optional.hpp>
20 #include <boost/cstdint.hpp>
21 
22 class map_generator;
23 class display;
24 
25 namespace gui2
26 {
27 
28 class tlabel;
29 class ttext_box;
30 
31 /** The dialog for selecting which random generator to use in the editor. */
33 {
34 public:
36 
37  void set_map_generators(std::vector<map_generator*> mg)
38  {
39  map_generators_ = mg;
40  }
41 
42  std::vector<map_generator*> get_map_generators()
43  {
44  return map_generators_;
45  }
46 
48 
50 
51  boost::optional<boost::uint32_t> get_seed();
52 
53 private:
54  /** Inherited from tdialog, implemented by REGISTER_DIALOG. */
55  virtual const std::string& window_id() const;
56 
57  /** Inherited from tdialog. */
58  void pre_show(twindow& window);
59 
60  /** Callback for generator list selection changes. */
61  void do_generator_selected(twindow& window);
62 
63  /** Callback for the generator settings button. */
64  void do_settings(twindow& window);
65 
66  /** Available map generators */
67  std::vector<map_generator*> map_generators_;
68 
69  /** Last used map generator, must be in map_generators_ */
71 
72  /** Current map generator index */
74 
75  /** random seed integer input*/
77 };
78 
79 } // namespace gui2
80 
81 #endif
map_generator * get_selected_map_generator()
void set_map_generators(std::vector< map_generator * > mg)
std::string random_seed_
random seed integer input
void do_settings(twindow &window)
Callback for the generator settings button.
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
void do_generator_selected(twindow &window)
Callback for generator list selection changes.
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 select_map_generator(map_generator *mg)
The dialog for selecting which random generator to use in the editor.
std::vector< map_generator * > map_generators_
Available map generators.
std::vector< map_generator * > get_map_generators()
void pre_show(twindow &window)
Inherited from tdialog.
boost::optional< boost::uint32_t > get_seed()
map_generator * last_map_generator_
Last used map generator, must be in map_generators_.
GLsizei const GLcharARB ** string
Definition: glew.h:4503
int current_map_generator_
Current map generator index.