Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
26 
27 #include <gtkmm/button.h>
28 #include <gtkmm/checkbutton.h>
29 #include <gtkmm/comboboxtext.h>
30 #include <gtkmm/entry.h>
31 #include <gtkmm/liststore.h>
32 #include <gtkmm/notebook.h>
33 #include <gtkmm/scrolledwindow.h>
34 #include <gtkmm/treemodel.h>
35 #include <gtkmm/treeview.h>
36 
37 #include "widgets/ardour_button.h"
39 
40 #include "gtkmm2ext/dndtreeview.h"
41 
42 #include "ardour/plugin.h"
43 #include "ardour/plugin_manager.h"
44 #include "ardour/session_handle.h"
45 
46 #include "plugin_interest.h"
47 #include "ardour_dialog.h"
48 
49 namespace ARDOUR {
50  class Session;
51  class PluginManager;
52 }
53 
55 {
56 public:
59 
61 
62  int run (); // XXX should we try not to overload the non-virtual Gtk::Dialog::run() ?
63 
64  void on_show ();
65 
67  void show_manager ();
68 
69 private:
70 
71  //search
75 
76  //radio-button filters
83 
84  /* combobox filters */
87 
89 
90  Gtk::ScrolledWindow scroller; // Available plugins
91  Gtk::ScrolledWindow ascroller; // Added plugins
92 
95 
99 
101 
104 
106  sigc::connection tag_entry_connection;
107 
108  void tags_changed ( ARDOUR::PluginType t, std::string unique_id, std::string tag);
109 
112  add (favorite);
113  add (name);
114  add (tags);
115  add (creator);
116  add (type_name);
117  add (audio_io);
118  add (midi_io);
119  add (plugin);
120  }
129  };
131  Glib::RefPtr<Gtk::ListStore> plugin_model;
135 
138  add (text);
139  add (plugin);
140  }
143  };
145  Glib::RefPtr<Gtk::ListStore> amodel;
147 
148  void refill ();
149  void refiller (const ARDOUR::PluginInfoList& plugs, const::std::string& filterstr, const char* type);
150  void ladspa_refiller (const std::string&);
151  void lv2_refiller (const std::string&);
152  void vst_refiller (const std::string&);
153  void lxvst_refiller (const std::string&);
154  void mac_vst_refiller (const std::string&);
155  void au_refiller (const std::string&);
156  void lua_refiller (const std::string&);
157  void vst3_refiller (const std::string&);
158 
161 
170  bool show_this_plugin (const ARDOUR::PluginInfoPtr&, const std::string&);
171 
172  void favorite_changed (const std::string& path);
174 
176 
178 
185 
190 };
191 
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:66
std::shared_ptr< Plugin > PluginPtr
Definition: plugin.h:62
std::shared_ptr< PluginInfo > PluginInfoPtr
Definition: plugin.h:65
DebugBits PluginManager
Definition: plugin.h:541
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