]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/misc.py
added functions to read/write several elements at once (patch 754986)
[wxWidgets.git] / wxPython / src / gtk / misc.py
CommitLineData
70551f47
RD
1# This file was created automatically by SWIG.
2import miscc
9df61a29
RD
3class 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
15class wxObject(wxObjectPtr):
16 def __init__(self,this):
17 self.this = this
18
19
20
21
70551f47
RD
22class 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
2d091820 53 def asTuple(self, *_args, **_kwargs):
1fded56b 54 val = miscc.wxSize_asTuple(self, *_args, **_kwargs)
70551f47 55 return val
b67a9327 56 def __eq__(self, *_args, **_kwargs):
1fded56b 57 val = miscc.wxSize___eq__(self, *_args, **_kwargs)
b67a9327
RD
58 return val
59 def __ne__(self, *_args, **_kwargs):
1fded56b 60 val = 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):
1fded56b 87 return "<%s.%s instance; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, 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 102class wxSize(wxSizePtr):
2d091820 103 def __init__(self,*_args,**_kwargs):
1fded56b 104 self.this = miscc.new_wxSize(*_args,**_kwargs)
70551f47
RD
105 self.thisown = 1
106
107
108
109
110class 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 120 def Set(self, *_args, **_kwargs):
1fded56b 121 val = miscc.wxRealPoint_Set(self, *_args, **_kwargs)
107e4716
RD
122 return val
123 def asTuple(self, *_args, **_kwargs):
1fded56b 124 val = miscc.wxRealPoint_asTuple(self, *_args, **_kwargs)
107e4716 125 return val
c368d904 126 def __add__(self, *_args, **_kwargs):
1fded56b 127 val = miscc.wxRealPoint___add__(self, *_args, **_kwargs)
c368d904
RD
128 if val: val = wxRealPointPtr(val) ; val.thisown = 1
129 return val
130 def __sub__(self, *_args, **_kwargs):
1fded56b 131 val = miscc.wxRealPoint___sub__(self, *_args, **_kwargs)
c368d904
RD
132 if val: val = wxRealPointPtr(val) ; val.thisown = 1
133 return val
b67a9327 134 def __eq__(self, *_args, **_kwargs):
1fded56b 135 val = miscc.wxRealPoint___eq__(self, *_args, **_kwargs)
b67a9327
RD
136 return val
137 def __ne__(self, *_args, **_kwargs):
1fded56b 138 val = 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):
1fded56b 155 return "<%s.%s instance; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, 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 170class wxRealPoint(wxRealPointPtr):
2d091820 171 def __init__(self,*_args,**_kwargs):
1fded56b 172 self.this = miscc.new_wxRealPoint(*_args,**_kwargs)
70551f47
RD
173 self.thisown = 1
174
175
176
177
178class 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 188 def Set(self, *_args, **_kwargs):
1fded56b 189 val = miscc.wxPoint_Set(self, *_args, **_kwargs)
70551f47 190 return val
2d091820 191 def asTuple(self, *_args, **_kwargs):
1fded56b 192 val = miscc.wxPoint_asTuple(self, *_args, **_kwargs)
70551f47 193 return val
c368d904 194 def __add__(self, *_args, **_kwargs):
1fded56b 195 val = miscc.wxPoint___add__(self, *_args, **_kwargs)
c368d904
RD
196 if val: val = wxPointPtr(val) ; val.thisown = 1
197 return val
198 def __sub__(self, *_args, **_kwargs):
1fded56b 199 val = miscc.wxPoint___sub__(self, *_args, **_kwargs)
c368d904
RD
200 if val: val = wxPointPtr(val) ; val.thisown = 1
201 return val
b67a9327 202 def __eq__(self, *_args, **_kwargs):
1fded56b 203 val = miscc.wxPoint___eq__(self, *_args, **_kwargs)
b67a9327
RD
204 return val
205 def __ne__(self, *_args, **_kwargs):
1fded56b 206 val = 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):
1fded56b 223 return "<%s.%s instance; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, 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 238class wxPoint(wxPointPtr):
2d091820 239 def __init__(self,*_args,**_kwargs):
1fded56b 240 self.this = miscc.new_wxPoint(*_args,**_kwargs)
70551f47
RD
241 self.thisown = 1
242
243
244
245
246class 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 256 def GetX(self, *_args, **_kwargs):
1fded56b 257 val = miscc.wxRect_GetX(self, *_args, **_kwargs)
70551f47 258 return val
2d091820 259 def SetX(self, *_args, **_kwargs):
1fded56b 260 val = miscc.wxRect_SetX(self, *_args, **_kwargs)
70551f47 261 return val
2d091820 262 def GetY(self, *_args, **_kwargs):
1fded56b 263 val = miscc.wxRect_GetY(self, *_args, **_kwargs)
70551f47 264 return val
2d091820 265 def SetY(self, *_args, **_kwargs):
1fded56b 266 val = miscc.wxRect_SetY(self, *_args, **_kwargs)
70551f47 267 return val
2d091820 268 def GetWidth(self, *_args, **_kwargs):
1fded56b 269 val = miscc.wxRect_GetWidth(self, *_args, **_kwargs)
70551f47 270 return val
2d091820 271 def SetWidth(self, *_args, **_kwargs):
1fded56b 272 val = miscc.wxRect_SetWidth(self, *_args, **_kwargs)
70551f47 273 return val
2d091820 274 def GetHeight(self, *_args, **_kwargs):
1fded56b 275 val = miscc.wxRect_GetHeight(self, *_args, **_kwargs)
70551f47 276 return val
2d091820 277 def SetHeight(self, *_args, **_kwargs):
1fded56b 278 val = miscc.wxRect_SetHeight(self, *_args, **_kwargs)
70551f47 279 return val
2d091820 280 def GetPosition(self, *_args, **_kwargs):
1fded56b 281 val = miscc.wxRect_GetPosition(self, *_args, **_kwargs)
2d091820 282 if val: val = wxPointPtr(val) ; val.thisown = 1
70551f47 283 return val
2d091820 284 def GetSize(self, *_args, **_kwargs):
1fded56b 285 val = miscc.wxRect_GetSize(self, *_args, **_kwargs)
2d091820 286 if val: val = wxSizePtr(val) ; val.thisown = 1
70551f47 287 return val
123908fc 288 def SetPosition(self, *_args, **_kwargs):
1fded56b 289 val = miscc.wxRect_SetPosition(self, *_args, **_kwargs)
123908fc
RD
290 return val
291 def SetSize(self, *_args, **_kwargs):
1fded56b 292 val = miscc.wxRect_SetSize(self, *_args, **_kwargs)
123908fc 293 return val
2d091820 294 def GetLeft(self, *_args, **_kwargs):
1fded56b 295 val = miscc.wxRect_GetLeft(self, *_args, **_kwargs)
70551f47 296 return val
2d091820 297 def GetTop(self, *_args, **_kwargs):
1fded56b 298 val = miscc.wxRect_GetTop(self, *_args, **_kwargs)
70551f47 299 return val
2d091820 300 def GetBottom(self, *_args, **_kwargs):
1fded56b 301 val = miscc.wxRect_GetBottom(self, *_args, **_kwargs)
70551f47 302 return val
2d091820 303 def GetRight(self, *_args, **_kwargs):
1fded56b 304 val = miscc.wxRect_GetRight(self, *_args, **_kwargs)
70551f47 305 return val
56f5d962 306 def SetLeft(self, *_args, **_kwargs):
1fded56b 307 val = miscc.wxRect_SetLeft(self, *_args, **_kwargs)
56f5d962
RD
308 return val
309 def SetRight(self, *_args, **_kwargs):
1fded56b 310 val = miscc.wxRect_SetRight(self, *_args, **_kwargs)
56f5d962
RD
311 return val
312 def SetTop(self, *_args, **_kwargs):
1fded56b 313 val = miscc.wxRect_SetTop(self, *_args, **_kwargs)
56f5d962
RD
314 return val
315 def SetBottom(self, *_args, **_kwargs):
1fded56b 316 val = miscc.wxRect_SetBottom(self, *_args, **_kwargs)
56f5d962 317 return val
b67a9327 318 def Deflate(self, *_args, **_kwargs):
1fded56b 319 val = miscc.wxRect_Deflate(self, *_args, **_kwargs)
b67a9327 320 return val
f6bcfd97 321 def Inflate(self, *_args, **_kwargs):
1fded56b 322 val = miscc.wxRect_Inflate(self, *_args, **_kwargs)
f6bcfd97 323 return val
b67a9327 324 def InsideXY(self, *_args, **_kwargs):
1fded56b 325 val = miscc.wxRect_InsideXY(self, *_args, **_kwargs)
b67a9327 326 return val
f6bcfd97 327 def Inside(self, *_args, **_kwargs):
1fded56b 328 val = miscc.wxRect_Inside(self, *_args, **_kwargs)
f6bcfd97 329 return val
b67a9327 330 def Intersects(self, *_args, **_kwargs):
1fded56b 331 val = miscc.wxRect_Intersects(self, *_args, **_kwargs)
b67a9327
RD
332 return val
333 def OffsetXY(self, *_args, **_kwargs):
1fded56b 334 val = miscc.wxRect_OffsetXY(self, *_args, **_kwargs)
b67a9327
RD
335 return val
336 def Offset(self, *_args, **_kwargs):
1fded56b 337 val = miscc.wxRect_Offset(self, *_args, **_kwargs)
b67a9327
RD
338 return val
339 def Set(self, *_args, **_kwargs):
1fded56b 340 val = miscc.wxRect_Set(self, *_args, **_kwargs)
b67a9327 341 return val
2d091820 342 def asTuple(self, *_args, **_kwargs):
1fded56b 343 val = miscc.wxRect_asTuple(self, *_args, **_kwargs)
21f8d7ea 344 return val
f6bcfd97 345 def __add__(self, *_args, **_kwargs):
1fded56b 346 val = miscc.wxRect___add__(self, *_args, **_kwargs)
f6bcfd97
BP
347 if val: val = wxRectPtr(val) ; val.thisown = 1
348 return val
b67a9327 349 def __eq__(self, *_args, **_kwargs):
1fded56b 350 val = miscc.wxRect___eq__(self, *_args, **_kwargs)
b67a9327
RD
351 return val
352 def __ne__(self, *_args, **_kwargs):
1fded56b 353 val = 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):
1fded56b 380 return "<%s.%s instance; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, 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 434class wxRect(wxRectPtr):
2d091820 435 def __init__(self,*_args,**_kwargs):
1fded56b 436 self.this = miscc.new_wxRect(*_args,**_kwargs)
70551f47
RD
437 self.thisown = 1
438
439
440
441
b67a9327
RD
442class wxPoint2DDoublePtr :
443 def __init__(self,this):
444 self.this = this
445 self.thisown = 0
446 def GetFloor(self, *_args, **_kwargs):
1fded56b 447 val = miscc.wxPoint2DDouble_GetFloor(self, *_args, **_kwargs)
b67a9327
RD
448 return val
449 def GetRounded(self, *_args, **_kwargs):
1fded56b 450 val = miscc.wxPoint2DDouble_GetRounded(self, *_args, **_kwargs)
b67a9327
RD
451 return val
452 def GetVectorLength(self, *_args, **_kwargs):
1fded56b 453 val = miscc.wxPoint2DDouble_GetVectorLength(self, *_args, **_kwargs)
b67a9327
RD
454 return val
455 def GetVectorAngle(self, *_args, **_kwargs):
1fded56b 456 val = miscc.wxPoint2DDouble_GetVectorAngle(self, *_args, **_kwargs)
b67a9327
RD
457 return val
458 def SetVectorLength(self, *_args, **_kwargs):
1fded56b 459 val = miscc.wxPoint2DDouble_SetVectorLength(self, *_args, **_kwargs)
b67a9327
RD
460 return val
461 def SetVectorAngle(self, *_args, **_kwargs):
1fded56b 462 val = miscc.wxPoint2DDouble_SetVectorAngle(self, *_args, **_kwargs)
b67a9327
RD
463 return val
464 def GetDistance(self, *_args, **_kwargs):
1fded56b 465 val = miscc.wxPoint2DDouble_GetDistance(self, *_args, **_kwargs)
b67a9327
RD
466 return val
467 def GetDistanceSquare(self, *_args, **_kwargs):
1fded56b 468 val = miscc.wxPoint2DDouble_GetDistanceSquare(self, *_args, **_kwargs)
b67a9327
RD
469 return val
470 def GetDotProduct(self, *_args, **_kwargs):
1fded56b 471 val = miscc.wxPoint2DDouble_GetDotProduct(self, *_args, **_kwargs)
b67a9327
RD
472 return val
473 def GetCrossProduct(self, *_args, **_kwargs):
1fded56b 474 val = miscc.wxPoint2DDouble_GetCrossProduct(self, *_args, **_kwargs)
b67a9327
RD
475 return val
476 def Set(self, *_args, **_kwargs):
1fded56b 477 val = miscc.wxPoint2DDouble_Set(self, *_args, **_kwargs)
b67a9327
RD
478 return val
479 def __neg__(self, *_args, **_kwargs):
1fded56b 480 val = miscc.wxPoint2DDouble___neg__(self, *_args, **_kwargs)
b67a9327
RD
481 if val: val = wxPoint2DDoublePtr(val) ; val.thisown = 1
482 return val
483 def __iadd__(self, *_args, **_kwargs):
1fded56b 484 val = miscc.wxPoint2DDouble___iadd__(self, *_args, **_kwargs)
b67a9327
RD
485 if val: val = wxPoint2DDoublePtr(val)
486 return val
487 def __isub__(self, *_args, **_kwargs):
1fded56b 488 val = miscc.wxPoint2DDouble___isub__(self, *_args, **_kwargs)
b67a9327
RD
489 if val: val = wxPoint2DDoublePtr(val)
490 return val
491 def __imul__(self, *_args, **_kwargs):
1fded56b 492 val = miscc.wxPoint2DDouble___imul__(self, *_args, **_kwargs)
b67a9327
RD
493 if val: val = wxPoint2DDoublePtr(val)
494 return val
495 def __idiv__(self, *_args, **_kwargs):
1fded56b 496 val = miscc.wxPoint2DDouble___idiv__(self, *_args, **_kwargs)
b67a9327
RD
497 if val: val = wxPoint2DDoublePtr(val)
498 return val
499 def __eq__(self, *_args, **_kwargs):
1fded56b 500 val = miscc.wxPoint2DDouble___eq__(self, *_args, **_kwargs)
b67a9327
RD
501 return val
502 def __ne__(self, *_args, **_kwargs):
1fded56b 503 val = miscc.wxPoint2DDouble___ne__(self, *_args, **_kwargs)
b67a9327
RD
504 return val
505 def asTuple(self, *_args, **_kwargs):
1fded56b 506 val = miscc.wxPoint2DDouble_asTuple(self, *_args, **_kwargs)
b67a9327
RD
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):
1fded56b 533 return "<%s.%s instance; proxy of C++ wxPoint2DDouble instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
b67a9327
RD
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
555class wxPoint2DDouble(wxPoint2DDoublePtr):
556 def __init__(self,*_args,**_kwargs):
1fded56b 557 self.this = miscc.new_wxPoint2DDouble(*_args,**_kwargs)
b67a9327
RD
558 self.thisown = 1
559
560
561
562def wxPoint2DDoubleCopy(*_args,**_kwargs):
1fded56b 563 val = wxPoint2DDoublePtr(miscc.new_wxPoint2DDoubleCopy(*_args,**_kwargs))
b67a9327
RD
564 val.thisown = 1
565 return val
566
567def wxPoint2DDoubleFromPoint(*_args,**_kwargs):
1fded56b 568 val = wxPoint2DDoublePtr(miscc.new_wxPoint2DDoubleFromPoint(*_args,**_kwargs))
b67a9327
RD
569 val.thisown = 1
570 return val
571
572
9df61a29 573class wxIndividualLayoutConstraintPtr(wxObjectPtr):
70551f47
RD
574 def __init__(self,this):
575 self.this = this
576 self.thisown = 0
2d091820 577 def Above(self, *_args, **_kwargs):
1fded56b 578 val = miscc.wxIndividualLayoutConstraint_Above(self, *_args, **_kwargs)
70551f47 579 return val
2d091820 580 def Absolute(self, *_args, **_kwargs):
1fded56b 581 val = miscc.wxIndividualLayoutConstraint_Absolute(self, *_args, **_kwargs)
70551f47 582 return val
2d091820 583 def AsIs(self, *_args, **_kwargs):
1fded56b 584 val = miscc.wxIndividualLayoutConstraint_AsIs(self, *_args, **_kwargs)
70551f47 585 return val
2d091820 586 def Below(self, *_args, **_kwargs):
1fded56b 587 val = miscc.wxIndividualLayoutConstraint_Below(self, *_args, **_kwargs)
70551f47 588 return val
2d091820 589 def Unconstrained(self, *_args, **_kwargs):
1fded56b 590 val = miscc.wxIndividualLayoutConstraint_Unconstrained(self, *_args, **_kwargs)
70551f47 591 return val
2d091820 592 def LeftOf(self, *_args, **_kwargs):
1fded56b 593 val = miscc.wxIndividualLayoutConstraint_LeftOf(self, *_args, **_kwargs)
70551f47 594 return val
2d091820 595 def PercentOf(self, *_args, **_kwargs):
1fded56b 596 val = miscc.wxIndividualLayoutConstraint_PercentOf(self, *_args, **_kwargs)
70551f47 597 return val
2d091820 598 def RightOf(self, *_args, **_kwargs):
1fded56b 599 val = miscc.wxIndividualLayoutConstraint_RightOf(self, *_args, **_kwargs)
70551f47 600 return val
2d091820 601 def SameAs(self, *_args, **_kwargs):
1fded56b 602 val = miscc.wxIndividualLayoutConstraint_SameAs(self, *_args, **_kwargs)
70551f47 603 return val
2d091820 604 def Set(self, *_args, **_kwargs):
1fded56b 605 val = miscc.wxIndividualLayoutConstraint_Set(self, *_args, **_kwargs)
70551f47
RD
606 return val
607 def __repr__(self):
1fded56b 608 return "<%s.%s instance; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
70551f47
RD
609class wxIndividualLayoutConstraint(wxIndividualLayoutConstraintPtr):
610 def __init__(self,this):
611 self.this = this
612
613
614
615
9df61a29 616class 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):
1fded56b 665 return "<%s.%s instance; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
70551f47 666class wxLayoutConstraints(wxLayoutConstraintsPtr):
2d091820 667 def __init__(self,*_args,**_kwargs):
1fded56b 668 self.this = miscc.new_wxLayoutConstraints(*_args,**_kwargs)
70551f47
RD
669 self.thisown = 1
670
671
672
673
faf3cb35
RD
674class 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 684 def Set(self, *_args, **_kwargs):
1fded56b 685 val = miscc.wxAcceleratorEntry_Set(self, *_args, **_kwargs)
faf3cb35 686 return val
2d091820 687 def GetFlags(self, *_args, **_kwargs):
1fded56b 688 val = miscc.wxAcceleratorEntry_GetFlags(self, *_args, **_kwargs)
faf3cb35 689 return val
2d091820 690 def GetKeyCode(self, *_args, **_kwargs):
1fded56b 691 val = miscc.wxAcceleratorEntry_GetKeyCode(self, *_args, **_kwargs)
faf3cb35 692 return val
2d091820 693 def GetCommand(self, *_args, **_kwargs):
1fded56b 694 val = miscc.wxAcceleratorEntry_GetCommand(self, *_args, **_kwargs)
faf3cb35
RD
695 return val
696 def __repr__(self):
1fded56b 697 return "<%s.%s instance; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
faf3cb35 698class wxAcceleratorEntry(wxAcceleratorEntryPtr):
2d091820 699 def __init__(self,*_args,**_kwargs):
1fded56b 700 self.this = miscc.new_wxAcceleratorEntry(*_args,**_kwargs)
faf3cb35
RD
701 self.thisown = 1
702
703
704
705
9df61a29 706class 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):
1fded56b 717 return "<%s.%s instance; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
faf3cb35 718class wxAcceleratorTable(wxAcceleratorTablePtr):
2d091820 719 def __init__(self,*_args,**_kwargs):
1fded56b 720 self.this = miscc.new_wxAcceleratorTable(*_args,**_kwargs)
faf3cb35
RD
721 self.thisown = 1
722
723
724
725
9df61a29 726class 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 736 def __repr__(self):
1fded56b 737 return "<%s.%s instance; proxy of C++ wxBusyInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
4120ef2b
RD
738class wxBusyInfo(wxBusyInfoPtr):
739 def __init__(self,*_args,**_kwargs):
1fded56b 740 self.this = miscc.new_wxBusyInfo(*_args,**_kwargs)
4120ef2b
RD
741 self.thisown = 1
742
743
744
745
70551f47
RD
746
747
748#-------------- FUNCTION WRAPPERS ------------------
749
56f5d962
RD
750wxIntersectRect = miscc.wxIntersectRect
751
ab9bc19b
RD
752wxNewId = miscc.wxNewId
753
754wxRegisterId = miscc.wxRegisterId
755
5e40f9dd
RD
756wxGetCurrentId = miscc.wxGetCurrentId
757
70551f47
RD
758wxBell = miscc.wxBell
759
70551f47
RD
760wxEndBusyCursor = miscc.wxEndBusyCursor
761
bc29c5e0
RD
762wxGetElapsedTime = miscc.wxGetElapsedTime
763
70551f47
RD
764wxGetMousePosition = miscc.wxGetMousePosition
765
766wxIsBusy = miscc.wxIsBusy
767
768wxNow = miscc.wxNow
769
bc29c5e0
RD
770wxShell = miscc.wxShell
771
772wxStartTimer = miscc.wxStartTimer
773
774wxGetOsVersion = miscc.wxGetOsVersion
775
c368d904
RD
776wxGetOsDescription = miscc.wxGetOsDescription
777
12d1116b
RD
778wxShutdown = miscc.wxShutdown
779
d24a34bb
RD
780wxSleep = miscc.wxSleep
781
c368d904 782wxUsleep = miscc.wxUsleep
70551f47 783
c368d904 784wxYield = miscc.wxYield
ab9bc19b 785
5e40f9dd
RD
786wxYieldIfNeeded = miscc.wxYieldIfNeeded
787
d24a34bb
RD
788wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows
789
d29aba2f
RD
790wxStripMenuCodes = miscc.wxStripMenuCodes
791
c368d904
RD
792wxGetEmailAddress = miscc.wxGetEmailAddress
793
794wxGetHostName = miscc.wxGetHostName
795
796wxGetFullHostName = miscc.wxGetFullHostName
797
798wxGetUserId = miscc.wxGetUserId
799
800wxGetUserName = miscc.wxGetUserName
801
802wxGetHomeDir = miscc.wxGetHomeDir
803
5d413391
RD
804wxGetUserHome = miscc.wxGetUserHome
805
8f8b0a8d
RD
806wxGetProcessId = miscc.wxGetProcessId
807
c368d904 808def wxGetAccelFromString(*_args, **_kwargs):
1fded56b 809 val = miscc.wxGetAccelFromString(*_args,**_kwargs)
c368d904
RD
810 if val: val = wxAcceleratorEntryPtr(val)
811 return val
812
70551f47
RD
813
814
815#-------------- VARIABLE WRAPPERS ------------------
816
12d1116b
RD
817wxSHUTDOWN_POWEROFF = miscc.wxSHUTDOWN_POWEROFF
818wxSHUTDOWN_REBOOT = miscc.wxSHUTDOWN_REBOOT
70551f47
RD
819wxLeft = miscc.wxLeft
820wxTop = miscc.wxTop
821wxRight = miscc.wxRight
822wxBottom = miscc.wxBottom
823wxWidth = miscc.wxWidth
824wxHeight = miscc.wxHeight
825wxCentre = miscc.wxCentre
826wxCenter = miscc.wxCenter
827wxCentreX = miscc.wxCentreX
828wxCentreY = miscc.wxCentreY
829wxUnconstrained = miscc.wxUnconstrained
830wxAsIs = miscc.wxAsIs
831wxPercentOf = miscc.wxPercentOf
832wxAbove = miscc.wxAbove
833wxBelow = miscc.wxBelow
834wxLeftOf = miscc.wxLeftOf
835wxRightOf = miscc.wxRightOf
836wxSameAs = miscc.wxSameAs
837wxAbsolute = miscc.wxAbsolute
f6bcfd97
BP
838cvar = miscc.cvar
839wxNullAcceleratorTable = wxAcceleratorTablePtr(miscc.cvar.wxNullAcceleratorTable)