summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/LCDFramework/LCDObject.cpp
blob: 2fe0319ca34be8c0ffcc0ec743b38fb423fa0738 (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#include "stdafx.h"
#include "CLCDGfx.h"
#include "CLCDObject.h"

//************************************************************************
// Constructor
//************************************************************************
CLCDObject::CLCDObject()
{
	m_Size.cx = 0;
	m_Size.cy = 0;
	m_Origin.x = 0;
	m_Origin.y = 0;
	m_bShow = true;
}

//************************************************************************
// Destructor
//************************************************************************
CLCDObject::~CLCDObject()
{
}

//************************************************************************
// Initialize the object
//************************************************************************
bool CLCDObject::Initialize()
{
	return false;
}

//************************************************************************
// Shutdown the object
//************************************************************************
bool CLCDObject::Shutdown()
{
	return false;
}

//************************************************************************
// Set the origin of the object
//************************************************************************
void CLCDObject::SetOrigin(int iX,int iY)
{
	m_Origin.x = iX;
	m_Origin.y = iY;
}

void CLCDObject::SetOrigin(POINT p)
{
	m_Origin = p;
}

//************************************************************************
// Get the origin of the object
//************************************************************************
POINT CLCDObject::GetOrigin()
{
	return m_Origin;
}

//************************************************************************
// Set the size of the object
//************************************************************************
void CLCDObject::SetSize(int iWidth,int iHeight)
{
	SIZE OldSize = m_Size;
	m_Size.cx = iWidth;
	m_Size.cy = iHeight;
	OnSizeChanged(OldSize);
}

void CLCDObject::SetSize(SIZE s)
{
	SIZE OldSize = m_Size;
	m_Size = s;
	OnSizeChanged(OldSize);
}

//************************************************************************
// Get the size of the object
//************************************************************************
SIZE CLCDObject::GetSize()
{
	return m_Size;
}

int CLCDObject::GetWidth()
{
	return m_Size.cx;
}

int CLCDObject::GetHeight()
{
	return m_Size.cy;
}

//************************************************************************
// Set the visibility 
//************************************************************************
void CLCDObject::Show(bool bShow)
{
	m_bShow = bShow;
}

//************************************************************************
// Check the visibility
//************************************************************************
bool CLCDObject::IsVisible()
{
	return m_bShow;
}

//************************************************************************
// Update the object
//************************************************************************
bool CLCDObject::Update()
{
	return true;
}


//************************************************************************
// Draw the object
//************************************************************************
bool CLCDObject::Draw(CLCDGfx *pGfx)
{
	return true;
}

//************************************************************************
// Called when the size of the object changed
//************************************************************************
void CLCDObject::OnSizeChanged(SIZE OldSize)
{

}