Numworks Epsilon  1.4.1
Graphing Calculator Operating System
history_controller.h
Go to the documentation of this file.
1 #ifndef CALCULATION_HISTORY_CONTROLLER_H
2 #define CALCULATION_HISTORY_CONTROLLER_H
3 
4 #include <escher.h>
5 #include <poincare.h>
6 #include "history_view_cell.h"
7 #include "calculation_store.h"
9 
10 namespace Calculation {
11 
12 class App;
13 
15 public:
17 
18  bool handleEvent(Ion::Events::Event event) override;
19  void didBecomeFirstResponder() override;
20  void willExitResponderChain(Responder * nextFirstResponder) override;
21  void reload();
22  int numberOfRows() override;
23  HighlightCell * reusableCell(int index, int type) override;
24  int reusableCellCount(int type) override;
25  void willDisplayCellForIndex(HighlightCell * cell, int index) override;
26  KDCoordinate rowHeight(int j) override;
27  KDCoordinate cumulatedHeightFromIndex(int j) override;
28  int indexFromCumulatedHeight(KDCoordinate offsetY) override;
29  int typeAtLocation(int i, int j) override;
30  void tableViewDidChangeSelection(SelectableTableView * t, int previousSelectedCellX, int previousSelectedCellY) override;
31  void scrollToCell(int i, int j);
32  View * loadView() override;
33  void unloadView(View * view) override;
34 private:
35  CalculationSelectableTableView * selectableTableView();
36  constexpr static int k_maxNumberOfDisplayedRows = 5;
37  HistoryViewCell * m_calculationHistory[k_maxNumberOfDisplayedRows];
38  CalculationStore * m_calculationStore;
39 };
40 
41 }
42 
43 #endif
void willDisplayCellForIndex(HighlightCell *cell, int index) override
void tableViewDidChangeSelection(SelectableTableView *t, int previousSelectedCellX, int previousSelectedCellY) override
HistoryController(Responder *parentResponder, CalculationStore *calculationStore)
int16_t KDCoordinate
Definition: coordinate.h:6
Responder * parentResponder() const
Definition: responder.cpp:12
bool handleEvent(Ion::Events::Event event) override
int indexFromCumulatedHeight(KDCoordinate offsetY) override
KDCoordinate cumulatedHeightFromIndex(int j) override
HighlightCell * reusableCell(int index, int type) override
Definition: app.h:23
void willExitResponderChain(Responder *nextFirstResponder) override
Definition: view.h:23
void unloadView(View *view) override
KDCoordinate rowHeight(int j) override
int typeAtLocation(int i, int j) override
int reusableCellCount(int type) override