summaryrefslogtreecommitdiff
path: root/widgettooltip.h
blob: e21765fc26d4cdf89763b08cefea5382ad3c3c4c (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
#ifndef WIDGETTOOLTIP_H
#define WIDGETTOOLTIP_H

#include <skygi/skygi.h>

#include "widget.h"

//! A Tooltip class

class CTooltip {
	public:
		/*! Constructor */
		CTooltip();
		
		/*!
			Create Tooltip
			
			\param parent HANDLE of the parent window on which to draw
			\param owner Parent window of the tooltip when created (default: NULL)
			\param text Text to be displayed
			\param popuptime Popup time in milliseconds
			
			\return Success: S_OK\n
			Failure: E_HANDLE
		*/		
		HRESULT	Create(HANDLE parent, HANDLE owner, char * text, unsigned int popuptime);
		
		/*!
			Enable Tooltip
		*/
		HRESULT	Enable();
		
		/*!
			Disable Tooltip
		*/
		HRESULT	Disable();
		
		HRESULT	SetText(char * text);
		
		char *	GetText();
		
		HRESULT SetPopupTime(unsigned int popuptime);
		
		unsigned int	GetPopupTime();
		
	protected:
		HANDLE hWnd;
		char Text[64];
		unsigned int PopupTime;
};

#endif