+ void note_dropped(ArdourCanvas::CanvasNoteEvent* ev, double d_pixels, int8_t d_note);
+
+ void select_matching_notes (uint8_t notenum, uint16_t channel_mask, bool add, bool extend);
+ void toggle_matching_notes (uint8_t notenum, uint16_t channel_mask);
+
+ /** Return true iff the note is within the extent of the region.
+ * @param visible will be set to true if the note is within the visible note range, false otherwise.
+ */
+ bool note_in_region_range(const boost::shared_ptr<NoteType> note, bool& visible) const;
+
+ /** 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 at_front which end of the note (true == note on, false == note off)
+ */
+ void begin_resizing(bool at_front);
+
+ /** Update resizing notes while user drags.
+ * @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(bool at_front, double x, bool relative);
+
+ /** Finish resizing notes when the user releases the mouse button.
+ * @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(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
+ * @param relative whether velocity is relative or absolute
+ */
+ void change_velocity(ArdourCanvas::CanvasNoteEvent* ev, int8_t velocity, bool relative=false);
+
+ /** Change the channel of the selection.
+ * @param channel - the channel number of the new channel, zero-based
+ */
+ void change_channel(uint8_t channel);
+
+ enum MouseState {
+ None,
+ Pressed,
+ SelectTouchDragging,
+ SelectRectDragging,
+ AddDragging
+ };
+
+ MouseState mouse_state() const { return _mouse_state; }
+
+ struct NoteResizeData {
+ ArdourCanvas::CanvasNote *canvas_note;
+ ArdourCanvas::SimpleRect *resize_rect;
+ };
+
+ /** Snap a region relative pixel coordinate to pixel units.
+ * @param x a pixel coordinate relative to region start
+ * @return the snapped pixel coordinate relative to region start
+ */
+ double snap_to_pixel(double x);
+
+ /** Snap a region relative pixel coordinate to frame units.
+ * @param x a pixel coordinate relative to region start
+ * @return the snapped nframes64_t coordinate relative to region start
+ */
+ nframes64_t snap_pixel_to_frame(double x);
+
+ /** Snap a region relative frame coordinate to frame units.
+ * @param x a pixel coordinate relative to region start
+ * @return the snapped nframes64_t coordinate relative to region start
+ */
+ nframes64_t snap_frame_to_frame(nframes64_t x);
+
+ /** Convert a timestamp in beats to frames (both relative to region start) */
+ nframes64_t beats_to_frames(double beats) const;
+
+ /** Convert a timestamp in frames to beats (both relative to region start) */
+ double frames_to_beats(nframes64_t beats) const;
+
+ void goto_previous_note ();
+ void goto_next_note ();
+ void change_note_lengths (bool, bool, bool start, bool end);
+ void change_velocities (bool up, bool fine, bool allow_smush);
+ void transpose (bool up, bool fine, bool allow_smush);
+ void nudge_notes (bool forward);
+
+ void show_list_editor ();
+
+ void selection_as_notelist (Notes& selected);