Merge branch 'master' into windows
[ardour.git] / gtk2_ardour / midi_region_view.h
index ac0736949da36bf3d7b3e0bf914903b124f9b545..219d07f37615cf482900cbfb4294b2ba1fa734c7 100644 (file)
 #include <string>
 #include <vector>
 
+#ifdef interface
+#undef interface
+#endif
+
 #include <libgnomecanvasmm.h>
 #include <libgnomecanvasmm/polygon.h>
 
 #include "pbd/signals.h"
 
-#include "ardour/midi_track.h"
 #include "ardour/midi_model.h"
-#include "ardour/diskstream.h"
 #include "ardour/types.h"
 
 #include "editing.h"
@@ -127,11 +129,11 @@ public:
         * @key a reference to an instance of MIDI::Name::PatchPrimaryKey whose fields will
         *        will be set according to the result of the lookup
         */
-        void get_patch_key_at (double time, uint8_t channel, MIDI::Name::PatchPrimaryKey& key);       
+       void get_patch_key_at (double time, uint8_t channel, MIDI::Name::PatchPrimaryKey& key) const;
 
-        /** Convert a given PatchChange into a PatchPrimaryKey
-         */
-        MIDI::Name::PatchPrimaryKey patch_change_to_patch_key (ARDOUR::MidiModel::PatchChangePtr);
+       /** Convert a given PatchChange into a PatchPrimaryKey
+        */
+       MIDI::Name::PatchPrimaryKey patch_change_to_patch_key (ARDOUR::MidiModel::PatchChangePtr);
 
        /** Change old_patch to new_patch.
         * @param old_patch the canvas patch change which is to be altered
@@ -357,7 +359,8 @@ private:
        bool canvas_event(GdkEvent* ev);
        bool note_canvas_event(GdkEvent* ev);
 
-       void midi_channel_mode_changed(ARDOUR::ChannelMode mode, uint16_t mask);
+       void midi_channel_mode_changed ();
+        PBD::ScopedConnection _channel_mode_changed_connection;
        void instrument_settings_changed ();
        PBD::ScopedConnection _instrument_changed_connection;
 
@@ -379,7 +382,6 @@ private:
        void show_verbose_cursor (std::string const &, double, double) const;
        void show_verbose_cursor (boost::shared_ptr<NoteType>) const;
 
-       uint16_t _last_channel_selection;
        uint8_t  _current_range_min;
        uint8_t  _current_range_max;
 
@@ -480,6 +482,9 @@ private:
        Gdk::Cursor* pre_press_cursor;
 
        NotePlayer* _note_player;
+
+        ARDOUR::ChannelMode get_channel_mode() const;
+        uint16_t get_selected_channels () const;
 };