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