Numworks Epsilon  1.4.1
Graphing Calculator Operating System
zoom_parameter_controller.h
Go to the documentation of this file.
1 #ifndef SHARED_ZOOM_PARAMETER_CONTROLLER_H
2 #define SHARED_ZOOM_PARAMETER_CONTROLLER_H
3 
4 #include <escher.h>
6 #include "curve_view.h"
7 #include "../i18n.h"
8 
9 namespace Shared {
10 
12 public:
13  ZoomParameterController(Responder * parentResponder, InteractiveCurveViewRange * interactiveCurveViewRange, CurveView * curveView);
14  const char * title() override;
15  View * view() override;
16  bool handleEvent(Ion::Events::Event event) override;
17  void viewWillAppear() override;
18  void didBecomeFirstResponder() override;
19 private:
20  class ContentView : public View {
21  public:
22  ContentView(CurveView * curveView);
23  void layoutSubviews() override;
24  CurveView * curveView();
25  private:
26  class LegendView : public View {
27  public:
28  LegendView();
29  void drawRect(KDContext * ctx, KDRect rect) const override;
30  private:
31  constexpr static int k_numberOfLegends = 3;
32  constexpr static int k_numberOfTokens = 6;
33  constexpr static KDCoordinate k_tokenWidth = 10;
34  void layoutSubviews() override;
35  int numberOfSubviews() const override;
36  View * subviewAtIndex(int index) override;
37  MessageTextView m_legends[k_numberOfLegends];
38  KeyView m_legendPictograms[k_numberOfTokens];
39  };
40  int numberOfSubviews() const override;
41  View * subviewAtIndex(int index) override;
42  CurveView * m_curveView;
43  LegendView m_legendView;
44  constexpr static KDCoordinate k_legendHeight = 30;
45  };
46  ContentView m_contentView;
47  InteractiveCurveViewRange * m_interactiveRange;
48 };
49 
50 }
51 
52 #endif
ZoomParameterController(Responder *parentResponder, InteractiveCurveViewRange *interactiveCurveViewRange, CurveView *curveView)
int16_t KDCoordinate
Definition: coordinate.h:6
bool handleEvent(Ion::Events::Event event) override
Responder * parentResponder() const
Definition: responder.cpp:12
Definition: rect.h:26
Definition: view.h:23