1 // Copyright (C) 2007 Ole Laursen
2 // Copyright (C) 2007, 2008, 2009 Ben Asselstine
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.
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.
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
24 #include <sigc++/trackable.h>
26 #include "vectormap.h"
27 #include "army-info-tip.h"
31 #include "decorated.h"
32 // dialog for displaying a friendly city
33 class CityWindow: public Decorated
36 CityWindow(City *city, bool razing_possible, bool see_opponents_production);
40 void set_parent_window(Gtk::Window &parent);
45 static bool on_raze_clicked (City *city, Gtk::Dialog *parent);
50 ArmyInfoTip* army_info_tip;
51 Gtk::Image *map_image;
52 Gtk::Label *city_label;
53 Gtk::Label *status_label;
54 Gtk::Label *production_info_label1;
55 Gtk::Label *production_info_label2;
56 Gtk::Button *buy_button;
57 Gtk::Button *on_hold_button;
58 Gtk::Button *rename_button;
59 Gtk::Button *destination_button;
60 Gtk::Button *raze_button;
61 Gtk::Label *turns_left_label;
62 Gtk::Image *current_image;
63 Gtk::Label *current_label;
67 bool d_razing_possible;
71 Gtk::Box *production_toggles_hbox;
72 std::vector<Gtk::ToggleButton *> production_toggles;
75 void fill_in_city_info();
76 void fill_in_production_toggles();
77 void fill_in_production_info();
79 void on_production_toggled(Gtk::ToggleButton *toggle);
80 bool on_production_button_event(GdkEventButton *e, Gtk::ToggleButton *toggle);
81 void on_on_hold_clicked();
82 void on_buy_clicked();
83 void on_destination_clicked();
84 void on_map_changed(Glib::RefPtr<Gdk::Pixmap> map);
85 bool on_map_mouse_button_event(GdkEventButton *e);
86 void on_rename_clicked ();
87 void on_raze_clicked ();