2 * Copyright (C) 2018-2019 Robin Gareus <robin@gareus.org>
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.
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.
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.
19 #ifndef _gtkardour_plugin_presets_ui_h_
20 #define _gtkardour_plugin_presets_ui_h_
22 #include <gtkmm/label.h>
23 #include <gtkmm/liststore.h>
24 #include <gtkmm/scrolledwindow.h>
25 #include <gtkmm/table.h>
26 #include <gtkmm/textview.h>
27 #include <gtkmm/treemodel.h>
28 #include <gtkmm/treestore.h>
29 #include <gtkmm/treeview.h>
31 #include "widgets/ardour_button.h"
33 #include "ardour/plugin_insert.h"
35 class PluginPresetsUI : public Gtk::Table
38 PluginPresetsUI (boost::shared_ptr<ARDOUR::PluginInsert>);
41 void update_preset_list ();
42 void preset_selected ();
43 void row_activated (Gtk::TreeModel::Path, Gtk::TreeViewColumn*);
46 boost::shared_ptr<ARDOUR::PluginInsert> _insert;
47 PBD::ScopedConnectionList _preset_connections;
49 struct PluginPresetModelColumns : public Gtk::TreeModel::ColumnRecord {
50 PluginPresetModelColumns () {
56 Gtk::TreeModelColumn<std::string> name;
57 Gtk::TreeModelColumn<std::string> description;
58 Gtk::TreeModelColumn<ARDOUR::Plugin::PresetRecord> plugin_preset;
61 ArdourWidgets::ArdourButton _load_button;
63 PluginPresetModelColumns _plugin_preset_columns;
64 Gtk::TreeView _plugin_preset_display;
65 Glib::RefPtr<Gtk::TreeStore> _plugin_preset_model;
66 Gtk::ScrolledWindow _preset_scroller;
67 Gtk::TextView _preset_desc;