summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_line.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-01-01 22:11:15 +0000
committerCarl Hetherington <carl@carlh.net>2010-01-01 22:11:15 +0000
commitf5acf936728c721bc556b7b3dfe69ebf0c3d63ed (patch)
tree0041127f99ecc339917c530ac4cf339c740f6af8 /gtk2_ardour/automation_line.h
parent6572f421a40b30112dbe11a4eace115a6af1c83e (diff)
First cut of some Pro-tools inspired editing features; linked play/play range
and linked object/range modes. git-svn-id: svn://localhost/ardour2/branches/3.0@6431 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_line.h')
-rw-r--r--gtk2_ardour/automation_line.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h
index 35923c08b8..436e5cbb20 100644
--- a/gtk2_ardour/automation_line.h
+++ b/gtk2_ardour/automation_line.h
@@ -74,10 +74,11 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
bool control_points_adjacent (double xval, uint32_t& before, uint32_t& after);
/* dragging API */
- virtual void start_drag (ControlPoint*, nframes_t x, float fraction);
- virtual void point_drag(ControlPoint&, nframes_t x, float, bool with_push);
- virtual void end_drag (ControlPoint*);
- virtual void line_drag(uint32_t i1, uint32_t i2, float, bool with_push);
+ virtual void start_drag_single (ControlPoint*, nframes_t x, float);
+ virtual void start_drag_line (uint32_t, uint32_t, float);
+ virtual void start_drag_multiple (std::list<ControlPoint*>, float, XMLNode *);
+ virtual void drag_motion (nframes_t, float, bool);
+ virtual void end_drag ();
ControlPoint* nth (uint32_t);
uint32_t npoints() const { return control_points.size(); }
@@ -130,6 +131,9 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
void modify_point_y (ControlPoint&, double);
+ void add_always_in_view (double);
+ void clear_always_in_view ();
+
protected:
std::string _name;
@@ -164,8 +168,9 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
static bool invalid_point (ALPoints&, uint32_t index);
void determine_visible_control_points (ALPoints&);
- void sync_model_with_view_point (ControlPoint&, bool did_push, int64_t distance);
- void sync_model_with_view_line (uint32_t, uint32_t);
+ void sync_model_with_view_point (ControlPoint&, bool, int64_t);
+ void sync_model_with_view_points (std::list<ControlPoint*>, bool, int64_t);
+ void start_drag_common (nframes_t, float);
virtual void change_model (ARDOUR::AutomationList::iterator, double x, double y);
@@ -177,18 +182,17 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulDestructible
virtual void add_model_point (ALPoints& tmp_points, double frame, double yfract);
private:
- uint32_t drags;
- double first_drag_fraction;
- double last_drag_fraction;
- uint32_t line_drag_cp1;
- uint32_t line_drag_cp2;
- int64_t drag_x;
- int64_t drag_distance;
+ std::list<ControlPoint*> _drag_points; ///< points we are dragging
+ bool _drag_had_movement; ///< true if the drag has seen movement, otherwise false
+ nframes64_t drag_x; ///< last x position of the drag, in frames
+ nframes64_t drag_distance; ///< total x movement of the drag, in frames
+ double _last_drag_fraction; ///< last y position of the drag, as a fraction
+ std::list<double> _always_in_view;
const Evoral::TimeConverter<double, ARDOUR::sframes_t>& _time_converter;
ARDOUR::AutomationList::InterpolationStyle _interpolation;
- void modify_view_point (ControlPoint&, double, double, bool with_push);
+ void modify_view_point (ControlPoint&, double, double, bool, bool with_push);
void reset_line_coords (ControlPoint&);
void add_visible_control_point (uint32_t, uint32_t, double, double, ARDOUR::AutomationList::iterator, uint32_t);