summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/CEventLog.h
blob: e5953f92c733525b62242ede528171a13e9a4eaa (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
#ifndef _CEVENTLOG_H_
#define _CEVENTLOG_H_

#include "CLCDList.h"

class CEventLogEntry
{
public:
	HANDLE	hContact;
	tstring strValue;
	tstring strTimestamp;
	tm Time;
	EventType eType;
};

class CEventLog : public CLCDList<CEventLogEntry*>
{
public:
	// constructor
	CEventLog();
	// destructor
	~CEventLog();
	
	// initializes the list
	bool Initialize();
	// deinitializes the list
	bool Shutdown();
	// adds an entry to the list
	CListItem<CEventLogEntry*> *AddItem(CEventLogEntry *);
	
	void SetPosition(CListEntry<CEventLogEntry*> *pEntry);
	bool ScrollUp();
	bool ScrollDown();

	bool SetFont(LOGFONT &lf);

protected:
	// Called to delete the specified entry
	void DeleteEntry(CEventLogEntry *pEntry);
	// Called to draw the specified entry
	void DrawEntry(CLCDGfx *pGfx,CEventLogEntry *pEntry,bool bSelected);

	DWORD m_dwLastScroll;
};

#endif