2 * Copyright (C) 2016-2017 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 __gtk_ardour_instrument_selector_h__
20 #define __gtk_ardour_instrument_selector_h__
24 #include <gtkmm/combobox.h>
25 #include <gtkmm/comboboxtext.h>
26 #include <gtkmm/treemodel.h>
27 #include <gtkmm/liststore.h>
29 #include "pbd/signals.h"
31 #include "ardour/plugin.h"
32 #include "ardour/types.h"
33 #include "ardour/template_utils.h"
35 #include "ardour_dialog.h"
39 class InstrumentSelector : public Gtk::ComboBox
44 ARDOUR::PluginInfoPtr selected_instrument();
47 struct InstrumentListColumns : public Gtk::TreeModel::ColumnRecord {
48 InstrumentListColumns() {
52 Gtk::TreeModelColumn<std::string> name;
53 Gtk::TreeModelColumn<ARDOUR::PluginInfoPtr> info_ptr;
56 void build_instrument_list();
59 Glib::RefPtr<Gtk::ListStore> _instrument_list;
60 InstrumentListColumns _instrument_list_columns;
61 uint32_t _reasonable_synth_id;
63 PBD::ScopedConnection _update_connection;
66 #endif /* __gtk_ardour_instrument_selector_h__ */