aboutsummaryrefslogtreecommitdiff
path: root/lib/gui/ewindow.h
blob: 265f512adeeaeaf7e99857affc99962f9ce633c2 (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
#ifndef __lib_gui_ewindow_h
#define __lib_gui_ewindow_h

#include <lib/gui/ewidget.h>
#include <lib/gui/ewindowstyle.h>

class eWidgetDesktop;

class eWindow: public eWidget
{
	friend class eWindowStyle;
public:
	eWindow(eWidgetDesktop *desktop, int z = 0);
	~eWindow();
	void setTitle(const std::string &string);
	std::string getTitle() const;
	eWidget *child() { return m_child; }
	
	enum {
		wfNoBorder = 1
	};

	void setBackgroundColor(const gRGB &col);
	
	void setFlag(int flags);
	void clearFlag(int flags);
protected:
	enum eWindowEvents
	{
		evtTitleChanged = evtUserWidget,
	};
	int event(int event, void *data=0, void *data2=0);
private:
	std::string m_title;
	eWidget *m_child;
	int m_flags;
	eWidgetDesktop *m_desktop;
};

#endif