Ardour  9.0-pre0-582-g084a23a80d
RegionMoveDrag Class Reference

#include <editor_drag.h>

Inheritance diagram for RegionMoveDrag:
[legend]

Public Member Functions

 RegionMoveDrag (Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, bool, Temporal::TimeDomain)
 
virtual ~RegionMoveDrag ()
 
void motion (GdkEvent *, bool)
 
void finished (GdkEvent *, bool)
 
void aborted (bool)
 
void clear_draggingview_list ()
 
bool regions_came_from_canvas () const
 
std::pair< Temporal::timecnt_t, int > move_threshold () const
 
void setup_pointer_offset ()
 
- Public Member Functions inherited from RegionMotionDrag
 RegionMotionDrag (Editor &, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, Temporal::TimeDomain td)
 
virtual ~RegionMotionDrag ()
 
virtual void start_grab (GdkEvent *, Gdk::Cursor *)
 
- Public Member Functions inherited from RegionDrag
 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 bool end_grab (GdkEvent *)
 
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
 
int grab_button () const
 

Private Member Functions

void finished_no_copy (bool const, bool const, Temporal::timepos_t const &, int32_t const ev_state)
 
void finished_copy (bool const, bool const, Temporal::timepos_t const &, int32_t const ev_state)
 
RegionViewinsert_region_into_playlist (std::shared_ptr< ARDOUR::Region >, RouteTimeAxisView *, ARDOUR::layer_t, Temporal::timepos_t const &, ARDOUR::PlaylistSet &)
 
void remove_region_from_playlist (std::shared_ptr< ARDOUR::Region >, std::shared_ptr< ARDOUR::Playlist >, ARDOUR::PlaylistSet &modified_playlists)
 
void collect_new_region_view (RegionView *)
 
RouteTimeAxisViewcreate_destination_time_axis (std::shared_ptr< ARDOUR::Region >, TimeAxisView *original)
 

Private Attributes

bool _copy
 
RegionView_new_region_view
 

Additional Inherited Members

- Protected Member Functions inherited from RegionMotionDrag
double compute_x_delta (GdkEvent const *, Temporal::timepos_t &)
 
virtual bool y_movement_allowed (int, double, int skip_invisible=0) const
 
void collect_ripple_views ()
 
- Protected Member Functions inherited from RegionDrag
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 inherited from RegionMotionDrag
bool _ignore_video_lock
 
Temporal::timepos_t _last_position
 last position of the thing being dragged More...
 
double _total_x_delta
 
int _last_pointer_time_axis_view
 
double _last_pointer_layer
 
std::vector< ArdourMarker * > ripple_markers
 
- Protected Attributes inherited from RegionDrag
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...
 

Detailed Description

Drags to move (or copy) regions that are already shown in the GUI to somewhere different.

Definition at line 505 of file editor_drag.h.

Constructor & Destructor Documentation

◆ RegionMoveDrag()

RegionMoveDrag::RegionMoveDrag ( Editor ,
ArdourCanvas::Item ,
RegionView ,
std::list< RegionView * > const &  ,
bool  ,
Temporal::TimeDomain   
)

◆ ~RegionMoveDrag()

virtual RegionMoveDrag::~RegionMoveDrag ( )
inlinevirtual

Definition at line 509 of file editor_drag.h.

Member Function Documentation

◆ aborted()

void RegionMoveDrag::aborted ( bool  m)
virtual

Called to abort a drag and return things to how they were before it started.

Parameters
mtrue if some movement occurred, otherwise false.

Reimplemented from RegionMotionDrag.

◆ clear_draggingview_list()

void RegionMoveDrag::clear_draggingview_list ( )

◆ collect_new_region_view()

void RegionMoveDrag::collect_new_region_view ( RegionView )
private

◆ create_destination_time_axis()

RouteTimeAxisView* RegionMoveDrag::create_destination_time_axis ( std::shared_ptr< ARDOUR::Region ,
TimeAxisView original 
)
private

◆ finished()

void RegionMoveDrag::finished ( GdkEvent e,
bool  m 
)
virtual

Called when a drag has finished.

Parameters
eEvent describing the finish.
mtrue if some movement occurred, otherwise false.

Reimplemented from RegionMotionDrag.

◆ finished_copy()

void RegionMoveDrag::finished_copy ( bool const  ,
bool const  ,
Temporal::timepos_t const &  ,
int32_t const  ev_state 
)
private

◆ finished_no_copy()

void RegionMoveDrag::finished_no_copy ( bool const  ,
bool const  ,
Temporal::timepos_t const &  ,
int32_t const  ev_state 
)
private

◆ insert_region_into_playlist()

RegionView* RegionMoveDrag::insert_region_into_playlist ( std::shared_ptr< ARDOUR::Region ,
RouteTimeAxisView ,
ARDOUR::layer_t  ,
Temporal::timepos_t const &  ,
ARDOUR::PlaylistSet  
)
private

◆ motion()

void RegionMoveDrag::motion ( GdkEvent e,
bool  f 
)
virtual

Called when a drag motion has occurred.

Parameters
eEvent describing the motion.
ftrue if this is the first movement, otherwise false.

Reimplemented from RegionMotionDrag.

◆ move_threshold()

std::pair<Temporal::timecnt_t,int> RegionMoveDrag::move_threshold ( ) const
inline

Definition at line 521 of file editor_drag.h.

◆ regions_came_from_canvas()

bool RegionMoveDrag::regions_came_from_canvas ( ) const
inlinevirtual
Returns
true if the regions being ‘moved’ came from somewhere on the canvas; false if they came from outside (e.g. from the region list).

Implements RegionMotionDrag.

Definition at line 517 of file editor_drag.h.

◆ remove_region_from_playlist()

void RegionMoveDrag::remove_region_from_playlist ( std::shared_ptr< ARDOUR::Region ,
std::shared_ptr< ARDOUR::Playlist ,
ARDOUR::PlaylistSet modified_playlists 
)
private

◆ setup_pointer_offset()

void RegionMoveDrag::setup_pointer_offset ( )
virtual

Set up the _pointer_offset

Reimplemented from Drag.

Member Data Documentation

◆ _copy

bool RegionMoveDrag::_copy
private

Definition at line 560 of file editor_drag.h.

◆ _new_region_view

RegionView* RegionMoveDrag::_new_region_view
private

Definition at line 561 of file editor_drag.h.


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