2 * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
3 * Copyright (C) 2009-2012 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #ifndef __gtk_ardour_editor_route_groups_h__
22 #define __gtk_ardour_editor_route_groups_h__
24 #include <gtkmm/liststore.h>
25 #include <gtkmm/scrolledwindow.h>
26 #include <gtkmm/treemodel.h>
27 #include <gtkmm/treeview.h>
29 #include "editor_component.h"
31 class EditorRouteGroups : public EditorComponent, public ARDOUR::SessionHandlePtr
34 EditorRouteGroups (Editor *);
36 void set_session (ARDOUR::Session *);
38 Gtk::Widget& widget () {
39 return _display_packer;
46 struct Columns : public Gtk::TreeModel::ColumnRecord {
64 Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
65 Gtk::TreeModelColumn<std::string> text;
66 Gtk::TreeModelColumn<bool> is_visible;
67 Gtk::TreeModelColumn<bool> gain;
68 Gtk::TreeModelColumn<bool> gain_relative;
69 Gtk::TreeModelColumn<bool> mute;
70 Gtk::TreeModelColumn<bool> solo;
71 Gtk::TreeModelColumn<bool> record;
72 Gtk::TreeModelColumn<bool> monitoring;
73 Gtk::TreeModelColumn<bool> select;
74 Gtk::TreeModelColumn<bool> active_shared;
75 Gtk::TreeModelColumn<bool> active_state;
76 Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
81 void add (ARDOUR::RouteGroup *);
82 void row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
83 void name_edit (const std::string&, const std::string&);
84 void button_clicked ();
85 bool button_press_event (GdkEventButton* ev);
86 void groups_changed ();
87 void property_changed (ARDOUR::RouteGroup*, const PBD::PropertyChange &);
88 void remove_selected ();
89 void run_new_group_dialog ();
90 void row_deleted (Gtk::TreeModel::Path const &);
92 Glib::RefPtr<Gtk::ListStore> _model;
93 Glib::RefPtr<Gtk::TreeSelection> _selection;
94 Gtk::TreeView _display;
95 Gtk::ScrolledWindow _scroller;
96 Gtk::VBox _display_packer;
99 PBD::ScopedConnectionList _property_changed_connections;
100 PBD::ScopedConnection all_route_groups_changed_connection;
101 Gtk::ColorSelectionDialog color_dialog;
104 #endif // __gtk_ardour_editor_route_groups_h__