correct check for presence of / or \ in a session name
[ardour.git] / gtk2_ardour / redirect_box.h
index 7e93efee1bcfc0f361c82e828f7430f64716f4f0..b7d7e329f274f34d4fbd8c3ddce78adf4550181d 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <pbd/fastlog.h>
 
+#include "plugin_interest.h"
 #include "route_ui.h"
 #include "io_selector.h"
 #include "enums.h"
@@ -62,13 +63,15 @@ namespace ARDOUR {
        class Session;
 }
 
-class RedirectBox : public Gtk::HBox
+class RedirectBox : public Gtk::HBox, public PluginInterestedObject
 {
   public:
        RedirectBox (ARDOUR::Placement, ARDOUR::Session&, 
-                    boost::shared_ptr<ARDOUR::Route>, PluginSelector &, RouteRedirectSelection &, bool owner_is_mixer = false);
+                    PluginSelector &, RouteRedirectSelection &, bool owner_is_mixer = false);
        ~RedirectBox ();
 
+       void set_route (boost::shared_ptr<ARDOUR::Route>);
+
        void set_width (Width);
 
        void update();
@@ -84,13 +87,11 @@ class RedirectBox : public Gtk::HBox
        
        static void register_actions();
 
-  protected:
-       void set_stuff_from_route ();
-
   private:
        boost::shared_ptr<ARDOUR::Route>  _route;
        ARDOUR::Session &   _session;
        bool                _owner_is_mixer;
+       std::vector<sigc::connection> connections;
 
        ARDOUR::Placement   _placement;
 
@@ -98,6 +99,7 @@ class RedirectBox : public Gtk::HBox
        RouteRedirectSelection  & _rr_selection;
 
        void route_going_away ();
+       bool can_cut_redirects ();
 
        struct ModelColumns : public Gtk::TreeModel::ColumnRecord {
            ModelColumns () {
@@ -124,7 +126,7 @@ class RedirectBox : public Gtk::HBox
        Gtkmm2ext::DnDTreeView<boost::shared_ptr<ARDOUR::Redirect> > redirect_display;
        Gtk::ScrolledWindow    redirect_scroller;
 
-       void object_drop (std::string type, uint32_t cnt, const boost::shared_ptr<ARDOUR::Redirect>*);
+       void object_drop (const std::list<boost::shared_ptr<ARDOUR::Redirect> >&);
 
        Width _width;
        
@@ -144,7 +146,7 @@ class RedirectBox : public Gtk::HBox
        void send_io_finished (IOSelector::Result, boost::weak_ptr<ARDOUR::Redirect>, IOSelectorWindow*);
        void choose_insert ();
        void choose_plugin ();
-       void insert_plugin_chosen (boost::shared_ptr<ARDOUR::Plugin>);
+       void use_plugins (const SelectedPlugins&);
 
        bool no_redirect_redisplay;
        bool ignore_delete;
@@ -174,6 +176,7 @@ class RedirectBox : public Gtk::HBox
        void cut_redirects ();
        void copy_redirects ();
        void paste_redirects ();
+       void delete_redirects ();
        void clear_redirects ();
        void clone_redirects ();
        void rename_redirects ();
@@ -181,8 +184,9 @@ class RedirectBox : public Gtk::HBox
        void for_selected_redirects (void (RedirectBox::*pmf)(boost::shared_ptr<ARDOUR::Redirect>));
        void get_selected_redirects (vector<boost::shared_ptr<ARDOUR::Redirect> >&);
 
+       static Glib::RefPtr<Gtk::Action> cut_action;
        static Glib::RefPtr<Gtk::Action> paste_action;
-       void paste_redirect_list (std::list<boost::shared_ptr<ARDOUR::Redirect> >& redirects);
+       void paste_redirect_list (const std::list<boost::shared_ptr<ARDOUR::Redirect> >& redirects);
        
        void activate_redirect (boost::shared_ptr<ARDOUR::Redirect>);
        void deactivate_redirect (boost::shared_ptr<ARDOUR::Redirect>);
@@ -207,6 +211,7 @@ class RedirectBox : public Gtk::HBox
        static void rb_cut ();
        static void rb_copy ();
        static void rb_paste ();
+       static void rb_delete ();
        static void rb_rename ();
        static void rb_select_all ();
        static void rb_deselect_all ();
@@ -216,7 +221,7 @@ class RedirectBox : public Gtk::HBox
        static void rb_deactivate_all ();
        static void rb_edit ();
        
-       void route_name_changed (void* src, PluginUIWindow* plugin_ui, boost::weak_ptr<ARDOUR::PluginInsert> pi);
+       void route_name_changed (void* src);
        std::string generate_redirect_title (boost::shared_ptr<ARDOUR::PluginInsert> pi);
 };