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

#include <editor_drag.h>

Inheritance diagram for AutomationRangeDrag:
Drag

Classes

struct  Line
 

Public Member Functions

 AutomationRangeDrag (Editor *, AutomationTimeAxisView *, std::list< ARDOUR::AudioRange > const &)
 
 AutomationRangeDrag (Editor *, RegionView *, std::list< ARDOUR::AudioRange > const &)
 
void start_grab (GdkEvent *, Gdk::Cursor *c=0)
 
void motion (GdkEvent *, bool)
 
void finished (GdkEvent *, bool)
 
void aborted (bool)
 
bool x_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 allow_vertical_autoscroll () const
 
virtual bool y_movement_matters () const
 
bool initially_vertical () const
 
virtual void setup_pointer_frame_offset ()
 

Private Member Functions

void setup (std::list< boost::shared_ptr< AutomationLine > > const &)
 
double y_fraction (boost::shared_ptr< AutomationLine >, double global_y_position) const
 
double value (boost::shared_ptr< ARDOUR::AutomationList > list, double x) const
 

Private Attributes

std::list< ARDOUR::AudioRange_ranges
 
std::list< Line_lines
 
double _y_origin
 
bool _nothing_to_drag
 
bool _integral
 

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 a range of automation data (either on an automation track or region gain), changing value but not position.

Definition at line 1055 of file editor_drag.h.

Constructor & Destructor Documentation

AutomationRangeDrag::AutomationRangeDrag ( Editor editor,
AutomationTimeAxisView atv,
std::list< ARDOUR::AudioRange > const &  r 
)

Make an AutomationRangeDrag for lines in an AutomationTimeAxisView

Definition at line 5279 of file editor_drag.cc.

AutomationRangeDrag::AutomationRangeDrag ( Editor editor,
RegionView rv,
std::list< ARDOUR::AudioRange > const &  r 
)

Make an AutomationRangeDrag for region gain lines or MIDI controller regions

Definition at line 5290 of file editor_drag.cc.

Member Function Documentation

void AutomationRangeDrag::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 5516 of file editor_drag.cc.

void AutomationRangeDrag::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 5501 of file editor_drag.cc.

void AutomationRangeDrag::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 5485 of file editor_drag.cc.

void AutomationRangeDrag::setup ( std::list< boost::shared_ptr< AutomationLine > > const &  lines)
private
Parameters
linesAutomationLines to drag.
offsetOffset from the session start to the points in the AutomationLines.

Definition at line 5319 of file editor_drag.cc.

void AutomationRangeDrag::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 5367 of file editor_drag.cc.

double AutomationRangeDrag::value ( boost::shared_ptr< ARDOUR::AutomationList list,
double  x 
) const
private

Definition at line 5360 of file editor_drag.cc.

bool AutomationRangeDrag::x_movement_matters ( ) const
inlinevirtual
Returns
true if x movement matters to this drag

Reimplemented from Drag.

Definition at line 1066 of file editor_drag.h.

double AutomationRangeDrag::y_fraction ( boost::shared_ptr< AutomationLine line,
double  global_y_position 
) const
private

Definition at line 5354 of file editor_drag.cc.

Member Data Documentation

bool AutomationRangeDrag::_integral
private

Definition at line 1089 of file editor_drag.h.

std::list<Line> AutomationRangeDrag::_lines
private

Definition at line 1086 of file editor_drag.h.

bool AutomationRangeDrag::_nothing_to_drag
private

Definition at line 1088 of file editor_drag.h.

std::list<ARDOUR::AudioRange> AutomationRangeDrag::_ranges
private

Definition at line 1075 of file editor_drag.h.

double AutomationRangeDrag::_y_origin
private

Definition at line 1087 of file editor_drag.h.


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