Numworks Epsilon  1.4.1
Graphing Calculator Operating System
exam_pop_up_controller.h
Go to the documentation of this file.
1 #ifndef APPS_EXAM_POP_UP_CONTROLLER_H
2 #define APPS_EXAM_POP_UP_CONTROLLER_H
3 
4 #include <escher.h>
6 
8 public:
10  void setActivatingExamMode(bool activingExamMode);
11  bool isActivatingExamMode() const { return m_isActivatingExamMode; }
12  // View Controller
13  View * view() override;
14  void viewDidDisappear() override;
15  // Responder
16  void didBecomeFirstResponder() override;
17  bool handleEvent(Ion::Events::Event event) override;
18 private:
19  class ContentView : public View {
20  public:
21  ContentView(Responder * parentResponder);
22  void drawRect(KDContext * ctx, KDRect rect) const override;
23  void setSelectedButton(int selectedButton, App * app);
24  int selectedButton();
25  void setMessages(bool activingExamMode);
26  private:
27  constexpr static KDCoordinate k_buttonMargin = 10;
28  constexpr static KDCoordinate k_buttonHeight = 20;
29  constexpr static KDCoordinate k_topMargin = 12;
30  constexpr static KDCoordinate k_paragraphHeight = 20;
31  int numberOfSubviews() const override;
32  View * subviewAtIndex(int index) override;
33  void layoutSubviews() override;
34  Button m_cancelButton;
35  Button m_okButton;
36  MessageTextView m_warningTextView;
37  MessageTextView m_messageTextView1;
38  MessageTextView m_messageTextView2;
39  MessageTextView m_messageTextView3;
40  };
41  ContentView m_contentView;
42  bool m_isActivatingExamMode;
43  ExamPopUpControllerDelegate * m_delegate;
44 };
45 
46 #endif
47 
ExamPopUpController(ExamPopUpControllerDelegate *delegate)
int16_t KDCoordinate
Definition: coordinate.h:6
Responder * parentResponder() const
Definition: responder.cpp:12
void didBecomeFirstResponder() override
bool handleEvent(Ion::Events::Event event) override
void viewDidDisappear() override
Definition: app.h:23
Definition: rect.h:26
Definition: view.h:23
App * app()
Definition: responder.cpp:77
Definition: button.h:10
void setActivatingExamMode(bool activingExamMode)