blob: 1f8b431a73acb8784916fafee13a0aa36d247f9b (
plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
#ifndef _CLCDSCREEN_H_
#define _CLCDSCREEN_H_
#include "CLCDGfx.h"
#include "CLCDObject.h"
class CLCDScreen
{
public:
// Constructor
CLCDScreen();
// Destructor
~CLCDScreen();
// Initializes the screen
virtual bool Initialize();
// Shutdown the scren
virtual bool Shutdown();
// Updates the screen
virtual bool Update();
// Draws the screen
virtual bool Draw(CLCDGfx *pGfx);
// Sets the screen's time until expiration
void SetExpiration(DWORD dwTime);
// Check if the screen has expired
bool HasExpired();
// Sets the alert status of the screen
void SetAlert(bool bAlert);
// gets the alert status of the scren
bool GetAlert();
// adds an object to the screen's object list
bool AddObject(CLCDObject *pObject);
// removes an object from the screen's object list
bool RemoveObject(CLCDObject *pObject);
// get the screen's height
int GetHeight();
// get the screen's width
int GetWidth();
// called when the screens size has changed
virtual void OnSizeChanged();
public:
// Called when an LCD-button is pressed
virtual void OnLCDButtonDown(int iButton);
// Called when an LCD-button event is repeated
virtual void OnLCDButtonRepeated(int iButton);
// Called when an LCD-button is released
virtual void OnLCDButtonUp(int iButton);
// Called when the screen is activated
virtual void OnActivation();
// Called when the screen is deactivated
virtual void OnDeactivation();
// Called when the screen has expired
virtual void OnExpiration();
private:
SIZE m_Size;
vector<CLCDObject*> m_Objects;
bool m_bAlert;
DWORD m_dwExpiration;
};
#endif
|