Merge branch 'master' of git@git.ardour.org:ardour/ardour
[ardour.git] / gtk2_ardour / midi_region_view.h
index 7674ea245f78d544ebc3c3141f7eedca478d5c77..5f374da55cc85620e99b808369c15ca57fe6dd4c 100644 (file)
@@ -27,9 +27,7 @@
 
 #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 +125,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
@@ -145,6 +143,8 @@ public:
        void delete_patch_change (ArdourCanvas::CanvasPatchChange *);
        void edit_patch_change (ArdourCanvas::CanvasPatchChange *);
 
+       void delete_sysex (ArdourCanvas::CanvasSysEx*);
+
        /** Alter a given patch to be its predecessor in the MIDNAM file.
         */
        void previous_patch (ArdourCanvas::CanvasPatchChange &);
@@ -183,6 +183,8 @@ public:
        void   note_left(ArdourCanvas::CanvasNoteEvent* ev);
        void   patch_entered (ArdourCanvas::CanvasPatchChange *);
        void   patch_left (ArdourCanvas::CanvasPatchChange *);
+       void   sysex_entered (ArdourCanvas::CanvasSysEx* p);
+       void   sysex_left (ArdourCanvas::CanvasSysEx* p);
        void   note_mouse_position (float xfraction, float yfraction, bool can_set_cursor=true);
        void   unique_select(ArdourCanvas::CanvasNoteEvent* ev);
        void   note_selected(ArdourCanvas::CanvasNoteEvent* ev, bool add, bool extend=false);
@@ -353,7 +355,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;
 
@@ -375,7 +378,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;
 
@@ -476,6 +478,9 @@ private:
        Gdk::Cursor* pre_press_cursor;
 
        NotePlayer* _note_player;
+
+        ARDOUR::ChannelMode get_channel_mode() const;
+        uint16_t get_selected_channels () const;
 };