]>
Commit | Line | Data |
---|---|---|
d55e5bfc RD |
1 | # This file was created automatically by SWIG. |
2 | # Don't modify this file, modify the SWIG interface instead. | |
3 | ||
4 | import _gdi_ | |
5 | ||
093d3ff1 RD |
6 | def _swig_setattr_nondynamic(self,class_type,name,value,static=1): |
7 | if (name == "this"): | |
8 | if isinstance(value, class_type): | |
9 | self.__dict__[name] = value.this | |
10 | if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown | |
11 | del value.thisown | |
12 | return | |
13 | method = class_type.__swig_setmethods__.get(name,None) | |
14 | if method: return method(self,value) | |
15 | if (not static) or hasattr(self,name) or (name == "thisown"): | |
16 | self.__dict__[name] = value | |
17 | else: | |
18 | raise AttributeError("You cannot add attributes to %s" % self) | |
19 | ||
20 | def _swig_setattr(self,class_type,name,value): | |
21 | return _swig_setattr_nondynamic(self,class_type,name,value,0) | |
22 | ||
23 | def _swig_getattr(self,class_type,name): | |
24 | method = class_type.__swig_getmethods__.get(name,None) | |
25 | if method: return method(self) | |
26 | raise AttributeError,name | |
27 | ||
28 | import types | |
29 | try: | |
30 | _object = types.ObjectType | |
31 | _newclass = 1 | |
32 | except AttributeError: | |
33 | class _object : pass | |
34 | _newclass = 0 | |
35 | del types | |
36 | ||
37 | ||
38 | def _swig_setattr_nondynamic_method(set): | |
39 | def set_attr(self,name,value): | |
40 | if hasattr(self,name) or (name in ("this", "thisown")): | |
41 | set(self,name,value) | |
42 | else: | |
43 | raise AttributeError("You cannot add attributes to %s" % self) | |
44 | return set_attr | |
45 | ||
46 | ||
d55e5bfc RD |
47 | import _core |
48 | wx = _core | |
d55e5bfc RD |
49 | #--------------------------------------------------------------------------- |
50 | ||
51 | class GDIObject(_core.Object): | |
093d3ff1 | 52 | """Proxy of C++ GDIObject class""" |
d55e5bfc RD |
53 | def __repr__(self): |
54 | return "<%s.%s; proxy of C++ wxGDIObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
55 | def __init__(self, *args, **kwargs): | |
56 | """__init__(self) -> GDIObject""" | |
57 | newobj = _gdi_.new_GDIObject(*args, **kwargs) | |
58 | self.this = newobj.this | |
59 | self.thisown = 1 | |
60 | del newobj.thisown | |
61 | def __del__(self, destroy=_gdi_.delete_GDIObject): | |
62 | """__del__(self)""" | |
63 | try: | |
64 | if self.thisown: destroy(self) | |
65 | except: pass | |
66 | ||
67 | def GetVisible(*args, **kwargs): | |
68 | """GetVisible(self) -> bool""" | |
69 | return _gdi_.GDIObject_GetVisible(*args, **kwargs) | |
70 | ||
71 | def SetVisible(*args, **kwargs): | |
72 | """SetVisible(self, bool visible)""" | |
73 | return _gdi_.GDIObject_SetVisible(*args, **kwargs) | |
74 | ||
75 | def IsNull(*args, **kwargs): | |
76 | """IsNull(self) -> bool""" | |
77 | return _gdi_.GDIObject_IsNull(*args, **kwargs) | |
78 | ||
79 | ||
80 | class GDIObjectPtr(GDIObject): | |
81 | def __init__(self, this): | |
82 | self.this = this | |
83 | if not hasattr(self,"thisown"): self.thisown = 0 | |
84 | self.__class__ = GDIObject | |
85 | _gdi_.GDIObject_swigregister(GDIObjectPtr) | |
86 | ||
87 | #--------------------------------------------------------------------------- | |
88 | ||
89 | class Colour(_core.Object): | |
90 | """ | |
79fccf9d RD |
91 | A colour is an object representing a combination of Red, Green, and |
92 | Blue (RGB) intensity values, and is used to determine drawing colours, | |
93 | window colours, etc. Valid RGB values are in the range 0 to 255. | |
d55e5bfc | 94 | |
79fccf9d RD |
95 | In wxPython there are typemaps that will automatically convert from a |
96 | colour name, or from a '#RRGGBB' colour hex value string to a | |
97 | wx.Colour object when calling C++ methods that expect a wxColour. | |
98 | This means that the following are all equivallent:: | |
d55e5bfc RD |
99 | |
100 | win.SetBackgroundColour(wxColour(0,0,255)) | |
101 | win.SetBackgroundColour('BLUE') | |
102 | win.SetBackgroundColour('#0000FF') | |
103 | ||
79fccf9d RD |
104 | Additional colour names and their coresponding values can be added |
105 | using `wx.ColourDatabase`. Various system colours (as set in the | |
106 | user's system preferences) can be retrieved with | |
107 | `wx.SystemSettings.GetColour`. | |
108 | ||
d55e5bfc RD |
109 | """ |
110 | def __repr__(self): | |
111 | return "<%s.%s; proxy of C++ wxColour instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
112 | def __init__(self, *args, **kwargs): | |
113 | """ | |
79fccf9d | 114 | __init__(self, byte red=0, byte green=0, byte blue=0) -> Colour |
d55e5bfc RD |
115 | |
116 | Constructs a colour from red, green and blue values. | |
79fccf9d RD |
117 | |
118 | :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`. | |
119 | ||
d55e5bfc RD |
120 | """ |
121 | newobj = _gdi_.new_Colour(*args, **kwargs) | |
122 | self.this = newobj.this | |
123 | self.thisown = 1 | |
124 | del newobj.thisown | |
125 | def __del__(self, destroy=_gdi_.delete_Colour): | |
126 | """__del__(self)""" | |
127 | try: | |
128 | if self.thisown: destroy(self) | |
129 | except: pass | |
130 | ||
131 | def Red(*args, **kwargs): | |
132 | """ | |
79fccf9d | 133 | Red(self) -> byte |
d55e5bfc RD |
134 | |
135 | Returns the red intensity. | |
136 | """ | |
137 | return _gdi_.Colour_Red(*args, **kwargs) | |
138 | ||
139 | def Green(*args, **kwargs): | |
140 | """ | |
79fccf9d | 141 | Green(self) -> byte |
d55e5bfc RD |
142 | |
143 | Returns the green intensity. | |
144 | """ | |
145 | return _gdi_.Colour_Green(*args, **kwargs) | |
146 | ||
147 | def Blue(*args, **kwargs): | |
148 | """ | |
79fccf9d | 149 | Blue(self) -> byte |
d55e5bfc RD |
150 | |
151 | Returns the blue intensity. | |
152 | """ | |
153 | return _gdi_.Colour_Blue(*args, **kwargs) | |
154 | ||
155 | def Ok(*args, **kwargs): | |
156 | """ | |
157 | Ok(self) -> bool | |
158 | ||
159 | Returns True if the colour object is valid (the colour has been | |
160 | initialised with RGB values). | |
161 | """ | |
162 | return _gdi_.Colour_Ok(*args, **kwargs) | |
163 | ||
164 | def Set(*args, **kwargs): | |
165 | """ | |
79fccf9d | 166 | Set(self, byte red, byte green, byte blue) |
d55e5bfc RD |
167 | |
168 | Sets the RGB intensity values. | |
169 | """ | |
170 | return _gdi_.Colour_Set(*args, **kwargs) | |
171 | ||
172 | def SetRGB(*args, **kwargs): | |
173 | """ | |
174 | SetRGB(self, unsigned long colRGB) | |
175 | ||
176 | Sets the RGB intensity values from a packed RGB value. | |
177 | """ | |
178 | return _gdi_.Colour_SetRGB(*args, **kwargs) | |
179 | ||
180 | def SetFromName(*args, **kwargs): | |
181 | """ | |
182 | SetFromName(self, String colourName) | |
183 | ||
79fccf9d RD |
184 | Sets the RGB intensity values using a colour name listed in |
185 | ``wx.TheColourDatabase``. | |
d55e5bfc RD |
186 | """ |
187 | return _gdi_.Colour_SetFromName(*args, **kwargs) | |
188 | ||
189 | def GetPixel(*args, **kwargs): | |
190 | """ | |
191 | GetPixel(self) -> long | |
192 | ||
193 | Returns a pixel value which is platform-dependent. On Windows, a | |
79fccf9d RD |
194 | COLORREF is returned. On X, an allocated pixel value is returned. -1 |
195 | is returned if the pixel is invalid (on X, unallocated). | |
d55e5bfc RD |
196 | """ |
197 | return _gdi_.Colour_GetPixel(*args, **kwargs) | |
198 | ||
199 | def __eq__(*args, **kwargs): | |
200 | """ | |
201 | __eq__(self, Colour colour) -> bool | |
202 | ||
203 | Compare colours for equality | |
204 | """ | |
205 | return _gdi_.Colour___eq__(*args, **kwargs) | |
206 | ||
207 | def __ne__(*args, **kwargs): | |
208 | """ | |
209 | __ne__(self, Colour colour) -> bool | |
210 | ||
211 | Compare colours for inequality | |
212 | """ | |
213 | return _gdi_.Colour___ne__(*args, **kwargs) | |
214 | ||
215 | def Get(*args, **kwargs): | |
216 | """ | |
217 | Get() -> (r, g, b) | |
218 | ||
219 | Returns the RGB intensity values as a tuple. | |
220 | """ | |
221 | return _gdi_.Colour_Get(*args, **kwargs) | |
222 | ||
223 | def GetRGB(*args, **kwargs): | |
224 | """ | |
225 | GetRGB(self) -> unsigned long | |
226 | ||
227 | Return the colour as a packed RGB value | |
228 | """ | |
229 | return _gdi_.Colour_GetRGB(*args, **kwargs) | |
230 | ||
79fccf9d RD |
231 | asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead") |
232 | def __str__(self): return str(self.Get()) | |
233 | def __repr__(self): return 'wx.Colour' + str(self.Get()) | |
d55e5bfc RD |
234 | def __nonzero__(self): return self.Ok() |
235 | __safe_for_unpickling__ = True | |
236 | def __reduce__(self): return (Colour, self.Get()) | |
237 | ||
238 | ||
239 | class ColourPtr(Colour): | |
240 | def __init__(self, this): | |
241 | self.this = this | |
242 | if not hasattr(self,"thisown"): self.thisown = 0 | |
243 | self.__class__ = Colour | |
244 | _gdi_.Colour_swigregister(ColourPtr) | |
245 | ||
246 | def NamedColour(*args, **kwargs): | |
247 | """ | |
248 | NamedColour(String colorName) -> Colour | |
249 | ||
79fccf9d RD |
250 | Constructs a colour object using a colour name listed in |
251 | ``wx.TheColourDatabase``. | |
d55e5bfc RD |
252 | """ |
253 | val = _gdi_.new_NamedColour(*args, **kwargs) | |
254 | val.thisown = 1 | |
255 | return val | |
256 | ||
257 | def ColourRGB(*args, **kwargs): | |
258 | """ | |
259 | ColourRGB(unsigned long colRGB) -> Colour | |
260 | ||
261 | Constructs a colour from a packed RGB value. | |
262 | """ | |
263 | val = _gdi_.new_ColourRGB(*args, **kwargs) | |
264 | val.thisown = 1 | |
265 | return val | |
266 | ||
267 | Color = Colour | |
268 | NamedColor = NamedColour | |
269 | ColorRGB = ColourRGB | |
270 | ||
271 | class Palette(GDIObject): | |
093d3ff1 | 272 | """Proxy of C++ Palette class""" |
d55e5bfc RD |
273 | def __repr__(self): |
274 | return "<%s.%s; proxy of C++ wxPalette instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
275 | def __init__(self, *args, **kwargs): | |
276 | """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette""" | |
277 | newobj = _gdi_.new_Palette(*args, **kwargs) | |
278 | self.this = newobj.this | |
279 | self.thisown = 1 | |
280 | del newobj.thisown | |
281 | def __del__(self, destroy=_gdi_.delete_Palette): | |
282 | """__del__(self)""" | |
283 | try: | |
284 | if self.thisown: destroy(self) | |
285 | except: pass | |
286 | ||
287 | def GetPixel(*args, **kwargs): | |
288 | """GetPixel(self, byte red, byte green, byte blue) -> int""" | |
289 | return _gdi_.Palette_GetPixel(*args, **kwargs) | |
290 | ||
291 | def GetRGB(*args, **kwargs): | |
c1cb24a4 | 292 | """GetRGB(self, int pixel) -> (R,G,B)""" |
d55e5bfc RD |
293 | return _gdi_.Palette_GetRGB(*args, **kwargs) |
294 | ||
b519803b RD |
295 | def GetColoursCount(*args, **kwargs): |
296 | """GetColoursCount(self) -> int""" | |
297 | return _gdi_.Palette_GetColoursCount(*args, **kwargs) | |
298 | ||
d55e5bfc RD |
299 | def Ok(*args, **kwargs): |
300 | """Ok(self) -> bool""" | |
301 | return _gdi_.Palette_Ok(*args, **kwargs) | |
302 | ||
303 | def __nonzero__(self): return self.Ok() | |
304 | ||
305 | class PalettePtr(Palette): | |
306 | def __init__(self, this): | |
307 | self.this = this | |
308 | if not hasattr(self,"thisown"): self.thisown = 0 | |
309 | self.__class__ = Palette | |
310 | _gdi_.Palette_swigregister(PalettePtr) | |
311 | ||
312 | #--------------------------------------------------------------------------- | |
313 | ||
314 | class Pen(GDIObject): | |
093d3ff1 | 315 | """Proxy of C++ Pen class""" |
d55e5bfc RD |
316 | def __repr__(self): |
317 | return "<%s.%s; proxy of C++ wxPen instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
318 | def __init__(self, *args, **kwargs): | |
319 | """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen""" | |
320 | newobj = _gdi_.new_Pen(*args, **kwargs) | |
321 | self.this = newobj.this | |
322 | self.thisown = 1 | |
323 | del newobj.thisown | |
324 | def __del__(self, destroy=_gdi_.delete_Pen): | |
325 | """__del__(self)""" | |
326 | try: | |
327 | if self.thisown: destroy(self) | |
328 | except: pass | |
329 | ||
330 | def GetCap(*args, **kwargs): | |
331 | """GetCap(self) -> int""" | |
332 | return _gdi_.Pen_GetCap(*args, **kwargs) | |
333 | ||
334 | def GetColour(*args, **kwargs): | |
335 | """GetColour(self) -> Colour""" | |
336 | return _gdi_.Pen_GetColour(*args, **kwargs) | |
337 | ||
338 | def GetJoin(*args, **kwargs): | |
339 | """GetJoin(self) -> int""" | |
340 | return _gdi_.Pen_GetJoin(*args, **kwargs) | |
341 | ||
342 | def GetStyle(*args, **kwargs): | |
343 | """GetStyle(self) -> int""" | |
344 | return _gdi_.Pen_GetStyle(*args, **kwargs) | |
345 | ||
346 | def GetWidth(*args, **kwargs): | |
347 | """GetWidth(self) -> int""" | |
348 | return _gdi_.Pen_GetWidth(*args, **kwargs) | |
349 | ||
350 | def Ok(*args, **kwargs): | |
351 | """Ok(self) -> bool""" | |
352 | return _gdi_.Pen_Ok(*args, **kwargs) | |
353 | ||
354 | def SetCap(*args, **kwargs): | |
355 | """SetCap(self, int cap_style)""" | |
356 | return _gdi_.Pen_SetCap(*args, **kwargs) | |
357 | ||
358 | def SetColour(*args, **kwargs): | |
359 | """SetColour(self, Colour colour)""" | |
360 | return _gdi_.Pen_SetColour(*args, **kwargs) | |
361 | ||
362 | def SetJoin(*args, **kwargs): | |
363 | """SetJoin(self, int join_style)""" | |
364 | return _gdi_.Pen_SetJoin(*args, **kwargs) | |
365 | ||
366 | def SetStyle(*args, **kwargs): | |
367 | """SetStyle(self, int style)""" | |
368 | return _gdi_.Pen_SetStyle(*args, **kwargs) | |
369 | ||
370 | def SetWidth(*args, **kwargs): | |
371 | """SetWidth(self, int width)""" | |
372 | return _gdi_.Pen_SetWidth(*args, **kwargs) | |
373 | ||
374 | def SetDashes(*args, **kwargs): | |
093d3ff1 | 375 | """SetDashes(self, int dashes)""" |
d55e5bfc RD |
376 | return _gdi_.Pen_SetDashes(*args, **kwargs) |
377 | ||
378 | def GetDashes(*args, **kwargs): | |
379 | """GetDashes(self) -> PyObject""" | |
380 | return _gdi_.Pen_GetDashes(*args, **kwargs) | |
381 | ||
c24da6d6 RD |
382 | def _SetDashes(*args, **kwargs): |
383 | """_SetDashes(self, PyObject _self, PyObject pyDashes)""" | |
384 | return _gdi_.Pen__SetDashes(*args, **kwargs) | |
d55e5bfc | 385 | |
c24da6d6 RD |
386 | def SetDashes(self, dashes): |
387 | """ | |
388 | Associate a list of dash lengths with the Pen. | |
389 | """ | |
390 | self._SetDashes(self, dashes) | |
d55e5bfc RD |
391 | |
392 | def GetDashCount(*args, **kwargs): | |
393 | """GetDashCount(self) -> int""" | |
394 | return _gdi_.Pen_GetDashCount(*args, **kwargs) | |
395 | ||
396 | def GetStipple(*args, **kwargs): | |
397 | """GetStipple(self) -> Bitmap""" | |
398 | return _gdi_.Pen_GetStipple(*args, **kwargs) | |
399 | ||
400 | def SetStipple(*args, **kwargs): | |
401 | """SetStipple(self, Bitmap stipple)""" | |
402 | return _gdi_.Pen_SetStipple(*args, **kwargs) | |
403 | ||
c24da6d6 RD |
404 | def __eq__(*args, **kwargs): |
405 | """__eq__(self, Pen other) -> bool""" | |
406 | return _gdi_.Pen___eq__(*args, **kwargs) | |
407 | ||
408 | def __ne__(*args, **kwargs): | |
409 | """__ne__(self, Pen other) -> bool""" | |
410 | return _gdi_.Pen___ne__(*args, **kwargs) | |
411 | ||
d55e5bfc RD |
412 | def __nonzero__(self): return self.Ok() |
413 | ||
414 | class PenPtr(Pen): | |
415 | def __init__(self, this): | |
416 | self.this = this | |
417 | if not hasattr(self,"thisown"): self.thisown = 0 | |
418 | self.__class__ = Pen | |
419 | _gdi_.Pen_swigregister(PenPtr) | |
420 | ||
c24da6d6 | 421 | #--------------------------------------------------------------------------- |
d55e5bfc | 422 | |
c24da6d6 RD |
423 | class Brush(GDIObject): |
424 | """ | |
425 | A brush is a drawing tool for filling in areas. It is used for | |
426 | painting the background of rectangles, ellipses, etc. when drawing on | |
427 | a `wx.DC`. It has a colour and a style. | |
d55e5bfc RD |
428 | """ |
429 | def __repr__(self): | |
430 | return "<%s.%s; proxy of C++ wxBrush instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
431 | def __init__(self, *args, **kwargs): | |
432 | """ | |
433 | __init__(self, Colour colour, int style=SOLID) -> Brush | |
434 | ||
79fccf9d | 435 | Constructs a brush from a `wx.Colour` object and a style. |
d55e5bfc RD |
436 | """ |
437 | newobj = _gdi_.new_Brush(*args, **kwargs) | |
438 | self.this = newobj.this | |
439 | self.thisown = 1 | |
440 | del newobj.thisown | |
441 | def __del__(self, destroy=_gdi_.delete_Brush): | |
442 | """__del__(self)""" | |
443 | try: | |
444 | if self.thisown: destroy(self) | |
445 | except: pass | |
446 | ||
447 | def SetColour(*args, **kwargs): | |
c24da6d6 RD |
448 | """ |
449 | SetColour(self, Colour col) | |
450 | ||
451 | Set the brush's `wx.Colour`. | |
452 | """ | |
d55e5bfc RD |
453 | return _gdi_.Brush_SetColour(*args, **kwargs) |
454 | ||
455 | def SetStyle(*args, **kwargs): | |
c24da6d6 RD |
456 | """ |
457 | SetStyle(self, int style) | |
458 | ||
459 | Sets the style of the brush. See `__init__` for a listing of styles. | |
460 | """ | |
d55e5bfc RD |
461 | return _gdi_.Brush_SetStyle(*args, **kwargs) |
462 | ||
463 | def SetStipple(*args, **kwargs): | |
c24da6d6 RD |
464 | """ |
465 | SetStipple(self, Bitmap stipple) | |
466 | ||
467 | Sets the stipple `wx.Bitmap`. | |
468 | """ | |
d55e5bfc RD |
469 | return _gdi_.Brush_SetStipple(*args, **kwargs) |
470 | ||
471 | def GetColour(*args, **kwargs): | |
c24da6d6 RD |
472 | """ |
473 | GetColour(self) -> Colour | |
474 | ||
475 | Returns the `wx.Colour` of the brush. | |
476 | """ | |
d55e5bfc RD |
477 | return _gdi_.Brush_GetColour(*args, **kwargs) |
478 | ||
479 | def GetStyle(*args, **kwargs): | |
c24da6d6 RD |
480 | """ |
481 | GetStyle(self) -> int | |
482 | ||
483 | Returns the style of the brush. See `__init__` for a listing of | |
484 | styles. | |
485 | """ | |
d55e5bfc RD |
486 | return _gdi_.Brush_GetStyle(*args, **kwargs) |
487 | ||
488 | def GetStipple(*args, **kwargs): | |
c24da6d6 RD |
489 | """ |
490 | GetStipple(self) -> Bitmap | |
491 | ||
492 | Returns the stiple `wx.Bitmap` of the brush. If the brush does not | |
493 | have a wx.STIPPLE style, then the return value may be non-None but an | |
494 | uninitialised bitmap (`wx.Bitmap.Ok` returns False). | |
495 | """ | |
d55e5bfc RD |
496 | return _gdi_.Brush_GetStipple(*args, **kwargs) |
497 | ||
f78cc896 RD |
498 | def IsHatch(*args, **kwargs): |
499 | """ | |
500 | IsHatch(self) -> bool | |
501 | ||
502 | Is the current style a hatch type? | |
503 | """ | |
504 | return _gdi_.Brush_IsHatch(*args, **kwargs) | |
505 | ||
d55e5bfc | 506 | def Ok(*args, **kwargs): |
c24da6d6 RD |
507 | """ |
508 | Ok(self) -> bool | |
509 | ||
510 | Returns True if the brush is initialised and valid. | |
511 | """ | |
d55e5bfc RD |
512 | return _gdi_.Brush_Ok(*args, **kwargs) |
513 | ||
514 | def __nonzero__(self): return self.Ok() | |
515 | ||
516 | class BrushPtr(Brush): | |
517 | def __init__(self, this): | |
518 | self.this = this | |
519 | if not hasattr(self,"thisown"): self.thisown = 0 | |
520 | self.__class__ = Brush | |
521 | _gdi_.Brush_swigregister(BrushPtr) | |
522 | ||
d04418a7 RD |
523 | def BrushFromBitmap(*args, **kwargs): |
524 | """ | |
525 | BrushFromBitmap(Bitmap stippleBitmap) -> Brush | |
526 | ||
527 | Constructs a stippled brush using a bitmap. | |
528 | """ | |
529 | val = _gdi_.new_BrushFromBitmap(*args, **kwargs) | |
530 | val.thisown = 1 | |
531 | return val | |
532 | ||
d55e5bfc | 533 | class Bitmap(GDIObject): |
c24da6d6 RD |
534 | """ |
535 | The wx.Bitmap class encapsulates the concept of a platform-dependent | |
536 | bitmap. It can be either monochrome or colour, and either loaded from | |
537 | a file or created dynamically. A bitmap can be selected into a memory | |
538 | device context (instance of `wx.MemoryDC`). This enables the bitmap to | |
539 | be copied to a window or memory device context using `wx.DC.Blit`, or | |
540 | to be used as a drawing surface. | |
c24da6d6 | 541 | """ |
d55e5bfc RD |
542 | def __repr__(self): |
543 | return "<%s.%s; proxy of C++ wxBitmap instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
544 | def __init__(self, *args, **kwargs): | |
545 | """ | |
546 | __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap | |
547 | ||
548 | Loads a bitmap from a file. | |
549 | """ | |
550 | newobj = _gdi_.new_Bitmap(*args, **kwargs) | |
551 | self.this = newobj.this | |
552 | self.thisown = 1 | |
553 | del newobj.thisown | |
554 | def __del__(self, destroy=_gdi_.delete_Bitmap): | |
555 | """__del__(self)""" | |
556 | try: | |
557 | if self.thisown: destroy(self) | |
558 | except: pass | |
559 | ||
d55e5bfc RD |
560 | def GetHandle(*args, **kwargs): |
561 | """GetHandle(self) -> long""" | |
562 | return _gdi_.Bitmap_GetHandle(*args, **kwargs) | |
563 | ||
564 | def SetHandle(*args, **kwargs): | |
565 | """SetHandle(self, long handle)""" | |
566 | return _gdi_.Bitmap_SetHandle(*args, **kwargs) | |
567 | ||
568 | def Ok(*args, **kwargs): | |
569 | """Ok(self) -> bool""" | |
570 | return _gdi_.Bitmap_Ok(*args, **kwargs) | |
571 | ||
572 | def GetWidth(*args, **kwargs): | |
573 | """ | |
574 | GetWidth(self) -> int | |
575 | ||
576 | Gets the width of the bitmap in pixels. | |
577 | """ | |
578 | return _gdi_.Bitmap_GetWidth(*args, **kwargs) | |
579 | ||
580 | def GetHeight(*args, **kwargs): | |
581 | """ | |
582 | GetHeight(self) -> int | |
583 | ||
584 | Gets the height of the bitmap in pixels. | |
585 | """ | |
586 | return _gdi_.Bitmap_GetHeight(*args, **kwargs) | |
587 | ||
588 | def GetDepth(*args, **kwargs): | |
589 | """ | |
590 | GetDepth(self) -> int | |
591 | ||
592 | Gets the colour depth of the bitmap. A value of 1 indicates a | |
593 | monochrome bitmap. | |
594 | """ | |
595 | return _gdi_.Bitmap_GetDepth(*args, **kwargs) | |
596 | ||
597 | def GetSize(*args, **kwargs): | |
598 | """ | |
599 | GetSize(self) -> Size | |
600 | ||
601 | Get the size of the bitmap. | |
602 | """ | |
603 | return _gdi_.Bitmap_GetSize(*args, **kwargs) | |
604 | ||
605 | def ConvertToImage(*args, **kwargs): | |
606 | """ | |
607 | ConvertToImage(self) -> Image | |
608 | ||
c24da6d6 RD |
609 | Creates a platform-independent image from a platform-dependent |
610 | bitmap. This preserves mask information so that bitmaps and images can | |
611 | be converted back and forth without loss in that respect. | |
d55e5bfc RD |
612 | """ |
613 | return _gdi_.Bitmap_ConvertToImage(*args, **kwargs) | |
614 | ||
615 | def GetMask(*args, **kwargs): | |
616 | """ | |
617 | GetMask(self) -> Mask | |
618 | ||
c24da6d6 RD |
619 | Gets the associated mask (if any) which may have been loaded from a |
620 | file or explpicitly set for the bitmap. | |
621 | ||
622 | :see: `SetMask`, `wx.Mask` | |
623 | ||
d55e5bfc RD |
624 | """ |
625 | return _gdi_.Bitmap_GetMask(*args, **kwargs) | |
626 | ||
627 | def SetMask(*args, **kwargs): | |
628 | """ | |
629 | SetMask(self, Mask mask) | |
630 | ||
631 | Sets the mask for this bitmap. | |
c24da6d6 RD |
632 | |
633 | :see: `GetMask`, `wx.Mask` | |
634 | ||
d55e5bfc RD |
635 | """ |
636 | return _gdi_.Bitmap_SetMask(*args, **kwargs) | |
637 | ||
638 | def SetMaskColour(*args, **kwargs): | |
639 | """ | |
640 | SetMaskColour(self, Colour colour) | |
641 | ||
642 | Create a Mask based on a specified colour in the Bitmap. | |
643 | """ | |
644 | return _gdi_.Bitmap_SetMaskColour(*args, **kwargs) | |
645 | ||
646 | def GetSubBitmap(*args, **kwargs): | |
647 | """ | |
648 | GetSubBitmap(self, Rect rect) -> Bitmap | |
649 | ||
c24da6d6 RD |
650 | Returns a sub-bitmap of the current one as long as the rect belongs |
651 | entirely to the bitmap. This function preserves bit depth and mask | |
652 | information. | |
d55e5bfc RD |
653 | """ |
654 | return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs) | |
655 | ||
656 | def SaveFile(*args, **kwargs): | |
657 | """ | |
c24da6d6 | 658 | SaveFile(self, String name, int type, Palette palette=None) -> bool |
d55e5bfc | 659 | |
c24da6d6 RD |
660 | Saves a bitmap in the named file. See `__init__` for a description of |
661 | the ``type`` parameter. | |
d55e5bfc RD |
662 | """ |
663 | return _gdi_.Bitmap_SaveFile(*args, **kwargs) | |
664 | ||
665 | def LoadFile(*args, **kwargs): | |
666 | """ | |
667 | LoadFile(self, String name, int type) -> bool | |
668 | ||
c24da6d6 RD |
669 | Loads a bitmap from a file. See `__init__` for a description of the |
670 | ``type`` parameter. | |
d55e5bfc RD |
671 | """ |
672 | return _gdi_.Bitmap_LoadFile(*args, **kwargs) | |
673 | ||
c1cb24a4 RD |
674 | def GetPalette(*args, **kwargs): |
675 | """GetPalette(self) -> Palette""" | |
676 | return _gdi_.Bitmap_GetPalette(*args, **kwargs) | |
677 | ||
678 | def SetPalette(*args, **kwargs): | |
679 | """SetPalette(self, Palette palette)""" | |
680 | return _gdi_.Bitmap_SetPalette(*args, **kwargs) | |
681 | ||
d55e5bfc RD |
682 | def CopyFromIcon(*args, **kwargs): |
683 | """CopyFromIcon(self, Icon icon) -> bool""" | |
684 | return _gdi_.Bitmap_CopyFromIcon(*args, **kwargs) | |
685 | ||
686 | def SetHeight(*args, **kwargs): | |
687 | """ | |
688 | SetHeight(self, int height) | |
689 | ||
c24da6d6 | 690 | Set the height property (does not affect the existing bitmap data). |
d55e5bfc RD |
691 | """ |
692 | return _gdi_.Bitmap_SetHeight(*args, **kwargs) | |
693 | ||
694 | def SetWidth(*args, **kwargs): | |
695 | """ | |
696 | SetWidth(self, int width) | |
697 | ||
c24da6d6 | 698 | Set the width property (does not affect the existing bitmap data). |
d55e5bfc RD |
699 | """ |
700 | return _gdi_.Bitmap_SetWidth(*args, **kwargs) | |
701 | ||
702 | def SetDepth(*args, **kwargs): | |
703 | """ | |
704 | SetDepth(self, int depth) | |
705 | ||
c24da6d6 | 706 | Set the depth property (does not affect the existing bitmap data). |
d55e5bfc RD |
707 | """ |
708 | return _gdi_.Bitmap_SetDepth(*args, **kwargs) | |
709 | ||
710 | def SetSize(*args, **kwargs): | |
711 | """ | |
712 | SetSize(self, Size size) | |
713 | ||
c24da6d6 | 714 | Set the bitmap size (does not affect the existing bitmap data). |
d55e5bfc RD |
715 | """ |
716 | return _gdi_.Bitmap_SetSize(*args, **kwargs) | |
717 | ||
718 | def CopyFromCursor(*args, **kwargs): | |
719 | """CopyFromCursor(self, Cursor cursor) -> bool""" | |
720 | return _gdi_.Bitmap_CopyFromCursor(*args, **kwargs) | |
721 | ||
722 | def GetQuality(*args, **kwargs): | |
723 | """GetQuality(self) -> int""" | |
724 | return _gdi_.Bitmap_GetQuality(*args, **kwargs) | |
725 | ||
726 | def SetQuality(*args, **kwargs): | |
727 | """SetQuality(self, int q)""" | |
728 | return _gdi_.Bitmap_SetQuality(*args, **kwargs) | |
729 | ||
730 | def __nonzero__(self): return self.Ok() | |
731 | def __eq__(*args, **kwargs): | |
732 | """__eq__(self, Bitmap other) -> bool""" | |
733 | return _gdi_.Bitmap___eq__(*args, **kwargs) | |
734 | ||
735 | def __ne__(*args, **kwargs): | |
736 | """__ne__(self, Bitmap other) -> bool""" | |
737 | return _gdi_.Bitmap___ne__(*args, **kwargs) | |
738 | ||
739 | ||
740 | class BitmapPtr(Bitmap): | |
741 | def __init__(self, this): | |
742 | self.this = this | |
743 | if not hasattr(self,"thisown"): self.thisown = 0 | |
744 | self.__class__ = Bitmap | |
745 | _gdi_.Bitmap_swigregister(BitmapPtr) | |
746 | ||
c24da6d6 RD |
747 | def EmptyBitmap(*args, **kwargs): |
748 | """ | |
749 | EmptyBitmap(int width, int height, int depth=-1) -> Bitmap | |
750 | ||
751 | Creates a new bitmap of the given size. A depth of -1 indicates the | |
752 | depth of the current screen or visual. Some platforms only support 1 | |
753 | for monochrome and -1 for the current colour setting. | |
754 | """ | |
755 | val = _gdi_.new_EmptyBitmap(*args, **kwargs) | |
756 | val.thisown = 1 | |
757 | return val | |
758 | ||
d55e5bfc RD |
759 | def BitmapFromIcon(*args, **kwargs): |
760 | """ | |
761 | BitmapFromIcon(Icon icon) -> Bitmap | |
762 | ||
c24da6d6 | 763 | Create a new bitmap from a `wx.Icon` object. |
d55e5bfc RD |
764 | """ |
765 | val = _gdi_.new_BitmapFromIcon(*args, **kwargs) | |
766 | val.thisown = 1 | |
767 | return val | |
768 | ||
769 | def BitmapFromImage(*args, **kwargs): | |
770 | """ | |
771 | BitmapFromImage(Image image, int depth=-1) -> Bitmap | |
772 | ||
c24da6d6 RD |
773 | Creates bitmap object from a `wx.Image`. This has to be done to |
774 | actually display a `wx.Image` as you cannot draw an image directly on | |
775 | a window. The resulting bitmap will use the provided colour depth (or | |
776 | that of the current screen colour depth if depth is -1) which entails | |
777 | that a colour reduction may have to take place. | |
d55e5bfc RD |
778 | """ |
779 | val = _gdi_.new_BitmapFromImage(*args, **kwargs) | |
780 | val.thisown = 1 | |
781 | return val | |
782 | ||
783 | def BitmapFromXPMData(*args, **kwargs): | |
784 | """ | |
785 | BitmapFromXPMData(PyObject listOfStrings) -> Bitmap | |
786 | ||
787 | Construct a Bitmap from a list of strings formatted as XPM data. | |
788 | """ | |
789 | val = _gdi_.new_BitmapFromXPMData(*args, **kwargs) | |
790 | val.thisown = 1 | |
791 | return val | |
792 | ||
793 | def BitmapFromBits(*args, **kwargs): | |
794 | """ | |
795 | BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap | |
796 | ||
c24da6d6 RD |
797 | Creates a bitmap from an array of bits. You should only use this |
798 | function for monochrome bitmaps (depth 1) in portable programs: in | |
799 | this case the bits parameter should contain an XBM image. For other | |
800 | bit depths, the behaviour is platform dependent. | |
d55e5bfc RD |
801 | """ |
802 | val = _gdi_.new_BitmapFromBits(*args, **kwargs) | |
803 | val.thisown = 1 | |
804 | return val | |
805 | ||
c24da6d6 | 806 | class Mask(_core.Object): |
d55e5bfc | 807 | """ |
c24da6d6 RD |
808 | This class encapsulates a monochrome mask bitmap, where the masked |
809 | area is black and the unmasked area is white. When associated with a | |
810 | bitmap and drawn in a device context, the unmasked area of the bitmap | |
811 | will be drawn, and the masked area will not be drawn. | |
d55e5bfc | 812 | |
c24da6d6 RD |
813 | A mask may be associated with a `wx.Bitmap`. It is used in |
814 | `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a | |
815 | `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a | |
816 | mask. | |
d55e5bfc RD |
817 | """ |
818 | def __repr__(self): | |
819 | return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
820 | def __init__(self, *args, **kwargs): | |
821 | """ | |
822 | __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask | |
823 | ||
c24da6d6 RD |
824 | Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap |
825 | that indicates the transparent portions of the mask. In other words, | |
826 | the pixels in ``bitmap`` that match ``colour`` will be the transparent | |
827 | portions of the mask. If no ``colour`` or an invalid ``colour`` is | |
828 | passed then BLACK is used. | |
829 | ||
830 | :see: `wx.Bitmap`, `wx.Colour` | |
d55e5bfc RD |
831 | """ |
832 | newobj = _gdi_.new_Mask(*args, **kwargs) | |
833 | self.this = newobj.this | |
834 | self.thisown = 1 | |
835 | del newobj.thisown | |
836 | ||
837 | class MaskPtr(Mask): | |
838 | def __init__(self, this): | |
839 | self.this = this | |
840 | if not hasattr(self,"thisown"): self.thisown = 0 | |
841 | self.__class__ = Mask | |
842 | _gdi_.Mask_swigregister(MaskPtr) | |
843 | ||
c24da6d6 | 844 | MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.") |
d55e5bfc | 845 | class Icon(GDIObject): |
093d3ff1 | 846 | """Proxy of C++ Icon class""" |
d55e5bfc RD |
847 | def __repr__(self): |
848 | return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
849 | def __init__(self, *args, **kwargs): | |
850 | """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon""" | |
851 | newobj = _gdi_.new_Icon(*args, **kwargs) | |
852 | self.this = newobj.this | |
853 | self.thisown = 1 | |
854 | del newobj.thisown | |
855 | def __del__(self, destroy=_gdi_.delete_Icon): | |
856 | """__del__(self)""" | |
857 | try: | |
858 | if self.thisown: destroy(self) | |
859 | except: pass | |
860 | ||
861 | def LoadFile(*args, **kwargs): | |
862 | """LoadFile(self, String name, int type) -> bool""" | |
863 | return _gdi_.Icon_LoadFile(*args, **kwargs) | |
864 | ||
865 | def GetHandle(*args, **kwargs): | |
866 | """GetHandle(self) -> long""" | |
867 | return _gdi_.Icon_GetHandle(*args, **kwargs) | |
868 | ||
869 | def SetHandle(*args, **kwargs): | |
870 | """SetHandle(self, long handle)""" | |
871 | return _gdi_.Icon_SetHandle(*args, **kwargs) | |
872 | ||
873 | def Ok(*args, **kwargs): | |
874 | """Ok(self) -> bool""" | |
875 | return _gdi_.Icon_Ok(*args, **kwargs) | |
876 | ||
877 | def GetWidth(*args, **kwargs): | |
878 | """GetWidth(self) -> int""" | |
879 | return _gdi_.Icon_GetWidth(*args, **kwargs) | |
880 | ||
881 | def GetHeight(*args, **kwargs): | |
882 | """GetHeight(self) -> int""" | |
883 | return _gdi_.Icon_GetHeight(*args, **kwargs) | |
884 | ||
885 | def GetDepth(*args, **kwargs): | |
886 | """GetDepth(self) -> int""" | |
887 | return _gdi_.Icon_GetDepth(*args, **kwargs) | |
888 | ||
889 | def SetWidth(*args, **kwargs): | |
890 | """SetWidth(self, int w)""" | |
891 | return _gdi_.Icon_SetWidth(*args, **kwargs) | |
892 | ||
893 | def SetHeight(*args, **kwargs): | |
894 | """SetHeight(self, int h)""" | |
895 | return _gdi_.Icon_SetHeight(*args, **kwargs) | |
896 | ||
897 | def SetDepth(*args, **kwargs): | |
898 | """SetDepth(self, int d)""" | |
899 | return _gdi_.Icon_SetDepth(*args, **kwargs) | |
900 | ||
901 | def SetSize(*args, **kwargs): | |
902 | """SetSize(self, Size size)""" | |
903 | return _gdi_.Icon_SetSize(*args, **kwargs) | |
904 | ||
905 | def CopyFromBitmap(*args, **kwargs): | |
906 | """CopyFromBitmap(self, Bitmap bmp)""" | |
907 | return _gdi_.Icon_CopyFromBitmap(*args, **kwargs) | |
908 | ||
909 | def __nonzero__(self): return self.Ok() | |
910 | ||
911 | class IconPtr(Icon): | |
912 | def __init__(self, this): | |
913 | self.this = this | |
914 | if not hasattr(self,"thisown"): self.thisown = 0 | |
915 | self.__class__ = Icon | |
916 | _gdi_.Icon_swigregister(IconPtr) | |
917 | ||
918 | def EmptyIcon(*args, **kwargs): | |
919 | """EmptyIcon() -> Icon""" | |
920 | val = _gdi_.new_EmptyIcon(*args, **kwargs) | |
921 | val.thisown = 1 | |
922 | return val | |
923 | ||
924 | def IconFromLocation(*args, **kwargs): | |
925 | """IconFromLocation(IconLocation loc) -> Icon""" | |
926 | val = _gdi_.new_IconFromLocation(*args, **kwargs) | |
927 | val.thisown = 1 | |
928 | return val | |
929 | ||
930 | def IconFromBitmap(*args, **kwargs): | |
931 | """IconFromBitmap(Bitmap bmp) -> Icon""" | |
932 | val = _gdi_.new_IconFromBitmap(*args, **kwargs) | |
933 | val.thisown = 1 | |
934 | return val | |
935 | ||
936 | def IconFromXPMData(*args, **kwargs): | |
937 | """IconFromXPMData(PyObject listOfStrings) -> Icon""" | |
938 | val = _gdi_.new_IconFromXPMData(*args, **kwargs) | |
939 | val.thisown = 1 | |
940 | return val | |
941 | ||
942 | class IconLocation(object): | |
093d3ff1 | 943 | """Proxy of C++ IconLocation class""" |
d55e5bfc RD |
944 | def __repr__(self): |
945 | return "<%s.%s; proxy of C++ wxIconLocation instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
946 | def __init__(self, *args, **kwargs): | |
947 | """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation""" | |
948 | newobj = _gdi_.new_IconLocation(*args, **kwargs) | |
949 | self.this = newobj.this | |
950 | self.thisown = 1 | |
951 | del newobj.thisown | |
952 | def __del__(self, destroy=_gdi_.delete_IconLocation): | |
953 | """__del__(self)""" | |
954 | try: | |
955 | if self.thisown: destroy(self) | |
956 | except: pass | |
957 | ||
958 | def IsOk(*args, **kwargs): | |
959 | """IsOk(self) -> bool""" | |
960 | return _gdi_.IconLocation_IsOk(*args, **kwargs) | |
961 | ||
962 | def __nonzero__(self): return self.Ok() | |
963 | def SetFileName(*args, **kwargs): | |
964 | """SetFileName(self, String filename)""" | |
965 | return _gdi_.IconLocation_SetFileName(*args, **kwargs) | |
966 | ||
967 | def GetFileName(*args, **kwargs): | |
968 | """GetFileName(self) -> String""" | |
969 | return _gdi_.IconLocation_GetFileName(*args, **kwargs) | |
970 | ||
971 | def SetIndex(*args, **kwargs): | |
972 | """SetIndex(self, int num)""" | |
973 | return _gdi_.IconLocation_SetIndex(*args, **kwargs) | |
974 | ||
975 | def GetIndex(*args, **kwargs): | |
976 | """GetIndex(self) -> int""" | |
977 | return _gdi_.IconLocation_GetIndex(*args, **kwargs) | |
978 | ||
979 | ||
980 | class IconLocationPtr(IconLocation): | |
981 | def __init__(self, this): | |
982 | self.this = this | |
983 | if not hasattr(self,"thisown"): self.thisown = 0 | |
984 | self.__class__ = IconLocation | |
985 | _gdi_.IconLocation_swigregister(IconLocationPtr) | |
986 | ||
987 | class IconBundle(object): | |
093d3ff1 | 988 | """Proxy of C++ IconBundle class""" |
d55e5bfc RD |
989 | def __repr__(self): |
990 | return "<%s.%s; proxy of C++ wxIconBundle instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
991 | def __init__(self, *args, **kwargs): | |
992 | """__init__(self) -> IconBundle""" | |
993 | newobj = _gdi_.new_IconBundle(*args, **kwargs) | |
994 | self.this = newobj.this | |
995 | self.thisown = 1 | |
996 | del newobj.thisown | |
997 | def __del__(self, destroy=_gdi_.delete_IconBundle): | |
998 | """__del__(self)""" | |
999 | try: | |
1000 | if self.thisown: destroy(self) | |
1001 | except: pass | |
1002 | ||
1003 | def AddIcon(*args, **kwargs): | |
1004 | """AddIcon(self, Icon icon)""" | |
1005 | return _gdi_.IconBundle_AddIcon(*args, **kwargs) | |
1006 | ||
1007 | def AddIconFromFile(*args, **kwargs): | |
1008 | """AddIconFromFile(self, String file, long type)""" | |
1009 | return _gdi_.IconBundle_AddIconFromFile(*args, **kwargs) | |
1010 | ||
1011 | def GetIcon(*args, **kwargs): | |
1012 | """GetIcon(self, Size size) -> Icon""" | |
1013 | return _gdi_.IconBundle_GetIcon(*args, **kwargs) | |
1014 | ||
1015 | ||
1016 | class IconBundlePtr(IconBundle): | |
1017 | def __init__(self, this): | |
1018 | self.this = this | |
1019 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1020 | self.__class__ = IconBundle | |
1021 | _gdi_.IconBundle_swigregister(IconBundlePtr) | |
1022 | ||
1023 | def IconBundleFromFile(*args, **kwargs): | |
1024 | """IconBundleFromFile(String file, long type) -> IconBundle""" | |
1025 | val = _gdi_.new_IconBundleFromFile(*args, **kwargs) | |
1026 | val.thisown = 1 | |
1027 | return val | |
1028 | ||
1029 | def IconBundleFromIcon(*args, **kwargs): | |
1030 | """IconBundleFromIcon(Icon icon) -> IconBundle""" | |
1031 | val = _gdi_.new_IconBundleFromIcon(*args, **kwargs) | |
1032 | val.thisown = 1 | |
1033 | return val | |
1034 | ||
1035 | class Cursor(GDIObject): | |
1036 | """ | |
79fccf9d RD |
1037 | A cursor is a small bitmap usually used for denoting where the mouse |
1038 | pointer is, with a picture that might indicate the interpretation of a | |
1039 | mouse click. | |
d55e5bfc RD |
1040 | |
1041 | A single cursor object may be used in many windows (any subwindow | |
79fccf9d RD |
1042 | type). The wxWindows convention is to set the cursor for a window, as |
1043 | in X, rather than to set it globally as in MS Windows, although a | |
1044 | global `wx.SetCursor` function is also available for use on MS Windows. | |
1045 | ||
d55e5bfc RD |
1046 | """ |
1047 | def __repr__(self): | |
1048 | return "<%s.%s; proxy of C++ wxCursor instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1049 | def __init__(self, *args, **kwargs): | |
1050 | """ | |
1051 | __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor | |
1052 | ||
1053 | Construct a Cursor from a file. Specify the type of file using | |
fef4c27a | 1054 | wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur |
79fccf9d | 1055 | file. |
d55e5bfc RD |
1056 | """ |
1057 | newobj = _gdi_.new_Cursor(*args, **kwargs) | |
1058 | self.this = newobj.this | |
1059 | self.thisown = 1 | |
1060 | del newobj.thisown | |
1061 | def __del__(self, destroy=_gdi_.delete_Cursor): | |
1062 | """__del__(self)""" | |
1063 | try: | |
1064 | if self.thisown: destroy(self) | |
1065 | except: pass | |
1066 | ||
1067 | def GetHandle(*args, **kwargs): | |
1068 | """ | |
1069 | GetHandle(self) -> long | |
1070 | ||
1071 | Get the MS Windows handle for the cursor | |
1072 | """ | |
1073 | return _gdi_.Cursor_GetHandle(*args, **kwargs) | |
1074 | ||
1075 | def SetHandle(*args, **kwargs): | |
1076 | """ | |
1077 | SetHandle(self, long handle) | |
1078 | ||
1079 | Set the MS Windows handle to use for the cursor | |
1080 | """ | |
1081 | return _gdi_.Cursor_SetHandle(*args, **kwargs) | |
1082 | ||
1083 | def Ok(*args, **kwargs): | |
1084 | """Ok(self) -> bool""" | |
1085 | return _gdi_.Cursor_Ok(*args, **kwargs) | |
1086 | ||
1087 | def __nonzero__(self): return self.Ok() | |
1088 | def GetWidth(*args, **kwargs): | |
1089 | """GetWidth(self) -> int""" | |
1090 | return _gdi_.Cursor_GetWidth(*args, **kwargs) | |
1091 | ||
1092 | def GetHeight(*args, **kwargs): | |
1093 | """GetHeight(self) -> int""" | |
1094 | return _gdi_.Cursor_GetHeight(*args, **kwargs) | |
1095 | ||
1096 | def GetDepth(*args, **kwargs): | |
1097 | """GetDepth(self) -> int""" | |
1098 | return _gdi_.Cursor_GetDepth(*args, **kwargs) | |
1099 | ||
1100 | def SetWidth(*args, **kwargs): | |
1101 | """SetWidth(self, int w)""" | |
1102 | return _gdi_.Cursor_SetWidth(*args, **kwargs) | |
1103 | ||
1104 | def SetHeight(*args, **kwargs): | |
1105 | """SetHeight(self, int h)""" | |
1106 | return _gdi_.Cursor_SetHeight(*args, **kwargs) | |
1107 | ||
1108 | def SetDepth(*args, **kwargs): | |
1109 | """SetDepth(self, int d)""" | |
1110 | return _gdi_.Cursor_SetDepth(*args, **kwargs) | |
1111 | ||
1112 | def SetSize(*args, **kwargs): | |
1113 | """SetSize(self, Size size)""" | |
1114 | return _gdi_.Cursor_SetSize(*args, **kwargs) | |
1115 | ||
1116 | ||
1117 | class CursorPtr(Cursor): | |
1118 | def __init__(self, this): | |
1119 | self.this = this | |
1120 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1121 | self.__class__ = Cursor | |
1122 | _gdi_.Cursor_swigregister(CursorPtr) | |
1123 | ||
1124 | def StockCursor(*args, **kwargs): | |
1125 | """ | |
1126 | StockCursor(int id) -> Cursor | |
1127 | ||
79fccf9d | 1128 | Create a cursor using one of the stock cursors. Note that not all |
fef4c27a | 1129 | stock cursors are available on all platforms. |
d55e5bfc RD |
1130 | """ |
1131 | val = _gdi_.new_StockCursor(*args, **kwargs) | |
1132 | val.thisown = 1 | |
1133 | return val | |
1134 | ||
1135 | def CursorFromImage(*args, **kwargs): | |
1136 | """ | |
1137 | CursorFromImage(Image image) -> Cursor | |
1138 | ||
fef4c27a | 1139 | Constructs a cursor from a `wx.Image`. The mask (if any) will be used |
53aa7709 | 1140 | for setting the transparent portions of the cursor. |
d55e5bfc RD |
1141 | """ |
1142 | val = _gdi_.new_CursorFromImage(*args, **kwargs) | |
1143 | val.thisown = 1 | |
1144 | return val | |
1145 | ||
1146 | #--------------------------------------------------------------------------- | |
1147 | ||
1148 | OutRegion = _gdi_.OutRegion | |
1149 | PartRegion = _gdi_.PartRegion | |
1150 | InRegion = _gdi_.InRegion | |
1151 | class Region(GDIObject): | |
093d3ff1 | 1152 | """Proxy of C++ Region class""" |
d55e5bfc RD |
1153 | def __repr__(self): |
1154 | return "<%s.%s; proxy of C++ wxRegion instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1155 | def __init__(self, *args, **kwargs): | |
1156 | """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region""" | |
1157 | newobj = _gdi_.new_Region(*args, **kwargs) | |
1158 | self.this = newobj.this | |
1159 | self.thisown = 1 | |
1160 | del newobj.thisown | |
1161 | def __del__(self, destroy=_gdi_.delete_Region): | |
1162 | """__del__(self)""" | |
1163 | try: | |
1164 | if self.thisown: destroy(self) | |
1165 | except: pass | |
1166 | ||
1167 | def Clear(*args, **kwargs): | |
1168 | """Clear(self)""" | |
1169 | return _gdi_.Region_Clear(*args, **kwargs) | |
1170 | ||
1171 | def Offset(*args, **kwargs): | |
1172 | """Offset(self, int x, int y) -> bool""" | |
1173 | return _gdi_.Region_Offset(*args, **kwargs) | |
1174 | ||
1175 | def Contains(*args, **kwargs): | |
1176 | """Contains(self, int x, int y) -> int""" | |
1177 | return _gdi_.Region_Contains(*args, **kwargs) | |
1178 | ||
1179 | def ContainsPoint(*args, **kwargs): | |
1180 | """ContainsPoint(self, Point pt) -> int""" | |
1181 | return _gdi_.Region_ContainsPoint(*args, **kwargs) | |
1182 | ||
1183 | def ContainsRect(*args, **kwargs): | |
1184 | """ContainsRect(self, Rect rect) -> int""" | |
1185 | return _gdi_.Region_ContainsRect(*args, **kwargs) | |
1186 | ||
1187 | def ContainsRectDim(*args, **kwargs): | |
1188 | """ContainsRectDim(self, int x, int y, int w, int h) -> int""" | |
1189 | return _gdi_.Region_ContainsRectDim(*args, **kwargs) | |
1190 | ||
1191 | def GetBox(*args, **kwargs): | |
1192 | """GetBox(self) -> Rect""" | |
1193 | return _gdi_.Region_GetBox(*args, **kwargs) | |
1194 | ||
1195 | def Intersect(*args, **kwargs): | |
1196 | """Intersect(self, int x, int y, int width, int height) -> bool""" | |
1197 | return _gdi_.Region_Intersect(*args, **kwargs) | |
1198 | ||
1199 | def IntersectRect(*args, **kwargs): | |
1200 | """IntersectRect(self, Rect rect) -> bool""" | |
1201 | return _gdi_.Region_IntersectRect(*args, **kwargs) | |
1202 | ||
1203 | def IntersectRegion(*args, **kwargs): | |
1204 | """IntersectRegion(self, Region region) -> bool""" | |
1205 | return _gdi_.Region_IntersectRegion(*args, **kwargs) | |
1206 | ||
1207 | def IsEmpty(*args, **kwargs): | |
1208 | """IsEmpty(self) -> bool""" | |
1209 | return _gdi_.Region_IsEmpty(*args, **kwargs) | |
1210 | ||
1211 | def Union(*args, **kwargs): | |
1212 | """Union(self, int x, int y, int width, int height) -> bool""" | |
1213 | return _gdi_.Region_Union(*args, **kwargs) | |
1214 | ||
1215 | def UnionRect(*args, **kwargs): | |
1216 | """UnionRect(self, Rect rect) -> bool""" | |
1217 | return _gdi_.Region_UnionRect(*args, **kwargs) | |
1218 | ||
1219 | def UnionRegion(*args, **kwargs): | |
1220 | """UnionRegion(self, Region region) -> bool""" | |
1221 | return _gdi_.Region_UnionRegion(*args, **kwargs) | |
1222 | ||
1223 | def Subtract(*args, **kwargs): | |
1224 | """Subtract(self, int x, int y, int width, int height) -> bool""" | |
1225 | return _gdi_.Region_Subtract(*args, **kwargs) | |
1226 | ||
1227 | def SubtractRect(*args, **kwargs): | |
1228 | """SubtractRect(self, Rect rect) -> bool""" | |
1229 | return _gdi_.Region_SubtractRect(*args, **kwargs) | |
1230 | ||
1231 | def SubtractRegion(*args, **kwargs): | |
1232 | """SubtractRegion(self, Region region) -> bool""" | |
1233 | return _gdi_.Region_SubtractRegion(*args, **kwargs) | |
1234 | ||
1235 | def Xor(*args, **kwargs): | |
1236 | """Xor(self, int x, int y, int width, int height) -> bool""" | |
1237 | return _gdi_.Region_Xor(*args, **kwargs) | |
1238 | ||
1239 | def XorRect(*args, **kwargs): | |
1240 | """XorRect(self, Rect rect) -> bool""" | |
1241 | return _gdi_.Region_XorRect(*args, **kwargs) | |
1242 | ||
1243 | def XorRegion(*args, **kwargs): | |
1244 | """XorRegion(self, Region region) -> bool""" | |
1245 | return _gdi_.Region_XorRegion(*args, **kwargs) | |
1246 | ||
1247 | def ConvertToBitmap(*args, **kwargs): | |
1248 | """ConvertToBitmap(self) -> Bitmap""" | |
1249 | return _gdi_.Region_ConvertToBitmap(*args, **kwargs) | |
1250 | ||
1251 | def UnionBitmap(*args, **kwargs): | |
a2569024 | 1252 | """UnionBitmap(self, Bitmap bmp) -> bool""" |
d55e5bfc RD |
1253 | return _gdi_.Region_UnionBitmap(*args, **kwargs) |
1254 | ||
a2569024 RD |
1255 | def UnionBitmapColour(*args, **kwargs): |
1256 | """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool""" | |
1257 | return _gdi_.Region_UnionBitmapColour(*args, **kwargs) | |
1258 | ||
d55e5bfc RD |
1259 | |
1260 | class RegionPtr(Region): | |
1261 | def __init__(self, this): | |
1262 | self.this = this | |
1263 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1264 | self.__class__ = Region | |
1265 | _gdi_.Region_swigregister(RegionPtr) | |
1266 | ||
1267 | def RegionFromBitmap(*args, **kwargs): | |
a2569024 | 1268 | """RegionFromBitmap(Bitmap bmp) -> Region""" |
d55e5bfc RD |
1269 | val = _gdi_.new_RegionFromBitmap(*args, **kwargs) |
1270 | val.thisown = 1 | |
1271 | return val | |
1272 | ||
a2569024 RD |
1273 | def RegionFromBitmapColour(*args, **kwargs): |
1274 | """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region""" | |
1275 | val = _gdi_.new_RegionFromBitmapColour(*args, **kwargs) | |
1276 | val.thisown = 1 | |
1277 | return val | |
1278 | ||
d55e5bfc | 1279 | def RegionFromPoints(*args, **kwargs): |
093d3ff1 | 1280 | """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region""" |
d55e5bfc RD |
1281 | val = _gdi_.new_RegionFromPoints(*args, **kwargs) |
1282 | val.thisown = 1 | |
1283 | return val | |
1284 | ||
1285 | class RegionIterator(_core.Object): | |
093d3ff1 | 1286 | """Proxy of C++ RegionIterator class""" |
d55e5bfc RD |
1287 | def __repr__(self): |
1288 | return "<%s.%s; proxy of C++ wxRegionIterator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1289 | def __init__(self, *args, **kwargs): | |
1290 | """__init__(self, Region region) -> RegionIterator""" | |
1291 | newobj = _gdi_.new_RegionIterator(*args, **kwargs) | |
1292 | self.this = newobj.this | |
1293 | self.thisown = 1 | |
1294 | del newobj.thisown | |
1295 | def __del__(self, destroy=_gdi_.delete_RegionIterator): | |
1296 | """__del__(self)""" | |
1297 | try: | |
1298 | if self.thisown: destroy(self) | |
1299 | except: pass | |
1300 | ||
1301 | def GetX(*args, **kwargs): | |
1302 | """GetX(self) -> int""" | |
1303 | return _gdi_.RegionIterator_GetX(*args, **kwargs) | |
1304 | ||
1305 | def GetY(*args, **kwargs): | |
1306 | """GetY(self) -> int""" | |
1307 | return _gdi_.RegionIterator_GetY(*args, **kwargs) | |
1308 | ||
1309 | def GetW(*args, **kwargs): | |
1310 | """GetW(self) -> int""" | |
1311 | return _gdi_.RegionIterator_GetW(*args, **kwargs) | |
1312 | ||
1313 | def GetWidth(*args, **kwargs): | |
1314 | """GetWidth(self) -> int""" | |
1315 | return _gdi_.RegionIterator_GetWidth(*args, **kwargs) | |
1316 | ||
1317 | def GetH(*args, **kwargs): | |
1318 | """GetH(self) -> int""" | |
1319 | return _gdi_.RegionIterator_GetH(*args, **kwargs) | |
1320 | ||
1321 | def GetHeight(*args, **kwargs): | |
1322 | """GetHeight(self) -> int""" | |
1323 | return _gdi_.RegionIterator_GetHeight(*args, **kwargs) | |
1324 | ||
1325 | def GetRect(*args, **kwargs): | |
1326 | """GetRect(self) -> Rect""" | |
1327 | return _gdi_.RegionIterator_GetRect(*args, **kwargs) | |
1328 | ||
1329 | def HaveRects(*args, **kwargs): | |
1330 | """HaveRects(self) -> bool""" | |
1331 | return _gdi_.RegionIterator_HaveRects(*args, **kwargs) | |
1332 | ||
1333 | def Reset(*args, **kwargs): | |
1334 | """Reset(self)""" | |
1335 | return _gdi_.RegionIterator_Reset(*args, **kwargs) | |
1336 | ||
1337 | def Next(*args, **kwargs): | |
1338 | """Next(self)""" | |
1339 | return _gdi_.RegionIterator_Next(*args, **kwargs) | |
1340 | ||
1341 | def __nonzero__(*args, **kwargs): | |
1342 | """__nonzero__(self) -> bool""" | |
1343 | return _gdi_.RegionIterator___nonzero__(*args, **kwargs) | |
1344 | ||
1345 | ||
1346 | class RegionIteratorPtr(RegionIterator): | |
1347 | def __init__(self, this): | |
1348 | self.this = this | |
1349 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1350 | self.__class__ = RegionIterator | |
1351 | _gdi_.RegionIterator_swigregister(RegionIteratorPtr) | |
1352 | ||
1353 | #--------------------------------------------------------------------------- | |
1354 | ||
1355 | FONTFAMILY_DEFAULT = _gdi_.FONTFAMILY_DEFAULT | |
1356 | FONTFAMILY_DECORATIVE = _gdi_.FONTFAMILY_DECORATIVE | |
1357 | FONTFAMILY_ROMAN = _gdi_.FONTFAMILY_ROMAN | |
1358 | FONTFAMILY_SCRIPT = _gdi_.FONTFAMILY_SCRIPT | |
1359 | FONTFAMILY_SWISS = _gdi_.FONTFAMILY_SWISS | |
1360 | FONTFAMILY_MODERN = _gdi_.FONTFAMILY_MODERN | |
1361 | FONTFAMILY_TELETYPE = _gdi_.FONTFAMILY_TELETYPE | |
1362 | FONTFAMILY_MAX = _gdi_.FONTFAMILY_MAX | |
1363 | FONTFAMILY_UNKNOWN = _gdi_.FONTFAMILY_UNKNOWN | |
1364 | FONTSTYLE_NORMAL = _gdi_.FONTSTYLE_NORMAL | |
1365 | FONTSTYLE_ITALIC = _gdi_.FONTSTYLE_ITALIC | |
1366 | FONTSTYLE_SLANT = _gdi_.FONTSTYLE_SLANT | |
1367 | FONTSTYLE_MAX = _gdi_.FONTSTYLE_MAX | |
1368 | FONTWEIGHT_NORMAL = _gdi_.FONTWEIGHT_NORMAL | |
1369 | FONTWEIGHT_LIGHT = _gdi_.FONTWEIGHT_LIGHT | |
1370 | FONTWEIGHT_BOLD = _gdi_.FONTWEIGHT_BOLD | |
1371 | FONTWEIGHT_MAX = _gdi_.FONTWEIGHT_MAX | |
1372 | FONTFLAG_DEFAULT = _gdi_.FONTFLAG_DEFAULT | |
1373 | FONTFLAG_ITALIC = _gdi_.FONTFLAG_ITALIC | |
1374 | FONTFLAG_SLANT = _gdi_.FONTFLAG_SLANT | |
1375 | FONTFLAG_LIGHT = _gdi_.FONTFLAG_LIGHT | |
1376 | FONTFLAG_BOLD = _gdi_.FONTFLAG_BOLD | |
1377 | FONTFLAG_ANTIALIASED = _gdi_.FONTFLAG_ANTIALIASED | |
1378 | FONTFLAG_NOT_ANTIALIASED = _gdi_.FONTFLAG_NOT_ANTIALIASED | |
1379 | FONTFLAG_UNDERLINED = _gdi_.FONTFLAG_UNDERLINED | |
1380 | FONTFLAG_STRIKETHROUGH = _gdi_.FONTFLAG_STRIKETHROUGH | |
1381 | FONTFLAG_MASK = _gdi_.FONTFLAG_MASK | |
1382 | FONTENCODING_SYSTEM = _gdi_.FONTENCODING_SYSTEM | |
1383 | FONTENCODING_DEFAULT = _gdi_.FONTENCODING_DEFAULT | |
1384 | FONTENCODING_ISO8859_1 = _gdi_.FONTENCODING_ISO8859_1 | |
1385 | FONTENCODING_ISO8859_2 = _gdi_.FONTENCODING_ISO8859_2 | |
1386 | FONTENCODING_ISO8859_3 = _gdi_.FONTENCODING_ISO8859_3 | |
1387 | FONTENCODING_ISO8859_4 = _gdi_.FONTENCODING_ISO8859_4 | |
1388 | FONTENCODING_ISO8859_5 = _gdi_.FONTENCODING_ISO8859_5 | |
1389 | FONTENCODING_ISO8859_6 = _gdi_.FONTENCODING_ISO8859_6 | |
1390 | FONTENCODING_ISO8859_7 = _gdi_.FONTENCODING_ISO8859_7 | |
1391 | FONTENCODING_ISO8859_8 = _gdi_.FONTENCODING_ISO8859_8 | |
1392 | FONTENCODING_ISO8859_9 = _gdi_.FONTENCODING_ISO8859_9 | |
1393 | FONTENCODING_ISO8859_10 = _gdi_.FONTENCODING_ISO8859_10 | |
1394 | FONTENCODING_ISO8859_11 = _gdi_.FONTENCODING_ISO8859_11 | |
1395 | FONTENCODING_ISO8859_12 = _gdi_.FONTENCODING_ISO8859_12 | |
1396 | FONTENCODING_ISO8859_13 = _gdi_.FONTENCODING_ISO8859_13 | |
1397 | FONTENCODING_ISO8859_14 = _gdi_.FONTENCODING_ISO8859_14 | |
1398 | FONTENCODING_ISO8859_15 = _gdi_.FONTENCODING_ISO8859_15 | |
1399 | FONTENCODING_ISO8859_MAX = _gdi_.FONTENCODING_ISO8859_MAX | |
1400 | FONTENCODING_KOI8 = _gdi_.FONTENCODING_KOI8 | |
1401 | FONTENCODING_KOI8_U = _gdi_.FONTENCODING_KOI8_U | |
1402 | FONTENCODING_ALTERNATIVE = _gdi_.FONTENCODING_ALTERNATIVE | |
1403 | FONTENCODING_BULGARIAN = _gdi_.FONTENCODING_BULGARIAN | |
1404 | FONTENCODING_CP437 = _gdi_.FONTENCODING_CP437 | |
1405 | FONTENCODING_CP850 = _gdi_.FONTENCODING_CP850 | |
1406 | FONTENCODING_CP852 = _gdi_.FONTENCODING_CP852 | |
1407 | FONTENCODING_CP855 = _gdi_.FONTENCODING_CP855 | |
1408 | FONTENCODING_CP866 = _gdi_.FONTENCODING_CP866 | |
1409 | FONTENCODING_CP874 = _gdi_.FONTENCODING_CP874 | |
1410 | FONTENCODING_CP932 = _gdi_.FONTENCODING_CP932 | |
1411 | FONTENCODING_CP936 = _gdi_.FONTENCODING_CP936 | |
1412 | FONTENCODING_CP949 = _gdi_.FONTENCODING_CP949 | |
1413 | FONTENCODING_CP950 = _gdi_.FONTENCODING_CP950 | |
1414 | FONTENCODING_CP1250 = _gdi_.FONTENCODING_CP1250 | |
1415 | FONTENCODING_CP1251 = _gdi_.FONTENCODING_CP1251 | |
1416 | FONTENCODING_CP1252 = _gdi_.FONTENCODING_CP1252 | |
1417 | FONTENCODING_CP1253 = _gdi_.FONTENCODING_CP1253 | |
1418 | FONTENCODING_CP1254 = _gdi_.FONTENCODING_CP1254 | |
1419 | FONTENCODING_CP1255 = _gdi_.FONTENCODING_CP1255 | |
1420 | FONTENCODING_CP1256 = _gdi_.FONTENCODING_CP1256 | |
1421 | FONTENCODING_CP1257 = _gdi_.FONTENCODING_CP1257 | |
1422 | FONTENCODING_CP12_MAX = _gdi_.FONTENCODING_CP12_MAX | |
1423 | FONTENCODING_UTF7 = _gdi_.FONTENCODING_UTF7 | |
1424 | FONTENCODING_UTF8 = _gdi_.FONTENCODING_UTF8 | |
1425 | FONTENCODING_EUC_JP = _gdi_.FONTENCODING_EUC_JP | |
1426 | FONTENCODING_UTF16BE = _gdi_.FONTENCODING_UTF16BE | |
1427 | FONTENCODING_UTF16LE = _gdi_.FONTENCODING_UTF16LE | |
1428 | FONTENCODING_UTF32BE = _gdi_.FONTENCODING_UTF32BE | |
1429 | FONTENCODING_UTF32LE = _gdi_.FONTENCODING_UTF32LE | |
1430 | FONTENCODING_MACROMAN = _gdi_.FONTENCODING_MACROMAN | |
1431 | FONTENCODING_MACJAPANESE = _gdi_.FONTENCODING_MACJAPANESE | |
1432 | FONTENCODING_MACCHINESETRAD = _gdi_.FONTENCODING_MACCHINESETRAD | |
1433 | FONTENCODING_MACKOREAN = _gdi_.FONTENCODING_MACKOREAN | |
1434 | FONTENCODING_MACARABIC = _gdi_.FONTENCODING_MACARABIC | |
1435 | FONTENCODING_MACHEBREW = _gdi_.FONTENCODING_MACHEBREW | |
1436 | FONTENCODING_MACGREEK = _gdi_.FONTENCODING_MACGREEK | |
1437 | FONTENCODING_MACCYRILLIC = _gdi_.FONTENCODING_MACCYRILLIC | |
1438 | FONTENCODING_MACDEVANAGARI = _gdi_.FONTENCODING_MACDEVANAGARI | |
1439 | FONTENCODING_MACGURMUKHI = _gdi_.FONTENCODING_MACGURMUKHI | |
1440 | FONTENCODING_MACGUJARATI = _gdi_.FONTENCODING_MACGUJARATI | |
1441 | FONTENCODING_MACORIYA = _gdi_.FONTENCODING_MACORIYA | |
1442 | FONTENCODING_MACBENGALI = _gdi_.FONTENCODING_MACBENGALI | |
1443 | FONTENCODING_MACTAMIL = _gdi_.FONTENCODING_MACTAMIL | |
1444 | FONTENCODING_MACTELUGU = _gdi_.FONTENCODING_MACTELUGU | |
1445 | FONTENCODING_MACKANNADA = _gdi_.FONTENCODING_MACKANNADA | |
1446 | FONTENCODING_MACMALAJALAM = _gdi_.FONTENCODING_MACMALAJALAM | |
1447 | FONTENCODING_MACSINHALESE = _gdi_.FONTENCODING_MACSINHALESE | |
1448 | FONTENCODING_MACBURMESE = _gdi_.FONTENCODING_MACBURMESE | |
1449 | FONTENCODING_MACKHMER = _gdi_.FONTENCODING_MACKHMER | |
1450 | FONTENCODING_MACTHAI = _gdi_.FONTENCODING_MACTHAI | |
1451 | FONTENCODING_MACLAOTIAN = _gdi_.FONTENCODING_MACLAOTIAN | |
1452 | FONTENCODING_MACGEORGIAN = _gdi_.FONTENCODING_MACGEORGIAN | |
1453 | FONTENCODING_MACARMENIAN = _gdi_.FONTENCODING_MACARMENIAN | |
1454 | FONTENCODING_MACCHINESESIMP = _gdi_.FONTENCODING_MACCHINESESIMP | |
1455 | FONTENCODING_MACTIBETAN = _gdi_.FONTENCODING_MACTIBETAN | |
1456 | FONTENCODING_MACMONGOLIAN = _gdi_.FONTENCODING_MACMONGOLIAN | |
1457 | FONTENCODING_MACETHIOPIC = _gdi_.FONTENCODING_MACETHIOPIC | |
1458 | FONTENCODING_MACCENTRALEUR = _gdi_.FONTENCODING_MACCENTRALEUR | |
1459 | FONTENCODING_MACVIATNAMESE = _gdi_.FONTENCODING_MACVIATNAMESE | |
1460 | FONTENCODING_MACARABICEXT = _gdi_.FONTENCODING_MACARABICEXT | |
1461 | FONTENCODING_MACSYMBOL = _gdi_.FONTENCODING_MACSYMBOL | |
1462 | FONTENCODING_MACDINGBATS = _gdi_.FONTENCODING_MACDINGBATS | |
1463 | FONTENCODING_MACTURKISH = _gdi_.FONTENCODING_MACTURKISH | |
1464 | FONTENCODING_MACCROATIAN = _gdi_.FONTENCODING_MACCROATIAN | |
1465 | FONTENCODING_MACICELANDIC = _gdi_.FONTENCODING_MACICELANDIC | |
1466 | FONTENCODING_MACROMANIAN = _gdi_.FONTENCODING_MACROMANIAN | |
1467 | FONTENCODING_MACCELTIC = _gdi_.FONTENCODING_MACCELTIC | |
1468 | FONTENCODING_MACGAELIC = _gdi_.FONTENCODING_MACGAELIC | |
1469 | FONTENCODING_MACKEYBOARD = _gdi_.FONTENCODING_MACKEYBOARD | |
1470 | FONTENCODING_MACMIN = _gdi_.FONTENCODING_MACMIN | |
1471 | FONTENCODING_MACMAX = _gdi_.FONTENCODING_MACMAX | |
1472 | FONTENCODING_MAX = _gdi_.FONTENCODING_MAX | |
1473 | FONTENCODING_UTF16 = _gdi_.FONTENCODING_UTF16 | |
1474 | FONTENCODING_UTF32 = _gdi_.FONTENCODING_UTF32 | |
1475 | FONTENCODING_UNICODE = _gdi_.FONTENCODING_UNICODE | |
1476 | FONTENCODING_GB2312 = _gdi_.FONTENCODING_GB2312 | |
1477 | FONTENCODING_BIG5 = _gdi_.FONTENCODING_BIG5 | |
1478 | FONTENCODING_SHIFT_JIS = _gdi_.FONTENCODING_SHIFT_JIS | |
1479 | #--------------------------------------------------------------------------- | |
1480 | ||
1481 | class NativeFontInfo(object): | |
093d3ff1 | 1482 | """Proxy of C++ NativeFontInfo class""" |
d55e5bfc RD |
1483 | def __repr__(self): |
1484 | return "<%s.%s; proxy of C++ wxNativeFontInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1485 | def __init__(self, *args, **kwargs): | |
1486 | """__init__(self) -> NativeFontInfo""" | |
1487 | newobj = _gdi_.new_NativeFontInfo(*args, **kwargs) | |
1488 | self.this = newobj.this | |
1489 | self.thisown = 1 | |
1490 | del newobj.thisown | |
1491 | def __del__(self, destroy=_gdi_.delete_NativeFontInfo): | |
1492 | """__del__(self)""" | |
1493 | try: | |
1494 | if self.thisown: destroy(self) | |
1495 | except: pass | |
1496 | ||
1497 | def Init(*args, **kwargs): | |
1498 | """Init(self)""" | |
1499 | return _gdi_.NativeFontInfo_Init(*args, **kwargs) | |
1500 | ||
1501 | def InitFromFont(*args, **kwargs): | |
1502 | """InitFromFont(self, Font font)""" | |
1503 | return _gdi_.NativeFontInfo_InitFromFont(*args, **kwargs) | |
1504 | ||
1505 | def GetPointSize(*args, **kwargs): | |
1506 | """GetPointSize(self) -> int""" | |
1507 | return _gdi_.NativeFontInfo_GetPointSize(*args, **kwargs) | |
1508 | ||
5e483524 RD |
1509 | def GetPixelSize(*args, **kwargs): |
1510 | """GetPixelSize(self) -> Size""" | |
1511 | return _gdi_.NativeFontInfo_GetPixelSize(*args, **kwargs) | |
1512 | ||
d55e5bfc RD |
1513 | def GetStyle(*args, **kwargs): |
1514 | """GetStyle(self) -> int""" | |
1515 | return _gdi_.NativeFontInfo_GetStyle(*args, **kwargs) | |
1516 | ||
1517 | def GetWeight(*args, **kwargs): | |
1518 | """GetWeight(self) -> int""" | |
1519 | return _gdi_.NativeFontInfo_GetWeight(*args, **kwargs) | |
1520 | ||
1521 | def GetUnderlined(*args, **kwargs): | |
1522 | """GetUnderlined(self) -> bool""" | |
1523 | return _gdi_.NativeFontInfo_GetUnderlined(*args, **kwargs) | |
1524 | ||
1525 | def GetFaceName(*args, **kwargs): | |
1526 | """GetFaceName(self) -> String""" | |
1527 | return _gdi_.NativeFontInfo_GetFaceName(*args, **kwargs) | |
1528 | ||
1529 | def GetFamily(*args, **kwargs): | |
1530 | """GetFamily(self) -> int""" | |
1531 | return _gdi_.NativeFontInfo_GetFamily(*args, **kwargs) | |
1532 | ||
1533 | def GetEncoding(*args, **kwargs): | |
1534 | """GetEncoding(self) -> int""" | |
1535 | return _gdi_.NativeFontInfo_GetEncoding(*args, **kwargs) | |
1536 | ||
1537 | def SetPointSize(*args, **kwargs): | |
1538 | """SetPointSize(self, int pointsize)""" | |
1539 | return _gdi_.NativeFontInfo_SetPointSize(*args, **kwargs) | |
1540 | ||
5e483524 RD |
1541 | def SetPixelSize(*args, **kwargs): |
1542 | """SetPixelSize(self, Size pixelSize)""" | |
1543 | return _gdi_.NativeFontInfo_SetPixelSize(*args, **kwargs) | |
1544 | ||
d55e5bfc RD |
1545 | def SetStyle(*args, **kwargs): |
1546 | """SetStyle(self, int style)""" | |
1547 | return _gdi_.NativeFontInfo_SetStyle(*args, **kwargs) | |
1548 | ||
1549 | def SetWeight(*args, **kwargs): | |
1550 | """SetWeight(self, int weight)""" | |
1551 | return _gdi_.NativeFontInfo_SetWeight(*args, **kwargs) | |
1552 | ||
1553 | def SetUnderlined(*args, **kwargs): | |
1554 | """SetUnderlined(self, bool underlined)""" | |
1555 | return _gdi_.NativeFontInfo_SetUnderlined(*args, **kwargs) | |
1556 | ||
1557 | def SetFaceName(*args, **kwargs): | |
1558 | """SetFaceName(self, String facename)""" | |
1559 | return _gdi_.NativeFontInfo_SetFaceName(*args, **kwargs) | |
1560 | ||
1561 | def SetFamily(*args, **kwargs): | |
1562 | """SetFamily(self, int family)""" | |
1563 | return _gdi_.NativeFontInfo_SetFamily(*args, **kwargs) | |
1564 | ||
1565 | def SetEncoding(*args, **kwargs): | |
1566 | """SetEncoding(self, int encoding)""" | |
1567 | return _gdi_.NativeFontInfo_SetEncoding(*args, **kwargs) | |
1568 | ||
1569 | def FromString(*args, **kwargs): | |
1570 | """FromString(self, String s) -> bool""" | |
1571 | return _gdi_.NativeFontInfo_FromString(*args, **kwargs) | |
1572 | ||
1573 | def ToString(*args, **kwargs): | |
1574 | """ToString(self) -> String""" | |
1575 | return _gdi_.NativeFontInfo_ToString(*args, **kwargs) | |
1576 | ||
1577 | def __str__(*args, **kwargs): | |
1578 | """__str__(self) -> String""" | |
1579 | return _gdi_.NativeFontInfo___str__(*args, **kwargs) | |
1580 | ||
1581 | def FromUserString(*args, **kwargs): | |
1582 | """FromUserString(self, String s) -> bool""" | |
1583 | return _gdi_.NativeFontInfo_FromUserString(*args, **kwargs) | |
1584 | ||
1585 | def ToUserString(*args, **kwargs): | |
1586 | """ToUserString(self) -> String""" | |
1587 | return _gdi_.NativeFontInfo_ToUserString(*args, **kwargs) | |
1588 | ||
1589 | ||
1590 | class NativeFontInfoPtr(NativeFontInfo): | |
1591 | def __init__(self, this): | |
1592 | self.this = this | |
1593 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1594 | self.__class__ = NativeFontInfo | |
1595 | _gdi_.NativeFontInfo_swigregister(NativeFontInfoPtr) | |
1596 | ||
1597 | class NativeEncodingInfo(object): | |
093d3ff1 | 1598 | """Proxy of C++ NativeEncodingInfo class""" |
d55e5bfc RD |
1599 | def __repr__(self): |
1600 | return "<%s.%s; proxy of C++ wxNativeEncodingInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1601 | facename = property(_gdi_.NativeEncodingInfo_facename_get, _gdi_.NativeEncodingInfo_facename_set) | |
1602 | encoding = property(_gdi_.NativeEncodingInfo_encoding_get, _gdi_.NativeEncodingInfo_encoding_set) | |
1603 | def __init__(self, *args, **kwargs): | |
1604 | """__init__(self) -> NativeEncodingInfo""" | |
1605 | newobj = _gdi_.new_NativeEncodingInfo(*args, **kwargs) | |
1606 | self.this = newobj.this | |
1607 | self.thisown = 1 | |
1608 | del newobj.thisown | |
1609 | def __del__(self, destroy=_gdi_.delete_NativeEncodingInfo): | |
1610 | """__del__(self)""" | |
1611 | try: | |
1612 | if self.thisown: destroy(self) | |
1613 | except: pass | |
1614 | ||
1615 | def FromString(*args, **kwargs): | |
1616 | """FromString(self, String s) -> bool""" | |
1617 | return _gdi_.NativeEncodingInfo_FromString(*args, **kwargs) | |
1618 | ||
1619 | def ToString(*args, **kwargs): | |
1620 | """ToString(self) -> String""" | |
1621 | return _gdi_.NativeEncodingInfo_ToString(*args, **kwargs) | |
1622 | ||
1623 | ||
1624 | class NativeEncodingInfoPtr(NativeEncodingInfo): | |
1625 | def __init__(self, this): | |
1626 | self.this = this | |
1627 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1628 | self.__class__ = NativeEncodingInfo | |
1629 | _gdi_.NativeEncodingInfo_swigregister(NativeEncodingInfoPtr) | |
1630 | ||
1631 | ||
1632 | def GetNativeFontEncoding(*args, **kwargs): | |
1633 | """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo""" | |
1634 | return _gdi_.GetNativeFontEncoding(*args, **kwargs) | |
1635 | ||
1636 | def TestFontEncoding(*args, **kwargs): | |
1637 | """TestFontEncoding(NativeEncodingInfo info) -> bool""" | |
1638 | return _gdi_.TestFontEncoding(*args, **kwargs) | |
1639 | #--------------------------------------------------------------------------- | |
1640 | ||
1641 | class FontMapper(object): | |
093d3ff1 | 1642 | """Proxy of C++ FontMapper class""" |
d55e5bfc RD |
1643 | def __repr__(self): |
1644 | return "<%s.%s; proxy of C++ wxFontMapper instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1645 | def __init__(self, *args, **kwargs): | |
1646 | """__init__(self) -> FontMapper""" | |
1647 | newobj = _gdi_.new_FontMapper(*args, **kwargs) | |
1648 | self.this = newobj.this | |
1649 | self.thisown = 1 | |
1650 | del newobj.thisown | |
1651 | def __del__(self, destroy=_gdi_.delete_FontMapper): | |
1652 | """__del__(self)""" | |
1653 | try: | |
1654 | if self.thisown: destroy(self) | |
1655 | except: pass | |
1656 | ||
1657 | def Get(*args, **kwargs): | |
c24da6d6 | 1658 | """Get() -> FontMapper""" |
d55e5bfc RD |
1659 | return _gdi_.FontMapper_Get(*args, **kwargs) |
1660 | ||
1661 | Get = staticmethod(Get) | |
1662 | def Set(*args, **kwargs): | |
c24da6d6 | 1663 | """Set(FontMapper mapper) -> FontMapper""" |
d55e5bfc RD |
1664 | return _gdi_.FontMapper_Set(*args, **kwargs) |
1665 | ||
1666 | Set = staticmethod(Set) | |
1667 | def CharsetToEncoding(*args, **kwargs): | |
1668 | """CharsetToEncoding(self, String charset, bool interactive=True) -> int""" | |
1669 | return _gdi_.FontMapper_CharsetToEncoding(*args, **kwargs) | |
1670 | ||
1671 | def GetSupportedEncodingsCount(*args, **kwargs): | |
c24da6d6 | 1672 | """GetSupportedEncodingsCount() -> size_t""" |
d55e5bfc RD |
1673 | return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs) |
1674 | ||
1675 | GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount) | |
1676 | def GetEncoding(*args, **kwargs): | |
c24da6d6 | 1677 | """GetEncoding(size_t n) -> int""" |
d55e5bfc RD |
1678 | return _gdi_.FontMapper_GetEncoding(*args, **kwargs) |
1679 | ||
1680 | GetEncoding = staticmethod(GetEncoding) | |
1681 | def GetEncodingName(*args, **kwargs): | |
c24da6d6 | 1682 | """GetEncodingName(int encoding) -> String""" |
d55e5bfc RD |
1683 | return _gdi_.FontMapper_GetEncodingName(*args, **kwargs) |
1684 | ||
1685 | GetEncodingName = staticmethod(GetEncodingName) | |
1686 | def GetEncodingDescription(*args, **kwargs): | |
c24da6d6 | 1687 | """GetEncodingDescription(int encoding) -> String""" |
d55e5bfc RD |
1688 | return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs) |
1689 | ||
1690 | GetEncodingDescription = staticmethod(GetEncodingDescription) | |
1691 | def GetEncodingFromName(*args, **kwargs): | |
c24da6d6 | 1692 | """GetEncodingFromName(String name) -> int""" |
d55e5bfc RD |
1693 | return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs) |
1694 | ||
1695 | GetEncodingFromName = staticmethod(GetEncodingFromName) | |
1696 | def SetConfig(*args, **kwargs): | |
1697 | """SetConfig(self, ConfigBase config)""" | |
1698 | return _gdi_.FontMapper_SetConfig(*args, **kwargs) | |
1699 | ||
1700 | def SetConfigPath(*args, **kwargs): | |
1701 | """SetConfigPath(self, String prefix)""" | |
1702 | return _gdi_.FontMapper_SetConfigPath(*args, **kwargs) | |
1703 | ||
1704 | def GetDefaultConfigPath(*args, **kwargs): | |
c24da6d6 | 1705 | """GetDefaultConfigPath() -> String""" |
d55e5bfc RD |
1706 | return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs) |
1707 | ||
1708 | GetDefaultConfigPath = staticmethod(GetDefaultConfigPath) | |
1709 | def GetAltForEncoding(*args, **kwargs): | |
1710 | """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject""" | |
1711 | return _gdi_.FontMapper_GetAltForEncoding(*args, **kwargs) | |
1712 | ||
1713 | def IsEncodingAvailable(*args, **kwargs): | |
1714 | """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool""" | |
1715 | return _gdi_.FontMapper_IsEncodingAvailable(*args, **kwargs) | |
1716 | ||
1717 | def SetDialogParent(*args, **kwargs): | |
1718 | """SetDialogParent(self, Window parent)""" | |
1719 | return _gdi_.FontMapper_SetDialogParent(*args, **kwargs) | |
1720 | ||
1721 | def SetDialogTitle(*args, **kwargs): | |
1722 | """SetDialogTitle(self, String title)""" | |
1723 | return _gdi_.FontMapper_SetDialogTitle(*args, **kwargs) | |
1724 | ||
1725 | ||
1726 | class FontMapperPtr(FontMapper): | |
1727 | def __init__(self, this): | |
1728 | self.this = this | |
1729 | if not hasattr(self,"thisown"): self.thisown = 0 | |
1730 | self.__class__ = FontMapper | |
1731 | _gdi_.FontMapper_swigregister(FontMapperPtr) | |
1732 | ||
1733 | def FontMapper_Get(*args, **kwargs): | |
1734 | """FontMapper_Get() -> FontMapper""" | |
1735 | return _gdi_.FontMapper_Get(*args, **kwargs) | |
1736 | ||
1737 | def FontMapper_Set(*args, **kwargs): | |
1738 | """FontMapper_Set(FontMapper mapper) -> FontMapper""" | |
1739 | return _gdi_.FontMapper_Set(*args, **kwargs) | |
1740 | ||
1741 | def FontMapper_GetSupportedEncodingsCount(*args, **kwargs): | |
1742 | """FontMapper_GetSupportedEncodingsCount() -> size_t""" | |
1743 | return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs) | |
1744 | ||
1745 | def FontMapper_GetEncoding(*args, **kwargs): | |
1746 | """FontMapper_GetEncoding(size_t n) -> int""" | |
1747 | return _gdi_.FontMapper_GetEncoding(*args, **kwargs) | |
1748 | ||
1749 | def FontMapper_GetEncodingName(*args, **kwargs): | |
1750 | """FontMapper_GetEncodingName(int encoding) -> String""" | |
1751 | return _gdi_.FontMapper_GetEncodingName(*args, **kwargs) | |
1752 | ||
1753 | def FontMapper_GetEncodingDescription(*args, **kwargs): | |
1754 | """FontMapper_GetEncodingDescription(int encoding) -> String""" | |
1755 | return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs) | |
1756 | ||
1757 | def FontMapper_GetEncodingFromName(*args, **kwargs): | |
1758 | """FontMapper_GetEncodingFromName(String name) -> int""" | |
1759 | return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs) | |
1760 | ||
1761 | def FontMapper_GetDefaultConfigPath(*args, **kwargs): | |
1762 | """FontMapper_GetDefaultConfigPath() -> String""" | |
1763 | return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs) | |
1764 | ||
1765 | #--------------------------------------------------------------------------- | |
1766 | ||
1767 | class Font(GDIObject): | |
a97cefba RD |
1768 | """ |
1769 | A font is an object which determines the appearance of text. Fonts are | |
1770 | used for drawing text to a device context, and setting the appearance | |
1771 | of a window's text. | |
1772 | ||
1773 | You can retrieve the current system font settings with `wx.SystemSettings`. | |
1774 | """ | |
d55e5bfc RD |
1775 | def __repr__(self): |
1776 | return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
1777 | def __init__(self, *args, **kwargs): | |
1778 | """ | |
1779 | __init__(self, int pointSize, int family, int style, int weight, bool underline=False, | |
1780 | String face=EmptyString, | |
1781 | int encoding=FONTENCODING_DEFAULT) -> Font | |
a97cefba RD |
1782 | |
1783 | Creates a font object with the specified attributes. | |
1784 | ||
1785 | :param pointSize: The size of the font in points. | |
1786 | ||
1787 | :param family: Font family. A generic way of referring to fonts | |
1788 | without specifying actual facename. It can be One of | |
1789 | the ``wx.FONTFAMILY_xxx`` constants. | |
1790 | ||
1791 | :param style: One of the ``wx.FONTSTYLE_xxx`` constants. | |
1792 | ||
1793 | :param weight: Font weight, sometimes also referred to as font | |
1794 | boldness. One of the ``wx.FONTWEIGHT_xxx`` constants. | |
1795 | ||
1796 | :param underline: The value can be ``True`` or ``False`` and | |
1797 | indicates whether the font will include an underline. This | |
1798 | may not be supported on all platforms. | |
1799 | ||
1800 | :param face: An optional string specifying the actual typeface to | |
1801 | be used. If it is an empty string, a default typeface will be | |
1802 | chosen based on the family. | |
1803 | ||
1804 | :param encoding: An encoding which may be one of the | |
1805 | ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't | |
1806 | available, no font is created. | |
1807 | ||
1808 | :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`, | |
1809 | `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo` | |
1810 | ||
d55e5bfc | 1811 | """ |
caef1a4d | 1812 | if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] |
d55e5bfc RD |
1813 | newobj = _gdi_.new_Font(*args, **kwargs) |
1814 | self.this = newobj.this | |
1815 | self.thisown = 1 | |
1816 | del newobj.thisown | |
1817 | def __del__(self, destroy=_gdi_.delete_Font): | |
1818 | """__del__(self)""" | |
1819 | try: | |
1820 | if self.thisown: destroy(self) | |
1821 | except: pass | |
1822 | ||
1823 | def Ok(*args, **kwargs): | |
a97cefba RD |
1824 | """ |
1825 | Ok(self) -> bool | |
1826 | ||
1827 | Returns ``True`` if this font was successfully created. | |
1828 | """ | |
d55e5bfc RD |
1829 | return _gdi_.Font_Ok(*args, **kwargs) |
1830 | ||
1831 | def __nonzero__(self): return self.Ok() | |
1832 | def __eq__(*args, **kwargs): | |
1833 | """__eq__(self, Font other) -> bool""" | |
1834 | return _gdi_.Font___eq__(*args, **kwargs) | |
1835 | ||
1836 | def __ne__(*args, **kwargs): | |
1837 | """__ne__(self, Font other) -> bool""" | |
1838 | return _gdi_.Font___ne__(*args, **kwargs) | |
1839 | ||
1840 | def GetPointSize(*args, **kwargs): | |
a97cefba RD |
1841 | """ |
1842 | GetPointSize(self) -> int | |
1843 | ||
1844 | Gets the point size. | |
1845 | """ | |
d55e5bfc RD |
1846 | return _gdi_.Font_GetPointSize(*args, **kwargs) |
1847 | ||
5e483524 | 1848 | def GetPixelSize(*args, **kwargs): |
a97cefba RD |
1849 | """ |
1850 | GetPixelSize(self) -> Size | |
1851 | ||
1852 | Returns the size in pixels if the font was constructed with a pixel | |
1853 | size. | |
1854 | """ | |
5e483524 RD |
1855 | return _gdi_.Font_GetPixelSize(*args, **kwargs) |
1856 | ||
1857 | def IsUsingSizeInPixels(*args, **kwargs): | |
a97cefba RD |
1858 | """ |
1859 | IsUsingSizeInPixels(self) -> bool | |
1860 | ||
1861 | Returns ``True`` if the font is using a pixelSize. | |
1862 | """ | |
5e483524 RD |
1863 | return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs) |
1864 | ||
d55e5bfc | 1865 | def GetFamily(*args, **kwargs): |
a97cefba RD |
1866 | """ |
1867 | GetFamily(self) -> int | |
1868 | ||
1869 | Gets the font family. | |
1870 | """ | |
d55e5bfc RD |
1871 | return _gdi_.Font_GetFamily(*args, **kwargs) |
1872 | ||
1873 | def GetStyle(*args, **kwargs): | |
a97cefba RD |
1874 | """ |
1875 | GetStyle(self) -> int | |
1876 | ||
1877 | Gets the font style. | |
1878 | """ | |
d55e5bfc RD |
1879 | return _gdi_.Font_GetStyle(*args, **kwargs) |
1880 | ||
1881 | def GetWeight(*args, **kwargs): | |
a97cefba RD |
1882 | """ |
1883 | GetWeight(self) -> int | |
1884 | ||
1885 | Gets the font weight. | |
1886 | """ | |
d55e5bfc RD |
1887 | return _gdi_.Font_GetWeight(*args, **kwargs) |
1888 | ||
1889 | def GetUnderlined(*args, **kwargs): | |
a97cefba RD |
1890 | """ |
1891 | GetUnderlined(self) -> bool | |
1892 | ||
1893 | Returns ``True`` if the font is underlined, ``False`` otherwise. | |
1894 | """ | |
d55e5bfc RD |
1895 | return _gdi_.Font_GetUnderlined(*args, **kwargs) |
1896 | ||
1897 | def GetFaceName(*args, **kwargs): | |
a97cefba RD |
1898 | """ |
1899 | GetFaceName(self) -> String | |
1900 | ||
1901 | Returns the typeface name associated with the font, or the empty | |
1902 | string if there is no typeface information. | |
1903 | """ | |
d55e5bfc RD |
1904 | return _gdi_.Font_GetFaceName(*args, **kwargs) |
1905 | ||
1906 | def GetEncoding(*args, **kwargs): | |
a97cefba RD |
1907 | """ |
1908 | GetEncoding(self) -> int | |
1909 | ||
1910 | Get the font's encoding. | |
1911 | """ | |
d55e5bfc RD |
1912 | return _gdi_.Font_GetEncoding(*args, **kwargs) |
1913 | ||
1914 | def GetNativeFontInfo(*args, **kwargs): | |
a97cefba RD |
1915 | """ |
1916 | GetNativeFontInfo(self) -> NativeFontInfo | |
1917 | ||
1918 | Constructs a `wx.NativeFontInfo` object from this font. | |
1919 | """ | |
d55e5bfc RD |
1920 | return _gdi_.Font_GetNativeFontInfo(*args, **kwargs) |
1921 | ||
1922 | def IsFixedWidth(*args, **kwargs): | |
a97cefba RD |
1923 | """ |
1924 | IsFixedWidth(self) -> bool | |
1925 | ||
1926 | Returns true if the font is a fixed width (or monospaced) font, false | |
1927 | if it is a proportional one or font is invalid. | |
1928 | """ | |
d55e5bfc RD |
1929 | return _gdi_.Font_IsFixedWidth(*args, **kwargs) |
1930 | ||
1931 | def GetNativeFontInfoDesc(*args, **kwargs): | |
a97cefba RD |
1932 | """ |
1933 | GetNativeFontInfoDesc(self) -> String | |
1934 | ||
1935 | Returns the platform-dependent string completely describing this font | |
1936 | or an empty string if the font isn't valid. | |
1937 | """ | |
d55e5bfc RD |
1938 | return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs) |
1939 | ||
1940 | def GetNativeFontInfoUserDesc(*args, **kwargs): | |
a97cefba RD |
1941 | """ |
1942 | GetNativeFontInfoUserDesc(self) -> String | |
1943 | ||
1944 | Returns a human readable version of `GetNativeFontInfoDesc`. | |
1945 | """ | |
d55e5bfc RD |
1946 | return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs) |
1947 | ||
1948 | def SetPointSize(*args, **kwargs): | |
a97cefba RD |
1949 | """ |
1950 | SetPointSize(self, int pointSize) | |
1951 | ||
1952 | Sets the point size. | |
1953 | """ | |
d55e5bfc RD |
1954 | return _gdi_.Font_SetPointSize(*args, **kwargs) |
1955 | ||
5e483524 | 1956 | def SetPixelSize(*args, **kwargs): |
a97cefba RD |
1957 | """ |
1958 | SetPixelSize(self, Size pixelSize) | |
1959 | ||
1960 | Sets the size in pixels rather than points. If there is platform API | |
1961 | support for this then it is used, otherwise a font with the closest | |
1962 | size is found using a binary search. | |
1963 | """ | |
5e483524 RD |
1964 | return _gdi_.Font_SetPixelSize(*args, **kwargs) |
1965 | ||
d55e5bfc | 1966 | def SetFamily(*args, **kwargs): |
a97cefba RD |
1967 | """ |
1968 | SetFamily(self, int family) | |
1969 | ||
1970 | Sets the font family. | |
1971 | """ | |
d55e5bfc RD |
1972 | return _gdi_.Font_SetFamily(*args, **kwargs) |
1973 | ||
1974 | def SetStyle(*args, **kwargs): | |
a97cefba RD |
1975 | """ |
1976 | SetStyle(self, int style) | |
1977 | ||
1978 | Sets the font style. | |
1979 | """ | |
d55e5bfc RD |
1980 | return _gdi_.Font_SetStyle(*args, **kwargs) |
1981 | ||
1982 | def SetWeight(*args, **kwargs): | |
a97cefba RD |
1983 | """ |
1984 | SetWeight(self, int weight) | |
1985 | ||
1986 | Sets the font weight. | |
1987 | """ | |
d55e5bfc RD |
1988 | return _gdi_.Font_SetWeight(*args, **kwargs) |
1989 | ||
1990 | def SetFaceName(*args, **kwargs): | |
a97cefba RD |
1991 | """ |
1992 | SetFaceName(self, String faceName) | |
1993 | ||
1994 | Sets the facename for the font. The facename, which should be a valid | |
1995 | font installed on the end-user's system. | |
1996 | ||
1997 | To avoid portability problems, don't rely on a specific face, but | |
1998 | specify the font family instead or as well. A suitable font will be | |
1999 | found on the end-user's system. If both the family and the facename | |
2000 | are specified, wxWidgets will first search for the specific face, and | |
2001 | then for a font belonging to the same family. | |
2002 | """ | |
d55e5bfc RD |
2003 | return _gdi_.Font_SetFaceName(*args, **kwargs) |
2004 | ||
2005 | def SetUnderlined(*args, **kwargs): | |
a97cefba RD |
2006 | """ |
2007 | SetUnderlined(self, bool underlined) | |
2008 | ||
2009 | Sets underlining. | |
2010 | """ | |
d55e5bfc RD |
2011 | return _gdi_.Font_SetUnderlined(*args, **kwargs) |
2012 | ||
2013 | def SetEncoding(*args, **kwargs): | |
a97cefba RD |
2014 | """ |
2015 | SetEncoding(self, int encoding) | |
2016 | ||
2017 | Set the font encoding. | |
2018 | """ | |
d55e5bfc RD |
2019 | return _gdi_.Font_SetEncoding(*args, **kwargs) |
2020 | ||
2021 | def SetNativeFontInfo(*args, **kwargs): | |
a97cefba RD |
2022 | """ |
2023 | SetNativeFontInfo(self, NativeFontInfo info) | |
2024 | ||
2025 | Set the font's attributes from a `wx.NativeFontInfo` object. | |
2026 | """ | |
d55e5bfc RD |
2027 | return _gdi_.Font_SetNativeFontInfo(*args, **kwargs) |
2028 | ||
2029 | def SetNativeFontInfoFromString(*args, **kwargs): | |
a97cefba RD |
2030 | """ |
2031 | SetNativeFontInfoFromString(self, String info) | |
2032 | ||
2033 | Set the font's attributes from string representation of a | |
2034 | `wx.NativeFontInfo` object. | |
2035 | """ | |
d55e5bfc RD |
2036 | return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs) |
2037 | ||
2038 | def SetNativeFontInfoUserDesc(*args, **kwargs): | |
a97cefba RD |
2039 | """ |
2040 | SetNativeFontInfoUserDesc(self, String info) | |
2041 | ||
2042 | Set the font's attributes from a string formerly returned from | |
2043 | `GetNativeFontInfoDesc`. | |
2044 | """ | |
d55e5bfc RD |
2045 | return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs) |
2046 | ||
2047 | def GetFamilyString(*args, **kwargs): | |
a97cefba RD |
2048 | """ |
2049 | GetFamilyString(self) -> String | |
2050 | ||
2051 | Returns a string representation of the font family. | |
2052 | """ | |
d55e5bfc RD |
2053 | return _gdi_.Font_GetFamilyString(*args, **kwargs) |
2054 | ||
2055 | def GetStyleString(*args, **kwargs): | |
a97cefba RD |
2056 | """ |
2057 | GetStyleString(self) -> String | |
2058 | ||
2059 | Returns a string representation of the font style. | |
2060 | """ | |
d55e5bfc RD |
2061 | return _gdi_.Font_GetStyleString(*args, **kwargs) |
2062 | ||
2063 | def GetWeightString(*args, **kwargs): | |
a97cefba RD |
2064 | """ |
2065 | GetWeightString(self) -> String | |
2066 | ||
2067 | Return a string representation of the font weight. | |
2068 | """ | |
d55e5bfc RD |
2069 | return _gdi_.Font_GetWeightString(*args, **kwargs) |
2070 | ||
2071 | def SetNoAntiAliasing(*args, **kwargs): | |
2072 | """SetNoAntiAliasing(self, bool no=True)""" | |
2073 | return _gdi_.Font_SetNoAntiAliasing(*args, **kwargs) | |
2074 | ||
2075 | def GetNoAntiAliasing(*args, **kwargs): | |
2076 | """GetNoAntiAliasing(self) -> bool""" | |
2077 | return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs) | |
2078 | ||
2079 | def GetDefaultEncoding(*args, **kwargs): | |
a97cefba RD |
2080 | """ |
2081 | GetDefaultEncoding() -> int | |
2082 | ||
2083 | Returns the encoding used for all fonts created with an encoding of | |
2084 | ``wx.FONTENCODING_DEFAULT``. | |
2085 | """ | |
d55e5bfc RD |
2086 | return _gdi_.Font_GetDefaultEncoding(*args, **kwargs) |
2087 | ||
2088 | GetDefaultEncoding = staticmethod(GetDefaultEncoding) | |
2089 | def SetDefaultEncoding(*args, **kwargs): | |
a97cefba RD |
2090 | """ |
2091 | SetDefaultEncoding(int encoding) | |
2092 | ||
2093 | Sets the default font encoding. | |
2094 | """ | |
d55e5bfc RD |
2095 | return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) |
2096 | ||
2097 | SetDefaultEncoding = staticmethod(SetDefaultEncoding) | |
2098 | ||
2099 | class FontPtr(Font): | |
2100 | def __init__(self, this): | |
2101 | self.this = this | |
2102 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2103 | self.__class__ = Font | |
2104 | _gdi_.Font_swigregister(FontPtr) | |
2105 | ||
2106 | def FontFromNativeInfo(*args, **kwargs): | |
a97cefba RD |
2107 | """ |
2108 | FontFromNativeInfo(NativeFontInfo info) -> Font | |
2109 | ||
2110 | Construct a `wx.Font` from a `wx.NativeFontInfo` object. | |
2111 | """ | |
caef1a4d | 2112 | if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] |
d55e5bfc RD |
2113 | val = _gdi_.new_FontFromNativeInfo(*args, **kwargs) |
2114 | val.thisown = 1 | |
2115 | return val | |
2116 | ||
2117 | def FontFromNativeInfoString(*args, **kwargs): | |
a97cefba RD |
2118 | """ |
2119 | FontFromNativeInfoString(String info) -> Font | |
2120 | ||
2121 | Construct a `wx.Font` from the string representation of a | |
2122 | `wx.NativeFontInfo` object. | |
2123 | """ | |
caef1a4d | 2124 | if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] |
d55e5bfc RD |
2125 | val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs) |
2126 | val.thisown = 1 | |
2127 | return val | |
2128 | ||
a97cefba | 2129 | def FFont(*args, **kwargs): |
d55e5bfc | 2130 | """ |
a97cefba | 2131 | FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT, |
d55e5bfc | 2132 | String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font |
a97cefba RD |
2133 | |
2134 | A bit of a simpler way to create a `wx.Font` using flags instead of | |
2135 | individual attribute settings. The value of flags can be a | |
2136 | combination of the following: | |
2137 | ||
2138 | ============================ == | |
2139 | wx.FONTFLAG_DEFAULT | |
2140 | wx.FONTFLAG_ITALIC | |
2141 | wx.FONTFLAG_SLANT | |
2142 | wx.FONTFLAG_LIGHT | |
2143 | wx.FONTFLAG_BOLD | |
2144 | wx.FONTFLAG_ANTIALIASED | |
2145 | wx.FONTFLAG_NOT_ANTIALIASED | |
2146 | wx.FONTFLAG_UNDERLINED | |
2147 | wx.FONTFLAG_STRIKETHROUGH | |
2148 | ============================ == | |
2149 | ||
2150 | :see: `wx.Font.__init__` | |
d55e5bfc | 2151 | """ |
caef1a4d | 2152 | if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] |
a97cefba | 2153 | val = _gdi_.new_FFont(*args, **kwargs) |
d55e5bfc RD |
2154 | val.thisown = 1 |
2155 | return val | |
2156 | ||
5e483524 RD |
2157 | def FontFromPixelSize(*args, **kwargs): |
2158 | """ | |
2159 | FontFromPixelSize(Size pixelSize, int family, int style, int weight, | |
2160 | bool underlined=False, String face=wxEmptyString, | |
2161 | int encoding=FONTENCODING_DEFAULT) -> Font | |
a97cefba RD |
2162 | |
2163 | Creates a font using a size in pixels rather than points. If there is | |
2164 | platform API support for this then it is used, otherwise a font with | |
2165 | the closest size is found using a binary search. | |
2166 | ||
2167 | :see: `wx.Font.__init__` | |
5e483524 RD |
2168 | """ |
2169 | if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] | |
2170 | val = _gdi_.new_FontFromPixelSize(*args, **kwargs) | |
2171 | val.thisown = 1 | |
2172 | return val | |
2173 | ||
a97cefba RD |
2174 | def FFontFromPixelSize(*args, **kwargs): |
2175 | """ | |
2176 | FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT, | |
2177 | String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font | |
2178 | ||
2179 | Creates a font using a size in pixels rather than points. If there is | |
2180 | platform API support for this then it is used, otherwise a font with | |
2181 | the closest size is found using a binary search. | |
2182 | ||
2183 | :see: `wx.Font.__init__`, `wx.FFont` | |
2184 | """ | |
2185 | if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] | |
2186 | val = _gdi_.new_FFontFromPixelSize(*args, **kwargs) | |
2187 | val.thisown = 1 | |
2188 | return val | |
2189 | ||
d55e5bfc | 2190 | def Font_GetDefaultEncoding(*args, **kwargs): |
a97cefba RD |
2191 | """ |
2192 | Font_GetDefaultEncoding() -> int | |
2193 | ||
2194 | Returns the encoding used for all fonts created with an encoding of | |
2195 | ``wx.FONTENCODING_DEFAULT``. | |
2196 | """ | |
d55e5bfc RD |
2197 | return _gdi_.Font_GetDefaultEncoding(*args, **kwargs) |
2198 | ||
2199 | def Font_SetDefaultEncoding(*args, **kwargs): | |
a97cefba RD |
2200 | """ |
2201 | Font_SetDefaultEncoding(int encoding) | |
2202 | ||
2203 | Sets the default font encoding. | |
2204 | """ | |
d55e5bfc RD |
2205 | return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) |
2206 | ||
a97cefba | 2207 | Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.") |
d55e5bfc RD |
2208 | #--------------------------------------------------------------------------- |
2209 | ||
2210 | class FontEnumerator(object): | |
093d3ff1 | 2211 | """Proxy of C++ FontEnumerator class""" |
d55e5bfc RD |
2212 | def __repr__(self): |
2213 | return "<%s.%s; proxy of C++ wxPyFontEnumerator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2214 | def __init__(self, *args, **kwargs): | |
2215 | """__init__(self) -> FontEnumerator""" | |
2216 | newobj = _gdi_.new_FontEnumerator(*args, **kwargs) | |
2217 | self.this = newobj.this | |
2218 | self.thisown = 1 | |
2219 | del newobj.thisown | |
2220 | self._setCallbackInfo(self, FontEnumerator, 0) | |
2221 | ||
2222 | def __del__(self, destroy=_gdi_.delete_FontEnumerator): | |
2223 | """__del__(self)""" | |
2224 | try: | |
2225 | if self.thisown: destroy(self) | |
2226 | except: pass | |
2227 | ||
2228 | def _setCallbackInfo(*args, **kwargs): | |
2229 | """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)""" | |
2230 | return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs) | |
2231 | ||
2232 | def EnumerateFacenames(*args, **kwargs): | |
2233 | """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool""" | |
2234 | return _gdi_.FontEnumerator_EnumerateFacenames(*args, **kwargs) | |
2235 | ||
2236 | def EnumerateEncodings(*args, **kwargs): | |
2237 | """EnumerateEncodings(self, String facename=EmptyString) -> bool""" | |
2238 | return _gdi_.FontEnumerator_EnumerateEncodings(*args, **kwargs) | |
2239 | ||
2240 | def GetEncodings(*args, **kwargs): | |
2241 | """GetEncodings(self) -> PyObject""" | |
2242 | return _gdi_.FontEnumerator_GetEncodings(*args, **kwargs) | |
2243 | ||
2244 | def GetFacenames(*args, **kwargs): | |
2245 | """GetFacenames(self) -> PyObject""" | |
2246 | return _gdi_.FontEnumerator_GetFacenames(*args, **kwargs) | |
2247 | ||
2248 | ||
2249 | class FontEnumeratorPtr(FontEnumerator): | |
2250 | def __init__(self, this): | |
2251 | self.this = this | |
2252 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2253 | self.__class__ = FontEnumerator | |
2254 | _gdi_.FontEnumerator_swigregister(FontEnumeratorPtr) | |
2255 | ||
2256 | #--------------------------------------------------------------------------- | |
2257 | ||
2258 | LANGUAGE_DEFAULT = _gdi_.LANGUAGE_DEFAULT | |
2259 | LANGUAGE_UNKNOWN = _gdi_.LANGUAGE_UNKNOWN | |
2260 | LANGUAGE_ABKHAZIAN = _gdi_.LANGUAGE_ABKHAZIAN | |
2261 | LANGUAGE_AFAR = _gdi_.LANGUAGE_AFAR | |
2262 | LANGUAGE_AFRIKAANS = _gdi_.LANGUAGE_AFRIKAANS | |
2263 | LANGUAGE_ALBANIAN = _gdi_.LANGUAGE_ALBANIAN | |
2264 | LANGUAGE_AMHARIC = _gdi_.LANGUAGE_AMHARIC | |
2265 | LANGUAGE_ARABIC = _gdi_.LANGUAGE_ARABIC | |
2266 | LANGUAGE_ARABIC_ALGERIA = _gdi_.LANGUAGE_ARABIC_ALGERIA | |
2267 | LANGUAGE_ARABIC_BAHRAIN = _gdi_.LANGUAGE_ARABIC_BAHRAIN | |
2268 | LANGUAGE_ARABIC_EGYPT = _gdi_.LANGUAGE_ARABIC_EGYPT | |
2269 | LANGUAGE_ARABIC_IRAQ = _gdi_.LANGUAGE_ARABIC_IRAQ | |
2270 | LANGUAGE_ARABIC_JORDAN = _gdi_.LANGUAGE_ARABIC_JORDAN | |
2271 | LANGUAGE_ARABIC_KUWAIT = _gdi_.LANGUAGE_ARABIC_KUWAIT | |
2272 | LANGUAGE_ARABIC_LEBANON = _gdi_.LANGUAGE_ARABIC_LEBANON | |
2273 | LANGUAGE_ARABIC_LIBYA = _gdi_.LANGUAGE_ARABIC_LIBYA | |
2274 | LANGUAGE_ARABIC_MOROCCO = _gdi_.LANGUAGE_ARABIC_MOROCCO | |
2275 | LANGUAGE_ARABIC_OMAN = _gdi_.LANGUAGE_ARABIC_OMAN | |
2276 | LANGUAGE_ARABIC_QATAR = _gdi_.LANGUAGE_ARABIC_QATAR | |
2277 | LANGUAGE_ARABIC_SAUDI_ARABIA = _gdi_.LANGUAGE_ARABIC_SAUDI_ARABIA | |
2278 | LANGUAGE_ARABIC_SUDAN = _gdi_.LANGUAGE_ARABIC_SUDAN | |
2279 | LANGUAGE_ARABIC_SYRIA = _gdi_.LANGUAGE_ARABIC_SYRIA | |
2280 | LANGUAGE_ARABIC_TUNISIA = _gdi_.LANGUAGE_ARABIC_TUNISIA | |
2281 | LANGUAGE_ARABIC_UAE = _gdi_.LANGUAGE_ARABIC_UAE | |
2282 | LANGUAGE_ARABIC_YEMEN = _gdi_.LANGUAGE_ARABIC_YEMEN | |
2283 | LANGUAGE_ARMENIAN = _gdi_.LANGUAGE_ARMENIAN | |
2284 | LANGUAGE_ASSAMESE = _gdi_.LANGUAGE_ASSAMESE | |
2285 | LANGUAGE_AYMARA = _gdi_.LANGUAGE_AYMARA | |
2286 | LANGUAGE_AZERI = _gdi_.LANGUAGE_AZERI | |
2287 | LANGUAGE_AZERI_CYRILLIC = _gdi_.LANGUAGE_AZERI_CYRILLIC | |
2288 | LANGUAGE_AZERI_LATIN = _gdi_.LANGUAGE_AZERI_LATIN | |
2289 | LANGUAGE_BASHKIR = _gdi_.LANGUAGE_BASHKIR | |
2290 | LANGUAGE_BASQUE = _gdi_.LANGUAGE_BASQUE | |
2291 | LANGUAGE_BELARUSIAN = _gdi_.LANGUAGE_BELARUSIAN | |
2292 | LANGUAGE_BENGALI = _gdi_.LANGUAGE_BENGALI | |
2293 | LANGUAGE_BHUTANI = _gdi_.LANGUAGE_BHUTANI | |
2294 | LANGUAGE_BIHARI = _gdi_.LANGUAGE_BIHARI | |
2295 | LANGUAGE_BISLAMA = _gdi_.LANGUAGE_BISLAMA | |
2296 | LANGUAGE_BRETON = _gdi_.LANGUAGE_BRETON | |
2297 | LANGUAGE_BULGARIAN = _gdi_.LANGUAGE_BULGARIAN | |
2298 | LANGUAGE_BURMESE = _gdi_.LANGUAGE_BURMESE | |
2299 | LANGUAGE_CAMBODIAN = _gdi_.LANGUAGE_CAMBODIAN | |
2300 | LANGUAGE_CATALAN = _gdi_.LANGUAGE_CATALAN | |
2301 | LANGUAGE_CHINESE = _gdi_.LANGUAGE_CHINESE | |
2302 | LANGUAGE_CHINESE_SIMPLIFIED = _gdi_.LANGUAGE_CHINESE_SIMPLIFIED | |
2303 | LANGUAGE_CHINESE_TRADITIONAL = _gdi_.LANGUAGE_CHINESE_TRADITIONAL | |
2304 | LANGUAGE_CHINESE_HONGKONG = _gdi_.LANGUAGE_CHINESE_HONGKONG | |
2305 | LANGUAGE_CHINESE_MACAU = _gdi_.LANGUAGE_CHINESE_MACAU | |
2306 | LANGUAGE_CHINESE_SINGAPORE = _gdi_.LANGUAGE_CHINESE_SINGAPORE | |
2307 | LANGUAGE_CHINESE_TAIWAN = _gdi_.LANGUAGE_CHINESE_TAIWAN | |
2308 | LANGUAGE_CORSICAN = _gdi_.LANGUAGE_CORSICAN | |
2309 | LANGUAGE_CROATIAN = _gdi_.LANGUAGE_CROATIAN | |
2310 | LANGUAGE_CZECH = _gdi_.LANGUAGE_CZECH | |
2311 | LANGUAGE_DANISH = _gdi_.LANGUAGE_DANISH | |
2312 | LANGUAGE_DUTCH = _gdi_.LANGUAGE_DUTCH | |
2313 | LANGUAGE_DUTCH_BELGIAN = _gdi_.LANGUAGE_DUTCH_BELGIAN | |
2314 | LANGUAGE_ENGLISH = _gdi_.LANGUAGE_ENGLISH | |
2315 | LANGUAGE_ENGLISH_UK = _gdi_.LANGUAGE_ENGLISH_UK | |
2316 | LANGUAGE_ENGLISH_US = _gdi_.LANGUAGE_ENGLISH_US | |
2317 | LANGUAGE_ENGLISH_AUSTRALIA = _gdi_.LANGUAGE_ENGLISH_AUSTRALIA | |
2318 | LANGUAGE_ENGLISH_BELIZE = _gdi_.LANGUAGE_ENGLISH_BELIZE | |
2319 | LANGUAGE_ENGLISH_BOTSWANA = _gdi_.LANGUAGE_ENGLISH_BOTSWANA | |
2320 | LANGUAGE_ENGLISH_CANADA = _gdi_.LANGUAGE_ENGLISH_CANADA | |
2321 | LANGUAGE_ENGLISH_CARIBBEAN = _gdi_.LANGUAGE_ENGLISH_CARIBBEAN | |
2322 | LANGUAGE_ENGLISH_DENMARK = _gdi_.LANGUAGE_ENGLISH_DENMARK | |
2323 | LANGUAGE_ENGLISH_EIRE = _gdi_.LANGUAGE_ENGLISH_EIRE | |
2324 | LANGUAGE_ENGLISH_JAMAICA = _gdi_.LANGUAGE_ENGLISH_JAMAICA | |
2325 | LANGUAGE_ENGLISH_NEW_ZEALAND = _gdi_.LANGUAGE_ENGLISH_NEW_ZEALAND | |
2326 | LANGUAGE_ENGLISH_PHILIPPINES = _gdi_.LANGUAGE_ENGLISH_PHILIPPINES | |
2327 | LANGUAGE_ENGLISH_SOUTH_AFRICA = _gdi_.LANGUAGE_ENGLISH_SOUTH_AFRICA | |
2328 | LANGUAGE_ENGLISH_TRINIDAD = _gdi_.LANGUAGE_ENGLISH_TRINIDAD | |
2329 | LANGUAGE_ENGLISH_ZIMBABWE = _gdi_.LANGUAGE_ENGLISH_ZIMBABWE | |
2330 | LANGUAGE_ESPERANTO = _gdi_.LANGUAGE_ESPERANTO | |
2331 | LANGUAGE_ESTONIAN = _gdi_.LANGUAGE_ESTONIAN | |
2332 | LANGUAGE_FAEROESE = _gdi_.LANGUAGE_FAEROESE | |
2333 | LANGUAGE_FARSI = _gdi_.LANGUAGE_FARSI | |
2334 | LANGUAGE_FIJI = _gdi_.LANGUAGE_FIJI | |
2335 | LANGUAGE_FINNISH = _gdi_.LANGUAGE_FINNISH | |
2336 | LANGUAGE_FRENCH = _gdi_.LANGUAGE_FRENCH | |
2337 | LANGUAGE_FRENCH_BELGIAN = _gdi_.LANGUAGE_FRENCH_BELGIAN | |
2338 | LANGUAGE_FRENCH_CANADIAN = _gdi_.LANGUAGE_FRENCH_CANADIAN | |
2339 | LANGUAGE_FRENCH_LUXEMBOURG = _gdi_.LANGUAGE_FRENCH_LUXEMBOURG | |
2340 | LANGUAGE_FRENCH_MONACO = _gdi_.LANGUAGE_FRENCH_MONACO | |
2341 | LANGUAGE_FRENCH_SWISS = _gdi_.LANGUAGE_FRENCH_SWISS | |
2342 | LANGUAGE_FRISIAN = _gdi_.LANGUAGE_FRISIAN | |
2343 | LANGUAGE_GALICIAN = _gdi_.LANGUAGE_GALICIAN | |
2344 | LANGUAGE_GEORGIAN = _gdi_.LANGUAGE_GEORGIAN | |
2345 | LANGUAGE_GERMAN = _gdi_.LANGUAGE_GERMAN | |
2346 | LANGUAGE_GERMAN_AUSTRIAN = _gdi_.LANGUAGE_GERMAN_AUSTRIAN | |
2347 | LANGUAGE_GERMAN_BELGIUM = _gdi_.LANGUAGE_GERMAN_BELGIUM | |
2348 | LANGUAGE_GERMAN_LIECHTENSTEIN = _gdi_.LANGUAGE_GERMAN_LIECHTENSTEIN | |
2349 | LANGUAGE_GERMAN_LUXEMBOURG = _gdi_.LANGUAGE_GERMAN_LUXEMBOURG | |
2350 | LANGUAGE_GERMAN_SWISS = _gdi_.LANGUAGE_GERMAN_SWISS | |
2351 | LANGUAGE_GREEK = _gdi_.LANGUAGE_GREEK | |
2352 | LANGUAGE_GREENLANDIC = _gdi_.LANGUAGE_GREENLANDIC | |
2353 | LANGUAGE_GUARANI = _gdi_.LANGUAGE_GUARANI | |
2354 | LANGUAGE_GUJARATI = _gdi_.LANGUAGE_GUJARATI | |
2355 | LANGUAGE_HAUSA = _gdi_.LANGUAGE_HAUSA | |
2356 | LANGUAGE_HEBREW = _gdi_.LANGUAGE_HEBREW | |
2357 | LANGUAGE_HINDI = _gdi_.LANGUAGE_HINDI | |
2358 | LANGUAGE_HUNGARIAN = _gdi_.LANGUAGE_HUNGARIAN | |
2359 | LANGUAGE_ICELANDIC = _gdi_.LANGUAGE_ICELANDIC | |
2360 | LANGUAGE_INDONESIAN = _gdi_.LANGUAGE_INDONESIAN | |
2361 | LANGUAGE_INTERLINGUA = _gdi_.LANGUAGE_INTERLINGUA | |
2362 | LANGUAGE_INTERLINGUE = _gdi_.LANGUAGE_INTERLINGUE | |
2363 | LANGUAGE_INUKTITUT = _gdi_.LANGUAGE_INUKTITUT | |
2364 | LANGUAGE_INUPIAK = _gdi_.LANGUAGE_INUPIAK | |
2365 | LANGUAGE_IRISH = _gdi_.LANGUAGE_IRISH | |
2366 | LANGUAGE_ITALIAN = _gdi_.LANGUAGE_ITALIAN | |
2367 | LANGUAGE_ITALIAN_SWISS = _gdi_.LANGUAGE_ITALIAN_SWISS | |
2368 | LANGUAGE_JAPANESE = _gdi_.LANGUAGE_JAPANESE | |
2369 | LANGUAGE_JAVANESE = _gdi_.LANGUAGE_JAVANESE | |
2370 | LANGUAGE_KANNADA = _gdi_.LANGUAGE_KANNADA | |
2371 | LANGUAGE_KASHMIRI = _gdi_.LANGUAGE_KASHMIRI | |
2372 | LANGUAGE_KASHMIRI_INDIA = _gdi_.LANGUAGE_KASHMIRI_INDIA | |
2373 | LANGUAGE_KAZAKH = _gdi_.LANGUAGE_KAZAKH | |
2374 | LANGUAGE_KERNEWEK = _gdi_.LANGUAGE_KERNEWEK | |
2375 | LANGUAGE_KINYARWANDA = _gdi_.LANGUAGE_KINYARWANDA | |
2376 | LANGUAGE_KIRGHIZ = _gdi_.LANGUAGE_KIRGHIZ | |
2377 | LANGUAGE_KIRUNDI = _gdi_.LANGUAGE_KIRUNDI | |
2378 | LANGUAGE_KONKANI = _gdi_.LANGUAGE_KONKANI | |
2379 | LANGUAGE_KOREAN = _gdi_.LANGUAGE_KOREAN | |
2380 | LANGUAGE_KURDISH = _gdi_.LANGUAGE_KURDISH | |
2381 | LANGUAGE_LAOTHIAN = _gdi_.LANGUAGE_LAOTHIAN | |
2382 | LANGUAGE_LATIN = _gdi_.LANGUAGE_LATIN | |
2383 | LANGUAGE_LATVIAN = _gdi_.LANGUAGE_LATVIAN | |
2384 | LANGUAGE_LINGALA = _gdi_.LANGUAGE_LINGALA | |
2385 | LANGUAGE_LITHUANIAN = _gdi_.LANGUAGE_LITHUANIAN | |
2386 | LANGUAGE_MACEDONIAN = _gdi_.LANGUAGE_MACEDONIAN | |
2387 | LANGUAGE_MALAGASY = _gdi_.LANGUAGE_MALAGASY | |
2388 | LANGUAGE_MALAY = _gdi_.LANGUAGE_MALAY | |
2389 | LANGUAGE_MALAYALAM = _gdi_.LANGUAGE_MALAYALAM | |
2390 | LANGUAGE_MALAY_BRUNEI_DARUSSALAM = _gdi_.LANGUAGE_MALAY_BRUNEI_DARUSSALAM | |
2391 | LANGUAGE_MALAY_MALAYSIA = _gdi_.LANGUAGE_MALAY_MALAYSIA | |
2392 | LANGUAGE_MALTESE = _gdi_.LANGUAGE_MALTESE | |
2393 | LANGUAGE_MANIPURI = _gdi_.LANGUAGE_MANIPURI | |
2394 | LANGUAGE_MAORI = _gdi_.LANGUAGE_MAORI | |
2395 | LANGUAGE_MARATHI = _gdi_.LANGUAGE_MARATHI | |
2396 | LANGUAGE_MOLDAVIAN = _gdi_.LANGUAGE_MOLDAVIAN | |
2397 | LANGUAGE_MONGOLIAN = _gdi_.LANGUAGE_MONGOLIAN | |
2398 | LANGUAGE_NAURU = _gdi_.LANGUAGE_NAURU | |
2399 | LANGUAGE_NEPALI = _gdi_.LANGUAGE_NEPALI | |
2400 | LANGUAGE_NEPALI_INDIA = _gdi_.LANGUAGE_NEPALI_INDIA | |
2401 | LANGUAGE_NORWEGIAN_BOKMAL = _gdi_.LANGUAGE_NORWEGIAN_BOKMAL | |
2402 | LANGUAGE_NORWEGIAN_NYNORSK = _gdi_.LANGUAGE_NORWEGIAN_NYNORSK | |
2403 | LANGUAGE_OCCITAN = _gdi_.LANGUAGE_OCCITAN | |
2404 | LANGUAGE_ORIYA = _gdi_.LANGUAGE_ORIYA | |
2405 | LANGUAGE_OROMO = _gdi_.LANGUAGE_OROMO | |
2406 | LANGUAGE_PASHTO = _gdi_.LANGUAGE_PASHTO | |
2407 | LANGUAGE_POLISH = _gdi_.LANGUAGE_POLISH | |
2408 | LANGUAGE_PORTUGUESE = _gdi_.LANGUAGE_PORTUGUESE | |
2409 | LANGUAGE_PORTUGUESE_BRAZILIAN = _gdi_.LANGUAGE_PORTUGUESE_BRAZILIAN | |
2410 | LANGUAGE_PUNJABI = _gdi_.LANGUAGE_PUNJABI | |
2411 | LANGUAGE_QUECHUA = _gdi_.LANGUAGE_QUECHUA | |
2412 | LANGUAGE_RHAETO_ROMANCE = _gdi_.LANGUAGE_RHAETO_ROMANCE | |
2413 | LANGUAGE_ROMANIAN = _gdi_.LANGUAGE_ROMANIAN | |
2414 | LANGUAGE_RUSSIAN = _gdi_.LANGUAGE_RUSSIAN | |
2415 | LANGUAGE_RUSSIAN_UKRAINE = _gdi_.LANGUAGE_RUSSIAN_UKRAINE | |
2416 | LANGUAGE_SAMOAN = _gdi_.LANGUAGE_SAMOAN | |
2417 | LANGUAGE_SANGHO = _gdi_.LANGUAGE_SANGHO | |
2418 | LANGUAGE_SANSKRIT = _gdi_.LANGUAGE_SANSKRIT | |
2419 | LANGUAGE_SCOTS_GAELIC = _gdi_.LANGUAGE_SCOTS_GAELIC | |
2420 | LANGUAGE_SERBIAN = _gdi_.LANGUAGE_SERBIAN | |
2421 | LANGUAGE_SERBIAN_CYRILLIC = _gdi_.LANGUAGE_SERBIAN_CYRILLIC | |
2422 | LANGUAGE_SERBIAN_LATIN = _gdi_.LANGUAGE_SERBIAN_LATIN | |
2423 | LANGUAGE_SERBO_CROATIAN = _gdi_.LANGUAGE_SERBO_CROATIAN | |
2424 | LANGUAGE_SESOTHO = _gdi_.LANGUAGE_SESOTHO | |
2425 | LANGUAGE_SETSWANA = _gdi_.LANGUAGE_SETSWANA | |
2426 | LANGUAGE_SHONA = _gdi_.LANGUAGE_SHONA | |
2427 | LANGUAGE_SINDHI = _gdi_.LANGUAGE_SINDHI | |
2428 | LANGUAGE_SINHALESE = _gdi_.LANGUAGE_SINHALESE | |
2429 | LANGUAGE_SISWATI = _gdi_.LANGUAGE_SISWATI | |
2430 | LANGUAGE_SLOVAK = _gdi_.LANGUAGE_SLOVAK | |
2431 | LANGUAGE_SLOVENIAN = _gdi_.LANGUAGE_SLOVENIAN | |
2432 | LANGUAGE_SOMALI = _gdi_.LANGUAGE_SOMALI | |
2433 | LANGUAGE_SPANISH = _gdi_.LANGUAGE_SPANISH | |
2434 | LANGUAGE_SPANISH_ARGENTINA = _gdi_.LANGUAGE_SPANISH_ARGENTINA | |
2435 | LANGUAGE_SPANISH_BOLIVIA = _gdi_.LANGUAGE_SPANISH_BOLIVIA | |
2436 | LANGUAGE_SPANISH_CHILE = _gdi_.LANGUAGE_SPANISH_CHILE | |
2437 | LANGUAGE_SPANISH_COLOMBIA = _gdi_.LANGUAGE_SPANISH_COLOMBIA | |
2438 | LANGUAGE_SPANISH_COSTA_RICA = _gdi_.LANGUAGE_SPANISH_COSTA_RICA | |
2439 | LANGUAGE_SPANISH_DOMINICAN_REPUBLIC = _gdi_.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC | |
2440 | LANGUAGE_SPANISH_ECUADOR = _gdi_.LANGUAGE_SPANISH_ECUADOR | |
2441 | LANGUAGE_SPANISH_EL_SALVADOR = _gdi_.LANGUAGE_SPANISH_EL_SALVADOR | |
2442 | LANGUAGE_SPANISH_GUATEMALA = _gdi_.LANGUAGE_SPANISH_GUATEMALA | |
2443 | LANGUAGE_SPANISH_HONDURAS = _gdi_.LANGUAGE_SPANISH_HONDURAS | |
2444 | LANGUAGE_SPANISH_MEXICAN = _gdi_.LANGUAGE_SPANISH_MEXICAN | |
2445 | LANGUAGE_SPANISH_MODERN = _gdi_.LANGUAGE_SPANISH_MODERN | |
2446 | LANGUAGE_SPANISH_NICARAGUA = _gdi_.LANGUAGE_SPANISH_NICARAGUA | |
2447 | LANGUAGE_SPANISH_PANAMA = _gdi_.LANGUAGE_SPANISH_PANAMA | |
2448 | LANGUAGE_SPANISH_PARAGUAY = _gdi_.LANGUAGE_SPANISH_PARAGUAY | |
2449 | LANGUAGE_SPANISH_PERU = _gdi_.LANGUAGE_SPANISH_PERU | |
2450 | LANGUAGE_SPANISH_PUERTO_RICO = _gdi_.LANGUAGE_SPANISH_PUERTO_RICO | |
2451 | LANGUAGE_SPANISH_URUGUAY = _gdi_.LANGUAGE_SPANISH_URUGUAY | |
2452 | LANGUAGE_SPANISH_US = _gdi_.LANGUAGE_SPANISH_US | |
2453 | LANGUAGE_SPANISH_VENEZUELA = _gdi_.LANGUAGE_SPANISH_VENEZUELA | |
2454 | LANGUAGE_SUNDANESE = _gdi_.LANGUAGE_SUNDANESE | |
2455 | LANGUAGE_SWAHILI = _gdi_.LANGUAGE_SWAHILI | |
2456 | LANGUAGE_SWEDISH = _gdi_.LANGUAGE_SWEDISH | |
2457 | LANGUAGE_SWEDISH_FINLAND = _gdi_.LANGUAGE_SWEDISH_FINLAND | |
2458 | LANGUAGE_TAGALOG = _gdi_.LANGUAGE_TAGALOG | |
2459 | LANGUAGE_TAJIK = _gdi_.LANGUAGE_TAJIK | |
2460 | LANGUAGE_TAMIL = _gdi_.LANGUAGE_TAMIL | |
2461 | LANGUAGE_TATAR = _gdi_.LANGUAGE_TATAR | |
2462 | LANGUAGE_TELUGU = _gdi_.LANGUAGE_TELUGU | |
2463 | LANGUAGE_THAI = _gdi_.LANGUAGE_THAI | |
2464 | LANGUAGE_TIBETAN = _gdi_.LANGUAGE_TIBETAN | |
2465 | LANGUAGE_TIGRINYA = _gdi_.LANGUAGE_TIGRINYA | |
2466 | LANGUAGE_TONGA = _gdi_.LANGUAGE_TONGA | |
2467 | LANGUAGE_TSONGA = _gdi_.LANGUAGE_TSONGA | |
2468 | LANGUAGE_TURKISH = _gdi_.LANGUAGE_TURKISH | |
2469 | LANGUAGE_TURKMEN = _gdi_.LANGUAGE_TURKMEN | |
2470 | LANGUAGE_TWI = _gdi_.LANGUAGE_TWI | |
2471 | LANGUAGE_UIGHUR = _gdi_.LANGUAGE_UIGHUR | |
2472 | LANGUAGE_UKRAINIAN = _gdi_.LANGUAGE_UKRAINIAN | |
2473 | LANGUAGE_URDU = _gdi_.LANGUAGE_URDU | |
2474 | LANGUAGE_URDU_INDIA = _gdi_.LANGUAGE_URDU_INDIA | |
2475 | LANGUAGE_URDU_PAKISTAN = _gdi_.LANGUAGE_URDU_PAKISTAN | |
2476 | LANGUAGE_UZBEK = _gdi_.LANGUAGE_UZBEK | |
2477 | LANGUAGE_UZBEK_CYRILLIC = _gdi_.LANGUAGE_UZBEK_CYRILLIC | |
2478 | LANGUAGE_UZBEK_LATIN = _gdi_.LANGUAGE_UZBEK_LATIN | |
2479 | LANGUAGE_VIETNAMESE = _gdi_.LANGUAGE_VIETNAMESE | |
2480 | LANGUAGE_VOLAPUK = _gdi_.LANGUAGE_VOLAPUK | |
2481 | LANGUAGE_WELSH = _gdi_.LANGUAGE_WELSH | |
2482 | LANGUAGE_WOLOF = _gdi_.LANGUAGE_WOLOF | |
2483 | LANGUAGE_XHOSA = _gdi_.LANGUAGE_XHOSA | |
2484 | LANGUAGE_YIDDISH = _gdi_.LANGUAGE_YIDDISH | |
2485 | LANGUAGE_YORUBA = _gdi_.LANGUAGE_YORUBA | |
2486 | LANGUAGE_ZHUANG = _gdi_.LANGUAGE_ZHUANG | |
2487 | LANGUAGE_ZULU = _gdi_.LANGUAGE_ZULU | |
2488 | LANGUAGE_USER_DEFINED = _gdi_.LANGUAGE_USER_DEFINED | |
2489 | class LanguageInfo(object): | |
093d3ff1 | 2490 | """Proxy of C++ LanguageInfo class""" |
d55e5bfc RD |
2491 | def __init__(self): raise RuntimeError, "No constructor defined" |
2492 | def __repr__(self): | |
2493 | return "<%s.%s; proxy of C++ wxLanguageInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2494 | Language = property(_gdi_.LanguageInfo_Language_get, _gdi_.LanguageInfo_Language_set) | |
2495 | CanonicalName = property(_gdi_.LanguageInfo_CanonicalName_get, _gdi_.LanguageInfo_CanonicalName_set) | |
2496 | Description = property(_gdi_.LanguageInfo_Description_get, _gdi_.LanguageInfo_Description_set) | |
2497 | ||
2498 | class LanguageInfoPtr(LanguageInfo): | |
2499 | def __init__(self, this): | |
2500 | self.this = this | |
2501 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2502 | self.__class__ = LanguageInfo | |
2503 | _gdi_.LanguageInfo_swigregister(LanguageInfoPtr) | |
2504 | ||
2505 | LOCALE_CAT_NUMBER = _gdi_.LOCALE_CAT_NUMBER | |
2506 | LOCALE_CAT_DATE = _gdi_.LOCALE_CAT_DATE | |
2507 | LOCALE_CAT_MONEY = _gdi_.LOCALE_CAT_MONEY | |
2508 | LOCALE_CAT_MAX = _gdi_.LOCALE_CAT_MAX | |
2509 | LOCALE_THOUSANDS_SEP = _gdi_.LOCALE_THOUSANDS_SEP | |
2510 | LOCALE_DECIMAL_POINT = _gdi_.LOCALE_DECIMAL_POINT | |
2511 | LOCALE_LOAD_DEFAULT = _gdi_.LOCALE_LOAD_DEFAULT | |
2512 | LOCALE_CONV_ENCODING = _gdi_.LOCALE_CONV_ENCODING | |
2513 | class Locale(object): | |
093d3ff1 | 2514 | """Proxy of C++ Locale class""" |
d55e5bfc RD |
2515 | def __repr__(self): |
2516 | return "<%s.%s; proxy of C++ wxLocale instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2517 | def __init__(self, *args, **kwargs): | |
79fccf9d | 2518 | """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale""" |
d55e5bfc RD |
2519 | newobj = _gdi_.new_Locale(*args, **kwargs) |
2520 | self.this = newobj.this | |
2521 | self.thisown = 1 | |
2522 | del newobj.thisown | |
2523 | def __del__(self, destroy=_gdi_.delete_Locale): | |
2524 | """__del__(self)""" | |
2525 | try: | |
2526 | if self.thisown: destroy(self) | |
2527 | except: pass | |
2528 | ||
2529 | def Init1(*args, **kwargs): | |
2530 | """ | |
2531 | Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString, | |
2532 | bool bLoadDefault=True, | |
2533 | bool bConvertEncoding=False) -> bool | |
2534 | """ | |
2535 | return _gdi_.Locale_Init1(*args, **kwargs) | |
2536 | ||
2537 | def Init2(*args, **kwargs): | |
2538 | """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool""" | |
2539 | return _gdi_.Locale_Init2(*args, **kwargs) | |
2540 | ||
2541 | def Init(self, *_args, **_kwargs): | |
2542 | if type(_args[0]) in [type(''), type(u'')]: | |
2543 | val = self.Init1(*_args, **_kwargs) | |
2544 | else: | |
2545 | val = self.Init2(*_args, **_kwargs) | |
2546 | return val | |
2547 | ||
2548 | def GetSystemLanguage(*args, **kwargs): | |
c24da6d6 | 2549 | """GetSystemLanguage() -> int""" |
d55e5bfc RD |
2550 | return _gdi_.Locale_GetSystemLanguage(*args, **kwargs) |
2551 | ||
2552 | GetSystemLanguage = staticmethod(GetSystemLanguage) | |
2553 | def GetSystemEncoding(*args, **kwargs): | |
c24da6d6 | 2554 | """GetSystemEncoding() -> int""" |
d55e5bfc RD |
2555 | return _gdi_.Locale_GetSystemEncoding(*args, **kwargs) |
2556 | ||
2557 | GetSystemEncoding = staticmethod(GetSystemEncoding) | |
2558 | def GetSystemEncodingName(*args, **kwargs): | |
c24da6d6 | 2559 | """GetSystemEncodingName() -> String""" |
d55e5bfc RD |
2560 | return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs) |
2561 | ||
2562 | GetSystemEncodingName = staticmethod(GetSystemEncodingName) | |
2563 | def IsOk(*args, **kwargs): | |
2564 | """IsOk(self) -> bool""" | |
2565 | return _gdi_.Locale_IsOk(*args, **kwargs) | |
2566 | ||
2567 | def __nonzero__(self): return self.IsOk() | |
2568 | def GetLocale(*args, **kwargs): | |
2569 | """GetLocale(self) -> String""" | |
2570 | return _gdi_.Locale_GetLocale(*args, **kwargs) | |
2571 | ||
2572 | def GetLanguage(*args, **kwargs): | |
2573 | """GetLanguage(self) -> int""" | |
2574 | return _gdi_.Locale_GetLanguage(*args, **kwargs) | |
2575 | ||
2576 | def GetSysName(*args, **kwargs): | |
2577 | """GetSysName(self) -> String""" | |
2578 | return _gdi_.Locale_GetSysName(*args, **kwargs) | |
2579 | ||
2580 | def GetCanonicalName(*args, **kwargs): | |
2581 | """GetCanonicalName(self) -> String""" | |
2582 | return _gdi_.Locale_GetCanonicalName(*args, **kwargs) | |
2583 | ||
2584 | def AddCatalogLookupPathPrefix(*args, **kwargs): | |
c24da6d6 | 2585 | """AddCatalogLookupPathPrefix(String prefix)""" |
d55e5bfc RD |
2586 | return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs) |
2587 | ||
2588 | AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix) | |
2589 | def AddCatalog(*args, **kwargs): | |
2590 | """AddCatalog(self, String szDomain) -> bool""" | |
2591 | return _gdi_.Locale_AddCatalog(*args, **kwargs) | |
2592 | ||
2593 | def IsLoaded(*args, **kwargs): | |
2594 | """IsLoaded(self, String szDomain) -> bool""" | |
2595 | return _gdi_.Locale_IsLoaded(*args, **kwargs) | |
2596 | ||
2597 | def GetLanguageInfo(*args, **kwargs): | |
c24da6d6 | 2598 | """GetLanguageInfo(int lang) -> LanguageInfo""" |
d55e5bfc RD |
2599 | return _gdi_.Locale_GetLanguageInfo(*args, **kwargs) |
2600 | ||
2601 | GetLanguageInfo = staticmethod(GetLanguageInfo) | |
2602 | def GetLanguageName(*args, **kwargs): | |
c24da6d6 | 2603 | """GetLanguageName(int lang) -> String""" |
d55e5bfc RD |
2604 | return _gdi_.Locale_GetLanguageName(*args, **kwargs) |
2605 | ||
2606 | GetLanguageName = staticmethod(GetLanguageName) | |
2607 | def FindLanguageInfo(*args, **kwargs): | |
c24da6d6 | 2608 | """FindLanguageInfo(String locale) -> LanguageInfo""" |
d55e5bfc RD |
2609 | return _gdi_.Locale_FindLanguageInfo(*args, **kwargs) |
2610 | ||
2611 | FindLanguageInfo = staticmethod(FindLanguageInfo) | |
2612 | def AddLanguage(*args, **kwargs): | |
c24da6d6 | 2613 | """AddLanguage(LanguageInfo info)""" |
d55e5bfc RD |
2614 | return _gdi_.Locale_AddLanguage(*args, **kwargs) |
2615 | ||
2616 | AddLanguage = staticmethod(AddLanguage) | |
2617 | def GetString(*args, **kwargs): | |
2618 | """GetString(self, String szOrigString, String szDomain=EmptyString) -> String""" | |
2619 | return _gdi_.Locale_GetString(*args, **kwargs) | |
2620 | ||
2621 | def GetName(*args, **kwargs): | |
2622 | """GetName(self) -> String""" | |
2623 | return _gdi_.Locale_GetName(*args, **kwargs) | |
2624 | ||
2625 | ||
2626 | class LocalePtr(Locale): | |
2627 | def __init__(self, this): | |
2628 | self.this = this | |
2629 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2630 | self.__class__ = Locale | |
2631 | _gdi_.Locale_swigregister(LocalePtr) | |
2632 | ||
2633 | def Locale_GetSystemLanguage(*args, **kwargs): | |
2634 | """Locale_GetSystemLanguage() -> int""" | |
2635 | return _gdi_.Locale_GetSystemLanguage(*args, **kwargs) | |
2636 | ||
2637 | def Locale_GetSystemEncoding(*args, **kwargs): | |
2638 | """Locale_GetSystemEncoding() -> int""" | |
2639 | return _gdi_.Locale_GetSystemEncoding(*args, **kwargs) | |
2640 | ||
2641 | def Locale_GetSystemEncodingName(*args, **kwargs): | |
2642 | """Locale_GetSystemEncodingName() -> String""" | |
2643 | return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs) | |
2644 | ||
2645 | def Locale_AddCatalogLookupPathPrefix(*args, **kwargs): | |
2646 | """Locale_AddCatalogLookupPathPrefix(String prefix)""" | |
2647 | return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs) | |
2648 | ||
2649 | def Locale_GetLanguageInfo(*args, **kwargs): | |
2650 | """Locale_GetLanguageInfo(int lang) -> LanguageInfo""" | |
2651 | return _gdi_.Locale_GetLanguageInfo(*args, **kwargs) | |
2652 | ||
2653 | def Locale_GetLanguageName(*args, **kwargs): | |
2654 | """Locale_GetLanguageName(int lang) -> String""" | |
2655 | return _gdi_.Locale_GetLanguageName(*args, **kwargs) | |
2656 | ||
2657 | def Locale_FindLanguageInfo(*args, **kwargs): | |
2658 | """Locale_FindLanguageInfo(String locale) -> LanguageInfo""" | |
2659 | return _gdi_.Locale_FindLanguageInfo(*args, **kwargs) | |
2660 | ||
2661 | def Locale_AddLanguage(*args, **kwargs): | |
2662 | """Locale_AddLanguage(LanguageInfo info)""" | |
2663 | return _gdi_.Locale_AddLanguage(*args, **kwargs) | |
2664 | ||
2665 | ||
2666 | def GetLocale(*args, **kwargs): | |
2667 | """GetLocale() -> Locale""" | |
2668 | return _gdi_.GetLocale(*args, **kwargs) | |
2669 | #--------------------------------------------------------------------------- | |
2670 | ||
2671 | CONVERT_STRICT = _gdi_.CONVERT_STRICT | |
2672 | CONVERT_SUBSTITUTE = _gdi_.CONVERT_SUBSTITUTE | |
2673 | PLATFORM_CURRENT = _gdi_.PLATFORM_CURRENT | |
2674 | PLATFORM_UNIX = _gdi_.PLATFORM_UNIX | |
2675 | PLATFORM_WINDOWS = _gdi_.PLATFORM_WINDOWS | |
2676 | PLATFORM_OS2 = _gdi_.PLATFORM_OS2 | |
2677 | PLATFORM_MAC = _gdi_.PLATFORM_MAC | |
2678 | class EncodingConverter(_core.Object): | |
093d3ff1 | 2679 | """Proxy of C++ EncodingConverter class""" |
d55e5bfc RD |
2680 | def __repr__(self): |
2681 | return "<%s.%s; proxy of C++ wxEncodingConverter instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2682 | def __init__(self, *args, **kwargs): | |
2683 | """__init__(self) -> EncodingConverter""" | |
2684 | newobj = _gdi_.new_EncodingConverter(*args, **kwargs) | |
2685 | self.this = newobj.this | |
2686 | self.thisown = 1 | |
2687 | del newobj.thisown | |
2688 | def __del__(self, destroy=_gdi_.delete_EncodingConverter): | |
2689 | """__del__(self)""" | |
2690 | try: | |
2691 | if self.thisown: destroy(self) | |
2692 | except: pass | |
2693 | ||
2694 | def Init(*args, **kwargs): | |
2695 | """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool""" | |
2696 | return _gdi_.EncodingConverter_Init(*args, **kwargs) | |
2697 | ||
2698 | def Convert(*args, **kwargs): | |
2699 | """Convert(self, String input) -> String""" | |
2700 | return _gdi_.EncodingConverter_Convert(*args, **kwargs) | |
2701 | ||
2702 | def GetPlatformEquivalents(*args, **kwargs): | |
c24da6d6 | 2703 | """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray""" |
d55e5bfc RD |
2704 | return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs) |
2705 | ||
2706 | GetPlatformEquivalents = staticmethod(GetPlatformEquivalents) | |
2707 | def GetAllEquivalents(*args, **kwargs): | |
c24da6d6 | 2708 | """GetAllEquivalents(int enc) -> wxFontEncodingArray""" |
d55e5bfc RD |
2709 | return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs) |
2710 | ||
2711 | GetAllEquivalents = staticmethod(GetAllEquivalents) | |
2712 | def CanConvert(*args, **kwargs): | |
c24da6d6 | 2713 | """CanConvert(int encIn, int encOut) -> bool""" |
d55e5bfc RD |
2714 | return _gdi_.EncodingConverter_CanConvert(*args, **kwargs) |
2715 | ||
2716 | CanConvert = staticmethod(CanConvert) | |
2717 | def __nonzero__(self): return self.IsOk() | |
2718 | ||
2719 | class EncodingConverterPtr(EncodingConverter): | |
2720 | def __init__(self, this): | |
2721 | self.this = this | |
2722 | if not hasattr(self,"thisown"): self.thisown = 0 | |
2723 | self.__class__ = EncodingConverter | |
2724 | _gdi_.EncodingConverter_swigregister(EncodingConverterPtr) | |
2725 | ||
2726 | def GetTranslation(*args): | |
2727 | """ | |
2728 | GetTranslation(String str) -> String | |
2729 | GetTranslation(String str, String strPlural, size_t n) -> String | |
2730 | """ | |
2731 | return _gdi_.GetTranslation(*args) | |
2732 | ||
2733 | def EncodingConverter_GetPlatformEquivalents(*args, **kwargs): | |
2734 | """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray""" | |
2735 | return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs) | |
2736 | ||
2737 | def EncodingConverter_GetAllEquivalents(*args, **kwargs): | |
2738 | """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray""" | |
2739 | return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs) | |
2740 | ||
2741 | def EncodingConverter_CanConvert(*args, **kwargs): | |
2742 | """EncodingConverter_CanConvert(int encIn, int encOut) -> bool""" | |
2743 | return _gdi_.EncodingConverter_CanConvert(*args, **kwargs) | |
2744 | ||
2745 | #---------------------------------------------------------------------------- | |
a07a67e6 | 2746 | # On MSW add the directory where the wxWidgets catalogs were installed |
d55e5bfc RD |
2747 | # to the default catalog path. |
2748 | if wx.Platform == "__WXMSW__": | |
2749 | import os | |
8fb0e70a RD |
2750 | _localedir = os.path.join(os.path.split(__file__)[0], "locale") |
2751 | Locale.AddCatalogLookupPathPrefix(_localedir) | |
d55e5bfc RD |
2752 | del os |
2753 | ||
2754 | #---------------------------------------------------------------------------- | |
2755 | ||
2756 | #--------------------------------------------------------------------------- | |
2757 | ||
2758 | class DC(_core.Object): | |
f5b96ee1 RD |
2759 | """ |
2760 | A wx.DC is a device context onto which graphics and text can be | |
2761 | drawn. It is intended to represent a number of output devices in a | |
2762 | generic way, so a window can have a device context associated with it, | |
2763 | and a printer also has a device context. In this way, the same piece | |
2764 | of code may write to a number of different devices, if the device | |
2765 | context is used as a parameter. | |
2766 | ||
2767 | Derived types of wxDC have documentation for specific features only, | |
2768 | so refer to this section for most device context information. | |
2769 | ||
2770 | The wx.DC class is abstract and can not be instantiated, you must use | |
2771 | one of the derived classes instead. Which one will depend on the | |
2772 | situation in which it is used. | |
2773 | """ | |
d55e5bfc RD |
2774 | def __init__(self): raise RuntimeError, "No constructor defined" |
2775 | def __repr__(self): | |
2776 | return "<%s.%s; proxy of C++ wxDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
2777 | def __del__(self, destroy=_gdi_.delete_DC): | |
2778 | """__del__(self)""" | |
2779 | try: | |
2780 | if self.thisown: destroy(self) | |
2781 | except: pass | |
2782 | ||
2783 | def BeginDrawing(*args, **kwargs): | |
f5b96ee1 RD |
2784 | """ |
2785 | BeginDrawing(self) | |
2786 | ||
2787 | Allows for optimization of drawing code on platforms that need it. On | |
2788 | other platforms this is just an empty function and is harmless. To | |
2789 | take advantage of this postential optimization simply enclose each | |
2790 | group of calls to the drawing primitives within calls to | |
2791 | `BeginDrawing` and `EndDrawing`. | |
2792 | """ | |
d55e5bfc RD |
2793 | return _gdi_.DC_BeginDrawing(*args, **kwargs) |
2794 | ||
2795 | def EndDrawing(*args, **kwargs): | |
f5b96ee1 RD |
2796 | """ |
2797 | EndDrawing(self) | |
2798 | ||
2799 | Ends the group of drawing primitives started with `BeginDrawing`, and | |
2800 | invokes whatever optimization is available for this DC type on the | |
2801 | current platform. | |
2802 | """ | |
d55e5bfc RD |
2803 | return _gdi_.DC_EndDrawing(*args, **kwargs) |
2804 | ||
d55e5bfc | 2805 | def FloodFill(*args, **kwargs): |
f5b96ee1 RD |
2806 | """ |
2807 | FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool | |
2808 | ||
2809 | Flood fills the device context starting from the given point, using | |
2810 | the current brush colour, and using a style: | |
2811 | ||
2812 | - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than | |
2813 | the given colour is encountered. | |
2814 | ||
2815 | - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given | |
2816 | colour. | |
2817 | ||
2818 | Returns False if the operation failed. | |
2819 | ||
2820 | Note: The present implementation for non-Windows platforms may fail to | |
2821 | find colour borders if the pixels do not match the colour | |
2822 | exactly. However the function will still return true. | |
2823 | """ | |
d55e5bfc RD |
2824 | return _gdi_.DC_FloodFill(*args, **kwargs) |
2825 | ||
c24da6d6 | 2826 | def FloodFillPoint(*args, **kwargs): |
f5b96ee1 RD |
2827 | """ |
2828 | FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool | |
2829 | ||
2830 | Flood fills the device context starting from the given point, using | |
2831 | the current brush colour, and using a style: | |
2832 | ||
2833 | - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than | |
2834 | the given colour is encountered. | |
2835 | ||
2836 | - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given | |
2837 | colour. | |
2838 | ||
2839 | Returns False if the operation failed. | |
2840 | ||
2841 | Note: The present implementation for non-Windows platforms may fail to | |
2842 | find colour borders if the pixels do not match the colour | |
2843 | exactly. However the function will still return true. | |
2844 | """ | |
c24da6d6 | 2845 | return _gdi_.DC_FloodFillPoint(*args, **kwargs) |
d55e5bfc RD |
2846 | |
2847 | def GetPixel(*args, **kwargs): | |
f5b96ee1 RD |
2848 | """ |
2849 | GetPixel(self, int x, int y) -> Colour | |
2850 | ||
2851 | Gets the colour at the specified location on the DC. | |
2852 | """ | |
d55e5bfc RD |
2853 | return _gdi_.DC_GetPixel(*args, **kwargs) |
2854 | ||
c24da6d6 RD |
2855 | def GetPixelPoint(*args, **kwargs): |
2856 | """GetPixelPoint(self, Point pt) -> Colour""" | |
2857 | return _gdi_.DC_GetPixelPoint(*args, **kwargs) | |
d55e5bfc RD |
2858 | |
2859 | def DrawLine(*args, **kwargs): | |
f5b96ee1 RD |
2860 | """ |
2861 | DrawLine(self, int x1, int y1, int x2, int y2) | |
2862 | ||
2863 | Draws a line from the first point to the second. The current pen is | |
2864 | used for drawing the line. Note that the second point is *not* part of | |
2865 | the line and is not drawn by this function (this is consistent with | |
2866 | the behaviour of many other toolkits). | |
2867 | """ | |
d55e5bfc RD |
2868 | return _gdi_.DC_DrawLine(*args, **kwargs) |
2869 | ||
c24da6d6 | 2870 | def DrawLinePoint(*args, **kwargs): |
f5b96ee1 RD |
2871 | """ |
2872 | DrawLinePoint(self, Point pt1, Point pt2) | |
2873 | ||
2874 | Draws a line from the first point to the second. The current pen is | |
2875 | used for drawing the line. Note that the second point is *not* part of | |
2876 | the line and is not drawn by this function (this is consistent with | |
2877 | the behaviour of many other toolkits). | |
2878 | """ | |
c24da6d6 | 2879 | return _gdi_.DC_DrawLinePoint(*args, **kwargs) |
d55e5bfc RD |
2880 | |
2881 | def CrossHair(*args, **kwargs): | |
f5b96ee1 RD |
2882 | """ |
2883 | CrossHair(self, int x, int y) | |
2884 | ||
2885 | Displays a cross hair using the current pen. This is a vertical and | |
2886 | horizontal line the height and width of the window, centred on the | |
2887 | given point. | |
2888 | """ | |
d55e5bfc RD |
2889 | return _gdi_.DC_CrossHair(*args, **kwargs) |
2890 | ||
c24da6d6 | 2891 | def CrossHairPoint(*args, **kwargs): |
f5b96ee1 RD |
2892 | """ |
2893 | CrossHairPoint(self, Point pt) | |
2894 | ||
2895 | Displays a cross hair using the current pen. This is a vertical and | |
2896 | horizontal line the height and width of the window, centred on the | |
2897 | given point. | |
2898 | """ | |
c24da6d6 | 2899 | return _gdi_.DC_CrossHairPoint(*args, **kwargs) |
d55e5bfc RD |
2900 | |
2901 | def DrawArc(*args, **kwargs): | |
f5b96ee1 RD |
2902 | """ |
2903 | DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc) | |
2904 | ||
2905 | Draws an arc of a circle, centred on the *center* point (xc, yc), from | |
2906 | the first point to the second. The current pen is used for the outline | |
2907 | and the current brush for filling the shape. | |
2908 | ||
2909 | The arc is drawn in an anticlockwise direction from the start point to | |
2910 | the end point. | |
2911 | """ | |
d55e5bfc RD |
2912 | return _gdi_.DC_DrawArc(*args, **kwargs) |
2913 | ||
c24da6d6 | 2914 | def DrawArcPoint(*args, **kwargs): |
f5b96ee1 RD |
2915 | """ |
2916 | DrawArcPoint(self, Point pt1, Point pt2, Point center) | |
2917 | ||
2918 | Draws an arc of a circle, centred on the *center* point (xc, yc), from | |
2919 | the first point to the second. The current pen is used for the outline | |
2920 | and the current brush for filling the shape. | |
2921 | ||
2922 | The arc is drawn in an anticlockwise direction from the start point to | |
2923 | the end point. | |
2924 | """ | |
c24da6d6 | 2925 | return _gdi_.DC_DrawArcPoint(*args, **kwargs) |
d55e5bfc RD |
2926 | |
2927 | def DrawCheckMark(*args, **kwargs): | |
f5b96ee1 RD |
2928 | """ |
2929 | DrawCheckMark(self, int x, int y, int width, int height) | |
2930 | ||
2931 | Draws a check mark inside the given rectangle. | |
2932 | """ | |
d55e5bfc RD |
2933 | return _gdi_.DC_DrawCheckMark(*args, **kwargs) |
2934 | ||
c24da6d6 | 2935 | def DrawCheckMarkRect(*args, **kwargs): |
f5b96ee1 RD |
2936 | """ |
2937 | DrawCheckMarkRect(self, Rect rect) | |
2938 | ||
2939 | Draws a check mark inside the given rectangle. | |
2940 | """ | |
c24da6d6 | 2941 | return _gdi_.DC_DrawCheckMarkRect(*args, **kwargs) |
d55e5bfc RD |
2942 | |
2943 | def DrawEllipticArc(*args, **kwargs): | |
f5b96ee1 RD |
2944 | """ |
2945 | DrawEllipticArc(self, int x, int y, int w, int h, double start, double end) | |
2946 | ||
2947 | Draws an arc of an ellipse, with the given rectangle defining the | |
2948 | bounds of the ellipse. The current pen is used for drawing the arc and | |
2949 | the current brush is used for drawing the pie. | |
2950 | ||
2951 | The *start* and *end* parameters specify the start and end of the arc | |
2952 | relative to the three-o'clock position from the center of the | |
2953 | rectangle. Angles are specified in degrees (360 is a complete | |
2954 | circle). Positive values mean counter-clockwise motion. If start is | |
2955 | equal to end, a complete ellipse will be drawn. | |
2956 | """ | |
d55e5bfc RD |
2957 | return _gdi_.DC_DrawEllipticArc(*args, **kwargs) |
2958 | ||
c24da6d6 | 2959 | def DrawEllipticArcPointSize(*args, **kwargs): |
f5b96ee1 RD |
2960 | """ |
2961 | DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end) | |
2962 | ||
2963 | Draws an arc of an ellipse, with the given rectangle defining the | |
2964 | bounds of the ellipse. The current pen is used for drawing the arc and | |
2965 | the current brush is used for drawing the pie. | |
2966 | ||
2967 | The *start* and *end* parameters specify the start and end of the arc | |
2968 | relative to the three-o'clock position from the center of the | |
2969 | rectangle. Angles are specified in degrees (360 is a complete | |
2970 | circle). Positive values mean counter-clockwise motion. If start is | |
2971 | equal to end, a complete ellipse will be drawn. | |
2972 | """ | |
c24da6d6 | 2973 | return _gdi_.DC_DrawEllipticArcPointSize(*args, **kwargs) |
d55e5bfc RD |
2974 | |
2975 | def DrawPoint(*args, **kwargs): | |
f5b96ee1 RD |
2976 | """ |
2977 | DrawPoint(self, int x, int y) | |
2978 | ||
2979 | Draws a point using the current pen. | |
2980 | """ | |
d55e5bfc RD |
2981 | return _gdi_.DC_DrawPoint(*args, **kwargs) |
2982 | ||
c24da6d6 | 2983 | def DrawPointPoint(*args, **kwargs): |
f5b96ee1 RD |
2984 | """ |
2985 | DrawPointPoint(self, Point pt) | |
2986 | ||
2987 | Draws a point using the current pen. | |
2988 | """ | |
c24da6d6 | 2989 | return _gdi_.DC_DrawPointPoint(*args, **kwargs) |
d55e5bfc RD |
2990 | |
2991 | def DrawRectangle(*args, **kwargs): | |
f5b96ee1 RD |
2992 | """ |
2993 | DrawRectangle(self, int x, int y, int width, int height) | |
2994 | ||
2995 | Draws a rectangle with the given top left corner, and with the given | |
2996 | size. The current pen is used for the outline and the current brush | |
2997 | for filling the shape. | |
2998 | """ | |
d55e5bfc RD |
2999 | return _gdi_.DC_DrawRectangle(*args, **kwargs) |
3000 | ||
3001 | def DrawRectangleRect(*args, **kwargs): | |
f5b96ee1 RD |
3002 | """ |
3003 | DrawRectangleRect(self, Rect rect) | |
3004 | ||
3005 | Draws a rectangle with the given top left corner, and with the given | |
3006 | size. The current pen is used for the outline and the current brush | |
3007 | for filling the shape. | |
3008 | """ | |
d55e5bfc RD |
3009 | return _gdi_.DC_DrawRectangleRect(*args, **kwargs) |
3010 | ||
c24da6d6 | 3011 | def DrawRectanglePointSize(*args, **kwargs): |
f5b96ee1 RD |
3012 | """ |
3013 | DrawRectanglePointSize(self, Point pt, Size sz) | |
3014 | ||
3015 | Draws a rectangle with the given top left corner, and with the given | |
3016 | size. The current pen is used for the outline and the current brush | |
3017 | for filling the shape. | |
3018 | """ | |
c24da6d6 | 3019 | return _gdi_.DC_DrawRectanglePointSize(*args, **kwargs) |
d55e5bfc RD |
3020 | |
3021 | def DrawRoundedRectangle(*args, **kwargs): | |
f5b96ee1 RD |
3022 | """ |
3023 | DrawRoundedRectangle(self, int x, int y, int width, int height, double radius) | |
3024 | ||
3025 | Draws a rectangle with the given top left corner, and with the given | |
3026 | size. The corners are quarter-circles using the given radius. The | |
3027 | current pen is used for the outline and the current brush for filling | |
3028 | the shape. | |
3029 | ||
3030 | If radius is positive, the value is assumed to be the radius of the | |
3031 | rounded corner. If radius is negative, the absolute value is assumed | |
3032 | to be the proportion of the smallest dimension of the rectangle. This | |
3033 | means that the corner can be a sensible size relative to the size of | |
3034 | the rectangle, and also avoids the strange effects X produces when the | |
3035 | corners are too big for the rectangle. | |
3036 | """ | |
d55e5bfc RD |
3037 | return _gdi_.DC_DrawRoundedRectangle(*args, **kwargs) |
3038 | ||
3039 | def DrawRoundedRectangleRect(*args, **kwargs): | |
f5b96ee1 RD |
3040 | """ |
3041 | DrawRoundedRectangleRect(self, Rect r, double radius) | |
3042 | ||
3043 | Draws a rectangle with the given top left corner, and with the given | |
3044 | size. The corners are quarter-circles using the given radius. The | |
3045 | current pen is used for the outline and the current brush for filling | |
3046 | the shape. | |
3047 | ||
3048 | If radius is positive, the value is assumed to be the radius of the | |
3049 | rounded corner. If radius is negative, the absolute value is assumed | |
3050 | to be the proportion of the smallest dimension of the rectangle. This | |
3051 | means that the corner can be a sensible size relative to the size of | |
3052 | the rectangle, and also avoids the strange effects X produces when the | |
3053 | corners are too big for the rectangle. | |
3054 | """ | |
d55e5bfc RD |
3055 | return _gdi_.DC_DrawRoundedRectangleRect(*args, **kwargs) |
3056 | ||
c24da6d6 | 3057 | def DrawRoundedRectanglePointSize(*args, **kwargs): |
f5b96ee1 RD |
3058 | """ |
3059 | DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius) | |
3060 | ||
3061 | Draws a rectangle with the given top left corner, and with the given | |
3062 | size. The corners are quarter-circles using the given radius. The | |
3063 | current pen is used for the outline and the current brush for filling | |
3064 | the shape. | |
3065 | ||
3066 | If radius is positive, the value is assumed to be the radius of the | |
3067 | rounded corner. If radius is negative, the absolute value is assumed | |
3068 | to be the proportion of the smallest dimension of the rectangle. This | |
3069 | means that the corner can be a sensible size relative to the size of | |
3070 | the rectangle, and also avoids the strange effects X produces when the | |
3071 | corners are too big for the rectangle. | |
3072 | """ | |
c24da6d6 | 3073 | return _gdi_.DC_DrawRoundedRectanglePointSize(*args, **kwargs) |
d55e5bfc RD |
3074 | |
3075 | def DrawCircle(*args, **kwargs): | |
f5b96ee1 RD |
3076 | """ |
3077 | DrawCircle(self, int x, int y, int radius) | |
3078 | ||
3079 | Draws a circle with the given center point and radius. The current | |
3080 | pen is used for the outline and the current brush for filling the | |
3081 | shape. | |
3082 | """ | |
d55e5bfc RD |
3083 | return _gdi_.DC_DrawCircle(*args, **kwargs) |
3084 | ||
c24da6d6 | 3085 | def DrawCirclePoint(*args, **kwargs): |
f5b96ee1 RD |
3086 | """ |
3087 | DrawCirclePoint(self, Point pt, int radius) | |
3088 | ||
3089 | Draws a circle with the given center point and radius. The current | |
3090 | pen is used for the outline and the current brush for filling the | |
3091 | shape. | |
3092 | """ | |
c24da6d6 | 3093 | return _gdi_.DC_DrawCirclePoint(*args, **kwargs) |
d55e5bfc RD |
3094 | |
3095 | def DrawEllipse(*args, **kwargs): | |
f5b96ee1 RD |
3096 | """ |
3097 | DrawEllipse(self, int x, int y, int width, int height) | |
3098 | ||
3099 | Draws an ellipse contained in the specified rectangle. The current pen | |
3100 | is used for the outline and the current brush for filling the shape. | |
3101 | """ | |
d55e5bfc RD |
3102 | return _gdi_.DC_DrawEllipse(*args, **kwargs) |
3103 | ||
3104 | def DrawEllipseRect(*args, **kwargs): | |
f5b96ee1 RD |
3105 | """ |
3106 | DrawEllipseRect(self, Rect rect) | |
3107 | ||
3108 | Draws an ellipse contained in the specified rectangle. The current pen | |
3109 | is used for the outline and the current brush for filling the shape. | |
3110 | """ | |
d55e5bfc RD |
3111 | return _gdi_.DC_DrawEllipseRect(*args, **kwargs) |
3112 | ||
c24da6d6 | 3113 | def DrawEllipsePointSize(*args, **kwargs): |
f5b96ee1 RD |
3114 | """ |
3115 | DrawEllipsePointSize(self, Point pt, Size sz) | |
3116 | ||
3117 | Draws an ellipse contained in the specified rectangle. The current pen | |
3118 | is used for the outline and the current brush for filling the shape. | |
3119 | """ | |
c24da6d6 | 3120 | return _gdi_.DC_DrawEllipsePointSize(*args, **kwargs) |
d55e5bfc RD |
3121 | |
3122 | def DrawIcon(*args, **kwargs): | |
f5b96ee1 RD |
3123 | """ |
3124 | DrawIcon(self, Icon icon, int x, int y) | |
3125 | ||
3126 | Draw an icon on the display (does nothing if the device context is | |
3127 | PostScript). This can be the simplest way of drawing bitmaps on a | |
3128 | window. | |
3129 | """ | |
d55e5bfc RD |
3130 | return _gdi_.DC_DrawIcon(*args, **kwargs) |
3131 | ||
c24da6d6 | 3132 | def DrawIconPoint(*args, **kwargs): |
f5b96ee1 RD |
3133 | """ |
3134 | DrawIconPoint(self, Icon icon, Point pt) | |
3135 | ||
3136 | Draw an icon on the display (does nothing if the device context is | |
3137 | PostScript). This can be the simplest way of drawing bitmaps on a | |
3138 | window. | |
3139 | """ | |
c24da6d6 | 3140 | return _gdi_.DC_DrawIconPoint(*args, **kwargs) |
d55e5bfc RD |
3141 | |
3142 | def DrawBitmap(*args, **kwargs): | |
f5b96ee1 RD |
3143 | """ |
3144 | DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False) | |
3145 | ||
3146 | Draw a bitmap on the device context at the specified point. If | |
3147 | *transparent* is true and the bitmap has a transparency mask, (or | |
3148 | alpha channel on the platforms that support it) then the bitmap will | |
3149 | be drawn transparently. | |
3150 | """ | |
d55e5bfc RD |
3151 | return _gdi_.DC_DrawBitmap(*args, **kwargs) |
3152 | ||
c24da6d6 | 3153 | def DrawBitmapPoint(*args, **kwargs): |
f5b96ee1 RD |
3154 | """ |
3155 | DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False) | |
3156 | ||
3157 | Draw a bitmap on the device context at the specified point. If | |
3158 | *transparent* is true and the bitmap has a transparency mask, (or | |
3159 | alpha channel on the platforms that support it) then the bitmap will | |
3160 | be drawn transparently. | |
3161 | """ | |
c24da6d6 | 3162 | return _gdi_.DC_DrawBitmapPoint(*args, **kwargs) |
d55e5bfc RD |
3163 | |
3164 | def DrawText(*args, **kwargs): | |
f5b96ee1 RD |
3165 | """ |
3166 | DrawText(self, String text, int x, int y) | |
3167 | ||
3168 | Draws a text string at the specified point, using the current text | |
3169 | font, and the current text foreground and background colours. | |
3170 | ||
3171 | The coordinates refer to the top-left corner of the rectangle bounding | |
3172 | the string. See `GetTextExtent` for how to get the dimensions of a | |
3173 | text string, which can be used to position the text more precisely. | |
3174 | ||
3175 | **NOTE**: under wxGTK the current logical function is used by this | |
3176 | function but it is ignored by wxMSW. Thus, you should avoid using | |
3177 | logical functions with this function in portable programs. | |
3178 | """ | |
d55e5bfc RD |
3179 | return _gdi_.DC_DrawText(*args, **kwargs) |
3180 | ||
c24da6d6 | 3181 | def DrawTextPoint(*args, **kwargs): |
f5b96ee1 RD |
3182 | """ |
3183 | DrawTextPoint(self, String text, Point pt) | |
3184 | ||
3185 | Draws a text string at the specified point, using the current text | |
3186 | font, and the current text foreground and background colours. | |
3187 | ||
3188 | The coordinates refer to the top-left corner of the rectangle bounding | |
3189 | the string. See `GetTextExtent` for how to get the dimensions of a | |
3190 | text string, which can be used to position the text more precisely. | |
3191 | ||
3192 | **NOTE**: under wxGTK the current logical function is used by this | |
3193 | function but it is ignored by wxMSW. Thus, you should avoid using | |
3194 | logical functions with this function in portable programs. | |
3195 | """ | |
c24da6d6 | 3196 | return _gdi_.DC_DrawTextPoint(*args, **kwargs) |
d55e5bfc RD |
3197 | |
3198 | def DrawRotatedText(*args, **kwargs): | |
f5b96ee1 RD |
3199 | """ |
3200 | DrawRotatedText(self, String text, int x, int y, double angle) | |
3201 | ||
3202 | Draws the text rotated by *angle* degrees, if supported by the platform. | |
3203 | ||
3204 | **NOTE**: Under Win9x only TrueType fonts can be drawn by this | |
3205 | function. In particular, a font different from ``wx.NORMAL_FONT`` | |
3206 | should be used as the it is not normally a TrueType | |
3207 | font. ``wx.SWISS_FONT`` is an example of a font which is. | |
3208 | """ | |
d55e5bfc RD |
3209 | return _gdi_.DC_DrawRotatedText(*args, **kwargs) |
3210 | ||
c24da6d6 | 3211 | def DrawRotatedTextPoint(*args, **kwargs): |
f5b96ee1 RD |
3212 | """ |
3213 | DrawRotatedTextPoint(self, String text, Point pt, double angle) | |
3214 | ||
3215 | Draws the text rotated by *angle* degrees, if supported by the platform. | |
3216 | ||
3217 | **NOTE**: Under Win9x only TrueType fonts can be drawn by this | |
3218 | function. In particular, a font different from ``wx.NORMAL_FONT`` | |
3219 | should be used as the it is not normally a TrueType | |
3220 | font. ``wx.SWISS_FONT`` is an example of a font which is. | |
3221 | """ | |
c24da6d6 RD |
3222 | return _gdi_.DC_DrawRotatedTextPoint(*args, **kwargs) |
3223 | ||
3224 | def Blit(*args, **kwargs): | |
d55e5bfc | 3225 | """ |
c24da6d6 | 3226 | Blit(self, int xdest, int ydest, int width, int height, DC source, |
d55e5bfc RD |
3227 | int xsrc, int ysrc, int rop=COPY, bool useMask=False, |
3228 | int xsrcMask=-1, int ysrcMask=-1) -> bool | |
f5b96ee1 RD |
3229 | |
3230 | Copy from a source DC to this DC. Parameters specify the destination | |
3231 | coordinates, size of area to copy, source DC, source coordinates, | |
3232 | logical function, whether to use a bitmap mask, and mask source | |
3233 | position. | |
d55e5bfc | 3234 | """ |
c24da6d6 | 3235 | return _gdi_.DC_Blit(*args, **kwargs) |
d55e5bfc | 3236 | |
c24da6d6 | 3237 | def BlitPointSize(*args, **kwargs): |
d55e5bfc | 3238 | """ |
c24da6d6 | 3239 | BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY, |
d55e5bfc | 3240 | bool useMask=False, Point srcPtMask=DefaultPosition) -> bool |
f5b96ee1 RD |
3241 | |
3242 | Copy from a source DC to this DC. Parameters specify the destination | |
3243 | coordinates, size of area to copy, source DC, source coordinates, | |
3244 | logical function, whether to use a bitmap mask, and mask source | |
3245 | position. | |
d55e5bfc | 3246 | """ |
c24da6d6 RD |
3247 | return _gdi_.DC_BlitPointSize(*args, **kwargs) |
3248 | ||
3249 | def SetClippingRegion(*args, **kwargs): | |
f5b96ee1 RD |
3250 | """ |
3251 | SetClippingRegion(self, int x, int y, int width, int height) | |
3252 | ||
3253 | Sets the clipping region for this device context to the intersection | |
3254 | of the given region described by the parameters of this method and the | |
3255 | previously set clipping region. You should call `DestroyClippingRegion` | |
3256 | if you want to set the clipping region exactly to the region | |
3257 | specified. | |
3258 | ||
3259 | The clipping region is an area to which drawing is | |
3260 | restricted. Possible uses for the clipping region are for clipping | |
3261 | text or for speeding up window redraws when only a known area of the | |
3262 | screen is damaged. | |
3263 | """ | |
c24da6d6 RD |
3264 | return _gdi_.DC_SetClippingRegion(*args, **kwargs) |
3265 | ||
3266 | def SetClippingRegionPointSize(*args, **kwargs): | |
f5b96ee1 RD |
3267 | """ |
3268 | SetClippingRegionPointSize(self, Point pt, Size sz) | |
3269 | ||
3270 | Sets the clipping region for this device context to the intersection | |
3271 | of the given region described by the parameters of this method and the | |
3272 | previously set clipping region. You should call `DestroyClippingRegion` | |
3273 | if you want to set the clipping region exactly to the region | |
3274 | specified. | |
3275 | ||
3276 | The clipping region is an area to which drawing is | |
3277 | restricted. Possible uses for the clipping region are for clipping | |
3278 | text or for speeding up window redraws when only a known area of the | |
3279 | screen is damaged. | |
3280 | """ | |
c24da6d6 RD |
3281 | return _gdi_.DC_SetClippingRegionPointSize(*args, **kwargs) |
3282 | ||
3283 | def SetClippingRegionAsRegion(*args, **kwargs): | |
f5b96ee1 RD |
3284 | """ |
3285 | SetClippingRegionAsRegion(self, Region region) | |
3286 | ||
3287 | Sets the clipping region for this device context to the intersection | |
3288 | of the given region described by the parameters of this method and the | |
3289 | previously set clipping region. You should call `DestroyClippingRegion` | |
3290 | if you want to set the clipping region exactly to the region | |
3291 | specified. | |
3292 | ||
3293 | The clipping region is an area to which drawing is | |
3294 | restricted. Possible uses for the clipping region are for clipping | |
3295 | text or for speeding up window redraws when only a known area of the | |
3296 | screen is damaged. | |
3297 | """ | |
c24da6d6 RD |
3298 | return _gdi_.DC_SetClippingRegionAsRegion(*args, **kwargs) |
3299 | ||
3300 | def SetClippingRect(*args, **kwargs): | |
f5b96ee1 RD |
3301 | """ |
3302 | SetClippingRect(self, Rect rect) | |
3303 | ||
3304 | Sets the clipping region for this device context to the intersection | |
3305 | of the given region described by the parameters of this method and the | |
3306 | previously set clipping region. You should call `DestroyClippingRegion` | |
3307 | if you want to set the clipping region exactly to the region | |
3308 | specified. | |
3309 | ||
3310 | The clipping region is an area to which drawing is | |
3311 | restricted. Possible uses for the clipping region are for clipping | |
3312 | text or for speeding up window redraws when only a known area of the | |
3313 | screen is damaged. | |
3314 | """ | |
c24da6d6 | 3315 | return _gdi_.DC_SetClippingRect(*args, **kwargs) |
d55e5bfc RD |
3316 | |
3317 | def DrawLines(*args, **kwargs): | |
f5b96ee1 RD |
3318 | """ |
3319 | DrawLines(self, List points, int xoffset=0, int yoffset=0) | |
3320 | ||
3321 | Draws lines using a sequence of `wx.Point` objects, adding the | |
3322 | optional offset coordinate. The current pen is used for drawing the | |
3323 | lines. | |
3324 | """ | |
d55e5bfc RD |
3325 | return _gdi_.DC_DrawLines(*args, **kwargs) |
3326 | ||
3327 | def DrawPolygon(*args, **kwargs): | |
3328 | """ | |
f5b96ee1 | 3329 | DrawPolygon(self, List points, int xoffset=0, int yoffset=0, |
d55e5bfc | 3330 | int fillStyle=ODDEVEN_RULE) |
f5b96ee1 RD |
3331 | |
3332 | Draws a filled polygon using a sequence of `wx.Point` objects, adding | |
3333 | the optional offset coordinate. The last argument specifies the fill | |
3334 | rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``. | |
3335 | ||
3336 | The current pen is used for drawing the outline, and the current brush | |
3337 | for filling the shape. Using a transparent brush suppresses | |
3338 | filling. Note that wxWidgets automatically closes the first and last | |
3339 | points. | |
d55e5bfc RD |
3340 | """ |
3341 | return _gdi_.DC_DrawPolygon(*args, **kwargs) | |
3342 | ||
3343 | def DrawLabel(*args, **kwargs): | |
3344 | """ | |
3345 | DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP, | |
3346 | int indexAccel=-1) | |
f5b96ee1 RD |
3347 | |
3348 | Draw *text* within the specified rectangle, abiding by the alignment | |
3349 | flags. Will additionally emphasize the character at *indexAccel* if | |
3350 | it is not -1. | |
d55e5bfc RD |
3351 | """ |
3352 | return _gdi_.DC_DrawLabel(*args, **kwargs) | |
3353 | ||
3354 | def DrawImageLabel(*args, **kwargs): | |
3355 | """ | |
3356 | DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP, | |
3357 | int indexAccel=-1) -> Rect | |
f5b96ee1 RD |
3358 | |
3359 | Draw *text* and an image (which may be ``wx.NullBitmap`` to skip | |
3360 | drawing it) within the specified rectangle, abiding by the alignment | |
3361 | flags. Will additionally emphasize the character at *indexAccel* if | |
3362 | it is not -1. Returns the bounding rectangle. | |
d55e5bfc RD |
3363 | """ |
3364 | return _gdi_.DC_DrawImageLabel(*args, **kwargs) | |
3365 | ||
3366 | def DrawSpline(*args, **kwargs): | |
f5b96ee1 RD |
3367 | """ |
3368 | DrawSpline(self, List points) | |
3369 | ||
3370 | Draws a spline between all given control points, (a list of `wx.Point` | |
3371 | objects) using the current pen. The spline is drawn using a series of | |
3372 | lines, using an algorithm taken from the X drawing program 'XFIG'. | |
3373 | """ | |
d55e5bfc RD |
3374 | return _gdi_.DC_DrawSpline(*args, **kwargs) |
3375 | ||
3376 | def Clear(*args, **kwargs): | |
f5b96ee1 RD |
3377 | """ |
3378 | Clear(self) | |
3379 | ||
3380 | Clears the device context using the current background brush. | |
3381 | """ | |
d55e5bfc RD |
3382 | return _gdi_.DC_Clear(*args, **kwargs) |
3383 | ||
3384 | def StartDoc(*args, **kwargs): | |
f5b96ee1 RD |
3385 | """ |
3386 | StartDoc(self, String message) -> bool | |
3387 | ||
3388 | Starts a document (only relevant when outputting to a | |
3389 | printer). *Message* is a message to show whilst printing. | |
3390 | """ | |
d55e5bfc RD |
3391 | return _gdi_.DC_StartDoc(*args, **kwargs) |
3392 | ||
3393 | def EndDoc(*args, **kwargs): | |
f5b96ee1 RD |
3394 | """ |
3395 | EndDoc(self) | |
3396 | ||
3397 | Ends a document (only relevant when outputting to a printer). | |
3398 | """ | |
d55e5bfc RD |
3399 | return _gdi_.DC_EndDoc(*args, **kwargs) |
3400 | ||
3401 | def StartPage(*args, **kwargs): | |
f5b96ee1 RD |
3402 | """ |
3403 | StartPage(self) | |
3404 | ||
3405 | Starts a document page (only relevant when outputting to a printer). | |
3406 | """ | |
d55e5bfc RD |
3407 | return _gdi_.DC_StartPage(*args, **kwargs) |
3408 | ||
3409 | def EndPage(*args, **kwargs): | |
f5b96ee1 RD |
3410 | """ |
3411 | EndPage(self) | |
3412 | ||
3413 | Ends a document page (only relevant when outputting to a printer). | |
3414 | """ | |
d55e5bfc RD |
3415 | return _gdi_.DC_EndPage(*args, **kwargs) |
3416 | ||
3417 | def SetFont(*args, **kwargs): | |
f5b96ee1 RD |
3418 | """ |
3419 | SetFont(self, Font font) | |
3420 | ||
3421 | Sets the current font for the DC. It must be a valid font, in | |
3422 | particular you should not pass ``wx.NullFont`` to this method. | |
3423 | """ | |
d55e5bfc RD |
3424 | return _gdi_.DC_SetFont(*args, **kwargs) |
3425 | ||
3426 | def SetPen(*args, **kwargs): | |
f5b96ee1 RD |
3427 | """ |
3428 | SetPen(self, Pen pen) | |
3429 | ||
3430 | Sets the current pen for the DC. | |
3431 | ||
3432 | If the argument is ``wx.NullPen``, the current pen is selected out of the | |
3433 | device context, and the original pen restored. | |
3434 | """ | |
d55e5bfc RD |
3435 | return _gdi_.DC_SetPen(*args, **kwargs) |
3436 | ||
3437 | def SetBrush(*args, **kwargs): | |
f5b96ee1 RD |
3438 | """ |
3439 | SetBrush(self, Brush brush) | |
3440 | ||
3441 | Sets the current brush for the DC. | |
3442 | ||
3443 | If the argument is ``wx.NullBrush``, the current brush is selected out | |
3444 | of the device context, and the original brush restored, allowing the | |
3445 | current brush to be destroyed safely. | |
3446 | """ | |
d55e5bfc RD |
3447 | return _gdi_.DC_SetBrush(*args, **kwargs) |
3448 | ||
3449 | def SetBackground(*args, **kwargs): | |
f5b96ee1 RD |
3450 | """ |
3451 | SetBackground(self, Brush brush) | |
3452 | ||
3453 | Sets the current background brush for the DC. | |
3454 | """ | |
d55e5bfc RD |
3455 | return _gdi_.DC_SetBackground(*args, **kwargs) |
3456 | ||
3457 | def SetBackgroundMode(*args, **kwargs): | |
f5b96ee1 RD |
3458 | """ |
3459 | SetBackgroundMode(self, int mode) | |
3460 | ||
3461 | *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting | |
3462 | determines whether text will be drawn with a background colour or | |
3463 | not. | |
3464 | """ | |
d55e5bfc RD |
3465 | return _gdi_.DC_SetBackgroundMode(*args, **kwargs) |
3466 | ||
3467 | def SetPalette(*args, **kwargs): | |
f5b96ee1 RD |
3468 | """ |
3469 | SetPalette(self, Palette palette) | |
3470 | ||
3471 | If this is a window DC or memory DC, assigns the given palette to the | |
3472 | window or bitmap associated with the DC. If the argument is | |
3473 | ``wx.NullPalette``, the current palette is selected out of the device | |
3474 | context, and the original palette restored. | |
3475 | """ | |
d55e5bfc RD |
3476 | return _gdi_.DC_SetPalette(*args, **kwargs) |
3477 | ||
d55e5bfc | 3478 | def DestroyClippingRegion(*args, **kwargs): |
f5b96ee1 RD |
3479 | """ |
3480 | DestroyClippingRegion(self) | |
3481 | ||
3482 | Destroys the current clipping region so that none of the DC is | |
3483 | clipped. | |
3484 | """ | |
d55e5bfc RD |
3485 | return _gdi_.DC_DestroyClippingRegion(*args, **kwargs) |
3486 | ||
3487 | def GetClippingBox(*args, **kwargs): | |
f5b96ee1 RD |
3488 | """ |
3489 | GetClippingBox() -> (x, y, width, height) | |
3490 | ||
3491 | Gets the rectangle surrounding the current clipping region. | |
3492 | """ | |
d55e5bfc RD |
3493 | return _gdi_.DC_GetClippingBox(*args, **kwargs) |
3494 | ||
3495 | def GetClippingRect(*args, **kwargs): | |
f5b96ee1 RD |
3496 | """ |
3497 | GetClippingRect(self) -> Rect | |
3498 | ||
3499 | Gets the rectangle surrounding the current clipping region. | |
3500 | """ | |
d55e5bfc RD |
3501 | return _gdi_.DC_GetClippingRect(*args, **kwargs) |
3502 | ||
3503 | def GetCharHeight(*args, **kwargs): | |
f5b96ee1 RD |
3504 | """ |
3505 | GetCharHeight(self) -> int | |
3506 | ||
3507 | Gets the character height of the currently set font. | |
3508 | """ | |
d55e5bfc RD |
3509 | return _gdi_.DC_GetCharHeight(*args, **kwargs) |
3510 | ||
3511 | def GetCharWidth(*args, **kwargs): | |
f5b96ee1 RD |
3512 | """ |
3513 | GetCharWidth(self) -> int | |
3514 | ||
3515 | Gets the average character width of the currently set font. | |
3516 | """ | |
d55e5bfc RD |
3517 | return _gdi_.DC_GetCharWidth(*args, **kwargs) |
3518 | ||
3519 | def GetTextExtent(*args, **kwargs): | |
a001823c RD |
3520 | """ |
3521 | GetTextExtent(wxString string) -> (width, height) | |
3522 | ||
3523 | Get the width and height of the text using the current font. Only | |
3524 | works for single line strings. | |
3525 | """ | |
d55e5bfc RD |
3526 | return _gdi_.DC_GetTextExtent(*args, **kwargs) |
3527 | ||
3528 | def GetFullTextExtent(*args, **kwargs): | |
3529 | """ | |
3530 | GetFullTextExtent(wxString string, Font font=None) -> | |
3531 | (width, height, descent, externalLeading) | |
3532 | ||
79fccf9d RD |
3533 | Get the width, height, decent and leading of the text using the |
3534 | current or specified font. Only works for single line strings. | |
d55e5bfc RD |
3535 | """ |
3536 | return _gdi_.DC_GetFullTextExtent(*args, **kwargs) | |
3537 | ||
3538 | def GetMultiLineTextExtent(*args, **kwargs): | |
3539 | """ | |
3540 | GetMultiLineTextExtent(wxString string, Font font=None) -> | |
3541 | (width, height, descent, externalLeading) | |
a001823c RD |
3542 | |
3543 | Get the width, height, decent and leading of the text using the | |
3544 | current or specified font. Works for single as well as multi-line | |
3545 | strings. | |
d55e5bfc RD |
3546 | """ |
3547 | return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs) | |
3548 | ||
3549 | def GetPartialTextExtents(*args, **kwargs): | |
f5b96ee1 RD |
3550 | """ |
3551 | GetPartialTextExtents(self, text) -> [widths] | |
3552 | ||
3553 | Returns a list of integers such that each value is the distance in | |
3554 | pixels from the begining of text to the coresponding character of | |
3555 | *text*. The generic version simply builds a running total of the widths | |
3556 | of each character using GetTextExtent, however if the various | |
3557 | platforms have a native API function that is faster or more accurate | |
43e8916f | 3558 | than the generic implementation then it will be used instead. |
f5b96ee1 | 3559 | """ |
d55e5bfc RD |
3560 | return _gdi_.DC_GetPartialTextExtents(*args, **kwargs) |
3561 | ||
3562 | def GetSize(*args, **kwargs): | |
3563 | """ | |
3564 | GetSize(self) -> Size | |
3565 | ||
f5b96ee1 RD |
3566 | This gets the horizontal and vertical resolution in device units. It |
3567 | can be used to scale graphics to fit the page. For example, if *maxX* | |
3568 | and *maxY* represent the maximum horizontal and vertical 'pixel' values | |
3569 | used in your application, the following code will scale the graphic to | |
3570 | fit on the printer page:: | |
3571 | ||
3572 | w, h = dc.GetSize() | |
3573 | scaleX = maxX*1.0 / w | |
3574 | scaleY = maxY*1.0 / h | |
3575 | dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY)) | |
3576 | ||
d55e5bfc RD |
3577 | """ |
3578 | return _gdi_.DC_GetSize(*args, **kwargs) | |
3579 | ||
3580 | def GetSizeTuple(*args, **kwargs): | |
3581 | """ | |
3582 | GetSizeTuple() -> (width, height) | |
3583 | ||
f5b96ee1 RD |
3584 | This gets the horizontal and vertical resolution in device units. It |
3585 | can be used to scale graphics to fit the page. For example, if *maxX* | |
3586 | and *maxY* represent the maximum horizontal and vertical 'pixel' values | |
3587 | used in your application, the following code will scale the graphic to | |
3588 | fit on the printer page:: | |
3589 | ||
3590 | w, h = dc.GetSize() | |
3591 | scaleX = maxX*1.0 / w | |
3592 | scaleY = maxY*1.0 / h | |
3593 | dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY)) | |
3594 | ||
d55e5bfc RD |
3595 | """ |
3596 | return _gdi_.DC_GetSizeTuple(*args, **kwargs) | |
3597 | ||
3598 | def GetSizeMM(*args, **kwargs): | |
3599 | """ | |
3600 | GetSizeMM(self) -> Size | |
3601 | ||
3602 | Get the DC size in milimeters. | |
3603 | """ | |
3604 | return _gdi_.DC_GetSizeMM(*args, **kwargs) | |
3605 | ||
3606 | def GetSizeMMTuple(*args, **kwargs): | |
3607 | """ | |
3608 | GetSizeMMTuple() -> (width, height) | |
3609 | ||
3610 | Get the DC size in milimeters. | |
3611 | """ | |
3612 | return _gdi_.DC_GetSizeMMTuple(*args, **kwargs) | |
3613 | ||
3614 | def DeviceToLogicalX(*args, **kwargs): | |
f5b96ee1 RD |
3615 | """ |
3616 | DeviceToLogicalX(self, int x) -> int | |
3617 | ||
3618 | Convert device X coordinate to logical coordinate, using the current | |
3619 | mapping mode. | |
3620 | """ | |
d55e5bfc RD |
3621 | return _gdi_.DC_DeviceToLogicalX(*args, **kwargs) |
3622 | ||
3623 | def DeviceToLogicalY(*args, **kwargs): | |
f5b96ee1 RD |
3624 | """ |
3625 | DeviceToLogicalY(self, int y) -> int | |
3626 | ||
3627 | Converts device Y coordinate to logical coordinate, using the current | |
3628 | mapping mode. | |
3629 | """ | |
d55e5bfc RD |
3630 | return _gdi_.DC_DeviceToLogicalY(*args, **kwargs) |
3631 | ||
3632 | def DeviceToLogicalXRel(*args, **kwargs): | |
f5b96ee1 RD |
3633 | """ |
3634 | DeviceToLogicalXRel(self, int x) -> int | |
3635 | ||
3636 | Convert device X coordinate to relative logical coordinate, using the | |
3637 | current mapping mode but ignoring the x axis orientation. Use this | |
3638 | function for converting a width, for example. | |
3639 | """ | |
d55e5bfc RD |
3640 | return _gdi_.DC_DeviceToLogicalXRel(*args, **kwargs) |
3641 | ||
3642 | def DeviceToLogicalYRel(*args, **kwargs): | |
f5b96ee1 RD |
3643 | """ |
3644 | DeviceToLogicalYRel(self, int y) -> int | |
3645 | ||
3646 | Convert device Y coordinate to relative logical coordinate, using the | |
3647 | current mapping mode but ignoring the y axis orientation. Use this | |
3648 | function for converting a height, for example. | |
3649 | """ | |
d55e5bfc RD |
3650 | return _gdi_.DC_DeviceToLogicalYRel(*args, **kwargs) |
3651 | ||
3652 | def LogicalToDeviceX(*args, **kwargs): | |
f5b96ee1 RD |
3653 | """ |
3654 | LogicalToDeviceX(self, int x) -> int | |
3655 | ||
3656 | Converts logical X coordinate to device coordinate, using the current | |
3657 | mapping mode. | |
3658 | """ | |
d55e5bfc RD |
3659 | return _gdi_.DC_LogicalToDeviceX(*args, **kwargs) |
3660 | ||
3661 | def LogicalToDeviceY(*args, **kwargs): | |
f5b96ee1 RD |
3662 | """ |
3663 | LogicalToDeviceY(self, int y) -> int | |
3664 | ||
3665 | Converts logical Y coordinate to device coordinate, using the current | |
3666 | mapping mode. | |
3667 | """ | |
d55e5bfc RD |
3668 | return _gdi_.DC_LogicalToDeviceY(*args, **kwargs) |
3669 | ||
3670 | def LogicalToDeviceXRel(*args, **kwargs): | |
f5b96ee1 RD |
3671 | """ |
3672 | LogicalToDeviceXRel(self, int x) -> int | |
3673 | ||
3674 | Converts logical X coordinate to relative device coordinate, using the | |
3675 | current mapping mode but ignoring the x axis orientation. Use this for | |
3676 | converting a width, for example. | |
3677 | """ | |
d55e5bfc RD |
3678 | return _gdi_.DC_LogicalToDeviceXRel(*args, **kwargs) |
3679 | ||
3680 | def LogicalToDeviceYRel(*args, **kwargs): | |
f5b96ee1 RD |
3681 | """ |
3682 | LogicalToDeviceYRel(self, int y) -> int | |
3683 | ||
3684 | Converts logical Y coordinate to relative device coordinate, using the | |
3685 | current mapping mode but ignoring the y axis orientation. Use this for | |
3686 | converting a height, for example. | |
3687 | """ | |
d55e5bfc RD |
3688 | return _gdi_.DC_LogicalToDeviceYRel(*args, **kwargs) |
3689 | ||
3690 | def CanDrawBitmap(*args, **kwargs): | |
3691 | """CanDrawBitmap(self) -> bool""" | |
3692 | return _gdi_.DC_CanDrawBitmap(*args, **kwargs) | |
3693 | ||
3694 | def CanGetTextExtent(*args, **kwargs): | |
3695 | """CanGetTextExtent(self) -> bool""" | |
3696 | return _gdi_.DC_CanGetTextExtent(*args, **kwargs) | |
3697 | ||
3698 | def GetDepth(*args, **kwargs): | |
f5b96ee1 RD |
3699 | """ |
3700 | GetDepth(self) -> int | |
3701 | ||
3702 | Returns the colour depth of the DC. | |
3703 | """ | |
d55e5bfc RD |
3704 | return _gdi_.DC_GetDepth(*args, **kwargs) |
3705 | ||
3706 | def GetPPI(*args, **kwargs): | |
f5b96ee1 RD |
3707 | """ |
3708 | GetPPI(self) -> Size | |
3709 | ||
3710 | Resolution in Pixels per inch | |
3711 | """ | |
d55e5bfc RD |
3712 | return _gdi_.DC_GetPPI(*args, **kwargs) |
3713 | ||
3714 | def Ok(*args, **kwargs): | |
f5b96ee1 RD |
3715 | """ |
3716 | Ok(self) -> bool | |
3717 | ||
3718 | Returns true if the DC is ok to use. | |
3719 | """ | |
d55e5bfc RD |
3720 | return _gdi_.DC_Ok(*args, **kwargs) |
3721 | ||
3722 | def GetBackgroundMode(*args, **kwargs): | |
f5b96ee1 RD |
3723 | """ |
3724 | GetBackgroundMode(self) -> int | |
3725 | ||
3726 | Returns the current background mode, either ``wx.SOLID`` or | |
3727 | ``wx.TRANSPARENT``. | |
3728 | """ | |
d55e5bfc RD |
3729 | return _gdi_.DC_GetBackgroundMode(*args, **kwargs) |
3730 | ||
3731 | def GetBackground(*args, **kwargs): | |
f5b96ee1 RD |
3732 | """ |
3733 | GetBackground(self) -> Brush | |
3734 | ||
3735 | Gets the brush used for painting the background. | |
3736 | """ | |
d55e5bfc RD |
3737 | return _gdi_.DC_GetBackground(*args, **kwargs) |
3738 | ||
3739 | def GetBrush(*args, **kwargs): | |
f5b96ee1 RD |
3740 | """ |
3741 | GetBrush(self) -> Brush | |
3742 | ||
3743 | Gets the current brush | |
3744 | """ | |
d55e5bfc RD |
3745 | return _gdi_.DC_GetBrush(*args, **kwargs) |
3746 | ||
3747 | def GetFont(*args, **kwargs): | |
f5b96ee1 RD |
3748 | """ |
3749 | GetFont(self) -> Font | |
3750 | ||
3751 | Gets the current font | |
3752 | """ | |
d55e5bfc RD |
3753 | return _gdi_.DC_GetFont(*args, **kwargs) |
3754 | ||
3755 | def GetPen(*args, **kwargs): | |
f5b96ee1 RD |
3756 | """ |
3757 | GetPen(self) -> Pen | |
3758 | ||
3759 | Gets the current pen | |
3760 | """ | |
d55e5bfc RD |
3761 | return _gdi_.DC_GetPen(*args, **kwargs) |
3762 | ||
3763 | def GetTextBackground(*args, **kwargs): | |
f5b96ee1 RD |
3764 | """ |
3765 | GetTextBackground(self) -> Colour | |
3766 | ||
3767 | Gets the current text background colour | |
3768 | """ | |
d55e5bfc RD |
3769 | return _gdi_.DC_GetTextBackground(*args, **kwargs) |
3770 | ||
3771 | def GetTextForeground(*args, **kwargs): | |
f5b96ee1 RD |
3772 | """ |
3773 | GetTextForeground(self) -> Colour | |
3774 | ||
3775 | Gets the current text foreground colour | |
3776 | """ | |
d55e5bfc RD |
3777 | return _gdi_.DC_GetTextForeground(*args, **kwargs) |
3778 | ||
3779 | def SetTextForeground(*args, **kwargs): | |
f5b96ee1 RD |
3780 | """ |
3781 | SetTextForeground(self, Colour colour) | |
3782 | ||
3783 | Sets the current text foreground colour for the DC. | |
3784 | """ | |
d55e5bfc RD |
3785 | return _gdi_.DC_SetTextForeground(*args, **kwargs) |
3786 | ||
3787 | def SetTextBackground(*args, **kwargs): | |
f5b96ee1 RD |
3788 | """ |
3789 | SetTextBackground(self, Colour colour) | |
3790 | ||
3791 | Sets the current text background colour for the DC. | |
3792 | """ | |
d55e5bfc RD |
3793 | return _gdi_.DC_SetTextBackground(*args, **kwargs) |
3794 | ||
3795 | def GetMapMode(*args, **kwargs): | |
f5b96ee1 RD |
3796 | """ |
3797 | GetMapMode(self) -> int | |
3798 | ||
3799 | Gets the current *mapping mode* for the device context | |
3800 | """ | |
d55e5bfc RD |
3801 | return _gdi_.DC_GetMapMode(*args, **kwargs) |
3802 | ||
3803 | def SetMapMode(*args, **kwargs): | |
f5b96ee1 RD |
3804 | """ |
3805 | SetMapMode(self, int mode) | |
3806 | ||
3807 | The *mapping mode* of the device context defines the unit of | |
3808 | measurement used to convert logical units to device units. The | |
3809 | mapping mode can be one of the following: | |
3810 | ||
3811 | ================ ============================================= | |
3812 | wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440 | |
3813 | of an inch. | |
3814 | wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch. | |
3815 | wx.MM_METRIC Each logical unit is 1 mm. | |
3816 | wx.MM_LOMETRIC Each logical unit is 1/10 of a mm. | |
3817 | wx.MM_TEXT Each logical unit is 1 pixel. | |
3818 | ================ ============================================= | |
3819 | ||
3820 | """ | |
d55e5bfc RD |
3821 | return _gdi_.DC_SetMapMode(*args, **kwargs) |
3822 | ||
3823 | def GetUserScale(*args, **kwargs): | |
f5b96ee1 RD |
3824 | """ |
3825 | GetUserScale(self) -> (xScale, yScale) | |
3826 | ||
3827 | Gets the current user scale factor (set by `SetUserScale`). | |
3828 | """ | |
d55e5bfc RD |
3829 | return _gdi_.DC_GetUserScale(*args, **kwargs) |
3830 | ||
3831 | def SetUserScale(*args, **kwargs): | |
f5b96ee1 RD |
3832 | """ |
3833 | SetUserScale(self, double x, double y) | |
3834 | ||
3835 | Sets the user scaling factor, useful for applications which require | |
3836 | 'zooming'. | |
3837 | """ | |
d55e5bfc RD |
3838 | return _gdi_.DC_SetUserScale(*args, **kwargs) |
3839 | ||
3840 | def GetLogicalScale(*args, **kwargs): | |
3841 | """GetLogicalScale() -> (xScale, yScale)""" | |
3842 | return _gdi_.DC_GetLogicalScale(*args, **kwargs) | |
3843 | ||
3844 | def SetLogicalScale(*args, **kwargs): | |
3845 | """SetLogicalScale(self, double x, double y)""" | |
3846 | return _gdi_.DC_SetLogicalScale(*args, **kwargs) | |
3847 | ||
3848 | def GetLogicalOrigin(*args, **kwargs): | |
3849 | """GetLogicalOrigin(self) -> Point""" | |
3850 | return _gdi_.DC_GetLogicalOrigin(*args, **kwargs) | |
3851 | ||
3852 | def GetLogicalOriginTuple(*args, **kwargs): | |
3853 | """GetLogicalOriginTuple() -> (x,y)""" | |
3854 | return _gdi_.DC_GetLogicalOriginTuple(*args, **kwargs) | |
3855 | ||
3856 | def SetLogicalOrigin(*args, **kwargs): | |
3857 | """SetLogicalOrigin(self, int x, int y)""" | |
3858 | return _gdi_.DC_SetLogicalOrigin(*args, **kwargs) | |
3859 | ||
c24da6d6 RD |
3860 | def SetLogicalOriginPoint(*args, **kwargs): |
3861 | """SetLogicalOriginPoint(self, Point point)""" | |
3862 | return _gdi_.DC_SetLogicalOriginPoint(*args, **kwargs) | |
3863 | ||
d55e5bfc RD |
3864 | def GetDeviceOrigin(*args, **kwargs): |
3865 | """GetDeviceOrigin(self) -> Point""" | |
3866 | return _gdi_.DC_GetDeviceOrigin(*args, **kwargs) | |
3867 | ||
3868 | def GetDeviceOriginTuple(*args, **kwargs): | |
3869 | """GetDeviceOriginTuple() -> (x,y)""" | |
3870 | return _gdi_.DC_GetDeviceOriginTuple(*args, **kwargs) | |
3871 | ||
3872 | def SetDeviceOrigin(*args, **kwargs): | |
3873 | """SetDeviceOrigin(self, int x, int y)""" | |
3874 | return _gdi_.DC_SetDeviceOrigin(*args, **kwargs) | |
3875 | ||
c24da6d6 RD |
3876 | def SetDeviceOriginPoint(*args, **kwargs): |
3877 | """SetDeviceOriginPoint(self, Point point)""" | |
3878 | return _gdi_.DC_SetDeviceOriginPoint(*args, **kwargs) | |
3879 | ||
d55e5bfc | 3880 | def SetAxisOrientation(*args, **kwargs): |
f5b96ee1 RD |
3881 | """ |
3882 | SetAxisOrientation(self, bool xLeftRight, bool yBottomUp) | |
3883 | ||
3884 | Sets the x and y axis orientation (i.e., the direction from lowest to | |
3885 | highest values on the axis). The default orientation is the natural | |
3886 | orientation, e.g. x axis from left to right and y axis from bottom up. | |
3887 | """ | |
d55e5bfc RD |
3888 | return _gdi_.DC_SetAxisOrientation(*args, **kwargs) |
3889 | ||
3890 | def GetLogicalFunction(*args, **kwargs): | |
f5b96ee1 RD |
3891 | """ |
3892 | GetLogicalFunction(self) -> int | |
3893 | ||
3894 | Gets the current logical function (set by `SetLogicalFunction`). | |
3895 | """ | |
d55e5bfc RD |
3896 | return _gdi_.DC_GetLogicalFunction(*args, **kwargs) |
3897 | ||
3898 | def SetLogicalFunction(*args, **kwargs): | |
f5b96ee1 RD |
3899 | """ |
3900 | SetLogicalFunction(self, int function) | |
3901 | ||
3902 | Sets the current logical function for the device context. This | |
3903 | determines how a source pixel (from a pen or brush colour, or source | |
3904 | device context if using `Blit`) combines with a destination pixel in | |
3905 | the current device context. | |
3906 | ||
3907 | The possible values and their meaning in terms of source and | |
3908 | destination pixel values are as follows: | |
3909 | ||
3910 | ================ ========================== | |
3911 | wx.AND src AND dst | |
3912 | wx.AND_INVERT (NOT src) AND dst | |
3913 | wx.AND_REVERSE src AND (NOT dst) | |
3914 | wx.CLEAR 0 | |
3915 | wx.COPY src | |
3916 | wx.EQUIV (NOT src) XOR dst | |
3917 | wx.INVERT NOT dst | |
3918 | wx.NAND (NOT src) OR (NOT dst) | |
3919 | wx.NOR (NOT src) AND (NOT dst) | |
3920 | wx.NO_OP dst | |
3921 | wx.OR src OR dst | |
3922 | wx.OR_INVERT (NOT src) OR dst | |
3923 | wx.OR_REVERSE src OR (NOT dst) | |
3924 | wx.SET 1 | |
3925 | wx.SRC_INVERT NOT src | |
3926 | wx.XOR src XOR dst | |
3927 | ================ ========================== | |
3928 | ||
3929 | The default is wx.COPY, which simply draws with the current | |
3930 | colour. The others combine the current colour and the background using | |
3931 | a logical operation. wx.INVERT is commonly used for drawing rubber | |
3932 | bands or moving outlines, since drawing twice reverts to the original | |
3933 | colour. | |
3934 | ||
3935 | """ | |
d55e5bfc RD |
3936 | return _gdi_.DC_SetLogicalFunction(*args, **kwargs) |
3937 | ||
5cbf236d RD |
3938 | def ComputeScaleAndOrigin(*args, **kwargs): |
3939 | """ | |
3940 | ComputeScaleAndOrigin(self) | |
3941 | ||
3942 | Performs all necessary computations for given platform and context | |
3943 | type after each change of scale and origin parameters. Usually called | |
3944 | automatically internally after such changes. | |
3945 | ||
3946 | """ | |
3947 | return _gdi_.DC_ComputeScaleAndOrigin(*args, **kwargs) | |
3948 | ||
b519803b RD |
3949 | def SetOptimization(self, optimize): |
3950 | pass | |
3951 | def GetOptimization(self): | |
3952 | return False | |
f5b96ee1 | 3953 | |
b519803b RD |
3954 | SetOptimization = wx._deprecated(SetOptimization) |
3955 | GetOptimization = wx._deprecated(GetOptimization) | |
d55e5bfc RD |
3956 | |
3957 | def CalcBoundingBox(*args, **kwargs): | |
f5b96ee1 RD |
3958 | """ |
3959 | CalcBoundingBox(self, int x, int y) | |
3960 | ||
3961 | Adds the specified point to the bounding box which can be retrieved | |
3962 | with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions. | |
3963 | """ | |
d55e5bfc RD |
3964 | return _gdi_.DC_CalcBoundingBox(*args, **kwargs) |
3965 | ||
c24da6d6 | 3966 | def CalcBoundingBoxPoint(*args, **kwargs): |
f5b96ee1 RD |
3967 | """ |
3968 | CalcBoundingBoxPoint(self, Point point) | |
3969 | ||
3970 | Adds the specified point to the bounding box which can be retrieved | |
3971 | with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions. | |
3972 | """ | |
c24da6d6 RD |
3973 | return _gdi_.DC_CalcBoundingBoxPoint(*args, **kwargs) |
3974 | ||
d55e5bfc | 3975 | def ResetBoundingBox(*args, **kwargs): |
f5b96ee1 RD |
3976 | """ |
3977 | ResetBoundingBox(self) | |
3978 | ||
3979 | Resets the bounding box: after a call to this function, the bounding | |
3980 | box doesn't contain anything. | |
3981 | """ | |
d55e5bfc RD |
3982 | return _gdi_.DC_ResetBoundingBox(*args, **kwargs) |
3983 | ||
3984 | def MinX(*args, **kwargs): | |
f5b96ee1 RD |
3985 | """ |
3986 | MinX(self) -> int | |
3987 | ||
3988 | Gets the minimum horizontal extent used in drawing commands so far. | |
3989 | """ | |
d55e5bfc RD |
3990 | return _gdi_.DC_MinX(*args, **kwargs) |
3991 | ||
3992 | def MaxX(*args, **kwargs): | |
f5b96ee1 RD |
3993 | """ |
3994 | MaxX(self) -> int | |
3995 | ||
3996 | Gets the maximum horizontal extent used in drawing commands so far. | |
3997 | """ | |
d55e5bfc RD |
3998 | return _gdi_.DC_MaxX(*args, **kwargs) |
3999 | ||
4000 | def MinY(*args, **kwargs): | |
f5b96ee1 RD |
4001 | """ |
4002 | MinY(self) -> int | |
4003 | ||
4004 | Gets the minimum vertical extent used in drawing commands so far. | |
4005 | """ | |
d55e5bfc RD |
4006 | return _gdi_.DC_MinY(*args, **kwargs) |
4007 | ||
4008 | def MaxY(*args, **kwargs): | |
f5b96ee1 RD |
4009 | """ |
4010 | MaxY(self) -> int | |
4011 | ||
4012 | Gets the maximum vertical extent used in drawing commands so far. | |
4013 | """ | |
d55e5bfc RD |
4014 | return _gdi_.DC_MaxY(*args, **kwargs) |
4015 | ||
4016 | def GetBoundingBox(*args, **kwargs): | |
f5b96ee1 RD |
4017 | """ |
4018 | GetBoundingBox() -> (x1,y1, x2,y2) | |
4019 | ||
4020 | Returns the min and max points used in drawing commands so far. | |
4021 | """ | |
d55e5bfc RD |
4022 | return _gdi_.DC_GetBoundingBox(*args, **kwargs) |
4023 | ||
4024 | def __nonzero__(self): return self.Ok() | |
0439c23b RD |
4025 | def GetHDC(*args, **kwargs): |
4026 | """GetHDC(self) -> long""" | |
4027 | return _gdi_.DC_GetHDC(*args, **kwargs) | |
4028 | ||
d55e5bfc RD |
4029 | def _DrawPointList(*args, **kwargs): |
4030 | """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject""" | |
4031 | return _gdi_.DC__DrawPointList(*args, **kwargs) | |
4032 | ||
4033 | def _DrawLineList(*args, **kwargs): | |
4034 | """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject""" | |
4035 | return _gdi_.DC__DrawLineList(*args, **kwargs) | |
4036 | ||
4037 | def _DrawRectangleList(*args, **kwargs): | |
4038 | """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject""" | |
4039 | return _gdi_.DC__DrawRectangleList(*args, **kwargs) | |
4040 | ||
4041 | def _DrawEllipseList(*args, **kwargs): | |
4042 | """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject""" | |
4043 | return _gdi_.DC__DrawEllipseList(*args, **kwargs) | |
4044 | ||
4045 | def _DrawPolygonList(*args, **kwargs): | |
4046 | """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject""" | |
4047 | return _gdi_.DC__DrawPolygonList(*args, **kwargs) | |
4048 | ||
4049 | def _DrawTextList(*args, **kwargs): | |
4050 | """ | |
4051 | _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList, | |
4052 | PyObject backgroundList) -> PyObject | |
4053 | """ | |
4054 | return _gdi_.DC__DrawTextList(*args, **kwargs) | |
4055 | ||
4056 | def DrawPointList(self, points, pens=None): | |
f5b96ee1 RD |
4057 | """ |
4058 | Draw a list of points as quickly as possible. | |
4059 | ||
4060 | :param points: A sequence of 2-element sequences representing | |
4061 | each point to draw, (x,y). | |
4062 | :param pens: If None, then the current pen is used. If a | |
4063 | single pen then it will be used for all points. If | |
4064 | a list of pens then there should be one for each point | |
4065 | in points. | |
4066 | """ | |
d55e5bfc RD |
4067 | if pens is None: |
4068 | pens = [] | |
4069 | elif isinstance(pens, wx.Pen): | |
4070 | pens = [pens] | |
4071 | elif len(pens) != len(points): | |
4072 | raise ValueError('points and pens must have same length') | |
4073 | return self._DrawPointList(points, pens, []) | |
4074 | ||
4075 | ||
4076 | def DrawLineList(self, lines, pens=None): | |
f5b96ee1 RD |
4077 | """ |
4078 | Draw a list of lines as quickly as possible. | |
4079 | ||
4080 | :param lines: A sequence of 4-element sequences representing | |
4081 | each line to draw, (x1,y1, x2,y2). | |
4082 | :param pens: If None, then the current pen is used. If a | |
4083 | single pen then it will be used for all lines. If | |
4084 | a list of pens then there should be one for each line | |
4085 | in lines. | |
4086 | """ | |
d55e5bfc RD |
4087 | if pens is None: |
4088 | pens = [] | |
4089 | elif isinstance(pens, wx.Pen): | |
4090 | pens = [pens] | |
4091 | elif len(pens) != len(lines): | |
4092 | raise ValueError('lines and pens must have same length') | |
4093 | return self._DrawLineList(lines, pens, []) | |
4094 | ||
4095 | ||
4096 | def DrawRectangleList(self, rectangles, pens=None, brushes=None): | |
f5b96ee1 RD |
4097 | """ |
4098 | Draw a list of rectangles as quickly as possible. | |
4099 | ||
4100 | :param rectangles: A sequence of 4-element sequences representing | |
4101 | each rectangle to draw, (x,y, w,h). | |
4102 | :param pens: If None, then the current pen is used. If a | |
4103 | single pen then it will be used for all rectangles. | |
4104 | If a list of pens then there should be one for each | |
4105 | rectangle in rectangles. | |
4106 | :param brushes: A brush or brushes to be used to fill the rectagles, | |
4107 | with similar semantics as the pens parameter. | |
4108 | """ | |
d55e5bfc RD |
4109 | if pens is None: |
4110 | pens = [] | |
4111 | elif isinstance(pens, wx.Pen): | |
4112 | pens = [pens] | |
4113 | elif len(pens) != len(rectangles): | |
4114 | raise ValueError('rectangles and pens must have same length') | |
4115 | if brushes is None: | |
4116 | brushes = [] | |
4117 | elif isinstance(brushes, wx.Brush): | |
4118 | brushes = [brushes] | |
4119 | elif len(brushes) != len(rectangles): | |
4120 | raise ValueError('rectangles and brushes must have same length') | |
4121 | return self._DrawRectangleList(rectangles, pens, brushes) | |
4122 | ||
4123 | ||
4124 | def DrawEllipseList(self, ellipses, pens=None, brushes=None): | |
f5b96ee1 RD |
4125 | """ |
4126 | Draw a list of ellipses as quickly as possible. | |
4127 | ||
4128 | :param ellipses: A sequence of 4-element sequences representing | |
4129 | each ellipse to draw, (x,y, w,h). | |
4130 | :param pens: If None, then the current pen is used. If a | |
4131 | single pen then it will be used for all ellipses. | |
4132 | If a list of pens then there should be one for each | |
4133 | ellipse in ellipses. | |
4134 | :param brushes: A brush or brushes to be used to fill the ellipses, | |
4135 | with similar semantics as the pens parameter. | |
4136 | """ | |
d55e5bfc RD |
4137 | if pens is None: |
4138 | pens = [] | |
4139 | elif isinstance(pens, wx.Pen): | |
4140 | pens = [pens] | |
4141 | elif len(pens) != len(ellipses): | |
4142 | raise ValueError('ellipses and pens must have same length') | |
4143 | if brushes is None: | |
4144 | brushes = [] | |
4145 | elif isinstance(brushes, wx.Brush): | |
4146 | brushes = [brushes] | |
4147 | elif len(brushes) != len(ellipses): | |
4148 | raise ValueError('ellipses and brushes must have same length') | |
4149 | return self._DrawEllipseList(ellipses, pens, brushes) | |
4150 | ||
4151 | ||
4152 | def DrawPolygonList(self, polygons, pens=None, brushes=None): | |
f5b96ee1 RD |
4153 | """ |
4154 | Draw a list of polygons, each of which is a list of points. | |
4155 | ||
4156 | :param polygons: A sequence of sequences of sequences. | |
4157 | [[(x1,y1),(x2,y2),(x3,y3)...], | |
4158 | [(x1,y1),(x2,y2),(x3,y3)...]] | |
4159 | ||
4160 | :param pens: If None, then the current pen is used. If a | |
4161 | single pen then it will be used for all polygons. | |
4162 | If a list of pens then there should be one for each | |
4163 | polygon. | |
4164 | :param brushes: A brush or brushes to be used to fill the polygons, | |
4165 | with similar semantics as the pens parameter. | |
4166 | """ | |
d55e5bfc RD |
4167 | if pens is None: |
4168 | pens = [] | |
4169 | elif isinstance(pens, wx.Pen): | |
4170 | pens = [pens] | |
4171 | elif len(pens) != len(polygons): | |
4172 | raise ValueError('polygons and pens must have same length') | |
4173 | if brushes is None: | |
4174 | brushes = [] | |
4175 | elif isinstance(brushes, wx.Brush): | |
4176 | brushes = [brushes] | |
4177 | elif len(brushes) != len(polygons): | |
4178 | raise ValueError('polygons and brushes must have same length') | |
4179 | return self._DrawPolygonList(polygons, pens, brushes) | |
4180 | ||
4181 | ||
f5b96ee1 RD |
4182 | def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None): |
4183 | """ | |
4184 | Draw a list of strings using a list of coordinants for positioning each string. | |
4185 | ||
4186 | :param textList: A list of strings | |
4187 | :param coords: A list of (x,y) positions | |
4188 | :param foregrounds: A list of `wx.Colour` objects to use for the | |
4189 | foregrounds of the strings. | |
4190 | :param backgrounds: A list of `wx.Colour` objects to use for the | |
4191 | backgrounds of the strings. | |
4192 | ||
4193 | NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode) | |
4194 | If you want backgrounds to do anything. | |
4195 | """ | |
d55e5bfc RD |
4196 | if type(textList) == type(''): |
4197 | textList = [textList] | |
4198 | elif len(textList) != len(coords): | |
4199 | raise ValueError('textlist and coords must have same length') | |
4200 | if foregrounds is None: | |
4201 | foregrounds = [] | |
4202 | elif isinstance(foregrounds, wx.Colour): | |
4203 | foregrounds = [foregrounds] | |
4204 | elif len(foregrounds) != len(coords): | |
4205 | raise ValueError('foregrounds and coords must have same length') | |
4206 | if backgrounds is None: | |
4207 | backgrounds = [] | |
4208 | elif isinstance(backgrounds, wx.Colour): | |
4209 | backgrounds = [backgrounds] | |
4210 | elif len(backgrounds) != len(coords): | |
4211 | raise ValueError('backgrounds and coords must have same length') | |
4212 | return self._DrawTextList(textList, coords, foregrounds, backgrounds) | |
4213 | ||
4214 | ||
4215 | class DCPtr(DC): | |
4216 | def __init__(self, this): | |
4217 | self.this = this | |
4218 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4219 | self.__class__ = DC | |
4220 | _gdi_.DC_swigregister(DCPtr) | |
4221 | ||
4222 | #--------------------------------------------------------------------------- | |
4223 | ||
4224 | class MemoryDC(DC): | |
f5b96ee1 RD |
4225 | """ |
4226 | A memory device context provides a means to draw graphics onto a | |
4227 | bitmap. A bitmap must be selected into the new memory DC before it may | |
4228 | be used for anything. Typical usage is as follows:: | |
4229 | ||
4230 | dc = wx.MemoryDC() | |
4231 | dc.SelectObject(bitmap) | |
4232 | # draw on the dc usign any of the Draw methods | |
4233 | dc.SelectObject(wx.NullBitmap) | |
4234 | # the bitmap now contains wahtever was drawn upon it | |
4235 | ||
4236 | Note that the memory DC *must* be deleted (or the bitmap selected out | |
4237 | of it) before a bitmap can be reselected into another memory DC. | |
4238 | ||
4239 | """ | |
d55e5bfc RD |
4240 | def __repr__(self): |
4241 | return "<%s.%s; proxy of C++ wxMemoryDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4242 | def __init__(self, *args, **kwargs): | |
f5b96ee1 RD |
4243 | """ |
4244 | __init__(self) -> MemoryDC | |
4245 | ||
4246 | Constructs a new memory device context. | |
4247 | ||
4248 | Use the Ok member to test whether the constructor was successful in | |
4249 | creating a usable device context. Don't forget to select a bitmap into | |
4250 | the DC before drawing on it. | |
4251 | """ | |
d55e5bfc RD |
4252 | newobj = _gdi_.new_MemoryDC(*args, **kwargs) |
4253 | self.this = newobj.this | |
4254 | self.thisown = 1 | |
4255 | del newobj.thisown | |
4256 | def SelectObject(*args, **kwargs): | |
f5b96ee1 RD |
4257 | """ |
4258 | SelectObject(self, Bitmap bitmap) | |
4259 | ||
4260 | Selects the bitmap into the device context, to use as the memory | |
4261 | bitmap. Selecting the bitmap into a memory DC allows you to draw into | |
4262 | the DC, and therefore the bitmap, and also to use Blit to copy the | |
4263 | bitmap to a window. | |
4264 | ||
4265 | If the argument is wx.NullBitmap (or some other uninitialised | |
4266 | `wx.Bitmap`) the current bitmap is selected out of the device context, | |
4267 | and the original bitmap restored, allowing the current bitmap to be | |
4268 | destroyed safely. | |
4269 | """ | |
d55e5bfc RD |
4270 | return _gdi_.MemoryDC_SelectObject(*args, **kwargs) |
4271 | ||
4272 | ||
4273 | class MemoryDCPtr(MemoryDC): | |
4274 | def __init__(self, this): | |
4275 | self.this = this | |
4276 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4277 | self.__class__ = MemoryDC | |
4278 | _gdi_.MemoryDC_swigregister(MemoryDCPtr) | |
4279 | ||
4280 | def MemoryDCFromDC(*args, **kwargs): | |
f5b96ee1 RD |
4281 | """ |
4282 | MemoryDCFromDC(DC oldDC) -> MemoryDC | |
4283 | ||
4284 | Creates a DC that is compatible with the oldDC. | |
4285 | """ | |
d55e5bfc RD |
4286 | val = _gdi_.new_MemoryDCFromDC(*args, **kwargs) |
4287 | val.thisown = 1 | |
4288 | return val | |
4289 | ||
4290 | #--------------------------------------------------------------------------- | |
4291 | ||
e2950dbb RD |
4292 | BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA |
4293 | BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA | |
d55e5bfc | 4294 | class BufferedDC(MemoryDC): |
f5b96ee1 RD |
4295 | """ |
4296 | This simple class provides a simple way to avoid flicker: when drawing | |
4297 | on it, everything is in fact first drawn on an in-memory buffer (a | |
4298 | `wx.Bitmap`) and then copied to the screen only once, when this object | |
4299 | is destroyed. | |
4300 | ||
4301 | It can be used in the same way as any other device | |
4302 | context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you | |
4303 | want to use it in your EVT_PAINT handler, you should look at | |
4304 | `wx.BufferedPaintDC`. | |
4305 | ||
4306 | """ | |
d55e5bfc RD |
4307 | def __repr__(self): |
4308 | return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4309 | def __init__(self, *args): | |
4310 | """ | |
6932ae68 | 4311 | __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC |
e2950dbb | 4312 | __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC |
f5b96ee1 RD |
4313 | |
4314 | Constructs a buffered DC. | |
d55e5bfc RD |
4315 | """ |
4316 | newobj = _gdi_.new_BufferedDC(*args) | |
4317 | self.this = newobj.this | |
4318 | self.thisown = 1 | |
4319 | del newobj.thisown | |
f5b96ee1 | 4320 | self.__dc = args[0] # save a ref so the other dc will not be deleted before self |
d55e5bfc RD |
4321 | |
4322 | def __del__(self, destroy=_gdi_.delete_BufferedDC): | |
f5b96ee1 RD |
4323 | """ |
4324 | __del__(self) | |
4325 | ||
4326 | Copies everything drawn on the DC so far to the underlying DC | |
4327 | associated with this object, if any. | |
4328 | """ | |
d55e5bfc RD |
4329 | try: |
4330 | if self.thisown: destroy(self) | |
4331 | except: pass | |
4332 | ||
4333 | def UnMask(*args, **kwargs): | |
f5b96ee1 RD |
4334 | """ |
4335 | UnMask(self) | |
4336 | ||
4337 | Blits the buffer to the dc, and detaches the dc from the buffer (so it | |
4338 | can be effectively used once only). This is usually only called in | |
4339 | the destructor. | |
4340 | """ | |
d55e5bfc RD |
4341 | return _gdi_.BufferedDC_UnMask(*args, **kwargs) |
4342 | ||
4343 | ||
4344 | class BufferedDCPtr(BufferedDC): | |
4345 | def __init__(self, this): | |
4346 | self.this = this | |
4347 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4348 | self.__class__ = BufferedDC | |
4349 | _gdi_.BufferedDC_swigregister(BufferedDCPtr) | |
4350 | ||
d55e5bfc | 4351 | class BufferedPaintDC(BufferedDC): |
f5b96ee1 RD |
4352 | """ |
4353 | This is a subclass of `wx.BufferedDC` which can be used inside of an | |
4354 | EVT_PAINT event handler. Just create an object of this class instead | |
4355 | of `wx.PaintDC` and that's all you have to do to (mostly) avoid | |
4356 | flicker. The only thing to watch out for is that if you are using this | |
4357 | class together with `wx.ScrolledWindow`, you probably do **not** want | |
4358 | to call `wx.Window.PrepareDC` on it as it already does this internally | |
4359 | for the real underlying `wx.PaintDC`. | |
4360 | ||
4361 | If your window is already fully buffered in a `wx.Bitmap` then your | |
4362 | EVT_PAINT handler can be as simple as just creating a | |
4363 | ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window | |
4364 | automatically when it is destroyed. For example:: | |
4365 | ||
4366 | def OnPaint(self, event): | |
4367 | dc = wx.BufferedPaintDC(self, self.buffer) | |
4368 | ||
4369 | ||
4370 | ||
e2950dbb RD |
4371 | |
4372 | ||
f5b96ee1 | 4373 | """ |
d55e5bfc RD |
4374 | def __repr__(self): |
4375 | return "<%s.%s; proxy of C++ wxBufferedPaintDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4376 | def __init__(self, *args, **kwargs): | |
f5b96ee1 | 4377 | """ |
e2950dbb | 4378 | __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC |
f5b96ee1 RD |
4379 | |
4380 | Create a buffered paint DC. As with `wx.BufferedDC`, you may either | |
4381 | provide the bitmap to be used for buffering or let this object create | |
4382 | one internally (in the latter case, the size of the client part of the | |
4383 | window is automatically used). | |
4384 | ||
4385 | ||
4386 | """ | |
d55e5bfc RD |
4387 | newobj = _gdi_.new_BufferedPaintDC(*args, **kwargs) |
4388 | self.this = newobj.this | |
4389 | self.thisown = 1 | |
4390 | del newobj.thisown | |
4391 | ||
4392 | class BufferedPaintDCPtr(BufferedPaintDC): | |
4393 | def __init__(self, this): | |
4394 | self.this = this | |
4395 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4396 | self.__class__ = BufferedPaintDC | |
4397 | _gdi_.BufferedPaintDC_swigregister(BufferedPaintDCPtr) | |
4398 | ||
4399 | #--------------------------------------------------------------------------- | |
4400 | ||
4401 | class ScreenDC(DC): | |
f5b96ee1 RD |
4402 | """ |
4403 | A wxScreenDC can be used to paint anywhere on the screen. This should | |
4404 | normally be constructed as a temporary stack object; don't store a | |
4405 | wxScreenDC object. | |
4406 | ||
4407 | """ | |
d55e5bfc RD |
4408 | def __repr__(self): |
4409 | return "<%s.%s; proxy of C++ wxScreenDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4410 | def __init__(self, *args, **kwargs): | |
f5b96ee1 RD |
4411 | """ |
4412 | __init__(self) -> ScreenDC | |
4413 | ||
4414 | A wxScreenDC can be used to paint anywhere on the screen. This should | |
4415 | normally be constructed as a temporary stack object; don't store a | |
4416 | wxScreenDC object. | |
4417 | ||
4418 | """ | |
d55e5bfc RD |
4419 | newobj = _gdi_.new_ScreenDC(*args, **kwargs) |
4420 | self.this = newobj.this | |
4421 | self.thisown = 1 | |
4422 | del newobj.thisown | |
4423 | def StartDrawingOnTopWin(*args, **kwargs): | |
f5b96ee1 RD |
4424 | """ |
4425 | StartDrawingOnTopWin(self, Window window) -> bool | |
4426 | ||
4427 | Specify that the area of the screen to be drawn upon coincides with | |
4428 | the given window. | |
4429 | ||
4430 | :see: `EndDrawingOnTop` | |
4431 | """ | |
d55e5bfc RD |
4432 | return _gdi_.ScreenDC_StartDrawingOnTopWin(*args, **kwargs) |
4433 | ||
4434 | def StartDrawingOnTop(*args, **kwargs): | |
f5b96ee1 RD |
4435 | """ |
4436 | StartDrawingOnTop(self, Rect rect=None) -> bool | |
4437 | ||
4438 | Specify that the area is the given rectangle, or the whole screen if | |
4439 | ``None`` is passed. | |
4440 | ||
4441 | :see: `EndDrawingOnTop` | |
4442 | """ | |
d55e5bfc RD |
4443 | return _gdi_.ScreenDC_StartDrawingOnTop(*args, **kwargs) |
4444 | ||
4445 | def EndDrawingOnTop(*args, **kwargs): | |
f5b96ee1 RD |
4446 | """ |
4447 | EndDrawingOnTop(self) -> bool | |
4448 | ||
4449 | Use this in conjunction with `StartDrawingOnTop` or | |
4450 | `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on | |
4451 | top of existing windows. Without this, some window systems (such as X) | |
4452 | only allow drawing to take place underneath other windows. | |
4453 | ||
4454 | You might use this pair of functions when implementing a drag feature, | |
4455 | for example as in the `wx.SplitterWindow` implementation. | |
4456 | ||
4457 | These functions are probably obsolete since the X implementations | |
4458 | allow drawing directly on the screen now. However, the fact that this | |
4459 | function allows the screen to be refreshed afterwards may be useful | |
4460 | to some applications. | |
4461 | """ | |
d55e5bfc RD |
4462 | return _gdi_.ScreenDC_EndDrawingOnTop(*args, **kwargs) |
4463 | ||
4464 | ||
4465 | class ScreenDCPtr(ScreenDC): | |
4466 | def __init__(self, this): | |
4467 | self.this = this | |
4468 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4469 | self.__class__ = ScreenDC | |
4470 | _gdi_.ScreenDC_swigregister(ScreenDCPtr) | |
4471 | ||
4472 | #--------------------------------------------------------------------------- | |
4473 | ||
4474 | class ClientDC(DC): | |
f5b96ee1 RD |
4475 | """ |
4476 | A wx.ClientDC must be constructed if an application wishes to paint on | |
4477 | the client area of a window from outside an EVT_PAINT event. This should | |
4478 | normally be constructed as a temporary stack object; don't store a | |
4479 | wx.ClientDC object long term. | |
4480 | ||
4481 | To draw on a window from within an EVT_PAINT handler, construct a | |
4482 | `wx.PaintDC` object. | |
4483 | ||
4484 | To draw on the whole window including decorations, construct a | |
4485 | `wx.WindowDC` object (Windows only). | |
4486 | ||
4487 | """ | |
d55e5bfc RD |
4488 | def __repr__(self): |
4489 | return "<%s.%s; proxy of C++ wxClientDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4490 | def __init__(self, *args, **kwargs): | |
f5b96ee1 RD |
4491 | """ |
4492 | __init__(self, Window win) -> ClientDC | |
4493 | ||
4494 | Constructor. Pass the window on which you wish to paint. | |
4495 | """ | |
d55e5bfc RD |
4496 | newobj = _gdi_.new_ClientDC(*args, **kwargs) |
4497 | self.this = newobj.this | |
4498 | self.thisown = 1 | |
4499 | del newobj.thisown | |
4500 | ||
4501 | class ClientDCPtr(ClientDC): | |
4502 | def __init__(self, this): | |
4503 | self.this = this | |
4504 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4505 | self.__class__ = ClientDC | |
4506 | _gdi_.ClientDC_swigregister(ClientDCPtr) | |
4507 | ||
4508 | #--------------------------------------------------------------------------- | |
4509 | ||
4510 | class PaintDC(DC): | |
f5b96ee1 RD |
4511 | """ |
4512 | A wx.PaintDC must be constructed if an application wishes to paint on | |
4513 | the client area of a window from within an EVT_PAINT event | |
4514 | handler. This should normally be constructed as a temporary stack | |
4515 | object; don't store a wx.PaintDC object. If you have an EVT_PAINT | |
4516 | handler, you **must** create a wx.PaintDC object within it even if you | |
4517 | don't actually use it. | |
4518 | ||
4519 | Using wx.PaintDC within EVT_PAINT handlers is important because it | |
4520 | automatically sets the clipping area to the damaged area of the | |
4521 | window. Attempts to draw outside this area do not appear. | |
4522 | ||
4523 | To draw on a window from outside EVT_PAINT handlers, construct a | |
4524 | `wx.ClientDC` object. | |
4525 | ||
4526 | """ | |
d55e5bfc RD |
4527 | def __repr__(self): |
4528 | return "<%s.%s; proxy of C++ wxPaintDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4529 | def __init__(self, *args, **kwargs): | |
f5b96ee1 RD |
4530 | """ |
4531 | __init__(self, Window win) -> PaintDC | |
4532 | ||
4533 | Constructor. Pass the window on which you wish to paint. | |
4534 | """ | |
d55e5bfc RD |
4535 | newobj = _gdi_.new_PaintDC(*args, **kwargs) |
4536 | self.this = newobj.this | |
4537 | self.thisown = 1 | |
4538 | del newobj.thisown | |
4539 | ||
4540 | class PaintDCPtr(PaintDC): | |
4541 | def __init__(self, this): | |
4542 | self.this = this | |
4543 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4544 | self.__class__ = PaintDC | |
4545 | _gdi_.PaintDC_swigregister(PaintDCPtr) | |
4546 | ||
4547 | #--------------------------------------------------------------------------- | |
4548 | ||
4549 | class WindowDC(DC): | |
f5b96ee1 RD |
4550 | """ |
4551 | A wx.WindowDC must be constructed if an application wishes to paint on | |
4552 | the whole area of a window (client and decorations). This should | |
4553 | normally be constructed as a temporary stack object; don't store a | |
4554 | wx.WindowDC object. | |
4555 | """ | |
d55e5bfc RD |
4556 | def __repr__(self): |
4557 | return "<%s.%s; proxy of C++ wxWindowDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4558 | def __init__(self, *args, **kwargs): | |
f5b96ee1 RD |
4559 | """ |
4560 | __init__(self, Window win) -> WindowDC | |
4561 | ||
4562 | Constructor. Pass the window on which you wish to paint. | |
4563 | """ | |
d55e5bfc RD |
4564 | newobj = _gdi_.new_WindowDC(*args, **kwargs) |
4565 | self.this = newobj.this | |
4566 | self.thisown = 1 | |
4567 | del newobj.thisown | |
4568 | ||
4569 | class WindowDCPtr(WindowDC): | |
4570 | def __init__(self, this): | |
4571 | self.this = this | |
4572 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4573 | self.__class__ = WindowDC | |
4574 | _gdi_.WindowDC_swigregister(WindowDCPtr) | |
4575 | ||
4576 | #--------------------------------------------------------------------------- | |
4577 | ||
4578 | class MirrorDC(DC): | |
f5b96ee1 RD |
4579 | """ |
4580 | wx.MirrorDC is a simple wrapper class which is always associated with a | |
4581 | real `wx.DC` object and either forwards all of its operations to it | |
4582 | without changes (no mirroring takes place) or exchanges x and y | |
4583 | coordinates which makes it possible to reuse the same code to draw a | |
4584 | figure and its mirror -- i.e. reflection related to the diagonal line | |
4585 | x == y. | |
4586 | """ | |
d55e5bfc RD |
4587 | def __repr__(self): |
4588 | return "<%s.%s; proxy of C++ wxMirrorDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4589 | def __init__(self, *args, **kwargs): | |
f5b96ee1 RD |
4590 | """ |
4591 | __init__(self, DC dc, bool mirror) -> MirrorDC | |
4592 | ||
4593 | Creates a mirrored DC associated with the real *dc*. Everything drawn | |
4594 | on the wx.MirrorDC will appear on the *dc*, and will be mirrored if | |
4595 | *mirror* is True. | |
4596 | """ | |
d55e5bfc RD |
4597 | newobj = _gdi_.new_MirrorDC(*args, **kwargs) |
4598 | self.this = newobj.this | |
4599 | self.thisown = 1 | |
4600 | del newobj.thisown | |
4601 | ||
4602 | class MirrorDCPtr(MirrorDC): | |
4603 | def __init__(self, this): | |
4604 | self.this = this | |
4605 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4606 | self.__class__ = MirrorDC | |
4607 | _gdi_.MirrorDC_swigregister(MirrorDCPtr) | |
4608 | ||
4609 | #--------------------------------------------------------------------------- | |
4610 | ||
4611 | class PostScriptDC(DC): | |
f5b96ee1 | 4612 | """This is a `wx.DC` that can write to PostScript files on any platform.""" |
d55e5bfc RD |
4613 | def __repr__(self): |
4614 | return "<%s.%s; proxy of C++ wxPostScriptDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4615 | def __init__(self, *args, **kwargs): | |
f5b96ee1 RD |
4616 | """ |
4617 | __init__(self, wxPrintData printData) -> PostScriptDC | |
4618 | ||
4619 | Constructs a PostScript printer device context from a `wx.PrintData` | |
4620 | object. | |
4621 | """ | |
d55e5bfc RD |
4622 | newobj = _gdi_.new_PostScriptDC(*args, **kwargs) |
4623 | self.this = newobj.this | |
4624 | self.thisown = 1 | |
4625 | del newobj.thisown | |
4626 | def GetPrintData(*args, **kwargs): | |
4627 | """GetPrintData(self) -> wxPrintData""" | |
4628 | return _gdi_.PostScriptDC_GetPrintData(*args, **kwargs) | |
4629 | ||
4630 | def SetPrintData(*args, **kwargs): | |
4631 | """SetPrintData(self, wxPrintData data)""" | |
4632 | return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs) | |
4633 | ||
4634 | def SetResolution(*args, **kwargs): | |
f5b96ee1 RD |
4635 | """ |
4636 | SetResolution(int ppi) | |
4637 | ||
4638 | Set resolution (in pixels per inch) that will be used in PostScript | |
4639 | output. Default is 720ppi. | |
4640 | """ | |
d55e5bfc RD |
4641 | return _gdi_.PostScriptDC_SetResolution(*args, **kwargs) |
4642 | ||
4643 | SetResolution = staticmethod(SetResolution) | |
4644 | def GetResolution(*args, **kwargs): | |
f5b96ee1 RD |
4645 | """ |
4646 | GetResolution() -> int | |
4647 | ||
4648 | Return resolution used in PostScript output. | |
4649 | """ | |
d55e5bfc RD |
4650 | return _gdi_.PostScriptDC_GetResolution(*args, **kwargs) |
4651 | ||
4652 | GetResolution = staticmethod(GetResolution) | |
4653 | ||
4654 | class PostScriptDCPtr(PostScriptDC): | |
4655 | def __init__(self, this): | |
4656 | self.this = this | |
4657 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4658 | self.__class__ = PostScriptDC | |
4659 | _gdi_.PostScriptDC_swigregister(PostScriptDCPtr) | |
4660 | ||
4661 | def PostScriptDC_SetResolution(*args, **kwargs): | |
f5b96ee1 RD |
4662 | """ |
4663 | PostScriptDC_SetResolution(int ppi) | |
4664 | ||
4665 | Set resolution (in pixels per inch) that will be used in PostScript | |
4666 | output. Default is 720ppi. | |
4667 | """ | |
d55e5bfc RD |
4668 | return _gdi_.PostScriptDC_SetResolution(*args, **kwargs) |
4669 | ||
4670 | def PostScriptDC_GetResolution(*args, **kwargs): | |
f5b96ee1 RD |
4671 | """ |
4672 | PostScriptDC_GetResolution() -> int | |
4673 | ||
4674 | Return resolution used in PostScript output. | |
4675 | """ | |
d55e5bfc RD |
4676 | return _gdi_.PostScriptDC_GetResolution(*args, **kwargs) |
4677 | ||
4678 | #--------------------------------------------------------------------------- | |
4679 | ||
4680 | class MetaFile(_core.Object): | |
093d3ff1 | 4681 | """Proxy of C++ MetaFile class""" |
d55e5bfc RD |
4682 | def __repr__(self): |
4683 | return "<%s.%s; proxy of C++ wxMetaFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4684 | def __init__(self, *args, **kwargs): | |
4685 | """__init__(self, String filename=EmptyString) -> MetaFile""" | |
4686 | newobj = _gdi_.new_MetaFile(*args, **kwargs) | |
4687 | self.this = newobj.this | |
4688 | self.thisown = 1 | |
4689 | del newobj.thisown | |
4690 | def __del__(self, destroy=_gdi_.delete_MetaFile): | |
4691 | """__del__(self)""" | |
4692 | try: | |
4693 | if self.thisown: destroy(self) | |
4694 | except: pass | |
4695 | ||
4696 | def Ok(*args, **kwargs): | |
4697 | """Ok(self) -> bool""" | |
4698 | return _gdi_.MetaFile_Ok(*args, **kwargs) | |
4699 | ||
4700 | def SetClipboard(*args, **kwargs): | |
4701 | """SetClipboard(self, int width=0, int height=0) -> bool""" | |
4702 | return _gdi_.MetaFile_SetClipboard(*args, **kwargs) | |
4703 | ||
4704 | def GetSize(*args, **kwargs): | |
4705 | """GetSize(self) -> Size""" | |
4706 | return _gdi_.MetaFile_GetSize(*args, **kwargs) | |
4707 | ||
4708 | def GetWidth(*args, **kwargs): | |
4709 | """GetWidth(self) -> int""" | |
4710 | return _gdi_.MetaFile_GetWidth(*args, **kwargs) | |
4711 | ||
4712 | def GetHeight(*args, **kwargs): | |
4713 | """GetHeight(self) -> int""" | |
4714 | return _gdi_.MetaFile_GetHeight(*args, **kwargs) | |
4715 | ||
4716 | def GetFileName(*args, **kwargs): | |
4717 | """GetFileName(self) -> String""" | |
4718 | return _gdi_.MetaFile_GetFileName(*args, **kwargs) | |
4719 | ||
4720 | def __nonzero__(self): return self.Ok() | |
4721 | ||
4722 | class MetaFilePtr(MetaFile): | |
4723 | def __init__(self, this): | |
4724 | self.this = this | |
4725 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4726 | self.__class__ = MetaFile | |
4727 | _gdi_.MetaFile_swigregister(MetaFilePtr) | |
4728 | ||
4729 | class MetaFileDC(DC): | |
093d3ff1 | 4730 | """Proxy of C++ MetaFileDC class""" |
d55e5bfc RD |
4731 | def __repr__(self): |
4732 | return "<%s.%s; proxy of C++ wxMetaFileDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4733 | def __init__(self, *args, **kwargs): | |
4734 | """ | |
4735 | __init__(self, String filename=EmptyString, int width=0, int height=0, | |
4736 | String description=EmptyString) -> MetaFileDC | |
4737 | """ | |
4738 | newobj = _gdi_.new_MetaFileDC(*args, **kwargs) | |
4739 | self.this = newobj.this | |
4740 | self.thisown = 1 | |
4741 | del newobj.thisown | |
4742 | def Close(*args, **kwargs): | |
4743 | """Close(self) -> MetaFile""" | |
4744 | return _gdi_.MetaFileDC_Close(*args, **kwargs) | |
4745 | ||
4746 | ||
4747 | class MetaFileDCPtr(MetaFileDC): | |
4748 | def __init__(self, this): | |
4749 | self.this = this | |
4750 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4751 | self.__class__ = MetaFileDC | |
4752 | _gdi_.MetaFileDC_swigregister(MetaFileDCPtr) | |
4753 | ||
4754 | class PrinterDC(DC): | |
093d3ff1 | 4755 | """Proxy of C++ PrinterDC class""" |
d55e5bfc RD |
4756 | def __repr__(self): |
4757 | return "<%s.%s; proxy of C++ wxPrinterDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4758 | def __init__(self, *args, **kwargs): | |
4759 | """__init__(self, wxPrintData printData) -> PrinterDC""" | |
4760 | newobj = _gdi_.new_PrinterDC(*args, **kwargs) | |
4761 | self.this = newobj.this | |
4762 | self.thisown = 1 | |
4763 | del newobj.thisown | |
4764 | ||
4765 | class PrinterDCPtr(PrinterDC): | |
4766 | def __init__(self, this): | |
4767 | self.this = this | |
4768 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4769 | self.__class__ = PrinterDC | |
4770 | _gdi_.PrinterDC_swigregister(PrinterDCPtr) | |
4771 | ||
d55e5bfc RD |
4772 | #--------------------------------------------------------------------------- |
4773 | ||
4774 | IMAGELIST_DRAW_NORMAL = _gdi_.IMAGELIST_DRAW_NORMAL | |
4775 | IMAGELIST_DRAW_TRANSPARENT = _gdi_.IMAGELIST_DRAW_TRANSPARENT | |
4776 | IMAGELIST_DRAW_SELECTED = _gdi_.IMAGELIST_DRAW_SELECTED | |
4777 | IMAGELIST_DRAW_FOCUSED = _gdi_.IMAGELIST_DRAW_FOCUSED | |
4778 | IMAGE_LIST_NORMAL = _gdi_.IMAGE_LIST_NORMAL | |
4779 | IMAGE_LIST_SMALL = _gdi_.IMAGE_LIST_SMALL | |
4780 | IMAGE_LIST_STATE = _gdi_.IMAGE_LIST_STATE | |
4781 | class ImageList(_core.Object): | |
093d3ff1 | 4782 | """Proxy of C++ ImageList class""" |
d55e5bfc RD |
4783 | def __repr__(self): |
4784 | return "<%s.%s; proxy of C++ wxImageList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4785 | def __init__(self, *args, **kwargs): | |
4786 | """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList""" | |
4787 | newobj = _gdi_.new_ImageList(*args, **kwargs) | |
4788 | self.this = newobj.this | |
4789 | self.thisown = 1 | |
4790 | del newobj.thisown | |
4791 | def __del__(self, destroy=_gdi_.delete_ImageList): | |
4792 | """__del__(self)""" | |
4793 | try: | |
4794 | if self.thisown: destroy(self) | |
4795 | except: pass | |
4796 | ||
4797 | def Add(*args, **kwargs): | |
4798 | """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int""" | |
4799 | return _gdi_.ImageList_Add(*args, **kwargs) | |
4800 | ||
4801 | def AddWithColourMask(*args, **kwargs): | |
4802 | """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int""" | |
4803 | return _gdi_.ImageList_AddWithColourMask(*args, **kwargs) | |
4804 | ||
4805 | def AddIcon(*args, **kwargs): | |
4806 | """AddIcon(self, Icon icon) -> int""" | |
4807 | return _gdi_.ImageList_AddIcon(*args, **kwargs) | |
4808 | ||
b9d6a5f3 RD |
4809 | def GetBitmap(*args, **kwargs): |
4810 | """GetBitmap(self, int index) -> Bitmap""" | |
4811 | return _gdi_.ImageList_GetBitmap(*args, **kwargs) | |
4812 | ||
4813 | def GetIcon(*args, **kwargs): | |
4814 | """GetIcon(self, int index) -> Icon""" | |
4815 | return _gdi_.ImageList_GetIcon(*args, **kwargs) | |
4816 | ||
d55e5bfc RD |
4817 | def Replace(*args, **kwargs): |
4818 | """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool""" | |
4819 | return _gdi_.ImageList_Replace(*args, **kwargs) | |
4820 | ||
4821 | def Draw(*args, **kwargs): | |
4822 | """ | |
4823 | Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL, | |
4824 | bool solidBackground=False) -> bool | |
4825 | """ | |
4826 | return _gdi_.ImageList_Draw(*args, **kwargs) | |
4827 | ||
4828 | def GetImageCount(*args, **kwargs): | |
4829 | """GetImageCount(self) -> int""" | |
4830 | return _gdi_.ImageList_GetImageCount(*args, **kwargs) | |
4831 | ||
4832 | def Remove(*args, **kwargs): | |
4833 | """Remove(self, int index) -> bool""" | |
4834 | return _gdi_.ImageList_Remove(*args, **kwargs) | |
4835 | ||
4836 | def RemoveAll(*args, **kwargs): | |
4837 | """RemoveAll(self) -> bool""" | |
4838 | return _gdi_.ImageList_RemoveAll(*args, **kwargs) | |
4839 | ||
4840 | def GetSize(*args, **kwargs): | |
4841 | """GetSize() -> (width,height)""" | |
4842 | return _gdi_.ImageList_GetSize(*args, **kwargs) | |
4843 | ||
4844 | ||
4845 | class ImageListPtr(ImageList): | |
4846 | def __init__(self, this): | |
4847 | self.this = this | |
4848 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4849 | self.__class__ = ImageList | |
4850 | _gdi_.ImageList_swigregister(ImageListPtr) | |
4851 | ||
4852 | #--------------------------------------------------------------------------- | |
4853 | ||
4854 | class PenList(_core.Object): | |
093d3ff1 | 4855 | """Proxy of C++ PenList class""" |
d55e5bfc RD |
4856 | def __init__(self): raise RuntimeError, "No constructor defined" |
4857 | def __repr__(self): | |
4858 | return "<%s.%s; proxy of C++ wxPenList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4859 | def AddPen(*args, **kwargs): | |
4860 | """AddPen(self, Pen pen)""" | |
4861 | return _gdi_.PenList_AddPen(*args, **kwargs) | |
4862 | ||
4863 | def FindOrCreatePen(*args, **kwargs): | |
4864 | """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen""" | |
4865 | return _gdi_.PenList_FindOrCreatePen(*args, **kwargs) | |
4866 | ||
4867 | def RemovePen(*args, **kwargs): | |
4868 | """RemovePen(self, Pen pen)""" | |
4869 | return _gdi_.PenList_RemovePen(*args, **kwargs) | |
4870 | ||
4871 | def GetCount(*args, **kwargs): | |
4872 | """GetCount(self) -> int""" | |
4873 | return _gdi_.PenList_GetCount(*args, **kwargs) | |
4874 | ||
4875 | ||
4876 | class PenListPtr(PenList): | |
4877 | def __init__(self, this): | |
4878 | self.this = this | |
4879 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4880 | self.__class__ = PenList | |
4881 | _gdi_.PenList_swigregister(PenListPtr) | |
4882 | cvar = _gdi_.cvar | |
4883 | NORMAL_FONT = cvar.NORMAL_FONT | |
4884 | SMALL_FONT = cvar.SMALL_FONT | |
4885 | ITALIC_FONT = cvar.ITALIC_FONT | |
4886 | SWISS_FONT = cvar.SWISS_FONT | |
4887 | RED_PEN = cvar.RED_PEN | |
4888 | CYAN_PEN = cvar.CYAN_PEN | |
4889 | GREEN_PEN = cvar.GREEN_PEN | |
4890 | BLACK_PEN = cvar.BLACK_PEN | |
4891 | WHITE_PEN = cvar.WHITE_PEN | |
4892 | TRANSPARENT_PEN = cvar.TRANSPARENT_PEN | |
4893 | BLACK_DASHED_PEN = cvar.BLACK_DASHED_PEN | |
4894 | GREY_PEN = cvar.GREY_PEN | |
4895 | MEDIUM_GREY_PEN = cvar.MEDIUM_GREY_PEN | |
4896 | LIGHT_GREY_PEN = cvar.LIGHT_GREY_PEN | |
4897 | BLUE_BRUSH = cvar.BLUE_BRUSH | |
4898 | GREEN_BRUSH = cvar.GREEN_BRUSH | |
4899 | WHITE_BRUSH = cvar.WHITE_BRUSH | |
4900 | BLACK_BRUSH = cvar.BLACK_BRUSH | |
4901 | TRANSPARENT_BRUSH = cvar.TRANSPARENT_BRUSH | |
4902 | CYAN_BRUSH = cvar.CYAN_BRUSH | |
4903 | RED_BRUSH = cvar.RED_BRUSH | |
4904 | GREY_BRUSH = cvar.GREY_BRUSH | |
4905 | MEDIUM_GREY_BRUSH = cvar.MEDIUM_GREY_BRUSH | |
4906 | LIGHT_GREY_BRUSH = cvar.LIGHT_GREY_BRUSH | |
4907 | BLACK = cvar.BLACK | |
4908 | WHITE = cvar.WHITE | |
4909 | RED = cvar.RED | |
4910 | BLUE = cvar.BLUE | |
4911 | GREEN = cvar.GREEN | |
4912 | CYAN = cvar.CYAN | |
4913 | LIGHT_GREY = cvar.LIGHT_GREY | |
4914 | STANDARD_CURSOR = cvar.STANDARD_CURSOR | |
4915 | HOURGLASS_CURSOR = cvar.HOURGLASS_CURSOR | |
4916 | CROSS_CURSOR = cvar.CROSS_CURSOR | |
4917 | NullBitmap = cvar.NullBitmap | |
4918 | NullIcon = cvar.NullIcon | |
4919 | NullCursor = cvar.NullCursor | |
4920 | NullPen = cvar.NullPen | |
4921 | NullBrush = cvar.NullBrush | |
4922 | NullPalette = cvar.NullPalette | |
4923 | NullFont = cvar.NullFont | |
4924 | NullColour = cvar.NullColour | |
4925 | ||
4926 | class BrushList(_core.Object): | |
093d3ff1 | 4927 | """Proxy of C++ BrushList class""" |
d55e5bfc RD |
4928 | def __init__(self): raise RuntimeError, "No constructor defined" |
4929 | def __repr__(self): | |
4930 | return "<%s.%s; proxy of C++ wxBrushList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4931 | def AddBrush(*args, **kwargs): | |
4932 | """AddBrush(self, Brush brush)""" | |
4933 | return _gdi_.BrushList_AddBrush(*args, **kwargs) | |
4934 | ||
4935 | def FindOrCreateBrush(*args, **kwargs): | |
ea939623 | 4936 | """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush""" |
d55e5bfc RD |
4937 | return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs) |
4938 | ||
4939 | def RemoveBrush(*args, **kwargs): | |
4940 | """RemoveBrush(self, Brush brush)""" | |
4941 | return _gdi_.BrushList_RemoveBrush(*args, **kwargs) | |
4942 | ||
4943 | def GetCount(*args, **kwargs): | |
4944 | """GetCount(self) -> int""" | |
4945 | return _gdi_.BrushList_GetCount(*args, **kwargs) | |
4946 | ||
4947 | ||
4948 | class BrushListPtr(BrushList): | |
4949 | def __init__(self, this): | |
4950 | self.this = this | |
4951 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4952 | self.__class__ = BrushList | |
4953 | _gdi_.BrushList_swigregister(BrushListPtr) | |
4954 | ||
4955 | class ColourDatabase(_core.Object): | |
093d3ff1 | 4956 | """Proxy of C++ ColourDatabase class""" |
d55e5bfc RD |
4957 | def __repr__(self): |
4958 | return "<%s.%s; proxy of C++ wxColourDatabase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
4959 | def __init__(self, *args, **kwargs): | |
4960 | """__init__(self) -> ColourDatabase""" | |
4961 | newobj = _gdi_.new_ColourDatabase(*args, **kwargs) | |
4962 | self.this = newobj.this | |
4963 | self.thisown = 1 | |
4964 | del newobj.thisown | |
4965 | def __del__(self, destroy=_gdi_.delete_ColourDatabase): | |
4966 | """__del__(self)""" | |
4967 | try: | |
4968 | if self.thisown: destroy(self) | |
4969 | except: pass | |
4970 | ||
4971 | def Find(*args, **kwargs): | |
4972 | """Find(self, String name) -> Colour""" | |
4973 | return _gdi_.ColourDatabase_Find(*args, **kwargs) | |
4974 | ||
4975 | def FindName(*args, **kwargs): | |
4976 | """FindName(self, Colour colour) -> String""" | |
4977 | return _gdi_.ColourDatabase_FindName(*args, **kwargs) | |
4978 | ||
4979 | FindColour = Find | |
4980 | def AddColour(*args, **kwargs): | |
4981 | """AddColour(self, String name, Colour colour)""" | |
4982 | return _gdi_.ColourDatabase_AddColour(*args, **kwargs) | |
4983 | ||
4984 | def Append(*args, **kwargs): | |
4985 | """Append(self, String name, int red, int green, int blue)""" | |
4986 | return _gdi_.ColourDatabase_Append(*args, **kwargs) | |
4987 | ||
4988 | ||
4989 | class ColourDatabasePtr(ColourDatabase): | |
4990 | def __init__(self, this): | |
4991 | self.this = this | |
4992 | if not hasattr(self,"thisown"): self.thisown = 0 | |
4993 | self.__class__ = ColourDatabase | |
4994 | _gdi_.ColourDatabase_swigregister(ColourDatabasePtr) | |
4995 | ||
4996 | class FontList(_core.Object): | |
093d3ff1 | 4997 | """Proxy of C++ FontList class""" |
d55e5bfc RD |
4998 | def __init__(self): raise RuntimeError, "No constructor defined" |
4999 | def __repr__(self): | |
5000 | return "<%s.%s; proxy of C++ wxFontList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5001 | def AddFont(*args, **kwargs): | |
5002 | """AddFont(self, Font font)""" | |
5003 | return _gdi_.FontList_AddFont(*args, **kwargs) | |
5004 | ||
5005 | def FindOrCreateFont(*args, **kwargs): | |
5006 | """ | |
5007 | FindOrCreateFont(self, int point_size, int family, int style, int weight, | |
5008 | bool underline=False, String facename=EmptyString, | |
5009 | int encoding=FONTENCODING_DEFAULT) -> Font | |
5010 | """ | |
5011 | return _gdi_.FontList_FindOrCreateFont(*args, **kwargs) | |
5012 | ||
5013 | def RemoveFont(*args, **kwargs): | |
5014 | """RemoveFont(self, Font font)""" | |
5015 | return _gdi_.FontList_RemoveFont(*args, **kwargs) | |
5016 | ||
5017 | def GetCount(*args, **kwargs): | |
5018 | """GetCount(self) -> int""" | |
5019 | return _gdi_.FontList_GetCount(*args, **kwargs) | |
5020 | ||
5021 | ||
5022 | class FontListPtr(FontList): | |
5023 | def __init__(self, this): | |
5024 | self.this = this | |
5025 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5026 | self.__class__ = FontList | |
5027 | _gdi_.FontList_swigregister(FontListPtr) | |
5028 | ||
5029 | #--------------------------------------------------------------------------- | |
5030 | ||
5031 | NullColor = NullColour | |
5032 | #--------------------------------------------------------------------------- | |
5033 | ||
5034 | class Effects(_core.Object): | |
093d3ff1 | 5035 | """Proxy of C++ Effects class""" |
d55e5bfc RD |
5036 | def __repr__(self): |
5037 | return "<%s.%s; proxy of C++ wxEffects instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) | |
5038 | def __init__(self, *args, **kwargs): | |
5039 | """__init__(self) -> Effects""" | |
5040 | newobj = _gdi_.new_Effects(*args, **kwargs) | |
5041 | self.this = newobj.this | |
5042 | self.thisown = 1 | |
5043 | del newobj.thisown | |
5044 | def GetHighlightColour(*args, **kwargs): | |
5045 | """GetHighlightColour(self) -> Colour""" | |
5046 | return _gdi_.Effects_GetHighlightColour(*args, **kwargs) | |
5047 | ||
5048 | def GetLightShadow(*args, **kwargs): | |
5049 | """GetLightShadow(self) -> Colour""" | |
5050 | return _gdi_.Effects_GetLightShadow(*args, **kwargs) | |
5051 | ||
5052 | def GetFaceColour(*args, **kwargs): | |
5053 | """GetFaceColour(self) -> Colour""" | |
5054 | return _gdi_.Effects_GetFaceColour(*args, **kwargs) | |
5055 | ||
5056 | def GetMediumShadow(*args, **kwargs): | |
5057 | """GetMediumShadow(self) -> Colour""" | |
5058 | return _gdi_.Effects_GetMediumShadow(*args, **kwargs) | |
5059 | ||
5060 | def GetDarkShadow(*args, **kwargs): | |
5061 | """GetDarkShadow(self) -> Colour""" | |
5062 | return _gdi_.Effects_GetDarkShadow(*args, **kwargs) | |
5063 | ||
5064 | def SetHighlightColour(*args, **kwargs): | |
5065 | """SetHighlightColour(self, Colour c)""" | |
5066 | return _gdi_.Effects_SetHighlightColour(*args, **kwargs) | |
5067 | ||
5068 | def SetLightShadow(*args, **kwargs): | |
5069 | """SetLightShadow(self, Colour c)""" | |
5070 | return _gdi_.Effects_SetLightShadow(*args, **kwargs) | |
5071 | ||
5072 | def SetFaceColour(*args, **kwargs): | |
5073 | """SetFaceColour(self, Colour c)""" | |
5074 | return _gdi_.Effects_SetFaceColour(*args, **kwargs) | |
5075 | ||
5076 | def SetMediumShadow(*args, **kwargs): | |
5077 | """SetMediumShadow(self, Colour c)""" | |
5078 | return _gdi_.Effects_SetMediumShadow(*args, **kwargs) | |
5079 | ||
5080 | def SetDarkShadow(*args, **kwargs): | |
5081 | """SetDarkShadow(self, Colour c)""" | |
5082 | return _gdi_.Effects_SetDarkShadow(*args, **kwargs) | |
5083 | ||
5084 | def Set(*args, **kwargs): | |
5085 | """ | |
5086 | Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour, | |
5087 | Colour mediumShadow, Colour darkShadow) | |
5088 | """ | |
5089 | return _gdi_.Effects_Set(*args, **kwargs) | |
5090 | ||
5091 | def DrawSunkenEdge(*args, **kwargs): | |
5092 | """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)""" | |
5093 | return _gdi_.Effects_DrawSunkenEdge(*args, **kwargs) | |
5094 | ||
5095 | def TileBitmap(*args, **kwargs): | |
5096 | """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool""" | |
5097 | return _gdi_.Effects_TileBitmap(*args, **kwargs) | |
5098 | ||
5099 | ||
5100 | class EffectsPtr(Effects): | |
5101 | def __init__(self, this): | |
5102 | self.this = this | |
5103 | if not hasattr(self,"thisown"): self.thisown = 0 | |
5104 | self.__class__ = Effects | |
5105 | _gdi_.Effects_swigregister(EffectsPtr) | |
5106 | TheFontList = cvar.TheFontList | |
5107 | ThePenList = cvar.ThePenList | |
5108 | TheBrushList = cvar.TheBrushList | |
5109 | TheColourDatabase = cvar.TheColourDatabase | |
5110 | ||
5111 |