OSC: Add preset loading to OSC GUI
[ardour.git] / gtk2_ardour / patch_change_dialog.h
index 06912601268035869f970292e7eb590f02fb5cd9..d19234d2c47ae1536d183fe87722668cdb274d0d 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <gtkmm/spinbutton.h>
 #include <gtkmm/comboboxtext.h>
-#include "midi++/midnam_patch.h"
+
 #include "evoral/PatchChange.hpp"
 #include "ardour_dialog.h"
 #include "audio_clock.h"
@@ -28,6 +28,7 @@
 namespace ARDOUR {
        class BeatsFramesConverter;
        class Session;
+       class InstrumentInfo;
 }
 
 namespace MIDI {
@@ -42,13 +43,13 @@ public:
        PatchChangeDialog (
                const ARDOUR::BeatsFramesConverter *,
                ARDOUR::Session *,
-               Evoral::PatchChange<Evoral::MusicalTime> const &,
-               std::string const &,
-               std::string const &,
-               const Gtk::BuiltinStockID &
+               Evoral::PatchChange<Evoral::Beats> const &,
+               ARDOUR::InstrumentInfo&,
+               const Gtk::BuiltinStockID &,
+               bool allow_delete = false
                );
 
-       Evoral::PatchChange<Evoral::MusicalTime> patch () const;
+       Evoral::PatchChange<Evoral::Beats> patch () const;
 
 private:
        void fill_bank_combo ();
@@ -61,11 +62,8 @@ private:
        void bank_changed ();
        void program_changed ();
 
-       MIDI::Name::ChannelNameSet::PatchBanks const * get_banks ();
-       
        const ARDOUR::BeatsFramesConverter* _time_converter;
-       std::string _model_name;
-       std::string _custom_device_mode;
+        ARDOUR::InstrumentInfo& _info;
        AudioClock _time;
        Gtk::SpinButton _channel;
        Gtk::SpinButton _program;
@@ -75,4 +73,7 @@ private:
 
        boost::shared_ptr<MIDI::Name::PatchBank> _current_patch_bank;
        bool _ignore_signals;
+
+        void instrument_info_changed ();
+        PBD::ScopedConnection _info_changed_connection;
 };