summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/LCDFramework/src/CLCDObject.h
blob: 13dbb5a1013e8469c55b116d7e5f5c65d52c407a (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
#ifndef _CLCDOBJECT_H_
#define _CLCDOBJECT_H_

#include "CLCDGfx.h"

class CLCDObject
{
public:
	// Constructor
	CLCDObject();
	// Destructor
	~CLCDObject();
	
	// Initialize the object
	virtual bool Initialize();
	// Shutdown the object
	virtual bool Shutdown();

	// Set the origin of the object
	void SetOrigin(int iX,int iY);
	void SetOrigin(POINT p);
	// Get the origin of the object
	POINT GetOrigin();
	// Set the size of the object
	void SetSize(int iWidth,int iHeight);
	void SetSize(SIZE s);
	// Get the size of the object
	SIZE GetSize();
	int GetWidth();
	int GetHeight();

	// Set the visibility 
	void Show(bool bShow);
	// Check the visibility
	bool IsVisible();

	// Update the object
	virtual bool Update();
	// Draw the object
	virtual bool Draw(CLCDGfx *pGfx);

protected:
	// Called when the size of the object has changed
	virtual void OnSizeChanged(SIZE OldSize);

private:
	POINT	m_Origin;
	SIZE	m_Size;
	bool	m_bShow;
};

#endif