Ardour  9.0-pre0-582-g084a23a80d
RegionDrag Class Reference

#include <editor_drag.h>

Inheritance diagram for RegionDrag:
[legend]

Public Member Functions

 RegionDrag (Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, Temporal::TimeDomain, bool hide_snapped_cursor=true)
 
virtual ~RegionDrag ()
 
- Public Member Functions inherited from EditorDrag
 EditorDrag (Editor &, ArdourCanvas::Item *, Temporal::TimeDomain td, ArdourCanvas::Item const *bounding_item, bool hide_snapped_cursor=true)
 
- Public Member Functions inherited from Drag
 Drag (EditingContext &, ArdourCanvas::Item *, Temporal::TimeDomain td, ArdourCanvas::Item const *bounding_item, bool hide_snapped_cursor=true)
 
virtual ~Drag ()
 
void set_manager (DragManager *m)
 
void set_bounding_item (ArdourCanvas::Item const *i)
 
ArdourCanvas::Itemitem () const
 
Temporal::TimeDomain time_domain () const
 
void set_time_domain (Temporal::TimeDomain)
 
void swap_grab (ArdourCanvas::Item *, Gdk::Cursor *, uint32_t)
 
bool motion_handler (GdkEvent *, bool)
 
void abort ()
 
Temporal::timepos_t adjusted_time (Temporal::timepos_t const &, GdkEvent const *, bool snap=true) const
 
Temporal::timepos_t adjusted_current_time (GdkEvent const *, bool snap=true) const
 
bool was_double_click () const
 
void set_double_click (bool yn)
 
void set_grab_button_anyway (GdkEvent *)
 
virtual void start_grab (GdkEvent *e, Gdk::Cursor *c=0)
 
virtual bool end_grab (GdkEvent *)
 
virtual void motion (GdkEvent *e, bool f)=0
 
virtual void finished (GdkEvent *e, bool m)=0
 
virtual void aborted (bool m)=0
 
virtual bool active (Editing::MouseMode m)
 
bool preview_video () const
 
std::pair< Temporal::timecnt_t, int > move_threshold () const
 
virtual bool allow_vertical_autoscroll () const
 
virtual bool allow_horizontal_autoscroll () const
 
virtual bool x_movement_matters () const
 
virtual bool y_movement_matters () const
 
virtual bool mid_drag_key_event (GdkEventKey *)
 
bool initially_vertical () const
 
virtual void setup_pointer_offset ()
 
int grab_button () const
 

Protected Member Functions

int find_time_axis_view (TimeAxisView *) const
 
int apply_track_delta (const int start, const int delta, const int skip, const bool distance_only=false) const
 
void setup_video_offset ()
 
void add_stateful_diff_commands_for_playlists (ARDOUR::PlaylistSet const &)
 
- Protected Member Functions inherited from Drag
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::Regionadd_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

RegionView_primary
 the view that was clicked on (or whatever) to start the drag More...
 
std::list< DraggingView_views
 information about all views that are being dragged More...
 
std::vector< TimeAxisView * > _time_axis_views
 
int _visible_y_low
 
int _visible_y_high
 
uint32_t _ntracks
 
- Protected Attributes inherited from EditorDrag
Editor_editor
 
- Protected Attributes inherited from Drag
EditingContextediting_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...
 

Private Member Functions

void region_going_away (RegionView *)
 

Private Attributes

PBD::ScopedConnection death_connection
 

Friends

class DraggingView
 

Detailed Description

Abstract base class for drags that involve region(s)

Definition at line 401 of file editor_drag.h.

Constructor & Destructor Documentation

◆ RegionDrag()

RegionDrag::RegionDrag ( Editor ,
ArdourCanvas::Item ,
RegionView ,
std::list< RegionView * > const &  ,
Temporal::TimeDomain  ,
bool  hide_snapped_cursor = true 
)

◆ ~RegionDrag()

virtual RegionDrag::~RegionDrag ( )
inlinevirtual

Definition at line 405 of file editor_drag.h.

Member Function Documentation

◆ add_stateful_diff_commands_for_playlists()

void RegionDrag::add_stateful_diff_commands_for_playlists ( ARDOUR::PlaylistSet const &  )
protected

◆ apply_track_delta()

int RegionDrag::apply_track_delta ( const int  start,
const int  delta,
const int  skip,
const bool  distance_only = false 
) const
protected

◆ find_time_axis_view()

int RegionDrag::find_time_axis_view ( TimeAxisView ) const
protected

◆ region_going_away()

void RegionDrag::region_going_away ( RegionView )
private

◆ setup_video_offset()

void RegionDrag::setup_video_offset ( )
protectedvirtual

Set up the _video_offset - relative to _current_pointer_time

Reimplemented from Drag.

Friends And Related Function Documentation

◆ DraggingView

friend class DraggingView
friend

Definition at line 423 of file editor_drag.h.

Member Data Documentation

◆ _ntracks

uint32_t RegionDrag::_ntracks
protected

Definition at line 419 of file editor_drag.h.

◆ _primary

RegionView* RegionDrag::_primary
protected

the view that was clicked on (or whatever) to start the drag

Definition at line 409 of file editor_drag.h.

◆ _time_axis_views

std::vector<TimeAxisView*> RegionDrag::_time_axis_views
protected

a list of the non-hidden TimeAxisViews sorted by editor order key

Definition at line 413 of file editor_drag.h.

◆ _views

std::list<DraggingView> RegionDrag::_views
protected

information about all views that are being dragged

Definition at line 410 of file editor_drag.h.

◆ _visible_y_high

int RegionDrag::_visible_y_high
protected

Definition at line 418 of file editor_drag.h.

◆ _visible_y_low

int RegionDrag::_visible_y_low
protected

Definition at line 417 of file editor_drag.h.

◆ death_connection

PBD::ScopedConnection RegionDrag::death_connection
private

Definition at line 431 of file editor_drag.h.


The documentation for this class was generated from the following file: