blob: 78372b7a1cba022b3eda6fd26b621c748117a939 (
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
//************************************************************************
//
// LCDBase.h
//
// The CLCDBase class is the generic base class for all lcd ui objects
//
// Logitech LCD SDK
//
// Copyright 2005 Logitech Inc.
//************************************************************************
#ifndef _LCDBASE_H_INCLUDED_
#define _LCDBASE_H_INCLUDED_
#include "LCDGfx.h"
typedef enum
{
LG_SCROLLING_TEXT, LG_STATIC_TEXT, LG_ICON, LG_PROGRESS_BAR, LG_UNKNOWN
} LGObjectType;
class CLCDBase
{
public:
CLCDBase(void);
virtual ~CLCDBase(void);
public:
virtual HRESULT Initialize(void);
virtual void Shutdown(void);
virtual void SetOrigin(POINT pt);
virtual void SetOrigin(int nX, int nY);
virtual POINT& GetOrigin(void);
virtual void SetSize(SIZE& size);
virtual void SetSize(int nCX, int nCY);
virtual SIZE& GetSize(void);
virtual int GetWidth(void)
{
return GetSize().cx;
}
virtual int GetHeight(void)
{
return GetSize().cy;
};
virtual void Show(BOOL bShow);
virtual BOOL IsVisible();
virtual void Invert(BOOL bEnable);
virtual void ResetUpdate(void);
// local coordinates
virtual void SetLogicalOrigin(POINT& rLogical);
virtual void SetLogicalOrigin(int nX, int nY);
virtual POINT& GetLogicalOrigin(void);
virtual void SetLogicalSize(SIZE& size);
virtual void SetLogicalSize(int nCX, int nCY);
virtual SIZE& GetLogicalSize(void);
virtual void SetBackgroundMode(int nMode);
virtual int GetBackgroundMode();
virtual const LGObjectType GetObjectType();
virtual void SetObjectType(const LGObjectType type);
public:
virtual void OnDraw(CLCDGfx &rGfx) = 0;
virtual void OnUpdate(DWORD dwTimestamp);
protected:
SIZE m_Size;
POINT m_Origin;
BOOL m_bVisible;
BOOL m_bInverted;
POINT m_ptLogical;
SIZE m_sizeLogical;
int m_nBkMode;
LGObjectType m_objectType;
};
#endif // !_LCDBASE_H_INCLUDED_
//** end of LCDBase.h ****************************************************
|