initial commit, lordsawar source, slightly modified
[lordsawar] / src / editor / reward-editor-dialog.h
1 //  Copyright (C) 2008, 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 REWARD_EDITOR_DIALOG_H
19 #define REWARD_EDITOR_DIALOG_H
20
21 #include <memory>
22 #include <sigc++/trackable.h>
23 #include <gtkmm.h>
24
25 class Reward;
26 class Item;
27 class ArmyProto;
28 class Ruin;
29 class Player;
30
31 //! Scenario editor.  Edits rewards.
32 class RewardEditorDialog: public sigc::trackable
33 {
34  public:
35     RewardEditorDialog(Player *player, bool hidden_ruins, Reward *r);
36     ~RewardEditorDialog();
37
38     void set_parent_window(Gtk::Window &parent);
39
40     int run();
41
42     Reward *get_reward() {return reward;}
43     
44  private:
45     Gtk::Dialog* dialog;
46     Player *d_player;
47     Reward *reward;
48     Item *item;
49     ArmyProto *ally;
50     Ruin *hidden_ruin;
51     bool d_hidden_ruins;
52     Gtk::RadioButton *gold_radiobutton;
53     Gtk::RadioButton *item_radiobutton;
54     Gtk::RadioButton *allies_radiobutton;
55     Gtk::RadioButton *map_radiobutton;
56     Gtk::RadioButton *hidden_ruin_radiobutton;
57     Gtk::SpinButton *gold_spinbutton;
58     Gtk::Button *randomize_gold_button;
59     Gtk::Button *item_button;
60     Gtk::Button *clear_item_button;
61     Gtk::Button *randomize_item_button;
62     Gtk::Button *ally_button;
63     Gtk::Button *clear_ally_button;
64     Gtk::Button *randomize_allies_button;
65     Gtk::SpinButton *num_allies_spinbutton;
66     Gtk::SpinButton *map_x_spinbutton;
67     Gtk::SpinButton *map_y_spinbutton;
68     Gtk::SpinButton *map_width_spinbutton;
69     Gtk::SpinButton *map_height_spinbutton;
70     Gtk::Button *randomize_map_button;
71     Gtk::Button *randomize_hidden_ruin_button;
72     Gtk::Button *clear_hidden_ruin_button;
73     Gtk::Button *hidden_ruin_button;
74
75     Gtk::HBox *gold_hbox;
76     Gtk::HBox *item_hbox;
77     Gtk::HBox *allies_hbox;
78     Gtk::HBox *map_hbox;
79     Gtk::HBox *hidden_ruin_hbox;
80     void on_gold_toggled();
81     void on_item_toggled();
82     void on_allies_toggled();
83     void on_map_toggled();
84     void on_hidden_ruin_toggled();
85     void on_randomize_gold_clicked();
86     void on_item_clicked();
87     void on_clear_item_clicked();
88     void on_randomize_item_clicked();
89     void set_item_name();
90     void on_ally_clicked();
91     void on_randomize_allies_clicked();
92     void on_clear_ally_clicked();
93     void set_ally_name();
94     void on_randomize_map_clicked();
95     void on_hidden_ruin_clicked();
96     void on_randomize_hidden_ruin_clicked();
97     void on_clear_hidden_ruin_clicked();
98     void set_hidden_ruin_name();
99
100     void fill_in_reward_info();
101
102 };
103
104 #endif