make RouteGroup gain control work again ; fix what solo button label shows under...
[ardour.git] / gtk2_ardour / mixer_strip.h
index ea2569b644c5dc554a8cb41cf971ba2f01b03e8f..6b7ffb44cecf144567e6ea15a2cb2eb3b05b1d54 100644 (file)
 #include <gtkmm2ext/click_box.h>
 #include <gtkmm2ext/slider_controller.h>
 
-#include <pbd/stateful.h>
+#include "pbd/stateful.h"
 
-#include <ardour/types.h>
-#include <ardour/ardour.h>
-#include <ardour/io.h>
-#include <ardour/insert.h>
-#include <ardour/redirect.h>
+#include "ardour/types.h"
+#include "ardour/ardour.h"
+#include "ardour/processor.h"
 
-#include <pbd/fastlog.h>
+#include "pbd/fastlog.h"
 
 #include "route_ui.h"
-#include "io_selector.h"
 #include "gain_meter.h"
 #include "panner_ui.h"
 #include "enums.h"
-#include "redirect_box.h"
+#include "processor_box.h"
 #include "ardour_dialog.h"
 
 class MotionController;
@@ -66,10 +63,10 @@ namespace Gtkmm2ext {
 namespace ARDOUR {
        class Route;
        class Send;
-       class Insert;
+       class Processor;
        class Session;
        class PortInsert;
-       class Connection;
+       class Bundle;
        class Plugin;
 }
 namespace Gtk {
@@ -78,20 +75,34 @@ namespace Gtk {
 }
 
 class Mixer_UI;
+class IOSelectorWindow;
 
 class MixerStrip : public RouteUI, public Gtk::EventBox
 {
   public:
        MixerStrip (Mixer_UI&, ARDOUR::Session&, boost::shared_ptr<ARDOUR::Route>, bool in_mixer = true);
+       MixerStrip (Mixer_UI&, ARDOUR::Session&, bool in_mixer = true);
        ~MixerStrip ();
 
-       void set_width (Width);
-       Width get_width() const { return _width; }
+       void set_width_enum (Width, void* owner);
+       Width get_width_enum () const { return _width; }
+       void* width_owner () const { return _width_owner; }
+
+       GainMeter& gain_meter() { return gpm; }
+       PannerUI&  panner_ui()  { return panners; }
 
        void fast_update ();
        void set_embedded (bool);
+       
+       ARDOUR::RouteGroup* route_group() const;
+       void set_route (boost::shared_ptr<ARDOUR::Route>);
+       void set_button_names ();
+
+#ifdef GTKOSX
+       sigc::signal<void>      WidthChanged;
+#endif
 
-       ARDOUR::RouteGroup* mix_group() const;
+       static sigc::signal<void,boost::shared_ptr<ARDOUR::Route> > SwitchIO;
 
   protected:
        friend class Mixer_UI;
@@ -104,14 +115,21 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
   private:
        Mixer_UI& _mixer;
 
+       void init ();
+
        bool  _embedded;
        bool  _packed;
+       bool  _mixer_owned;
        Width _width;
+       void*  _width_owner;
 
        Gtk::Button         hide_button;
        Gtk::Button         width_button;
        Gtk::HBox           width_hide_box;
+       Gtk::VBox           whvbox;
        Gtk::EventBox       top_event_box;
+       Gtk::EventBox*      spacer;
+       Gtk::Alignment      gain_meter_alignment;
 
        void hide_clicked();
        void width_clicked ();
@@ -119,10 +137,10 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        Gtk::Frame          global_frame;
        Gtk::VBox           global_vpacker;
 
-       RedirectBox pre_redirect_box;
-       RedirectBox post_redirect_box;
+       ProcessorBox pre_processor_box;
+       ProcessorBox post_processor_box;
        GainMeter   gpm;
-               PannerUI    panners;
+       PannerUI    panners;
        
        Gtk::Table button_table;
        Gtk::Table middle_button_table;
@@ -166,13 +184,13 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        gint output_press (GdkEventButton *);
 
        Gtk::Menu  input_menu;
-       void add_connection_to_input_menu (ARDOUR::Connection *);
+       void maybe_add_bundle_to_input_menu (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::BundleList const &);
 
        Gtk::Menu output_menu;
-       void add_connection_to_output_menu (ARDOUR::Connection *);
+       void maybe_add_bundle_to_output_menu (boost::shared_ptr<ARDOUR::Bundle>, ARDOUR::BundleList const &);
        
-       void connection_input_chosen (ARDOUR::Connection *);
-       void connection_output_chosen (ARDOUR::Connection *);
+       void bundle_input_toggled (boost::shared_ptr<ARDOUR::Bundle>);
+       void bundle_output_toggled (boost::shared_ptr<ARDOUR::Bundle>);
 
        void edit_input_configuration ();
        void edit_output_configuration ();
@@ -180,6 +198,7 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        void diskstream_changed ();
 
        Gtk::Menu *send_action_menu;
+       Gtk::MenuItem* rename_menu_item;
        void build_send_action_menu ();
 
        void new_send ();
@@ -208,42 +227,39 @@ class MixerStrip : public RouteUI, public Gtk::EventBox
        void comment_edited ();
        bool ignore_comment_edit;
 
-       void set_mix_group (ARDOUR::RouteGroup *);
-       void add_mix_group_to_menu (ARDOUR::RouteGroup *, Gtk::RadioMenuItem::Group*);
-       bool select_mix_group (GdkEventButton *);
-       void mix_group_changed (void *);
-
+       void set_route_group (ARDOUR::RouteGroup *);
+       void add_route_group_to_menu (ARDOUR::RouteGroup *, Gtk::RadioMenuItem::Group*);
+       bool select_route_group (GdkEventButton *);
+       void route_group_changed (void *);
 
        IOSelectorWindow *input_selector;
        IOSelectorWindow *output_selector;
 
        Gtk::Style *passthru_style;
 
-       void route_gui_changed (string, void*);
+       void route_gui_changed (std::string, void*);
        void show_route_color ();
        void show_passthru_color ();
 
        void route_active_changed ();
 
-       /* speed control (for tracks only) */
-
-       Gtk::Adjustment    speed_adjustment;
-       Gtkmm2ext::ClickBox speed_spinner;
-       Gtk::Label         speed_label;
-       Gtk::Frame         speed_frame;
-
-       void speed_adjustment_changed ();
-       void speed_changed ();
-       void name_changed (void *src);
+       void name_changed ();
        void update_speed_display ();
        void map_frozen ();
-       void hide_redirect_editor (boost::shared_ptr<ARDOUR::Redirect> redirect);
+       void hide_processor_editor (boost::weak_ptr<ARDOUR::Processor> processor);
+       void hide_redirect_editors ();
 
        bool ignore_speed_adjustment;
 
        void engine_running();
        void engine_stopped();
 
+       void switch_io (boost::shared_ptr<ARDOUR::Route>);
+       boost::shared_ptr<ARDOUR::Delivery> _current_delivery;
+       void revert_to_default_display ();
+
+       void set_route_group_to_new ();
+
        static int scrollbar_height;
 };