|
Ardour
9.2-575-g8aa93a779f
|
#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 157 of file editor_drag.h.
| typedef std::pair<int,int> Drag::MoveThreshold |
Definition at line 228 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, NoteBrushDrag, HitCreateDrag, NoteCreateDrag, NoteDrag, NoteResizeDrag, RegionCreateDrag, RegionCutDrag, RegionInsertDrag, RegionMoveDrag, RegionMotionDrag, RegionBrushDrag, and RegionSlipContentsDrag.
|
inlinevirtual |
| m | Mouse mode. |
Reimplemented in NoteBrushDrag, HitCreateDrag, NoteCreateDrag, and ControlPointDrag.
Definition at line 219 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 236 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 232 of file editor_drag.h.
|
inline |
Definition at line 167 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, NoteBrushDrag, HitCreateDrag, NoteCreateDrag, NoteDrag, NoteResizeDrag, RegionCreateDrag, RegionCutDrag, RegionInsertDrag, RegionMoveDrag, RegionMotionDrag, RegionBrushDrag, and RegionSlipContentsDrag.
|
inline |
Definition at line 268 of file editor_drag.h.
|
inlineprotected |
Definition at line 286 of file editor_drag.h.
|
inlineprotected |
Definition at line 290 of file editor_drag.h.
|
inlineprotected |
Definition at line 272 of file editor_drag.h.
|
inlineprotected |
Definition at line 276 of file editor_drag.h.
|
inline |
Definition at line 252 of file editor_drag.h.
|
inline |
Definition at line 171 of file editor_drag.h.
|
inlineprotected |
Definition at line 302 of file editor_drag.h.
|
inlineprotected |
Definition at line 306 of file editor_drag.h.
|
inlineprotected |
Definition at line 294 of file editor_drag.h.
|
inlineprotected |
Definition at line 298 of file editor_drag.h.
|
inlinevirtual |
Reimplemented in FreehandLineDrag< OrderedPointList, OrderedPoint >, and FreehandLineDrag< Evoral::ControlList::OrderedPoints, Evoral::ControlList::OrderedPoint >.
Definition at line 250 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, NoteBrushDrag, HitCreateDrag, NoteCreateDrag, NoteDrag, NoteResizeDrag, RegionCreateDrag, RegionCutDrag, RegionMoveDrag, RegionMotionDrag, RegionBrushDrag, and RegionSlipContentsDrag.
| bool Drag::motion_handler | ( | GdkEvent * | , |
| bool | |||
| ) |
|
virtual |
|
protected |
|
inline |
Definition at line 223 of file editor_drag.h.
|
inlineprotected |
Definition at line 282 of file editor_drag.h.
| void Drag::set_bounding_item | ( | ArdourCanvas::Item const * | i | ) |
|
inline |
Definition at line 186 of file editor_drag.h.
| void Drag::set_grab_button_anyway | ( | GdkEvent * | ) |
|
inline |
Definition at line 163 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 257 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 262 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, NoteBrushDrag, 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 175 of file editor_drag.h.
|
inline |
Definition at line 185 of file editor_drag.h.
|
inlinevirtual |
Reimplemented in LollipopDrag, and AutomationRangeDrag.
Definition at line 241 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, NoteBrushDrag, HitCreateDrag, and NoteCreateDrag.
Definition at line 246 of file editor_drag.h.
|
protected |
our coordinate reference (normally null)
Definition at line 328 of file editor_drag.h.
|
private |
if the keyboard indicated constraint modifier was pressed on start_grab()
Definition at line 359 of file editor_drag.h.
|
protected |
Definition at line 337 of file editor_drag.h.
|
protected |
Definition at line 326 of file editor_drag.h.
|
protected |
time we cannot drag before (defaults to 0, indicating no such limit)
Definition at line 336 of file editor_drag.h.
|
private |
Definition at line 360 of file editor_drag.h.
|
private |
adjusted_time that the mouse was at when start_grab was called, or 0
Definition at line 351 of file editor_drag.h.
|
private |
trackview x of the grab start position
Definition at line 346 of file editor_drag.h.
|
private |
y of the grab start position, possibly adjusted if _bounding_itme is non-null
Definition at line 347 of file editor_drag.h.
|
private |
set true of Drag::motion does not call set_snapped_cursor_position
Definition at line 341 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 344 of file editor_drag.h.
|
protected |
our item
Definition at line 327 of file editor_drag.h.
|
private |
adjusted_time the last time a motion occurred
Definition at line 352 of file editor_drag.h.
|
private |
trackview x of the pointer last time a motion occurred
Definition at line 348 of file editor_drag.h.
|
private |
trackview y of the pointer last time a motion occurred
Definition at line 349 of file editor_drag.h.
|
private |
true if the move threshold has been passed, otherwise false
Definition at line 342 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 330 of file editor_drag.h.
|
protected |
Definition at line 332 of file editor_drag.h.
|
private |
unsnapped time that the mouse was at when start_grab was called, or 0
Definition at line 350 of file editor_drag.h.
|
private |
Definition at line 358 of file editor_drag.h.
|
private |
true if we called move () with first_move flag, otherwise false
Definition at line 343 of file editor_drag.h.
|
private |
Definition at line 353 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 340 of file editor_drag.h.
|
protected |
Definition at line 331 of file editor_drag.h.
|
private |
true if drag initiated by a double click event
Definition at line 345 of file editor_drag.h.
|
protected |
true if the session was rolling before the drag started, otherwise false
Definition at line 335 of file editor_drag.h.
|
protected |
true if x motion is constrained, otherwise false
Definition at line 333 of file editor_drag.h.
|
protected |
true if y motion is constrained, otherwise false
Definition at line 334 of file editor_drag.h.
|
private |
Definition at line 362 of file editor_drag.h.
|
protected |
Definition at line 325 of file editor_drag.h.