Numworks Epsilon  1.4.1
Graphing Calculator Operating System
function_graph_view.h
Go to the documentation of this file.
1 #ifndef SHARED_FUNCTION_GRAPH_VIEW_H
2 #define SHARED_FUNCTION_GRAPH_VIEW_H
3 
4 #include <escher.h>
5 #include "curve_view.h"
6 #include "function.h"
7 #include "../constant.h"
9 
10 namespace Shared {
11 
12 class FunctionGraphView : public CurveView {
13 public:
15  BannerView * bannerView, View * cursorView);
16  void drawRect(KDContext * ctx, KDRect rect) const override;
18  Poincare::Context * context() const;
19  void selectFunction(Function * function);
20  void setAreaHighlight(float start, float end);
21  virtual void setAreaHighlightColor(bool highlightColor);
22 protected:
23  void reloadBetweenBounds(float start, float end);
28 private:
29  char * label(Axis axis, int index) const override;
30  char m_xLabels[k_maxNumberOfXLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
31  char m_yLabels[k_maxNumberOfYLabels][Poincare::PrintFloat::bufferSizeForFloatsWithPrecision(Constant::ShortNumberOfSignificantDigits)];
32  Poincare::Context * m_context;
33 };
34 
35 }
36 
37 #endif
Poincare::Context * context() const
void reloadBetweenBounds(float start, float end)
static constexpr int ShortNumberOfSignificantDigits
Definition: constant.h:8
void setAreaHighlight(float start, float end)
void drawRect(KDContext *ctx, KDRect rect) const override
void start()
Definition: rt0.cpp:31
static constexpr int k_maxNumberOfXLabels
Definition: curve_view.h:37
Definition: rect.h:26
Definition: view.h:23
void setContext(Poincare::Context *context)
void selectFunction(Function *function)
virtual void setAreaHighlightColor(bool highlightColor)
FunctionGraphView(InteractiveCurveViewRange *graphRange, CurveViewCursor *cursor, BannerView *bannerView, View *cursorView)
static constexpr int k_maxNumberOfYLabels
Definition: curve_view.h:38