]>
Commit | Line | Data |
---|---|---|
70551f47 RD |
1 | # This file was created automatically by SWIG. |
2 | import miscc | |
9df61a29 RD |
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 | ||
70551f47 RD |
22 | class wxSizePtr : |
23 | def __init__(self,this): | |
24 | self.this = this | |
25 | self.thisown = 0 | |
b67a9327 RD |
26 | def __del__(self, delfunc=miscc.delete_wxSize): |
27 | if self.thisown == 1: | |
28 | try: | |
29 | delfunc(self) | |
30 | except: | |
31 | pass | |
2d091820 RD |
32 | def Set(self, *_args, **_kwargs): |
33 | val = apply(miscc.wxSize_Set,(self,) + _args, _kwargs) | |
70551f47 | 34 | return val |
2d091820 RD |
35 | def GetX(self, *_args, **_kwargs): |
36 | val = apply(miscc.wxSize_GetX,(self,) + _args, _kwargs) | |
21f8d7ea | 37 | return val |
2d091820 RD |
38 | def GetY(self, *_args, **_kwargs): |
39 | val = apply(miscc.wxSize_GetY,(self,) + _args, _kwargs) | |
21f8d7ea | 40 | return val |
2d091820 RD |
41 | def GetWidth(self, *_args, **_kwargs): |
42 | val = apply(miscc.wxSize_GetWidth,(self,) + _args, _kwargs) | |
70551f47 | 43 | return val |
2d091820 RD |
44 | def GetHeight(self, *_args, **_kwargs): |
45 | val = apply(miscc.wxSize_GetHeight,(self,) + _args, _kwargs) | |
70551f47 | 46 | return val |
2d091820 RD |
47 | def SetWidth(self, *_args, **_kwargs): |
48 | val = apply(miscc.wxSize_SetWidth,(self,) + _args, _kwargs) | |
d24a34bb | 49 | return val |
2d091820 RD |
50 | def SetHeight(self, *_args, **_kwargs): |
51 | val = apply(miscc.wxSize_SetHeight,(self,) + _args, _kwargs) | |
d24a34bb | 52 | return val |
2d091820 RD |
53 | def asTuple(self, *_args, **_kwargs): |
54 | val = apply(miscc.wxSize_asTuple,(self,) + _args, _kwargs) | |
70551f47 | 55 | return val |
b67a9327 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) | |
9df61a29 | 61 | return val |
70551f47 | 62 | def __setattr__(self,name,value): |
21f8d7ea | 63 | if name == "x" : |
2d091820 | 64 | miscc.wxSize_x_set(self,value) |
21f8d7ea RD |
65 | return |
66 | if name == "y" : | |
2d091820 | 67 | miscc.wxSize_y_set(self,value) |
21f8d7ea | 68 | return |
70551f47 | 69 | if name == "width" : |
2d091820 | 70 | miscc.wxSize_width_set(self,value) |
70551f47 RD |
71 | return |
72 | if name == "height" : | |
2d091820 | 73 | miscc.wxSize_height_set(self,value) |
70551f47 RD |
74 | return |
75 | self.__dict__[name] = value | |
76 | def __getattr__(self,name): | |
21f8d7ea | 77 | if name == "x" : |
2d091820 | 78 | return miscc.wxSize_x_get(self) |
21f8d7ea | 79 | if name == "y" : |
2d091820 | 80 | return miscc.wxSize_y_get(self) |
70551f47 | 81 | if name == "width" : |
2d091820 | 82 | return miscc.wxSize_width_get(self) |
70551f47 | 83 | if name == "height" : |
2d091820 | 84 | return miscc.wxSize_height_get(self) |
70551f47 RD |
85 | raise AttributeError,name |
86 | def __repr__(self): | |
2d091820 | 87 | return "<C wxSize instance at %s>" % (self.this,) |
9c4165ad RD |
88 | |
89 | def __str__(self): return str(self.asTuple()) | |
b67a9327 | 90 | def __repr__(self): return 'wxSize'+str(self.asTuple()) |
7a8b1590 | 91 | def __len__(self): return len(self.asTuple()) |
9c4165ad RD |
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 | |
b67a9327 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) | |
9c4165ad | 101 | |
70551f47 | 102 | class wxSize(wxSizePtr): |
2d091820 RD |
103 | def __init__(self,*_args,**_kwargs): |
104 | self.this = apply(miscc.new_wxSize,_args,_kwargs) | |
70551f47 RD |
105 | self.thisown = 1 |
106 | ||
107 | ||
108 | ||
109 | ||
110 | class wxRealPointPtr : | |
111 | def __init__(self,this): | |
112 | self.this = this | |
113 | self.thisown = 0 | |
b67a9327 RD |
114 | def __del__(self, delfunc=miscc.delete_wxRealPoint): |
115 | if self.thisown == 1: | |
116 | try: | |
117 | delfunc(self) | |
118 | except: | |
119 | pass | |
107e4716 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 | |
c368d904 RD |
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 | |
b67a9327 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) | |
c368d904 | 139 | return val |
70551f47 RD |
140 | def __setattr__(self,name,value): |
141 | if name == "x" : | |
2d091820 | 142 | miscc.wxRealPoint_x_set(self,value) |
70551f47 RD |
143 | return |
144 | if name == "y" : | |
2d091820 | 145 | miscc.wxRealPoint_y_set(self,value) |
70551f47 RD |
146 | return |
147 | self.__dict__[name] = value | |
148 | def __getattr__(self,name): | |
149 | if name == "x" : | |
2d091820 | 150 | return miscc.wxRealPoint_x_get(self) |
70551f47 | 151 | if name == "y" : |
2d091820 | 152 | return miscc.wxRealPoint_y_get(self) |
70551f47 RD |
153 | raise AttributeError,name |
154 | def __repr__(self): | |
2d091820 | 155 | return "<C wxRealPoint instance at %s>" % (self.this,) |
9c4165ad RD |
156 | |
157 | def __str__(self): return str(self.asTuple()) | |
b67a9327 | 158 | def __repr__(self): return 'wxRealPoint'+str(self.asTuple()) |
7a8b1590 | 159 | def __len__(self): return len(self.asTuple()) |
9c4165ad RD |
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 | |
b67a9327 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) | |
9c4165ad | 169 | |
70551f47 | 170 | class wxRealPoint(wxRealPointPtr): |
2d091820 RD |
171 | def __init__(self,*_args,**_kwargs): |
172 | self.this = apply(miscc.new_wxRealPoint,_args,_kwargs) | |
70551f47 RD |
173 | self.thisown = 1 |
174 | ||
175 | ||
176 | ||
177 | ||
178 | class wxPointPtr : | |
179 | def __init__(self,this): | |
180 | self.this = this | |
181 | self.thisown = 0 | |
b67a9327 RD |
182 | def __del__(self, delfunc=miscc.delete_wxPoint): |
183 | if self.thisown == 1: | |
184 | try: | |
185 | delfunc(self) | |
186 | except: | |
187 | pass | |
2d091820 RD |
188 | def Set(self, *_args, **_kwargs): |
189 | val = apply(miscc.wxPoint_Set,(self,) + _args, _kwargs) | |
70551f47 | 190 | return val |
2d091820 RD |
191 | def asTuple(self, *_args, **_kwargs): |
192 | val = apply(miscc.wxPoint_asTuple,(self,) + _args, _kwargs) | |
70551f47 | 193 | return val |
c368d904 RD |
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 | |
b67a9327 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) | |
c368d904 | 207 | return val |
70551f47 RD |
208 | def __setattr__(self,name,value): |
209 | if name == "x" : | |
2d091820 | 210 | miscc.wxPoint_x_set(self,value) |
70551f47 RD |
211 | return |
212 | if name == "y" : | |
2d091820 | 213 | miscc.wxPoint_y_set(self,value) |
70551f47 RD |
214 | return |
215 | self.__dict__[name] = value | |
216 | def __getattr__(self,name): | |
217 | if name == "x" : | |
2d091820 | 218 | return miscc.wxPoint_x_get(self) |
70551f47 | 219 | if name == "y" : |
2d091820 | 220 | return miscc.wxPoint_y_get(self) |
70551f47 RD |
221 | raise AttributeError,name |
222 | def __repr__(self): | |
2d091820 | 223 | return "<C wxPoint instance at %s>" % (self.this,) |
9c4165ad RD |
224 | |
225 | def __str__(self): return str(self.asTuple()) | |
b67a9327 | 226 | def __repr__(self): return 'wxPoint'+str(self.asTuple()) |
7a8b1590 | 227 | def __len__(self): return len(self.asTuple()) |
9c4165ad RD |
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 | |
b67a9327 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) | |
9c4165ad | 237 | |
70551f47 | 238 | class wxPoint(wxPointPtr): |
2d091820 RD |
239 | def __init__(self,*_args,**_kwargs): |
240 | self.this = apply(miscc.new_wxPoint,_args,_kwargs) | |
70551f47 RD |
241 | self.thisown = 1 |
242 | ||
243 | ||
244 | ||
245 | ||
246 | class wxRectPtr : | |
247 | def __init__(self,this): | |
248 | self.this = this | |
249 | self.thisown = 0 | |
b67a9327 RD |
250 | def __del__(self, delfunc=miscc.delete_wxRect): |
251 | if self.thisown == 1: | |
252 | try: | |
253 | delfunc(self) | |
254 | except: | |
255 | pass | |
2d091820 RD |
256 | def GetX(self, *_args, **_kwargs): |
257 | val = apply(miscc.wxRect_GetX,(self,) + _args, _kwargs) | |
70551f47 | 258 | return val |
2d091820 RD |
259 | def SetX(self, *_args, **_kwargs): |
260 | val = apply(miscc.wxRect_SetX,(self,) + _args, _kwargs) | |
70551f47 | 261 | return val |
2d091820 RD |
262 | def GetY(self, *_args, **_kwargs): |
263 | val = apply(miscc.wxRect_GetY,(self,) + _args, _kwargs) | |
70551f47 | 264 | return val |
2d091820 RD |
265 | def SetY(self, *_args, **_kwargs): |
266 | val = apply(miscc.wxRect_SetY,(self,) + _args, _kwargs) | |
70551f47 | 267 | return val |
2d091820 RD |
268 | def GetWidth(self, *_args, **_kwargs): |
269 | val = apply(miscc.wxRect_GetWidth,(self,) + _args, _kwargs) | |
70551f47 | 270 | return val |
2d091820 RD |
271 | def SetWidth(self, *_args, **_kwargs): |
272 | val = apply(miscc.wxRect_SetWidth,(self,) + _args, _kwargs) | |
70551f47 | 273 | return val |
2d091820 RD |
274 | def GetHeight(self, *_args, **_kwargs): |
275 | val = apply(miscc.wxRect_GetHeight,(self,) + _args, _kwargs) | |
70551f47 | 276 | return val |
2d091820 RD |
277 | def SetHeight(self, *_args, **_kwargs): |
278 | val = apply(miscc.wxRect_SetHeight,(self,) + _args, _kwargs) | |
70551f47 | 279 | return val |
2d091820 RD |
280 | def GetPosition(self, *_args, **_kwargs): |
281 | val = apply(miscc.wxRect_GetPosition,(self,) + _args, _kwargs) | |
282 | if val: val = wxPointPtr(val) ; val.thisown = 1 | |
70551f47 | 283 | return val |
2d091820 RD |
284 | def GetSize(self, *_args, **_kwargs): |
285 | val = apply(miscc.wxRect_GetSize,(self,) + _args, _kwargs) | |
286 | if val: val = wxSizePtr(val) ; val.thisown = 1 | |
70551f47 | 287 | return val |
123908fc 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 | |
2d091820 RD |
294 | def GetLeft(self, *_args, **_kwargs): |
295 | val = apply(miscc.wxRect_GetLeft,(self,) + _args, _kwargs) | |
70551f47 | 296 | return val |
2d091820 RD |
297 | def GetTop(self, *_args, **_kwargs): |
298 | val = apply(miscc.wxRect_GetTop,(self,) + _args, _kwargs) | |
70551f47 | 299 | return val |
2d091820 RD |
300 | def GetBottom(self, *_args, **_kwargs): |
301 | val = apply(miscc.wxRect_GetBottom,(self,) + _args, _kwargs) | |
70551f47 | 302 | return val |
2d091820 RD |
303 | def GetRight(self, *_args, **_kwargs): |
304 | val = apply(miscc.wxRect_GetRight,(self,) + _args, _kwargs) | |
70551f47 | 305 | return val |
56f5d962 RD |
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 | |
b67a9327 RD |
318 | def Deflate(self, *_args, **_kwargs): |
319 | val = apply(miscc.wxRect_Deflate,(self,) + _args, _kwargs) | |
320 | return val | |
f6bcfd97 BP |
321 | def Inflate(self, *_args, **_kwargs): |
322 | val = apply(miscc.wxRect_Inflate,(self,) + _args, _kwargs) | |
323 | return val | |
b67a9327 RD |
324 | def InsideXY(self, *_args, **_kwargs): |
325 | val = apply(miscc.wxRect_InsideXY,(self,) + _args, _kwargs) | |
326 | return val | |
f6bcfd97 BP |
327 | def Inside(self, *_args, **_kwargs): |
328 | val = apply(miscc.wxRect_Inside,(self,) + _args, _kwargs) | |
329 | return val | |
b67a9327 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 | |
2d091820 RD |
342 | def asTuple(self, *_args, **_kwargs): |
343 | val = apply(miscc.wxRect_asTuple,(self,) + _args, _kwargs) | |
21f8d7ea | 344 | return val |
f6bcfd97 BP |
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 | |
b67a9327 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) | |
f6bcfd97 | 354 | return val |
70551f47 RD |
355 | def __setattr__(self,name,value): |
356 | if name == "x" : | |
2d091820 | 357 | miscc.wxRect_x_set(self,value) |
70551f47 RD |
358 | return |
359 | if name == "y" : | |
2d091820 | 360 | miscc.wxRect_y_set(self,value) |
70551f47 RD |
361 | return |
362 | if name == "width" : | |
2d091820 | 363 | miscc.wxRect_width_set(self,value) |
70551f47 RD |
364 | return |
365 | if name == "height" : | |
2d091820 | 366 | miscc.wxRect_height_set(self,value) |
70551f47 RD |
367 | return |
368 | self.__dict__[name] = value | |
369 | def __getattr__(self,name): | |
370 | if name == "x" : | |
2d091820 | 371 | return miscc.wxRect_x_get(self) |
70551f47 | 372 | if name == "y" : |
2d091820 | 373 | return miscc.wxRect_y_get(self) |
70551f47 | 374 | if name == "width" : |
2d091820 | 375 | return miscc.wxRect_width_get(self) |
70551f47 | 376 | if name == "height" : |
2d091820 | 377 | return miscc.wxRect_height_get(self) |
70551f47 RD |
378 | raise AttributeError,name |
379 | def __repr__(self): | |
2d091820 | 380 | return "<C wxRect instance at %s>" % (self.this,) |
ab2208b5 | 381 | |
9c4165ad | 382 | def __str__(self): return str(self.asTuple()) |
b67a9327 | 383 | def __repr__(self): return 'wxRect'+str(self.asTuple()) |
7a8b1590 | 384 | def __len__(self): return len(self.asTuple()) |
9c4165ad RD |
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 | |
b67a9327 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) | |
9c4165ad | 396 | |
ab2208b5 RD |
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 | ||
70551f47 | 434 | class wxRect(wxRectPtr): |
2d091820 RD |
435 | def __init__(self,*_args,**_kwargs): |
436 | self.this = apply(miscc.new_wxRect,_args,_kwargs) | |
70551f47 RD |
437 | self.thisown = 1 |
438 | ||
439 | ||
440 | ||
441 | ||
b67a9327 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 | ||
9df61a29 | 573 | class wxIndividualLayoutConstraintPtr(wxObjectPtr): |
70551f47 RD |
574 | def __init__(self,this): |
575 | self.this = this | |
576 | self.thisown = 0 | |
2d091820 RD |
577 | def Above(self, *_args, **_kwargs): |
578 | val = apply(miscc.wxIndividualLayoutConstraint_Above,(self,) + _args, _kwargs) | |
70551f47 | 579 | return val |
2d091820 RD |
580 | def Absolute(self, *_args, **_kwargs): |
581 | val = apply(miscc.wxIndividualLayoutConstraint_Absolute,(self,) + _args, _kwargs) | |
70551f47 | 582 | return val |
2d091820 RD |
583 | def AsIs(self, *_args, **_kwargs): |
584 | val = apply(miscc.wxIndividualLayoutConstraint_AsIs,(self,) + _args, _kwargs) | |
70551f47 | 585 | return val |
2d091820 RD |
586 | def Below(self, *_args, **_kwargs): |
587 | val = apply(miscc.wxIndividualLayoutConstraint_Below,(self,) + _args, _kwargs) | |
70551f47 | 588 | return val |
2d091820 RD |
589 | def Unconstrained(self, *_args, **_kwargs): |
590 | val = apply(miscc.wxIndividualLayoutConstraint_Unconstrained,(self,) + _args, _kwargs) | |
70551f47 | 591 | return val |
2d091820 RD |
592 | def LeftOf(self, *_args, **_kwargs): |
593 | val = apply(miscc.wxIndividualLayoutConstraint_LeftOf,(self,) + _args, _kwargs) | |
70551f47 | 594 | return val |
2d091820 RD |
595 | def PercentOf(self, *_args, **_kwargs): |
596 | val = apply(miscc.wxIndividualLayoutConstraint_PercentOf,(self,) + _args, _kwargs) | |
70551f47 | 597 | return val |
2d091820 RD |
598 | def RightOf(self, *_args, **_kwargs): |
599 | val = apply(miscc.wxIndividualLayoutConstraint_RightOf,(self,) + _args, _kwargs) | |
70551f47 | 600 | return val |
2d091820 RD |
601 | def SameAs(self, *_args, **_kwargs): |
602 | val = apply(miscc.wxIndividualLayoutConstraint_SameAs,(self,) + _args, _kwargs) | |
70551f47 | 603 | return val |
2d091820 RD |
604 | def Set(self, *_args, **_kwargs): |
605 | val = apply(miscc.wxIndividualLayoutConstraint_Set,(self,) + _args, _kwargs) | |
70551f47 RD |
606 | return val |
607 | def __repr__(self): | |
2d091820 | 608 | return "<C wxIndividualLayoutConstraint instance at %s>" % (self.this,) |
70551f47 RD |
609 | class wxIndividualLayoutConstraint(wxIndividualLayoutConstraintPtr): |
610 | def __init__(self,this): | |
611 | self.this = this | |
612 | ||
613 | ||
614 | ||
615 | ||
9df61a29 | 616 | class wxLayoutConstraintsPtr(wxObjectPtr): |
70551f47 RD |
617 | def __init__(self,this): |
618 | self.this = this | |
619 | self.thisown = 0 | |
620 | def __setattr__(self,name,value): | |
621 | if name == "bottom" : | |
2d091820 | 622 | miscc.wxLayoutConstraints_bottom_set(self,value.this) |
70551f47 RD |
623 | return |
624 | if name == "centreX" : | |
2d091820 | 625 | miscc.wxLayoutConstraints_centreX_set(self,value.this) |
70551f47 RD |
626 | return |
627 | if name == "centreY" : | |
2d091820 | 628 | miscc.wxLayoutConstraints_centreY_set(self,value.this) |
70551f47 RD |
629 | return |
630 | if name == "height" : | |
2d091820 | 631 | miscc.wxLayoutConstraints_height_set(self,value.this) |
70551f47 RD |
632 | return |
633 | if name == "left" : | |
2d091820 | 634 | miscc.wxLayoutConstraints_left_set(self,value.this) |
70551f47 RD |
635 | return |
636 | if name == "right" : | |
2d091820 | 637 | miscc.wxLayoutConstraints_right_set(self,value.this) |
70551f47 RD |
638 | return |
639 | if name == "top" : | |
2d091820 | 640 | miscc.wxLayoutConstraints_top_set(self,value.this) |
70551f47 RD |
641 | return |
642 | if name == "width" : | |
2d091820 | 643 | miscc.wxLayoutConstraints_width_set(self,value.this) |
70551f47 RD |
644 | return |
645 | self.__dict__[name] = value | |
646 | def __getattr__(self,name): | |
647 | if name == "bottom" : | |
2d091820 | 648 | return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_bottom_get(self)) |
70551f47 | 649 | if name == "centreX" : |
2d091820 | 650 | return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_centreX_get(self)) |
70551f47 | 651 | if name == "centreY" : |
2d091820 | 652 | return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_centreY_get(self)) |
70551f47 | 653 | if name == "height" : |
2d091820 | 654 | return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_height_get(self)) |
70551f47 | 655 | if name == "left" : |
2d091820 | 656 | return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_left_get(self)) |
70551f47 | 657 | if name == "right" : |
2d091820 | 658 | return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_right_get(self)) |
70551f47 | 659 | if name == "top" : |
2d091820 | 660 | return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_top_get(self)) |
70551f47 | 661 | if name == "width" : |
2d091820 | 662 | return wxIndividualLayoutConstraintPtr(miscc.wxLayoutConstraints_width_get(self)) |
70551f47 RD |
663 | raise AttributeError,name |
664 | def __repr__(self): | |
2d091820 | 665 | return "<C wxLayoutConstraints instance at %s>" % (self.this,) |
70551f47 | 666 | class wxLayoutConstraints(wxLayoutConstraintsPtr): |
2d091820 RD |
667 | def __init__(self,*_args,**_kwargs): |
668 | self.this = apply(miscc.new_wxLayoutConstraints,_args,_kwargs) | |
70551f47 RD |
669 | self.thisown = 1 |
670 | ||
671 | ||
672 | ||
673 | ||
faf3cb35 RD |
674 | class wxAcceleratorEntryPtr : |
675 | def __init__(self,this): | |
676 | self.this = this | |
677 | self.thisown = 0 | |
b67a9327 RD |
678 | def __del__(self, delfunc=miscc.delete_wxAcceleratorEntry): |
679 | if self.thisown == 1: | |
680 | try: | |
681 | delfunc(self) | |
682 | except: | |
683 | pass | |
2d091820 RD |
684 | def Set(self, *_args, **_kwargs): |
685 | val = apply(miscc.wxAcceleratorEntry_Set,(self,) + _args, _kwargs) | |
faf3cb35 | 686 | return val |
2d091820 RD |
687 | def GetFlags(self, *_args, **_kwargs): |
688 | val = apply(miscc.wxAcceleratorEntry_GetFlags,(self,) + _args, _kwargs) | |
faf3cb35 | 689 | return val |
2d091820 RD |
690 | def GetKeyCode(self, *_args, **_kwargs): |
691 | val = apply(miscc.wxAcceleratorEntry_GetKeyCode,(self,) + _args, _kwargs) | |
faf3cb35 | 692 | return val |
2d091820 RD |
693 | def GetCommand(self, *_args, **_kwargs): |
694 | val = apply(miscc.wxAcceleratorEntry_GetCommand,(self,) + _args, _kwargs) | |
faf3cb35 RD |
695 | return val |
696 | def __repr__(self): | |
2d091820 | 697 | return "<C wxAcceleratorEntry instance at %s>" % (self.this,) |
faf3cb35 | 698 | class wxAcceleratorEntry(wxAcceleratorEntryPtr): |
2d091820 RD |
699 | def __init__(self,*_args,**_kwargs): |
700 | self.this = apply(miscc.new_wxAcceleratorEntry,_args,_kwargs) | |
faf3cb35 RD |
701 | self.thisown = 1 |
702 | ||
703 | ||
704 | ||
705 | ||
9df61a29 | 706 | class wxAcceleratorTablePtr(wxObjectPtr): |
faf3cb35 RD |
707 | def __init__(self,this): |
708 | self.this = this | |
709 | self.thisown = 0 | |
b67a9327 RD |
710 | def __del__(self, delfunc=miscc.delete_wxAcceleratorTable): |
711 | if self.thisown == 1: | |
712 | try: | |
713 | delfunc(self) | |
714 | except: | |
715 | pass | |
faf3cb35 | 716 | def __repr__(self): |
2d091820 | 717 | return "<C wxAcceleratorTable instance at %s>" % (self.this,) |
faf3cb35 | 718 | class wxAcceleratorTable(wxAcceleratorTablePtr): |
2d091820 RD |
719 | def __init__(self,*_args,**_kwargs): |
720 | self.this = apply(miscc.new_wxAcceleratorTable,_args,_kwargs) | |
faf3cb35 RD |
721 | self.thisown = 1 |
722 | ||
723 | ||
724 | ||
725 | ||
9df61a29 | 726 | class wxBusyInfoPtr(wxObjectPtr): |
4120ef2b RD |
727 | def __init__(self,this): |
728 | self.this = this | |
729 | self.thisown = 0 | |
b67a9327 RD |
730 | def __del__(self, delfunc=miscc.delete_wxBusyInfo): |
731 | if self.thisown == 1: | |
732 | try: | |
733 | delfunc(self) | |
734 | except: | |
735 | pass | |
4120ef2b 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 | ||
70551f47 RD |
746 | |
747 | ||
748 | #-------------- FUNCTION WRAPPERS ------------------ | |
749 | ||
56f5d962 RD |
750 | wxIntersectRect = miscc.wxIntersectRect |
751 | ||
ab9bc19b RD |
752 | wxNewId = miscc.wxNewId |
753 | ||
754 | wxRegisterId = miscc.wxRegisterId | |
755 | ||
5e40f9dd RD |
756 | wxGetCurrentId = miscc.wxGetCurrentId |
757 | ||
70551f47 RD |
758 | wxBell = miscc.wxBell |
759 | ||
70551f47 RD |
760 | wxEndBusyCursor = miscc.wxEndBusyCursor |
761 | ||
bc29c5e0 RD |
762 | wxGetElapsedTime = miscc.wxGetElapsedTime |
763 | ||
70551f47 RD |
764 | wxGetMousePosition = miscc.wxGetMousePosition |
765 | ||
766 | wxIsBusy = miscc.wxIsBusy | |
767 | ||
768 | wxNow = miscc.wxNow | |
769 | ||
bc29c5e0 RD |
770 | wxShell = miscc.wxShell |
771 | ||
772 | wxStartTimer = miscc.wxStartTimer | |
773 | ||
774 | wxGetOsVersion = miscc.wxGetOsVersion | |
775 | ||
c368d904 RD |
776 | wxGetOsDescription = miscc.wxGetOsDescription |
777 | ||
12d1116b RD |
778 | wxShutdown = miscc.wxShutdown |
779 | ||
d24a34bb RD |
780 | wxSleep = miscc.wxSleep |
781 | ||
c368d904 | 782 | wxUsleep = miscc.wxUsleep |
70551f47 | 783 | |
c368d904 | 784 | wxYield = miscc.wxYield |
ab9bc19b | 785 | |
5e40f9dd RD |
786 | wxYieldIfNeeded = miscc.wxYieldIfNeeded |
787 | ||
d24a34bb RD |
788 | wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows |
789 | ||
d29aba2f RD |
790 | wxStripMenuCodes = miscc.wxStripMenuCodes |
791 | ||
c368d904 RD |
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 | ||
5d413391 RD |
804 | wxGetUserHome = miscc.wxGetUserHome |
805 | ||
8f8b0a8d RD |
806 | wxGetProcessId = miscc.wxGetProcessId |
807 | ||
c368d904 RD |
808 | def wxGetAccelFromString(*_args, **_kwargs): |
809 | val = apply(miscc.wxGetAccelFromString,_args,_kwargs) | |
810 | if val: val = wxAcceleratorEntryPtr(val) | |
811 | return val | |
812 | ||
70551f47 RD |
813 | |
814 | ||
815 | #-------------- VARIABLE WRAPPERS ------------------ | |
816 | ||
12d1116b RD |
817 | wxSHUTDOWN_POWEROFF = miscc.wxSHUTDOWN_POWEROFF |
818 | wxSHUTDOWN_REBOOT = miscc.wxSHUTDOWN_REBOOT | |
70551f47 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 | |
f6bcfd97 BP |
838 | cvar = miscc.cvar |
839 | wxNullAcceleratorTable = wxAcceleratorTablePtr(miscc.cvar.wxNullAcceleratorTable) |