first pass at moving color theme management into its own preferences tab
[ardour.git] / gtk2_ardour / theme_manager.h
1 /*
2     Copyright (C) 2000-2007 Paul Davis
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 2 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 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., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 */
19
20 #ifndef __ardour_gtk_theme_manager_h__
21 #define __ardour_gtk_theme_manager_h__
22
23 #include <gtkmm/treeview.h>
24 #include <gtkmm/treestore.h>
25 #include <gtkmm/scrolledwindow.h>
26 #include <gtkmm/radiobutton.h>
27 #include <gtkmm/button.h>
28 #include <gtkmm/scale.h>
29 #include <gtkmm/rc.h>
30
31 #include "ui_config.h"
32
33 class ArdourDialog;
34
35 class ThemeManager : public Gtk::VBox
36 {
37   public:
38         ThemeManager();
39
40         int save (std::string path);
41
42         void on_flat_buttons_toggled ();
43         void on_blink_rec_arm_toggled ();
44         void on_region_color_toggled ();
45         void on_show_clip_toggled ();
46         void on_waveform_gradient_depth_change ();
47         void on_timeline_item_gradient_depth_change ();
48         void on_all_dialogs_toggled ();
49         void on_transients_follow_front_toggled ();
50         void on_floating_monitor_section_toggled ();
51         void on_icon_set_changed ();
52         void on_color_theme_changed ();
53
54   private:
55         Gtk::Notebook notebook;
56
57         struct ColorThemeModelColumns : public Gtk::TreeModel::ColumnRecord {
58                 ColorThemeModelColumns() {
59                         add (name);
60                         add (path);
61                 }
62
63                 Gtk::TreeModelColumn<std::string>  name;
64                 Gtk::TreeModelColumn<std::string>  path;
65         };
66
67         ColorThemeModelColumns color_theme_columns;
68         Glib::RefPtr<Gtk::TreeStore> theme_list;
69
70         Gtk::ColorSelectionDialog color_dialog;
71         sigc::connection color_dialog_connection;
72
73         Gtk::CheckButton flat_buttons;
74         Gtk::CheckButton blink_rec_button;
75         Gtk::CheckButton region_color_button;
76         Gtk::CheckButton show_clipping_button;
77         Gtk::HScale waveform_gradient_depth;
78         Gtk::Label waveform_gradient_depth_label;
79         Gtk::HScale timeline_item_gradient_depth;
80         Gtk::Label timeline_item_gradient_depth_label;
81         Gtk::CheckButton all_dialogs;
82         Gtk::CheckButton transients_follow_front;
83         Gtk::CheckButton floating_monitor_section;
84         Gtk::CheckButton gradient_waveforms;
85         Gtk::Label icon_set_label;
86         Gtk::ComboBoxText icon_set_dropdown;
87         Gtk::Label color_theme_label;
88         Gtk::ComboBox color_theme_dropdown;
89
90
91         void colors_changed ();
92         void set_ui_to_state ();
93 };
94
95 #endif /* __ardour_gtk_theme_manager_h__ */