lots of odds and ends to do with solo isolate and its GUI
[ardour.git] / gtk2_ardour / plugin_selector.h
index e5224b4fa73924e0e2a9061f6151feacacd2fa65..a9f9803809643b8cf9bab620b28abbbe002ebee6 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2000 Paul Davis 
+    Copyright (C) 2000 Paul Davis
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -25,7 +25,8 @@
 #include <gtkmm/treeview.h>
 #include <gtkmm2ext/selector.h>
 
-#include <ardour/plugin.h>
+#include "ardour/plugin.h"
+#include "ardour/session_handle.h"
 #include "plugin_interest.h"
 
 namespace ARDOUR {
@@ -37,21 +38,20 @@ class PluginSelector : public ArdourDialog
 {
   public:
        PluginSelector (ARDOUR::PluginManager *);
+       ~PluginSelector ();
 
        void set_interested_object (PluginInterestedObject&);
-       
+
        int run (); // XXX should we try not to overload the non-virtual Gtk::Dialog::run() ?
 
-       void set_session (ARDOUR::Session*);
        void on_show ();
 
-       Gtk::Menu& plugin_menu ();
+       Gtk::Menu* plugin_menu ();
        void show_manager ();
 
   private:
        PluginInterestedObject* interested_object;
 
-       ARDOUR::Session* session;
        Gtk::ScrolledWindow scroller;   // Available plugins
        Gtk::ScrolledWindow ascroller;  // Added plugins
 
@@ -62,10 +62,11 @@ class PluginSelector : public ArdourDialog
        void filter_button_clicked ();
        void filter_entry_changed ();
        void filter_mode_changed ();
-       
+
        struct PluginColumns : public Gtk::TreeModel::ColumnRecord {
                PluginColumns () {
                        add (favorite);
+                       add (hidden);
                        add (name);
                        add (type_name);
                        add (category);
@@ -77,6 +78,7 @@ class PluginSelector : public ArdourDialog
                        add (plugin);
                }
                Gtk::TreeModelColumn<bool> favorite;
+               Gtk::TreeModelColumn<bool> hidden;
                Gtk::TreeModelColumn<std::string> name;
                Gtk::TreeModelColumn<std::string> type_name;
                Gtk::TreeModelColumn<std::string> category;
@@ -112,6 +114,7 @@ class PluginSelector : public ArdourDialog
        void vst_refiller (const std::string&);
        void au_refiller (const std::string&);
 
+       Gtk::Menu* _plugin_menu;
        ARDOUR::PluginManager *manager;
 
        void row_clicked(GdkEventButton *);
@@ -126,10 +129,16 @@ class PluginSelector : public ArdourDialog
        void setup_filter_string (std::string&);
 
        void favorite_changed (const Glib::ustring& path);
+       void hidden_changed (const Glib::ustring& path);
        bool in_row_change;
 
        void plugin_chosen_from_menu (const ARDOUR::PluginInfoPtr&);
-       Gtk::Menu* _menu;
+
+       Gtk::Menu* create_favs_menu (ARDOUR::PluginInfoList&);
+       Gtk::Menu* create_by_creator_menu (ARDOUR::PluginInfoList&);
+       Gtk::Menu* create_by_category_menu (ARDOUR::PluginInfoList&);
+       void build_plugin_menu ();
+       PBD::ScopedConnection plugin_list_changed_connection;
 };
 
 #endif // __ardour_plugin_selector_h__