initial commit, lordsawar source, slightly modified
[lordsawar] / src / gui / hero-offer-dialog.h
1 //  Copyright (C) 2007 Ole Laursen
2 //  Copyright (C) 2007, 2008, 2009 Ben Asselstine
3 //
4 //  This program is free software; you can redistribute it and/or modify
5 //  it under the terms of the GNU General Public License as published by
6 //  the Free Software Foundation; either version 3 of the License, or
7 //  (at your option) any later version.
8 //
9 //  This program is distributed in the hope that it will be useful,
10 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 //  GNU Library General Public License for more details.
13 //
14 //  You should have received a copy of the GNU General Public License
15 //  along with this program; if not, write to the Free Software
16 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
17 //  02110-1301, USA.
18
19 #ifndef HERO_OFFER_DIALOG_H
20 #define HERO_OFFER_DIALOG_H
21
22 #include <memory>
23 #include <vector>
24 #include <sigc++/trackable.h>
25 #include <gtkmm.h>
26
27 #include "heromap.h"
28 #include "player.h"
29 #include "hero.h"
30 #include "heroproto.h"
31
32 #include "decorated.h"
33
34 //! dialog for accepting/rejecting a hero
35 class HeroOfferDialog: public Decorated
36 {
37  public:
38     HeroOfferDialog(Player *player, HeroProto *hero, City *city, int gold);
39     ~HeroOfferDialog();
40
41     void set_parent_window(Gtk::Window &parent);
42
43     bool run();
44     void hide();
45     
46  private:
47     Gtk::Dialog* dialog;
48     //! The smallmap that shows where the Hero is emerging.
49     HeroMap* heromap;
50
51     Gtk::Image *map_image;
52     Gtk::Image *hero_image;
53     Gtk::RadioButton *male_radiobutton;
54     Gtk::Entry *name_entry;
55     
56     HeroProto *hero;
57     City *city;
58
59     void on_male_toggled();
60     void on_map_changed(Glib::RefPtr<Gdk::Pixmap> map);
61 };
62
63 #endif