VKeybd: Pass on primary (Ctrl/Cmd) shortcuts
[ardour.git] / gtk2_ardour / mixer_ui.h
index 9485ea252fae12d8f634bb95d9e07895bbfdf5f6..7adc79d99eb5cbcb503f95ff11d10b7c566fd380 100644 (file)
@@ -1,21 +1,26 @@
 /*
-    Copyright (C) 2000 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) 2005-2007 Taybin Rutkin <taybin@taybin.com>
+ * Copyright (C) 2005-2018 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2006 Nick Mainsbridge <mainsbridge@gmail.com>
+ * Copyright (C) 2007-2009 David Robillard <d@drobilla.net>
+ * Copyright (C) 2009-2012 Carl Hetherington <carl@carlh.net>
+ * Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
+ * Copyright (C) 2014-2018 Ben Loftis <ben@harrisonconsoles.com>
+ *
+ * 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 __ardour_mixer_ui_h__
 #define __ardour_mixer_ui_h__
@@ -26,6 +31,7 @@
 #include <gtkmm/scrolledwindow.h>
 #include <gtkmm/eventbox.h>
 #include <gtkmm/label.h>
+#include <gtkmm/comboboxtext.h>
 #include <gtkmm/button.h>
 #include <gtkmm/frame.h>
 #include <gtkmm/menu.h>
@@ -51,6 +57,7 @@
 
 #include "axis_provider.h"
 #include "enums.h"
+#include "monitor_section.h"
 #include "route_processor_selection.h"
 
 namespace ARDOUR {
@@ -60,6 +67,7 @@ namespace ARDOUR {
 };
 
 class AxisView;
+class FoldbackStrip;
 class MixerStrip;
 class PluginSelector;
 class MixerGroupTabs;
@@ -98,8 +106,7 @@ public:
        XMLNode& get_state ();
        int set_state (const XMLNode&, int /* version */);
 
-       void show_mixer_list (bool yn);
-       void show_monitor_section (bool);
+       void save_plugin_order_file ();
 
        void show_strip (MixerStrip *);
        void hide_strip (MixerStrip *);
@@ -107,12 +114,14 @@ public:
        void maximise_mixer_space();
        void restore_mixer_space();
 
-       MonitorSection* monitor_section() const { return _monitor_section; }
+       MonitorSection& monitor_section() { return _monitor_section; }
 
        void deselect_all_strip_processors();
        void delete_processors();
        void select_none ();
-       void select_all_tracks ();
+
+       void select_next_strip ();
+       void select_prev_strip ();
 
        void do_vca_assign (boost::shared_ptr<ARDOUR::VCA>);
        void do_vca_unassign (boost::shared_ptr<ARDOUR::VCA>);
@@ -130,6 +139,27 @@ public:
        void load_bindings ();
        Gtkmm2ext::Bindings*  bindings;
 
+       void toggle_mixer_list ();
+       void showhide_mixer_list (bool yn);
+
+       void toggle_monitor_section ();
+       void showhide_monitor_section (bool);
+
+       void toggle_foldback_strip ();
+       void showhide_foldback_strip (bool);
+
+       void toggle_vcas ();
+       void showhide_vcas (bool on);
+
+#ifdef MIXBUS
+       void toggle_mixbuses ();
+       void showhide_mixbusses (bool on);
+#endif
+
+       bool screenshot (std::string const&);
+
+       void toggle_monitor_action (ARDOUR::MonitorChoice monitor_choice, bool group_override = false, bool all = false);
+
 protected:
        void set_axis_targets_for_operation ();
        ARDOUR::AutomationControlSet selected_gaincontrols ();
@@ -146,7 +176,6 @@ private:
        Gtk::VBox             mixer_scroller_vpacker;
        Gtk::VBox             list_vpacker;
        Gtk::Label            group_display_button_label;
-       Gtk::Button           group_display_button;
        Gtk::ScrolledWindow   track_display_scroller;
        Gtk::ScrolledWindow   group_display_scroller;
        Gtk::ScrolledWindow   favorite_plugins_scroller;
@@ -154,9 +183,12 @@ private:
        Gtk::Frame            track_display_frame;
        Gtk::Frame            group_display_frame;
        Gtk::Frame            favorite_plugins_frame;
