]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/glcanvas.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / gtk1 / glcanvas.h
CommitLineData
8b089c5e 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/gtk1/glcanvas.h
77ffb593 3// Purpose: wxGLCanvas, for using OpenGL/Mesa with wxWidgets and GTK
8b089c5e
JS
4// Author: Robert Roebling
5// Modified by:
6// Created: 17/8/98
8b089c5e 7// Copyright: (c) Robert Roebling
65571936 8// Licence: wxWindows licence
8b089c5e
JS
9/////////////////////////////////////////////////////////////////////////////
10
db4c39a9
VZ
11#ifndef _WX_GLCANVAS_H_
12#define _WX_GLCANVAS_H_
13
498ace9e 14#include "wx/unix/glx11.h"
8b089c5e
JS
15
16//---------------------------------------------------------------------------
a6f5aa49 17// wxGLCanvas
8b089c5e
JS
18//---------------------------------------------------------------------------
19
163b3ad7 20class WXDLLIMPEXP_GL wxGLCanvas : public wxGLCanvasX11
8b089c5e
JS
21{
22public:
dc3065a5
VZ
23 wxGLCanvas(wxWindow *parent,
24 wxWindowID id = wxID_ANY,
25 const int *attribList = NULL,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 long style = 0,
29 const wxString& name = wxGLCanvasName,
30 const wxPalette& palette = wxNullPalette);
31
32 bool Create(wxWindow *parent,
33 wxWindowID id = wxID_ANY,
2b5f62a0
VZ
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 long style = 0,
37 const wxString& name = wxGLCanvasName,
dc3065a5
VZ
38 const int *attribList = NULL,
39 const wxPalette& palette = wxNullPalette);
2b5f62a0 40
8b089c5e 41
498ace9e
VZ
42 // implement wxGLCanvasX11 methods
43 // -------------------------------
2b5f62a0 44
498ace9e 45 virtual Window GetXWindow() const;
dc3065a5
VZ
46
47
48 // deprecated methods
49 // ------------------
50
51#if WXWIN_COMPATIBILITY_2_8
0503f19c 52 wxDEPRECATED_CONSTRUCTOR(
dc3065a5
VZ
53 wxGLCanvas(wxWindow *parent,
54 wxWindowID id = wxID_ANY,
55 const wxPoint& pos = wxDefaultPosition,
56 const wxSize& size = wxDefaultSize,
57 long style = 0,
58 const wxString& name = wxGLCanvasName,
59 const int *attribList = NULL,
60 const wxPalette& palette = wxNullPalette)
61 );
62
0503f19c 63 wxDEPRECATED_CONSTRUCTOR(
dc3065a5
VZ
64 wxGLCanvas(wxWindow *parent,
65 const wxGLContext *shared,
66 wxWindowID id = wxID_ANY,
67 const wxPoint& pos = wxDefaultPosition,
68 const wxSize& size = wxDefaultSize,
69 long style = 0,
70 const wxString& name = wxGLCanvasName,
71 const int *attribList = NULL,
72 const wxPalette& palette = wxNullPalette)
73 );
74
0503f19c 75 wxDEPRECATED_CONSTRUCTOR(
dc3065a5
VZ
76 wxGLCanvas(wxWindow *parent,
77 const wxGLCanvas *shared,
78 wxWindowID id = wxID_ANY,
79 const wxPoint& pos = wxDefaultPosition,
80 const wxSize& size = wxDefaultSize,
81 long style = 0,
82 const wxString& name = wxGLCanvasName,
83 const int *attribList = NULL,
84 const wxPalette& palette = wxNullPalette)
85 );
86
87 // called from "realized" callback to create the implicit context if needed
88 void GTKInitImplicitContext();
89#endif // WXWIN_COMPATIBILITY_2_8
90
91 // implementation from now on
92 virtual void OnInternalIdle();
93
2b5f62a0 94
8b089c5e 95 GtkWidget *m_glWidget;
dc3065a5
VZ
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
2b5f62a0 102
8b089c5e 103private:
8b089c5e
JS
104 DECLARE_CLASS(wxGLCanvas)
105};
106
dc3065a5 107#endif // _WX_GLCANVAS_H_
8b089c5e 108