-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomScreen.h
42 lines (31 loc) · 924 Bytes
/
CustomScreen.h
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
// CustomScreen.h
#ifndef _CUSTOMSCREEN_h
#define _CUSTOMSCREEN_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
#include "LinkedList.h"
#include "Layout.h"
#include "Widget.h"
class CustomScreen:public Layout{
public:
virtual int CalculateHeight(Renderer& renderer) override {
return height;
}
virtual int CalculateWidth(Renderer& renderer) override {
return width;
}
virtual void Up(Renderer& renderer) override {}
virtual void Down(Renderer& renderer) override {}
virtual void Ok(Renderer& renderer) override {}
virtual void Back(Renderer& renderer) override {}
virtual void DrawActiveIndicator(Renderer &renderer) override {
//Serial.println("Drawing generic indicator");
renderer.FillRectangle(0, renderer.GetScreenHeight() - 1, 1, renderer.GetScreenWidth());
}
virtual void CalculateLayout(Renderer& renderer) override {
}
};
#endif