Ardour  9.0-pre0-582-g084a23a80d
plugin_manager_ui.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef _gtkardour_plugin_manager_h_
20 #define _gtkardour_plugin_manager_h_
21 
22 #include <gtkmm/box.h>
23 #include <gtkmm/button.h>
24 #include <gtkmm/liststore.h>
25 #include <gtkmm/scrolledwindow.h>
26 #include <gtkmm/table.h>
27 #include <gtkmm/textview.h>
28 #include <gtkmm/treemodel.h>
29 #include <gtkmm/treerowreference.h>
30 #include <gtkmm/treestore.h>
31 #include <gtkmm/treeview.h>
32 
33 #include "widgets/ardour_button.h"
34 #include "widgets/pane.h"
35 
36 #include "ardour/plugin_manager.h"
37 
38 #include "ardour_window.h"
39 
41 {
42 public:
45 
46 private:
47  void refill ();
50  void blacklist_changed (std::string const&);
51  void favorite_changed (std::string const&);
52  void hidden_changed (std::string const&);
54 
55  void reindex ();
56  void discover ();
57  void rescan_all ();
58  void rescan_faulty ();
59  void rescan_selected ();
60  void clear_log ();
63  void edit_vst_path (std::string const&, std::string const&, sigc::slot<std::string>, sigc::slot<bool, std::string>);
64 
67  bool show_this_plugin (std::shared_ptr<ARDOUR::PluginScanLogEntry>, ARDOUR::PluginInfoPtr, const std::string&);
68 
70 
71  struct PluginCount {
73  : total (0)
74  , error (0)
75  , stale (0)
76  , ndscn (0)
77  {}
78 
79  void set (ARDOUR::PluginScanLogEntry const& psle);
80 
81  unsigned int total;
82  unsigned int error;
83  unsigned int stale;
84  unsigned int ndscn;
85  };
86 
89  {
90  add (status);
91  add (blacklisted);
92  add (favorite);
93  add (hidden);
94  add (type);
95  add (path);
96  add (name);
97  add (creator);
98  add (tags);
99  add (psle);
100  add (plugin);
101  add (can_blacklist);
102  add (can_fav_hide);
103  }
117  };
118 
120  Glib::RefPtr<Gtk::ListStore> plugin_model;
143 
145 
148 
150 };
151 
152 #endif // _gtkardour_plugin_manager_h_
void add(TreeModelColumnBase &column)
ArdourWidgets::ArdourButton _btn_rescan_all
PluginColumns plugin_columns
ArdourWidgets::ArdourButton _cb_search_type
Gtk::Button _btn_search_clear
ArdourWidgets::ArdourButton _btn_reindex
void edit_vst_path(std::string const &, std::string const &, sigc::slot< std::string >, sigc::slot< bool, std::string >)
ArdourWidgets::ArdourButton _btn_rescan_sel
void favorite_changed(std::string const &)
void selection_changed()
ArdourWidgets::ArdourButton _btn_prefs
void search_clear_button_clicked()
void blacklist_changed(std::string const &)
PBD::ScopedConnectionList _manager_connections
void row_activated(Gtk::TreeModel::Path const &, Gtk::TreeViewColumn *)
Gtk::TextView _log
Gtk::TreeView plugin_display
ArdourWidgets::ArdourButton _cb_search_name
void hidden_changed(std::string const &)
ArdourWidgets::ArdourButton _cb_search_creator
ArdourWidgets::ArdourButton _cb_search_tags
Gtk::ScrolledWindow _log_scroller
void search_entry_changed()
void vst_path_cb(ARDOUR::PluginType)
Glib::RefPtr< Gtk::ListStore > plugin_model
bool show_this_plugin(std::shared_ptr< ARDOUR::PluginScanLogEntry >, ARDOUR::PluginInfoPtr, const std::string &)
void show_plugin_prefs()
void plugin_status_changed(ARDOUR::PluginType, std::string, ARDOUR::PluginManager::PluginStatusType)
ArdourWidgets::ArdourButton _cb_search_base_name
ArdourWidgets::ArdourButton _btn_discover
ArdourWidgets::ArdourButton _btn_rescan_err
Gtk::Entry _entry_search
void maybe_refill(ArdourWidgets::ArdourButton *)
ArdourWidgets::ArdourButton _btn_clear
ArdourWidgets::VPane _pane
void rescan_selected()
void rescan_faulty()
Gtk::ScrolledWindow _scroller
ArdourWidgets::ArdourButton _cb_search_full_path
Gtk::Table _tbl_search
std::shared_ptr< PluginInfo > PluginInfoPtr
Definition: plugin.h:65
Gtk::TreeModelColumn< bool > can_fav_hide
Gtk::TreeModelColumn< std::string > path
Gtk::TreeModelColumn< bool > blacklisted
Gtk::TreeModelColumn< std::string > creator
Gtk::TreeModelColumn< std::shared_ptr< ARDOUR::PluginScanLogEntry > > psle
Gtk::TreeModelColumn< bool > hidden
Gtk::TreeModelColumn< std::string > status
Gtk::TreeModelColumn< bool > favorite
Gtk::TreeModelColumn< std::string > tags
Gtk::TreeModelColumn< bool > can_blacklist
Gtk::TreeModelColumn< ARDOUR::PluginInfoPtr > plugin
Gtk::TreeModelColumn< std::string > name
Gtk::TreeModelColumn< std::string > type
void set(ARDOUR::PluginScanLogEntry const &psle)