Numworks Epsilon  1.4.1
Graphing Calculator Operating System
keyboard_view.h
Go to the documentation of this file.
1 #ifndef HARDWARE_TEST_KEYBOARD_VIEW_H
2 #define HARDWARE_TEST_KEYBOARD_VIEW_H
3 
4 #include <escher.h>
5 
6 namespace HardwareTest {
7 
8 class KeyboardView : public View {
9 public:
10  KeyboardView();
11  int testedKeyIndex() const;
12  void setTestedKeyIndex(int i);
13  void drawRect(KDContext * ctx, KDRect rect) const override;
14 private:
15  void drawKey(int key, KDContext * ctx, KDRect rect) const;
16  constexpr static int k_margin = 4;
17  constexpr static int k_smallSquareSize = 8;
18  constexpr static int k_bigSquareSize = 14;
19  constexpr static int k_smallRectHeight = 8;
20  constexpr static int k_smallRectWidth = 16;
21  constexpr static int k_bigRectHeight = 14;
22  constexpr static int k_bigRectWidth = 20;
23  int m_testedKeyIndex;
24 };
25 }
26 
27 #endif
28 
Definition: rect.h:26
Definition: view.h:23
void drawRect(KDContext *ctx, KDRect rect) const override