time line items now have 64 bit location + duration; start making note resize apply...
[ardour.git] / gtk2_ardour / midi_region_view.h
index 611ba4c142a354ce4c694071b8fec6347fa8c1c6..8bbd535a486e40f2602a804761ba9f4785f7d5c4 100644 (file)
@@ -174,6 +174,7 @@ class MidiRegionView : public RegionView
 
        void start_diff_command(std::string name = "midi edit");
        void diff_add_change(ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::MidiModel::DiffCommand::Property, uint8_t val);
+       void diff_add_change(ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::MidiModel::DiffCommand::Property, Evoral::MusicalTime val);
 
        void apply_delta();
        void apply_diff();
@@ -198,26 +199,29 @@ class MidiRegionView : public RegionView
        /** Get the region position in pixels relative to session. */
        double get_position_pixels();
 
+       /** Get the region end position in pixels relative to session. */
+       double get_end_position_pixels();
+
        /** Begin resizing of some notes.
         * Called by CanvasMidiNote when resizing starts.
-        * @param note_end which end of the note, NOTE_ON or NOTE_OFF
+        * @param at_front which end of the note (true == note on, false == note off)
         */
-       void begin_resizing(ArdourCanvas::CanvasNote::NoteEnd note_end);
+       void begin_resizing(bool at_front);
 
        /** Update resizing notes while user drags.
-        * @param note_end which end of the note, NOTE_ON or NOTE_OFF
+        * @param at_front which end of the note (true == note on, false == note off)
         * @param x the difference in mouse motion, ie the motion difference if relative=true
         *           or the absolute mouse position (track-relative) if relative is false
         * @param relative true if relative resizing is taking place, false if absolute resizing
         */
-       void update_resizing(ArdourCanvas::CanvasNote::NoteEnd note_end, double x, bool relative);
+       void update_resizing(bool at_front, double x, bool relative);
 
        /** Finish resizing notes when the user releases the mouse button.
-        * @param note_end which end of the note, NOTE_ON or NOTE_OFF
+        * @param at_front which end of the note (true == note on, false == note off)
         * @param event_x the absolute mouse position (track-relative)
         * @param relative true if relative resizing is taking place, false if absolute resizing
         */
-       void commit_resizing(ArdourCanvas::CanvasNote::NoteEnd note_end, double event_x, bool relative);
+       void commit_resizing(bool at_front, double event_x, bool relative);
 
        /** Adjust the velocity on a note, and the selection if applicable.
         * @param velocity the relative or absolute velocity
@@ -243,7 +247,6 @@ class MidiRegionView : public RegionView
        struct NoteResizeData {
                ArdourCanvas::CanvasNote  *canvas_note;
                ArdourCanvas::SimpleRect  *resize_rect;
-               double                     current_x;
        };
        
        /** Snap a region relative pixel coordinate to pixel units.
@@ -270,9 +273,6 @@ class MidiRegionView : public RegionView
        /** Convert a timestamp in frames to beats (both relative to region start) */
        double frames_to_beats(nframes64_t beats) const;
 
-       /** Return the current selection as a MidiModel or null if there is no selection */
-       ARDOUR::MidiModel* selection_as_model () const;
-
        void goto_previous_note ();
        void goto_next_note ();
        void change_note_lengths (bool, bool, bool start, bool end);
@@ -283,7 +283,6 @@ class MidiRegionView : public RegionView
        void show_list_editor ();
 
        void selection_as_notelist (NoteList& selected);
-       void replace_selected (NoteList& replacements);
 
   protected:
        /** Allows derived types to specify their visibility requirements