ardour
Public Member Functions | Private Member Functions | Private Attributes | List of all members
CursorDrag Class Reference

#include <editor_drag.h>

Inheritance diagram for CursorDrag:
Drag

Public Member Functions

 CursorDrag (Editor *, EditorCursor &, bool)
 
void start_grab (GdkEvent *, Gdk::Cursor *c=0)
 
void motion (GdkEvent *, bool)
 
void finished (GdkEvent *, bool)
 
void aborted (bool)
 
bool allow_vertical_autoscroll () const
 
bool y_movement_matters () const
 
- 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 x_movement_matters () const
 
bool initially_vertical () const
 
virtual void setup_pointer_frame_offset ()
 

Private Member Functions

void fake_locate (framepos_t)
 

Private Attributes

EditorCursor_cursor
 
bool _stop
 true to stop the transport on starting the drag, otherwise false More...
 
double _grab_zoom
 editor frames per unit when our grab started More...
 

Additional Inherited Members

- 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 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...
 

Detailed Description

Drag of the playhead cursor

Definition at line 707 of file editor_drag.h.

Constructor & Destructor Documentation

CursorDrag::CursorDrag ( Editor e,
EditorCursor c,
bool  s 
)

Definition at line 3212 of file editor_drag.cc.

Member Function Documentation

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

Definition at line 3325 of file editor_drag.cc.

bool CursorDrag::allow_vertical_autoscroll ( ) const
inlinevirtual

Reimplemented from Drag.

Definition at line 717 of file editor_drag.h.

void CursorDrag::fake_locate ( framepos_t  t)
private

Do all the things we do when dragging the playhead to make it look as though we have located, without actually doing the locate (because that would cause the diskstream buffers to be refilled, which is too slow).

Definition at line 3225 of file editor_drag.cc.

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

Definition at line 3304 of file editor_drag.cc.

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

Definition at line 3295 of file editor_drag.cc.

void CursorDrag::start_grab ( GdkEvent *  e,
Gdk::Cursor *  c = 0 
)
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 3247 of file editor_drag.cc.

bool CursorDrag::y_movement_matters ( ) const
inlinevirtual
Returns
true if y movement matters to this drag

Reimplemented from Drag.

Definition at line 721 of file editor_drag.h.

Member Data Documentation

EditorCursor& CursorDrag::_cursor
private

Definition at line 728 of file editor_drag.h.

double CursorDrag::_grab_zoom
private

editor frames per unit when our grab started

Definition at line 730 of file editor_drag.h.

bool CursorDrag::_stop
private

true to stop the transport on starting the drag, otherwise false

Definition at line 729 of file editor_drag.h.


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