Ardour  9.0-pre0-582-g084a23a80d
patch_change_dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010-2012 Carl Hetherington <carl@carlh.net>
3  * Copyright (C) 2012-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2013-2015 David Robillard <d@drobilla.net>
5  * Copyright (C) 2017-2019 Robin Gareus <robin@gareus.org>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21 
22 #pragma once
23 
24 #include <gtkmm/comboboxtext.h>
25 #include <gtkmm/spinbutton.h>
26 #include <gtkmm/comboboxtext.h>
27 
28 #include "evoral/PatchChange.h"
29 #include "ardour_dialog.h"
30 #include "audio_clock.h"
31 
32 namespace ARDOUR {
33  class Session;
34  class InstrumentInfo;
35 }
36 
37 namespace MIDI {
38  namespace Name {
39  class PatchBank;
40  }
41 }
42 
44 {
45 public:
50  const Gtk::BuiltinStockID&,
51  bool allow_delete = false,
52  bool modal = true,
53  std::shared_ptr<ARDOUR::Region> region = std::shared_ptr<ARDOUR::Region>()
54  );
55 
57 
58 protected:
59  void on_response (int);
60 
61 private:
62  void fill_bank_combo ();
68  void channel_changed ();
69  void bank_changed ();
70  void program_changed ();
71 
72  int get_14bit_bank () const;
73 
74  const std::shared_ptr<ARDOUR::Region> _region;
83 
84  std::shared_ptr<MIDI::Name::PatchBank> _current_patch_bank;
85 
87  bool _keep_open;
88 
91 };
void patch_combo_changed()
Evoral::PatchChange< Temporal::Beats > patch() const
int get_14bit_bank() const
Gtk::SpinButton _bank_lsb
PatchChangeDialog(ARDOUR::Session *, Evoral::PatchChange< Temporal::Beats > const &, ARDOUR::InstrumentInfo &, const Gtk::BuiltinStockID &, bool allow_delete=false, bool modal=true, std::shared_ptr< ARDOUR::Region > region=std::shared_ptr< ARDOUR::Region >())
Gtk::SpinButton _program
std::shared_ptr< MIDI::Name::PatchBank > _current_patch_bank
Gtk::SpinButton _channel
void set_active_bank_combo()
void instrument_info_changed()
const std::shared_ptr< ARDOUR::Region > _region
PBD::ScopedConnection _info_changed_connection
ARDOUR::InstrumentInfo & _info
void bank_combo_changed()
void on_response(int)
This is a default handler for the signal signal_response().
Gtk::ComboBoxText _patch_combo
Gtk::SpinButton _bank_msb
Gtk::ComboBoxText _bank_combo
void set_active_patch_combo()
PBD::PropertyDescriptor< bool > region