Rewrote MidiRingBuffer to more efficiently pack data (flat pack stamps, sizes, and...
[ardour.git] / gtk2_ardour / plugin_selector.h
index 5afe7469ab076e723c571416662d1a816b4fcf41..73c3008e642bfd5e3b3b029739056b223f35a67d 100644 (file)
@@ -30,7 +30,6 @@
 namespace ARDOUR {
        class Session;
        class PluginManager;
-       class PluginInfo;
 }
 
 class PluginSelector : public ArdourDialog
@@ -51,7 +50,7 @@ class PluginSelector : public ArdourDialog
        Gtk::ScrolledWindow auscroller; // AudioUnit
        Gtk::ScrolledWindow ascroller;  // Added plugins
        
-       ARDOUR::PluginInfo::Type current_selection;
+       ARDOUR::PluginType current_selection;
 
        // page 1
        struct LadspaColumns : public Gtk::TreeModel::ColumnRecord {
@@ -66,7 +65,7 @@ class PluginSelector : public ArdourDialog
                Gtk::TreeModelColumn<std::string> type;
                Gtk::TreeModelColumn<std::string> ins;
                Gtk::TreeModelColumn<std::string> outs;
-           Gtk::TreeModelColumn<ARDOUR::PluginInfo *> plugin;
+           Gtk::TreeModelColumn<ARDOUR::PluginInfoPtr> plugin;
        };
        LadspaColumns lcols;
        Glib::RefPtr<Gtk::ListStore> lmodel;
@@ -81,7 +80,7 @@ class PluginSelector : public ArdourDialog
                        add (plugin);
                }
                Gtk::TreeModelColumn<std::string> text;
-               Gtk::TreeModelColumn<ARDOUR::PluginInfo *> plugin;
+               Gtk::TreeModelColumn<ARDOUR::PluginInfoPtr> plugin;
        };
        AddedColumns acols;
        Glib::RefPtr<Gtk::ListStore> amodel;
@@ -100,7 +99,7 @@ class PluginSelector : public ArdourDialog
            Gtk::TreeModelColumn<std::string> name;
                Gtk::TreeModelColumn<std::string> ins;
                Gtk::TreeModelColumn<std::string> outs;
-           Gtk::TreeModelColumn<ARDOUR::PluginInfo *> plugin;
+           Gtk::TreeModelColumn<ARDOUR::PluginInfoPtr> plugin;
        };
        VstColumns vcols;
        Glib::RefPtr<Gtk::ListStore> vmodel;
@@ -111,7 +110,7 @@ class PluginSelector : public ArdourDialog
        void vst_display_selection_changed();
 #endif // VST_SUPPORT
 
-#ifdef HAVE_COREAUDIO
+#ifdef HAVE_AUDIOUNIT
        // page 3
        struct AUColumns : public Gtk::TreeModel::ColumnRecord {
                AUColumns () {
@@ -123,7 +122,7 @@ class PluginSelector : public ArdourDialog
                Gtk::TreeModelColumn<std::string> name;
                Gtk::TreeModelColumn<std::string> ins;
                Gtk::TreeModelColumn<std::string> outs;
-               Gtk::TreeModelColumn<ARDOUR::PluginInfo *> plugin;
+               Gtk::TreeModelColumn<ARDOUR::PluginInfoPtr> plugin;
        };
        AUColumns aucols;
        Glib::RefPtr<Gtk::ListStore> aumodel;
@@ -132,16 +131,9 @@ class PluginSelector : public ArdourDialog
        static void _au_refiller (void *);
        void au_refiller ();
        void au_display_selection_changed();
-#endif //HAVE_COREAUDIO
-
-       ARDOUR::PluginInfo* i_selected_plug;
-
-       // We need an integer for the output side because
-       // the name isn't promised to be unique.
-       gint o_selected_plug;
+#endif //HAVE_AUDIOUNIT
 
        ARDOUR::PluginManager *manager;
-       list<ARDOUR::PluginInfo*> added_plugins;
 
        static void _input_refiller (void *);
        
@@ -153,8 +145,10 @@ class PluginSelector : public ArdourDialog
        void added_list_selection_changed();
        void ladspa_display_selection_changed();
        void btn_apply_clicked();
-       void use_plugin (ARDOUR::PluginInfo*);
+       void use_plugin (ARDOUR::PluginInfoPtr);
        void cleanup ();
+
+       void set_correct_focus();
 };
 
 #endif // __ardour_plugin_selector_h__