Remove unused sources & includes
[ardour.git] / gtk2_ardour / editor_route_groups.h
1 /*
2     Copyright (C) 2000-2009 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 __gtk_ardour_editor_route_groups_h__
21 #define __gtk_ardour_editor_route_groups_h__
22
23 #include "editor_component.h"
24
25 class EditorRouteGroups : public EditorComponent, public ARDOUR::SessionHandlePtr
26 {
27 public:
28         EditorRouteGroups (Editor *);
29
30         void set_session (ARDOUR::Session *);
31
32         Gtk::Widget& widget () {
33                 return _display_packer;
34         }
35
36         void clear ();
37
38 private:
39
40         struct Columns : public Gtk::TreeModel::ColumnRecord {
41
42                 Columns () {
43                         add (gdkcolor);
44                         add (text);
45                         add (is_visible);
46                         add (gain);
47                         add (gain_relative);
48                         add (mute);
49                         add (solo);
50                         add (record);
51                         add (monitoring);
52                         add (select);
53                         add (active_shared);
54                         add (active_state);
55                         add (routegroup);
56                 }
57
58                 Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
59                 Gtk::TreeModelColumn<std::string> text;
60                 Gtk::TreeModelColumn<bool> is_visible;
61                 Gtk::TreeModelColumn<bool> gain;
62                 Gtk::TreeModelColumn<bool> gain_relative;
63                 Gtk::TreeModelColumn<bool> mute;
64                 Gtk::TreeModelColumn<bool> solo;
65                 Gtk::TreeModelColumn<bool> record;
66                 Gtk::TreeModelColumn<bool> monitoring;
67                 Gtk::TreeModelColumn<bool> select;
68                 Gtk::TreeModelColumn<bool> active_shared;
69                 Gtk::TreeModelColumn<bool> active_state;
70                 Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
71         };
72
73         Columns _columns;
74
75         void add (ARDOUR::RouteGroup *);
76         void row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
77         void name_edit (const std::string&, const std::string&);
78         void button_clicked ();
79         bool button_press_event (GdkEventButton* ev);
80         void groups_changed ();
81         void property_changed (ARDOUR::RouteGroup*, const PBD::PropertyChange &);
82         void remove_selected ();
83         void run_new_group_dialog ();
84         void row_deleted (Gtk::TreeModel::Path const &);
85
86         Glib::RefPtr<Gtk::ListStore> _model;
87         Glib::RefPtr<Gtk::TreeSelection> _selection;
88         Gtk::TreeView _display;
89         Gtk::ScrolledWindow _scroller;
90         Gtk::VBox _display_packer;
91         bool _in_row_change;
92         bool _in_rebuild;
93         PBD::ScopedConnectionList _property_changed_connections;
94         PBD::ScopedConnection all_route_groups_changed_connection;
95         Gtk::ColorSelectionDialog color_dialog;
96 };
97
98 #endif // __gtk_ardour_editor_route_groups_h__