20 #ifndef __gtk2_ardour_editor_drag_h_
21 #define __gtk2_ardour_editor_drag_h_
65 bool have_item (ArdourCanvas::Item *)
const;
107 Drag (
Editor *, ArdourCanvas::Item *,
bool trackview_only =
true);
115 ArdourCanvas::Item*
item ()
const {
119 void swap_grab (ArdourCanvas::Item *, Gdk::Cursor *, uint32_t);
133 virtual void start_grab (GdkEvent* e, Gdk::Cursor* c = 0);
141 virtual void motion (GdkEvent* e,
bool f) = 0;
147 virtual void finished (GdkEvent* e,
bool m) = 0;
153 virtual void aborted (
bool m) = 0;
164 return std::make_pair (1, 1);
295 int apply_track_delta (
const int start,
const int delta,
const int skip,
const bool distance_only =
false)
const;
318 virtual void start_grab (GdkEvent *, Gdk::Cursor *);
319 virtual void motion (GdkEvent *,
bool);
320 virtual void finished (GdkEvent *,
bool);
356 void motion (GdkEvent *,
bool);
365 return std::make_pair (4, 4);
371 typedef std::set<boost::shared_ptr<ARDOUR::Playlist> >
PlaylistSet;
398 PlaylistSet& modified_playlists
429 void motion (GdkEvent *,
bool);
442 void motion (GdkEvent *,
bool);
446 bool y_movement_allowed (
int delta_track,
double delta_layer,
int skip_invisible = 0)
const;
468 void motion (GdkEvent*,
bool);
482 void motion (GdkEvent *,
bool);
497 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
498 void motion (GdkEvent *,
bool);
514 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
515 void motion (GdkEvent *,
bool);
538 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
539 void motion (GdkEvent *,
bool);
544 return mode == Editing::MouseDraw;
566 void motion (GdkEvent *,
bool);
598 void motion (GdkEvent *,
bool);
600 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
630 TrimDrag (
Editor *, ArdourCanvas::Item *,
RegionView*, std::list<RegionView*>
const &,
bool preserve_fade_anchor =
false);
632 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
633 void motion (GdkEvent *,
bool);
657 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
658 void motion (GdkEvent *,
bool);
684 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
685 void motion (GdkEvent *,
bool);
712 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
713 void motion (GdkEvent *,
bool);
739 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
740 void motion (GdkEvent *,
bool);
757 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
758 void motion (GdkEvent *,
bool);
776 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
777 void motion (GdkEvent *,
bool);
814 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
815 void motion (GdkEvent *,
bool);
839 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
840 void motion (GdkEvent *,
bool);
858 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
859 void motion (GdkEvent *,
bool);
881 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
882 void motion (GdkEvent *,
bool);
887 return std::make_pair (8, 1);
950 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
951 void motion (GdkEvent *,
bool);
962 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
963 void motion (GdkEvent *,
bool);
982 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
983 void motion (GdkEvent *,
bool);
1012 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1013 void motion (GdkEvent *,
bool);
1039 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1040 void motion (GdkEvent *,
bool);
1045 return std::make_pair (4, 4);
1061 void start_grab (GdkEvent *, Gdk::Cursor* c = 0);
1062 void motion (GdkEvent *,
bool);
1081 std::pair<ARDOUR::framepos_t, ARDOUR::framepos_t>
range;
1099 void start_grab (GdkEvent*, Gdk::Cursor* c = 0);
1100 void motion (GdkEvent*,
bool);
1109 return std::make_pair (4, 4);
std::pair< ARDOUR::framecnt_t, int > move_threshold() const
bool y_movement_matters() const
std::pair< ARDOUR::framecnt_t, int > move_threshold() const
bool y_movement_matters() const
MidiRegionView * _region_view
void setup_pointer_frame_offset()
bool allow_vertical_autoscroll() const
boost::shared_ptr< AutomationLine > line
the line
virtual void setup_pointer_frame_offset()
double _cumulative_x_drag
bool active(Editing::MouseMode mode)
bool y_movement_matters() const
CopiedLocationMarkerInfo(ARDOUR::Location *l, Marker *m)
void motion(GdkEvent *, bool)
double initial_y
the initial y position of the view before any reparenting
void finished(GdkEvent *, bool)
bool y_movement_matters() const
CopiedLocationInfo _copied_locations
void setup_pointer_frame_offset()
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void finished(GdkEvent *, bool)
virtual bool active(Editing::MouseMode m)
RegionMoveDrag(Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, bool, bool)
bool allow_vertical_autoscroll() const
void motion(GdkEvent *, bool)
void setup_pointer_frame_offset()
SelectionDrag(Editor *, ArdourCanvas::Item *, Operation)
void motion(GdkEvent *, bool)
PatchChange * _patch_change
bool initially_vertical() const
static Gdk::Cursor * invalid_cursor()
void set_double_click(bool yn)
bool y_movement_matters() const
CursorDrag(Editor *, EditorCursor &, bool)
RangeMarkerBarDrag(Editor *, ArdourCanvas::Item *, Operation)
bool _was_rolling
true if the session was rolling before the drag started, otherwise false
ARDOUR::framepos_t adjusted_current_frame(GdkEvent const *, bool snap=true) const
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
bool _preserve_fade_anchor
std::list< ARDOUR::AudioRange > _ranges
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void setup_pointer_frame_offset()
void update_item(ARDOUR::Location *)
void finished(GdkEvent *, bool)
RouteTimeAxisView * create_destination_time_axis(boost::shared_ptr< ARDOUR::Region >, TimeAxisView *original)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
NoteDrag(Editor *, ArdourCanvas::Item *)
void setup(std::list< boost::shared_ptr< AutomationLine > > const &)
ArdourCanvas::Line * _line
bool y_movement_matters() const
MidiVerticalSelectDrag(Editor *, MidiRegionView *)
bool allow_vertical_autoscroll() const
void show_verbose_cursor_time(framepos_t)
framecnt_t grid_frames(framepos_t) const
void motion(GdkEvent *, bool)
double compute_x_delta(GdkEvent const *, ARDOUR::framepos_t *)
RegionMotionDrag(Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, bool)
void update_item(ARDOUR::Location *)
void finished(GdkEvent *, bool)
NoteResizeDrag(Editor *, ArdourCanvas::Item *)
void set_manager(DragManager *m)
double _last_pointer_layer
std::set< boost::shared_ptr< ARDOUR::Playlist > > PlaylistSet
bool allow_moves_across_tracks
double _region_view_grab_x
double current_pointer_x() const
bool _initially_vertical
true if after move threshold is passed we appear to be moving vertically; undefined before that ...
framepos_t start_at_start
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
virtual void start_grab(GdkEvent *e, Gdk::Cursor *c=0)
virtual void aborted(bool m)=0
double value(boost::shared_ptr< ARDOUR::AutomationList > list, double x) const
MidiRegionView * _region_view
bool allow_vertical_autoscroll() const
void show_verbose_cursor_duration(framepos_t, framepos_t, double xoffset=0)
RegionView * view
the view
Marker * _marker
marker being dragged
RegionView * _primary
the view that was clicked on (or whatever) to start the drag
virtual void motion(GdkEvent *, bool)
double y_fraction(boost::shared_ptr< AutomationLine >, double global_y_position) const
double _cumulative_y_drag
CrossfadeEdgeDrag(Editor *, AudioRegionView *, ArdourCanvas::Item *, bool start)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void finished(GdkEvent *, bool)
bool _starting_point_passed
true if we called move () with first_move flag, otherwise false
framepos_t initial_end
initial end position of the region
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
MouseZoomDrag(Editor *, ArdourCanvas::Item *)
PatchChangeDrag(Editor *, PatchChange *, MidiRegionView *)
bool _y_constrained
true if y motion is constrained, otherwise false
void collect_new_region_view(RegionView *)
void finished(GdkEvent *, bool)
double current_pointer_x() const
RegionView * view
the view
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > start
ARDOUR::framepos_t _current_pointer_frame
frame that the pointer is now at
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
XMLNode * state
the XML state node before the drag
ArdourCanvas::Points _points
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
ScrubDrag(Editor *, ArdourCanvas::Item *)
double _grab_y
y of the grab start position, possibly adjusted if _trackview_only is true
virtual void aborted(bool)
virtual std::pair< ARDOUR::framecnt_t, int > move_threshold() const
virtual bool regions_came_from_canvas() const =0
void setup_pointer_frame_offset()
std::list< TimeAxisView * > _added_time_axes
bool allow_vertical_autoscroll() const
void motion(GdkEvent *, bool)
void select_things(int, framepos_t, framepos_t, double, double, bool)
void finished_copy(bool const, bool const, ARDOUR::framecnt_t const )
void motion(GdkEvent *, bool)
void motion(GdkEvent *, bool)
std::pair< ARDOUR::framecnt_t, int > move_threshold() const
MeterMarkerDrag(Editor *, ArdourCanvas::Item *, bool)
ARDOUR::framepos_t _last_pointer_frame
adjusted_frame the last time a motion occurred
double y_to_region(double) const
ARDOUR::framepos_t grab_frame() const
void add_all_after_to_views(TimeAxisView *tav, framepos_t where, const RegionSelection &exclude, bool drag_in_progress)
ARDOUR::frameoffset_t _max_backwards_drag
void motion(GdkEvent *, bool)
double _current_pointer_x
canvas-coordinate space x of the current pointer
ARDOUR::framepos_t _grab_frame
adjusted_frame that the mouse was at when start_grab was called, or 0
std::list< DraggingView > _views
information about all views that are being dragged
void finished(GdkEvent *, bool)
double current_pointer_y() const
void setup_pointer_frame_offset()
void finished(GdkEvent *, bool)
bool y_movement_matters() const
void motion(GdkEvent *, bool)
class LIBPBD_API StatefulDiffCommand
MidiRubberbandSelectDrag(Editor *, MidiRegionView *)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
AVDraggingView(RegionView *)
TimeAxisView * initial_time_axis_view
bool _ending
true if end_grab or abort is in progress, otherwise false
void finished(GdkEvent *, bool)
void motion(GdkEvent *, bool)
virtual bool y_movement_matters() const
void motion(GdkEvent *, bool)
void finished(GdkEvent *, bool)
ARDOUR::framepos_t raw_grab_frame() const
bool y_movement_matters() const
void motion(GdkEvent *, bool)
LineDrag(Editor *e, ArdourCanvas::Item *i)
double _last_pointer_y
trackview y of the pointer last time a motion occurred
std::vector< TimeAxisView * > _time_axis_views
void motion(GdkEvent *, bool)
void finished(GdkEvent *, bool)
void finished(GdkEvent *, bool)
virtual void start_grab(GdkEvent *, Gdk::Cursor *)
bool _old_follow_playhead
state of Editor::follow_playhead() before the drags started
void region_going_away(RegionView *)
double _grab_zoom
editor frames per unit when our grab started
ArdourCanvas::Rectangle * _drag_rect
virtual bool allow_vertical_autoscroll() const
double current_pointer_y() const
double _cumulative_y_drag
virtual ~RegionMotionDrag()
bool active(Editing::MouseMode m)
virtual std::pair< ARDOUR::framecnt_t, int > move_threshold() const
RegionCutDrag(Editor *, ArdourCanvas::Item *, framepos_t)
MarkerDrag(Editor *, ArdourCanvas::Item *)
CursorContext::Handle _cursor_ctx
cursor change context
virtual bool y_movement_allowed(int, double, int skip_invisible=0) const
boost::shared_ptr< ARDOUR::Region > add_midi_region(MidiTimeAxisView *)
FadeInDrag(Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &)
void do_select_things(GdkEvent *, bool)
framepos_t initial_position
initial position of the region
void setup_pointer_frame_offset()
bool _time_selection_at_start
double last_pointer_frame() const
void swap_grab(ArdourCanvas::Item *, Gdk::Cursor *, uint32_t)
virtual ~RegionMoveDrag()
bool y_movement_allowed(int delta_track, double delta_layer, int skip_invisible=0) const
framepos_t anchored_fade_length
fade_length when anchored during drag
boost::shared_ptr< ARDOUR::Region > _region
AutomationRangeDrag(Editor *, AutomationTimeAxisView *, std::list< ARDOUR::AudioRange > const &)
void motion(GdkEvent *, bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
Drag(Editor *, ArdourCanvas::Item *, bool trackview_only=true)
void motion(GdkEvent *, bool)
void set(Drag *, GdkEvent *, Gdk::Cursor *c=MouseCursors::invalid_cursor())
RegionCreateDrag(Editor *, ArdourCanvas::Item *, TimeAxisView *)
void finished(GdkEvent *, bool)
void show_verbose_cursor_text(std::string const &)
bool _x_constrained
true if x motion is constrained, otherwise false
void motion(GdkEvent *, bool)
double _current_pointer_y
canvas-coordinate space y of the current pointer
void select_things(int, framepos_t, framepos_t, double, double, bool)
double _last_pointer_x
trackview x of the pointer last time a motion occurred
void motion(GdkEvent *, bool)
ARDOUR::framepos_t current_pointer_frame() const
ArdourCanvas::Item * item() const
bool motion_handler(GdkEvent *, bool)
virtual bool end_grab(GdkEvent *)
FadeOutDrag(Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &)
virtual void finished(GdkEvent *e, bool m)=0
ARDOUR::framepos_t _raw_grab_frame
unsnapped frame that the mouse was at when start_grab was called, or 0
void motion(GdkEvent *, bool)
bool y_movement_matters() const
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
ARDOUR::framepos_t adjusted_frame(ARDOUR::framepos_t, GdkEvent const *, bool snap=true) const
void finished(GdkEvent *, bool)
ARDOUR::framecnt_t _pointer_frame_offset
std::list< boost::shared_ptr< Region > > RegionList
void remove_unselected_from_views(framecnt_t amount, bool move_regions)
bool regions_came_from_canvas() const
void start_grab(GdkEvent *, Gdk::Cursor *c=MouseCursors::invalid_cursor())
bool y_movement_matters() const
ArdourCanvas::Item * _item
our item
MidiRegionView * _region_view
void finished(GdkEvent *, bool)
double _cumulative_x_drag
void motion(GdkEvent *, bool)
boost::shared_ptr< ARDOUR::Playlist > initial_playlist
void finished(GdkEvent *, bool)
void fake_locate(framepos_t)
void finished(GdkEvent *, bool)
void setup_pointer_frame_offset()
std::list< AVDraggingView > _views
information about all audio that are being dragged along
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
double _grab_x
trackview x of the grab start position
FeatureLineDrag(Editor *e, ArdourCanvas::Item *i)
bool _was_double_click
true if drag initiated by a double click event
bool motion_handler(GdkEvent *, bool)
void motion(GdkEvent *, bool)
void add_stateful_diff_commands_for_playlists(PlaylistSet const &)
DraggingView(RegionView *, RegionDrag *, TimeAxisView *original_tav)
void finished(GdkEvent *, bool)
void finished(GdkEvent *, bool)
ARDOUR::Location * location
framepos_t initial_position
initial position of the region
bool _jump_position_when_done
void motion(GdkEvent *, bool)
bool allow_vertical_autoscroll() const
void finished_no_copy(bool const, bool const, ARDOUR::framecnt_t const )
bool y_movement_matters() const
bool have_item(ArdourCanvas::Item *) const
void remove_region_from_playlist(boost::shared_ptr< ARDOUR::Region >, boost::shared_ptr< ARDOUR::Playlist >, PlaylistSet &modified_playlists)
ARDOUR::frameoffset_t total_dx() const
void finished(GdkEvent *, bool)
bool _trackview_only
true if pointer y value should always be relative to the top of the trackview group ...
RegionRippleDrag(Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &)
double original_fraction
initial y-fraction before the drag
bool _stop
true to stop the transport on starting the drag, otherwise false
double last_pointer_y() const
RegionInsertDrag(Editor *, boost::shared_ptr< ARDOUR::Region >, RouteTimeAxisView *, ARDOUR::framepos_t)
RegionSpliceDrag(Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &)
std::list< CopiedLocationMarkerInfo > CopiedLocationInfo
void finished(GdkEvent *, bool)
void finished(GdkEvent *, bool)
virtual void finished(GdkEvent *, bool)
virtual void select_things(int button_state, framepos_t x1, framepos_t x2, double y1, double y2, bool drag_in_progress)=0
NoteCreateDrag(Editor *, ArdourCanvas::Item *, MidiRegionView *)
void setup_pointer_frame_offset()
RegionView * insert_region_into_playlist(boost::shared_ptr< ARDOUR::Region >, RouteTimeAxisView *, ARDOUR::layer_t, ARDOUR::framecnt_t, PlaylistSet &)
double last_pointer_x() const
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
Editor * _editor
our editor
void finished(GdkEvent *, bool)
bool was_double_click() const
void finished(GdkEvent *, bool)
ARDOUR::RegionList * exclude
int find_time_axis_view(TimeAxisView *) const
std::list< ControlPoint * > points
points to drag on the line
void finished(GdkEvent *, bool)
bool x_movement_matters() const
void motion(GdkEvent *, bool)
RubberbandSelectDrag(Editor *, ArdourCanvas::Item *)
virtual void deselect_things()=0
void motion(GdkEvent *, bool)
MidiRegionView * _region_view
void motion(GdkEvent *, bool)
TrimDrag(Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, bool preserve_fade_anchor=false)
std::pair< ARDOUR::framepos_t, ARDOUR::framepos_t > range
the range of all points on the line, in session frames
void finished(GdkEvent *, bool)
ControlPointDrag(Editor *, ArdourCanvas::Item *)
bool _move_threshold_passed
true if the move threshold has been passed, otherwise false
virtual void motion(GdkEvent *e, bool f)=0
int _last_pointer_time_axis_view
void motion(GdkEvent *, bool)
std::list< Drag * > _drags
bool regions_came_from_canvas() const
ARDOUR::framepos_t _last_frame_position
last position of the thing being dragged
ARDOUR::frameoffset_t _startdrag_video_offset
TempoMarkerDrag(Editor *, ArdourCanvas::Item *, bool)
TimeFXDrag(Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &)
virtual bool x_movement_matters() const
PBD::ScopedConnection death_connection
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void finished(GdkEvent *, bool)
std::vector< Marker * > markers
VideoTimeLineDrag(Editor *e, ArdourCanvas::Item *i)
framecnt_t selection_length
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void select_things(int, framepos_t, framepos_t, double, double, bool)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
RegionView * _new_region_view
void start_grab(GdkEvent *, Gdk::Cursor *c=0)
void motion(GdkEvent *, bool)
bool end_grab(GdkEvent *)
static double _zero_gain_fraction
EditorRubberbandSelectDrag(Editor *, ArdourCanvas::Item *)
int apply_track_delta(const int start, const int delta, const int skip, const bool distance_only=false) const
void finished(GdkEvent *, bool)
void motion(GdkEvent *, bool)
RegionDrag(Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &)
bool y_movement_matters() const
void motion(GdkEvent *, bool)
ArdourCanvas::Rectangle * _drag_rect
void finished(GdkEvent *, bool)