Numworks Epsilon  1.4.1
Graphing Calculator Operating System
message_view.h
Go to the documentation of this file.
1 #ifndef SHARED_MESSAGE_VIEW_H
2 #define SHARED_MESSAGE_VIEW_H
3 
4 #include <escher.h>
5 
6 class MessageView : public View {
7 public:
8  MessageView(I18n::Message * messages, KDColor * colors, uint8_t numberOfMessages);
9  void drawRect(KDContext * ctx, KDRect rect) const override;
10 protected:
11  int numberOfSubviews() const override { return m_numberOfMessages; }
12  View * subviewAtIndex(int index) override;
13  void layoutSubviews() override;
14 private:
15  constexpr static KDCoordinate k_titleMargin = 40;
16  constexpr static KDCoordinate k_paragraphHeight = 100;
17  constexpr static uint8_t k_maxNumberOfMessages = 8;
18  MessageTextView m_messageTextViews[k_maxNumberOfMessages];
19  uint8_t m_numberOfMessages;
20 };
21 
22 #endif
23 
int numberOfSubviews() const override
Definition: message_view.h:11
int16_t KDCoordinate
Definition: coordinate.h:6
unsigned char uint8_t
Definition: stdint.h:4
View * subviewAtIndex(int index) override
MessageView(I18n::Message *messages, KDColor *colors, uint8_t numberOfMessages)
Definition: message_view.cpp:4
Definition: rect.h:26
Definition: color.h:6
Definition: view.h:23
void layoutSubviews() override
void drawRect(KDContext *ctx, KDRect rect) const override