diff options
author | Robin Gareus <robin@gareus.org> | 2017-06-21 13:03:00 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-06-21 18:13:03 +0200 |
commit | fd36355e2cd95550a0f7d9b7a6f5e3bc2fcc7fa2 (patch) | |
tree | ca8f3c671b99902f9dd083577681e09330a825c6 /gtk2_ardour/automation_line.h | |
parent | 1db9ce4c90b0a4b1f575e1517b200a506470f3c1 (diff) |
Log-scale/relative automation point dragging
Diffstat (limited to 'gtk2_ardour/automation_line.h')
-rw-r--r-- | gtk2_ardour/automation_line.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk2_ardour/automation_line.h b/gtk2_ardour/automation_line.h index b004dc6a56..07b8df5148 100644 --- a/gtk2_ardour/automation_line.h +++ b/gtk2_ardour/automation_line.h @@ -86,7 +86,7 @@ public: virtual void start_drag_single (ControlPoint*, double, float); virtual void start_drag_line (uint32_t, uint32_t, float); virtual void start_drag_multiple (std::list<ControlPoint*>, float, XMLNode *); - virtual std::pair<double, float> drag_motion (double, float, bool, bool with_push, uint32_t& final_index); + virtual std::pair<float, float> drag_motion (double, float, bool, bool with_push, uint32_t& final_index); virtual void end_drag (bool with_push, uint32_t final_index); ControlPoint* nth (uint32_t); @@ -118,13 +118,16 @@ public: virtual std::string get_verbose_cursor_string (double) const; std::string get_verbose_cursor_relative_string (double, double) const; std::string fraction_to_string (double) const; - std::string fraction_to_relative_string (double, double) const; + std::string delta_to_string (double) const; double string_to_fraction (std::string const &) const; void view_to_model_coord (double& x, double& y) const; void view_to_model_coord_y (double &) const; void model_to_view_coord (double& x, double& y) const; void model_to_view_coord_y (double &) const; + double compute_delta (double from, double to) const; + void apply_delta (double& val, double delta) const; + void set_list(boost::shared_ptr<ARDOUR::AutomationList> list); boost::shared_ptr<ARDOUR::AutomationList> the_list() const { return alist; } @@ -190,7 +193,7 @@ protected: public: ContiguousControlPoints (AutomationLine& al); double clamp_dx (double dx); - void move (double dx, double dy); + void move (double dx, double dvalue); void compute_x_bounds (PublicEditor& e); private: AutomationLine& line; |