Ardour  8.12
instrument_selector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2017 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 __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 "pbd/signals.h"
30 
31 #include "ardour/plugin.h"
32 #include "ardour/types.h"
33 #include "ardour/template_utils.h"
34 
35 #include "ardour_dialog.h"
36 
37 class Editor;
38 
40 {
41 public:
43  ForAuditioner, /* this will always return some synth, never 'None' */
44  ForTrackDefault, /* functionally same as ForAuditioner, but for tracks */
45  ForTrackSelector /* this provides the 'None' option so the user can add a synth later */
46  };
47 
49 
51  std::string selected_instrument_name () const;
52 
53  static sigc::signal<void> DropPluginInfoPtr;
54 
55 private:
58  add(name);
59  add(info_ptr);
60  }
63  };
64 
66  void refill();
68 
70 
71  Glib::RefPtr<Gtk::ListStore> _instrument_list;
74  uint32_t _gmsynth_id;
77 };
78 
79 #endif /* __gtk_ardour_instrument_selector_h__ */
Definition: editor.h:158
void add(TreeModelColumnBase &column)
void build_instrument_list()
std::string selected_instrument_name() const
static sigc::signal< void > DropPluginInfoPtr
Glib::RefPtr< Gtk::ListStore > _instrument_list
InstrumentSelector(InstrumentListDisposition)
std::string _longest_instrument_name
InstrumentListDisposition _disposition
PBD::ScopedConnection _update_connection
InstrumentListColumns _instrument_list_columns
ARDOUR::PluginInfoPtr selected_instrument() const
std::shared_ptr< PluginInfo > PluginInfoPtr
Definition: plugin.h:66
Gtk::TreeModelColumn< ARDOUR::PluginInfoPtr > info_ptr
Gtk::TreeModelColumn< std::string > name