Numworks Epsilon  1.4.1
Graphing Calculator Operating System
table_cell.h
Go to the documentation of this file.
1 #ifndef ESCHER_TABLE_CELL_H
2 #define ESCHER_TABLE_CELL_H
3 
5 
6 class TableCell : public HighlightCell {
7 public:
8  enum class Layout {
9  Vertical,
11  };
13  virtual View * labelView() const;
14  virtual View * accessoryView() const;
15  virtual View * subAccessoryView() const;
16  void drawRect(KDContext * ctx, KDRect rect) const override;
17 protected:
18  int numberOfSubviews() const override;
19  View * subviewAtIndex(int index) override;
20  void layoutSubviews() override;
21  constexpr static KDCoordinate k_separatorThickness = 1;
22  constexpr static KDCoordinate k_labelMargin = 10;
23  constexpr static KDCoordinate k_accessoryMargin = 10;
24 private:
25  constexpr static KDCoordinate k_accessoryBottomMargin = 3;
26  Layout m_layout;
27 };
28 
29 #endif
30 
virtual View * accessoryView() const
Definition: table_cell.cpp:15
View * subviewAtIndex(int index) override
Definition: table_cell.cpp:27
int16_t KDCoordinate
Definition: coordinate.h:6
static constexpr KDCoordinate k_separatorThickness
Definition: table_cell.h:21
TableCell(Layout layout=Layout::Horizontal)
Definition: table_cell.cpp:5
int numberOfSubviews() const override
Definition: table_cell.cpp:23
void drawRect(KDContext *ctx, KDRect rect) const override
Definition: table_cell.cpp:75
static constexpr KDCoordinate k_labelMargin
Definition: table_cell.h:22
virtual View * subAccessoryView() const
Definition: table_cell.cpp:19
void layoutSubviews() override
Definition: table_cell.cpp:37
Definition: rect.h:26
Definition: view.h:23
virtual View * labelView() const
Definition: table_cell.cpp:11
static constexpr KDCoordinate k_accessoryMargin
Definition: table_cell.h:23