Numworks Epsilon  1.4.1
Graphing Calculator Operating System
histogram_controller.h
Go to the documentation of this file.
1 #ifndef STATISTICS_HISTOGRAM_CONTROLLER_H
2 #define STATISTICS_HISTOGRAM_CONTROLLER_H
3 
4 #include <escher.h>
5 #include "store.h"
6 #include "histogram_view.h"
9 #include "../shared/curve_view.h"
10 
11 namespace Statistics {
12 
14 
15 public:
16  HistogramController(Responder * parentResponder, ButtonRowController * header, Store * store, uint32_t * m_storeVersion, uint32_t * m_barVersion, uint32_t * m_rangeVersion, int * m_selectedBarIndex);
17  const char * title() override;
18  View * view() override;
21  bool handleEvent(Ion::Events::Event event) override;
22  void didBecomeFirstResponder() override;
23 
25  Button * buttonAtIndex(int index, ButtonRowController::Position position) const override;
26 
27  bool isEmpty() const override;
28  I18n::Message emptyMessage() override;
29  Responder * defaultController() override;
30  void viewWillAppear() override;
31  void willExitResponderChain(Responder * nextFirstResponder) override;
32 private:
33  constexpr static int k_maxNumberOfBarsPerWindow = 100;
34  constexpr static int k_maxIntervalLegendLength = 33;
35  constexpr static int k_maxLegendLength = 13;
36  constexpr static int k_maxNumberOfCharacters = 30;
37  Responder * tabController() const;
38  void reloadBannerView();
39  void initRangeParameters();
40  void initBarParameters();
41  void initBarSelection();
42  // return true if the window has scrolled
43  bool moveSelection(int deltaIndex);
44  HistogramBannerView m_bannerView;
45  HistogramView m_view;
46  Button m_settingButton;
47  Store * m_store;
48  uint32_t * m_storeVersion;
49  uint32_t * m_barVersion;
50  uint32_t * m_rangeVersion;
51  int * m_selectedBarIndex;
52  HistogramParameterController m_histogramParameterController;
53 };
54 
55 }
56 
57 
58 #endif
HistogramController(Responder *parentResponder, ButtonRowController *header, Store *store, uint32_t *m_storeVersion, uint32_t *m_barVersion, uint32_t *m_rangeVersion, int *m_selectedBarIndex)
Responder * parentResponder() const
Definition: responder.cpp:12
Button * buttonAtIndex(int index, ButtonRowController::Position position) const override
bool handleEvent(Ion::Events::Event event) override
ButtonRowController * header()
unsigned int uint32_t
Definition: stdint.h:6
I18n::Message emptyMessage() override
int numberOfButtons(ButtonRowController::Position) const override
Definition: view.h:23
void willExitResponderChain(Responder *nextFirstResponder) override
StackViewController * stackController()
Responder * defaultController() override
Definition: button.h:10
HistogramParameterController * histogramParameterController()