1 #ifndef GAME_DRAWING_H
2 #define GAME_DRAWING_H
3 
4 class BasicDrawingPanel : public DrawingPanel, public wxPanel
5 {
6 public:
7 	BasicDrawingPanel(wxWindow* parent, int _width, int _height);
GetWindow()8 	wxWindow* GetWindow() { return this; }
Delete()9 	void Delete() { Destroy(); }
10 
11 protected:
PaintEv2(wxPaintEvent & ev)12 	void PaintEv2(wxPaintEvent &ev) { PaintEv(ev); }
13 	void DrawArea(wxWindowDC &dc);
14 
15 	DECLARE_CLASS()
16 	DECLARE_EVENT_TABLE()
17 };
18 
19 #ifndef NO_OGL
20 #include <wx/glcanvas.h>
21 
22 class GLDrawingPanel : public DrawingPanel, public wxGLCanvas
23 {
24 public:
25 	GLDrawingPanel(wxWindow* parent, int _width, int _height);
26 	virtual ~GLDrawingPanel();
GetWindow()27 	wxWindow* GetWindow() { return this; }
Delete()28 	void Delete() { Destroy(); }
29 
30 protected:
PaintEv2(wxPaintEvent & ev)31 	void PaintEv2(wxPaintEvent &ev) { PaintEv(ev); }
32 	void OnSize(wxSizeEvent &);
33 	void DrawArea(wxWindowDC &dc);
34 #if wxCHECK_VERSION(2,9,0) || !defined(__WXMAC__)
35 	wxGLContext ctx;
36 #endif
37 	bool did_init;
38 	void Init();
39 	GLuint texid, vlist;
40 	int texsize;
41 
42 	DECLARE_CLASS()
43 	DECLARE_EVENT_TABLE()
44 };
45 #endif
46 
47 #if defined(__WXMSW__) && !defined(NO_D3D)
48 class DXDrawingPanel : public DrawingPanel, public wxPanel
49 {
50 public:
51 	DXDrawingPanel(wxWindow* parent, int _width, int _height);
GetWindow()52 	wxWindow* GetWindow() { return this; }
Delete()53 	void Delete() { Destroy(); }
54 
55 protected:
PaintEv2(wxPaintEvent & ev)56 	void PaintEv2(wxPaintEvent &ev) { PaintEv(ev); }
57 	void DrawArea(wxWindowDC &);
58 	bool did_init;
59 	void Init();
60 
61 	DECLARE_CLASS()
62 	DECLARE_EVENT_TABLE()
63 };
64 #endif
65 
66 #ifndef NO_CAIRO
67 #include <cairo.h>
68 
69 class CairoDrawingPanel : public DrawingPanel, public wxPanel
70 {
71 public:
72 	CairoDrawingPanel(wxWindow* parent, int _width, int _height);
73 	~CairoDrawingPanel();
GetWindow()74 	wxWindow* GetWindow() { return this; }
Delete()75 	void Delete() { Destroy(); }
76 
77 protected:
PaintEv2(wxPaintEvent & ev)78 	void PaintEv2(wxPaintEvent &ev) { PaintEv(ev); }
79 	void DrawArea(wxWindowDC &);
80 	cairo_surface_t* conv_surf;
81 
82 	DECLARE_CLASS()
83 	DECLARE_EVENT_TABLE()
84 };
85 #endif
86 
87 #endif /* GAME_DRAWING_H */
88