+ void start_note_diff_command (std::string name = "midi edit");
+ void note_diff_add_change (ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::MidiModel::NoteDiffCommand::Property, uint8_t val);
+ void note_diff_add_change (ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::MidiModel::NoteDiffCommand::Property, Evoral::MusicalTime val);
+ void note_diff_add_note (const boost::shared_ptr<NoteType> note, bool selected, bool show_velocity = false);
+ void note_diff_remove_note (ArdourCanvas::CanvasNoteEvent* ev);
+
+ void apply_diff();
+ void apply_diff_as_subcommand();
+ void abort_command();
+
+ void note_entered(ArdourCanvas::CanvasNoteEvent* ev);
+ void note_left(ArdourCanvas::CanvasNoteEvent* ev);
+ void patch_entered (ArdourCanvas::CanvasPatchChange *);
+ void patch_left (ArdourCanvas::CanvasPatchChange *);
+ 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);
+ void note_deselected(ArdourCanvas::CanvasNoteEvent* ev);
+ void delete_selection();
+ void delete_note (boost::shared_ptr<NoteType>);
+ size_t selection_size() { return _selection.size(); }
+
+ void move_selection(double dx, double dy, double cumulative_dy);
+ void note_dropped (ArdourCanvas::CanvasNoteEvent* ev, ARDOUR::frameoffset_t, 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);
+
+ void update_resizing (ArdourCanvas::CanvasNoteEvent*, bool, double, bool);
+ void commit_resizing (ArdourCanvas::CanvasNoteEvent*, bool, double, bool);
+
+ /** 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 framepos_t coordinate relative to region start
+ */
+ framepos_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 framepos_t coordinate relative to region start
+ */
+ framepos_t snap_frame_to_frame(framepos_t x);
+
+ /** Convert a timestamp in beats to frames (both relative to region start) */
+ framepos_t beats_to_frames(double beats) const;
+
+ /** Convert a timestamp in frames to beats (both relative to region start) */
+ double frames_to_beats(framepos_t) const;
+
+ void goto_previous_note ();
+ void goto_next_note ();
+ void change_note_lengths (bool, bool, Evoral::MusicalTime beats, 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, bool allow_all_if_none_selected = false);
+
+ void enable_display (bool);