2 Copyright (C) 2000-2009 Paul Davis
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.
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.
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.
20 #ifndef __gtk_ardour_editor_route_groups_h__
21 #define __gtk_ardour_editor_route_groups_h__
23 #include <gtkmm/liststore.h>
24 #include <gtkmm/scrolledwindow.h>
25 #include <gtkmm/treemodel.h>
26 #include <gtkmm/treeview.h>
28 #include "editor_component.h"
30 class EditorRouteGroups : public EditorComponent, public ARDOUR::SessionHandlePtr
33 EditorRouteGroups (Editor *);
35 void set_session (ARDOUR::Session *);
37 Gtk::Widget& widget () {
38 return _display_packer;
45 struct Columns : public Gtk::TreeModel::ColumnRecord {
63 Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
64 Gtk::TreeModelColumn<std::string> text;
65 Gtk::TreeModelColumn<bool> is_visible;
66 Gtk::TreeModelColumn<bool> gain;
67 Gtk::TreeModelColumn<bool> gain_relative;
68 Gtk::TreeModelColumn<bool> mute;
69 Gtk::TreeModelColumn<bool> solo;
70 Gtk::TreeModelColumn<bool> record;
71 Gtk::TreeModelColumn<bool> monitoring;
72 Gtk::TreeModelColumn<bool> select;
73 Gtk::TreeModelColumn<bool> active_shared;
74 Gtk::TreeModelColumn<bool> active_state;
75 Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
80 void add (ARDOUR::RouteGroup *);
81 void row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
82 void name_edit (const std::string&, const std::string&);
83 void button_clicked ();
84 bool button_press_event (GdkEventButton* ev);
85 void groups_changed ();
86 void property_changed (ARDOUR::RouteGroup*, const PBD::PropertyChange &);
87 void remove_selected ();
88 void run_new_group_dialog ();
89 void row_deleted (Gtk::TreeModel::Path const &);
91 Glib::RefPtr<Gtk::ListStore> _model;
92 Glib::RefPtr<Gtk::TreeSelection> _selection;
93 Gtk::TreeView _display;
94 Gtk::ScrolledWindow _scroller;
95 Gtk::VBox _display_packer;
98 PBD::ScopedConnectionList _property_changed_connections;
99 PBD::ScopedConnection all_route_groups_changed_connection;
100 Gtk::ColorSelectionDialog color_dialog;
103 #endif // __gtk_ardour_editor_route_groups_h__