initial commit, lordsawar source, slightly modified
[lordsawar] / src / editor / switch-sets-dialog.h
1 //  Copyright (C) 2009 Ben Asselstine
2 //
3 //  This program is free software; you can redistribute it and/or modify
4 //  it under the terms of the GNU General Public License as published by
5 //  the Free Software Foundation; either version 3 of the License, or
6 //  (at your option) any later version.
7 //
8 //  This program is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 //  GNU Library General Public License for more details.
12 //
13 //  You should have received a copy of the GNU General Public License
14 //  along with this program; if not, write to the Free Software
15 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
16 //  02110-1301, USA.
17
18 #ifndef SWITCH_SETS_DIALOG_H
19 #define SWITCH_SETS_DIALOG_H
20
21 #include <memory>
22 #include <vector>
23 #include <sigc++/signal.h>
24 #include <gtkmm.h>
25
26 #include "Tile.h"
27 #include "game-parameters.h"
28
29 class Tileset;
30 class Armyset;
31 class Cityset;
32 class Shieldset;
33
34 //! Scenario editor.  Change the army/tile/city/shieldsets of the map.
35 class SwitchSetsDialog
36 {
37  public:
38     SwitchSetsDialog();
39     ~SwitchSetsDialog();
40
41     void set_parent_window(Gtk::Window &parent);
42
43     int run();
44
45     Tileset* get_selected_tileset() {return selected_tileset;};
46     Armyset* get_selected_armyset() {return selected_armyset;};
47     Cityset* get_selected_cityset() {return selected_cityset;};
48     Shieldset* get_selected_shieldset() {return selected_shieldset;};
49
50     
51  private:
52     Gtk::Dialog* dialog;
53
54     Gtk::ComboBoxText *tile_size_combobox;
55     Gtk::ComboBoxText *tile_theme_combobox;
56     Gtk::ComboBoxText *city_theme_combobox;
57     Gtk::ComboBoxText *army_theme_combobox;
58     Gtk::ComboBoxText *shield_theme_combobox;
59     Gtk::Button *accept_button;
60
61     guint32 get_active_tile_size();
62     void on_tile_size_changed();
63     Tileset* selected_tileset;
64     Shieldset* selected_shieldset;
65     Cityset* selected_cityset;
66     Armyset* selected_armyset;
67
68     void switchArmyset(Armyset *armyset);
69 };
70
71 #endif