ardour
instrument_selector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2000-2014 Paul Davis
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
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */
18 
19 #ifndef __gtk_ardour_instrument_selector_h__
20 #define __gtk_ardour_instrument_selector_h__
21 
22 #include <string>
23 
24 #include <gtkmm/combobox.h>
25 #include <gtkmm/comboboxtext.h>
26 #include <gtkmm/treemodel.h>
27 #include <gtkmm/liststore.h>
28 
29 #include "ardour/plugin.h"
30 #include "ardour/types.h"
31 #include "ardour/template_utils.h"
32 
33 #include "ardour_dialog.h"
34 
35 class Editor;
36 
37 class InstrumentSelector : public Gtk::ComboBox
38 {
39 public:
41 
43 
44 private:
45  struct InstrumentListColumns : public Gtk::TreeModel::ColumnRecord {
47  add(name);
48  add(info_ptr);
49  }
50  Gtk::TreeModelColumn<std::string> name;
51  Gtk::TreeModelColumn<ARDOUR::PluginInfoPtr> info_ptr;
52  };
53 
54  void build_instrument_list();
55 
56  Glib::RefPtr<Gtk::ListStore> _instrument_list;
59 };
60 
61 #endif /* __gtk_ardour_instrument_selector_h__ */
Glib::RefPtr< Gtk::ListStore > _instrument_list
ARDOUR::PluginInfoPtr selected_instrument()
InstrumentListColumns _instrument_list_columns
Gtk::TreeModelColumn< ARDOUR::PluginInfoPtr > info_ptr
Definition: editor.h:134
Gtk::TreeModelColumn< std::string > name