Vkeybd: add a mod-wheel
[ardour.git] / gtk2_ardour / editor_route_groups.h
index 3c93b96ed420616a59d1abfbe616dc9d8b5136d9..4b9cde9e1e7fe50f43f5eba572bef3b27b766388 100644 (file)
 /*
-    Copyright (C) 2000-2009 Paul Davis
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
+ * Copyright (C) 2009-2011 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2009-2012 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __gtk_ardour_editor_route_groups_h__
+#define __gtk_ardour_editor_route_groups_h__
+
+#include <gtkmm/liststore.h>
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treeview.h>
 
 #include "editor_component.h"
 
-class EditorRouteGroups : public EditorComponent
+class EditorRouteGroups : public EditorComponent, public ARDOUR::SessionHandlePtr
 {
 public:
        EditorRouteGroups (Editor *);
 
-       void connect_to_session (ARDOUR::Session *);
+       void set_session (ARDOUR::Session *);
 
        Gtk::Widget& widget () {
-               return *_display_packer;
+               return _display_packer;
        }
 
-       Gtk::Menu* menu (ARDOUR::RouteGroup *);
-
        void clear ();
 
 private:
 
-        struct Columns : public Gtk::TreeModel::ColumnRecord {
+       struct Columns : public Gtk::TreeModel::ColumnRecord {
 
-                Columns () {
+               Columns () {
+                       add (gdkcolor);
+                       add (text);
                        add (is_visible);
                        add (gain);
-                       add (record);
+                       add (gain_relative);
                        add (mute);
                        add (solo);
+                       add (record);
+                       add (monitoring);
                        add (select);
-                       add (edits);
-                       add (text);
+                       add (active_shared);
+                       add (active_state);
                        add (routegroup);
-                }
+               }
 
-               Gtk::TreeModelColumn<bool> is_visible;
+               Gtk::TreeModelColumn<Gdk::Color> gdkcolor;
+               Gtk::TreeModelColumn<std::string> text;
+               Gtk::TreeModelColumn<bool> is_visible;
                Gtk::TreeModelColumn<bool> gain;
-               Gtk::TreeModelColumn<bool> record;
+               Gtk::TreeModelColumn<bool> gain_relative;
                Gtk::TreeModelColumn<bool> mute;
                Gtk::TreeModelColumn<bool> solo;
+               Gtk::TreeModelColumn<bool> record;
+               Gtk::TreeModelColumn<bool> monitoring;
                Gtk::TreeModelColumn<bool> select;
-               Gtk::TreeModelColumn<bool> edits;
-               Gtk::TreeModelColumn<std::string> text;
-               Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
+               Gtk::TreeModelColumn<bool> active_shared;
+               Gtk::TreeModelColumn<bool> active_state;
+               Gtk::TreeModelColumn<ARDOUR::RouteGroup*> routegroup;
        };
 
        Columns _columns;
 
-       void activate_all ();
-       void disable_all ();
-       void subgroup (ARDOUR::RouteGroup *);
-       void unsubgroup (ARDOUR::RouteGroup *);
-       void collect (ARDOUR::RouteGroup *);
-
+       void add (ARDOUR::RouteGroup *);
        void row_change (const Gtk::TreeModel::Path&,const Gtk::TreeModel::iterator&);
-       void name_edit (const Glib::ustring&, const Glib::ustring&);
-       void new_route_group ();
-       void new_from_selection ();
-       void new_from_rec_enabled ();
-       void new_from_soloed ();
-       void edit (ARDOUR::RouteGroup *);
+       void name_edit (const std::string&, const std::string&);
        void button_clicked ();
-       gint button_press_event (GdkEventButton* ev);
-       void add (ARDOUR::RouteGroup* group);
-       void remove_route_group ();
+       bool button_press_event (GdkEventButton* ev);
        void groups_changed ();
-       void flags_changed (void*, ARDOUR::RouteGroup*);
-       void set_activation (ARDOUR::RouteGroup *, bool);
+       void property_changed (ARDOUR::RouteGroup*, const PBD::PropertyChange &);
        void remove_selected ();
-       void run_new_group_dialog (const ARDOUR::RouteList&);
+       void run_new_group_dialog ();
+       void row_deleted (Gtk::TreeModel::Path const &);
 
-       Gtk::Menu* _menu;
        Glib::RefPtr<Gtk::ListStore> _model;
        Glib::RefPtr<Gtk::TreeSelection> _selection;
        Gtk::TreeView _display;
        Gtk::ScrolledWindow _scroller;
-       Gtk::VBox* _display_packer;
+       Gtk::VBox _display_packer;
        bool _in_row_change;
+       bool _in_rebuild;
+       PBD::ScopedConnectionList _property_changed_connections;
+       PBD::ScopedConnection all_route_groups_changed_connection;
+       Gtk::ColorSelectionDialog color_dialog;
 };
 
-
+#endif // __gtk_ardour_editor_route_groups_h__