Re-order route group editor list columns to match up with the order in the route...
[ardour2.git] / gtk2_ardour / editor_route_groups.h
blobea3a7f2b852a4a85830bc2f76849d8cb45f58111
1 /*
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 #include "editor_component.h"
22 class EditorRouteGroups : public EditorComponent, public ARDOUR::SessionHandlePtr
24 public:
25 EditorRouteGroups (Editor *);
27 void set_session (ARDOUR::Session *);
29 Gtk::Widget& widget () {
30 return _display_packer;
33 void clear ();
34 Gtk::ToggleButton& all_group_active_button() { return _all_group_active_button; }
36 private:
38 struct Columns : public Gtk::TreeModel::ColumnRecord {
40 Columns () {
41 add (text);
42 add (gain);
43 add (gain_relative);
44 add (mute);
45 add (solo);
46 add (record);
47 add (select);
48 add (edits);
49 add (active_state);
50 add (is_visible);
51 add (routegroup);
54 Gtk::TreeModelColumn<std::string> text;
55 Gtk::TreeModelColumn<bool> gain;
56 Gtk::TreeModelColumn<bool> gain_relative;
57 Gtk::TreeModelColumn<bool> mute;
58 Gtk::TreeModelColumn<bool> solo;
59 Gtk::TreeModelColumn<bool> record;
60 Gtk::TreeModelColumn<bool> select;
61 Gtk::TreeModelColumn<bool> edits;
62 Gtk::TreeModelColumn<bool> active_state;
63 Gtk::TreeModelColumn<bool> is_visible;
64 Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
67 Columns _columns;
69 void add (ARDOUR::RouteGroup *);
70 void row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
71 void name_edit (const std::string&, const std::string&);
72 void button_clicked ();
73 gint button_press_event (GdkEventButton* ev);
74 void groups_changed ();
75 void property_changed (ARDOUR::RouteGroup*, const PBD::PropertyChange &);
76 void remove_selected ();
77 void run_new_group_dialog ();
78 void all_group_toggled();
79 void all_group_changed (const PBD::PropertyChange&);
80 void row_deleted (Gtk::TreeModel::Path const &);
82 Glib::RefPtr<Gtk::ListStore> _model;
83 Glib::RefPtr<Gtk::TreeSelection> _selection;
84 Gtk::TreeView _display;
85 Gtk::ScrolledWindow _scroller;
86 Gtk::VBox _display_packer;
87 Gtk::ToggleButton _all_group_active_button;
88 bool _in_row_change;
89 bool _in_rebuild;
90 PBD::ScopedConnectionList _property_changed_connections;
91 PBD::ScopedConnection all_route_groups_changed_connection;