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

#include <editor_drag.h>

Public Member Functions

 DragManager (Editor *e)
 
 ~DragManager ()
 
bool motion_handler (GdkEvent *, bool)
 
void abort ()
 
void add (Drag *)
 
void set (Drag *, GdkEvent *, Gdk::Cursor *c=MouseCursors::invalid_cursor())
 
void start_grab (GdkEvent *, Gdk::Cursor *c=MouseCursors::invalid_cursor())
 
bool end_grab (GdkEvent *)
 
bool have_item (ArdourCanvas::Item *) const
 
void mark_double_click ()
 
bool ending () const
 
bool active () const
 
double current_pointer_x () const
 
double current_pointer_y () const
 
ARDOUR::framepos_t current_pointer_frame () const
 

Private Attributes

Editor_editor
 
std::list< Drag * > _drags
 
bool _ending
 true if end_grab or abort is in progress, otherwise false More...
 
double _current_pointer_x
 canvas-coordinate space x of the current pointer More...
 
double _current_pointer_y
 canvas-coordinate space y of the current pointer More...
 
ARDOUR::framepos_t _current_pointer_frame
 frame that the pointer is now at More...
 
bool _old_follow_playhead
 state of Editor::follow_playhead() before the drags started More...
 

Detailed Description

Class to manage current drags

Definition at line 51 of file editor_drag.h.

Constructor & Destructor Documentation

DragManager::DragManager ( Editor e)

Definition at line 81 of file editor_drag.cc.

DragManager::~DragManager ( )

Definition at line 88 of file editor_drag.cc.

Member Function Documentation

void DragManager::abort ( )

Call abort for each active drag

Definition at line 95 of file editor_drag.cc.

bool DragManager::active ( ) const
inline

Definition at line 74 of file editor_drag.h.

void DragManager::add ( Drag d)

Definition at line 117 of file editor_drag.cc.

ARDOUR::framepos_t DragManager::current_pointer_frame ( ) const
inline
Returns
current pointer frame

Definition at line 89 of file editor_drag.h.

double DragManager::current_pointer_x ( ) const
inline
Returns
current pointer x position in canvas coordinates

Definition at line 79 of file editor_drag.h.

double DragManager::current_pointer_y ( ) const
inline
Returns
current pointer y position in canvas coordinates

Definition at line 84 of file editor_drag.h.

bool DragManager::end_grab ( GdkEvent *  e)

Call end_grab for each active drag.

Returns
true if any drag reported movement having occurred.

Definition at line 149 of file editor_drag.cc.

bool DragManager::ending ( ) const
inline
Returns
true if an end drag or abort is in progress

Definition at line 70 of file editor_drag.h.

bool DragManager::have_item ( ArdourCanvas::Item *  i) const

Definition at line 207 of file editor_drag.cc.

void DragManager::mark_double_click ( )

Definition at line 172 of file editor_drag.cc.

bool DragManager::motion_handler ( GdkEvent *  e,
bool  from_autoscroll 
)

Definition at line 180 of file editor_drag.cc.

void DragManager::set ( Drag d,
GdkEvent *  e,
Gdk::Cursor *  c = MouseCursors::invalid_cursor() 
)

Definition at line 124 of file editor_drag.cc.

void DragManager::start_grab ( GdkEvent *  e,
Gdk::Cursor *  c = MouseCursors::invalid_cursor() 
)

Definition at line 132 of file editor_drag.cc.

Member Data Documentation

ARDOUR::framepos_t DragManager::_current_pointer_frame
private

frame that the pointer is now at

Definition at line 99 of file editor_drag.h.

double DragManager::_current_pointer_x
private

canvas-coordinate space x of the current pointer

Definition at line 97 of file editor_drag.h.

double DragManager::_current_pointer_y
private

canvas-coordinate space y of the current pointer

Definition at line 98 of file editor_drag.h.

std::list<Drag*> DragManager::_drags
private

Definition at line 95 of file editor_drag.h.

Editor* DragManager::_editor
private

Definition at line 94 of file editor_drag.h.

bool DragManager::_ending
private

true if end_grab or abort is in progress, otherwise false

Definition at line 96 of file editor_drag.h.

bool DragManager::_old_follow_playhead
private

state of Editor::follow_playhead() before the drags started

Definition at line 100 of file editor_drag.h.


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