Numworks Epsilon  1.4.1
Graphing Calculator Operating System
tangent_graph_controller.h
Go to the documentation of this file.
1 #ifndef GRAPH_TANGENT_GRAPH_CONTROLLER_H
2 #define GRAPH_TANGENT_GRAPH_CONTROLLER_H
3 
4 #include "graph_view.h"
5 #include "banner_view.h"
7 #include "../../shared/simple_interactive_curve_view_controller.h"
8 #include "../../shared/function_banner_delegate.h"
9 #include "../cartesian_function_store.h"
10 
11 namespace Graph {
12 
14 public:
16  const char * title() override;
17  void viewWillAppear() override;
18  void setFunction(CartesianFunction * function);
19 private:
20  constexpr static float k_cursorTopMarginRatio = 0.07f; // (cursorHeight/2)/graphViewHeight
21  constexpr static float k_cursorBottomMarginRatio = 0.22f; // (cursorHeight/2+bannerHeigh)/graphViewHeight
22  Shared::InteractiveCurveViewRange * interactiveCurveViewRange() override { return m_graphRange; }
23  Shared::CurveView * curveView() override { return m_graphView; }
24  BannerView * bannerView() override { return m_bannerView; };
25  void reloadBannerView() override;
26  bool moveCursorHorizontally(int direction) override;
27  bool handleEnter() override;
28  GraphView * m_graphView;
29  BannerView * m_bannerView;
30  Shared::InteractiveCurveViewRange * m_graphRange;
31  CartesianFunction * m_function;
32 };
33 
34 }
35 
36 #endif
Responder * parentResponder() const
Definition: responder.cpp:12
void setFunction(CartesianFunction *function)
Definition: app.cpp:9
TangentGraphController(Responder *parentResponder, GraphView *graphView, BannerView *bannerView, Shared::InteractiveCurveViewRange *curveViewRange, Shared::CurveViewCursor *cursor)