]> git.saurik.com Git - wxWidgets.git/blame - wxPython/contrib/glcanvas/gtk/glcanvas.py
don't draw focus rect for custom drawn items when the list control doesn't have focus
[wxWidgets.git] / wxPython / contrib / glcanvas / gtk / glcanvas.py
CommitLineData
32fe5131 1# This file was created automatically by SWIG 1.3.27.
d14a1e28 2# Don't modify this file, modify the SWIG interface instead.
a29cd6c0 3
db3e571a
RD
4"""
5`GLCanvas` provides an OpenGL Context on a `wx.Window`.
6"""
7
d14a1e28 8import _glcanvas
a29cd6c0 9
3004cfd8
RD
10def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
11 if (name == "this"):
12 if isinstance(value, class_type):
13 self.__dict__[name] = value.this
14 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
15 del value.thisown
16 return
17 method = class_type.__swig_setmethods__.get(name,None)
18 if method: return method(self,value)
19 if (not static) or hasattr(self,name) or (name == "thisown"):
20 self.__dict__[name] = value
21 else:
22 raise AttributeError("You cannot add attributes to %s" % self)
23
24def _swig_setattr(self,class_type,name,value):
25 return _swig_setattr_nondynamic(self,class_type,name,value,0)
26
27def _swig_getattr(self,class_type,name):
28 method = class_type.__swig_getmethods__.get(name,None)
29 if method: return method(self)
30 raise AttributeError,name
31
32import types
33try:
34 _object = types.ObjectType
35 _newclass = 1
36except AttributeError:
37 class _object : pass
38 _newclass = 0
39del types
40
41
42def _swig_setattr_nondynamic_method(set):
43 def set_attr(self,name,value):
44 if hasattr(self,name) or (name in ("this", "thisown")):
45 set(self,name,value)
46 else:
47 raise AttributeError("You cannot add attributes to %s" % self)
48 return set_attr
49
50
54f9ee45
RD
51import _core
52wx = _core
66c033b4 53__docfilter__ = wx.__DocFilter(globals())
54f9ee45 54class GLContext(_core.Object):
3004cfd8 55 """Proxy of C++ GLContext class"""
e811c8ce
RD
56 def __repr__(self):
57 return "<%s.%s; proxy of C++ wxGLContext instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 58 def __init__(self, *args, **kwargs):
0df68c9f 59 """
a95a7133 60 __init__(self, bool isRGB, GLCanvas win, wxPalette palette=wxNullPalette,
0df68c9f
RD
61 GLContext other=None) -> GLContext
62 """
d14a1e28
RD
63 newobj = _glcanvas.new_GLContext(*args, **kwargs)
64 self.this = newobj.this
a29cd6c0 65 self.thisown = 1
d14a1e28
RD
66 del newobj.thisown
67 def __del__(self, destroy=_glcanvas.delete_GLContext):
a95a7133 68 """__del__(self)"""
d14a1e28
RD
69 try:
70 if self.thisown: destroy(self)
71 except: pass
e811c8ce
RD
72
73 def SetCurrent(*args, **kwargs):
a95a7133 74 """SetCurrent(self)"""
e811c8ce
RD
75 return _glcanvas.GLContext_SetCurrent(*args, **kwargs)
76
77 def SetColour(*args, **kwargs):
a95a7133 78 """SetColour(self, String colour)"""
e811c8ce
RD
79 return _glcanvas.GLContext_SetColour(*args, **kwargs)
80
81 def SwapBuffers(*args, **kwargs):
a95a7133 82 """SwapBuffers(self)"""
e811c8ce
RD
83 return _glcanvas.GLContext_SwapBuffers(*args, **kwargs)
84
85 def SetupPixelFormat(*args, **kwargs):
a95a7133 86 """SetupPixelFormat(self)"""
e811c8ce
RD
87 return _glcanvas.GLContext_SetupPixelFormat(*args, **kwargs)
88
89 def SetupPalette(*args, **kwargs):
a95a7133 90 """SetupPalette(self, wxPalette palette)"""
e811c8ce
RD
91 return _glcanvas.GLContext_SetupPalette(*args, **kwargs)
92
93 def CreateDefaultPalette(*args, **kwargs):
a95a7133 94 """CreateDefaultPalette(self) -> wxPalette"""
e811c8ce
RD
95 return _glcanvas.GLContext_CreateDefaultPalette(*args, **kwargs)
96
97 def GetPalette(*args, **kwargs):
a95a7133 98 """GetPalette(self) -> wxPalette"""
e811c8ce
RD
99 return _glcanvas.GLContext_GetPalette(*args, **kwargs)
100
101 def GetWindow(*args, **kwargs):
a95a7133 102 """GetWindow(self) -> Window"""
e811c8ce
RD
103 return _glcanvas.GLContext_GetWindow(*args, **kwargs)
104
a29cd6c0 105
d14a1e28
RD
106class GLContextPtr(GLContext):
107 def __init__(self, this):
a29cd6c0 108 self.this = this
d14a1e28
RD
109 if not hasattr(self,"thisown"): self.thisown = 0
110 self.__class__ = GLContext
111_glcanvas.GLContext_swigregister(GLContextPtr)
b2dc1044
RD
112cvar = _glcanvas.cvar
113GLCanvasNameStr = cvar.GLCanvasNameStr
d14a1e28
RD
114
115WX_GL_RGBA = _glcanvas.WX_GL_RGBA
116WX_GL_BUFFER_SIZE = _glcanvas.WX_GL_BUFFER_SIZE
117WX_GL_LEVEL = _glcanvas.WX_GL_LEVEL
118WX_GL_DOUBLEBUFFER = _glcanvas.WX_GL_DOUBLEBUFFER
119WX_GL_STEREO = _glcanvas.WX_GL_STEREO
120WX_GL_AUX_BUFFERS = _glcanvas.WX_GL_AUX_BUFFERS
121WX_GL_MIN_RED = _glcanvas.WX_GL_MIN_RED
122WX_GL_MIN_GREEN = _glcanvas.WX_GL_MIN_GREEN
123WX_GL_MIN_BLUE = _glcanvas.WX_GL_MIN_BLUE
124WX_GL_MIN_ALPHA = _glcanvas.WX_GL_MIN_ALPHA
125WX_GL_DEPTH_SIZE = _glcanvas.WX_GL_DEPTH_SIZE
126WX_GL_STENCIL_SIZE = _glcanvas.WX_GL_STENCIL_SIZE
127WX_GL_MIN_ACCUM_RED = _glcanvas.WX_GL_MIN_ACCUM_RED
128WX_GL_MIN_ACCUM_GREEN = _glcanvas.WX_GL_MIN_ACCUM_GREEN
129WX_GL_MIN_ACCUM_BLUE = _glcanvas.WX_GL_MIN_ACCUM_BLUE
130WX_GL_MIN_ACCUM_ALPHA = _glcanvas.WX_GL_MIN_ACCUM_ALPHA
54f9ee45 131class GLCanvas(_core.Window):
3004cfd8 132 """Proxy of C++ GLCanvas class"""
e811c8ce
RD
133 def __repr__(self):
134 return "<%s.%s; proxy of C++ wxGLCanvas instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 135 def __init__(self, *args, **kwargs):
0df68c9f 136 """
a95a7133 137 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
b2dc1044
RD
138 Size size=DefaultSize, long style=0, String name=GLCanvasNameStr,
139 int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
0df68c9f 140 """
d14a1e28
RD
141 newobj = _glcanvas.new_GLCanvas(*args, **kwargs)
142 self.this = newobj.this
a29cd6c0 143 self.thisown = 1
d14a1e28 144 del newobj.thisown
0220cbc1 145 self._setOORInfo(self)
e811c8ce
RD
146
147 def SetCurrent(*args, **kwargs):
a95a7133 148 """SetCurrent(self)"""
e811c8ce
RD
149 return _glcanvas.GLCanvas_SetCurrent(*args, **kwargs)
150
151 def SetColour(*args, **kwargs):
a95a7133 152 """SetColour(self, String colour)"""
e811c8ce
RD
153 return _glcanvas.GLCanvas_SetColour(*args, **kwargs)
154
155 def SwapBuffers(*args, **kwargs):
a95a7133 156 """SwapBuffers(self)"""
e811c8ce
RD
157 return _glcanvas.GLCanvas_SwapBuffers(*args, **kwargs)
158
159 def GetContext(*args, **kwargs):
a95a7133 160 """GetContext(self) -> GLContext"""
e811c8ce
RD
161 return _glcanvas.GLCanvas_GetContext(*args, **kwargs)
162
a29cd6c0 163
d14a1e28
RD
164class GLCanvasPtr(GLCanvas):
165 def __init__(self, this):
166 self.this = this
167 if not hasattr(self,"thisown"): self.thisown = 0
168 self.__class__ = GLCanvas
169_glcanvas.GLCanvas_swigregister(GLCanvasPtr)
a29cd6c0 170
58203fa6 171def GLCanvasWithContext(*args, **kwargs):
0df68c9f 172 """
58203fa6 173 GLCanvasWithContext(Window parent, GLContext shared=None, int id=-1, Point pos=DefaultPosition,
0df68c9f 174 Size size=DefaultSize,
b2dc1044 175 long style=0, String name=GLCanvasNameStr,
0df68c9f
RD
176 int attribList=None, wxPalette palette=wxNullPalette) -> GLCanvas
177 """
58203fa6 178 val = _glcanvas.new_GLCanvasWithContext(*args, **kwargs)
0220cbc1 179 val.thisown = 1
d14a1e28 180 val._setOORInfo(val)
0220cbc1
RD
181 return val
182
a29cd6c0 183
32fe5131 184