first compilable version of tabbable design.
[ardour.git] / gtk2_ardour / processor_box.h
index 015afca4a9f40d4cee022fab20caf4d8d6982f6a..0610af72d75f287b1a99ff5508fd75aa49d653e5 100644 (file)
@@ -78,31 +78,31 @@ class ProcessorBox;
 class ProcessorWindowProxy : public WM::ProxyBase
 {
   public:
-    ProcessorWindowProxy (std::string const &, ProcessorBox *, boost::weak_ptr<ARDOUR::Processor>);
-    ~ProcessorWindowProxy();
-
-    Gtk::Window* get (bool create = false);
-
-    boost::weak_ptr<ARDOUR::Processor> processor () const {
-           return _processor;
-    }
-
-    ARDOUR::SessionHandlePtr* session_handle();
-    void toggle();
-    void set_custom_ui_mode(bool use_custom) { want_custom = use_custom; }
-
-    void set_state (const XMLNode&);
-    XMLNode& get_state () const;
-
+       ProcessorWindowProxy (std::string const &, ProcessorBox *, boost::weak_ptr<ARDOUR::Processor>);
+       ~ProcessorWindowProxy();
+       
+       Gtk::Window* get (bool create = false);
+       
+       boost::weak_ptr<ARDOUR::Processor> processor () const {
+               return _processor;
+       }
+       
+       ARDOUR::SessionHandlePtr* session_handle();
+       void toggle();
+       void set_custom_ui_mode(bool use_custom) { want_custom = use_custom; }
+       
+       int set_state (const XMLNode&, int);
+       XMLNode& get_state ();
+       
   private:
-    ProcessorBox* _processor_box;
-    boost::weak_ptr<ARDOUR::Processor> _processor;
-    bool is_custom;
-    bool want_custom;
-    bool _valid;
-
-    void processor_going_away ();
-    PBD::ScopedConnection going_away_connection;
+       ProcessorBox* _processor_box;
+       boost::weak_ptr<ARDOUR::Processor> _processor;
+       bool is_custom;
+       bool want_custom;
+       bool _valid;
+       
+       void processor_going_away ();
+       PBD::ScopedConnection going_away_connection;
 };
 
 class ProcessorEntry : public Gtkmm2ext::DnDVBoxChild, public sigc::trackable
@@ -119,6 +119,8 @@ public:
        bool is_selectable() const {return _selectable;}
        void set_selectable(bool s) { _selectable = s; }
 
+       bool drag_data_get (Glib::RefPtr<Gdk::DragContext> const, Gtk::SelectionData &);
+
        enum Position {
                PreFader,
                Fader,
@@ -165,6 +167,7 @@ private:
        PBD::ScopedConnection active_connection;
        PBD::ScopedConnection name_connection;
        PBD::ScopedConnection config_connection;
+       ARDOUR::PluginPresetPtr _plugin_preset_pointer;
 
        class Control : public sigc::trackable {
        public:
@@ -348,6 +351,12 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
        Gtkmm2ext::DnDVBox<ProcessorEntry> processor_display;
        Gtk::ScrolledWindow    processor_scroller;
 
+       boost::shared_ptr<ARDOUR::Processor> find_drop_position (ProcessorEntry* position);
+
+       void _drop_plugin_preset (Gtk::SelectionData const &, ARDOUR::Route::ProcessorList &);
+       void _drop_plugin (Gtk::SelectionData const &, ARDOUR::Route::ProcessorList &);
+
+       void plugin_drop (Gtk::SelectionData const &, ProcessorEntry* position, Glib::RefPtr<Gdk::DragContext> const & context);
        void object_drop (Gtkmm2ext::DnDVBox<ProcessorEntry> *, ProcessorEntry *, Glib::RefPtr<Gdk::DragContext> const &);
 
        Width _width;