]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/mac/misc.py
Since wxGTK's wxGauge doesn't derive from wxGaugeBase it needs to have
[wxWidgets.git] / wxPython / src / mac / misc.py
CommitLineData
e6056257
RD
1# This file was created automatically by SWIG.
2import miscc
3class wxObjectPtr :
4 def __init__(self,this):
5 self.this = this
6 self.thisown = 0
7 def GetClassName(self, *_args, **_kwargs):
d84a9306 8 val = miscc.wxObject_GetClassName(self, *_args, **_kwargs)
e6056257
RD
9 return val
10 def Destroy(self, *_args, **_kwargs):
d84a9306 11 val = miscc.wxObject_Destroy(self, *_args, **_kwargs)
e6056257
RD
12 return val
13 def __repr__(self):
d84a9306 14 return "<%s.%s instance; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
15class wxObject(wxObjectPtr):
16 def __init__(self,this):
17 self.this = this
18
19
20
21
22class wxSizePtr :
23 def __init__(self,this):
24 self.this = this
25 self.thisown = 0
7108497a
RD
26 def __del__(self, delfunc=miscc.delete_wxSize):
27 if self.thisown == 1:
28 try:
29 delfunc(self)
30 except:
31 pass
e6056257 32 def Set(self, *_args, **_kwargs):
d84a9306 33 val = miscc.wxSize_Set(self, *_args, **_kwargs)
e6056257
RD
34 return val
35 def GetX(self, *_args, **_kwargs):
d84a9306 36 val = miscc.wxSize_GetX(self, *_args, **_kwargs)
e6056257
RD
37 return val
38 def GetY(self, *_args, **_kwargs):
d84a9306 39 val = miscc.wxSize_GetY(self, *_args, **_kwargs)
e6056257
RD
40 return val
41 def GetWidth(self, *_args, **_kwargs):
d84a9306 42 val = miscc.wxSize_GetWidth(self, *_args, **_kwargs)
e6056257
RD
43 return val
44 def GetHeight(self, *_args, **_kwargs):
d84a9306 45 val = miscc.wxSize_GetHeight(self, *_args, **_kwargs)
e6056257
RD
46 return val
47 def SetWidth(self, *_args, **_kwargs):
d84a9306 48 val = miscc.wxSize_SetWidth(self, *_args, **_kwargs)
e6056257
RD
49 return val
50 def SetHeight(self, *_args, **_kwargs):
d84a9306
RD
51 val = miscc.wxSize_SetHeight(self, *_args, **_kwargs)
52 return val
53 def IncTo(self, *_args, **_kwargs):
54 val = miscc.wxSize_IncTo(self, *_args, **_kwargs)
55 return val
56 def DecTo(self, *_args, **_kwargs):
57 val = miscc.wxSize_DecTo(self, *_args, **_kwargs)
e6056257
RD
58 return val
59 def asTuple(self, *_args, **_kwargs):
d84a9306 60 val = miscc.wxSize_asTuple(self, *_args, **_kwargs)
e6056257 61 return val
7108497a 62 def __eq__(self, *_args, **_kwargs):
d84a9306 63 val = miscc.wxSize___eq__(self, *_args, **_kwargs)
7108497a
RD
64 return val
65 def __ne__(self, *_args, **_kwargs):
d84a9306 66 val = miscc.wxSize___ne__(self, *_args, **_kwargs)
e6056257
RD
67 return val
68 def __setattr__(self,name,value):
69 if name == "x" :
70 miscc.wxSize_x_set(self,value)
71 return
72 if name == "y" :
73 miscc.wxSize_y_set(self,value)
74 return
75 if name == "width" :
76 miscc.wxSize_width_set(self,value)
77 return
78 if name == "height" :
79 miscc.wxSize_height_set(self,value)
80 return
81 self.__dict__[name] = value
82 def __getattr__(self,name):
83 if name == "x" :
84 return miscc.wxSize_x_get(self)
85 if name == "y" :
86 return miscc.wxSize_y_get(self)
87 if name == "width" :
88 return miscc.wxSize_width_get(self)
89 if name == "height" :
90 return miscc.wxSize_height_get(self)
91 raise AttributeError,name
92 def __repr__(self):
d84a9306 93 return "<%s.%s instance; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
94
95 def __str__(self): return str(self.asTuple())
7108497a 96 def __repr__(self): return 'wxSize'+str(self.asTuple())
e6056257
RD
97 def __len__(self): return len(self.asTuple())
98 def __getitem__(self, index): return self.asTuple()[index]
99 def __setitem__(self, index, val):
100 if index == 0: self.width = val
101 elif index == 1: self.height = val
102 else: raise IndexError
7108497a
RD
103 def __nonzero__(self): return self.asTuple() != (0,0)
104 def __getinitargs__(self): return ()
105 def __getstate__(self): return self.asTuple()
106 def __setstate__(self, state): self.Set(*state)
e6056257
RD
107
108class wxSize(wxSizePtr):
109 def __init__(self,*_args,**_kwargs):
d84a9306 110 self.this = miscc.new_wxSize(*_args,**_kwargs)
e6056257
RD
111 self.thisown = 1
112
113
114
115
116class wxRealPointPtr :
117 def __init__(self,this):
118 self.this = this
119 self.thisown = 0
7108497a
RD
120 def __del__(self, delfunc=miscc.delete_wxRealPoint):
121 if self.thisown == 1:
122 try:
123 delfunc(self)
124 except:
125 pass
e6056257 126 def Set(self, *_args, **_kwargs):
d84a9306 127 val = miscc.wxRealPoint_Set(self, *_args, **_kwargs)
e6056257
RD
128 return val
129 def asTuple(self, *_args, **_kwargs):
d84a9306 130 val = miscc.wxRealPoint_asTuple(self, *_args, **_kwargs)
e6056257
RD
131 return val
132 def __add__(self, *_args, **_kwargs):
d84a9306 133 val = miscc.wxRealPoint___add__(self, *_args, **_kwargs)
e6056257
RD
134 if val: val = wxRealPointPtr(val) ; val.thisown = 1
135 return val
136 def __sub__(self, *_args, **_kwargs):
d84a9306 137 val = miscc.wxRealPoint___sub__(self, *_args, **_kwargs)
e6056257
RD
138 if val: val = wxRealPointPtr(val) ; val.thisown = 1
139 return val
7108497a 140 def __eq__(self, *_args, **_kwargs):
d84a9306 141 val = miscc.wxRealPoint___eq__(self, *_args, **_kwargs)
7108497a
RD
142 return val
143 def __ne__(self, *_args, **_kwargs):
d84a9306 144 val = miscc.wxRealPoint___ne__(self, *_args, **_kwargs)
e6056257
RD
145 return val
146 def __setattr__(self,name,value):
147 if name == "x" :
148 miscc.wxRealPoint_x_set(self,value)
149 return
150 if name == "y" :
151 miscc.wxRealPoint_y_set(self,value)
152 return
153 self.__dict__[name] = value
154 def __getattr__(self,name):
155 if name == "x" :
156 return miscc.wxRealPoint_x_get(self)
157 if name == "y" :
158 return miscc.wxRealPoint_y_get(self)
159 raise AttributeError,name
160 def __repr__(self):
d84a9306 161 return "<%s.%s instance; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
162
163 def __str__(self): return str(self.asTuple())
7108497a 164 def __repr__(self): return 'wxRealPoint'+str(self.asTuple())
e6056257
RD
165 def __len__(self): return len(self.asTuple())
166 def __getitem__(self, index): return self.asTuple()[index]
167 def __setitem__(self, index, val):
168 if index == 0: self.width = val
169 elif index == 1: self.height = val
170 else: raise IndexError
7108497a
RD
171 def __nonzero__(self): return self.asTuple() != (0.0, 0.0)
172 def __getinitargs__(self): return ()
173 def __getstate__(self): return self.asTuple()
174 def __setstate__(self, state): self.Set(*state)
e6056257
RD
175
176class wxRealPoint(wxRealPointPtr):
177 def __init__(self,*_args,**_kwargs):
d84a9306 178 self.this = miscc.new_wxRealPoint(*_args,**_kwargs)
e6056257
RD
179 self.thisown = 1
180
181
182
183
184class wxPointPtr :
185 def __init__(self,this):
186 self.this = this
187 self.thisown = 0
7108497a
RD
188 def __del__(self, delfunc=miscc.delete_wxPoint):
189 if self.thisown == 1:
190 try:
191 delfunc(self)
192 except:
193 pass
e6056257 194 def Set(self, *_args, **_kwargs):
d84a9306 195 val = miscc.wxPoint_Set(self, *_args, **_kwargs)
e6056257
RD
196 return val
197 def asTuple(self, *_args, **_kwargs):
d84a9306 198 val = miscc.wxPoint_asTuple(self, *_args, **_kwargs)
e6056257
RD
199 return val
200 def __add__(self, *_args, **_kwargs):
d84a9306 201 val = miscc.wxPoint___add__(self, *_args, **_kwargs)
e6056257
RD
202 if val: val = wxPointPtr(val) ; val.thisown = 1
203 return val
204 def __sub__(self, *_args, **_kwargs):
d84a9306 205 val = miscc.wxPoint___sub__(self, *_args, **_kwargs)
e6056257
RD
206 if val: val = wxPointPtr(val) ; val.thisown = 1
207 return val
7108497a 208 def __eq__(self, *_args, **_kwargs):
d84a9306 209 val = miscc.wxPoint___eq__(self, *_args, **_kwargs)
7108497a
RD
210 return val
211 def __ne__(self, *_args, **_kwargs):
d84a9306 212 val = miscc.wxPoint___ne__(self, *_args, **_kwargs)
e6056257
RD
213 return val
214 def __setattr__(self,name,value):
215 if name == "x" :
216 miscc.wxPoint_x_set(self,value)
217 return
218 if name == "y" :
219 miscc.wxPoint_y_set(self,value)
220 return
221 self.__dict__[name] = value
222 def __getattr__(self,name):
223 if name == "x" :
224 return miscc.wxPoint_x_get(self)
225 if name == "y" :
226 return miscc.wxPoint_y_get(self)
227 raise AttributeError,name
228 def __repr__(self):
d84a9306 229 return "<%s.%s instance; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
230
231 def __str__(self): return str(self.asTuple())
7108497a 232 def __repr__(self): return 'wxPoint'+str(self.asTuple())
e6056257
RD
233 def __len__(self): return len(self.asTuple())
234 def __getitem__(self, index): return self.asTuple()[index]
235 def __setitem__(self, index, val):
236 if index == 0: self.x = val
237 elif index == 1: self.y = val
238 else: raise IndexError
7108497a
RD
239 def __nonzero__(self): return self.asTuple() != (0,0)
240 def __getinitargs__(self): return ()
241 def __getstate__(self): return self.asTuple()
242 def __setstate__(self, state): self.Set(*state)
e6056257
RD
243
244class wxPoint(wxPointPtr):
245 def __init__(self,*_args,**_kwargs):
d84a9306 246 self.this = miscc.new_wxPoint(*_args,**_kwargs)
e6056257
RD
247 self.thisown = 1
248
249
250
251
252class wxRectPtr :
253 def __init__(self,this):
254 self.this = this
255 self.thisown = 0
7108497a
RD
256 def __del__(self, delfunc=miscc.delete_wxRect):
257 if self.thisown == 1:
258 try:
259 delfunc(self)
260 except:
261 pass
e6056257 262 def GetX(self, *_args, **_kwargs):
d84a9306 263 val = miscc.wxRect_GetX(self, *_args, **_kwargs)
e6056257
RD
264 return val
265 def SetX(self, *_args, **_kwargs):
d84a9306 266 val = miscc.wxRect_SetX(self, *_args, **_kwargs)
e6056257
RD
267 return val
268 def GetY(self, *_args, **_kwargs):
d84a9306 269 val = miscc.wxRect_GetY(self, *_args, **_kwargs)
e6056257
RD
270 return val
271 def SetY(self, *_args, **_kwargs):
d84a9306 272 val = miscc.wxRect_SetY(self, *_args, **_kwargs)
e6056257
RD
273 return val
274 def GetWidth(self, *_args, **_kwargs):
d84a9306 275 val = miscc.wxRect_GetWidth(self, *_args, **_kwargs)
e6056257
RD
276 return val
277 def SetWidth(self, *_args, **_kwargs):
d84a9306 278 val = miscc.wxRect_SetWidth(self, *_args, **_kwargs)
e6056257
RD
279 return val
280 def GetHeight(self, *_args, **_kwargs):
d84a9306 281 val = miscc.wxRect_GetHeight(self, *_args, **_kwargs)
e6056257
RD
282 return val
283 def SetHeight(self, *_args, **_kwargs):
d84a9306 284 val = miscc.wxRect_SetHeight(self, *_args, **_kwargs)
e6056257
RD
285 return val
286 def GetPosition(self, *_args, **_kwargs):
d84a9306 287 val = miscc.wxRect_GetPosition(self, *_args, **_kwargs)
e6056257
RD
288 if val: val = wxPointPtr(val) ; val.thisown = 1
289 return val
290 def GetSize(self, *_args, **_kwargs):
d84a9306 291 val = miscc.wxRect_GetSize(self, *_args, **_kwargs)
e6056257
RD
292 if val: val = wxSizePtr(val) ; val.thisown = 1
293 return val
383ea3d0 294 def SetPosition(self, *_args, **_kwargs):
d84a9306 295 val = miscc.wxRect_SetPosition(self, *_args, **_kwargs)
383ea3d0
RD
296 return val
297 def SetSize(self, *_args, **_kwargs):
d84a9306 298 val = miscc.wxRect_SetSize(self, *_args, **_kwargs)
383ea3d0 299 return val
e6056257 300 def GetLeft(self, *_args, **_kwargs):
d84a9306 301 val = miscc.wxRect_GetLeft(self, *_args, **_kwargs)
e6056257
RD
302 return val
303 def GetTop(self, *_args, **_kwargs):
d84a9306 304 val = miscc.wxRect_GetTop(self, *_args, **_kwargs)
e6056257
RD
305 return val
306 def GetBottom(self, *_args, **_kwargs):
d84a9306 307 val = miscc.wxRect_GetBottom(self, *_args, **_kwargs)
e6056257
RD
308 return val
309 def GetRight(self, *_args, **_kwargs):
d84a9306 310 val = miscc.wxRect_GetRight(self, *_args, **_kwargs)
e6056257
RD
311 return val
312 def SetLeft(self, *_args, **_kwargs):
d84a9306 313 val = miscc.wxRect_SetLeft(self, *_args, **_kwargs)
e6056257
RD
314 return val
315 def SetRight(self, *_args, **_kwargs):
d84a9306 316 val = miscc.wxRect_SetRight(self, *_args, **_kwargs)
e6056257
RD
317 return val
318 def SetTop(self, *_args, **_kwargs):
d84a9306 319 val = miscc.wxRect_SetTop(self, *_args, **_kwargs)
e6056257
RD
320 return val
321 def SetBottom(self, *_args, **_kwargs):
d84a9306 322 val = miscc.wxRect_SetBottom(self, *_args, **_kwargs)
e6056257 323 return val
7108497a 324 def Deflate(self, *_args, **_kwargs):
d84a9306 325 val = miscc.wxRect_Deflate(self, *_args, **_kwargs)
7108497a 326 return val
e6056257 327 def Inflate(self, *_args, **_kwargs):
d84a9306 328 val = miscc.wxRect_Inflate(self, *_args, **_kwargs)
e6056257 329 return val
7108497a 330 def InsideXY(self, *_args, **_kwargs):
d84a9306 331 val = miscc.wxRect_InsideXY(self, *_args, **_kwargs)
7108497a 332 return val
e6056257 333 def Inside(self, *_args, **_kwargs):
d84a9306 334 val = miscc.wxRect_Inside(self, *_args, **_kwargs)
e6056257 335 return val
7108497a 336 def Intersects(self, *_args, **_kwargs):
d84a9306 337 val = miscc.wxRect_Intersects(self, *_args, **_kwargs)
7108497a
RD
338 return val
339 def OffsetXY(self, *_args, **_kwargs):
d84a9306 340 val = miscc.wxRect_OffsetXY(self, *_args, **_kwargs)
7108497a
RD
341 return val
342 def Offset(self, *_args, **_kwargs):
d84a9306 343 val = miscc.wxRect_Offset(self, *_args, **_kwargs)
7108497a
RD
344 return val
345 def Set(self, *_args, **_kwargs):
d84a9306 346 val = miscc.wxRect_Set(self, *_args, **_kwargs)
7108497a 347 return val
e6056257 348 def asTuple(self, *_args, **_kwargs):
d84a9306 349 val = miscc.wxRect_asTuple(self, *_args, **_kwargs)
e6056257
RD
350 return val
351 def __add__(self, *_args, **_kwargs):
d84a9306 352 val = miscc.wxRect___add__(self, *_args, **_kwargs)
e6056257
RD
353 if val: val = wxRectPtr(val) ; val.thisown = 1
354 return val
7108497a 355 def __eq__(self, *_args, **_kwargs):
d84a9306 356 val = miscc.wxRect___eq__(self, *_args, **_kwargs)
7108497a
RD
357 return val
358 def __ne__(self, *_args, **_kwargs):
d84a9306 359 val = miscc.wxRect___ne__(self, *_args, **_kwargs)
e6056257
RD
360 return val
361 def __setattr__(self,name,value):
362 if name == "x" :
363 miscc.wxRect_x_set(self,value)
364 return
365 if name == "y" :
366 miscc.wxRect_y_set(self,value)
367 return
368 if name == "width" :
369 miscc.wxRect_width_set(self,value)
370 return
371 if name == "height" :
372 miscc.wxRect_height_set(self,value)
373 return
374 self.__dict__[name] = value
375 def __getattr__(self,name):
376 if name == "x" :
377 return miscc.wxRect_x_get(self)
378 if name == "y" :
379 return miscc.wxRect_y_get(self)
380 if name == "width" :
381 return miscc.wxRect_width_get(self)
382 if name == "height" :
383 return miscc.wxRect_height_get(self)
384 raise AttributeError,name
385 def __repr__(self):
d84a9306 386 return "<%s.%s instance; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
387
388 def __str__(self): return str(self.asTuple())
7108497a 389 def __repr__(self): return 'wxRect'+str(self.asTuple())
e6056257
RD
390 def __len__(self): return len(self.asTuple())
391 def __getitem__(self, index): return self.asTuple()[index]
392 def __setitem__(self, index, val):
393 if index == 0: self.x = val
394 elif index == 1: self.y = val
395 elif index == 2: self.width = val
396 elif index == 3: self.height = val
397 else: raise IndexError
7108497a
RD
398 def __nonzero__(self): return self.asTuple() != (0,0,0,0)
399 def __getinitargs__(self): return ()
400 def __getstate__(self): return self.asTuple()
401 def __setstate__(self, state): self.Set(*state)
e6056257
RD
402
403 # override the __getattr__ made by SWIG
404 def __getattr__(self, name):
405 d = {
406 'x' : miscc.wxRect_x_get,
407 'y' : miscc.wxRect_y_get,
408 'width' : miscc.wxRect_width_get,
409 'height' : miscc.wxRect_height_get,
410 'top' : miscc.wxRect_GetTop,
411 'bottom' : miscc.wxRect_GetBottom,
412 'left' : miscc.wxRect_GetLeft,
413 'right' : miscc.wxRect_GetRight,
414 }
415 try:
416 func = d[name]
417 except KeyError:
418 raise AttributeError,name
419 return func(self)
420
421 # and also the __setattr__
422 def __setattr__(self, name, value):
423 d = {
424 'x' : miscc.wxRect_x_set,
425 'y' : miscc.wxRect_y_set,
426 'width' : miscc.wxRect_width_set,
427 'height' : miscc.wxRect_height_set,
428 'top' : miscc.wxRect_SetTop,
429 'bottom' : miscc.wxRect_SetBottom,
430 'left' : miscc.wxRect_SetLeft,
431 'right' : miscc.wxRect_SetRight,
432 }
433 try:
434 func = d[name]
435 except KeyError:
436 self.__dict__[name] = value
437 return
438 func(self, value)
439
440class wxRect(wxRectPtr):
441 def __init__(self,*_args,**_kwargs):
d84a9306 442 self.this = miscc.new_wxRect(*_args,**_kwargs)
e6056257
RD
443 self.thisown = 1
444
445
446
447
7108497a
RD
448class wxPoint2DDoublePtr :
449 def __init__(self,this):
450 self.this = this
451 self.thisown = 0
452 def GetFloor(self, *_args, **_kwargs):
d84a9306 453 val = miscc.wxPoint2DDouble_GetFloor(self, *_args, **_kwargs)
7108497a
RD
454 return val
455 def GetRounded(self, *_args, **_kwargs):
d84a9306 456 val = miscc.wxPoint2DDouble_GetRounded(self, *_args, **_kwargs)
7108497a
RD
457 return val
458 def GetVectorLength(self, *_args, **_kwargs):
d84a9306 459 val = miscc.wxPoint2DDouble_GetVectorLength(self, *_args, **_kwargs)
7108497a
RD
460 return val
461 def GetVectorAngle(self, *_args, **_kwargs):
d84a9306 462 val = miscc.wxPoint2DDouble_GetVectorAngle(self, *_args, **_kwargs)
7108497a
RD
463 return val
464 def SetVectorLength(self, *_args, **_kwargs):
d84a9306 465 val = miscc.wxPoint2DDouble_SetVectorLength(self, *_args, **_kwargs)
7108497a
RD
466 return val
467 def SetVectorAngle(self, *_args, **_kwargs):
d84a9306 468 val = miscc.wxPoint2DDouble_SetVectorAngle(self, *_args, **_kwargs)
7108497a
RD
469 return val
470 def GetDistance(self, *_args, **_kwargs):
d84a9306 471 val = miscc.wxPoint2DDouble_GetDistance(self, *_args, **_kwargs)
7108497a
RD
472 return val
473 def GetDistanceSquare(self, *_args, **_kwargs):
d84a9306 474 val = miscc.wxPoint2DDouble_GetDistanceSquare(self, *_args, **_kwargs)
7108497a
RD
475 return val
476 def GetDotProduct(self, *_args, **_kwargs):
d84a9306 477 val = miscc.wxPoint2DDouble_GetDotProduct(self, *_args, **_kwargs)
7108497a
RD
478 return val
479 def GetCrossProduct(self, *_args, **_kwargs):
d84a9306 480 val = miscc.wxPoint2DDouble_GetCrossProduct(self, *_args, **_kwargs)
7108497a
RD
481 return val
482 def Set(self, *_args, **_kwargs):
d84a9306 483 val = miscc.wxPoint2DDouble_Set(self, *_args, **_kwargs)
7108497a
RD
484 return val
485 def __neg__(self, *_args, **_kwargs):
d84a9306 486 val = miscc.wxPoint2DDouble___neg__(self, *_args, **_kwargs)
7108497a
RD
487 if val: val = wxPoint2DDoublePtr(val) ; val.thisown = 1
488 return val
489 def __iadd__(self, *_args, **_kwargs):
d84a9306 490 val = miscc.wxPoint2DDouble___iadd__(self, *_args, **_kwargs)
7108497a
RD
491 if val: val = wxPoint2DDoublePtr(val)
492 return val
493 def __isub__(self, *_args, **_kwargs):
d84a9306 494 val = miscc.wxPoint2DDouble___isub__(self, *_args, **_kwargs)
7108497a
RD
495 if val: val = wxPoint2DDoublePtr(val)
496 return val
497 def __imul__(self, *_args, **_kwargs):
d84a9306 498 val = miscc.wxPoint2DDouble___imul__(self, *_args, **_kwargs)
7108497a
RD
499 if val: val = wxPoint2DDoublePtr(val)
500 return val
501 def __idiv__(self, *_args, **_kwargs):
d84a9306 502 val = miscc.wxPoint2DDouble___idiv__(self, *_args, **_kwargs)
7108497a
RD
503 if val: val = wxPoint2DDoublePtr(val)
504 return val
505 def __eq__(self, *_args, **_kwargs):
d84a9306 506 val = miscc.wxPoint2DDouble___eq__(self, *_args, **_kwargs)
7108497a
RD
507 return val
508 def __ne__(self, *_args, **_kwargs):
d84a9306 509 val = miscc.wxPoint2DDouble___ne__(self, *_args, **_kwargs)
7108497a
RD
510 return val
511 def asTuple(self, *_args, **_kwargs):
d84a9306 512 val = miscc.wxPoint2DDouble_asTuple(self, *_args, **_kwargs)
7108497a
RD
513 return val
514 def __setattr__(self,name,value):
515 if name == "m_x" :
516 miscc.wxPoint2DDouble_m_x_set(self,value)
517 return
518 if name == "m_y" :
519 miscc.wxPoint2DDouble_m_y_set(self,value)
520 return
521 if name == "x" :
522 miscc.wxPoint2DDouble_x_set(self,value)
523 return
524 if name == "y" :
525 miscc.wxPoint2DDouble_y_set(self,value)
526 return
527 self.__dict__[name] = value
528 def __getattr__(self,name):
529 if name == "m_x" :
530 return miscc.wxPoint2DDouble_m_x_get(self)
531 if name == "m_y" :
532 return miscc.wxPoint2DDouble_m_y_get(self)
533 if name == "x" :
534 return miscc.wxPoint2DDouble_x_get(self)
535 if name == "y" :
536 return miscc.wxPoint2DDouble_y_get(self)
537 raise AttributeError,name
538 def __repr__(self):
d84a9306 539 return "<%s.%s instance; proxy of C++ wxPoint2DDouble instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
7108497a
RD
540
541 def SetPolarCoordinates(self, angle, length):
542 self.SetVectorLength(length)
543 self.SetVectorAngle(angle)
544 def Normalize(self):
545 self.SetVectorLength(1.0)
546
547
548 def __str__(self): return str(self.asTuple())
549 def __repr__(self): return 'wxPoint2DDouble'+str(self.asTuple())
550 def __len__(self): return len(self.asTuple())
551 def __getitem__(self, index): return self.asTuple()[index]
552 def __setitem__(self, index, val):
553 if index == 0: self.m_x = val
554 elif index == 1: self.m_yt = val
555 else: raise IndexError
556 def __nonzero__(self): return self.asTuple() != (0.0, 0.0)
557 def __getinitargs__(self): return ()
558 def __getstate__(self): return self.asTuple()
559 def __setstate__(self, state): self.Set(*state)
560
561class wxPoint2DDouble(wxPoint2DDoublePtr):
562 def __init__(self,*_args,**_kwargs):
d84a9306 563 self.this = miscc.new_wxPoint2DDouble(*_args,**_kwargs)
7108497a
RD
564 self.thisown = 1
565
566
567
568def wxPoint2DDoubleCopy(*_args,**_kwargs):
d84a9306 569 val = wxPoint2DDoublePtr(miscc.new_wxPoint2DDoubleCopy(*_args,**_kwargs))
7108497a
RD
570 val.thisown = 1
571 return val
572
573def wxPoint2DDoubleFromPoint(*_args,**_kwargs):
d84a9306 574 val = wxPoint2DDoublePtr(miscc.new_wxPoint2DDoubleFromPoint(*_args,**_kwargs))
7108497a
RD
575 val.thisown = 1
576 return val
577
578
e6056257
RD
579class wxIndividualLayoutConstraintPtr(wxObjectPtr):
580 def __init__(self,this):
581 self.this = this
582 self.thisown = 0
583 def Above(self, *_args, **_kwargs):
d84a9306 584 val = miscc.wxIndividualLayoutConstraint_Above(self, *_args, **_kwargs)
e6056257
RD
585 return val
586 def Absolute(self, *_args, **_kwargs):
d84a9306 587 val = miscc.wxIndividualLayoutConstraint_Absolute(self, *_args, **_kwargs)
e6056257
RD
588 return val
589 def AsIs(self, *_args, **_kwargs):
d84a9306 590 val = miscc.wxIndividualLayoutConstraint_AsIs(self, *_args, **_kwargs)
e6056257
RD
591 return val
592 def Below(self, *_args, **_kwargs):
d84a9306 593 val = miscc.wxIndividualLayoutConstraint_Below(self, *_args, **_kwargs)
e6056257
RD
594 return val
595 def Unconstrained(self, *_args, **_kwargs):
d84a9306 596 val = miscc.wxIndividualLayoutConstraint_Unconstrained(self, *_args, **_kwargs)
e6056257
RD
597 return val
598 def LeftOf(self, *_args, **_kwargs):
d84a9306 599 val = miscc.wxIndividualLayoutConstraint_LeftOf(self, *_args, **_kwargs)
e6056257
RD
600 return val
601 def PercentOf(self, *_args, **_kwargs):
d84a9306 602 val = miscc.wxIndividualLayoutConstraint_PercentOf(self, *_args, **_kwargs)
e6056257
RD
603 return val
604 def RightOf(self, *_args, **_kwargs):
d84a9306 605 val = miscc.wxIndividualLayoutConstraint_RightOf(self, *_args, **_kwargs)
e6056257
RD
606 return val
607 def SameAs(self, *_args, **_kwargs):
d84a9306 608 val = miscc.wxIndividualLayoutConstraint_SameAs(self, *_args, **_kwargs)
e6056257
RD
609 return val
610 def Set(self, *_args, **_kwargs):
d84a9306 611 val = miscc.wxIndividualLayoutConstraint_Set(self, *_args, **_kwargs)
e6056257
RD
612 return val
613 def __repr__(self):
d84a9306 614 return "<%s.%s instance; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
615class wxIndividualLayoutConstraint(wxIndividualLayoutConstraintPtr):
616 def __init__(self,this):
617 self.this = this
618
619
620
621
622class wxLayoutConstraintsPtr(wxObjectPtr):
623 def __init__(self,this):
624 self.this = this
625 self.thisown = 0
626 def __setattr__(self,name,value):
627 if name == "bottom" :
628 miscc.wxLayoutConstraints_bottom_set(self,value.this)
629 return
630 if name == "centreX" :
631 miscc.wxLayoutConstraints_centreX_set(self,value.this)
632 return
633 if name == "centreY" :
634 miscc.wxLayoutConstraints_centreY_set(self,value.this)
635 return
636 if name == "height" :
637 miscc.wxLayoutConstraints_height_set(self,value.this)
638 return
639 if name == "left" :
640 miscc.wxLayoutConstraints_left_set(self,value.this)
641 return
642 if name == "right" :
643 miscc.wxLayoutConstraints_right_set(self,value.this)
644 return
645 if name == "top" :
646 miscc.wxLayoutConstraints_top_set(self,value.this)
647 return
648 if name == "width" :
649 miscc.wxLayoutConstraints_width_set(self,value.this)
650 return
651 self.__dict__[name] = value
652 def __getattr__(self,name):
653 if name == "bottom" :
654 return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_bottom_get(self))
655 if name == "centreX" :
656 return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_centreX_get(self))
657 if name == "centreY" :
658 return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_centreY_get(self))
659 if name == "height" :
660 return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_height_get(self))
661 if name == "left" :
662 return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_left_get(self))
663 if name == "right" :
664 return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_right_get(self))
665 if name == "top" :
666 return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_top_get(self))
667 if name == "width" :
668 return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_width_get(self))
669 raise AttributeError,name
670 def __repr__(self):
d84a9306 671 return "<%s.%s instance; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
672class wxLayoutConstraints(wxLayoutConstraintsPtr):
673 def __init__(self,*_args,**_kwargs):
d84a9306 674 self.this = miscc.new_wxLayoutConstraints(*_args,**_kwargs)
e6056257
RD
675 self.thisown = 1
676
677
678
679
680class wxAcceleratorEntryPtr :
681 def __init__(self,this):
682 self.this = this
683 self.thisown = 0
7108497a
RD
684 def __del__(self, delfunc=miscc.delete_wxAcceleratorEntry):
685 if self.thisown == 1:
686 try:
687 delfunc(self)
688 except:
689 pass
e6056257 690 def Set(self, *_args, **_kwargs):
d84a9306 691 val = miscc.wxAcceleratorEntry_Set(self, *_args, **_kwargs)
e6056257
RD
692 return val
693 def GetFlags(self, *_args, **_kwargs):
d84a9306 694 val = miscc.wxAcceleratorEntry_GetFlags(self, *_args, **_kwargs)
e6056257
RD
695 return val
696 def GetKeyCode(self, *_args, **_kwargs):
d84a9306 697 val = miscc.wxAcceleratorEntry_GetKeyCode(self, *_args, **_kwargs)
e6056257
RD
698 return val
699 def GetCommand(self, *_args, **_kwargs):
d84a9306 700 val = miscc.wxAcceleratorEntry_GetCommand(self, *_args, **_kwargs)
e6056257
RD
701 return val
702 def __repr__(self):
d84a9306 703 return "<%s.%s instance; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
704class wxAcceleratorEntry(wxAcceleratorEntryPtr):
705 def __init__(self,*_args,**_kwargs):
d84a9306 706 self.this = miscc.new_wxAcceleratorEntry(*_args,**_kwargs)
e6056257
RD
707 self.thisown = 1
708
709
710
711
712class wxAcceleratorTablePtr(wxObjectPtr):
713 def __init__(self,this):
714 self.this = this
715 self.thisown = 0
7108497a
RD
716 def __del__(self, delfunc=miscc.delete_wxAcceleratorTable):
717 if self.thisown == 1:
718 try:
719 delfunc(self)
720 except:
721 pass
e6056257 722 def __repr__(self):
d84a9306 723 return "<%s.%s instance; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
724class wxAcceleratorTable(wxAcceleratorTablePtr):
725 def __init__(self,*_args,**_kwargs):
d84a9306 726 self.this = miscc.new_wxAcceleratorTable(*_args,**_kwargs)
e6056257
RD
727 self.thisown = 1
728
729
730
731
732class wxBusyInfoPtr(wxObjectPtr):
733 def __init__(self,this):
734 self.this = this
735 self.thisown = 0
7108497a
RD
736 def __del__(self, delfunc=miscc.delete_wxBusyInfo):
737 if self.thisown == 1:
738 try:
739 delfunc(self)
740 except:
741 pass
e6056257 742 def __repr__(self):
d84a9306 743 return "<%s.%s instance; proxy of C++ wxBusyInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
e6056257
RD
744class wxBusyInfo(wxBusyInfoPtr):
745 def __init__(self,*_args,**_kwargs):
d84a9306 746 self.this = miscc.new_wxBusyInfo(*_args,**_kwargs)
e6056257
RD
747 self.thisown = 1
748
749
750
751
752
753
754#-------------- FUNCTION WRAPPERS ------------------
755
756wxIntersectRect = miscc.wxIntersectRect
757
758wxNewId = miscc.wxNewId
759
760wxRegisterId = miscc.wxRegisterId
761
e6056257
RD
762wxGetCurrentId = miscc.wxGetCurrentId
763
764wxBell = miscc.wxBell
765
766wxEndBusyCursor = miscc.wxEndBusyCursor
767
768wxGetElapsedTime = miscc.wxGetElapsedTime
769
770wxGetMousePosition = miscc.wxGetMousePosition
771
772wxIsBusy = miscc.wxIsBusy
773
774wxNow = miscc.wxNow
775
776wxShell = miscc.wxShell
777
778wxStartTimer = miscc.wxStartTimer
779
780wxGetOsVersion = miscc.wxGetOsVersion
781
782wxGetOsDescription = miscc.wxGetOsDescription
783
8ccad685
RD
784wxShutdown = miscc.wxShutdown
785
e6056257
RD
786wxSleep = miscc.wxSleep
787
788wxUsleep = miscc.wxUsleep
789
790wxYield = miscc.wxYield
791
792wxYieldIfNeeded = miscc.wxYieldIfNeeded
793
794wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows
795
e6056257
RD
796wxStripMenuCodes = miscc.wxStripMenuCodes
797
798wxGetEmailAddress = miscc.wxGetEmailAddress
799
800wxGetHostName = miscc.wxGetHostName
801
802wxGetFullHostName = miscc.wxGetFullHostName
803
804wxGetUserId = miscc.wxGetUserId
805
806wxGetUserName = miscc.wxGetUserName
807
808wxGetHomeDir = miscc.wxGetHomeDir
809
ca31b3da
RD
810wxGetUserHome = miscc.wxGetUserHome
811
3bc1a8e6
RD
812wxGetProcessId = miscc.wxGetProcessId
813
77762d0f
RD
814wxTrap = miscc.wxTrap
815
e6056257 816def wxGetAccelFromString(*_args, **_kwargs):
d84a9306 817 val = miscc.wxGetAccelFromString(*_args,**_kwargs)
e6056257
RD
818 if val: val = wxAcceleratorEntryPtr(val)
819 return val
820
821
822
823#-------------- VARIABLE WRAPPERS ------------------
824
8ccad685
RD
825wxSHUTDOWN_POWEROFF = miscc.wxSHUTDOWN_POWEROFF
826wxSHUTDOWN_REBOOT = miscc.wxSHUTDOWN_REBOOT
e6056257
RD
827wxLeft = miscc.wxLeft
828wxTop = miscc.wxTop
829wxRight = miscc.wxRight
830wxBottom = miscc.wxBottom
831wxWidth = miscc.wxWidth
832wxHeight = miscc.wxHeight
833wxCentre = miscc.wxCentre
834wxCenter = miscc.wxCenter
835wxCentreX = miscc.wxCentreX
836wxCentreY = miscc.wxCentreY
837wxUnconstrained = miscc.wxUnconstrained
838wxAsIs = miscc.wxAsIs
839wxPercentOf = miscc.wxPercentOf
840wxAbove = miscc.wxAbove
841wxBelow = miscc.wxBelow
842wxLeftOf = miscc.wxLeftOf
843wxRightOf = miscc.wxRightOf
844wxSameAs = miscc.wxSameAs
845wxAbsolute = miscc.wxAbsolute
846cvar = miscc.cvar
847wxNullAcceleratorTable = wxAcceleratorTablePtr(miscc.cvar.wxNullAcceleratorTable)