initial commit, lordsawar source, slightly modified
[lordsawar] / src / gui / destination-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 DESTINATION_DIALOG_H
20 #define DESTINATION_DIALOG_H
21
22 #include <memory>
23 #include <vector>
24 #include <sigc++/trackable.h>
25 #include <gtkmm.h>
26
27 #include "vectormap.h"
28
29 #include "decorated.h"
30
31 // dialog for choosing the destination of the production of a city
32 class DestinationDialog: public Decorated
33 {
34  public:
35     DestinationDialog(City *city, bool *see_all);
36     ~DestinationDialog();
37
38     void set_parent_window(Gtk::Window &parent);
39
40     void run();
41     void hide();
42     
43  private:
44     Gtk::Dialog* dialog;
45     VectorMap* vectormap;
46
47     Gtk::Image *map_image;
48     Gtk::ToggleButton *see_all_toggle;
49     Gtk::ToggleButton *vector_toggle;
50     Gtk::ToggleButton *change_toggle;
51     Gtk::Label *current_label;
52     Gtk::Image *current_image;
53     Gtk::Label *turns_label;
54     Gtk::Image *one_turn_away_image;
55     Gtk::Image *two_turns_away_image;
56     Gtk::Image *next_turn_1_image;
57     Gtk::Image *next_turn_2_image;
58     Gtk::Image *next_turn_3_image;
59     Gtk::Image *next_turn_4_image;
60     Gtk::Image *turn_after_1_image;
61     Gtk::Image *turn_after_2_image;
62     Gtk::Image *turn_after_3_image;
63     Gtk::Image *turn_after_4_image;
64     
65     City *city;
66     
67     void on_map_changed(Glib::RefPtr<Gdk::Pixmap> map);
68     bool on_map_mouse_button_event(GdkEventButton *e);
69     void on_see_all_toggled(Gtk::ToggleButton *toggle);
70     void on_vector_toggled(Gtk::ToggleButton *toggle);
71     void on_change_toggled(Gtk::ToggleButton *toggle);
72     void fill_in_vectoring_info();
73     bool *d_see_all;
74 };
75
76 #endif