start shaping up VCA assign process
[ardour.git] / gtk2_ardour / mixer_ui.h
index 68c31757e59d9381756013c4fab4e00fff9e78b1..d818ee214a4b0a938ff124e01c36a980b7509a9a 100644 (file)
@@ -43,7 +43,6 @@
 #include "ardour/plugin_manager.h"
 
 
-#include "gtkmm2ext/visibility_tracker.h"
 #include "gtkmm2ext/dndtreeview.h"
 #include "gtkmm2ext/treeutils.h"
 
@@ -61,6 +60,7 @@ class MixerStrip;
 class PluginSelector;
 class MixerGroupTabs;
 class MonitorSection;
+class VCAMasterStrip;
 
 class PluginTreeStore : public Gtk::TreeStore
 {
@@ -75,7 +75,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, public Gtkmm2ext::VisibilityTracker
+class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public MixerActor
 {
   public:
        static Mixer_UI* instance();
@@ -116,6 +116,9 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
 
        bool window_not_visible () const;
 
+       void do_vca_assign (boost::shared_ptr<ARDOUR::VCA>);
+       void do_vca_unassign (boost::shared_ptr<ARDOUR::VCA>);
+
   protected:
        void set_route_targets_for_operation ();
 
@@ -142,25 +145,19 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
        Gtk::VPaned                             rhs_pane1;
        Gtk::VPaned                             rhs_pane2;
        Gtk::HBox                               strip_packer;
+       Gtk::HBox                               vca_packer;
        Gtk::HBox                               out_packer;
        Gtk::HPaned                             list_hpane;
 
        MixerGroupTabs* _group_tabs;
 
-       // for restoring window geometry.
-       int m_root_x, m_root_y, m_width, m_height;
-
-       void set_window_pos_and_size ();
-       void get_window_pos_and_size ();
-
-       bool on_key_press_event (GdkEventKey*);
-       bool on_key_release_event (GdkEventKey*);
        bool on_scroll_event (GdkEventScroll*);
 
        void pane_allocation_handler (Gtk::Allocation&, Gtk::Paned*);
 
        std::list<MixerStrip *> strips;
 
+       void scroller_drag_data_received (const Glib::RefPtr<Gdk::DragContext>&, int, int, const Gtk::SelectionData&, guint, guint);
        bool strip_scroller_button_release (GdkEventButton*);
        void scroll_left ();
        void scroll_right ();
@@ -169,6 +166,9 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
        void add_strips (ARDOUR::RouteList&);
        void remove_strip (MixerStrip *);
 
+       void add_masters (ARDOUR::VCAList&);
+       void remove_master (VCAMasterStrip*);
+
        MixerStrip* strip_by_route (boost::shared_ptr<ARDOUR::Route>);
 
        void hide_all_strips (bool with_select);
@@ -263,16 +263,20 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
        /* various treeviews */
 
        struct TrackDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
-           TrackDisplayModelColumns () {
-                   add (text);
-                   add (visible);
-                   add (route);
-                   add (strip);
-           }
-           Gtk::TreeModelColumn<bool>           visible;
-           Gtk::TreeModelColumn<std::string>  text;
-           Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
-           Gtk::TreeModelColumn<MixerStrip*>    strip;
+               TrackDisplayModelColumns () {
+                       add (text);
+                       add (visible);
+                       add (route);
+                       add (strip);
+                       add (vca);
+               }
+               Gtk::TreeModelColumn<bool>         visible;
+               Gtk::TreeModelColumn<std::string>  text;
+               Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Route> > route;
+               /* if route is non-null, this must be non-null */
+               Gtk::TreeModelColumn<MixerStrip*>  strip;
+               /* if route is null, this may be non-null */
+               Gtk::TreeModelColumn<VCAMasterStrip*>  vca;
        };
 
        struct GroupDisplayModelColumns : public Gtk::TreeModel::ColumnRecord {
@@ -349,7 +353,6 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
 
        void monitor_section_going_away ();
 
-<<<<<<< HEAD
        void monitor_section_attached ();
        void monitor_section_detached ();
 
@@ -360,10 +363,6 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p
        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);
 
-=======
-       void create_own_window ();
-
->>>>>>> the basics of tabbed
        /// true if we are in fullscreen mode
        bool _maximised;