]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/glcanvas.h
Add XRC handler for wxBannerWindow and a test for it to the xrc sample.
[wxWidgets.git] / include / wx / gtk / glcanvas.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/glcanvas.h
3 // Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK
4 // Author: Robert Roebling
5 // Modified by:
6 // Created: 17/8/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_GLCANVAS_H_
13 #define _WX_GLCANVAS_H_
14
15 #include "wx/unix/glx11.h"
16
17 //---------------------------------------------------------------------------
18 // wxGLCanvas
19 //---------------------------------------------------------------------------
20
21 class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasX11
22 {
23 public:
24 wxGLCanvas(wxWindow *parent,
25 wxWindowID id = wxID_ANY,
26 const int *attribList = NULL,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = 0,
30 const wxString& name = wxGLCanvasName,
31 const wxPalette& palette = wxNullPalette);
32
33 bool Create(wxWindow *parent,
34 wxWindowID id = wxID_ANY,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 long style = 0,
38 const wxString& name = wxGLCanvasName,
39 const int *attribList = NULL,
40 const wxPalette& palette = wxNullPalette);
41
42
43 // implement wxGLCanvasX11 methods
44 // --------------------------------
45
46 virtual Window GetXWindow() const;
47
48
49 // deprecated methods
50 // ------------------
51
52 #if WXWIN_COMPATIBILITY_2_8
53 wxDEPRECATED(
54 wxGLCanvas(wxWindow *parent,
55 wxWindowID id = wxID_ANY,
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize,
58 long style = 0,
59 const wxString& name = wxGLCanvasName,
60 const int *attribList = NULL,
61 const wxPalette& palette = wxNullPalette)
62 );
63
64 wxDEPRECATED(
65 wxGLCanvas(wxWindow *parent,
66 const wxGLContext *shared,
67 wxWindowID id = wxID_ANY,
68 const wxPoint& pos = wxDefaultPosition,
69 const wxSize& size = wxDefaultSize,
70 long style = 0,
71 const wxString& name = wxGLCanvasName,
72 const int *attribList = NULL,
73 const wxPalette& palette = wxNullPalette)
74 );
75
76 wxDEPRECATED(
77 wxGLCanvas(wxWindow *parent,
78 const wxGLCanvas *shared,
79 wxWindowID id = wxID_ANY,
80 const wxPoint& pos = wxDefaultPosition,
81 const wxSize& size = wxDefaultSize,
82 long style = 0,
83 const wxString& name = wxGLCanvasName,
84 const int *attribList = NULL,
85 const wxPalette& palette = wxNullPalette)
86 );
87
88 // called from "realized" callback to create the implicit context if needed
89 void GTKInitImplicitContext();
90 #endif // WXWIN_COMPATIBILITY_2_8
91
92 // implementation from now on
93 void OnInternalIdle();
94
95 bool m_exposed;
96
97 #if WXWIN_COMPATIBILITY_2_8
98 wxGLContext *m_sharedContext;
99 wxGLCanvas *m_sharedContextOf;
100 const bool m_createImplicitContext;
101 #endif // WXWIN_COMPATIBILITY_2_8
102
103 private:
104 DECLARE_CLASS(wxGLCanvas)
105 };
106
107 #endif // _WX_GLCANVAS_H_
108