![]() |
Ardour
9.0-pre0-1792-g9dafed2d76
|
#include <editor_drag.h>
Public Types | |
typedef std::pair< int, int > | MoveThreshold |
Protected Member Functions | |
double | grab_x () const |
double | grab_y () const |
Temporal::timepos_t | pixel_duration_to_time (double x) const |
Temporal::timepos_t | raw_grab_time () const |
ARDOUR::samplepos_t | grab_sample () const |
Temporal::timepos_t | grab_time () const |
double | last_pointer_x () const |
double | last_pointer_y () const |
ARDOUR::samplepos_t | last_pointer_sample () const |
Temporal::timepos_t | last_pointer_time () const |
Temporal::timecnt_t | snap_delta (guint const) const |
double | current_pointer_x () const |
double | current_pointer_y () const |
void | setup_snap_delta (Temporal::timepos_t const &pos) |
std::shared_ptr< ARDOUR::Region > | add_midi_region (MidiTimeAxisView *, bool commit) |
void | show_verbose_cursor_time (Temporal::timepos_t const &) |
void | show_verbose_cursor_duration (Temporal::timepos_t const &, Temporal::timepos_t const &, double xoffset=0) |
void | show_verbose_cursor_text (std::string const &) |
void | show_view_preview (Temporal::timepos_t const &) |
Protected Attributes | |
EditingContext & | editing_context |
DragManager * | _drags |
ArdourCanvas::Item * | _item |
our item More... | |
ArdourCanvas::Item const * | _bounding_item |
our coordinate reference (normally null) More... | |
Temporal::timecnt_t | _pointer_offset |
Temporal::timecnt_t | _video_offset |
bool | _preview_video |
bool | _x_constrained |
true if x motion is constrained, otherwise false More... | |
bool | _y_constrained |
true if y motion is constrained, otherwise false More... | |
bool | _was_rolling |
true if the session was rolling before the drag started, otherwise false More... | |
ARDOUR::timepos_t | _earliest_time_limit |
time we cannot drag before (defaults to 0, indicating no such limit) More... | |
bool | _copy |
Private Attributes | |
bool | _trackview_only |
true if pointer y value should always be relative to the top of the trackview group More... | |
bool | _hide_snapped_cursor |
set true of Drag::motion does not call set_snapped_cursor_position More... | |
bool | _move_threshold_passed |
true if the move threshold has been passed, otherwise false More... | |
bool | _starting_point_passed |
true if we called move () with first_move flag, otherwise false More... | |
bool | _initially_vertical |
true if after move threshold is passed we appear to be moving vertically; undefined before that More... | |
bool | _was_double_click |
true if drag initiated by a double click event More... | |
double | _grab_x |
trackview x of the grab start position More... | |
double | _grab_y |
y of the grab start position, possibly adjusted if _bounding_itme is non-null More... | |
double | _last_pointer_x |
trackview x of the pointer last time a motion occurred More... | |
double | _last_pointer_y |
trackview y of the pointer last time a motion occurred More... | |
Temporal::timepos_t | _raw_grab_time |
unsnapped time that the mouse was at when start_grab was called, or 0 More... | |
Temporal::timepos_t | _grab_time |
adjusted_time that the mouse was at when start_grab was called, or 0 More... | |
Temporal::timepos_t | _last_pointer_time |
adjusted_time the last time a motion occurred More... | |
Temporal::TimeDomain | _time_domain |
Temporal::timecnt_t | _snap_delta |
bool | _constraint_pressed |
if the keyboard indicated constraint modifier was pressed on start_grab() More... | |
int | _grab_button |
Gtkmm2ext::Bindings::DragsBlockBindings | binding_blocker |
Abstract base class for dragging of things within the editor
Definition at line 154 of file editor_drag.h.
typedef std::pair<int,int> Drag::MoveThreshold |
Definition at line 226 of file editor_drag.h.
Drag::Drag | ( | EditingContext & | , |
ArdourCanvas::Item * | , | ||
Temporal::TimeDomain | td, | ||
ArdourCanvas::Item const * | bounding_item, | ||
bool | hide_snapped_cursor = true |
||
) |
|
virtual |
void Drag::abort | ( | ) |
|
pure virtual |
Called to abort a drag and return things to how they were before it started.
m | true if some movement occurred, otherwise false. |
Implemented in ClipEndDrag, ClipStartDrag, VelocityLineDrag, AutomationDrawDrag, LollipopDrag, RegionMarkerDrag, CrossfadeEdgeDrag, AutomationRangeDrag, MouseZoomDrag, RangeMarkerBarDrag, SelectionMarkerDrag, SelectionDrag, TimeFXDrag, RubberbandSelectDrag, FeatureLineDrag, LineDrag, ControlPointDrag, MarkerDrag, FadeOutDrag, FadeInDrag, CursorDrag, TempoEndDrag, TempoTwistDrag, MappingTwistDrag, MappingEndDrag, BBTMarkerDrag, TempoMarkerDrag, TempoCurveDrag, MeterMarkerDrag, TrimDrag, VideoTimeLineDrag, PatchChangeDrag, HitCreateDrag, NoteCreateDrag, NoteDrag, NoteResizeDrag, RegionCreateDrag, RegionCutDrag, RegionInsertDrag, RegionMoveDrag, RegionMotionDrag, RegionBrushDrag, and RegionSlipContentsDrag.
|
inlinevirtual |
m | Mouse mode. |
Reimplemented in HitCreateDrag, NoteCreateDrag, and ControlPointDrag.
Definition at line 217 of file editor_drag.h.
|
protected |
Temporal::timepos_t Drag::adjusted_current_time | ( | GdkEvent const * | , |
bool | snap = true |
||
) | const |
Temporal::timepos_t Drag::adjusted_time | ( | Temporal::timepos_t const & | , |
GdkEvent const * | , | ||
bool | snap = true |
||
) | const |
|
inlinevirtual |
Reimplemented in LollipopDrag, MappingTwistDrag, and MappingEndDrag.
Definition at line 234 of file editor_drag.h.
|
inlinevirtual |
Reimplemented in LollipopDrag, RegionMarkerDrag, RangeMarkerBarDrag, LineDrag, ControlPointDrag, MarkerDrag, FadeOutDrag, FadeInDrag, CursorDrag, TempoEndDrag, TempoTwistDrag, MappingTwistDrag, MappingEndDrag, BBTMarkerDrag, TempoMarkerDrag, MeterMarkerDrag, TrimDrag, VideoTimeLineDrag, PatchChangeDrag, NoteCreateDrag, NoteDrag, and NoteResizeDrag.
Definition at line 230 of file editor_drag.h.
|
protected |
|
protected |
|
virtual |
Reimplemented in ClipEndDrag, and ClipStartDrag.
|
pure virtual |
Called when a drag has finished.
e | Event describing the finish. |
m | true if some movement occurred, otherwise false. |
Implemented in ClipEndDrag, ClipStartDrag, VelocityLineDrag, AutomationDrawDrag, FreehandLineDrag< OrderedPointList, OrderedPoint >, FreehandLineDrag< Evoral::ControlList::OrderedPoints, Evoral::ControlList::OrderedPoint >, LollipopDrag, RegionMarkerDrag, CrossfadeEdgeDrag, AutomationRangeDrag, MouseZoomDrag, RangeMarkerBarDrag, SelectionMarkerDrag, SelectionDrag, TimeFXDrag, MidiRubberbandSelectDrag, RubberbandSelectDrag, FeatureLineDrag, LineDrag, ControlPointDrag, MarkerDrag, FadeOutDrag, FadeInDrag, CursorDrag, TempoEndDrag, TempoTwistDrag, MappingTwistDrag, MappingEndDrag, BBTMarkerDrag, TempoMarkerDrag, TempoCurveDrag, MeterMarkerDrag, TrimDrag, VideoTimeLineDrag, PatchChangeDrag, HitCreateDrag, NoteCreateDrag, NoteDrag, NoteResizeDrag, RegionCreateDrag, RegionCutDrag, RegionInsertDrag, RegionMoveDrag, RegionMotionDrag, RegionBrushDrag, and RegionSlipContentsDrag.
|
inline |
Definition at line 266 of file editor_drag.h.
|
inlineprotected |
Definition at line 284 of file editor_drag.h.
|
inlineprotected |
Definition at line 288 of file editor_drag.h.
|
inlineprotected |
Definition at line 270 of file editor_drag.h.
|
inlineprotected |
Definition at line 274 of file editor_drag.h.
|
inline |
Definition at line 250 of file editor_drag.h.
|
inline |
Definition at line 169 of file editor_drag.h.
|
inlineprotected |
Definition at line 300 of file editor_drag.h.
|
inlineprotected |
Definition at line 304 of file editor_drag.h.
|
inlineprotected |
Definition at line 292 of file editor_drag.h.
|
inlineprotected |
Definition at line 296 of file editor_drag.h.
|
inlinevirtual |
Reimplemented in FreehandLineDrag< OrderedPointList, OrderedPoint >, and FreehandLineDrag< Evoral::ControlList::OrderedPoints, Evoral::ControlList::OrderedPoint >.
Definition at line 248 of file editor_drag.h.
|
pure virtual |
Called when a drag motion has occurred.
e | Event describing the motion. |
f | true if this is the first movement, otherwise false. |
Implemented in ClipEndDrag, ClipStartDrag, FreehandLineDrag< OrderedPointList, OrderedPoint >, FreehandLineDrag< Evoral::ControlList::OrderedPoints, Evoral::ControlList::OrderedPoint >, LollipopDrag, RegionMarkerDrag, CrossfadeEdgeDrag, AutomationRangeDrag, MouseZoomDrag, RangeMarkerBarDrag, SelectionMarkerDrag, SelectionDrag, TimeFXDrag, RubberbandSelectDrag, FeatureLineDrag, LineDrag, ControlPointDrag, MarkerDrag, FadeOutDrag, FadeInDrag, CursorDrag, TempoEndDrag, TempoTwistDrag, MappingTwistDrag, MappingEndDrag, BBTMarkerDrag, TempoMarkerDrag, TempoCurveDrag, MeterMarkerDrag, TrimDrag, VideoTimeLineDrag, PatchChangeDrag, HitCreateDrag, NoteCreateDrag, NoteDrag, NoteResizeDrag, RegionCreateDrag, RegionCutDrag, RegionMoveDrag, RegionMotionDrag, RegionBrushDrag, and RegionSlipContentsDrag.
bool Drag::motion_handler | ( | GdkEvent * | , |
bool | |||
) |
|
virtual |
|
protected |
|
inline |
Definition at line 221 of file editor_drag.h.
|
inlineprotected |
Definition at line 280 of file editor_drag.h.
|
inline |
Definition at line 164 of file editor_drag.h.
|
inline |
Definition at line 184 of file editor_drag.h.
void Drag::set_grab_button_anyway | ( | GdkEvent * | ) |
|
inline |
Definition at line 160 of file editor_drag.h.
void Drag::set_time_domain | ( | Temporal::TimeDomain | ) |
|
inlinevirtual |
Set up the _pointer_offset
Reimplemented in LollipopDrag, RegionMarkerDrag, SelectionDrag, MarkerDrag, FadeOutDrag, FadeInDrag, TempoEndDrag, TempoTwistDrag, MappingTwistDrag, MappingEndDrag, BBTMarkerDrag, TempoMarkerDrag, MeterMarkerDrag, TrimDrag, PatchChangeDrag, NoteDrag, and RegionMoveDrag.
Definition at line 255 of file editor_drag.h.
|
protected |
|
inlinevirtual |
Set up the _video_offset - relative to _current_pointer_time
Reimplemented in MarkerDrag, and RegionDrag.
Definition at line 260 of file editor_drag.h.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
virtual |
Called to start a grab of an item.
e | Event that caused the grab to start. |
c | Cursor to use, or 0. |
Reimplemented in VelocityLineDrag, LollipopDrag, RegionMarkerDrag, CrossfadeEdgeDrag, AutomationRangeDrag, MouseZoomDrag, RangeMarkerBarDrag, SelectionMarkerDrag, SelectionDrag, TimeFXDrag, RubberbandSelectDrag, FeatureLineDrag, LineDrag, ControlPointDrag, MarkerDrag, FadeOutDrag, FadeInDrag, CursorDrag, TempoEndDrag, TempoTwistDrag, MappingTwistDrag, MappingEndDrag, BBTMarkerDrag, TempoMarkerDrag, TempoCurveDrag, MeterMarkerDrag, TrimDrag, VideoTimeLineDrag, HitCreateDrag, NoteCreateDrag, NoteDrag, NoteResizeDrag, RegionCutDrag, ClipEndDrag, ClipStartDrag, RegionMotionDrag, RegionBrushDrag, and RegionSlipContentsDrag.
void Drag::swap_grab | ( | ArdourCanvas::Item * | , |
Gdk::Cursor * | , | ||
uint32_t | |||
) |
|
inline |
Definition at line 173 of file editor_drag.h.
|
inline |
Definition at line 183 of file editor_drag.h.
|
inlinevirtual |
Reimplemented in LollipopDrag, and AutomationRangeDrag.
Definition at line 239 of file editor_drag.h.
|
inlinevirtual |
Reimplemented in RegionMarkerDrag, CrossfadeEdgeDrag, RangeMarkerBarDrag, MarkerDrag, FadeOutDrag, FadeInDrag, CursorDrag, TempoEndDrag, TempoTwistDrag, MappingTwistDrag, MappingEndDrag, BBTMarkerDrag, TempoMarkerDrag, MeterMarkerDrag, TrimDrag, VideoTimeLineDrag, PatchChangeDrag, HitCreateDrag, and NoteCreateDrag.
Definition at line 244 of file editor_drag.h.
|
protected |
our coordinate reference (normally null)
Definition at line 326 of file editor_drag.h.
|
private |
if the keyboard indicated constraint modifier was pressed on start_grab()
Definition at line 357 of file editor_drag.h.
|
protected |
Definition at line 335 of file editor_drag.h.
|
protected |
Definition at line 324 of file editor_drag.h.
|
protected |
time we cannot drag before (defaults to 0, indicating no such limit)
Definition at line 334 of file editor_drag.h.
|
private |
Definition at line 358 of file editor_drag.h.
|
private |
adjusted_time that the mouse was at when start_grab was called, or 0
Definition at line 349 of file editor_drag.h.
|
private |
trackview x of the grab start position
Definition at line 344 of file editor_drag.h.
|
private |
y of the grab start position, possibly adjusted if _bounding_itme is non-null
Definition at line 345 of file editor_drag.h.
|
private |
set true of Drag::motion does not call set_snapped_cursor_position
Definition at line 339 of file editor_drag.h.
|
private |
true if after move threshold is passed we appear to be moving vertically; undefined before that
Definition at line 342 of file editor_drag.h.
|
protected |
our item
Definition at line 325 of file editor_drag.h.
|
private |
adjusted_time the last time a motion occurred
Definition at line 350 of file editor_drag.h.
|
private |
trackview x of the pointer last time a motion occurred
Definition at line 346 of file editor_drag.h.
|
private |
trackview y of the pointer last time a motion occurred
Definition at line 347 of file editor_drag.h.
|
private |
true if the move threshold has been passed, otherwise false
Definition at line 340 of file editor_drag.h.
|
protected |
Offset from the mouse's position for the drag to the start of the thing that is being dragged
Definition at line 328 of file editor_drag.h.
|
protected |
Definition at line 330 of file editor_drag.h.
|
private |
unsnapped time that the mouse was at when start_grab was called, or 0
Definition at line 348 of file editor_drag.h.
|
private |
Definition at line 356 of file editor_drag.h.
|
private |
true if we called move () with first_move flag, otherwise false
Definition at line 341 of file editor_drag.h.
|
private |
Definition at line 351 of file editor_drag.h.
|
private |
true if pointer y value should always be relative to the top of the trackview group
Definition at line 338 of file editor_drag.h.
|
protected |
Definition at line 329 of file editor_drag.h.
|
private |
true if drag initiated by a double click event
Definition at line 343 of file editor_drag.h.
|
protected |
true if the session was rolling before the drag started, otherwise false
Definition at line 333 of file editor_drag.h.
|
protected |
true if x motion is constrained, otherwise false
Definition at line 331 of file editor_drag.h.
|
protected |
true if y motion is constrained, otherwise false
Definition at line 332 of file editor_drag.h.
|
private |
Definition at line 360 of file editor_drag.h.
|
protected |
Definition at line 323 of file editor_drag.h.