[apps/function] Factorize zoom in Function class

The new zoom implemented for ContinuousFunction is now factorized inside
Function to benefit the Sequence class. The same things is done to code
added to Graph::GraphController, which is moved into
FunctionGraphController.
This removes the reimplementation of several methods, most notably
computeYRange, as the implementation for function is general enough to
work on sequences.

Change-Id: I9b8211354064f46c3fa3dde3191dcb39d627a1d2
This commit is contained in:
Gabriel Ozouf
2020-09-02 12:09:21 +02:00
committed by Émilie Feral
parent 33f9bb50a3
commit a6db9688cd
14 changed files with 339 additions and 380 deletions

View File

@@ -20,6 +20,8 @@ public:
void didBecomeFirstResponder() override;
void viewWillAppear() override;
void interestingRanges(Shared::InteractiveCurveViewRange * range) const override;
protected:
float cursorTopMarginRatio() override { return 0.068f; }
void reloadBannerView() override;
@@ -40,6 +42,10 @@ protected:
void initCursorParameters() override;
CurveView * curveView() override;
Range computeYRange(Shared::InteractiveCurveViewRange * interactiveCurveViewRange) override;
void privateComputeRanges(bool tuneXRange, Shared::InteractiveCurveViewRange * range) const;
void yRangeForCursorFirstMove(Shared::InteractiveCurveViewRange * range) const;
private:
virtual FunctionGraphView * functionGraphView() = 0;
virtual FunctionCurveParameterController * curveParameterController() = 0;