[apps/shared] Factorize regression and function did change range method

Change-Id: Ie4ddefe883a4a0c40f50b5b2afe3d6eb7aa78e0e
This commit is contained in:
Émilie Feral
2017-06-15 17:19:06 +02:00
parent 15892aa7bf
commit 98a877082c
7 changed files with 129 additions and 96 deletions

View File

@@ -16,7 +16,6 @@ public:
bool isEmpty() const override;
ViewController * initialisationParameterController() override;
void viewWillAppear() override;
bool didChangeRange(Shared::InteractiveCurveViewRange * interactiveCurveViewRange) override;
protected:
constexpr static float k_cursorTopMarginRatio = 0.068f; // (cursorHeight/2)/graphViewHeight
constexpr static float k_cursorRightMarginRatio = 0.04f; // (cursorWidth/2)/graphViewWidth
@@ -32,6 +31,9 @@ private:
constexpr static float k_displayTopMarginRatio = 0.09f;
constexpr static float k_displayBottomMarginRatio = 0.2f;
InteractiveCurveViewRangeDelegate::Range computeYRange(InteractiveCurveViewRange * interactiveCurveViewRange) override;
float addMargin(float x, float range, bool isMin) override;
void initRangeParameters() override;
bool moveCursorVertically(int direction) override;
CurveView * curveView() override;