Vkeybd: use ArdourWidgets for all GUI elements
[ardour.git] / gtk2_ardour / port_matrix.h
index be276c0484d6ac3d2e41c814fa3b6fbae46b16e8..8f0f8fd56a9120b10f3f617d56431ef6bf74355a 100644 (file)
@@ -1,21 +1,22 @@
 /*
-    Copyright (C) 2002-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) 2007-2012 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2008-2012 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
+ *
+ * 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_port_matrix_h__
 #define __gtk_ardour_port_matrix_h__
@@ -130,6 +131,9 @@ public:
 
        PortMatrixNode::State get_association (PortMatrixNode) const;
 
+       void flip ();
+       bool key_press (GdkEventKey *);
+
        /** @param c Channels; where c[0] is from _ports[0] and c[1] is from _ports[1].
         *  @param s New state.
         */
@@ -179,13 +183,14 @@ private:
        void routes_changed ();
        void reconnect_to_routes ();
        void select_arrangement ();
+       bool can_add_channel_proxy (boost::weak_ptr<ARDOUR::Bundle>, ARDOUR::DataType) const;
        void add_channel_proxy (boost::weak_ptr<ARDOUR::Bundle>, ARDOUR::DataType);
        void remove_channel_proxy (boost::weak_ptr<ARDOUR::Bundle>, uint32_t);
        void rename_channel_proxy (boost::weak_ptr<ARDOUR::Bundle>, uint32_t);
        void disassociate_all_on_channel (boost::weak_ptr<ARDOUR::Bundle>, uint32_t, int);
        void disassociate_all_on_bundle (boost::weak_ptr<ARDOUR::Bundle>, int);
        void setup_global_ports ();
-       void setup_global_ports_proxy ();
+        void setup_global_ports_proxy ();
        void toggle_show_only_bundles ();
        bool on_scroll_event (GdkEventScroll *);
        boost::shared_ptr<ARDOUR::IO> io_from_bundle (boost::shared_ptr<ARDOUR::Bundle>) const;
@@ -198,10 +203,13 @@ private:
        void add_remove_option (Gtk::Menu_Helpers::MenuList &, boost::weak_ptr<ARDOUR::Bundle>, int);
        void add_disassociate_option (Gtk::Menu_Helpers::MenuList &, boost::weak_ptr<ARDOUR::Bundle>, int, int);
        void port_connected_or_disconnected ();
+       void update_tab_highlighting ();
+       std::pair<int, int> check_flip () const;
+       bool can_flip () const;
 
        Gtk::Window* _parent;
 
-       /// port type that we are working with, or NIL if we are working with all of them
+       /** port type that we are working with, or NIL if we are working with all of them */
        ARDOUR::DataType _type;
        PBD::ScopedConnectionList _route_connections;
        PBD::ScopedConnectionList _changed_connections;