Numworks Epsilon  1.4.1
Graphing Calculator Operating System
law_controller.h
Go to the documentation of this file.
1 #ifndef PROBABILITY_LAW_CONTROLLER_H
2 #define PROBABILITY_LAW_CONTROLLER_H
3 
4 #include <escher.h>
5 #include "cell.h"
6 #include "law/law.h"
8 #include <new>
9 
10 namespace Probability {
11 
13 public:
14  LawController(Responder * parentResponder, Law * m_law, ParametersController * parametersController);
15  View * view() override;
16  bool handleEvent(Ion::Events::Event event) override;
17  void didBecomeFirstResponder() override;
18  void viewWillAppear() override;
19  int numberOfRows() override;
20  void willDisplayCellForIndex(HighlightCell * cell, int index) override;
21  KDCoordinate cellHeight() override;
22  HighlightCell * reusableCell(int index) override;
23  int reusableCellCount() override;
24 private:
25  class ContentView : public View {
26  public:
27  ContentView(SelectableTableView * selectableTableView);
28  constexpr static KDCoordinate k_titleMargin = 8;
29  private:
30  int numberOfSubviews() const override;
31  View * subviewAtIndex(int index) override;
32  void layoutSubviews() override;
33  MessageTextView m_titleView;;
34  SelectableTableView * m_selectableTableView;
35  };
36  void setLawAccordingToIndex(int index);
37  constexpr static int k_totalNumberOfModels = 5;
38  Cell m_cells[k_totalNumberOfModels];
39  SelectableTableView m_selectableTableView;
40  ContentView m_contentView;
41  I18n::Message * m_messages;
42  Law * m_law;
43  ParametersController * m_parametersController;
44 
45 };
46 
47 }
48 
49 #endif
KDCoordinate cellHeight() override
int16_t KDCoordinate
Definition: coordinate.h:6
LawController(Responder *parentResponder, Law *m_law, ParametersController *parametersController)
Responder * parentResponder() const
Definition: responder.cpp:12
void didBecomeFirstResponder() override
bool handleEvent(Ion::Events::Event event) override
void willDisplayCellForIndex(HighlightCell *cell, int index) override
HighlightCell * reusableCell(int index) override
Definition: view.h:23
void viewWillAppear() override