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