Blame view

build4/epsilon-master/apps/hardware_test/pop_up_controller.h 1.21 KB
6663b6c9   adorian   projet complet av...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
  #ifndef HARDWARE_TEST_POP_UP_CONTROLLER_H
  #define HARDWARE_TEST_POP_UP_CONTROLLER_H
  
  #include <escher.h>
  
  namespace HardwareTest {
  
  class PopUpController : public ViewController {
  public:
    PopUpController();
    View * view() override;
    void didBecomeFirstResponder() override;
    bool handleEvent(Ion::Events::Event event) override;
  private:
    class ContentView : public View, public Responder {
    public:
      ContentView(Responder * parentResponder);
      void drawRect(KDContext * ctx, KDRect rect) const override;
      void setSelectedButton(int selectedButton);
      int selectedButton();
    private:
      constexpr static KDCoordinate k_buttonMargin = 10;
      constexpr static KDCoordinate k_buttonHeight = 20;
      constexpr static KDCoordinate k_topMargin = 8;
      constexpr static KDCoordinate k_paragraphHeight = 20;
      int numberOfSubviews() const override;
      View * subviewAtIndex(int index) override;
      void layoutSubviews() override;
      Button m_cancelButton;
      Button m_okButton;
      MessageTextView m_warningTextView;
      MessageTextView m_messageTextView1;
      MessageTextView m_messageTextView2;
      MessageTextView m_messageTextView3;
      MessageTextView m_messageTextView4;
    };
    ContentView m_contentView;
  };
  
  }
  
  #endif