X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fplugin_selector.h;h=14aa47322dfa847b36ea18ca784490f1d58fe8a8;hb=f9e5e4360e54f5ff5327b4384ee451d86f8dec91;hp=06e746853fa4d06390e4266f48cd79352de92367;hpb=1e8f2693f7837fce868e0e4e710c6e8aeffb7662;p=ardour.git diff --git a/gtk2_ardour/plugin_selector.h b/gtk2_ardour/plugin_selector.h index 06e746853f..14aa47322d 100644 --- a/gtk2_ardour/plugin_selector.h +++ b/gtk2_ardour/plugin_selector.h @@ -23,10 +23,18 @@ #include #include #include -#include +#include +#include + +#include "gtkmm2ext/dndtreeview.h" #include "ardour/plugin.h" +#include "ardour/session_handle.h" + +#include "widgets/ardour_button.h" + #include "plugin_interest.h" +#include "ardour_dialog.h" namespace ARDOUR { class Session; @@ -35,24 +43,22 @@ namespace ARDOUR { class PluginSelector : public ArdourDialog { - public: - PluginSelector (ARDOUR::PluginManager *); +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 (); void show_manager (); - private: +private: PluginInterestedObject* interested_object; - ARDOUR::Session* session; Gtk::ScrolledWindow scroller; // Available plugins Gtk::ScrolledWindow ascroller; // Added plugins @@ -60,6 +66,11 @@ class PluginSelector : public ArdourDialog Gtk::Entry filter_entry; Gtk::Button filter_button; + ArdourWidgets::ArdourButton fil_hidden_button; + ArdourWidgets::ArdourButton fil_instruments_button; + ArdourWidgets::ArdourButton fil_analysis_button; + ArdourWidgets::ArdourButton fil_utils_button; + void filter_button_clicked (); void filter_entry_changed (); void filter_mode_changed (); @@ -92,7 +103,7 @@ class PluginSelector : public ArdourDialog }; PluginColumns plugin_columns; Glib::RefPtr plugin_model; - Gtk::TreeView plugin_display; + Gtkmm2ext::DnDTreeView plugin_display; Gtk::Button* btn_add; Gtk::Button* btn_remove; @@ -113,24 +124,32 @@ class PluginSelector : public ArdourDialog void ladspa_refiller (const std::string&); void lv2_refiller (const std::string&); void vst_refiller (const std::string&); + void lxvst_refiller (const std::string&); + void mac_vst_refiller (const std::string&); void au_refiller (const std::string&); + void lua_refiller (const std::string&); Gtk::Menu* _plugin_menu; - ARDOUR::PluginManager *manager; + ARDOUR::PluginManager& manager; - void row_clicked(GdkEventButton *); + void row_activated(Gtk::TreeModel::Path path, Gtk::TreeViewColumn* col); void btn_add_clicked(); void btn_remove_clicked(); - void btn_update_clicked(); void added_list_selection_changed(); + void added_row_clicked(GdkEventButton* event); void display_selection_changed(); void btn_apply_clicked(); ARDOUR::PluginPtr load_plugin (ARDOUR::PluginInfoPtr); bool show_this_plugin (const ARDOUR::PluginInfoPtr&, const std::string&); void setup_filter_string (std::string&); - void favorite_changed (const Glib::ustring& path); - void hidden_changed (const Glib::ustring& path); + bool fil_hidden_button_release (GdkEventButton*); + bool fil_instruments_button_release (GdkEventButton*); + bool fil_analysis_button_release (GdkEventButton*); + bool fil_utils_button_release (GdkEventButton*); + + void favorite_changed (const std::string& path); + void hidden_changed (const std::string& path); bool in_row_change; void plugin_chosen_from_menu (const ARDOUR::PluginInfoPtr&); @@ -139,6 +158,12 @@ class PluginSelector : public ArdourDialog Gtk::Menu* create_by_creator_menu (ARDOUR::PluginInfoList&); Gtk::Menu* create_by_category_menu (ARDOUR::PluginInfoList&); void build_plugin_menu (); + PBD::ScopedConnectionList plugin_list_changed_connection; + + bool _show_hidden; + Gtkmm2ext::ActiveState _show_instruments; + Gtkmm2ext::ActiveState _show_analysers; + Gtkmm2ext::ActiveState _show_utils; }; #endif // __ardour_plugin_selector_h__