Numworks Epsilon  1.4.1
Graphing Calculator Operating System
calculation_graph_controller.h
Go to the documentation of this file.
1 #ifndef GRAPH_CALCULATION_GRAPH_CONTROLLER_H
2 #define GRAPH_CALCULATION_GRAPH_CONTROLLER_H
3 
4 #include "graph_view.h"
5 #include "banner_view.h"
6 #include "../../shared/curve_view_cursor.h"
7 #include "../../shared/interactive_curve_view_range.h"
8 #include "../../shared/function_banner_delegate.h"
9 #include "../cartesian_function.h"
10 
11 namespace Graph {
12 
14 public:
15  CalculationGraphController(Responder * parentResponder, GraphView * graphView, BannerView * bannerView, Shared::InteractiveCurveViewRange * curveViewRange, Shared::CurveViewCursor * cursor, I18n::Message defaultMessage);
16  View * view() override;
17  void viewWillAppear() override;
18  bool handleEvent(Ion::Events::Event event) override;
19  void setFunction(CartesianFunction * function);
20 protected:
21  constexpr static float k_cursorTopMarginRatio = 0.07f; // (cursorHeight/2)/graphViewHeight
22  constexpr static float k_cursorBottomMarginRatio = 0.15f; // (cursorHeight/2+bannerHeigh)/graphViewHeight
23  BannerView * bannerView() override { return m_bannerView; }
24  virtual void reloadBannerView();
25  bool moveCursor(int direction);
27  virtual CartesianFunction::Point computeNewPointOfInterest(double start, double step, double max, Poincare::Context * context) = 0;
34  bool m_isActive;
35 };
36 
37 }
38 
39 #endif
void setFunction(CartesianFunction *function)
CalculationGraphController(Responder *parentResponder, GraphView *graphView, BannerView *bannerView, Shared::InteractiveCurveViewRange *curveViewRange, Shared::CurveViewCursor *cursor, I18n::Message defaultMessage)
Responder * parentResponder() const
Definition: responder.cpp:12
Definition: app.cpp:9
bool handleEvent(Ion::Events::Event event) override
void start()
Definition: rt0.cpp:31
Definition: view.h:23
CartesianFunction::Point computeNewPointOfInteresetFromAbscissa(double start, int direction)
Shared::InteractiveCurveViewRange * m_graphRange
virtual CartesianFunction::Point computeNewPointOfInterest(double start, double step, double max, Poincare::Context *context)=0