ardour
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
RegionMotionDrag Class Referenceabstract

#include <editor_drag.h>

Inheritance diagram for RegionMotionDrag:
RegionDrag Drag RegionInsertDrag RegionMoveDrag RegionRippleDrag RegionSpliceDrag

Public Member Functions

 RegionMotionDrag (Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &, bool)
 
virtual ~RegionMotionDrag ()
 
virtual void start_grab (GdkEvent *, Gdk::Cursor *)
 
virtual void motion (GdkEvent *, bool)
 
virtual void finished (GdkEvent *, bool)
 
virtual void aborted (bool)
 
virtual bool regions_came_from_canvas () const =0
 
- Public Member Functions inherited from RegionDrag
 RegionDrag (Editor *, ArdourCanvas::Item *, RegionView *, std::list< RegionView * > const &)
 
virtual ~RegionDrag ()
 
- Public Member Functions inherited from Drag
 Drag (Editor *, ArdourCanvas::Item *, bool trackview_only=true)
 
virtual ~Drag ()
 
void set_manager (DragManager *m)
 
ArdourCanvas::Item * item () const
 
void swap_grab (ArdourCanvas::Item *, Gdk::Cursor *, uint32_t)
 
bool motion_handler (GdkEvent *, bool)
 
void abort ()
 
ARDOUR::framepos_t adjusted_frame (ARDOUR::framepos_t, GdkEvent const *, bool snap=true) const
 
ARDOUR::framepos_t adjusted_current_frame (GdkEvent const *, bool snap=true) const
 
bool was_double_click () const
 
void set_double_click (bool yn)
 
virtual bool end_grab (GdkEvent *)
 
virtual bool active (Editing::MouseMode m)
 
virtual std::pair
< ARDOUR::framecnt_t, int > 
move_threshold () const
 
virtual bool allow_vertical_autoscroll () const
 
virtual bool x_movement_matters () const
 
virtual bool y_movement_matters () const
 
bool initially_vertical () const
 
virtual void setup_pointer_frame_offset ()
 

Protected Member Functions

double compute_x_delta (GdkEvent const *, ARDOUR::framepos_t *)
 
virtual bool y_movement_allowed (int, double, int skip_invisible=0) const
 
- 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
 
- Protected Member Functions inherited from Drag
double grab_x () const
 
double grab_y () const
 
ARDOUR::framepos_t raw_grab_frame () const
 
ARDOUR::framepos_t grab_frame () const
 
double last_pointer_x () const
 
double last_pointer_y () const
 
double last_pointer_frame () const
 
double current_pointer_x () const
 
double current_pointer_y () const
 
boost::shared_ptr< ARDOUR::Regionadd_midi_region (MidiTimeAxisView *)
 
void show_verbose_cursor_time (framepos_t)
 
void show_verbose_cursor_duration (framepos_t, framepos_t, double xoffset=0)
 
void show_verbose_cursor_text (std::string const &)
 

Protected Attributes

bool _brushing
 
ARDOUR::framepos_t _last_frame_position
 last position of the thing being dragged More...
 
double _total_x_delta
 
int _last_pointer_time_axis_view
 
double _last_pointer_layer
 
bool _single_axis
 
- 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 Drag
Editor_editor
 our editor More...
 
DragManager_drags
 
ArdourCanvas::Item * _item
 our item More...
 
ARDOUR::framecnt_t _pointer_frame_offset
 
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...
 

Private Attributes

uint32_t _ndropzone
 
uint32_t _pdropzone
 
uint32_t _ddropzone
 

Detailed Description

Drags involving region motion from somewhere

Definition at line 311 of file editor_drag.h.

Constructor & Destructor Documentation

RegionMotionDrag::RegionMotionDrag ( Editor e,
ArdourCanvas::Item *  i,
RegionView p,
std::list< RegionView * > const &  v,
bool  b 
)

Definition at line 552 of file editor_drag.cc.

virtual RegionMotionDrag::~RegionMotionDrag ( )
inlinevirtual

Definition at line 316 of file editor_drag.h.

Member Function Documentation

void RegionMotionDrag::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.

Implements Drag.

Reimplemented in RegionRippleDrag, RegionSpliceDrag, RegionInsertDrag, and RegionMoveDrag.

Definition at line 1780 of file editor_drag.cc.

double RegionMotionDrag::compute_x_delta ( GdkEvent const *  event,
ARDOUR::framepos_t pending_region_position 
)
protected

Definition at line 586 of file editor_drag.cc.

void RegionMotionDrag::finished ( GdkEvent *  e,
bool  m 
)
virtual

Called when a drag has finished.

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

Implements Drag.

Reimplemented in RegionRippleDrag, RegionSpliceDrag, RegionInsertDrag, and RegionMoveDrag.

Definition at line 1276 of file editor_drag.cc.

void RegionMotionDrag::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.

Implements Drag.

Reimplemented in RegionRippleDrag, RegionSpliceDrag, and RegionMoveDrag.

Definition at line 745 of file editor_drag.cc.

virtual bool RegionMotionDrag::regions_came_from_canvas ( ) const
pure virtual
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).

Implemented in RegionInsertDrag, and RegionMoveDrag.

void RegionMotionDrag::start_grab ( GdkEvent *  e,
Gdk::Cursor *  c 
)
virtual

Called to start a grab of an item.

Parameters
eEvent that caused the grab to start.
cCursor to use, or 0.

Reimplemented from Drag.

Definition at line 567 of file editor_drag.cc.

bool RegionMotionDrag::y_movement_allowed ( int  delta_track,
double  delta_layer,
int  skip_invisible = 0 
) const
protectedvirtual

Reimplemented in RegionRippleDrag.

Definition at line 687 of file editor_drag.cc.

Member Data Documentation

bool RegionMotionDrag::_brushing
protected

Definition at line 333 of file editor_drag.h.

uint32_t RegionMotionDrag::_ddropzone
private

Definition at line 343 of file editor_drag.h.

ARDOUR::framepos_t RegionMotionDrag::_last_frame_position
protected

last position of the thing being dragged

Definition at line 334 of file editor_drag.h.

double RegionMotionDrag::_last_pointer_layer
protected

Definition at line 337 of file editor_drag.h.

int RegionMotionDrag::_last_pointer_time_axis_view
protected

Definition at line 336 of file editor_drag.h.

uint32_t RegionMotionDrag::_ndropzone
private

Definition at line 341 of file editor_drag.h.

uint32_t RegionMotionDrag::_pdropzone
private

Definition at line 342 of file editor_drag.h.

bool RegionMotionDrag::_single_axis
protected

Definition at line 338 of file editor_drag.h.

double RegionMotionDrag::_total_x_delta
protected

Definition at line 335 of file editor_drag.h.


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