Numworks Epsilon  1.4.1
Graphing Calculator Operating System
app_cell.h
Go to the documentation of this file.
1 #ifndef HOME_APP_CELL_H
2 #define HOME_APP_CELL_H
3 
4 #include <escher.h>
5 
6 namespace Home {
7 
8 class AppCell : public HighlightCell {
9 public:
10  AppCell();
11  void drawRect(KDContext * ctx, KDRect rect) const override;
12 
13  int numberOfSubviews() const override;
14  View * subviewAtIndex(int index) override;
15  void layoutSubviews() override;
16 
17  void setVisible(bool visible);
18  void reloadCell() override;
19  void setAppDescriptor(::App::Descriptor * appDescriptor);
20 private:
21  static constexpr KDCoordinate k_iconMargin = 18;
22  static constexpr KDCoordinate k_iconWidth = 55;
23  static constexpr KDCoordinate k_iconHeight = 56;
24  static constexpr KDCoordinate k_nameWidthMargin = 4;
25  static constexpr KDCoordinate k_nameHeightMargin = 2;
26  ImageView m_iconView;
27  MessageTextView m_nameView;
28  bool m_visible;
29 };
30 
31 }
32 
33 #endif
int numberOfSubviews() const override
Definition: app_cell.cpp:19
int16_t KDCoordinate
Definition: coordinate.h:6
void drawRect(KDContext *ctx, KDRect rect) const override
Definition: app_cell.cpp:14
View * subviewAtIndex(int index) override
Definition: app_cell.cpp:23
void reloadCell() override
Definition: app_cell.cpp:47
Definition: app.cpp:9
void layoutSubviews() override
Definition: app_cell.cpp:28
Definition: rect.h:26
void setVisible(bool visible)
Definition: app_cell.cpp:40
Definition: view.h:23
void setAppDescriptor(::App::Descriptor *appDescriptor)
Definition: app_cell.cpp:34