1 // Copyright (C) 2007, 2008, 2009 Ben Asselstine
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.
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.
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
18 #ifndef FIGHT_ORDER_DIALOG_H
19 #define FIGHT_ORDER_DIALOG_H
22 #include <sigc++/trackable.h>
23 #include <sigc++/signal.h>
30 #include "decorated.h"
32 // dialog for showing and changing the order in which army types fight
34 class FightOrderDialog: public Decorated
37 FightOrderDialog(Player *player);
40 void set_parent_window(Gtk::Window &parent);
50 Gtk::TreeView *armies_treeview;
51 Gtk::Button *reverse_button;
53 class ArmiesColumns: public Gtk::TreeModelColumnRecord {
56 { add(image); add(name); add(army_type);}
58 Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > image;
59 Gtk::TreeModelColumn<Glib::ustring> name;
60 Gtk::TreeModelColumn<guint32> army_type;
62 const ArmiesColumns armies_columns;
63 Glib::RefPtr<Gtk::ListStore> armies_list;
65 void addArmyType(guint32 army_type);
66 void on_reverse_button_clicked();