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
19 #ifndef PREFERENCES_DIALOG_H
20 #define PREFERENCES_DIALOG_H
24 #include <sigc++/trackable.h>
25 #include <sigc++/signal.h>
30 #include "decorated.h"
33 // dialog for showing sound and game preferences
34 class PreferencesDialog: public Decorated
37 PreferencesDialog(bool readonly);
40 void set_parent_window(Gtk::Window &parent);
47 Gtk::CheckButton *commentator_checkbutton;
48 Gtk::Scale *speed_scale;
49 Gtk::CheckButton *play_music_checkbutton;
50 Gtk::Scale *music_volume_scale;
51 Gtk::Box *music_volume_hbox;
52 Gtk::VBox *players_vbox;
55 void on_show_commentator_toggled();
56 void on_play_music_toggled();
57 void on_music_volume_changed();
58 void on_speed_changed();
59 void on_observe_toggled(Gtk::CheckButton *button);
60 void on_type_changed(Gtk::ComboBoxText *combo);
62 typedef std::map<Player*, Gtk::ComboBoxText*> PlayerTypeMap;
63 PlayerTypeMap player_types;
65 typedef std::map<Player*, Gtk::CheckButton*> PlayerObserveMap;
66 PlayerObserveMap player_observed;