Numworks Epsilon  1.4.1
Graphing Calculator Operating System
parameters_controller.h
Go to the documentation of this file.
1 #ifndef PROBABILITY_PARAMETERS_CONTROLLER_H
2 #define PROBABILITY_PARAMETERS_CONTROLLER_H
3 
4 #include <escher.h>
5 #include "../shared/float_parameter_controller.h"
6 #include "law/law.h"
8 
9 namespace Probability {
10 
12 public:
13  ParametersController(Responder * parentResponder, Law * m_law, CalculationController * calculationController);
14  const char * title() override;
15  bool handleEvent(Ion::Events::Event event) override;
16  void reinitCalculation();
17  void didBecomeFirstResponder() override;
18  void viewWillAppear() override;
19  int numberOfRows() override;
20  void willDisplayCellForIndex(HighlightCell * cell, int index) override;
21 private:
22  HighlightCell * reusableParameterCell(int index, int type) override;
23  int reusableParameterCellCount(int type) override;
24  void buttonAction() override;
25  double parameterAtIndex(int index) override;
26  bool setParameterAtIndex(int parameterIndex, double f) override;
27  bool textFieldDidFinishEditing(TextField * textField, const char * text, Ion::Events::Event event) override;
28  I18n::Message okButtonText() override;
29  View * loadView() override;
30  void unloadView(View * view) override;
31  class ContentView : public View {
32  public:
33  ContentView(Responder * parentResponder, SelectableTableView * selectableTableView);
34  void drawRect(KDContext * ctx, KDRect rect) const override;
35  MessageTextView * parameterDefinitionAtIndex(int index);
36  void layoutSubviews() override;
37  void setNumberOfParameters(int numberOfParameters);
38  private:
39  constexpr static KDCoordinate k_textMargin = 5;
40  constexpr static KDCoordinate k_titleMargin = 5;
41  int numberOfSubviews() const override;
42  View * subviewAtIndex(int index) override;
43  int m_numberOfParameters;
44  MessageTextView m_titleView;
45  MessageTextView m_firstParameterDefinition;
46  MessageTextView m_secondParameterDefinition;
47  SelectableTableView * m_selectableTableView;
48  };
49  SelectableTableView * selectableTableView() override;
50  ContentView * contentView();
51  SelectableTableView * m_selectableTableView;
52  constexpr static int k_maxNumberOfCells = 2;
54  MessageTableCellWithEditableText * m_menuListCell[k_maxNumberOfCells];
55  Law * m_law;
56  CalculationController * m_calculationController;
57 };
58 
59 }
60 
61 #endif
bool handleEvent(Ion::Events::Event event) override
int16_t KDCoordinate
Definition: coordinate.h:6
Responder * parentResponder() const
Definition: responder.cpp:12
void willDisplayCellForIndex(HighlightCell *cell, int index) override
ParametersController(Responder *parentResponder, Law *m_law, CalculationController *calculationController)
Definition: rect.h:26
Definition: view.h:23