[apps] Shared: Factorize code: all FunctionGraphView have a member

indicating the selected function
This commit is contained in:
Émilie Feral
2018-01-08 15:53:14 +01:00
committed by EmilieNumworks
parent 0dec52a708
commit a6050fda55
5 changed files with 16 additions and 14 deletions

View File

@@ -3,6 +3,7 @@
#include <escher.h>
#include "curve_view.h"
#include "function.h"
#include "../constant.h"
#include "interactive_curve_view_range.h"
@@ -15,6 +16,9 @@ public:
void drawRect(KDContext * ctx, KDRect rect) const override;
void setContext(Poincare::Context * context);
Poincare::Context * context() const;
void selectFunction(Function * function);
protected:
Function * m_selectedFunction;
private:
char * label(Axis axis, int index) const override;
char m_xLabels[k_maxNumberOfXLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];