Numworks Epsilon  1.4.1
Graphing Calculator Operating System
store_controller.h
Go to the documentation of this file.
1 #ifndef SHARED_STORE_CONTROLLER_H
2 #define SHARED_STORE_CONTROLLER_H
3 
4 #include <escher.h>
5 #include "float_pair_store.h"
8 
9 namespace Shared {
10 
12 public:
14  const char * title() override;
15  int numberOfColumns() override;
16  KDCoordinate columnWidth(int i) override;
17  KDCoordinate cumulatedWidthFromIndex(int i) override;
18  int indexFromCumulatedWidth(KDCoordinate offsetX) override;
19  HighlightCell * reusableCell(int index, int type) override;
20  int reusableCellCount(int type) override;
21  int typeAtLocation(int i, int j) override;
22  void willDisplayCellAtLocation(HighlightCell * cell, int i, int j) override;
23  bool handleEvent(Ion::Events::Event event) override;
24  void didBecomeFirstResponder() override;
25 protected:
27  constexpr static int k_maxNumberOfEditableCells = 22;
28  constexpr static int k_numberOfTitleCells = 2;
29  Responder * tabController() const override;
30  View * loadView() override;
31  void unloadView(View * view) override;
32  bool cellAtLocationIsEditable(int columnIndex, int rowIndex) override;
33  bool setDataAtLocation(double floatBody, int columnIndex, int rowIndex) override;
34  double dataAtLocation(int columnIndex, int rowIndex) override;
35  int numberOfElements() override;
36  int maxNumberOfElements() const override;
37  virtual HighlightCell * titleCells(int index) = 0;
42 };
43 
44 }
45 
46 #endif
const char * title() override
static constexpr int k_maxNumberOfEditableCells
int numberOfColumns() override
static constexpr int maxBufferSize()
Definition: text_field.h:23
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
static constexpr KDCoordinate k_cellWidth
int reusableCellCount(int type) override
FloatPairStore * m_store
void willDisplayCellAtLocation(HighlightCell *cell, int i, int j) override
bool setDataAtLocation(double floatBody, int columnIndex, int rowIndex) override
Responder * tabController() const override
int maxNumberOfElements() const override
void unloadView(View *view) override
ButtonRowController * header()
bool handleEvent(Ion::Events::Event event) override
KDCoordinate columnWidth(int i) override
View * loadView() override
StoreParameterController m_storeParameterController
StoreController(Responder *parentResponder, FloatPairStore *store, ButtonRowController *header)
static constexpr KDCoordinate CommonLeftMargin
Definition: metric.h:8
int typeAtLocation(int i, int j) override
HighlightCell * reusableCell(int index, int type) override
virtual HighlightCell * titleCells(int index)=0
char m_draftTextBuffer[TextField::maxBufferSize()]
Definition: view.h:23
double dataAtLocation(int columnIndex, int rowIndex) override
EvenOddEditableTextCell * m_editableCells[k_maxNumberOfEditableCells]
static constexpr int k_numberOfTitleCells
int indexFromCumulatedWidth(KDCoordinate offsetX) override
KDCoordinate cumulatedWidthFromIndex(int i) override
void didBecomeFirstResponder() override
bool cellAtLocationIsEditable(int columnIndex, int rowIndex) override