add variant of Rect::expand() that allows different amounts in each direction
[ardour.git] / gtk2_ardour / mixer_ui.h
index 1be03132ccfccd5e8e8d21cb6de091b871937859..a85006af5a74f2591887c8aa539f806267b8f700 100644 (file)
 #include "ardour/plugin.h"
 #include "ardour/plugin_manager.h"
 
+#include <gtkmm2ext/bindings.h>
 #include "gtkmm2ext/dndtreeview.h"
 #include <gtkmm2ext/pane.h>
-#include "gtkmm2ext/treeutils.h"
-
 #include "gtkmm2ext/tabbable.h"
+#include "gtkmm2ext/treeutils.h"
 
 #include "enums.h"
-#include "mixer_actor.h"
+#include "route_processor_selection.h"
 
 namespace ARDOUR {
        class Route;
        class RouteGroup;
+       class VCA;
 };
 
 class AxisView;
@@ -75,7 +76,7 @@ protected:
        virtual bool row_drop_possible_vfunc (const Gtk::TreeModel::Path&, const Gtk::SelectionData&) const;
 };
 
-class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor
+class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr
 {
   public:
        static Mixer_UI* instance();
@@ -120,8 +121,14 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
 
        sigc::signal1<void,boost::shared_ptr<ARDOUR::VCA> > show_vca_change;
 
+       RouteProcessorSelection& selection() { return _selection; }
+       void register_actions ();
+
+        void load_bindings ();
+        Gtkmm2ext::Bindings*  bindings;
+
   protected:
-       void set_route_targets_for_operation ();
+       void set_axis_targets_for_operation ();
 
   private:
        Mixer_UI ();
@@ -148,7 +155,10 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
        Gtkmm2ext::HPane      inner_pane;
        Gtk::HBox             strip_packer;
        Gtk::ScrolledWindow   vca_scroller;
-       Gtk::HBox             vca_packer;
+       Gtk::HBox             vca_hpacker;
+       Gtk::VBox             vca_vpacker;
+       Gtk::EventBox         vca_label_bar;
+       Gtk::Label            vca_label;
        Gtk::EventBox         vca_scroller_base;
        Gtk::HBox             out_packer;
        Gtkmm2ext::HPane      list_hpane;
@@ -174,7 +184,8 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
        void add_masters (ARDOUR::VCAList&);
        void remove_master (VCAMasterStrip*);
 
-       MixerStrip* strip_by_route (boost::shared_ptr<ARDOUR::Route>);
+       MixerStrip* strip_by_route (boost::shared_ptr<ARDOUR::Route>) const;
+       AxisView* axis_by_stripable (boost::shared_ptr<ARDOUR::Stripable>) const;
 
        void hide_all_strips (bool with_select);
        void unselect_all_strips();
@@ -263,7 +274,7 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
         MonitorSection* _monitor_section;
        PluginSelector    *_plugin_selector;
 
-       void strip_property_changed (const PBD::PropertyChange&, MixerStrip *);
+       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 &);
 
        /* various treeviews */
@@ -372,6 +383,28 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
        mutable boost::weak_ptr<ARDOUR::VCA> spilled_vca;
 
        void escape ();
+
+       Gtkmm2ext::ActionMap myactions;
+       RouteProcessorSelection _selection;
+       AxisViewSelection _axis_targets;
+
+       void vca_assign (boost::shared_ptr<ARDOUR::VCA>);
+       void vca_unassign (boost::shared_ptr<ARDOUR::VCA>);
+
+       template<class T> void control_action (boost::shared_ptr<T> (ARDOUR::Stripable::*get_control)() const);
+       void solo_action ();
+       void mute_action ();
+       void rec_enable_action ();
+       void step_gain_up_action ();
+       void step_gain_down_action ();
+       void unity_gain_action ();
+
+       void copy_processors ();
+       void cut_processors ();
+       void paste_processors ();
+       void select_all_processors ();
+       void toggle_processors ();
+       void ab_plugins ();
 };
 
 #endif /* __ardour_mixer_ui_h__ */