+       Gtk::VBox             favorite_plugins_vbox;
+       Gtk::ComboBoxText     favorite_plugins_tag_combo;
        ArdourWidgets::VPane  rhs_pane1;
        ArdourWidgets::VPane  rhs_pane2;
        ArdourWidgets::HPane  inner_pane;
+       Gtk::VBox             strip_group_box;
        Gtk::HBox             strip_packer;
        Gtk::ScrolledWindow   vca_scroller;
        Gtk::HBox             vca_hpacker;
@@ -166,10 +198,13 @@ private:
        Gtk::EventBox         vca_scroller_base;
        Gtk::HBox             out_packer;
        ArdourWidgets::HPane  list_hpane;
+       Gtk::Button           add_button; // should really be an ArdourButton
+       Gtk::Button           add_vca_button;
 
        MixerGroupTabs* _group_tabs;
 
        bool on_scroll_event (GdkEventScroll*);
+       bool on_vca_scroll_event (GdkEventScroll*);
 
        std::list<MixerStrip *> strips;
 
@@ -178,17 +213,21 @@ private:
        bool masters_scroller_button_release (GdkEventButton*);
        void scroll_left ();
        void scroll_right ();
+       void vca_scroll_left ();
+       void vca_scroll_right ();
        void toggle_midi_input_active (bool flip_others);
 
+       void move_vca_into_view (boost::shared_ptr<ARDOUR::Stripable>);
        void move_stripable_into_view (boost::shared_ptr<ARDOUR::Stripable>);
 
        void add_stripables (ARDOUR::StripableList&);
 
        void add_routes (ARDOUR::RouteList&);
        void remove_strip (MixerStrip *);
-
+       void remove_foldback (FoldbackStrip *);
        void add_masters (ARDOUR::VCAList&);
        void remove_master (VCAMasterStrip*);
+       void new_masters_created ();
 
        MixerStrip* strip_by_route (boost::shared_ptr<ARDOUR::Route>) const;
        MixerStrip* strip_by_stripable (boost::shared_ptr<ARDOUR::Stripable>) const;
@@ -268,8 +307,10 @@ private:
        void track_column_click (gint);
        void build_track_menu ();
 
-       MonitorSection* _monitor_section;
-       PluginSelector    *_plugin_selector;
+       MonitorSection   _monitor_section;
+       PluginSelector *_plugin_selector;
+       FoldbackStrip * foldback_strip;
+       bool _show_foldback_strip;
 
        void stripable_property_changed (const PBD::PropertyChange& what_changed, boost::weak_ptr<ARDOUR::Stripable> ws);
        void route_group_property_changed (ARDOUR::RouteGroup *, const PBD::PropertyChange &);
@@ -328,8 +369,10 @@ private:
        void group_display_selection_changed ();
 
        bool strip_button_release_event (GdkEventButton*, MixerStrip*);
+       bool vca_button_release_event (GdkEventButton*, VCAMasterStrip*);
 
        Width _strip_width;
+       double _spill_scroll_position;
 
        void presentation_info_changed (PBD::PropertyChange const &);
        void sync_treeview_from_presentation_info (PBD::PropertyChange const &);
@@ -358,13 +401,19 @@ private:
        friend class MixerGroupTabs;
 
        void monitor_section_going_away ();
-
        void monitor_section_attached ();
        void monitor_section_detached ();
 
        void store_current_favorite_order();
        void refiller (ARDOUR::PluginInfoList& result, const ARDOUR::PluginInfoList& plugs);
+
+       void plugin_list_changed ();
+
        void refill_favorite_plugins ();
+       void refill_tag_combo ();
+
+       void tag_combo_changed ();
+
        void sync_treeview_from_favorite_order ();
        void sync_treeview_favorite_ui_state (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&);
        void save_favorite_ui_state (const Gtk::TreeModel::iterator& iter, const Gtk::TreeModel::Path& path);
@@ -372,14 +421,12 @@ private:
        /// true if we are in fullscreen mode
        bool _maximised;
 
-       // true if mixer list is visible
-       bool _show_mixer_list;
+       bool _strip_selection_change_without_scroll;
 
        mutable boost::weak_ptr<ARDOUR::Stripable> spilled_strip;
 
        void escape ();
 
-       Gtkmm2ext::ActionMap myactions;
        RouteProcessorSelection _selection;
        AxisViewSelection _axis_targets;