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