Ardour  9.0-pre0-582-g084a23a80d
FreehandLineDrag< OrderedPointList, OrderedPoint > Class Template Reference

#include <editor_drag.h>

Inheritance diagram for FreehandLineDrag< OrderedPointList, OrderedPoint >:
[legend]

Public Member Functions

 FreehandLineDrag (EditingContext &, ArdourCanvas::Item *, ArdourCanvas::Rectangle &, bool, Temporal::TimeDomain)
 
 ~FreehandLineDrag ()
 
void motion (GdkEvent *, bool)
 
void finished (GdkEvent *, bool)
 
bool mid_drag_key_event (GdkEventKey *)
 
virtual void point_added (ArdourCanvas::Duple const &d, ArdourCanvas::Rectangle const &r, double last_x)
 
virtual void line_extended (ArdourCanvas::Duple const &from, ArdourCanvas::Duple const &to, ArdourCanvas::Rectangle const &r, double last_x)
 
- 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 void start_grab (GdkEvent *e, Gdk::Cursor *c=0)
 
virtual bool end_grab (GdkEvent *)
 
virtual void aborted (bool m)=0
 
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 x_movement_matters () const
 
virtual bool y_movement_matters () const
 
bool initially_vertical () const
 
virtual void setup_pointer_offset ()
 
virtual void setup_video_offset ()
 
int grab_button () const
 

Protected Member Functions

void maybe_add_point (GdkEvent *, Temporal::timepos_t const &, bool first_move)
 
- 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

ArdourCanvas::Itemparent
 
ArdourCanvas::Rectanglebase_rect
 
ArdourCanvas::PolyLinedragging_line
 
bool horizontally_bounded
 
int direction
 
int edge_x
 
bool did_snap
 
bool line_break_pending
 
OrderedPointList drawn_points
 
ArdourCanvas::Coord line_start_x
 
ArdourCanvas::Coord line_start_y
 
- 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

template<typename OrderedPointList, typename OrderedPoint>
class FreehandLineDrag< OrderedPointList, OrderedPoint >

Definition at line 1585 of file editor_drag.h.

Constructor & Destructor Documentation

◆ FreehandLineDrag()

template<typename OrderedPointList , typename OrderedPoint >
FreehandLineDrag< OrderedPointList, OrderedPoint >::FreehandLineDrag ( EditingContext ,
ArdourCanvas::Item ,
ArdourCanvas::Rectangle ,
bool  ,
Temporal::TimeDomain   
)

◆ ~FreehandLineDrag()

template<typename OrderedPointList , typename OrderedPoint >
FreehandLineDrag< OrderedPointList, OrderedPoint >::~FreehandLineDrag ( )

Member Function Documentation

◆ finished()

template<typename OrderedPointList , typename OrderedPoint >
void FreehandLineDrag< OrderedPointList, OrderedPoint >::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.

◆ line_extended()

template<typename OrderedPointList , typename OrderedPoint >
virtual void FreehandLineDrag< OrderedPointList, OrderedPoint >::line_extended ( ArdourCanvas::Duple const &  from,
ArdourCanvas::Duple const &  to,
ArdourCanvas::Rectangle const &  r,
double  last_x 
)
inlinevirtual

Reimplemented in VelocityLineDrag.

Definition at line 1595 of file editor_drag.h.

◆ maybe_add_point()

template<typename OrderedPointList , typename OrderedPoint >
void FreehandLineDrag< OrderedPointList, OrderedPoint >::maybe_add_point ( GdkEvent ,
Temporal::timepos_t const &  ,
bool  first_move 
)
protected

◆ mid_drag_key_event()

template<typename OrderedPointList , typename OrderedPoint >
bool FreehandLineDrag< OrderedPointList, OrderedPoint >::mid_drag_key_event ( GdkEventKey )
virtual

Reimplemented from Drag.

◆ motion()

template<typename OrderedPointList , typename OrderedPoint >
void FreehandLineDrag< OrderedPointList, OrderedPoint >::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.

◆ point_added()

template<typename OrderedPointList , typename OrderedPoint >
virtual void FreehandLineDrag< OrderedPointList, OrderedPoint >::point_added ( ArdourCanvas::Duple const &  d,
ArdourCanvas::Rectangle const &  r,
double  last_x 
)
inlinevirtual

Reimplemented in VelocityLineDrag.

Definition at line 1594 of file editor_drag.h.

Member Data Documentation

◆ base_rect

template<typename OrderedPointList , typename OrderedPoint >
ArdourCanvas::Rectangle& FreehandLineDrag< OrderedPointList, OrderedPoint >::base_rect
protected

Definition at line 1601 of file editor_drag.h.

◆ did_snap

template<typename OrderedPointList , typename OrderedPoint >
bool FreehandLineDrag< OrderedPointList, OrderedPoint >::did_snap
protected

Definition at line 1606 of file editor_drag.h.

◆ direction

template<typename OrderedPointList , typename OrderedPoint >
int FreehandLineDrag< OrderedPointList, OrderedPoint >::direction
protected

Definition at line 1604 of file editor_drag.h.

◆ dragging_line

template<typename OrderedPointList , typename OrderedPoint >
ArdourCanvas::PolyLine* FreehandLineDrag< OrderedPointList, OrderedPoint >::dragging_line
protected

Definition at line 1602 of file editor_drag.h.

◆ drawn_points

template<typename OrderedPointList , typename OrderedPoint >
OrderedPointList FreehandLineDrag< OrderedPointList, OrderedPoint >::drawn_points
protected

Definition at line 1608 of file editor_drag.h.

◆ edge_x

template<typename OrderedPointList , typename OrderedPoint >
int FreehandLineDrag< OrderedPointList, OrderedPoint >::edge_x
protected

Definition at line 1605 of file editor_drag.h.

◆ horizontally_bounded

template<typename OrderedPointList , typename OrderedPoint >
bool FreehandLineDrag< OrderedPointList, OrderedPoint >::horizontally_bounded
protected

Definition at line 1603 of file editor_drag.h.

◆ line_break_pending

template<typename OrderedPointList , typename OrderedPoint >
bool FreehandLineDrag< OrderedPointList, OrderedPoint >::line_break_pending
protected

Definition at line 1607 of file editor_drag.h.

◆ line_start_x

template<typename OrderedPointList , typename OrderedPoint >
ArdourCanvas::Coord FreehandLineDrag< OrderedPointList, OrderedPoint >::line_start_x
protected

Definition at line 1609 of file editor_drag.h.

◆ line_start_y

template<typename OrderedPointList , typename OrderedPoint >
ArdourCanvas::Coord FreehandLineDrag< OrderedPointList, OrderedPoint >::line_start_y
protected

Definition at line 1610 of file editor_drag.h.

◆ parent

template<typename OrderedPointList , typename OrderedPoint >
ArdourCanvas::Item* FreehandLineDrag< OrderedPointList, OrderedPoint >::parent
protected

Definition at line 1600 of file editor_drag.h.


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