Numworks Epsilon  1.4.1
Graphing Calculator Operating System
calculation_controller.h
Go to the documentation of this file.
1 #ifndef REGRESSION_CALCULATION_CONTROLLER_H
2 #define REGRESSION_CALCULATION_CONTROLLER_H
3 
4 #include <escher.h>
5 #include "store.h"
7 #include "../shared/tab_table_controller.h"
8 #include "../shared/regular_table_view_data_source.h"
9 
10 namespace Regression {
11 
13 
14 public:
17  CalculationController(const CalculationController& other) = delete;
21  const char * title() override;
22  bool handleEvent(Ion::Events::Event event) override;
23  void didBecomeFirstResponder() override;
24  void tableViewDidChangeSelection(SelectableTableView * t, int previousSelectedCellX, int previousSelectedCellY) override;
25 
26  bool isEmpty() const override;
27  I18n::Message emptyMessage() override;
28  Responder * defaultController() override;
29 
30  int numberOfRows() override;
31  int numberOfColumns() override;
32  void willDisplayCellAtLocation(HighlightCell * cell, int i, int j) override;
33  KDCoordinate columnWidth(int i) override;
34  KDCoordinate rowHeight(int j) override;
35  HighlightCell * reusableCell(int index, int type) override;
36  int reusableCellCount(int type) override;
37  int typeAtLocation(int i, int j) override;
38 private:
39  Responder * tabController() const override;
40  View * loadView() override;
41  void unloadView(View * view) override;
42  constexpr static int k_totalNumberOfRows = 14;
43  constexpr static int k_totalNumberOfColumns = 2;
44  constexpr static int k_maxNumberOfDisplayableRows = 11;
45  constexpr static int k_totalNumberOfDoubleBufferRows = 5;
46  static constexpr KDCoordinate k_cellHeight = 25;
48  EvenOddMessageTextCell * m_titleCells[k_maxNumberOfDisplayableRows];
49  EvenOddExpressionCell * m_r2TitleCell;
50  Poincare::ExpressionLayout * m_r2Layout;
51  EvenOddDoubleBufferTextCell * m_columnTitleCell;
52  EvenOddDoubleBufferTextCell * m_doubleCalculationCells[k_totalNumberOfDoubleBufferRows];
53  EvenOddBufferTextCell * m_calculationCells[k_totalNumberOfRows-k_totalNumberOfDoubleBufferRows];
54  Store * m_store;
55 };
56 
57 }
58 
59 #endif
static constexpr KDCoordinate CommonRightMargin
Definition: metric.h:9
constexpr int Width
Definition: display.h:26
int16_t KDCoordinate
Definition: coordinate.h:6
Responder * parentResponder() const
Definition: responder.cpp:12
void tableViewDidChangeSelection(SelectableTableView *t, int previousSelectedCellX, int previousSelectedCellY) override
KDCoordinate rowHeight(int j) override
ButtonRowController * header()
CalculationController & operator=(const CalculationController &other)=delete
KDCoordinate columnWidth(int i) override
static constexpr KDCoordinate CommonLeftMargin
Definition: metric.h:8
HighlightCell * reusableCell(int index, int type) override
bool handleEvent(Ion::Events::Event event) override
Definition: view.h:23
void willDisplayCellAtLocation(HighlightCell *cell, int i, int j) override
int typeAtLocation(int i, int j) override
CalculationController(Responder *parentResponder, ButtonRowController *header, Store *store)