Ardour  9.0-pre0-582-g084a23a80d
AutomationRangeDrag Class Reference

#include <editor_drag.h>

Inheritance diagram for AutomationRangeDrag:
[legend]

Classes

struct  Line
 

Public Member Functions

 AutomationRangeDrag (EditingContext &, AutomationTimeAxisView *, float initial_value, std::list< ARDOUR::TimelineRange > const &)
 
 AutomationRangeDrag (EditingContext &, std::list< RegionView * > const &, std::list< ARDOUR::TimelineRange > const &, double y_origin, double y_height)
 
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 (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 y_movement_matters () const
 
virtual bool mid_drag_key_event (GdkEventKey *)
 
bool initially_vertical () const
 
virtual void setup_pointer_offset ()
 
virtual void setup_video_offset ()
 
int grab_button () const
 

Private Member Functions

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

Private Attributes

std::list< ARDOUR::TimelineRange_ranges
 
std::list< Line_lines
 
double _y_origin
 
double _y_height
 
bool _nothing_to_drag
 
bool _integral
 
float_t _initial_value
 

Additional Inherited Members

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

Drag of a range of automation data (either on an automation track or region gain), changing value but not position.

Definition at line 1462 of file editor_drag.h.

Constructor & Destructor Documentation

◆ AutomationRangeDrag() [1/2]

AutomationRangeDrag::AutomationRangeDrag ( EditingContext ,
AutomationTimeAxisView ,
float  initial_value,
std::list< ARDOUR::TimelineRange > const &   
)

◆ AutomationRangeDrag() [2/2]

AutomationRangeDrag::AutomationRangeDrag ( EditingContext ,
std::list< RegionView * > const &  ,
std::list< ARDOUR::TimelineRange > const &  ,
double  y_origin,
double  y_height 
)

Member Function Documentation

◆ aborted()

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.

◆ finished()

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.

◆ motion()

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.

◆ setup()

void AutomationRangeDrag::setup ( std::list< std::shared_ptr< AutomationLine > > const &  )
private

◆ start_grab()

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.

◆ value()

double AutomationRangeDrag::value ( std::shared_ptr< ARDOUR::AutomationList list,
Temporal::timepos_t const &  x 
) const
private

◆ x_movement_matters()

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

Reimplemented from Drag.

Definition at line 1473 of file editor_drag.h.

◆ y_fraction()

double AutomationRangeDrag::y_fraction ( double  global_y_position) const
private

Member Data Documentation

◆ _initial_value

float_t AutomationRangeDrag::_initial_value
private

Definition at line 1497 of file editor_drag.h.

◆ _integral

bool AutomationRangeDrag::_integral
private

Definition at line 1496 of file editor_drag.h.

◆ _lines

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

Definition at line 1492 of file editor_drag.h.

◆ _nothing_to_drag

bool AutomationRangeDrag::_nothing_to_drag
private

Definition at line 1495 of file editor_drag.h.

◆ _ranges

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

Definition at line 1482 of file editor_drag.h.

◆ _y_height

double AutomationRangeDrag::_y_height
private

Definition at line 1494 of file editor_drag.h.

◆ _y_origin

double AutomationRangeDrag::_y_origin
private

Definition at line 1493 of file editor_drag.h.


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