Ardour  8.12
plugin_selector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2006 Doug McLain <doug@nostar.net>
3  * Copyright (C) 2005-2006 Taybin Rutkin <taybin@taybin.com>
4  * Copyright (C) 2005-2011 Paul Davis <paul@linuxaudiosystems.com>
5  * Copyright (C) 2006-2012 David Robillard <d@drobilla.net>
6  * Copyright (C) 2006 Nick Mainsbridge <mainsbridge@gmail.com>
7  * Copyright (C) 2009 Carl Hetherington <carl@carlh.net>
8  * Copyright (C) 2014-2019 Robin Gareus <robin@gareus.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along
21  * with this program; if not, write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24 
25 #ifndef __ardour_plugin_selector_h__
26 #define __ardour_plugin_selector_h__
27 
28 #include <gtkmm/button.h>
29 #include <gtkmm/checkbutton.h>
30 #include <gtkmm/comboboxtext.h>
31 #include <gtkmm/entry.h>
32 #include <gtkmm/liststore.h>
33 #include <gtkmm/notebook.h>
34 #include <gtkmm/scrolledwindow.h>
35 #include <gtkmm/treemodel.h>
36 #include <gtkmm/treeview.h>
37 
38 #include "widgets/ardour_button.h"
40 
41 #include "gtkmm2ext/dndtreeview.h"
42 
43 #include "ardour/plugin.h"
44 #include "ardour/plugin_manager.h"
45 #include "ardour/session_handle.h"
46 
47 #include "plugin_interest.h"
48 #include "ardour_dialog.h"
49 
50 namespace ARDOUR {
51  class Session;
52  class PluginManager;
53 }
54 
56 {
57 public:
60 
62 
63  int run (); // XXX should we try not to overload the non-virtual Gtk::Dialog::run() ?
64 
65  void on_show ();
66 
68  void show_manager ();
69 
70 private:
71 
72  //search
76 
77  //radio-button filters
84 
85  /* combobox filters */
88 
90 
91  Gtk::ScrolledWindow scroller; // Available plugins
92  Gtk::ScrolledWindow ascroller; // Added plugins
93 
96 
100 
102 
105 
107  sigc::connection tag_entry_connection;
108 
109  void tags_changed ( ARDOUR::PluginType t, std::string unique_id, std::string tag);
110 
113  add (favorite);
114  add (name);
115  add (tags);
116  add (creator);
117  add (type_name);
118  add (audio_io);
119  add (midi_io);
120  add (plugin);
121  }
130  };
132  Glib::RefPtr<Gtk::ListStore> plugin_model;
136 
139  add (text);
140  add (plugin);
141  }
144  };
146  Glib::RefPtr<Gtk::ListStore> amodel;
148 
149  void refill ();
150  void refiller (const ARDOUR::PluginInfoList& plugs, const::std::string& filterstr, const char* type);
151  void ladspa_refiller (const std::string&);
152  void lv2_refiller (const std::string&);
153  void vst_refiller (const std::string&);
154  void lxvst_refiller (const std::string&);
155  void mac_vst_refiller (const std::string&);
156  void au_refiller (const std::string&);
157  void lua_refiller (const std::string&);
158  void vst3_refiller (const std::string&);
159 
162 
171  bool show_this_plugin (const ARDOUR::PluginInfoPtr&, const std::string&);
172 
173  void favorite_changed (const std::string& path);
175 
177 
179 
186 
191 };
192 
193 #endif // __ardour_plugin_selector_h__
void add(TreeModelColumnBase &column)
void path(Glib::ustring &path, Glib::ustring &path_reversed)
Compute a widget's path of the form "GtkWindow.MyLabel".
bool event(GdkEvent *event)
void mac_vst_refiller(const std::string &)
PluginInterestedObject * interested_object
Gtk::Menu * _plugin_menu
ArdourWidgets::ArdourButton * _search_ignore_checkbox
void plugin_chosen_from_menu(const ARDOUR::PluginInfoPtr &)
Gtk::Menu * plugin_menu()
void display_selection_changed()
Gtkmm2ext::DnDTreeView< ARDOUR::PluginInfoPtr > plugin_display
void tags_changed(ARDOUR::PluginType t, std::string unique_id, std::string tag)
Gtk::Button * tag_reset_button
sigc::connection tag_entry_connection
void vst_refiller(const std::string &)
Gtk::ScrolledWindow scroller
Gtk::Menu * create_by_creator_menu(ARDOUR::PluginInfoList &)
Gtk::RadioButton * _fil_all_radio
PluginSelector(ARDOUR::PluginManager &)
ArdourWidgets::ArdourButton * _search_name_checkbox
ArdourWidgets::ArdourButton * _search_tags_checkbox
void btn_remove_clicked()
Gtk::RadioButton * _fil_hidden_radio
PluginColumns plugin_columns
PBD::ScopedConnectionList plugin_list_changed_connection
void favorite_changed(const std::string &path)
Gtk::TreeView added_list
void added_row_clicked(GdkEventButton *event)
void lxvst_refiller(const std::string &)
void au_refiller(const std::string &)
void ladspa_refiller(const std::string &)
void plugin_status_changed(ARDOUR::PluginType t, std::string unique_id, ARDOUR::PluginManager::PluginStatusType s)
void added_list_selection_changed()
void row_activated(Gtk::TreeModel::Path path, Gtk::TreeViewColumn *col)
Glib::RefPtr< Gtk::ListStore > plugin_model
void lv2_refiller(const std::string &)
AddedColumns acols
Gtk::RadioButton * _fil_utils_radio
Gtk::Menu * create_charts_menu(ARDOUR::PluginInfoList &)
void on_show()
This is a default handler for the signal signal_show().
void search_entry_changed()
ARDOUR::PluginPtr load_plugin(ARDOUR::PluginInfoPtr)
Glib::RefPtr< Gtk::ListStore > amodel
Gtk::Button search_clear_button
void lua_refiller(const std::string &)
ArdourWidgets::ArdourDropdown _fil_creator_combo
void set_sensitive_widgets()
Gtk::RadioButton * _fil_instruments_radio
void refiller(const ARDOUR::PluginInfoList &plugs, const ::std::string &filterstr, const char *type)
void build_plugin_menu()
ARDOUR::PluginManager & manager
void tag_reset_button_clicked()
void set_interested_object(PluginInterestedObject &)
Gtk::RadioButton * _fil_favorites_radio
void btn_add_clicked()
Gtk::ScrolledWindow ascroller
void search_clear_button_clicked()
void tag_entry_changed()
ArdourWidgets::ArdourDropdown _fil_type_combo
void btn_apply_clicked()
Gtk::Entry * tag_entry
Gtk::Menu * create_by_tags_menu(ARDOUR::PluginInfoList &)
void show_manager()
Gtk::RadioButton * _fil_effects_radio
Gtk::Button * btn_remove
bool show_this_plugin(const ARDOUR::PluginInfoPtr &, const std::string &)
Gtk::Menu * create_favs_menu(ARDOUR::PluginInfoList &)
Gtk::Button * btn_add
Gtk::Entry search_entry
void vst3_refiller(const std::string &)
std::list< PluginInfoPtr > PluginInfoList
Definition: plugin.h:67
std::shared_ptr< Plugin > PluginPtr
Definition: plugin.h:63
std::shared_ptr< PluginInfo > PluginInfoPtr
Definition: plugin.h:66
DebugBits PluginManager
Definition: plugin.h:542
Gtk::TreeModelColumn< ARDOUR::PluginInfoPtr > plugin
Gtk::TreeModelColumn< std::string > text
Gtk::TreeModelColumn< std::string > name
Gtk::TreeModelColumn< std::string > midi_io
Gtk::TreeModelColumn< std::string > creator
Gtk::TreeModelColumn< ARDOUR::PluginInfoPtr > plugin
Gtk::TreeModelColumn< std::string > audio_io
Gtk::TreeModelColumn< bool > favorite
Gtk::TreeModelColumn< std::string > tags
Gtk::TreeModelColumn< std::string > type_name