Ardour  9.0-pre0-582-g084a23a80d
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 #pragma once
20 
21 #include <string>
22 
23 #include <gtkmm/combobox.h>
24 #include <gtkmm/comboboxtext.h>
25 #include <gtkmm/treemodel.h>
26 #include <gtkmm/liststore.h>
27 
28 #include "pbd/signals.h"
29 
30 #include "ardour/plugin.h"
31 #include "ardour/types.h"
32 #include "ardour/template_utils.h"
33 
34 #include "ardour_dialog.h"
35 
36 class Editor;
37 
39 {
40 public:
42  ForAuditioner, /* this will always return some synth, never 'None' */
43  ForTrackDefault, /* functionally same as ForAuditioner, but for tracks */
44  ForTrackSelector /* this provides the 'None' option so the user can add a synth later */
45  };
46 
48 
50  std::string selected_instrument_name () const;
51 
52  static sigc::signal<void> DropPluginInfoPtr;
53 
54 private:
57  add(name);
58  add(info_ptr);
59  }
62  };
63 
65  void refill();
67 
69 
70  Glib::RefPtr<Gtk::ListStore> _instrument_list;
73  uint32_t _gmsynth_id;
76 };
77 
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:65
Gtk::TreeModelColumn< ARDOUR::PluginInfoPtr > info_ptr
Gtk::TreeModelColumn< std::string > name