]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/gtk/_gdi.py
reSWIGged
[wxWidgets.git] / wxPython / src / gtk / _gdi.py
1 # This file was created automatically by SWIG 1.3.29.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _gdi_
5 import new
6 new_instancemethod = new.instancemethod
7 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
8 if (name == "thisown"): return self.this.own(value)
9 if (name == "this"):
10 if type(value).__name__ == 'PySwigObject':
11 self.__dict__[name] = value
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):
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 if (name == "thisown"): return self.this.own()
25 method = class_type.__swig_getmethods__.get(name,None)
26 if method: return method(self)
27 raise AttributeError,name
28
29 def _swig_repr(self):
30 try: strthis = "proxy of " + self.this.__repr__()
31 except: strthis = ""
32 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
33
34 import types
35 try:
36 _object = types.ObjectType
37 _newclass = 1
38 except AttributeError:
39 class _object : pass
40 _newclass = 0
41 del types
42
43
44 def _swig_setattr_nondynamic_method(set):
45 def set_attr(self,name,value):
46 if (name == "thisown"): return self.this.own(value)
47 if hasattr(self,name) or (name == "this"):
48 set(self,name,value)
49 else:
50 raise AttributeError("You cannot add attributes to %s" % self)
51 return set_attr
52
53
54 import _core
55 wx = _core
56 #---------------------------------------------------------------------------
57
58 class GDIObject(_core.Object):
59 """Proxy of C++ GDIObject class"""
60 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
61 __repr__ = _swig_repr
62 def __init__(self, *args, **kwargs):
63 """__init__(self) -> GDIObject"""
64 _gdi_.GDIObject_swiginit(self,_gdi_.new_GDIObject(*args, **kwargs))
65 __swig_destroy__ = _gdi_.delete_GDIObject
66 __del__ = lambda self : None;
67 def IsNull(*args, **kwargs):
68 """IsNull(self) -> bool"""
69 return _gdi_.GDIObject_IsNull(*args, **kwargs)
70
71 _gdi_.GDIObject_swigregister(GDIObject)
72
73 #---------------------------------------------------------------------------
74
75 C2S_NAME = _gdi_.C2S_NAME
76 C2S_CSS_SYNTAX = _gdi_.C2S_CSS_SYNTAX
77 C2S_HTML_SYNTAX = _gdi_.C2S_HTML_SYNTAX
78 ALPHA_TRANSPARENT = _gdi_.ALPHA_TRANSPARENT
79 ALPHA_OPAQUE = _gdi_.ALPHA_OPAQUE
80 class Colour(_core.Object):
81 """
82 A colour is an object representing a combination of Red, Green, and
83 Blue (RGB) intensity values, and is used to determine drawing colours,
84 window colours, etc. Valid RGB values are in the range 0 to 255.
85
86 In wxPython there are typemaps that will automatically convert from a
87 colour name, from a '#RRGGBB' colour hex value string, or from a 3
88 integer tuple to a wx.Colour object when calling C++ methods that
89 expect a wxColour. This means that the following are all
90 equivallent::
91
92 win.SetBackgroundColour(wxColour(0,0,255))
93 win.SetBackgroundColour('BLUE')
94 win.SetBackgroundColour('#0000FF')
95 win.SetBackgroundColour((0,0,255))
96
97 Additional colour names and their coresponding values can be added
98 using `wx.ColourDatabase`. Various system colours (as set in the
99 user's system preferences) can be retrieved with
100 `wx.SystemSettings.GetColour`.
101
102 """
103 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
104 __repr__ = _swig_repr
105 def __init__(self, *args, **kwargs):
106 """
107 __init__(self, byte red=0, byte green=0, byte blue=0, byte alpha=ALPHA_OPAQUE) -> Colour
108
109 Constructs a colour from red, green and blue values.
110
111 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
112
113 """
114 _gdi_.Colour_swiginit(self,_gdi_.new_Colour(*args, **kwargs))
115 __swig_destroy__ = _gdi_.delete_Colour
116 __del__ = lambda self : None;
117 def Red(*args, **kwargs):
118 """
119 Red(self) -> byte
120
121 Returns the red intensity.
122 """
123 return _gdi_.Colour_Red(*args, **kwargs)
124
125 def Green(*args, **kwargs):
126 """
127 Green(self) -> byte
128
129 Returns the green intensity.
130 """
131 return _gdi_.Colour_Green(*args, **kwargs)
132
133 def Blue(*args, **kwargs):
134 """
135 Blue(self) -> byte
136
137 Returns the blue intensity.
138 """
139 return _gdi_.Colour_Blue(*args, **kwargs)
140
141 def Alpha(*args, **kwargs):
142 """
143 Alpha(self) -> byte
144
145 Returns the Alpha value.
146 """
147 return _gdi_.Colour_Alpha(*args, **kwargs)
148
149 def IsOk(*args, **kwargs):
150 """
151 IsOk(self) -> bool
152
153 Returns True if the colour object is valid (the colour has been
154 initialised with RGB values).
155 """
156 return _gdi_.Colour_IsOk(*args, **kwargs)
157
158 Ok = IsOk
159 def Set(*args, **kwargs):
160 """
161 Set(self, byte red, byte green, byte blue, byte alpha=ALPHA_OPAQUE)
162
163 Sets the RGB intensity values.
164 """
165 return _gdi_.Colour_Set(*args, **kwargs)
166
167 def SetRGB(*args, **kwargs):
168 """
169 SetRGB(self, unsigned long colRGB)
170
171 Sets the RGB intensity values from a packed RGB value.
172 """
173 return _gdi_.Colour_SetRGB(*args, **kwargs)
174
175 def SetFromName(*args, **kwargs):
176 """
177 SetFromName(self, String colourName)
178
179 Sets the RGB intensity values using a colour name listed in
180 ``wx.TheColourDatabase``.
181 """
182 return _gdi_.Colour_SetFromName(*args, **kwargs)
183
184 def GetAsString(*args, **kwargs):
185 """
186 GetAsString(self, long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) -> String
187
188 Return the colour as a string. Acceptable flags are:
189
190 =================== ==================================
191 wx.C2S_NAME return colour name, when possible
192 wx.C2S_CSS_SYNTAX return colour in rgb(r,g,b) syntax
193 wx.C2S_HTML_SYNTAX return colour in #rrggbb syntax
194 =================== ==================================
195 """
196 return _gdi_.Colour_GetAsString(*args, **kwargs)
197
198 def GetPixel(*args, **kwargs):
199 """
200 GetPixel(self) -> long
201
202 Returns a pixel value which is platform-dependent. On Windows, a
203 COLORREF is returned. On X, an allocated pixel value is returned. -1
204 is returned if the pixel is invalid (on X, unallocated).
205 """
206 return _gdi_.Colour_GetPixel(*args, **kwargs)
207
208 def __eq__(*args, **kwargs):
209 """
210 __eq__(self, PyObject other) -> bool
211
212 Compare colours for equality.
213 """
214 return _gdi_.Colour___eq__(*args, **kwargs)
215
216 def __ne__(*args, **kwargs):
217 """
218 __ne__(self, PyObject other) -> bool
219
220 Compare colours for inequality.
221 """
222 return _gdi_.Colour___ne__(*args, **kwargs)
223
224 def Get(*args, **kwargs):
225 """
226 Get() -> (r, g, b)
227
228 Returns the RGB intensity values as a tuple.
229 """
230 return _gdi_.Colour_Get(*args, **kwargs)
231
232 def GetRGB(*args, **kwargs):
233 """
234 GetRGB(self) -> unsigned long
235
236 Return the colour as a packed RGB value
237 """
238 return _gdi_.Colour_GetRGB(*args, **kwargs)
239
240 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
241 def __str__(self): return str(self.Get(True))
242 def __repr__(self): return 'wx.Colour' + str(self.Get(True))
243 def __len__(self): return len(self.Get())
244 def __getitem__(self, index): return self.Get()[index]
245 def __nonzero__(self): return self.IsOk()
246 __safe_for_unpickling__ = True
247 def __reduce__(self): return (Colour, self.Get(True))
248
249 Pixel = property(GetPixel,doc="See `GetPixel`")
250 RGB = property(GetRGB,SetRGB,doc="See `GetRGB` and `SetRGB`")
251 _gdi_.Colour_swigregister(Colour)
252
253 def NamedColour(*args, **kwargs):
254 """
255 NamedColour(String colorName) -> Colour
256
257 Constructs a colour object using a colour name listed in
258 ``wx.TheColourDatabase``.
259 """
260 val = _gdi_.new_NamedColour(*args, **kwargs)
261 return val
262
263 def ColourRGB(*args, **kwargs):
264 """
265 ColourRGB(unsigned long colRGB) -> Colour
266
267 Constructs a colour from a packed RGB value.
268 """
269 val = _gdi_.new_ColourRGB(*args, **kwargs)
270 return val
271
272 Color = Colour
273 NamedColor = NamedColour
274 ColorRGB = ColourRGB
275
276 class Palette(GDIObject):
277 """Proxy of C++ Palette class"""
278 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
279 __repr__ = _swig_repr
280 def __init__(self, *args, **kwargs):
281 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
282 _gdi_.Palette_swiginit(self,_gdi_.new_Palette(*args, **kwargs))
283 __swig_destroy__ = _gdi_.delete_Palette
284 __del__ = lambda self : None;
285 def GetPixel(*args, **kwargs):
286 """GetPixel(self, byte red, byte green, byte blue) -> int"""
287 return _gdi_.Palette_GetPixel(*args, **kwargs)
288
289 def GetRGB(*args, **kwargs):
290 """GetRGB(self, int pixel) -> (R,G,B)"""
291 return _gdi_.Palette_GetRGB(*args, **kwargs)
292
293 def GetColoursCount(*args, **kwargs):
294 """GetColoursCount(self) -> int"""
295 return _gdi_.Palette_GetColoursCount(*args, **kwargs)
296
297 def IsOk(*args, **kwargs):
298 """IsOk(self) -> bool"""
299 return _gdi_.Palette_IsOk(*args, **kwargs)
300
301 Ok = IsOk
302 def __nonzero__(self): return self.IsOk()
303 ColoursCount = property(GetColoursCount,doc="See `GetColoursCount`")
304 _gdi_.Palette_swigregister(Palette)
305
306 #---------------------------------------------------------------------------
307
308 class Pen(GDIObject):
309 """Proxy of C++ Pen class"""
310 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
311 __repr__ = _swig_repr
312 def __init__(self, *args, **kwargs):
313 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
314 _gdi_.Pen_swiginit(self,_gdi_.new_Pen(*args, **kwargs))
315 __swig_destroy__ = _gdi_.delete_Pen
316 __del__ = lambda self : None;
317 def GetCap(*args, **kwargs):
318 """GetCap(self) -> int"""
319 return _gdi_.Pen_GetCap(*args, **kwargs)
320
321 def GetColour(*args, **kwargs):
322 """GetColour(self) -> Colour"""
323 return _gdi_.Pen_GetColour(*args, **kwargs)
324
325 def GetJoin(*args, **kwargs):
326 """GetJoin(self) -> int"""
327 return _gdi_.Pen_GetJoin(*args, **kwargs)
328
329 def GetStyle(*args, **kwargs):
330 """GetStyle(self) -> int"""
331 return _gdi_.Pen_GetStyle(*args, **kwargs)
332
333 def GetWidth(*args, **kwargs):
334 """GetWidth(self) -> int"""
335 return _gdi_.Pen_GetWidth(*args, **kwargs)
336
337 def IsOk(*args, **kwargs):
338 """IsOk(self) -> bool"""
339 return _gdi_.Pen_IsOk(*args, **kwargs)
340
341 Ok = IsOk
342 def SetCap(*args, **kwargs):
343 """SetCap(self, int cap_style)"""
344 return _gdi_.Pen_SetCap(*args, **kwargs)
345
346 def SetColour(*args, **kwargs):
347 """SetColour(self, Colour colour)"""
348 return _gdi_.Pen_SetColour(*args, **kwargs)
349
350 def SetJoin(*args, **kwargs):
351 """SetJoin(self, int join_style)"""
352 return _gdi_.Pen_SetJoin(*args, **kwargs)
353
354 def SetStyle(*args, **kwargs):
355 """SetStyle(self, int style)"""
356 return _gdi_.Pen_SetStyle(*args, **kwargs)
357
358 def SetWidth(*args, **kwargs):
359 """SetWidth(self, int width)"""
360 return _gdi_.Pen_SetWidth(*args, **kwargs)
361
362 def SetDashes(*args, **kwargs):
363 """SetDashes(self, int dashes)"""
364 return _gdi_.Pen_SetDashes(*args, **kwargs)
365
366 def GetDashes(*args, **kwargs):
367 """GetDashes(self) -> PyObject"""
368 return _gdi_.Pen_GetDashes(*args, **kwargs)
369
370 def _SetDashes(*args, **kwargs):
371 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
372 return _gdi_.Pen__SetDashes(*args, **kwargs)
373
374 def SetDashes(self, dashes):
375 """
376 Associate a list of dash lengths with the Pen.
377 """
378 self._SetDashes(self, dashes)
379
380 def GetDashCount(*args, **kwargs):
381 """GetDashCount(self) -> int"""
382 return _gdi_.Pen_GetDashCount(*args, **kwargs)
383
384 DashCount = property(GetDashCount,doc="See `GetDashCount`")
385 def __eq__(*args, **kwargs):
386 """__eq__(self, Pen other) -> bool"""
387 return _gdi_.Pen___eq__(*args, **kwargs)
388
389 def __ne__(*args, **kwargs):
390 """__ne__(self, Pen other) -> bool"""
391 return _gdi_.Pen___ne__(*args, **kwargs)
392
393 def __nonzero__(self): return self.IsOk()
394 Cap = property(GetCap,SetCap,doc="See `GetCap` and `SetCap`")
395 Colour = property(GetColour,SetColour,doc="See `GetColour` and `SetColour`")
396 Dashes = property(GetDashes,SetDashes,doc="See `GetDashes` and `SetDashes`")
397 Join = property(GetJoin,SetJoin,doc="See `GetJoin` and `SetJoin`")
398 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
399 Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
400 _gdi_.Pen_swigregister(Pen)
401
402 #---------------------------------------------------------------------------
403
404 class Brush(GDIObject):
405 """
406 A brush is a drawing tool for filling in areas. It is used for
407 painting the background of rectangles, ellipses, etc. when drawing on
408 a `wx.DC`. It has a colour and a style.
409
410 :warning: Do not create instances of wx.Brush before the `wx.App`
411 object has been created because, depending on the platform,
412 required internal data structures may not have been initialized
413 yet. Instead create your brushes in the app's OnInit or as they
414 are needed for drawing.
415
416 :note: On monochrome displays all brushes are white, unless the colour
417 really is black.
418
419 :see: `wx.BrushList`, `wx.DC`, `wx.DC.SetBrush`
420
421 """
422 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
423 __repr__ = _swig_repr
424 def __init__(self, *args, **kwargs):
425 """
426 __init__(self, Colour colour, int style=SOLID) -> Brush
427
428 Constructs a brush from a `wx.Colour` object and a style.The style parameter may be one of the following:
429
430 =================== =============================
431 Style Meaning
432 =================== =============================
433 wx.TRANSPARENT Transparent (no fill).
434 wx.SOLID Solid.
435 wx.STIPPLE Uses a bitmap as a stipple.
436 wx.BDIAGONAL_HATCH Backward diagonal hatch.
437 wx.CROSSDIAG_HATCH Cross-diagonal hatch.
438 wx.FDIAGONAL_HATCH Forward diagonal hatch.
439 wx.CROSS_HATCH Cross hatch.
440 wx.HORIZONTAL_HATCH Horizontal hatch.
441 wx.VERTICAL_HATCH Vertical hatch.
442 =================== =============================
443
444 :see: `wx.BrushFromBitmap`
445
446 """
447 _gdi_.Brush_swiginit(self,_gdi_.new_Brush(*args, **kwargs))
448 __swig_destroy__ = _gdi_.delete_Brush
449 __del__ = lambda self : None;
450 def SetColour(*args, **kwargs):
451 """
452 SetColour(self, Colour col)
453
454 Set the brush's `wx.Colour`.
455 """
456 return _gdi_.Brush_SetColour(*args, **kwargs)
457
458 def SetStyle(*args, **kwargs):
459 """
460 SetStyle(self, int style)
461
462 Sets the style of the brush. See `__init__` for a listing of styles.
463 """
464 return _gdi_.Brush_SetStyle(*args, **kwargs)
465
466 def SetStipple(*args, **kwargs):
467 """
468 SetStipple(self, Bitmap stipple)
469
470 Sets the stipple `wx.Bitmap`.
471 """
472 return _gdi_.Brush_SetStipple(*args, **kwargs)
473
474 def GetColour(*args, **kwargs):
475 """
476 GetColour(self) -> Colour
477
478 Returns the `wx.Colour` of the brush.
479 """
480 return _gdi_.Brush_GetColour(*args, **kwargs)
481
482 def GetStyle(*args, **kwargs):
483 """
484 GetStyle(self) -> int
485
486 Returns the style of the brush. See `__init__` for a listing of
487 styles.
488 """
489 return _gdi_.Brush_GetStyle(*args, **kwargs)
490
491 def GetStipple(*args, **kwargs):
492 """
493 GetStipple(self) -> Bitmap
494
495 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
496 have a wx.STIPPLE style, then the return value may be non-None but an
497 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
498 """
499 return _gdi_.Brush_GetStipple(*args, **kwargs)
500
501 def IsHatch(*args, **kwargs):
502 """
503 IsHatch(self) -> bool
504
505 Is the current style a hatch type?
506 """
507 return _gdi_.Brush_IsHatch(*args, **kwargs)
508
509 def IsOk(*args, **kwargs):
510 """
511 IsOk(self) -> bool
512
513 Returns True if the brush is initialised and valid.
514 """
515 return _gdi_.Brush_IsOk(*args, **kwargs)
516
517 Ok = IsOk
518 def __nonzero__(self): return self.IsOk()
519 Colour = property(GetColour,SetColour,doc="See `GetColour` and `SetColour`")
520 Stipple = property(GetStipple,SetStipple,doc="See `GetStipple` and `SetStipple`")
521 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
522 _gdi_.Brush_swigregister(Brush)
523
524 def BrushFromBitmap(*args, **kwargs):
525 """
526 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
527
528 Constructs a stippled brush using a bitmap.
529 """
530 val = _gdi_.new_BrushFromBitmap(*args, **kwargs)
531 return val
532
533 class Bitmap(GDIObject):
534 """
535 The wx.Bitmap class encapsulates the concept of a platform-dependent
536 bitmap. It can be either monochrome or colour, and either loaded from
537 a file or created dynamically. A bitmap can be selected into a memory
538 device context (instance of `wx.MemoryDC`). This enables the bitmap to
539 be copied to a window or memory device context using `wx.DC.Blit`, or
540 to be used as a drawing surface.
541
542 The BMP and XMP image file formats are supported on all platforms by
543 wx.Bitmap. Other formats are automatically loaded by `wx.Image` and
544 converted to a wx.Bitmap, so any image file format supported by
545 `wx.Image` can be used.
546
547 :todo: Add wrappers and support for raw bitmap data access. Can this
548 be be put into Python without losing the speed benefits of the
549 teplates and iterators in rawbmp.h?
550
551 :todo: Find a way to do very efficient PIL Image <--> wx.Bitmap
552 converstions.
553
554 :see: `wx.EmptyBitmap`, `wx.BitmapFromIcon`, `wx.BitmapFromImage`,
555 `wx.BitmapFromXPMData`, `wx.BitmapFromBits`, `wx.BitmapFromBuffer`,
556 `wx.BitmapFromBufferRGBA`, `wx.Image`
557
558 """
559 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
560 __repr__ = _swig_repr
561 def __init__(self, *args, **kwargs):
562 """
563 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
564
565 Loads a bitmap from a file.
566 :param name: Name of the file to load the bitmap from.
567 :param type: The type of image to expect. Can be one of the following
568 constants (assuming that the neccessary `wx.Image` handlers are
569 loaded):
570
571 * wx.BITMAP_TYPE_ANY
572 * wx.BITMAP_TYPE_BMP
573 * wx.BITMAP_TYPE_ICO
574 * wx.BITMAP_TYPE_CUR
575 * wx.BITMAP_TYPE_XBM
576 * wx.BITMAP_TYPE_XPM
577 * wx.BITMAP_TYPE_TIF
578 * wx.BITMAP_TYPE_GIF
579 * wx.BITMAP_TYPE_PNG
580 * wx.BITMAP_TYPE_JPEG
581 * wx.BITMAP_TYPE_PNM
582 * wx.BITMAP_TYPE_PCX
583 * wx.BITMAP_TYPE_PICT
584 * wx.BITMAP_TYPE_ICON
585 * wx.BITMAP_TYPE_ANI
586 * wx.BITMAP_TYPE_IFF
587
588 :see: Alternate constructors `wx.EmptyBitmap`, `wx.BitmapFromIcon`,
589 `wx.BitmapFromImage`, `wx.BitmapFromXPMData`, `wx.BitmapFromBits`,
590 `wx.BitmapFromBuffer`, `wx.BitmapFromBufferRGBA`,
591
592 """
593 _gdi_.Bitmap_swiginit(self,_gdi_.new_Bitmap(*args, **kwargs))
594 __swig_destroy__ = _gdi_.delete_Bitmap
595 __del__ = lambda self : None;
596 def IsOk(*args, **kwargs):
597 """IsOk(self) -> bool"""
598 return _gdi_.Bitmap_IsOk(*args, **kwargs)
599
600 Ok = IsOk
601 def GetWidth(*args, **kwargs):
602 """
603 GetWidth(self) -> int
604
605 Gets the width of the bitmap in pixels.
606 """
607 return _gdi_.Bitmap_GetWidth(*args, **kwargs)
608
609 def GetHeight(*args, **kwargs):
610 """
611 GetHeight(self) -> int
612
613 Gets the height of the bitmap in pixels.
614 """
615 return _gdi_.Bitmap_GetHeight(*args, **kwargs)
616
617 def GetDepth(*args, **kwargs):
618 """
619 GetDepth(self) -> int
620
621 Gets the colour depth of the bitmap. A value of 1 indicates a
622 monochrome bitmap.
623 """
624 return _gdi_.Bitmap_GetDepth(*args, **kwargs)
625
626 def GetSize(*args, **kwargs):
627 """
628 GetSize(self) -> Size
629
630 Get the size of the bitmap.
631 """
632 return _gdi_.Bitmap_GetSize(*args, **kwargs)
633
634 def ConvertToImage(*args, **kwargs):
635 """
636 ConvertToImage(self) -> Image
637
638 Creates a platform-independent image from a platform-dependent
639 bitmap. This preserves mask information so that bitmaps and images can
640 be converted back and forth without loss in that respect.
641 """
642 return _gdi_.Bitmap_ConvertToImage(*args, **kwargs)
643
644 def GetMask(*args, **kwargs):
645 """
646 GetMask(self) -> Mask
647
648 Gets the associated mask (if any) which may have been loaded from a
649 file or explpicitly set for the bitmap.
650
651 :see: `SetMask`, `wx.Mask`
652
653 """
654 return _gdi_.Bitmap_GetMask(*args, **kwargs)
655
656 def SetMask(*args, **kwargs):
657 """
658 SetMask(self, Mask mask)
659
660 Sets the mask for this bitmap.
661
662 :see: `GetMask`, `wx.Mask`
663
664 """
665 return _gdi_.Bitmap_SetMask(*args, **kwargs)
666
667 def SetMaskColour(*args, **kwargs):
668 """
669 SetMaskColour(self, Colour colour)
670
671 Create a Mask based on a specified colour in the Bitmap.
672 """
673 return _gdi_.Bitmap_SetMaskColour(*args, **kwargs)
674
675 def GetSubBitmap(*args, **kwargs):
676 """
677 GetSubBitmap(self, Rect rect) -> Bitmap
678
679 Returns a sub-bitmap of the current one as long as the rect belongs
680 entirely to the bitmap. This function preserves bit depth and mask
681 information.
682 """
683 return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs)
684
685 def SaveFile(*args, **kwargs):
686 """
687 SaveFile(self, String name, int type, Palette palette=None) -> bool
688
689 Saves a bitmap in the named file. See `__init__` for a description of
690 the ``type`` parameter.
691 """
692 return _gdi_.Bitmap_SaveFile(*args, **kwargs)
693
694 def LoadFile(*args, **kwargs):
695 """
696 LoadFile(self, String name, int type) -> bool
697
698 Loads a bitmap from a file. See `__init__` for a description of the
699 ``type`` parameter.
700 """
701 return _gdi_.Bitmap_LoadFile(*args, **kwargs)
702
703 def GetPalette(*args, **kwargs):
704 """GetPalette(self) -> Palette"""
705 return _gdi_.Bitmap_GetPalette(*args, **kwargs)
706
707 def CopyFromIcon(*args, **kwargs):
708 """CopyFromIcon(self, Icon icon) -> bool"""
709 return _gdi_.Bitmap_CopyFromIcon(*args, **kwargs)
710
711 def SetHeight(*args, **kwargs):
712 """
713 SetHeight(self, int height)
714
715 Set the height property (does not affect the existing bitmap data).
716 """
717 return _gdi_.Bitmap_SetHeight(*args, **kwargs)
718
719 def SetWidth(*args, **kwargs):
720 """
721 SetWidth(self, int width)
722
723 Set the width property (does not affect the existing bitmap data).
724 """
725 return _gdi_.Bitmap_SetWidth(*args, **kwargs)
726
727 def SetDepth(*args, **kwargs):
728 """
729 SetDepth(self, int depth)
730
731 Set the depth property (does not affect the existing bitmap data).
732 """
733 return _gdi_.Bitmap_SetDepth(*args, **kwargs)
734
735 def SetSize(*args, **kwargs):
736 """
737 SetSize(self, Size size)
738
739 Set the bitmap size (does not affect the existing bitmap data).
740 """
741 return _gdi_.Bitmap_SetSize(*args, **kwargs)
742
743 def __nonzero__(self): return self.IsOk()
744 def __eq__(*args, **kwargs):
745 """__eq__(self, Bitmap other) -> bool"""
746 return _gdi_.Bitmap___eq__(*args, **kwargs)
747
748 def __ne__(*args, **kwargs):
749 """__ne__(self, Bitmap other) -> bool"""
750 return _gdi_.Bitmap___ne__(*args, **kwargs)
751
752 Depth = property(GetDepth,SetDepth,doc="See `GetDepth` and `SetDepth`")
753 Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`")
754 Mask = property(GetMask,SetMask,doc="See `GetMask` and `SetMask`")
755 Palette = property(GetPalette,doc="See `GetPalette`")
756 Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`")
757 SubBitmap = property(GetSubBitmap,doc="See `GetSubBitmap`")
758 Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
759 _gdi_.Bitmap_swigregister(Bitmap)
760
761 def EmptyBitmap(*args, **kwargs):
762 """
763 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
764
765 Creates a new bitmap of the given size. A depth of -1 indicates the
766 depth of the current screen or visual. Some platforms only support 1
767 for monochrome and -1 for the current display depth.
768 """
769 val = _gdi_.new_EmptyBitmap(*args, **kwargs)
770 return val
771
772 def BitmapFromIcon(*args, **kwargs):
773 """
774 BitmapFromIcon(Icon icon) -> Bitmap
775
776 Create a new bitmap from a `wx.Icon` object.
777 """
778 val = _gdi_.new_BitmapFromIcon(*args, **kwargs)
779 return val
780
781 def BitmapFromImage(*args, **kwargs):
782 """
783 BitmapFromImage(Image image, int depth=-1) -> Bitmap
784
785 Creates bitmap object from a `wx.Image`. This has to be done to
786 actually display a `wx.Image` as you cannot draw an image directly on
787 a window. The resulting bitmap will use the provided colour depth (or
788 that of the current screen colour depth if depth is -1) which entails
789 that a colour reduction may have to take place.
790 """
791 val = _gdi_.new_BitmapFromImage(*args, **kwargs)
792 return val
793
794 def BitmapFromXPMData(*args, **kwargs):
795 """
796 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
797
798 Construct a Bitmap from a list of strings formatted as XPM data.
799 """
800 val = _gdi_.new_BitmapFromXPMData(*args, **kwargs)
801 return val
802
803 def BitmapFromBits(*args, **kwargs):
804 """
805 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
806
807 Creates a bitmap from an array of bits. You should only use this
808 function for monochrome bitmaps (depth 1) in portable programs: in
809 this case the bits parameter should contain an XBM image. For other
810 bit depths, the behaviour is platform dependent.
811 """
812 val = _gdi_.new_BitmapFromBits(*args, **kwargs)
813 return val
814
815
816 def _BitmapFromBufferAlpha(*args, **kwargs):
817 """_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
818 return _gdi_._BitmapFromBufferAlpha(*args, **kwargs)
819
820 def _BitmapFromBuffer(*args, **kwargs):
821 """_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
822 return _gdi_._BitmapFromBuffer(*args, **kwargs)
823 def BitmapFromBuffer(width, height, dataBuffer, alphaBuffer=None):
824 """
825 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
826 parameter must be a Python object that implements the buffer
827 interface, such as a string, array, etc. The dataBuffer object is
828 expected to contain a series of RGB bytes and be width*height*3
829 bytes long. A buffer object can optionally be supplied for the
830 image's alpha channel data, and it is expected to be width*height
831 bytes long. On Windows the RGB values are 'premultiplied' by the
832 alpha values. (The other platforms do the multiplication
833 themselves.)
834
835 Unlike `wx.ImageFromBuffer` the bitmap created with this function
836 does not share the memory buffer with the buffer object. This is
837 because the native pixel buffer format varies on different
838 platforms, and so instead an efficient as possible copy of the
839 data is made from the buffer objects to the bitmap's native pixel
840 buffer. For direct access to a bitmap's pixel buffer see
841 `wx.NativePixelData` and `wx.AlphaPixelData`.
842
843 :see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
844 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
845 """
846 if alphaBuffer is not None:
847 return _gdi_._BitmapFromBufferAlpha(width, height, dataBuffer, alphaBuffer)
848 else:
849 return _gdi_._BitmapFromBuffer(width, height, dataBuffer)
850
851
852 def _BitmapFromBufferRGBA(*args, **kwargs):
853 """_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
854 return _gdi_._BitmapFromBufferRGBA(*args, **kwargs)
855 def BitmapFromBufferRGBA(width, height, dataBuffer):
856 """
857 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
858 parameter must be a Python object that implements the buffer
859 interface, such as a string, array, etc. The dataBuffer object is
860 expected to contain a series of RGBA bytes (red, green, blue and
861 alpha) and be width*height*4 bytes long. On Windows the RGB
862 values are 'premultiplied' by the alpha values. (The other
863 platforms do the multiplication themselves.)
864
865 Unlike `wx.ImageFromBuffer` the bitmap created with this function
866 does not share the memory buffer with the buffer object. This is
867 because the native pixel buffer format varies on different
868 platforms, and so instead an efficient as possible copy of the
869 data is made from the buffer object to the bitmap's native pixel
870 buffer. For direct access to a bitmap's pixel buffer see
871 `wx.NativePixelData` and `wx.AlphaPixelData`.
872
873 :see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
874 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
875 """
876 return _gdi_._BitmapFromBufferRGBA(width, height, dataBuffer)
877
878 class PixelDataBase(object):
879 """Proxy of C++ PixelDataBase class"""
880 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
881 def __init__(self): raise AttributeError, "No constructor defined"
882 __repr__ = _swig_repr
883 def GetOrigin(*args, **kwargs):
884 """GetOrigin(self) -> Point"""
885 return _gdi_.PixelDataBase_GetOrigin(*args, **kwargs)
886
887 def GetWidth(*args, **kwargs):
888 """GetWidth(self) -> int"""
889 return _gdi_.PixelDataBase_GetWidth(*args, **kwargs)
890
891 def GetHeight(*args, **kwargs):
892 """GetHeight(self) -> int"""
893 return _gdi_.PixelDataBase_GetHeight(*args, **kwargs)
894
895 def GetSize(*args, **kwargs):
896 """GetSize(self) -> Size"""
897 return _gdi_.PixelDataBase_GetSize(*args, **kwargs)
898
899 def GetRowStride(*args, **kwargs):
900 """GetRowStride(self) -> int"""
901 return _gdi_.PixelDataBase_GetRowStride(*args, **kwargs)
902
903 Height = property(GetHeight,doc="See `GetHeight`")
904 Origin = property(GetOrigin,doc="See `GetOrigin`")
905 RowStride = property(GetRowStride,doc="See `GetRowStride`")
906 Size = property(GetSize,doc="See `GetSize`")
907 Width = property(GetWidth,doc="See `GetWidth`")
908 _gdi_.PixelDataBase_swigregister(PixelDataBase)
909
910 class NativePixelData(PixelDataBase):
911 """Proxy of C++ NativePixelData class"""
912 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
913 __repr__ = _swig_repr
914 def __init__(self, *args):
915 """
916 __init__(self, Bitmap bmp) -> NativePixelData
917 __init__(self, Bitmap bmp, Rect rect) -> NativePixelData
918 __init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
919 """
920 _gdi_.NativePixelData_swiginit(self,_gdi_.new_NativePixelData(*args))
921 __swig_destroy__ = _gdi_.delete_NativePixelData
922 __del__ = lambda self : None;
923 def GetPixels(*args, **kwargs):
924 """GetPixels(self) -> NativePixelData_Accessor"""
925 return _gdi_.NativePixelData_GetPixels(*args, **kwargs)
926
927 def UseAlpha(*args, **kwargs):
928 """UseAlpha(self)"""
929 return _gdi_.NativePixelData_UseAlpha(*args, **kwargs)
930
931 def __nonzero__(*args, **kwargs):
932 """__nonzero__(self) -> bool"""
933 return _gdi_.NativePixelData___nonzero__(*args, **kwargs)
934
935 def __iter__(self):
936 """
937 Create and return an iterator object for this pixel data
938 object. (It's really a generator but I won't tell if you
939 don't tell.)
940 """
941 width = self.GetWidth()
942 height = self.GetHeight()
943 pixels = self.GetPixels()
944
945
946
947
948 class PixelFacade(object):
949 def Get(self):
950 return pixels.Get()
951 def Set(self, *args, **kw):
952 return pixels.Set(*args, **kw)
953 def __str__(self):
954 return str(self.Get())
955 def __repr__(self):
956 return 'pixel(%d,%d): %s' % (x,y,self.Get())
957 X = property(lambda self: x)
958 Y = property(lambda self: y)
959
960 pf = PixelFacade()
961 for y in xrange(height):
962 for x in xrange(width):
963
964
965
966 yield pf
967 pixels.nextPixel()
968 pixels.MoveTo(self, 0, y)
969
970 Pixels = property(GetPixels,doc="See `GetPixels`")
971 _gdi_.NativePixelData_swigregister(NativePixelData)
972
973 class NativePixelData_Accessor(object):
974 """Proxy of C++ NativePixelData_Accessor class"""
975 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
976 __repr__ = _swig_repr
977 def __init__(self, *args):
978 """
979 __init__(self, NativePixelData data) -> NativePixelData_Accessor
980 __init__(self, Bitmap bmp, NativePixelData data) -> NativePixelData_Accessor
981 __init__(self) -> NativePixelData_Accessor
982 """
983 _gdi_.NativePixelData_Accessor_swiginit(self,_gdi_.new_NativePixelData_Accessor(*args))
984 __swig_destroy__ = _gdi_.delete_NativePixelData_Accessor
985 __del__ = lambda self : None;
986 def Reset(*args, **kwargs):
987 """Reset(self, NativePixelData data)"""
988 return _gdi_.NativePixelData_Accessor_Reset(*args, **kwargs)
989
990 def IsOk(*args, **kwargs):
991 """IsOk(self) -> bool"""
992 return _gdi_.NativePixelData_Accessor_IsOk(*args, **kwargs)
993
994 def nextPixel(*args, **kwargs):
995 """nextPixel(self)"""
996 return _gdi_.NativePixelData_Accessor_nextPixel(*args, **kwargs)
997
998 def Offset(*args, **kwargs):
999 """Offset(self, NativePixelData data, int x, int y)"""
1000 return _gdi_.NativePixelData_Accessor_Offset(*args, **kwargs)
1001
1002 def OffsetX(*args, **kwargs):
1003 """OffsetX(self, NativePixelData data, int x)"""
1004 return _gdi_.NativePixelData_Accessor_OffsetX(*args, **kwargs)
1005
1006 def OffsetY(*args, **kwargs):
1007 """OffsetY(self, NativePixelData data, int y)"""
1008 return _gdi_.NativePixelData_Accessor_OffsetY(*args, **kwargs)
1009
1010 def MoveTo(*args, **kwargs):
1011 """MoveTo(self, NativePixelData data, int x, int y)"""
1012 return _gdi_.NativePixelData_Accessor_MoveTo(*args, **kwargs)
1013
1014 def Set(*args, **kwargs):
1015 """Set(self, byte red, byte green, byte blue)"""
1016 return _gdi_.NativePixelData_Accessor_Set(*args, **kwargs)
1017
1018 def Get(*args, **kwargs):
1019 """Get(self) -> PyObject"""
1020 return _gdi_.NativePixelData_Accessor_Get(*args, **kwargs)
1021
1022 _gdi_.NativePixelData_Accessor_swigregister(NativePixelData_Accessor)
1023
1024 class AlphaPixelData(PixelDataBase):
1025 """Proxy of C++ AlphaPixelData class"""
1026 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1027 __repr__ = _swig_repr
1028 def __init__(self, *args):
1029 """
1030 __init__(self, Bitmap bmp) -> AlphaPixelData
1031 __init__(self, Bitmap bmp, Rect rect) -> AlphaPixelData
1032 __init__(self, Bitmap bmp, Point pt, Size sz) -> AlphaPixelData
1033 """
1034 _gdi_.AlphaPixelData_swiginit(self,_gdi_.new_AlphaPixelData(*args))
1035 self.UseAlpha()
1036
1037 __swig_destroy__ = _gdi_.delete_AlphaPixelData
1038 __del__ = lambda self : None;
1039 def GetPixels(*args, **kwargs):
1040 """GetPixels(self) -> AlphaPixelData_Accessor"""
1041 return _gdi_.AlphaPixelData_GetPixels(*args, **kwargs)
1042
1043 def UseAlpha(*args, **kwargs):
1044 """UseAlpha(self)"""
1045 return _gdi_.AlphaPixelData_UseAlpha(*args, **kwargs)
1046
1047 def __nonzero__(*args, **kwargs):
1048 """__nonzero__(self) -> bool"""
1049 return _gdi_.AlphaPixelData___nonzero__(*args, **kwargs)
1050
1051 def __iter__(self):
1052 """
1053 Create and return an iterator object for this pixel data
1054 object. (It's really a generator but I won't tell if you
1055 don't tell.)
1056 """
1057 width = self.GetWidth()
1058 height = self.GetHeight()
1059 pixels = self.GetPixels()
1060
1061
1062
1063
1064 class PixelFacade(object):
1065 def Get(self):
1066 return pixels.Get()
1067 def Set(self, *args, **kw):
1068 return pixels.Set(*args, **kw)
1069 def __str__(self):
1070 return str(self.Get())
1071 def __repr__(self):
1072 return 'pixel(%d,%d): %s' % (x,y,self.Get())
1073 X = property(lambda self: x)
1074 Y = property(lambda self: y)
1075
1076 pf = PixelFacade()
1077 for y in xrange(height):
1078 for x in xrange(width):
1079
1080
1081
1082 yield pf
1083 pixels.nextPixel()
1084 pixels.MoveTo(self, 0, y)
1085
1086 Pixels = property(GetPixels,doc="See `GetPixels`")
1087 _gdi_.AlphaPixelData_swigregister(AlphaPixelData)
1088
1089 class AlphaPixelData_Accessor(object):
1090 """Proxy of C++ AlphaPixelData_Accessor class"""
1091 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1092 __repr__ = _swig_repr
1093 def __init__(self, *args):
1094 """
1095 __init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
1096 __init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
1097 __init__(self) -> AlphaPixelData_Accessor
1098 """
1099 _gdi_.AlphaPixelData_Accessor_swiginit(self,_gdi_.new_AlphaPixelData_Accessor(*args))
1100 __swig_destroy__ = _gdi_.delete_AlphaPixelData_Accessor
1101 __del__ = lambda self : None;
1102 def Reset(*args, **kwargs):
1103 """Reset(self, AlphaPixelData data)"""
1104 return _gdi_.AlphaPixelData_Accessor_Reset(*args, **kwargs)
1105
1106 def IsOk(*args, **kwargs):
1107 """IsOk(self) -> bool"""
1108 return _gdi_.AlphaPixelData_Accessor_IsOk(*args, **kwargs)
1109
1110 def nextPixel(*args, **kwargs):
1111 """nextPixel(self)"""
1112 return _gdi_.AlphaPixelData_Accessor_nextPixel(*args, **kwargs)
1113
1114 def Offset(*args, **kwargs):
1115 """Offset(self, AlphaPixelData data, int x, int y)"""
1116 return _gdi_.AlphaPixelData_Accessor_Offset(*args, **kwargs)
1117
1118 def OffsetX(*args, **kwargs):
1119 """OffsetX(self, AlphaPixelData data, int x)"""
1120 return _gdi_.AlphaPixelData_Accessor_OffsetX(*args, **kwargs)
1121
1122 def OffsetY(*args, **kwargs):
1123 """OffsetY(self, AlphaPixelData data, int y)"""
1124 return _gdi_.AlphaPixelData_Accessor_OffsetY(*args, **kwargs)
1125
1126 def MoveTo(*args, **kwargs):
1127 """MoveTo(self, AlphaPixelData data, int x, int y)"""
1128 return _gdi_.AlphaPixelData_Accessor_MoveTo(*args, **kwargs)
1129
1130 def Set(*args, **kwargs):
1131 """Set(self, byte red, byte green, byte blue, byte alpha)"""
1132 return _gdi_.AlphaPixelData_Accessor_Set(*args, **kwargs)
1133
1134 def Get(*args, **kwargs):
1135 """Get(self) -> PyObject"""
1136 return _gdi_.AlphaPixelData_Accessor_Get(*args, **kwargs)
1137
1138 _gdi_.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor)
1139
1140 class Mask(_core.Object):
1141 """
1142 This class encapsulates a monochrome mask bitmap, where the masked
1143 area is black and the unmasked area is white. When associated with a
1144 bitmap and drawn in a device context, the unmasked area of the bitmap
1145 will be drawn, and the masked area will not be drawn.
1146
1147 A mask may be associated with a `wx.Bitmap`. It is used in
1148 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
1149 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
1150 mask.
1151 """
1152 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1153 __repr__ = _swig_repr
1154 def __init__(self, *args, **kwargs):
1155 """
1156 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
1157
1158 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
1159 that indicates the transparent portions of the mask. In other words,
1160 the pixels in ``bitmap`` that match ``colour`` will be the transparent
1161 portions of the mask. If no ``colour`` or an invalid ``colour`` is
1162 passed then BLACK is used.
1163
1164 :see: `wx.Bitmap`, `wx.Colour`
1165 """
1166 _gdi_.Mask_swiginit(self,_gdi_.new_Mask(*args, **kwargs))
1167 __swig_destroy__ = _gdi_.delete_Mask
1168 __del__ = lambda self : None;
1169 _gdi_.Mask_swigregister(Mask)
1170
1171 MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
1172 class Icon(GDIObject):
1173 """Proxy of C++ Icon class"""
1174 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1175 __repr__ = _swig_repr
1176 def __init__(self, *args, **kwargs):
1177 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
1178 _gdi_.Icon_swiginit(self,_gdi_.new_Icon(*args, **kwargs))
1179 __swig_destroy__ = _gdi_.delete_Icon
1180 __del__ = lambda self : None;
1181 def LoadFile(*args, **kwargs):
1182 """LoadFile(self, String name, int type) -> bool"""
1183 return _gdi_.Icon_LoadFile(*args, **kwargs)
1184
1185 def IsOk(*args, **kwargs):
1186 """IsOk(self) -> bool"""
1187 return _gdi_.Icon_IsOk(*args, **kwargs)
1188
1189 Ok = IsOk
1190 def GetWidth(*args, **kwargs):
1191 """GetWidth(self) -> int"""
1192 return _gdi_.Icon_GetWidth(*args, **kwargs)
1193
1194 def GetHeight(*args, **kwargs):
1195 """GetHeight(self) -> int"""
1196 return _gdi_.Icon_GetHeight(*args, **kwargs)
1197
1198 def GetDepth(*args, **kwargs):
1199 """GetDepth(self) -> int"""
1200 return _gdi_.Icon_GetDepth(*args, **kwargs)
1201
1202 def SetWidth(*args, **kwargs):
1203 """SetWidth(self, int w)"""
1204 return _gdi_.Icon_SetWidth(*args, **kwargs)
1205
1206 def SetHeight(*args, **kwargs):
1207 """SetHeight(self, int h)"""
1208 return _gdi_.Icon_SetHeight(*args, **kwargs)
1209
1210 def SetDepth(*args, **kwargs):
1211 """SetDepth(self, int d)"""
1212 return _gdi_.Icon_SetDepth(*args, **kwargs)
1213
1214 def CopyFromBitmap(*args, **kwargs):
1215 """CopyFromBitmap(self, Bitmap bmp)"""
1216 return _gdi_.Icon_CopyFromBitmap(*args, **kwargs)
1217
1218 def __nonzero__(self): return self.IsOk()
1219 Depth = property(GetDepth,SetDepth,doc="See `GetDepth` and `SetDepth`")
1220 Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`")
1221 Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
1222 _gdi_.Icon_swigregister(Icon)
1223
1224 def EmptyIcon(*args, **kwargs):
1225 """EmptyIcon() -> Icon"""
1226 val = _gdi_.new_EmptyIcon(*args, **kwargs)
1227 return val
1228
1229 def IconFromLocation(*args, **kwargs):
1230 """IconFromLocation(IconLocation loc) -> Icon"""
1231 val = _gdi_.new_IconFromLocation(*args, **kwargs)
1232 return val
1233
1234 def IconFromBitmap(*args, **kwargs):
1235 """IconFromBitmap(Bitmap bmp) -> Icon"""
1236 val = _gdi_.new_IconFromBitmap(*args, **kwargs)
1237 return val
1238
1239 def IconFromXPMData(*args, **kwargs):
1240 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
1241 val = _gdi_.new_IconFromXPMData(*args, **kwargs)
1242 return val
1243
1244 class IconLocation(object):
1245 """Proxy of C++ IconLocation class"""
1246 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1247 __repr__ = _swig_repr
1248 def __init__(self, *args, **kwargs):
1249 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
1250 _gdi_.IconLocation_swiginit(self,_gdi_.new_IconLocation(*args, **kwargs))
1251 __swig_destroy__ = _gdi_.delete_IconLocation
1252 __del__ = lambda self : None;
1253 def IsOk(*args, **kwargs):
1254 """IsOk(self) -> bool"""
1255 return _gdi_.IconLocation_IsOk(*args, **kwargs)
1256
1257 def __nonzero__(self): return self.IsOk()
1258 def SetFileName(*args, **kwargs):
1259 """SetFileName(self, String filename)"""
1260 return _gdi_.IconLocation_SetFileName(*args, **kwargs)
1261
1262 def GetFileName(*args, **kwargs):
1263 """GetFileName(self) -> String"""
1264 return _gdi_.IconLocation_GetFileName(*args, **kwargs)
1265
1266 def SetIndex(*args, **kwargs):
1267 """SetIndex(self, int num)"""
1268 return _gdi_.IconLocation_SetIndex(*args, **kwargs)
1269
1270 def GetIndex(*args, **kwargs):
1271 """GetIndex(self) -> int"""
1272 return _gdi_.IconLocation_GetIndex(*args, **kwargs)
1273
1274 FileName = property(GetFileName,SetFileName,doc="See `GetFileName` and `SetFileName`")
1275 Index = property(GetIndex,SetIndex,doc="See `GetIndex` and `SetIndex`")
1276 _gdi_.IconLocation_swigregister(IconLocation)
1277
1278 class IconBundle(object):
1279 """Proxy of C++ IconBundle class"""
1280 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1281 __repr__ = _swig_repr
1282 def __init__(self, *args, **kwargs):
1283 """__init__(self) -> IconBundle"""
1284 _gdi_.IconBundle_swiginit(self,_gdi_.new_IconBundle(*args, **kwargs))
1285 __swig_destroy__ = _gdi_.delete_IconBundle
1286 __del__ = lambda self : None;
1287 def AddIcon(*args, **kwargs):
1288 """AddIcon(self, Icon icon)"""
1289 return _gdi_.IconBundle_AddIcon(*args, **kwargs)
1290
1291 def AddIconFromFile(*args, **kwargs):
1292 """AddIconFromFile(self, String file, long type)"""
1293 return _gdi_.IconBundle_AddIconFromFile(*args, **kwargs)
1294
1295 def GetIcon(*args, **kwargs):
1296 """GetIcon(self, Size size) -> Icon"""
1297 return _gdi_.IconBundle_GetIcon(*args, **kwargs)
1298
1299 Icon = property(GetIcon,doc="See `GetIcon`")
1300 _gdi_.IconBundle_swigregister(IconBundle)
1301
1302 def IconBundleFromFile(*args, **kwargs):
1303 """IconBundleFromFile(String file, long type) -> IconBundle"""
1304 val = _gdi_.new_IconBundleFromFile(*args, **kwargs)
1305 return val
1306
1307 def IconBundleFromIcon(*args, **kwargs):
1308 """IconBundleFromIcon(Icon icon) -> IconBundle"""
1309 val = _gdi_.new_IconBundleFromIcon(*args, **kwargs)
1310 return val
1311
1312 class Cursor(GDIObject):
1313 """
1314 A cursor is a small bitmap usually used for denoting where the mouse
1315 pointer is, with a picture that might indicate the interpretation of a
1316 mouse click.
1317
1318 A single cursor object may be used in many windows (any subwindow
1319 type). The wxWindows convention is to set the cursor for a window, as
1320 in X, rather than to set it globally as in MS Windows, although a
1321 global `wx.SetCursor` function is also available for use on MS Windows.
1322
1323
1324 Stock Cursor IDs
1325 -----------------
1326 ======================== ======================================
1327 wx.CURSOR_ARROW A standard arrow cursor.
1328 wx.CURSOR_RIGHT_ARROW A standard arrow cursor pointing to the right.
1329 wx.CURSOR_BLANK Transparent cursor.
1330 wx.CURSOR_BULLSEYE Bullseye cursor.
1331 wx.CURSOR_CHAR Rectangular character cursor.
1332 wx.CURSOR_CROSS A cross cursor.
1333 wx.CURSOR_HAND A hand cursor.
1334 wx.CURSOR_IBEAM An I-beam cursor (vertical line).
1335 wx.CURSOR_LEFT_BUTTON Represents a mouse with the left button depressed.
1336 wx.CURSOR_MAGNIFIER A magnifier icon.
1337 wx.CURSOR_MIDDLE_BUTTON Represents a mouse with the middle button depressed.
1338 wx.CURSOR_NO_ENTRY A no-entry sign cursor.
1339 wx.CURSOR_PAINT_BRUSH A paintbrush cursor.
1340 wx.CURSOR_PENCIL A pencil cursor.
1341 wx.CURSOR_POINT_LEFT A cursor that points left.
1342 wx.CURSOR_POINT_RIGHT A cursor that points right.
1343 wx.CURSOR_QUESTION_ARROW An arrow and question mark.
1344 wx.CURSOR_RIGHT_BUTTON Represents a mouse with the right button depressed.
1345 wx.CURSOR_SIZENESW A sizing cursor pointing NE-SW.
1346 wx.CURSOR_SIZENS A sizing cursor pointing N-S.
1347 wx.CURSOR_SIZENWSE A sizing cursor pointing NW-SE.
1348 wx.CURSOR_SIZEWE A sizing cursor pointing W-E.
1349 wx.CURSOR_SIZING A general sizing cursor.
1350 wx.CURSOR_SPRAYCAN A spraycan cursor.
1351 wx.CURSOR_WAIT A wait cursor.
1352 wx.CURSOR_WATCH A watch cursor.
1353 wx.CURSOR_ARROWWAIT A cursor with both an arrow and an hourglass, (windows.)
1354 ======================== ======================================
1355
1356
1357 """
1358 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1359 __repr__ = _swig_repr
1360 def __init__(self, *args, **kwargs):
1361 """
1362 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1363
1364 Construct a Cursor from a file. Specify the type of file using
1365 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1366 file.
1367 :see: Alternate constructors `wx.StockCursor`,`wx.CursorFromImage`
1368 """
1369 _gdi_.Cursor_swiginit(self,_gdi_.new_Cursor(*args, **kwargs))
1370 __swig_destroy__ = _gdi_.delete_Cursor
1371 __del__ = lambda self : None;
1372 def IsOk(*args, **kwargs):
1373 """IsOk(self) -> bool"""
1374 return _gdi_.Cursor_IsOk(*args, **kwargs)
1375
1376 Ok = IsOk
1377 def __nonzero__(self): return self.IsOk()
1378 _gdi_.Cursor_swigregister(Cursor)
1379
1380 def StockCursor(*args, **kwargs):
1381 """
1382 StockCursor(int id) -> Cursor
1383
1384 Create a cursor using one of the stock cursors. Note that not all
1385 stock cursors are available on all platforms.
1386 """
1387 val = _gdi_.new_StockCursor(*args, **kwargs)
1388 return val
1389
1390 def CursorFromImage(*args, **kwargs):
1391 """
1392 CursorFromImage(Image image) -> Cursor
1393
1394 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1395 for setting the transparent portions of the cursor.
1396 In MSW the cursor is resized to 32x32 if it was larger.
1397
1398 In GTK the cursor will be displayed at the size of the image.
1399
1400 On MacOS the cursor is resized to 16x16 if it was larger.
1401 """
1402 val = _gdi_.new_CursorFromImage(*args, **kwargs)
1403 return val
1404
1405 #---------------------------------------------------------------------------
1406
1407 OutRegion = _gdi_.OutRegion
1408 PartRegion = _gdi_.PartRegion
1409 InRegion = _gdi_.InRegion
1410 class Region(GDIObject):
1411 """Proxy of C++ Region class"""
1412 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1413 __repr__ = _swig_repr
1414 def __init__(self, *args, **kwargs):
1415 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1416 _gdi_.Region_swiginit(self,_gdi_.new_Region(*args, **kwargs))
1417 __swig_destroy__ = _gdi_.delete_Region
1418 __del__ = lambda self : None;
1419 def Clear(*args, **kwargs):
1420 """Clear(self)"""
1421 return _gdi_.Region_Clear(*args, **kwargs)
1422
1423 def Offset(*args, **kwargs):
1424 """Offset(self, int x, int y) -> bool"""
1425 return _gdi_.Region_Offset(*args, **kwargs)
1426
1427 def Contains(*args, **kwargs):
1428 """Contains(self, int x, int y) -> int"""
1429 return _gdi_.Region_Contains(*args, **kwargs)
1430
1431 def ContainsPoint(*args, **kwargs):
1432 """ContainsPoint(self, Point pt) -> int"""
1433 return _gdi_.Region_ContainsPoint(*args, **kwargs)
1434
1435 def ContainsRect(*args, **kwargs):
1436 """ContainsRect(self, Rect rect) -> int"""
1437 return _gdi_.Region_ContainsRect(*args, **kwargs)
1438
1439 def ContainsRectDim(*args, **kwargs):
1440 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1441 return _gdi_.Region_ContainsRectDim(*args, **kwargs)
1442
1443 def GetBox(*args, **kwargs):
1444 """GetBox(self) -> Rect"""
1445 return _gdi_.Region_GetBox(*args, **kwargs)
1446
1447 def Intersect(*args, **kwargs):
1448 """Intersect(self, int x, int y, int width, int height) -> bool"""
1449 return _gdi_.Region_Intersect(*args, **kwargs)
1450
1451 def IntersectRect(*args, **kwargs):
1452 """IntersectRect(self, Rect rect) -> bool"""
1453 return _gdi_.Region_IntersectRect(*args, **kwargs)
1454
1455 def IntersectRegion(*args, **kwargs):
1456 """IntersectRegion(self, Region region) -> bool"""
1457 return _gdi_.Region_IntersectRegion(*args, **kwargs)
1458
1459 def IsEmpty(*args, **kwargs):
1460 """IsEmpty(self) -> bool"""
1461 return _gdi_.Region_IsEmpty(*args, **kwargs)
1462
1463 def IsEqual(*args, **kwargs):
1464 """IsEqual(self, Region region) -> bool"""
1465 return _gdi_.Region_IsEqual(*args, **kwargs)
1466
1467 def Union(*args, **kwargs):
1468 """Union(self, int x, int y, int width, int height) -> bool"""
1469 return _gdi_.Region_Union(*args, **kwargs)
1470
1471 def UnionRect(*args, **kwargs):
1472 """UnionRect(self, Rect rect) -> bool"""
1473 return _gdi_.Region_UnionRect(*args, **kwargs)
1474
1475 def UnionRegion(*args, **kwargs):
1476 """UnionRegion(self, Region region) -> bool"""
1477 return _gdi_.Region_UnionRegion(*args, **kwargs)
1478
1479 def Subtract(*args, **kwargs):
1480 """Subtract(self, int x, int y, int width, int height) -> bool"""
1481 return _gdi_.Region_Subtract(*args, **kwargs)
1482
1483 def SubtractRect(*args, **kwargs):
1484 """SubtractRect(self, Rect rect) -> bool"""
1485 return _gdi_.Region_SubtractRect(*args, **kwargs)
1486
1487 def SubtractRegion(*args, **kwargs):
1488 """SubtractRegion(self, Region region) -> bool"""
1489 return _gdi_.Region_SubtractRegion(*args, **kwargs)
1490
1491 def Xor(*args, **kwargs):
1492 """Xor(self, int x, int y, int width, int height) -> bool"""
1493 return _gdi_.Region_Xor(*args, **kwargs)
1494
1495 def XorRect(*args, **kwargs):
1496 """XorRect(self, Rect rect) -> bool"""
1497 return _gdi_.Region_XorRect(*args, **kwargs)
1498
1499 def XorRegion(*args, **kwargs):
1500 """XorRegion(self, Region region) -> bool"""
1501 return _gdi_.Region_XorRegion(*args, **kwargs)
1502
1503 def ConvertToBitmap(*args, **kwargs):
1504 """ConvertToBitmap(self) -> Bitmap"""
1505 return _gdi_.Region_ConvertToBitmap(*args, **kwargs)
1506
1507 def UnionBitmap(*args, **kwargs):
1508 """UnionBitmap(self, Bitmap bmp) -> bool"""
1509 return _gdi_.Region_UnionBitmap(*args, **kwargs)
1510
1511 def UnionBitmapColour(*args, **kwargs):
1512 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1513 return _gdi_.Region_UnionBitmapColour(*args, **kwargs)
1514
1515 Box = property(GetBox,doc="See `GetBox`")
1516 _gdi_.Region_swigregister(Region)
1517
1518 def RegionFromBitmap(*args, **kwargs):
1519 """RegionFromBitmap(Bitmap bmp) -> Region"""
1520 val = _gdi_.new_RegionFromBitmap(*args, **kwargs)
1521 return val
1522
1523 def RegionFromBitmapColour(*args, **kwargs):
1524 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1525 val = _gdi_.new_RegionFromBitmapColour(*args, **kwargs)
1526 return val
1527
1528 def RegionFromPoints(*args, **kwargs):
1529 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1530 val = _gdi_.new_RegionFromPoints(*args, **kwargs)
1531 return val
1532
1533 class RegionIterator(_core.Object):
1534 """Proxy of C++ RegionIterator class"""
1535 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1536 __repr__ = _swig_repr
1537 def __init__(self, *args, **kwargs):
1538 """__init__(self, Region region) -> RegionIterator"""
1539 _gdi_.RegionIterator_swiginit(self,_gdi_.new_RegionIterator(*args, **kwargs))
1540 __swig_destroy__ = _gdi_.delete_RegionIterator
1541 __del__ = lambda self : None;
1542 def GetX(*args, **kwargs):
1543 """GetX(self) -> int"""
1544 return _gdi_.RegionIterator_GetX(*args, **kwargs)
1545
1546 def GetY(*args, **kwargs):
1547 """GetY(self) -> int"""
1548 return _gdi_.RegionIterator_GetY(*args, **kwargs)
1549
1550 def GetW(*args, **kwargs):
1551 """GetW(self) -> int"""
1552 return _gdi_.RegionIterator_GetW(*args, **kwargs)
1553
1554 def GetWidth(*args, **kwargs):
1555 """GetWidth(self) -> int"""
1556 return _gdi_.RegionIterator_GetWidth(*args, **kwargs)
1557
1558 def GetH(*args, **kwargs):
1559 """GetH(self) -> int"""
1560 return _gdi_.RegionIterator_GetH(*args, **kwargs)
1561
1562 def GetHeight(*args, **kwargs):
1563 """GetHeight(self) -> int"""
1564 return _gdi_.RegionIterator_GetHeight(*args, **kwargs)
1565
1566 def GetRect(*args, **kwargs):
1567 """GetRect(self) -> Rect"""
1568 return _gdi_.RegionIterator_GetRect(*args, **kwargs)
1569
1570 def HaveRects(*args, **kwargs):
1571 """HaveRects(self) -> bool"""
1572 return _gdi_.RegionIterator_HaveRects(*args, **kwargs)
1573
1574 def Reset(*args, **kwargs):
1575 """Reset(self)"""
1576 return _gdi_.RegionIterator_Reset(*args, **kwargs)
1577
1578 def Next(*args, **kwargs):
1579 """Next(self)"""
1580 return _gdi_.RegionIterator_Next(*args, **kwargs)
1581
1582 def __nonzero__(*args, **kwargs):
1583 """__nonzero__(self) -> bool"""
1584 return _gdi_.RegionIterator___nonzero__(*args, **kwargs)
1585
1586 H = property(GetH,doc="See `GetH`")
1587 Height = property(GetHeight,doc="See `GetHeight`")
1588 Rect = property(GetRect,doc="See `GetRect`")
1589 W = property(GetW,doc="See `GetW`")
1590 Width = property(GetWidth,doc="See `GetWidth`")
1591 X = property(GetX,doc="See `GetX`")
1592 Y = property(GetY,doc="See `GetY`")
1593 _gdi_.RegionIterator_swigregister(RegionIterator)
1594
1595 #---------------------------------------------------------------------------
1596
1597 FONTFAMILY_DEFAULT = _gdi_.FONTFAMILY_DEFAULT
1598 FONTFAMILY_DECORATIVE = _gdi_.FONTFAMILY_DECORATIVE
1599 FONTFAMILY_ROMAN = _gdi_.FONTFAMILY_ROMAN
1600 FONTFAMILY_SCRIPT = _gdi_.FONTFAMILY_SCRIPT
1601 FONTFAMILY_SWISS = _gdi_.FONTFAMILY_SWISS
1602 FONTFAMILY_MODERN = _gdi_.FONTFAMILY_MODERN
1603 FONTFAMILY_TELETYPE = _gdi_.FONTFAMILY_TELETYPE
1604 FONTFAMILY_MAX = _gdi_.FONTFAMILY_MAX
1605 FONTFAMILY_UNKNOWN = _gdi_.FONTFAMILY_UNKNOWN
1606 FONTSTYLE_NORMAL = _gdi_.FONTSTYLE_NORMAL
1607 FONTSTYLE_ITALIC = _gdi_.FONTSTYLE_ITALIC
1608 FONTSTYLE_SLANT = _gdi_.FONTSTYLE_SLANT
1609 FONTSTYLE_MAX = _gdi_.FONTSTYLE_MAX
1610 FONTWEIGHT_NORMAL = _gdi_.FONTWEIGHT_NORMAL
1611 FONTWEIGHT_LIGHT = _gdi_.FONTWEIGHT_LIGHT
1612 FONTWEIGHT_BOLD = _gdi_.FONTWEIGHT_BOLD
1613 FONTWEIGHT_MAX = _gdi_.FONTWEIGHT_MAX
1614 FONTFLAG_DEFAULT = _gdi_.FONTFLAG_DEFAULT
1615 FONTFLAG_ITALIC = _gdi_.FONTFLAG_ITALIC
1616 FONTFLAG_SLANT = _gdi_.FONTFLAG_SLANT
1617 FONTFLAG_LIGHT = _gdi_.FONTFLAG_LIGHT
1618 FONTFLAG_BOLD = _gdi_.FONTFLAG_BOLD
1619 FONTFLAG_ANTIALIASED = _gdi_.FONTFLAG_ANTIALIASED
1620 FONTFLAG_NOT_ANTIALIASED = _gdi_.FONTFLAG_NOT_ANTIALIASED
1621 FONTFLAG_UNDERLINED = _gdi_.FONTFLAG_UNDERLINED
1622 FONTFLAG_STRIKETHROUGH = _gdi_.FONTFLAG_STRIKETHROUGH
1623 FONTFLAG_MASK = _gdi_.FONTFLAG_MASK
1624 FONTENCODING_SYSTEM = _gdi_.FONTENCODING_SYSTEM
1625 FONTENCODING_DEFAULT = _gdi_.FONTENCODING_DEFAULT
1626 FONTENCODING_ISO8859_1 = _gdi_.FONTENCODING_ISO8859_1
1627 FONTENCODING_ISO8859_2 = _gdi_.FONTENCODING_ISO8859_2
1628 FONTENCODING_ISO8859_3 = _gdi_.FONTENCODING_ISO8859_3
1629 FONTENCODING_ISO8859_4 = _gdi_.FONTENCODING_ISO8859_4
1630 FONTENCODING_ISO8859_5 = _gdi_.FONTENCODING_ISO8859_5
1631 FONTENCODING_ISO8859_6 = _gdi_.FONTENCODING_ISO8859_6
1632 FONTENCODING_ISO8859_7 = _gdi_.FONTENCODING_ISO8859_7
1633 FONTENCODING_ISO8859_8 = _gdi_.FONTENCODING_ISO8859_8
1634 FONTENCODING_ISO8859_9 = _gdi_.FONTENCODING_ISO8859_9
1635 FONTENCODING_ISO8859_10 = _gdi_.FONTENCODING_ISO8859_10
1636 FONTENCODING_ISO8859_11 = _gdi_.FONTENCODING_ISO8859_11
1637 FONTENCODING_ISO8859_12 = _gdi_.FONTENCODING_ISO8859_12
1638 FONTENCODING_ISO8859_13 = _gdi_.FONTENCODING_ISO8859_13
1639 FONTENCODING_ISO8859_14 = _gdi_.FONTENCODING_ISO8859_14
1640 FONTENCODING_ISO8859_15 = _gdi_.FONTENCODING_ISO8859_15
1641 FONTENCODING_ISO8859_MAX = _gdi_.FONTENCODING_ISO8859_MAX
1642 FONTENCODING_KOI8 = _gdi_.FONTENCODING_KOI8
1643 FONTENCODING_KOI8_U = _gdi_.FONTENCODING_KOI8_U
1644 FONTENCODING_ALTERNATIVE = _gdi_.FONTENCODING_ALTERNATIVE
1645 FONTENCODING_BULGARIAN = _gdi_.FONTENCODING_BULGARIAN
1646 FONTENCODING_CP437 = _gdi_.FONTENCODING_CP437
1647 FONTENCODING_CP850 = _gdi_.FONTENCODING_CP850
1648 FONTENCODING_CP852 = _gdi_.FONTENCODING_CP852
1649 FONTENCODING_CP855 = _gdi_.FONTENCODING_CP855
1650 FONTENCODING_CP866 = _gdi_.FONTENCODING_CP866
1651 FONTENCODING_CP874 = _gdi_.FONTENCODING_CP874
1652 FONTENCODING_CP932 = _gdi_.FONTENCODING_CP932
1653 FONTENCODING_CP936 = _gdi_.FONTENCODING_CP936
1654 FONTENCODING_CP949 = _gdi_.FONTENCODING_CP949
1655 FONTENCODING_CP950 = _gdi_.FONTENCODING_CP950
1656 FONTENCODING_CP1250 = _gdi_.FONTENCODING_CP1250
1657 FONTENCODING_CP1251 = _gdi_.FONTENCODING_CP1251
1658 FONTENCODING_CP1252 = _gdi_.FONTENCODING_CP1252
1659 FONTENCODING_CP1253 = _gdi_.FONTENCODING_CP1253
1660 FONTENCODING_CP1254 = _gdi_.FONTENCODING_CP1254
1661 FONTENCODING_CP1255 = _gdi_.FONTENCODING_CP1255
1662 FONTENCODING_CP1256 = _gdi_.FONTENCODING_CP1256
1663 FONTENCODING_CP1257 = _gdi_.FONTENCODING_CP1257
1664 FONTENCODING_CP12_MAX = _gdi_.FONTENCODING_CP12_MAX
1665 FONTENCODING_UTF7 = _gdi_.FONTENCODING_UTF7
1666 FONTENCODING_UTF8 = _gdi_.FONTENCODING_UTF8
1667 FONTENCODING_EUC_JP = _gdi_.FONTENCODING_EUC_JP
1668 FONTENCODING_UTF16BE = _gdi_.FONTENCODING_UTF16BE
1669 FONTENCODING_UTF16LE = _gdi_.FONTENCODING_UTF16LE
1670 FONTENCODING_UTF32BE = _gdi_.FONTENCODING_UTF32BE
1671 FONTENCODING_UTF32LE = _gdi_.FONTENCODING_UTF32LE
1672 FONTENCODING_MACROMAN = _gdi_.FONTENCODING_MACROMAN
1673 FONTENCODING_MACJAPANESE = _gdi_.FONTENCODING_MACJAPANESE
1674 FONTENCODING_MACCHINESETRAD = _gdi_.FONTENCODING_MACCHINESETRAD
1675 FONTENCODING_MACKOREAN = _gdi_.FONTENCODING_MACKOREAN
1676 FONTENCODING_MACARABIC = _gdi_.FONTENCODING_MACARABIC
1677 FONTENCODING_MACHEBREW = _gdi_.FONTENCODING_MACHEBREW
1678 FONTENCODING_MACGREEK = _gdi_.FONTENCODING_MACGREEK
1679 FONTENCODING_MACCYRILLIC = _gdi_.FONTENCODING_MACCYRILLIC
1680 FONTENCODING_MACDEVANAGARI = _gdi_.FONTENCODING_MACDEVANAGARI
1681 FONTENCODING_MACGURMUKHI = _gdi_.FONTENCODING_MACGURMUKHI
1682 FONTENCODING_MACGUJARATI = _gdi_.FONTENCODING_MACGUJARATI
1683 FONTENCODING_MACORIYA = _gdi_.FONTENCODING_MACORIYA
1684 FONTENCODING_MACBENGALI = _gdi_.FONTENCODING_MACBENGALI
1685 FONTENCODING_MACTAMIL = _gdi_.FONTENCODING_MACTAMIL
1686 FONTENCODING_MACTELUGU = _gdi_.FONTENCODING_MACTELUGU
1687 FONTENCODING_MACKANNADA = _gdi_.FONTENCODING_MACKANNADA
1688 FONTENCODING_MACMALAJALAM = _gdi_.FONTENCODING_MACMALAJALAM
1689 FONTENCODING_MACSINHALESE = _gdi_.FONTENCODING_MACSINHALESE
1690 FONTENCODING_MACBURMESE = _gdi_.FONTENCODING_MACBURMESE
1691 FONTENCODING_MACKHMER = _gdi_.FONTENCODING_MACKHMER
1692 FONTENCODING_MACTHAI = _gdi_.FONTENCODING_MACTHAI
1693 FONTENCODING_MACLAOTIAN = _gdi_.FONTENCODING_MACLAOTIAN
1694 FONTENCODING_MACGEORGIAN = _gdi_.FONTENCODING_MACGEORGIAN
1695 FONTENCODING_MACARMENIAN = _gdi_.FONTENCODING_MACARMENIAN
1696 FONTENCODING_MACCHINESESIMP = _gdi_.FONTENCODING_MACCHINESESIMP
1697 FONTENCODING_MACTIBETAN = _gdi_.FONTENCODING_MACTIBETAN
1698 FONTENCODING_MACMONGOLIAN = _gdi_.FONTENCODING_MACMONGOLIAN
1699 FONTENCODING_MACETHIOPIC = _gdi_.FONTENCODING_MACETHIOPIC
1700 FONTENCODING_MACCENTRALEUR = _gdi_.FONTENCODING_MACCENTRALEUR
1701 FONTENCODING_MACVIATNAMESE = _gdi_.FONTENCODING_MACVIATNAMESE
1702 FONTENCODING_MACARABICEXT = _gdi_.FONTENCODING_MACARABICEXT
1703 FONTENCODING_MACSYMBOL = _gdi_.FONTENCODING_MACSYMBOL
1704 FONTENCODING_MACDINGBATS = _gdi_.FONTENCODING_MACDINGBATS
1705 FONTENCODING_MACTURKISH = _gdi_.FONTENCODING_MACTURKISH
1706 FONTENCODING_MACCROATIAN = _gdi_.FONTENCODING_MACCROATIAN
1707 FONTENCODING_MACICELANDIC = _gdi_.FONTENCODING_MACICELANDIC
1708 FONTENCODING_MACROMANIAN = _gdi_.FONTENCODING_MACROMANIAN
1709 FONTENCODING_MACCELTIC = _gdi_.FONTENCODING_MACCELTIC
1710 FONTENCODING_MACGAELIC = _gdi_.FONTENCODING_MACGAELIC
1711 FONTENCODING_MACKEYBOARD = _gdi_.FONTENCODING_MACKEYBOARD
1712 FONTENCODING_MACMIN = _gdi_.FONTENCODING_MACMIN
1713 FONTENCODING_MACMAX = _gdi_.FONTENCODING_MACMAX
1714 FONTENCODING_MAX = _gdi_.FONTENCODING_MAX
1715 FONTENCODING_UTF16 = _gdi_.FONTENCODING_UTF16
1716 FONTENCODING_UTF32 = _gdi_.FONTENCODING_UTF32
1717 FONTENCODING_UNICODE = _gdi_.FONTENCODING_UNICODE
1718 FONTENCODING_GB2312 = _gdi_.FONTENCODING_GB2312
1719 FONTENCODING_BIG5 = _gdi_.FONTENCODING_BIG5
1720 FONTENCODING_SHIFT_JIS = _gdi_.FONTENCODING_SHIFT_JIS
1721 #---------------------------------------------------------------------------
1722
1723 class NativeFontInfo(object):
1724 """Proxy of C++ NativeFontInfo class"""
1725 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1726 __repr__ = _swig_repr
1727 def __init__(self, *args, **kwargs):
1728 """__init__(self) -> NativeFontInfo"""
1729 _gdi_.NativeFontInfo_swiginit(self,_gdi_.new_NativeFontInfo(*args, **kwargs))
1730 __swig_destroy__ = _gdi_.delete_NativeFontInfo
1731 __del__ = lambda self : None;
1732 def Init(*args, **kwargs):
1733 """Init(self)"""
1734 return _gdi_.NativeFontInfo_Init(*args, **kwargs)
1735
1736 def InitFromFont(*args, **kwargs):
1737 """InitFromFont(self, Font font)"""
1738 return _gdi_.NativeFontInfo_InitFromFont(*args, **kwargs)
1739
1740 def GetPointSize(*args, **kwargs):
1741 """GetPointSize(self) -> int"""
1742 return _gdi_.NativeFontInfo_GetPointSize(*args, **kwargs)
1743
1744 def GetStyle(*args, **kwargs):
1745 """GetStyle(self) -> int"""
1746 return _gdi_.NativeFontInfo_GetStyle(*args, **kwargs)
1747
1748 def GetWeight(*args, **kwargs):
1749 """GetWeight(self) -> int"""
1750 return _gdi_.NativeFontInfo_GetWeight(*args, **kwargs)
1751
1752 def GetUnderlined(*args, **kwargs):
1753 """GetUnderlined(self) -> bool"""
1754 return _gdi_.NativeFontInfo_GetUnderlined(*args, **kwargs)
1755
1756 def GetFaceName(*args, **kwargs):
1757 """GetFaceName(self) -> String"""
1758 return _gdi_.NativeFontInfo_GetFaceName(*args, **kwargs)
1759
1760 def GetFamily(*args, **kwargs):
1761 """GetFamily(self) -> int"""
1762 return _gdi_.NativeFontInfo_GetFamily(*args, **kwargs)
1763
1764 def GetEncoding(*args, **kwargs):
1765 """GetEncoding(self) -> int"""
1766 return _gdi_.NativeFontInfo_GetEncoding(*args, **kwargs)
1767
1768 def SetPointSize(*args, **kwargs):
1769 """SetPointSize(self, int pointsize)"""
1770 return _gdi_.NativeFontInfo_SetPointSize(*args, **kwargs)
1771
1772 def SetStyle(*args, **kwargs):
1773 """SetStyle(self, int style)"""
1774 return _gdi_.NativeFontInfo_SetStyle(*args, **kwargs)
1775
1776 def SetWeight(*args, **kwargs):
1777 """SetWeight(self, int weight)"""
1778 return _gdi_.NativeFontInfo_SetWeight(*args, **kwargs)
1779
1780 def SetUnderlined(*args, **kwargs):
1781 """SetUnderlined(self, bool underlined)"""
1782 return _gdi_.NativeFontInfo_SetUnderlined(*args, **kwargs)
1783
1784 def SetFaceName(*args, **kwargs):
1785 """SetFaceName(self, String facename) -> bool"""
1786 return _gdi_.NativeFontInfo_SetFaceName(*args, **kwargs)
1787
1788 def SetFamily(*args, **kwargs):
1789 """SetFamily(self, int family)"""
1790 return _gdi_.NativeFontInfo_SetFamily(*args, **kwargs)
1791
1792 def SetEncoding(*args, **kwargs):
1793 """SetEncoding(self, int encoding)"""
1794 return _gdi_.NativeFontInfo_SetEncoding(*args, **kwargs)
1795
1796 def FromString(*args, **kwargs):
1797 """FromString(self, String s) -> bool"""
1798 return _gdi_.NativeFontInfo_FromString(*args, **kwargs)
1799
1800 def ToString(*args, **kwargs):
1801 """ToString(self) -> String"""
1802 return _gdi_.NativeFontInfo_ToString(*args, **kwargs)
1803
1804 def __str__(*args, **kwargs):
1805 """__str__(self) -> String"""
1806 return _gdi_.NativeFontInfo___str__(*args, **kwargs)
1807
1808 def FromUserString(*args, **kwargs):
1809 """FromUserString(self, String s) -> bool"""
1810 return _gdi_.NativeFontInfo_FromUserString(*args, **kwargs)
1811
1812 def ToUserString(*args, **kwargs):
1813 """ToUserString(self) -> String"""
1814 return _gdi_.NativeFontInfo_ToUserString(*args, **kwargs)
1815
1816 Encoding = property(GetEncoding,SetEncoding,doc="See `GetEncoding` and `SetEncoding`")
1817 FaceName = property(GetFaceName,SetFaceName,doc="See `GetFaceName` and `SetFaceName`")
1818 Family = property(GetFamily,SetFamily,doc="See `GetFamily` and `SetFamily`")
1819 PointSize = property(GetPointSize,SetPointSize,doc="See `GetPointSize` and `SetPointSize`")
1820 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
1821 Underlined = property(GetUnderlined,SetUnderlined,doc="See `GetUnderlined` and `SetUnderlined`")
1822 Weight = property(GetWeight,SetWeight,doc="See `GetWeight` and `SetWeight`")
1823 _gdi_.NativeFontInfo_swigregister(NativeFontInfo)
1824
1825 class NativeEncodingInfo(object):
1826 """Proxy of C++ NativeEncodingInfo class"""
1827 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1828 __repr__ = _swig_repr
1829 facename = property(_gdi_.NativeEncodingInfo_facename_get, _gdi_.NativeEncodingInfo_facename_set)
1830 encoding = property(_gdi_.NativeEncodingInfo_encoding_get, _gdi_.NativeEncodingInfo_encoding_set)
1831 def __init__(self, *args, **kwargs):
1832 """__init__(self) -> NativeEncodingInfo"""
1833 _gdi_.NativeEncodingInfo_swiginit(self,_gdi_.new_NativeEncodingInfo(*args, **kwargs))
1834 __swig_destroy__ = _gdi_.delete_NativeEncodingInfo
1835 __del__ = lambda self : None;
1836 def FromString(*args, **kwargs):
1837 """FromString(self, String s) -> bool"""
1838 return _gdi_.NativeEncodingInfo_FromString(*args, **kwargs)
1839
1840 def ToString(*args, **kwargs):
1841 """ToString(self) -> String"""
1842 return _gdi_.NativeEncodingInfo_ToString(*args, **kwargs)
1843
1844 _gdi_.NativeEncodingInfo_swigregister(NativeEncodingInfo)
1845
1846
1847 def GetNativeFontEncoding(*args, **kwargs):
1848 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1849 return _gdi_.GetNativeFontEncoding(*args, **kwargs)
1850
1851 def TestFontEncoding(*args, **kwargs):
1852 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1853 return _gdi_.TestFontEncoding(*args, **kwargs)
1854 #---------------------------------------------------------------------------
1855
1856 class FontMapper(object):
1857 """Proxy of C++ FontMapper class"""
1858 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1859 __repr__ = _swig_repr
1860 def __init__(self, *args, **kwargs):
1861 """__init__(self) -> FontMapper"""
1862 _gdi_.FontMapper_swiginit(self,_gdi_.new_FontMapper(*args, **kwargs))
1863 __swig_destroy__ = _gdi_.delete_FontMapper
1864 __del__ = lambda self : None;
1865 def Get(*args, **kwargs):
1866 """Get() -> FontMapper"""
1867 return _gdi_.FontMapper_Get(*args, **kwargs)
1868
1869 Get = staticmethod(Get)
1870 def Set(*args, **kwargs):
1871 """Set(FontMapper mapper) -> FontMapper"""
1872 return _gdi_.FontMapper_Set(*args, **kwargs)
1873
1874 Set = staticmethod(Set)
1875 def CharsetToEncoding(*args, **kwargs):
1876 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1877 return _gdi_.FontMapper_CharsetToEncoding(*args, **kwargs)
1878
1879 def GetSupportedEncodingsCount(*args, **kwargs):
1880 """GetSupportedEncodingsCount() -> size_t"""
1881 return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs)
1882
1883 GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount)
1884 def GetEncoding(*args, **kwargs):
1885 """GetEncoding(size_t n) -> int"""
1886 return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
1887
1888 GetEncoding = staticmethod(GetEncoding)
1889 def GetEncodingName(*args, **kwargs):
1890 """GetEncodingName(int encoding) -> String"""
1891 return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
1892
1893 GetEncodingName = staticmethod(GetEncodingName)
1894 def GetEncodingDescription(*args, **kwargs):
1895 """GetEncodingDescription(int encoding) -> String"""
1896 return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
1897
1898 GetEncodingDescription = staticmethod(GetEncodingDescription)
1899 def GetEncodingFromName(*args, **kwargs):
1900 """GetEncodingFromName(String name) -> int"""
1901 return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
1902
1903 GetEncodingFromName = staticmethod(GetEncodingFromName)
1904 def SetConfigPath(*args, **kwargs):
1905 """SetConfigPath(self, String prefix)"""
1906 return _gdi_.FontMapper_SetConfigPath(*args, **kwargs)
1907
1908 def GetDefaultConfigPath(*args, **kwargs):
1909 """GetDefaultConfigPath() -> String"""
1910 return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs)
1911
1912 GetDefaultConfigPath = staticmethod(GetDefaultConfigPath)
1913 def GetAltForEncoding(*args, **kwargs):
1914 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1915 return _gdi_.FontMapper_GetAltForEncoding(*args, **kwargs)
1916
1917 def IsEncodingAvailable(*args, **kwargs):
1918 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1919 return _gdi_.FontMapper_IsEncodingAvailable(*args, **kwargs)
1920
1921 def SetDialogParent(*args, **kwargs):
1922 """SetDialogParent(self, Window parent)"""
1923 return _gdi_.FontMapper_SetDialogParent(*args, **kwargs)
1924
1925 def SetDialogTitle(*args, **kwargs):
1926 """SetDialogTitle(self, String title)"""
1927 return _gdi_.FontMapper_SetDialogTitle(*args, **kwargs)
1928
1929 AltForEncoding = property(GetAltForEncoding,doc="See `GetAltForEncoding`")
1930 _gdi_.FontMapper_swigregister(FontMapper)
1931
1932 def FontMapper_Get(*args):
1933 """FontMapper_Get() -> FontMapper"""
1934 return _gdi_.FontMapper_Get(*args)
1935
1936 def FontMapper_Set(*args, **kwargs):
1937 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1938 return _gdi_.FontMapper_Set(*args, **kwargs)
1939
1940 def FontMapper_GetSupportedEncodingsCount(*args):
1941 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1942 return _gdi_.FontMapper_GetSupportedEncodingsCount(*args)
1943
1944 def FontMapper_GetEncoding(*args, **kwargs):
1945 """FontMapper_GetEncoding(size_t n) -> int"""
1946 return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
1947
1948 def FontMapper_GetEncodingName(*args, **kwargs):
1949 """FontMapper_GetEncodingName(int encoding) -> String"""
1950 return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
1951
1952 def FontMapper_GetEncodingDescription(*args, **kwargs):
1953 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1954 return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
1955
1956 def FontMapper_GetEncodingFromName(*args, **kwargs):
1957 """FontMapper_GetEncodingFromName(String name) -> int"""
1958 return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
1959
1960 def FontMapper_GetDefaultConfigPath(*args):
1961 """FontMapper_GetDefaultConfigPath() -> String"""
1962 return _gdi_.FontMapper_GetDefaultConfigPath(*args)
1963
1964 #---------------------------------------------------------------------------
1965
1966 class Font(GDIObject):
1967 """
1968 A font is an object which determines the appearance of text. Fonts are
1969 used for drawing text to a device context, and setting the appearance
1970 of a window's text.
1971
1972 You can retrieve the current system font settings with `wx.SystemSettings`.
1973
1974 The possible values for the family parameter of wx.Font constructor are:
1975
1976 ======================== =============================
1977 wx.FONTFAMILY_DEFAULT Chooses a default font.
1978 wx.FONTFAMILY_DECORATIVE A decorative font.
1979 wx.FONTFAMILY_ROMAN A formal, serif font.
1980 wx.FONTFAMILY_SCRIPT A handwriting font.
1981 wx.FONTFAMILY_SWISS A sans-serif font.
1982 wx.FONTFAMILY_MODERN Usually a fixed pitch font.
1983 wx.FONTFAMILY_TELETYPE A teletype font.
1984 ======================== =============================
1985
1986 The possible values for the weight parameter are:
1987
1988 ==================== ==
1989 wx.FONTWEIGHT_NORMAL
1990 wx.FONTWEIGHT_LIGHT
1991 wx.FONTWEIGHT_BOLD
1992 ==================== ==
1993
1994 The known font encodings are:
1995
1996 =========================== ====================================
1997 wx.FONTENCODING_SYSTEM system default
1998 wx.FONTENCODING_DEFAULT current default encoding
1999 wx.FONTENCODING_ISO8859_1 West European (Latin1)
2000 wx.FONTENCODING_ISO8859_2 Central and East European (Latin2)
2001 wx.FONTENCODING_ISO8859_3 Esperanto (Latin3)
2002 wx.FONTENCODING_ISO8859_4 Baltic (old) (Latin4)
2003 wx.FONTENCODING_ISO8859_5 Cyrillic
2004 wx.FONTENCODING_ISO8859_6 Arabic
2005 wx.FONTENCODING_ISO8859_7 Greek
2006 wx.FONTENCODING_ISO8859_8 Hebrew
2007 wx.FONTENCODING_ISO8859_9 Turkish (Latin5)
2008 wx.FONTENCODING_ISO8859_10 Variation of Latin4 (Latin6)
2009 wx.FONTENCODING_ISO8859_11 Thai
2010 wx.FONTENCODING_ISO8859_12 doesn't exist currently, but put it
2011 here anyhow to make all ISO8859
2012 consecutive numbers
2013 wx.FONTENCODING_ISO8859_13 Baltic (Latin7)
2014 wx.FONTENCODING_ISO8859_14 Latin8
2015 wx.FONTENCODING_ISO8859_15 Latin9 (a.k.a. Latin0, includes euro)
2016 wx.FONTENCODING_KOI8 Cyrillic charset
2017 wx.FONTENCODING_ALTERNATIVE same as MS-DOS CP866
2018 wx.FONTENCODING_BULGARIAN used under Linux in Bulgaria
2019 wx.FONTENCODING_CP437 original MS-DOS codepage
2020 wx.FONTENCODING_CP850 CP437 merged with Latin1
2021 wx.FONTENCODING_CP852 CP437 merged with Latin2
2022 wx.FONTENCODING_CP855 another cyrillic encoding
2023 wx.FONTENCODING_CP866 and another one
2024 wx.FONTENCODING_CP874 WinThai
2025 wx.FONTENCODING_CP1250 WinLatin2
2026 wx.FONTENCODING_CP1251 WinCyrillic
2027 wx.FONTENCODING_CP1252 WinLatin1
2028 wx.FONTENCODING_CP1253 WinGreek (8859-7)
2029 wx.FONTENCODING_CP1254 WinTurkish
2030 wx.FONTENCODING_CP1255 WinHebrew
2031 wx.FONTENCODING_CP1256 WinArabic
2032 wx.FONTENCODING_CP1257 WinBaltic (same as Latin 7)
2033 wx.FONTENCODING_UTF7 UTF-7 Unicode encoding
2034 wx.FONTENCODING_UTF8 UTF-8 Unicode encoding
2035 =========================== ====================================
2036
2037
2038 """
2039 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2040 __repr__ = _swig_repr
2041 def __init__(self, *args, **kwargs):
2042 """
2043 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
2044 String face=EmptyString,
2045 int encoding=FONTENCODING_DEFAULT) -> Font
2046
2047 Creates a font object with the specified attributes.
2048
2049 :param pointSize: The size of the font in points.
2050
2051 :param family: Font family. A generic way of referring to fonts
2052 without specifying actual facename. It can be One of
2053 the ``wx.FONTFAMILY_xxx`` constants.
2054
2055 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
2056
2057 :param weight: Font weight, sometimes also referred to as font
2058 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
2059
2060 :param underline: The value can be ``True`` or ``False`` and
2061 indicates whether the font will include an underline. This
2062 may not be supported on all platforms.
2063
2064 :param face: An optional string specifying the actual typeface to
2065 be used. If it is an empty string, a default typeface will be
2066 chosen based on the family.
2067
2068 :param encoding: An encoding which may be one of the
2069 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
2070 available, no font is created.
2071
2072 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
2073 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
2074
2075 """
2076 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2077 _gdi_.Font_swiginit(self,_gdi_.new_Font(*args, **kwargs))
2078 __swig_destroy__ = _gdi_.delete_Font
2079 __del__ = lambda self : None;
2080 def IsOk(*args, **kwargs):
2081 """
2082 IsOk(self) -> bool
2083
2084 Returns ``True`` if this font was successfully created.
2085 """
2086 return _gdi_.Font_IsOk(*args, **kwargs)
2087
2088 Ok = IsOk
2089 def __nonzero__(self): return self.IsOk()
2090 def __eq__(*args, **kwargs):
2091 """__eq__(self, Font other) -> bool"""
2092 return _gdi_.Font___eq__(*args, **kwargs)
2093
2094 def __ne__(*args, **kwargs):
2095 """__ne__(self, Font other) -> bool"""
2096 return _gdi_.Font___ne__(*args, **kwargs)
2097
2098 def GetPointSize(*args, **kwargs):
2099 """
2100 GetPointSize(self) -> int
2101
2102 Gets the point size.
2103 """
2104 return _gdi_.Font_GetPointSize(*args, **kwargs)
2105
2106 def GetPixelSize(*args, **kwargs):
2107 """
2108 GetPixelSize(self) -> Size
2109
2110 Returns the size in pixels if the font was constructed with a pixel
2111 size.
2112 """
2113 return _gdi_.Font_GetPixelSize(*args, **kwargs)
2114
2115 def IsUsingSizeInPixels(*args, **kwargs):
2116 """
2117 IsUsingSizeInPixels(self) -> bool
2118
2119 Returns ``True`` if the font is using a pixelSize.
2120 """
2121 return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs)
2122
2123 def GetFamily(*args, **kwargs):
2124 """
2125 GetFamily(self) -> int
2126
2127 Gets the font family.
2128 """
2129 return _gdi_.Font_GetFamily(*args, **kwargs)
2130
2131 def GetStyle(*args, **kwargs):
2132 """
2133 GetStyle(self) -> int
2134
2135 Gets the font style.
2136 """
2137 return _gdi_.Font_GetStyle(*args, **kwargs)
2138
2139 def GetWeight(*args, **kwargs):
2140 """
2141 GetWeight(self) -> int
2142
2143 Gets the font weight.
2144 """
2145 return _gdi_.Font_GetWeight(*args, **kwargs)
2146
2147 def GetUnderlined(*args, **kwargs):
2148 """
2149 GetUnderlined(self) -> bool
2150
2151 Returns ``True`` if the font is underlined, ``False`` otherwise.
2152 """
2153 return _gdi_.Font_GetUnderlined(*args, **kwargs)
2154
2155 def GetFaceName(*args, **kwargs):
2156 """
2157 GetFaceName(self) -> String
2158
2159 Returns the typeface name associated with the font, or the empty
2160 string if there is no typeface information.
2161 """
2162 return _gdi_.Font_GetFaceName(*args, **kwargs)
2163
2164 def GetEncoding(*args, **kwargs):
2165 """
2166 GetEncoding(self) -> int
2167
2168 Get the font's encoding.
2169 """
2170 return _gdi_.Font_GetEncoding(*args, **kwargs)
2171
2172 def GetNativeFontInfo(*args, **kwargs):
2173 """
2174 GetNativeFontInfo(self) -> NativeFontInfo
2175
2176 Constructs a `wx.NativeFontInfo` object from this font.
2177 """
2178 return _gdi_.Font_GetNativeFontInfo(*args, **kwargs)
2179
2180 def IsFixedWidth(*args, **kwargs):
2181 """
2182 IsFixedWidth(self) -> bool
2183
2184 Returns true if the font is a fixed width (or monospaced) font, false
2185 if it is a proportional one or font is invalid.
2186 """
2187 return _gdi_.Font_IsFixedWidth(*args, **kwargs)
2188
2189 def GetNativeFontInfoDesc(*args, **kwargs):
2190 """
2191 GetNativeFontInfoDesc(self) -> String
2192
2193 Returns the platform-dependent string completely describing this font
2194 or an empty string if the font isn't valid.
2195 """
2196 return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs)
2197
2198 def GetNativeFontInfoUserDesc(*args, **kwargs):
2199 """
2200 GetNativeFontInfoUserDesc(self) -> String
2201
2202 Returns a human readable version of `GetNativeFontInfoDesc`.
2203 """
2204 return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs)
2205
2206 def SetPointSize(*args, **kwargs):
2207 """
2208 SetPointSize(self, int pointSize)
2209
2210 Sets the point size.
2211 """
2212 return _gdi_.Font_SetPointSize(*args, **kwargs)
2213
2214 def SetPixelSize(*args, **kwargs):
2215 """
2216 SetPixelSize(self, Size pixelSize)
2217
2218 Sets the size in pixels rather than points. If there is platform API
2219 support for this then it is used, otherwise a font with the closest
2220 size is found using a binary search.
2221 """
2222 return _gdi_.Font_SetPixelSize(*args, **kwargs)
2223
2224 def SetFamily(*args, **kwargs):
2225 """
2226 SetFamily(self, int family)
2227
2228 Sets the font family.
2229 """
2230 return _gdi_.Font_SetFamily(*args, **kwargs)
2231
2232 def SetStyle(*args, **kwargs):
2233 """
2234 SetStyle(self, int style)
2235
2236 Sets the font style.
2237 """
2238 return _gdi_.Font_SetStyle(*args, **kwargs)
2239
2240 def SetWeight(*args, **kwargs):
2241 """
2242 SetWeight(self, int weight)
2243
2244 Sets the font weight.
2245 """
2246 return _gdi_.Font_SetWeight(*args, **kwargs)
2247
2248 def SetFaceName(*args, **kwargs):
2249 """
2250 SetFaceName(self, String faceName) -> bool
2251
2252 Sets the facename for the font. The facename, which should be a valid
2253 font installed on the end-user's system.
2254
2255 To avoid portability problems, don't rely on a specific face, but
2256 specify the font family instead or as well. A suitable font will be
2257 found on the end-user's system. If both the family and the facename
2258 are specified, wxWidgets will first search for the specific face, and
2259 then for a font belonging to the same family.
2260 """
2261 return _gdi_.Font_SetFaceName(*args, **kwargs)
2262
2263 def SetUnderlined(*args, **kwargs):
2264 """
2265 SetUnderlined(self, bool underlined)
2266
2267 Sets underlining.
2268 """
2269 return _gdi_.Font_SetUnderlined(*args, **kwargs)
2270
2271 def SetEncoding(*args, **kwargs):
2272 """
2273 SetEncoding(self, int encoding)
2274
2275 Set the font encoding.
2276 """
2277 return _gdi_.Font_SetEncoding(*args, **kwargs)
2278
2279 def SetNativeFontInfo(*args, **kwargs):
2280 """
2281 SetNativeFontInfo(self, NativeFontInfo info)
2282
2283 Set the font's attributes from a `wx.NativeFontInfo` object.
2284 """
2285 return _gdi_.Font_SetNativeFontInfo(*args, **kwargs)
2286
2287 def SetNativeFontInfoFromString(*args, **kwargs):
2288 """
2289 SetNativeFontInfoFromString(self, String info) -> bool
2290
2291 Set the font's attributes from string representation of a
2292 `wx.NativeFontInfo` object.
2293 """
2294 return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs)
2295
2296 def SetNativeFontInfoUserDesc(*args, **kwargs):
2297 """
2298 SetNativeFontInfoUserDesc(self, String info) -> bool
2299
2300 Set the font's attributes from a string formerly returned from
2301 `GetNativeFontInfoDesc`.
2302 """
2303 return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs)
2304
2305 def GetFamilyString(*args, **kwargs):
2306 """
2307 GetFamilyString(self) -> String
2308
2309 Returns a string representation of the font family.
2310 """
2311 return _gdi_.Font_GetFamilyString(*args, **kwargs)
2312
2313 def GetStyleString(*args, **kwargs):
2314 """
2315 GetStyleString(self) -> String
2316
2317 Returns a string representation of the font style.
2318 """
2319 return _gdi_.Font_GetStyleString(*args, **kwargs)
2320
2321 def GetWeightString(*args, **kwargs):
2322 """
2323 GetWeightString(self) -> String
2324
2325 Return a string representation of the font weight.
2326 """
2327 return _gdi_.Font_GetWeightString(*args, **kwargs)
2328
2329 def SetNoAntiAliasing(*args, **kwargs):
2330 """SetNoAntiAliasing(self, bool no=True)"""
2331 return _gdi_.Font_SetNoAntiAliasing(*args, **kwargs)
2332
2333 def GetNoAntiAliasing(*args, **kwargs):
2334 """GetNoAntiAliasing(self) -> bool"""
2335 return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs)
2336
2337 def GetDefaultEncoding(*args, **kwargs):
2338 """
2339 GetDefaultEncoding() -> int
2340
2341 Returns the encoding used for all fonts created with an encoding of
2342 ``wx.FONTENCODING_DEFAULT``.
2343 """
2344 return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
2345
2346 GetDefaultEncoding = staticmethod(GetDefaultEncoding)
2347 def SetDefaultEncoding(*args, **kwargs):
2348 """
2349 SetDefaultEncoding(int encoding)
2350
2351 Sets the default font encoding.
2352 """
2353 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
2354
2355 SetDefaultEncoding = staticmethod(SetDefaultEncoding)
2356 Encoding = property(GetEncoding,SetEncoding,doc="See `GetEncoding` and `SetEncoding`")
2357 FaceName = property(GetFaceName,SetFaceName,doc="See `GetFaceName` and `SetFaceName`")
2358 Family = property(GetFamily,SetFamily,doc="See `GetFamily` and `SetFamily`")
2359 FamilyString = property(GetFamilyString,doc="See `GetFamilyString`")
2360 NativeFontInfo = property(GetNativeFontInfo,SetNativeFontInfo,doc="See `GetNativeFontInfo` and `SetNativeFontInfo`")
2361 NativeFontInfoDesc = property(GetNativeFontInfoDesc,doc="See `GetNativeFontInfoDesc`")
2362 NativeFontInfoUserDesc = property(GetNativeFontInfoUserDesc,SetNativeFontInfoUserDesc,doc="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`")
2363 NoAntiAliasing = property(GetNoAntiAliasing,SetNoAntiAliasing,doc="See `GetNoAntiAliasing` and `SetNoAntiAliasing`")
2364 PixelSize = property(GetPixelSize,SetPixelSize,doc="See `GetPixelSize` and `SetPixelSize`")
2365 PointSize = property(GetPointSize,SetPointSize,doc="See `GetPointSize` and `SetPointSize`")
2366 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
2367 StyleString = property(GetStyleString,doc="See `GetStyleString`")
2368 Underlined = property(GetUnderlined,SetUnderlined,doc="See `GetUnderlined` and `SetUnderlined`")
2369 Weight = property(GetWeight,SetWeight,doc="See `GetWeight` and `SetWeight`")
2370 WeightString = property(GetWeightString,doc="See `GetWeightString`")
2371 _gdi_.Font_swigregister(Font)
2372
2373 def FontFromNativeInfo(*args, **kwargs):
2374 """
2375 FontFromNativeInfo(NativeFontInfo info) -> Font
2376
2377 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2378 """
2379 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2380 val = _gdi_.new_FontFromNativeInfo(*args, **kwargs)
2381 return val
2382
2383 def FontFromNativeInfoString(*args, **kwargs):
2384 """
2385 FontFromNativeInfoString(String info) -> Font
2386
2387 Construct a `wx.Font` from the string representation of a
2388 `wx.NativeFontInfo` object.
2389 """
2390 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2391 val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs)
2392 return val
2393
2394 def FFont(*args, **kwargs):
2395 """
2396 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2397 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2398
2399 A bit of a simpler way to create a `wx.Font` using flags instead of
2400 individual attribute settings. The value of flags can be a
2401 combination of the following:
2402
2403 ============================ ==
2404 wx.FONTFLAG_DEFAULT
2405 wx.FONTFLAG_ITALIC
2406 wx.FONTFLAG_SLANT
2407 wx.FONTFLAG_LIGHT
2408 wx.FONTFLAG_BOLD
2409 wx.FONTFLAG_ANTIALIASED
2410 wx.FONTFLAG_NOT_ANTIALIASED
2411 wx.FONTFLAG_UNDERLINED
2412 wx.FONTFLAG_STRIKETHROUGH
2413 ============================ ==
2414
2415 :see: `wx.Font.__init__`
2416 """
2417 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2418 val = _gdi_.new_FFont(*args, **kwargs)
2419 return val
2420
2421 def FontFromPixelSize(*args, **kwargs):
2422 """
2423 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2424 bool underlined=False, String face=wxEmptyString,
2425 int encoding=FONTENCODING_DEFAULT) -> Font
2426
2427 Creates a font using a size in pixels rather than points. If there is
2428 platform API support for this then it is used, otherwise a font with
2429 the closest size is found using a binary search.
2430
2431 :see: `wx.Font.__init__`
2432 """
2433 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2434 val = _gdi_.new_FontFromPixelSize(*args, **kwargs)
2435 return val
2436
2437 def FFontFromPixelSize(*args, **kwargs):
2438 """
2439 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2440 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2441
2442 Creates a font using a size in pixels rather than points. If there is
2443 platform API support for this then it is used, otherwise a font with
2444 the closest size is found using a binary search.
2445
2446 :see: `wx.Font.__init__`, `wx.FFont`
2447 """
2448 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2449 val = _gdi_.new_FFontFromPixelSize(*args, **kwargs)
2450 return val
2451
2452 def Font_GetDefaultEncoding(*args):
2453 """
2454 Font_GetDefaultEncoding() -> int
2455
2456 Returns the encoding used for all fonts created with an encoding of
2457 ``wx.FONTENCODING_DEFAULT``.
2458 """
2459 return _gdi_.Font_GetDefaultEncoding(*args)
2460
2461 def Font_SetDefaultEncoding(*args, **kwargs):
2462 """
2463 Font_SetDefaultEncoding(int encoding)
2464
2465 Sets the default font encoding.
2466 """
2467 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
2468
2469 Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.")
2470 #---------------------------------------------------------------------------
2471
2472 class FontEnumerator(object):
2473 """Proxy of C++ FontEnumerator class"""
2474 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2475 __repr__ = _swig_repr
2476 def __init__(self, *args, **kwargs):
2477 """__init__(self) -> FontEnumerator"""
2478 _gdi_.FontEnumerator_swiginit(self,_gdi_.new_FontEnumerator(*args, **kwargs))
2479 self._setCallbackInfo(self, FontEnumerator, 0)
2480
2481 __swig_destroy__ = _gdi_.delete_FontEnumerator
2482 __del__ = lambda self : None;
2483 def _setCallbackInfo(*args, **kwargs):
2484 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
2485 return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs)
2486
2487 def EnumerateFacenames(*args, **kwargs):
2488 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2489 return _gdi_.FontEnumerator_EnumerateFacenames(*args, **kwargs)
2490
2491 def EnumerateEncodings(*args, **kwargs):
2492 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2493 return _gdi_.FontEnumerator_EnumerateEncodings(*args, **kwargs)
2494
2495 def GetEncodings(*args, **kwargs):
2496 """GetEncodings() -> PyObject"""
2497 return _gdi_.FontEnumerator_GetEncodings(*args, **kwargs)
2498
2499 GetEncodings = staticmethod(GetEncodings)
2500 def GetFacenames(*args, **kwargs):
2501 """GetFacenames() -> PyObject"""
2502 return _gdi_.FontEnumerator_GetFacenames(*args, **kwargs)
2503
2504 GetFacenames = staticmethod(GetFacenames)
2505 def IsValidFacename(*args, **kwargs):
2506 """
2507 IsValidFacename(String str) -> bool
2508
2509 Convenience function that returns true if the given face name exist in
2510 the user's system
2511 """
2512 return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2513
2514 IsValidFacename = staticmethod(IsValidFacename)
2515 _gdi_.FontEnumerator_swigregister(FontEnumerator)
2516
2517 def FontEnumerator_GetEncodings(*args):
2518 """FontEnumerator_GetEncodings() -> PyObject"""
2519 return _gdi_.FontEnumerator_GetEncodings(*args)
2520
2521 def FontEnumerator_GetFacenames(*args):
2522 """FontEnumerator_GetFacenames() -> PyObject"""
2523 return _gdi_.FontEnumerator_GetFacenames(*args)
2524
2525 def FontEnumerator_IsValidFacename(*args, **kwargs):
2526 """
2527 FontEnumerator_IsValidFacename(String str) -> bool
2528
2529 Convenience function that returns true if the given face name exist in
2530 the user's system
2531 """
2532 return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2533
2534 #---------------------------------------------------------------------------
2535
2536 LANGUAGE_DEFAULT = _gdi_.LANGUAGE_DEFAULT
2537 LANGUAGE_UNKNOWN = _gdi_.LANGUAGE_UNKNOWN
2538 LANGUAGE_ABKHAZIAN = _gdi_.LANGUAGE_ABKHAZIAN
2539 LANGUAGE_AFAR = _gdi_.LANGUAGE_AFAR
2540 LANGUAGE_AFRIKAANS = _gdi_.LANGUAGE_AFRIKAANS
2541 LANGUAGE_ALBANIAN = _gdi_.LANGUAGE_ALBANIAN
2542 LANGUAGE_AMHARIC = _gdi_.LANGUAGE_AMHARIC
2543 LANGUAGE_ARABIC = _gdi_.LANGUAGE_ARABIC
2544 LANGUAGE_ARABIC_ALGERIA = _gdi_.LANGUAGE_ARABIC_ALGERIA
2545 LANGUAGE_ARABIC_BAHRAIN = _gdi_.LANGUAGE_ARABIC_BAHRAIN
2546 LANGUAGE_ARABIC_EGYPT = _gdi_.LANGUAGE_ARABIC_EGYPT
2547 LANGUAGE_ARABIC_IRAQ = _gdi_.LANGUAGE_ARABIC_IRAQ
2548 LANGUAGE_ARABIC_JORDAN = _gdi_.LANGUAGE_ARABIC_JORDAN
2549 LANGUAGE_ARABIC_KUWAIT = _gdi_.LANGUAGE_ARABIC_KUWAIT
2550 LANGUAGE_ARABIC_LEBANON = _gdi_.LANGUAGE_ARABIC_LEBANON
2551 LANGUAGE_ARABIC_LIBYA = _gdi_.LANGUAGE_ARABIC_LIBYA
2552 LANGUAGE_ARABIC_MOROCCO = _gdi_.LANGUAGE_ARABIC_MOROCCO
2553 LANGUAGE_ARABIC_OMAN = _gdi_.LANGUAGE_ARABIC_OMAN
2554 LANGUAGE_ARABIC_QATAR = _gdi_.LANGUAGE_ARABIC_QATAR
2555 LANGUAGE_ARABIC_SAUDI_ARABIA = _gdi_.LANGUAGE_ARABIC_SAUDI_ARABIA
2556 LANGUAGE_ARABIC_SUDAN = _gdi_.LANGUAGE_ARABIC_SUDAN
2557 LANGUAGE_ARABIC_SYRIA = _gdi_.LANGUAGE_ARABIC_SYRIA
2558 LANGUAGE_ARABIC_TUNISIA = _gdi_.LANGUAGE_ARABIC_TUNISIA
2559 LANGUAGE_ARABIC_UAE = _gdi_.LANGUAGE_ARABIC_UAE
2560 LANGUAGE_ARABIC_YEMEN = _gdi_.LANGUAGE_ARABIC_YEMEN
2561 LANGUAGE_ARMENIAN = _gdi_.LANGUAGE_ARMENIAN
2562 LANGUAGE_ASSAMESE = _gdi_.LANGUAGE_ASSAMESE
2563 LANGUAGE_AYMARA = _gdi_.LANGUAGE_AYMARA
2564 LANGUAGE_AZERI = _gdi_.LANGUAGE_AZERI
2565 LANGUAGE_AZERI_CYRILLIC = _gdi_.LANGUAGE_AZERI_CYRILLIC
2566 LANGUAGE_AZERI_LATIN = _gdi_.LANGUAGE_AZERI_LATIN
2567 LANGUAGE_BASHKIR = _gdi_.LANGUAGE_BASHKIR
2568 LANGUAGE_BASQUE = _gdi_.LANGUAGE_BASQUE
2569 LANGUAGE_BELARUSIAN = _gdi_.LANGUAGE_BELARUSIAN
2570 LANGUAGE_BENGALI = _gdi_.LANGUAGE_BENGALI
2571 LANGUAGE_BHUTANI = _gdi_.LANGUAGE_BHUTANI
2572 LANGUAGE_BIHARI = _gdi_.LANGUAGE_BIHARI
2573 LANGUAGE_BISLAMA = _gdi_.LANGUAGE_BISLAMA
2574 LANGUAGE_BRETON = _gdi_.LANGUAGE_BRETON
2575 LANGUAGE_BULGARIAN = _gdi_.LANGUAGE_BULGARIAN
2576 LANGUAGE_BURMESE = _gdi_.LANGUAGE_BURMESE
2577 LANGUAGE_CAMBODIAN = _gdi_.LANGUAGE_CAMBODIAN
2578 LANGUAGE_CATALAN = _gdi_.LANGUAGE_CATALAN
2579 LANGUAGE_CHINESE = _gdi_.LANGUAGE_CHINESE
2580 LANGUAGE_CHINESE_SIMPLIFIED = _gdi_.LANGUAGE_CHINESE_SIMPLIFIED
2581 LANGUAGE_CHINESE_TRADITIONAL = _gdi_.LANGUAGE_CHINESE_TRADITIONAL
2582 LANGUAGE_CHINESE_HONGKONG = _gdi_.LANGUAGE_CHINESE_HONGKONG
2583 LANGUAGE_CHINESE_MACAU = _gdi_.LANGUAGE_CHINESE_MACAU
2584 LANGUAGE_CHINESE_SINGAPORE = _gdi_.LANGUAGE_CHINESE_SINGAPORE
2585 LANGUAGE_CHINESE_TAIWAN = _gdi_.LANGUAGE_CHINESE_TAIWAN
2586 LANGUAGE_CORSICAN = _gdi_.LANGUAGE_CORSICAN
2587 LANGUAGE_CROATIAN = _gdi_.LANGUAGE_CROATIAN
2588 LANGUAGE_CZECH = _gdi_.LANGUAGE_CZECH
2589 LANGUAGE_DANISH = _gdi_.LANGUAGE_DANISH
2590 LANGUAGE_DUTCH = _gdi_.LANGUAGE_DUTCH
2591 LANGUAGE_DUTCH_BELGIAN = _gdi_.LANGUAGE_DUTCH_BELGIAN
2592 LANGUAGE_ENGLISH = _gdi_.LANGUAGE_ENGLISH
2593 LANGUAGE_ENGLISH_UK = _gdi_.LANGUAGE_ENGLISH_UK
2594 LANGUAGE_ENGLISH_US = _gdi_.LANGUAGE_ENGLISH_US
2595 LANGUAGE_ENGLISH_AUSTRALIA = _gdi_.LANGUAGE_ENGLISH_AUSTRALIA
2596 LANGUAGE_ENGLISH_BELIZE = _gdi_.LANGUAGE_ENGLISH_BELIZE
2597 LANGUAGE_ENGLISH_BOTSWANA = _gdi_.LANGUAGE_ENGLISH_BOTSWANA
2598 LANGUAGE_ENGLISH_CANADA = _gdi_.LANGUAGE_ENGLISH_CANADA
2599 LANGUAGE_ENGLISH_CARIBBEAN = _gdi_.LANGUAGE_ENGLISH_CARIBBEAN
2600 LANGUAGE_ENGLISH_DENMARK = _gdi_.LANGUAGE_ENGLISH_DENMARK
2601 LANGUAGE_ENGLISH_EIRE = _gdi_.LANGUAGE_ENGLISH_EIRE
2602 LANGUAGE_ENGLISH_JAMAICA = _gdi_.LANGUAGE_ENGLISH_JAMAICA
2603 LANGUAGE_ENGLISH_NEW_ZEALAND = _gdi_.LANGUAGE_ENGLISH_NEW_ZEALAND
2604 LANGUAGE_ENGLISH_PHILIPPINES = _gdi_.LANGUAGE_ENGLISH_PHILIPPINES
2605 LANGUAGE_ENGLISH_SOUTH_AFRICA = _gdi_.LANGUAGE_ENGLISH_SOUTH_AFRICA
2606 LANGUAGE_ENGLISH_TRINIDAD = _gdi_.LANGUAGE_ENGLISH_TRINIDAD
2607 LANGUAGE_ENGLISH_ZIMBABWE = _gdi_.LANGUAGE_ENGLISH_ZIMBABWE
2608 LANGUAGE_ESPERANTO = _gdi_.LANGUAGE_ESPERANTO
2609 LANGUAGE_ESTONIAN = _gdi_.LANGUAGE_ESTONIAN
2610 LANGUAGE_FAEROESE = _gdi_.LANGUAGE_FAEROESE
2611 LANGUAGE_FARSI = _gdi_.LANGUAGE_FARSI
2612 LANGUAGE_FIJI = _gdi_.LANGUAGE_FIJI
2613 LANGUAGE_FINNISH = _gdi_.LANGUAGE_FINNISH
2614 LANGUAGE_FRENCH = _gdi_.LANGUAGE_FRENCH
2615 LANGUAGE_FRENCH_BELGIAN = _gdi_.LANGUAGE_FRENCH_BELGIAN
2616 LANGUAGE_FRENCH_CANADIAN = _gdi_.LANGUAGE_FRENCH_CANADIAN
2617 LANGUAGE_FRENCH_LUXEMBOURG = _gdi_.LANGUAGE_FRENCH_LUXEMBOURG
2618 LANGUAGE_FRENCH_MONACO = _gdi_.LANGUAGE_FRENCH_MONACO
2619 LANGUAGE_FRENCH_SWISS = _gdi_.LANGUAGE_FRENCH_SWISS
2620 LANGUAGE_FRISIAN = _gdi_.LANGUAGE_FRISIAN
2621 LANGUAGE_GALICIAN = _gdi_.LANGUAGE_GALICIAN
2622 LANGUAGE_GEORGIAN = _gdi_.LANGUAGE_GEORGIAN
2623 LANGUAGE_GERMAN = _gdi_.LANGUAGE_GERMAN
2624 LANGUAGE_GERMAN_AUSTRIAN = _gdi_.LANGUAGE_GERMAN_AUSTRIAN
2625 LANGUAGE_GERMAN_BELGIUM = _gdi_.LANGUAGE_GERMAN_BELGIUM
2626 LANGUAGE_GERMAN_LIECHTENSTEIN = _gdi_.LANGUAGE_GERMAN_LIECHTENSTEIN
2627 LANGUAGE_GERMAN_LUXEMBOURG = _gdi_.LANGUAGE_GERMAN_LUXEMBOURG
2628 LANGUAGE_GERMAN_SWISS = _gdi_.LANGUAGE_GERMAN_SWISS
2629 LANGUAGE_GREEK = _gdi_.LANGUAGE_GREEK
2630 LANGUAGE_GREENLANDIC = _gdi_.LANGUAGE_GREENLANDIC
2631 LANGUAGE_GUARANI = _gdi_.LANGUAGE_GUARANI
2632 LANGUAGE_GUJARATI = _gdi_.LANGUAGE_GUJARATI
2633 LANGUAGE_HAUSA = _gdi_.LANGUAGE_HAUSA
2634 LANGUAGE_HEBREW = _gdi_.LANGUAGE_HEBREW
2635 LANGUAGE_HINDI = _gdi_.LANGUAGE_HINDI
2636 LANGUAGE_HUNGARIAN = _gdi_.LANGUAGE_HUNGARIAN
2637 LANGUAGE_ICELANDIC = _gdi_.LANGUAGE_ICELANDIC
2638 LANGUAGE_INDONESIAN = _gdi_.LANGUAGE_INDONESIAN
2639 LANGUAGE_INTERLINGUA = _gdi_.LANGUAGE_INTERLINGUA
2640 LANGUAGE_INTERLINGUE = _gdi_.LANGUAGE_INTERLINGUE
2641 LANGUAGE_INUKTITUT = _gdi_.LANGUAGE_INUKTITUT
2642 LANGUAGE_INUPIAK = _gdi_.LANGUAGE_INUPIAK
2643 LANGUAGE_IRISH = _gdi_.LANGUAGE_IRISH
2644 LANGUAGE_ITALIAN = _gdi_.LANGUAGE_ITALIAN
2645 LANGUAGE_ITALIAN_SWISS = _gdi_.LANGUAGE_ITALIAN_SWISS
2646 LANGUAGE_JAPANESE = _gdi_.LANGUAGE_JAPANESE
2647 LANGUAGE_JAVANESE = _gdi_.LANGUAGE_JAVANESE
2648 LANGUAGE_KANNADA = _gdi_.LANGUAGE_KANNADA
2649 LANGUAGE_KASHMIRI = _gdi_.LANGUAGE_KASHMIRI
2650 LANGUAGE_KASHMIRI_INDIA = _gdi_.LANGUAGE_KASHMIRI_INDIA
2651 LANGUAGE_KAZAKH = _gdi_.LANGUAGE_KAZAKH
2652 LANGUAGE_KERNEWEK = _gdi_.LANGUAGE_KERNEWEK
2653 LANGUAGE_KINYARWANDA = _gdi_.LANGUAGE_KINYARWANDA
2654 LANGUAGE_KIRGHIZ = _gdi_.LANGUAGE_KIRGHIZ
2655 LANGUAGE_KIRUNDI = _gdi_.LANGUAGE_KIRUNDI
2656 LANGUAGE_KONKANI = _gdi_.LANGUAGE_KONKANI
2657 LANGUAGE_KOREAN = _gdi_.LANGUAGE_KOREAN
2658 LANGUAGE_KURDISH = _gdi_.LANGUAGE_KURDISH
2659 LANGUAGE_LAOTHIAN = _gdi_.LANGUAGE_LAOTHIAN
2660 LANGUAGE_LATIN = _gdi_.LANGUAGE_LATIN
2661 LANGUAGE_LATVIAN = _gdi_.LANGUAGE_LATVIAN
2662 LANGUAGE_LINGALA = _gdi_.LANGUAGE_LINGALA
2663 LANGUAGE_LITHUANIAN = _gdi_.LANGUAGE_LITHUANIAN
2664 LANGUAGE_MACEDONIAN = _gdi_.LANGUAGE_MACEDONIAN
2665 LANGUAGE_MALAGASY = _gdi_.LANGUAGE_MALAGASY
2666 LANGUAGE_MALAY = _gdi_.LANGUAGE_MALAY
2667 LANGUAGE_MALAYALAM = _gdi_.LANGUAGE_MALAYALAM
2668 LANGUAGE_MALAY_BRUNEI_DARUSSALAM = _gdi_.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2669 LANGUAGE_MALAY_MALAYSIA = _gdi_.LANGUAGE_MALAY_MALAYSIA
2670 LANGUAGE_MALTESE = _gdi_.LANGUAGE_MALTESE
2671 LANGUAGE_MANIPURI = _gdi_.LANGUAGE_MANIPURI
2672 LANGUAGE_MAORI = _gdi_.LANGUAGE_MAORI
2673 LANGUAGE_MARATHI = _gdi_.LANGUAGE_MARATHI
2674 LANGUAGE_MOLDAVIAN = _gdi_.LANGUAGE_MOLDAVIAN
2675 LANGUAGE_MONGOLIAN = _gdi_.LANGUAGE_MONGOLIAN
2676 LANGUAGE_NAURU = _gdi_.LANGUAGE_NAURU
2677 LANGUAGE_NEPALI = _gdi_.LANGUAGE_NEPALI
2678 LANGUAGE_NEPALI_INDIA = _gdi_.LANGUAGE_NEPALI_INDIA
2679 LANGUAGE_NORWEGIAN_BOKMAL = _gdi_.LANGUAGE_NORWEGIAN_BOKMAL
2680 LANGUAGE_NORWEGIAN_NYNORSK = _gdi_.LANGUAGE_NORWEGIAN_NYNORSK
2681 LANGUAGE_OCCITAN = _gdi_.LANGUAGE_OCCITAN
2682 LANGUAGE_ORIYA = _gdi_.LANGUAGE_ORIYA
2683 LANGUAGE_OROMO = _gdi_.LANGUAGE_OROMO
2684 LANGUAGE_PASHTO = _gdi_.LANGUAGE_PASHTO
2685 LANGUAGE_POLISH = _gdi_.LANGUAGE_POLISH
2686 LANGUAGE_PORTUGUESE = _gdi_.LANGUAGE_PORTUGUESE
2687 LANGUAGE_PORTUGUESE_BRAZILIAN = _gdi_.LANGUAGE_PORTUGUESE_BRAZILIAN
2688 LANGUAGE_PUNJABI = _gdi_.LANGUAGE_PUNJABI
2689 LANGUAGE_QUECHUA = _gdi_.LANGUAGE_QUECHUA
2690 LANGUAGE_RHAETO_ROMANCE = _gdi_.LANGUAGE_RHAETO_ROMANCE
2691 LANGUAGE_ROMANIAN = _gdi_.LANGUAGE_ROMANIAN
2692 LANGUAGE_RUSSIAN = _gdi_.LANGUAGE_RUSSIAN
2693 LANGUAGE_RUSSIAN_UKRAINE = _gdi_.LANGUAGE_RUSSIAN_UKRAINE
2694 LANGUAGE_SAMOAN = _gdi_.LANGUAGE_SAMOAN
2695 LANGUAGE_SANGHO = _gdi_.LANGUAGE_SANGHO
2696 LANGUAGE_SANSKRIT = _gdi_.LANGUAGE_SANSKRIT
2697 LANGUAGE_SCOTS_GAELIC = _gdi_.LANGUAGE_SCOTS_GAELIC
2698 LANGUAGE_SERBIAN = _gdi_.LANGUAGE_SERBIAN
2699 LANGUAGE_SERBIAN_CYRILLIC = _gdi_.LANGUAGE_SERBIAN_CYRILLIC
2700 LANGUAGE_SERBIAN_LATIN = _gdi_.LANGUAGE_SERBIAN_LATIN
2701 LANGUAGE_SERBO_CROATIAN = _gdi_.LANGUAGE_SERBO_CROATIAN
2702 LANGUAGE_SESOTHO = _gdi_.LANGUAGE_SESOTHO
2703 LANGUAGE_SETSWANA = _gdi_.LANGUAGE_SETSWANA
2704 LANGUAGE_SHONA = _gdi_.LANGUAGE_SHONA
2705 LANGUAGE_SINDHI = _gdi_.LANGUAGE_SINDHI
2706 LANGUAGE_SINHALESE = _gdi_.LANGUAGE_SINHALESE
2707 LANGUAGE_SISWATI = _gdi_.LANGUAGE_SISWATI
2708 LANGUAGE_SLOVAK = _gdi_.LANGUAGE_SLOVAK
2709 LANGUAGE_SLOVENIAN = _gdi_.LANGUAGE_SLOVENIAN
2710 LANGUAGE_SOMALI = _gdi_.LANGUAGE_SOMALI
2711 LANGUAGE_SPANISH = _gdi_.LANGUAGE_SPANISH
2712 LANGUAGE_SPANISH_ARGENTINA = _gdi_.LANGUAGE_SPANISH_ARGENTINA
2713 LANGUAGE_SPANISH_BOLIVIA = _gdi_.LANGUAGE_SPANISH_BOLIVIA
2714 LANGUAGE_SPANISH_CHILE = _gdi_.LANGUAGE_SPANISH_CHILE
2715 LANGUAGE_SPANISH_COLOMBIA = _gdi_.LANGUAGE_SPANISH_COLOMBIA
2716 LANGUAGE_SPANISH_COSTA_RICA = _gdi_.LANGUAGE_SPANISH_COSTA_RICA
2717 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC = _gdi_.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2718 LANGUAGE_SPANISH_ECUADOR = _gdi_.LANGUAGE_SPANISH_ECUADOR
2719 LANGUAGE_SPANISH_EL_SALVADOR = _gdi_.LANGUAGE_SPANISH_EL_SALVADOR
2720 LANGUAGE_SPANISH_GUATEMALA = _gdi_.LANGUAGE_SPANISH_GUATEMALA
2721 LANGUAGE_SPANISH_HONDURAS = _gdi_.LANGUAGE_SPANISH_HONDURAS
2722 LANGUAGE_SPANISH_MEXICAN = _gdi_.LANGUAGE_SPANISH_MEXICAN
2723 LANGUAGE_SPANISH_MODERN = _gdi_.LANGUAGE_SPANISH_MODERN
2724 LANGUAGE_SPANISH_NICARAGUA = _gdi_.LANGUAGE_SPANISH_NICARAGUA
2725 LANGUAGE_SPANISH_PANAMA = _gdi_.LANGUAGE_SPANISH_PANAMA
2726 LANGUAGE_SPANISH_PARAGUAY = _gdi_.LANGUAGE_SPANISH_PARAGUAY
2727 LANGUAGE_SPANISH_PERU = _gdi_.LANGUAGE_SPANISH_PERU
2728 LANGUAGE_SPANISH_PUERTO_RICO = _gdi_.LANGUAGE_SPANISH_PUERTO_RICO
2729 LANGUAGE_SPANISH_URUGUAY = _gdi_.LANGUAGE_SPANISH_URUGUAY
2730 LANGUAGE_SPANISH_US = _gdi_.LANGUAGE_SPANISH_US
2731 LANGUAGE_SPANISH_VENEZUELA = _gdi_.LANGUAGE_SPANISH_VENEZUELA
2732 LANGUAGE_SUNDANESE = _gdi_.LANGUAGE_SUNDANESE
2733 LANGUAGE_SWAHILI = _gdi_.LANGUAGE_SWAHILI
2734 LANGUAGE_SWEDISH = _gdi_.LANGUAGE_SWEDISH
2735 LANGUAGE_SWEDISH_FINLAND = _gdi_.LANGUAGE_SWEDISH_FINLAND
2736 LANGUAGE_TAGALOG = _gdi_.LANGUAGE_TAGALOG
2737 LANGUAGE_TAJIK = _gdi_.LANGUAGE_TAJIK
2738 LANGUAGE_TAMIL = _gdi_.LANGUAGE_TAMIL
2739 LANGUAGE_TATAR = _gdi_.LANGUAGE_TATAR
2740 LANGUAGE_TELUGU = _gdi_.LANGUAGE_TELUGU
2741 LANGUAGE_THAI = _gdi_.LANGUAGE_THAI
2742 LANGUAGE_TIBETAN = _gdi_.LANGUAGE_TIBETAN
2743 LANGUAGE_TIGRINYA = _gdi_.LANGUAGE_TIGRINYA
2744 LANGUAGE_TONGA = _gdi_.LANGUAGE_TONGA
2745 LANGUAGE_TSONGA = _gdi_.LANGUAGE_TSONGA
2746 LANGUAGE_TURKISH = _gdi_.LANGUAGE_TURKISH
2747 LANGUAGE_TURKMEN = _gdi_.LANGUAGE_TURKMEN
2748 LANGUAGE_TWI = _gdi_.LANGUAGE_TWI
2749 LANGUAGE_UIGHUR = _gdi_.LANGUAGE_UIGHUR
2750 LANGUAGE_UKRAINIAN = _gdi_.LANGUAGE_UKRAINIAN
2751 LANGUAGE_URDU = _gdi_.LANGUAGE_URDU
2752 LANGUAGE_URDU_INDIA = _gdi_.LANGUAGE_URDU_INDIA
2753 LANGUAGE_URDU_PAKISTAN = _gdi_.LANGUAGE_URDU_PAKISTAN
2754 LANGUAGE_UZBEK = _gdi_.LANGUAGE_UZBEK
2755 LANGUAGE_UZBEK_CYRILLIC = _gdi_.LANGUAGE_UZBEK_CYRILLIC
2756 LANGUAGE_UZBEK_LATIN = _gdi_.LANGUAGE_UZBEK_LATIN
2757 LANGUAGE_VIETNAMESE = _gdi_.LANGUAGE_VIETNAMESE
2758 LANGUAGE_VOLAPUK = _gdi_.LANGUAGE_VOLAPUK
2759 LANGUAGE_WELSH = _gdi_.LANGUAGE_WELSH
2760 LANGUAGE_WOLOF = _gdi_.LANGUAGE_WOLOF
2761 LANGUAGE_XHOSA = _gdi_.LANGUAGE_XHOSA
2762 LANGUAGE_YIDDISH = _gdi_.LANGUAGE_YIDDISH
2763 LANGUAGE_YORUBA = _gdi_.LANGUAGE_YORUBA
2764 LANGUAGE_ZHUANG = _gdi_.LANGUAGE_ZHUANG
2765 LANGUAGE_ZULU = _gdi_.LANGUAGE_ZULU
2766 LANGUAGE_USER_DEFINED = _gdi_.LANGUAGE_USER_DEFINED
2767 class LanguageInfo(object):
2768 """Proxy of C++ LanguageInfo class"""
2769 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2770 def __init__(self): raise AttributeError, "No constructor defined"
2771 __repr__ = _swig_repr
2772 Language = property(_gdi_.LanguageInfo_Language_get, _gdi_.LanguageInfo_Language_set)
2773 CanonicalName = property(_gdi_.LanguageInfo_CanonicalName_get, _gdi_.LanguageInfo_CanonicalName_set)
2774 Description = property(_gdi_.LanguageInfo_Description_get, _gdi_.LanguageInfo_Description_set)
2775 _gdi_.LanguageInfo_swigregister(LanguageInfo)
2776
2777 LOCALE_CAT_NUMBER = _gdi_.LOCALE_CAT_NUMBER
2778 LOCALE_CAT_DATE = _gdi_.LOCALE_CAT_DATE
2779 LOCALE_CAT_MONEY = _gdi_.LOCALE_CAT_MONEY
2780 LOCALE_CAT_MAX = _gdi_.LOCALE_CAT_MAX
2781 LOCALE_THOUSANDS_SEP = _gdi_.LOCALE_THOUSANDS_SEP
2782 LOCALE_DECIMAL_POINT = _gdi_.LOCALE_DECIMAL_POINT
2783 LOCALE_LOAD_DEFAULT = _gdi_.LOCALE_LOAD_DEFAULT
2784 LOCALE_CONV_ENCODING = _gdi_.LOCALE_CONV_ENCODING
2785 class Locale(object):
2786 """Proxy of C++ Locale class"""
2787 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2788 __repr__ = _swig_repr
2789 def __init__(self, *args, **kwargs):
2790 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2791 _gdi_.Locale_swiginit(self,_gdi_.new_Locale(*args, **kwargs))
2792 __swig_destroy__ = _gdi_.delete_Locale
2793 __del__ = lambda self : None;
2794 def Init1(*args, **kwargs):
2795 """
2796 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2797 bool bLoadDefault=True,
2798 bool bConvertEncoding=False) -> bool
2799 """
2800 return _gdi_.Locale_Init1(*args, **kwargs)
2801
2802 def Init2(*args, **kwargs):
2803 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2804 return _gdi_.Locale_Init2(*args, **kwargs)
2805
2806 def Init(self, *_args, **_kwargs):
2807 if type(_args[0]) in [type(''), type(u'')]:
2808 val = self.Init1(*_args, **_kwargs)
2809 else:
2810 val = self.Init2(*_args, **_kwargs)
2811 return val
2812
2813 def GetSystemLanguage(*args, **kwargs):
2814 """GetSystemLanguage() -> int"""
2815 return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
2816
2817 GetSystemLanguage = staticmethod(GetSystemLanguage)
2818 def GetSystemEncoding(*args, **kwargs):
2819 """GetSystemEncoding() -> int"""
2820 return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
2821
2822 GetSystemEncoding = staticmethod(GetSystemEncoding)
2823 def GetSystemEncodingName(*args, **kwargs):
2824 """GetSystemEncodingName() -> String"""
2825 return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
2826
2827 GetSystemEncodingName = staticmethod(GetSystemEncodingName)
2828 def IsOk(*args, **kwargs):
2829 """IsOk(self) -> bool"""
2830 return _gdi_.Locale_IsOk(*args, **kwargs)
2831
2832 def __nonzero__(self): return self.IsOk()
2833 def GetLocale(*args, **kwargs):
2834 """GetLocale(self) -> String"""
2835 return _gdi_.Locale_GetLocale(*args, **kwargs)
2836
2837 def GetLanguage(*args, **kwargs):
2838 """GetLanguage(self) -> int"""
2839 return _gdi_.Locale_GetLanguage(*args, **kwargs)
2840
2841 def GetSysName(*args, **kwargs):
2842 """GetSysName(self) -> String"""
2843 return _gdi_.Locale_GetSysName(*args, **kwargs)
2844
2845 def GetCanonicalName(*args, **kwargs):
2846 """GetCanonicalName(self) -> String"""
2847 return _gdi_.Locale_GetCanonicalName(*args, **kwargs)
2848
2849 def AddCatalogLookupPathPrefix(*args, **kwargs):
2850 """AddCatalogLookupPathPrefix(String prefix)"""
2851 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
2852
2853 AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix)
2854 def AddCatalog(*args, **kwargs):
2855 """AddCatalog(self, String szDomain) -> bool"""
2856 return _gdi_.Locale_AddCatalog(*args, **kwargs)
2857
2858 def IsAvailable(*args, **kwargs):
2859 """IsAvailable(int lang) -> bool"""
2860 return _gdi_.Locale_IsAvailable(*args, **kwargs)
2861
2862 IsAvailable = staticmethod(IsAvailable)
2863 def IsLoaded(*args, **kwargs):
2864 """IsLoaded(self, String szDomain) -> bool"""
2865 return _gdi_.Locale_IsLoaded(*args, **kwargs)
2866
2867 def GetLanguageInfo(*args, **kwargs):
2868 """GetLanguageInfo(int lang) -> LanguageInfo"""
2869 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
2870
2871 GetLanguageInfo = staticmethod(GetLanguageInfo)
2872 def GetLanguageName(*args, **kwargs):
2873 """GetLanguageName(int lang) -> String"""
2874 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
2875
2876 GetLanguageName = staticmethod(GetLanguageName)
2877 def FindLanguageInfo(*args, **kwargs):
2878 """FindLanguageInfo(String locale) -> LanguageInfo"""
2879 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
2880
2881 FindLanguageInfo = staticmethod(FindLanguageInfo)
2882 def AddLanguage(*args, **kwargs):
2883 """AddLanguage(LanguageInfo info)"""
2884 return _gdi_.Locale_AddLanguage(*args, **kwargs)
2885
2886 AddLanguage = staticmethod(AddLanguage)
2887 def GetString(*args, **kwargs):
2888 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2889 return _gdi_.Locale_GetString(*args, **kwargs)
2890
2891 def GetName(*args, **kwargs):
2892 """GetName(self) -> String"""
2893 return _gdi_.Locale_GetName(*args, **kwargs)
2894
2895 CanonicalName = property(GetCanonicalName,doc="See `GetCanonicalName`")
2896 Language = property(GetLanguage,doc="See `GetLanguage`")
2897 Locale = property(GetLocale,doc="See `GetLocale`")
2898 Name = property(GetName,doc="See `GetName`")
2899 String = property(GetString,doc="See `GetString`")
2900 SysName = property(GetSysName,doc="See `GetSysName`")
2901 _gdi_.Locale_swigregister(Locale)
2902
2903 def Locale_GetSystemLanguage(*args):
2904 """Locale_GetSystemLanguage() -> int"""
2905 return _gdi_.Locale_GetSystemLanguage(*args)
2906
2907 def Locale_GetSystemEncoding(*args):
2908 """Locale_GetSystemEncoding() -> int"""
2909 return _gdi_.Locale_GetSystemEncoding(*args)
2910
2911 def Locale_GetSystemEncodingName(*args):
2912 """Locale_GetSystemEncodingName() -> String"""
2913 return _gdi_.Locale_GetSystemEncodingName(*args)
2914
2915 def Locale_AddCatalogLookupPathPrefix(*args, **kwargs):
2916 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2917 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
2918
2919 def Locale_IsAvailable(*args, **kwargs):
2920 """Locale_IsAvailable(int lang) -> bool"""
2921 return _gdi_.Locale_IsAvailable(*args, **kwargs)
2922
2923 def Locale_GetLanguageInfo(*args, **kwargs):
2924 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2925 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
2926
2927 def Locale_GetLanguageName(*args, **kwargs):
2928 """Locale_GetLanguageName(int lang) -> String"""
2929 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
2930
2931 def Locale_FindLanguageInfo(*args, **kwargs):
2932 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2933 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
2934
2935 def Locale_AddLanguage(*args, **kwargs):
2936 """Locale_AddLanguage(LanguageInfo info)"""
2937 return _gdi_.Locale_AddLanguage(*args, **kwargs)
2938
2939 class PyLocale(Locale):
2940 """Proxy of C++ PyLocale class"""
2941 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2942 __repr__ = _swig_repr
2943 def __init__(self, *args, **kwargs):
2944 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
2945 _gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs))
2946 self._setCallbackInfo(self, PyLocale)
2947
2948 __swig_destroy__ = _gdi_.delete_PyLocale
2949 __del__ = lambda self : None;
2950 def _setCallbackInfo(*args, **kwargs):
2951 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
2952 return _gdi_.PyLocale__setCallbackInfo(*args, **kwargs)
2953
2954 def GetSingularString(*args, **kwargs):
2955 """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar"""
2956 return _gdi_.PyLocale_GetSingularString(*args, **kwargs)
2957
2958 def GetPluralString(*args, **kwargs):
2959 """
2960 GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n,
2961 wxChar szDomain=None) -> wxChar
2962 """
2963 return _gdi_.PyLocale_GetPluralString(*args, **kwargs)
2964
2965 _gdi_.PyLocale_swigregister(PyLocale)
2966
2967
2968 def GetLocale(*args):
2969 """GetLocale() -> Locale"""
2970 return _gdi_.GetLocale(*args)
2971 #---------------------------------------------------------------------------
2972
2973 CONVERT_STRICT = _gdi_.CONVERT_STRICT
2974 CONVERT_SUBSTITUTE = _gdi_.CONVERT_SUBSTITUTE
2975 PLATFORM_CURRENT = _gdi_.PLATFORM_CURRENT
2976 PLATFORM_UNIX = _gdi_.PLATFORM_UNIX
2977 PLATFORM_WINDOWS = _gdi_.PLATFORM_WINDOWS
2978 PLATFORM_OS2 = _gdi_.PLATFORM_OS2
2979 PLATFORM_MAC = _gdi_.PLATFORM_MAC
2980 class EncodingConverter(_core.Object):
2981 """Proxy of C++ EncodingConverter class"""
2982 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2983 __repr__ = _swig_repr
2984 def __init__(self, *args, **kwargs):
2985 """__init__(self) -> EncodingConverter"""
2986 _gdi_.EncodingConverter_swiginit(self,_gdi_.new_EncodingConverter(*args, **kwargs))
2987 __swig_destroy__ = _gdi_.delete_EncodingConverter
2988 __del__ = lambda self : None;
2989 def Init(*args, **kwargs):
2990 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2991 return _gdi_.EncodingConverter_Init(*args, **kwargs)
2992
2993 def Convert(*args, **kwargs):
2994 """Convert(self, String input) -> String"""
2995 return _gdi_.EncodingConverter_Convert(*args, **kwargs)
2996
2997 def GetPlatformEquivalents(*args, **kwargs):
2998 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2999 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
3000
3001 GetPlatformEquivalents = staticmethod(GetPlatformEquivalents)
3002 def GetAllEquivalents(*args, **kwargs):
3003 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
3004 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
3005
3006 GetAllEquivalents = staticmethod(GetAllEquivalents)
3007 def CanConvert(*args, **kwargs):
3008 """CanConvert(int encIn, int encOut) -> bool"""
3009 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
3010
3011 CanConvert = staticmethod(CanConvert)
3012 def __nonzero__(self): return self.IsOk()
3013 _gdi_.EncodingConverter_swigregister(EncodingConverter)
3014
3015 def GetTranslation(*args):
3016 """
3017 GetTranslation(String str) -> String
3018 GetTranslation(String str, String domain) -> String
3019 GetTranslation(String str, String strPlural, size_t n) -> String
3020 GetTranslation(String str, String strPlural, size_t n, String domain) -> String
3021 """
3022 return _gdi_.GetTranslation(*args)
3023
3024 def EncodingConverter_GetPlatformEquivalents(*args, **kwargs):
3025 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
3026 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
3027
3028 def EncodingConverter_GetAllEquivalents(*args, **kwargs):
3029 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
3030 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
3031
3032 def EncodingConverter_CanConvert(*args, **kwargs):
3033 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
3034 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
3035
3036 #----------------------------------------------------------------------------
3037 # On MSW add the directory where the wxWidgets catalogs were installed
3038 # to the default catalog path.
3039 if wx.Platform == "__WXMSW__":
3040 import os
3041 _localedir = os.path.join(os.path.split(__file__)[0], "locale")
3042 Locale.AddCatalogLookupPathPrefix(_localedir)
3043 del os
3044
3045 #----------------------------------------------------------------------------
3046
3047 #---------------------------------------------------------------------------
3048
3049 class DC(_core.Object):
3050 """
3051 A wx.DC is a device context onto which graphics and text can be
3052 drawn. It is intended to represent a number of output devices in a
3053 generic way, so a window can have a device context associated with it,
3054 and a printer also has a device context. In this way, the same piece
3055 of code may write to a number of different devices, if the device
3056 context is used as a parameter.
3057
3058 Derived types of wxDC have documentation for specific features only,
3059 so refer to this section for most device context information.
3060
3061 The wx.DC class is abstract and can not be instantiated, you must use
3062 one of the derived classes instead. Which one will depend on the
3063 situation in which it is used.
3064 """
3065 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3066 def __init__(self): raise AttributeError, "No constructor defined"
3067 __repr__ = _swig_repr
3068 __swig_destroy__ = _gdi_.delete_DC
3069 __del__ = lambda self : None;
3070 # These have been deprecated in wxWidgets. Since they never
3071 # really did anything to begin with, just make them be NOPs.
3072 def BeginDrawing(self): pass
3073 def EndDrawing(self): pass
3074
3075 def FloodFill(*args, **kwargs):
3076 """
3077 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
3078
3079 Flood fills the device context starting from the given point, using
3080 the current brush colour, and using a style:
3081
3082 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
3083 the given colour is encountered.
3084
3085 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
3086 colour.
3087
3088 Returns False if the operation failed.
3089
3090 Note: The present implementation for non-Windows platforms may fail to
3091 find colour borders if the pixels do not match the colour
3092 exactly. However the function will still return true.
3093 """
3094 return _gdi_.DC_FloodFill(*args, **kwargs)
3095
3096 def FloodFillPoint(*args, **kwargs):
3097 """
3098 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
3099
3100 Flood fills the device context starting from the given point, using
3101 the current brush colour, and using a style:
3102
3103 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
3104 the given colour is encountered.
3105
3106 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
3107 colour.
3108
3109 Returns False if the operation failed.
3110
3111 Note: The present implementation for non-Windows platforms may fail to
3112 find colour borders if the pixels do not match the colour
3113 exactly. However the function will still return true.
3114 """
3115 return _gdi_.DC_FloodFillPoint(*args, **kwargs)
3116
3117 def GradientFillConcentric(*args, **kwargs):
3118 """
3119 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
3120 Point circleCenter)
3121
3122 Fill the area specified by rect with a radial gradient, starting from
3123 initialColour in the center of the circle and fading to destColour on
3124 the outside of the circle. The circleCenter argument is the relative
3125 coordinants of the center of the circle in the specified rect.
3126
3127 Note: Currently this function is very slow, don't use it for real-time
3128 drawing.
3129 """
3130 return _gdi_.DC_GradientFillConcentric(*args, **kwargs)
3131
3132 def GradientFillLinear(*args, **kwargs):
3133 """
3134 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
3135 int nDirection=EAST)
3136
3137 Fill the area specified by rect with a linear gradient, starting from
3138 initialColour and eventually fading to destColour. The nDirection
3139 parameter specifies the direction of the colour change, default is to
3140 use initialColour on the left part of the rectangle and destColour on
3141 the right side.
3142 """
3143 return _gdi_.DC_GradientFillLinear(*args, **kwargs)
3144
3145 def GetPixel(*args, **kwargs):
3146 """
3147 GetPixel(self, int x, int y) -> Colour
3148
3149 Gets the colour at the specified location on the DC.
3150 """
3151 return _gdi_.DC_GetPixel(*args, **kwargs)
3152
3153 def GetPixelPoint(*args, **kwargs):
3154 """GetPixelPoint(self, Point pt) -> Colour"""
3155 return _gdi_.DC_GetPixelPoint(*args, **kwargs)
3156
3157 def DrawLine(*args, **kwargs):
3158 """
3159 DrawLine(self, int x1, int y1, int x2, int y2)
3160
3161 Draws a line from the first point to the second. The current pen is
3162 used for drawing the line. Note that the second point is *not* part of
3163 the line and is not drawn by this function (this is consistent with
3164 the behaviour of many other toolkits).
3165 """
3166 return _gdi_.DC_DrawLine(*args, **kwargs)
3167
3168 def DrawLinePoint(*args, **kwargs):
3169 """
3170 DrawLinePoint(self, Point pt1, Point pt2)
3171
3172 Draws a line from the first point to the second. The current pen is
3173 used for drawing the line. Note that the second point is *not* part of
3174 the line and is not drawn by this function (this is consistent with
3175 the behaviour of many other toolkits).
3176 """
3177 return _gdi_.DC_DrawLinePoint(*args, **kwargs)
3178
3179 def CrossHair(*args, **kwargs):
3180 """
3181 CrossHair(self, int x, int y)
3182
3183 Displays a cross hair using the current pen. This is a vertical and
3184 horizontal line the height and width of the window, centred on the
3185 given point.
3186 """
3187 return _gdi_.DC_CrossHair(*args, **kwargs)
3188
3189 def CrossHairPoint(*args, **kwargs):
3190 """
3191 CrossHairPoint(self, Point pt)
3192
3193 Displays a cross hair using the current pen. This is a vertical and
3194 horizontal line the height and width of the window, centred on the
3195 given point.
3196 """
3197 return _gdi_.DC_CrossHairPoint(*args, **kwargs)
3198
3199 def DrawArc(*args, **kwargs):
3200 """
3201 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
3202
3203 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3204 the first point to the second. The current pen is used for the outline
3205 and the current brush for filling the shape.
3206
3207 The arc is drawn in an anticlockwise direction from the start point to
3208 the end point.
3209 """
3210 return _gdi_.DC_DrawArc(*args, **kwargs)
3211
3212 def DrawArcPoint(*args, **kwargs):
3213 """
3214 DrawArcPoint(self, Point pt1, Point pt2, Point center)
3215
3216 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3217 the first point to the second. The current pen is used for the outline
3218 and the current brush for filling the shape.
3219
3220 The arc is drawn in an anticlockwise direction from the start point to
3221 the end point.
3222 """
3223 return _gdi_.DC_DrawArcPoint(*args, **kwargs)
3224
3225 def DrawCheckMark(*args, **kwargs):
3226 """
3227 DrawCheckMark(self, int x, int y, int width, int height)
3228
3229 Draws a check mark inside the given rectangle.
3230 """
3231 return _gdi_.DC_DrawCheckMark(*args, **kwargs)
3232
3233 def DrawCheckMarkRect(*args, **kwargs):
3234 """
3235 DrawCheckMarkRect(self, Rect rect)
3236
3237 Draws a check mark inside the given rectangle.
3238 """
3239 return _gdi_.DC_DrawCheckMarkRect(*args, **kwargs)
3240
3241 def DrawEllipticArc(*args, **kwargs):
3242 """
3243 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3244
3245 Draws an arc of an ellipse, with the given rectangle defining the
3246 bounds of the ellipse. The current pen is used for drawing the arc and
3247 the current brush is used for drawing the pie.
3248
3249 The *start* and *end* parameters specify the start and end of the arc
3250 relative to the three-o'clock position from the center of the
3251 rectangle. Angles are specified in degrees (360 is a complete
3252 circle). Positive values mean counter-clockwise motion. If start is
3253 equal to end, a complete ellipse will be drawn.
3254 """
3255 return _gdi_.DC_DrawEllipticArc(*args, **kwargs)
3256
3257 def DrawEllipticArcPointSize(*args, **kwargs):
3258 """
3259 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3260
3261 Draws an arc of an ellipse, with the given rectangle defining the
3262 bounds of the ellipse. The current pen is used for drawing the arc and
3263 the current brush is used for drawing the pie.
3264
3265 The *start* and *end* parameters specify the start and end of the arc
3266 relative to the three-o'clock position from the center of the
3267 rectangle. Angles are specified in degrees (360 is a complete
3268 circle). Positive values mean counter-clockwise motion. If start is
3269 equal to end, a complete ellipse will be drawn.
3270 """
3271 return _gdi_.DC_DrawEllipticArcPointSize(*args, **kwargs)
3272
3273 def DrawPoint(*args, **kwargs):
3274 """
3275 DrawPoint(self, int x, int y)
3276
3277 Draws a point using the current pen.
3278 """
3279 return _gdi_.DC_DrawPoint(*args, **kwargs)
3280
3281 def DrawPointPoint(*args, **kwargs):
3282 """
3283 DrawPointPoint(self, Point pt)
3284
3285 Draws a point using the current pen.
3286 """
3287 return _gdi_.DC_DrawPointPoint(*args, **kwargs)
3288
3289 def DrawRectangle(*args, **kwargs):
3290 """
3291 DrawRectangle(self, int x, int y, int width, int height)
3292
3293 Draws a rectangle with the given top left corner, and with the given
3294 size. The current pen is used for the outline and the current brush
3295 for filling the shape.
3296 """
3297 return _gdi_.DC_DrawRectangle(*args, **kwargs)
3298
3299 def DrawRectangleRect(*args, **kwargs):
3300 """
3301 DrawRectangleRect(self, Rect rect)
3302
3303 Draws a rectangle with the given top left corner, and with the given
3304 size. The current pen is used for the outline and the current brush
3305 for filling the shape.
3306 """
3307 return _gdi_.DC_DrawRectangleRect(*args, **kwargs)
3308
3309 def DrawRectanglePointSize(*args, **kwargs):
3310 """
3311 DrawRectanglePointSize(self, Point pt, Size sz)
3312
3313 Draws a rectangle with the given top left corner, and with the given
3314 size. The current pen is used for the outline and the current brush
3315 for filling the shape.
3316 """
3317 return _gdi_.DC_DrawRectanglePointSize(*args, **kwargs)
3318
3319 def DrawRoundedRectangle(*args, **kwargs):
3320 """
3321 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3322
3323 Draws a rectangle with the given top left corner, and with the given
3324 size. The corners are quarter-circles using the given radius. The
3325 current pen is used for the outline and the current brush for filling
3326 the shape.
3327
3328 If radius is positive, the value is assumed to be the radius of the
3329 rounded corner. If radius is negative, the absolute value is assumed
3330 to be the proportion of the smallest dimension of the rectangle. This
3331 means that the corner can be a sensible size relative to the size of
3332 the rectangle, and also avoids the strange effects X produces when the
3333 corners are too big for the rectangle.
3334 """
3335 return _gdi_.DC_DrawRoundedRectangle(*args, **kwargs)
3336
3337 def DrawRoundedRectangleRect(*args, **kwargs):
3338 """
3339 DrawRoundedRectangleRect(self, Rect r, double radius)
3340
3341 Draws a rectangle with the given top left corner, and with the given
3342 size. The corners are quarter-circles using the given radius. The
3343 current pen is used for the outline and the current brush for filling
3344 the shape.
3345
3346 If radius is positive, the value is assumed to be the radius of the
3347 rounded corner. If radius is negative, the absolute value is assumed
3348 to be the proportion of the smallest dimension of the rectangle. This
3349 means that the corner can be a sensible size relative to the size of
3350 the rectangle, and also avoids the strange effects X produces when the
3351 corners are too big for the rectangle.
3352 """
3353 return _gdi_.DC_DrawRoundedRectangleRect(*args, **kwargs)
3354
3355 def DrawRoundedRectanglePointSize(*args, **kwargs):
3356 """
3357 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3358
3359 Draws a rectangle with the given top left corner, and with the given
3360 size. The corners are quarter-circles using the given radius. The
3361 current pen is used for the outline and the current brush for filling
3362 the shape.
3363
3364 If radius is positive, the value is assumed to be the radius of the
3365 rounded corner. If radius is negative, the absolute value is assumed
3366 to be the proportion of the smallest dimension of the rectangle. This
3367 means that the corner can be a sensible size relative to the size of
3368 the rectangle, and also avoids the strange effects X produces when the
3369 corners are too big for the rectangle.
3370 """
3371 return _gdi_.DC_DrawRoundedRectanglePointSize(*args, **kwargs)
3372
3373 def DrawCircle(*args, **kwargs):
3374 """
3375 DrawCircle(self, int x, int y, int radius)
3376
3377 Draws a circle with the given center point and radius. The current
3378 pen is used for the outline and the current brush for filling the
3379 shape.
3380
3381 :see: `DrawEllipse`
3382 """
3383 return _gdi_.DC_DrawCircle(*args, **kwargs)
3384
3385 def DrawCirclePoint(*args, **kwargs):
3386 """
3387 DrawCirclePoint(self, Point pt, int radius)
3388
3389 Draws a circle with the given center point and radius. The current
3390 pen is used for the outline and the current brush for filling the
3391 shape.
3392
3393 :see: `DrawEllipse`
3394 """
3395 return _gdi_.DC_DrawCirclePoint(*args, **kwargs)
3396
3397 def DrawEllipse(*args, **kwargs):
3398 """
3399 DrawEllipse(self, int x, int y, int width, int height)
3400
3401 Draws an ellipse contained in the specified rectangle. The current pen
3402 is used for the outline and the current brush for filling the shape.
3403
3404 :see: `DrawCircle`
3405 """
3406 return _gdi_.DC_DrawEllipse(*args, **kwargs)
3407
3408 def DrawEllipseRect(*args, **kwargs):
3409 """
3410 DrawEllipseRect(self, Rect rect)
3411
3412 Draws an ellipse contained in the specified rectangle. The current pen
3413 is used for the outline and the current brush for filling the shape.
3414
3415 :see: `DrawCircle`
3416 """
3417 return _gdi_.DC_DrawEllipseRect(*args, **kwargs)
3418
3419 def DrawEllipsePointSize(*args, **kwargs):
3420 """
3421 DrawEllipsePointSize(self, Point pt, Size sz)
3422
3423 Draws an ellipse contained in the specified rectangle. The current pen
3424 is used for the outline and the current brush for filling the shape.
3425
3426 :see: `DrawCircle`
3427 """
3428 return _gdi_.DC_DrawEllipsePointSize(*args, **kwargs)
3429
3430 def DrawIcon(*args, **kwargs):
3431 """
3432 DrawIcon(self, Icon icon, int x, int y)
3433
3434 Draw an icon on the display (does nothing if the device context is
3435 PostScript). This can be the simplest way of drawing bitmaps on a
3436 window.
3437 """
3438 return _gdi_.DC_DrawIcon(*args, **kwargs)
3439
3440 def DrawIconPoint(*args, **kwargs):
3441 """
3442 DrawIconPoint(self, Icon icon, Point pt)
3443
3444 Draw an icon on the display (does nothing if the device context is
3445 PostScript). This can be the simplest way of drawing bitmaps on a
3446 window.
3447 """
3448 return _gdi_.DC_DrawIconPoint(*args, **kwargs)
3449
3450 def DrawBitmap(*args, **kwargs):
3451 """
3452 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3453
3454 Draw a bitmap on the device context at the specified point. If
3455 *transparent* is true and the bitmap has a transparency mask, (or
3456 alpha channel on the platforms that support it) then the bitmap will
3457 be drawn transparently.
3458
3459 When drawing a mono-bitmap, the current text foreground colour will be
3460 used to draw the foreground of the bitmap (all bits set to 1), and the
3461 current text background colour to draw the background (all bits set to
3462 0).
3463
3464 :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`
3465 """
3466 return _gdi_.DC_DrawBitmap(*args, **kwargs)
3467
3468 def DrawBitmapPoint(*args, **kwargs):
3469 """
3470 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3471
3472 Draw a bitmap on the device context at the specified point. If
3473 *transparent* is true and the bitmap has a transparency mask, (or
3474 alpha channel on the platforms that support it) then the bitmap will
3475 be drawn transparently.
3476
3477 When drawing a mono-bitmap, the current text foreground colour will be
3478 used to draw the foreground of the bitmap (all bits set to 1), and the
3479 current text background colour to draw the background (all bits set to
3480 0).
3481
3482 :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`
3483 """
3484 return _gdi_.DC_DrawBitmapPoint(*args, **kwargs)
3485
3486 def DrawText(*args, **kwargs):
3487 """
3488 DrawText(self, String text, int x, int y)
3489
3490 Draws a text string at the specified point, using the current text
3491 font, and the current text foreground and background colours.
3492
3493 The coordinates refer to the top-left corner of the rectangle bounding
3494 the string. See `GetTextExtent` for how to get the dimensions of a
3495 text string, which can be used to position the text more precisely.
3496
3497 **NOTE**: under wxGTK the current logical function is used by this
3498 function but it is ignored by wxMSW. Thus, you should avoid using
3499 logical functions with this function in portable programs.
3500
3501 :see: `DrawRotatedText`
3502 """
3503 return _gdi_.DC_DrawText(*args, **kwargs)
3504
3505 def DrawTextPoint(*args, **kwargs):
3506 """
3507 DrawTextPoint(self, String text, Point pt)
3508
3509 Draws a text string at the specified point, using the current text
3510 font, and the current text foreground and background colours.
3511
3512 The coordinates refer to the top-left corner of the rectangle bounding
3513 the string. See `GetTextExtent` for how to get the dimensions of a
3514 text string, which can be used to position the text more precisely.
3515
3516 **NOTE**: under wxGTK the current logical function is used by this
3517 function but it is ignored by wxMSW. Thus, you should avoid using
3518 logical functions with this function in portable programs.
3519
3520 :see: `DrawRotatedText`
3521 """
3522 return _gdi_.DC_DrawTextPoint(*args, **kwargs)
3523
3524 def DrawRotatedText(*args, **kwargs):
3525 """
3526 DrawRotatedText(self, String text, int x, int y, double angle)
3527
3528 Draws the text rotated by *angle* degrees, if supported by the platform.
3529
3530 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3531 function. In particular, a font different from ``wx.NORMAL_FONT``
3532 should be used as the it is not normally a TrueType
3533 font. ``wx.SWISS_FONT`` is an example of a font which is.
3534
3535 :see: `DrawText`
3536 """
3537 return _gdi_.DC_DrawRotatedText(*args, **kwargs)
3538
3539 def DrawRotatedTextPoint(*args, **kwargs):
3540 """
3541 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3542
3543 Draws the text rotated by *angle* degrees, if supported by the platform.
3544
3545 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3546 function. In particular, a font different from ``wx.NORMAL_FONT``
3547 should be used as the it is not normally a TrueType
3548 font. ``wx.SWISS_FONT`` is an example of a font which is.
3549
3550 :see: `DrawText`
3551 """
3552 return _gdi_.DC_DrawRotatedTextPoint(*args, **kwargs)
3553
3554 def Blit(*args, **kwargs):
3555 """
3556 Blit(self, int xdest, int ydest, int width, int height, DC source,
3557 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3558 int xsrcMask=-1, int ysrcMask=-1) -> bool
3559
3560 Copy from a source DC to this DC. Parameters specify the destination
3561 coordinates, size of area to copy, source DC, source coordinates,
3562 logical function, whether to use a bitmap mask, and mask source
3563 position.
3564
3565 :param xdest: Destination device context x position.
3566 :param ydest: Destination device context y position.
3567 :param width: Width of source area to be copied.
3568 :param height: Height of source area to be copied.
3569 :param source: Source device context.
3570 :param xsrc: Source device context x position.
3571 :param ysrc: Source device context y position.
3572 :param rop: Logical function to use: see `SetLogicalFunction`.
3573 :param useMask: If true, Blit does a transparent blit using the mask
3574 that is associated with the bitmap selected into the
3575 source device context.
3576 :param xsrcMask: Source x position on the mask. If both xsrcMask and
3577 ysrcMask are -1, xsrc and ysrc will be assumed for
3578 the mask source position.
3579 :param ysrcMask: Source y position on the mask.
3580
3581 """
3582 return _gdi_.DC_Blit(*args, **kwargs)
3583
3584 def BlitPointSize(*args, **kwargs):
3585 """
3586 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3587 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3588
3589 Copy from a source DC to this DC. Parameters specify the destination
3590 coordinates, size of area to copy, source DC, source coordinates,
3591 logical function, whether to use a bitmap mask, and mask source
3592 position.
3593
3594 :param destPt: Destination device context position.
3595 :param sz: Size of source area to be copied.
3596 :param source: Source device context.
3597 :param srcPt: Source device context position.
3598 :param rop: Logical function to use: see `SetLogicalFunction`.
3599 :param useMask: If true, Blit does a transparent blit using the mask
3600 that is associated with the bitmap selected into the
3601 source device context.
3602 :param srcPtMask: Source position on the mask.
3603
3604 """
3605 return _gdi_.DC_BlitPointSize(*args, **kwargs)
3606
3607 def SetClippingRegion(*args, **kwargs):
3608 """
3609 SetClippingRegion(self, int x, int y, int width, int height)
3610
3611 Sets the clipping region for this device context to the intersection
3612 of the given region described by the parameters of this method and the
3613 previously set clipping region. You should call `DestroyClippingRegion`
3614 if you want to set the clipping region exactly to the region
3615 specified.
3616
3617 The clipping region is an area to which drawing is
3618 restricted. Possible uses for the clipping region are for clipping
3619 text or for speeding up window redraws when only a known area of the
3620 screen is damaged.
3621
3622 :see: `DestroyClippingRegion`, `wx.Region`
3623 """
3624 return _gdi_.DC_SetClippingRegion(*args, **kwargs)
3625
3626 def SetClippingRegionPointSize(*args, **kwargs):
3627 """
3628 SetClippingRegionPointSize(self, Point pt, Size sz)
3629
3630 Sets the clipping region for this device context to the intersection
3631 of the given region described by the parameters of this method and the
3632 previously set clipping region. You should call `DestroyClippingRegion`
3633 if you want to set the clipping region exactly to the region
3634 specified.
3635
3636 The clipping region is an area to which drawing is
3637 restricted. Possible uses for the clipping region are for clipping
3638 text or for speeding up window redraws when only a known area of the
3639 screen is damaged.
3640
3641 :see: `DestroyClippingRegion`, `wx.Region`
3642 """
3643 return _gdi_.DC_SetClippingRegionPointSize(*args, **kwargs)
3644
3645 def SetClippingRegionAsRegion(*args, **kwargs):
3646 """
3647 SetClippingRegionAsRegion(self, Region region)
3648
3649 Sets the clipping region for this device context to the intersection
3650 of the given region described by the parameters of this method and the
3651 previously set clipping region. You should call `DestroyClippingRegion`
3652 if you want to set the clipping region exactly to the region
3653 specified.
3654
3655 The clipping region is an area to which drawing is
3656 restricted. Possible uses for the clipping region are for clipping
3657 text or for speeding up window redraws when only a known area of the
3658 screen is damaged.
3659
3660 :see: `DestroyClippingRegion`, `wx.Region`
3661 """
3662 return _gdi_.DC_SetClippingRegionAsRegion(*args, **kwargs)
3663
3664 def SetClippingRect(*args, **kwargs):
3665 """
3666 SetClippingRect(self, Rect rect)
3667
3668 Sets the clipping region for this device context to the intersection
3669 of the given region described by the parameters of this method and the
3670 previously set clipping region. You should call `DestroyClippingRegion`
3671 if you want to set the clipping region exactly to the region
3672 specified.
3673
3674 The clipping region is an area to which drawing is
3675 restricted. Possible uses for the clipping region are for clipping
3676 text or for speeding up window redraws when only a known area of the
3677 screen is damaged.
3678
3679 :see: `DestroyClippingRegion`, `wx.Region`
3680 """
3681 return _gdi_.DC_SetClippingRect(*args, **kwargs)
3682
3683 def DrawLines(*args, **kwargs):
3684 """
3685 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3686
3687 Draws lines using a sequence of `wx.Point` objects, adding the
3688 optional offset coordinate. The current pen is used for drawing the
3689 lines.
3690 """
3691 return _gdi_.DC_DrawLines(*args, **kwargs)
3692
3693 def DrawPolygon(*args, **kwargs):
3694 """
3695 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3696 int fillStyle=ODDEVEN_RULE)
3697
3698 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3699 the optional offset coordinate. The last argument specifies the fill
3700 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3701
3702 The current pen is used for drawing the outline, and the current brush
3703 for filling the shape. Using a transparent brush suppresses
3704 filling. Note that wxWidgets automatically closes the first and last
3705 points.
3706 """
3707 return _gdi_.DC_DrawPolygon(*args, **kwargs)
3708
3709 def DrawLabel(*args, **kwargs):
3710 """
3711 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3712 int indexAccel=-1)
3713
3714 Draw *text* within the specified rectangle, abiding by the alignment
3715 flags. Will additionally emphasize the character at *indexAccel* if
3716 it is not -1.
3717
3718 :see: `DrawImageLabel`
3719 """
3720 return _gdi_.DC_DrawLabel(*args, **kwargs)
3721
3722 def DrawImageLabel(*args, **kwargs):
3723 """
3724 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3725 int indexAccel=-1) -> Rect
3726
3727 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3728 drawing it) within the specified rectangle, abiding by the alignment
3729 flags. Will additionally emphasize the character at *indexAccel* if
3730 it is not -1. Returns the bounding rectangle.
3731 """
3732 return _gdi_.DC_DrawImageLabel(*args, **kwargs)
3733
3734 def DrawSpline(*args, **kwargs):
3735 """
3736 DrawSpline(self, List points)
3737
3738 Draws a spline between all given control points, (a list of `wx.Point`
3739 objects) using the current pen. The spline is drawn using a series of
3740 lines, using an algorithm taken from the X drawing program 'XFIG'.
3741 """
3742 return _gdi_.DC_DrawSpline(*args, **kwargs)
3743
3744 def Clear(*args, **kwargs):
3745 """
3746 Clear(self)
3747
3748 Clears the device context using the current background brush.
3749 """
3750 return _gdi_.DC_Clear(*args, **kwargs)
3751
3752 def StartDoc(*args, **kwargs):
3753 """
3754 StartDoc(self, String message) -> bool
3755
3756 Starts a document (only relevant when outputting to a
3757 printer). *Message* is a message to show whilst printing.
3758 """
3759 return _gdi_.DC_StartDoc(*args, **kwargs)
3760
3761 def EndDoc(*args, **kwargs):
3762 """
3763 EndDoc(self)
3764
3765 Ends a document (only relevant when outputting to a printer).
3766 """
3767 return _gdi_.DC_EndDoc(*args, **kwargs)
3768
3769 def StartPage(*args, **kwargs):
3770 """
3771 StartPage(self)
3772
3773 Starts a document page (only relevant when outputting to a printer).
3774 """
3775 return _gdi_.DC_StartPage(*args, **kwargs)
3776
3777 def EndPage(*args, **kwargs):
3778 """
3779 EndPage(self)
3780
3781 Ends a document page (only relevant when outputting to a printer).
3782 """
3783 return _gdi_.DC_EndPage(*args, **kwargs)
3784
3785 def SetFont(*args, **kwargs):
3786 """
3787 SetFont(self, Font font)
3788
3789 Sets the current font for the DC. It must be a valid font, in
3790 particular you should not pass ``wx.NullFont`` to this method.
3791
3792 :see: `wx.Font`
3793 """
3794 return _gdi_.DC_SetFont(*args, **kwargs)
3795
3796 def SetPen(*args, **kwargs):
3797 """
3798 SetPen(self, Pen pen)
3799
3800 Sets the current pen for the DC.
3801
3802 If the argument is ``wx.NullPen``, the current pen is selected out of the
3803 device context, and the original pen restored.
3804
3805 :see: `wx.Pen`
3806 """
3807 return _gdi_.DC_SetPen(*args, **kwargs)
3808
3809 def SetBrush(*args, **kwargs):
3810 """
3811 SetBrush(self, Brush brush)
3812
3813 Sets the current brush for the DC.
3814
3815 If the argument is ``wx.NullBrush``, the current brush is selected out
3816 of the device context, and the original brush restored, allowing the
3817 current brush to be destroyed safely.
3818
3819 :see: `wx.Brush`
3820 """
3821 return _gdi_.DC_SetBrush(*args, **kwargs)
3822
3823 def SetBackground(*args, **kwargs):
3824 """
3825 SetBackground(self, Brush brush)
3826
3827 Sets the current background brush for the DC.
3828 """
3829 return _gdi_.DC_SetBackground(*args, **kwargs)
3830
3831 def SetBackgroundMode(*args, **kwargs):
3832 """
3833 SetBackgroundMode(self, int mode)
3834
3835 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3836 determines whether text will be drawn with a background colour or
3837 not.
3838 """
3839 return _gdi_.DC_SetBackgroundMode(*args, **kwargs)
3840
3841 def SetPalette(*args, **kwargs):
3842 """
3843 SetPalette(self, Palette palette)
3844
3845 If this is a window DC or memory DC, assigns the given palette to the
3846 window or bitmap associated with the DC. If the argument is
3847 ``wx.NullPalette``, the current palette is selected out of the device
3848 context, and the original palette restored.
3849
3850 :see: `wx.Palette`
3851 """
3852 return _gdi_.DC_SetPalette(*args, **kwargs)
3853
3854 def DestroyClippingRegion(*args, **kwargs):
3855 """
3856 DestroyClippingRegion(self)
3857
3858 Destroys the current clipping region so that none of the DC is
3859 clipped.
3860
3861 :see: `SetClippingRegion`
3862 """
3863 return _gdi_.DC_DestroyClippingRegion(*args, **kwargs)
3864
3865 def GetClippingBox(*args, **kwargs):
3866 """
3867 GetClippingBox() -> (x, y, width, height)
3868
3869 Gets the rectangle surrounding the current clipping region.
3870 """
3871 return _gdi_.DC_GetClippingBox(*args, **kwargs)
3872
3873 def GetClippingRect(*args, **kwargs):
3874 """
3875 GetClippingRect(self) -> Rect
3876
3877 Gets the rectangle surrounding the current clipping region.
3878 """
3879 return _gdi_.DC_GetClippingRect(*args, **kwargs)
3880
3881 def GetCharHeight(*args, **kwargs):
3882 """
3883 GetCharHeight(self) -> int
3884
3885 Gets the character height of the currently set font.
3886 """
3887 return _gdi_.DC_GetCharHeight(*args, **kwargs)
3888
3889 def GetCharWidth(*args, **kwargs):
3890 """
3891 GetCharWidth(self) -> int
3892
3893 Gets the average character width of the currently set font.
3894 """
3895 return _gdi_.DC_GetCharWidth(*args, **kwargs)
3896
3897 def GetTextExtent(*args, **kwargs):
3898 """
3899 GetTextExtent(wxString string) -> (width, height)
3900
3901 Get the width and height of the text using the current font. Only
3902 works for single line strings.
3903 """
3904 return _gdi_.DC_GetTextExtent(*args, **kwargs)
3905
3906 def GetFullTextExtent(*args, **kwargs):
3907 """
3908 GetFullTextExtent(wxString string, Font font=None) ->
3909 (width, height, descent, externalLeading)
3910
3911 Get the width, height, decent and leading of the text using the
3912 current or specified font. Only works for single line strings.
3913 """
3914 return _gdi_.DC_GetFullTextExtent(*args, **kwargs)
3915
3916 def GetMultiLineTextExtent(*args, **kwargs):
3917 """
3918 GetMultiLineTextExtent(wxString string, Font font=None) ->
3919 (width, height, lineHeight)
3920
3921 Get the width, height, and line height of the text using the
3922 current or specified font. Works for single as well as multi-line
3923 strings.
3924 """
3925 return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
3926
3927 def GetPartialTextExtents(*args, **kwargs):
3928 """
3929 GetPartialTextExtents(self, text) -> [widths]
3930
3931 Returns a list of integers such that each value is the distance in
3932 pixels from the begining of text to the coresponding character of
3933 *text*. The generic version simply builds a running total of the widths
3934 of each character using GetTextExtent, however if the various
3935 platforms have a native API function that is faster or more accurate
3936 than the generic implementation then it will be used instead.
3937 """
3938 return _gdi_.DC_GetPartialTextExtents(*args, **kwargs)
3939
3940 def GetSize(*args, **kwargs):
3941 """
3942 GetSize(self) -> Size
3943
3944 This gets the horizontal and vertical resolution in device units. It
3945 can be used to scale graphics to fit the page. For example, if *maxX*
3946 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3947 used in your application, the following code will scale the graphic to
3948 fit on the printer page::
3949
3950 w, h = dc.GetSize()
3951 scaleX = maxX*1.0 / w
3952 scaleY = maxY*1.0 / h
3953 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3954
3955 """
3956 return _gdi_.DC_GetSize(*args, **kwargs)
3957
3958 def GetSizeTuple(*args, **kwargs):
3959 """
3960 GetSizeTuple() -> (width, height)
3961
3962 This gets the horizontal and vertical resolution in device units. It
3963 can be used to scale graphics to fit the page. For example, if *maxX*
3964 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3965 used in your application, the following code will scale the graphic to
3966 fit on the printer page::
3967
3968 w, h = dc.GetSize()
3969 scaleX = maxX*1.0 / w
3970 scaleY = maxY*1.0 / h
3971 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3972
3973 """
3974 return _gdi_.DC_GetSizeTuple(*args, **kwargs)
3975
3976 def GetSizeMM(*args, **kwargs):
3977 """
3978 GetSizeMM(self) -> Size
3979
3980 Get the DC size in milimeters.
3981 """
3982 return _gdi_.DC_GetSizeMM(*args, **kwargs)
3983
3984 def GetSizeMMTuple(*args, **kwargs):
3985 """
3986 GetSizeMMTuple() -> (width, height)
3987
3988 Get the DC size in milimeters.
3989 """
3990 return _gdi_.DC_GetSizeMMTuple(*args, **kwargs)
3991
3992 def DeviceToLogicalX(*args, **kwargs):
3993 """
3994 DeviceToLogicalX(self, int x) -> int
3995
3996 Convert device X coordinate to logical coordinate, using the current
3997 mapping mode.
3998 """
3999 return _gdi_.DC_DeviceToLogicalX(*args, **kwargs)
4000
4001 def DeviceToLogicalY(*args, **kwargs):
4002 """
4003 DeviceToLogicalY(self, int y) -> int
4004
4005 Converts device Y coordinate to logical coordinate, using the current
4006 mapping mode.
4007 """
4008 return _gdi_.DC_DeviceToLogicalY(*args, **kwargs)
4009
4010 def DeviceToLogicalXRel(*args, **kwargs):
4011 """
4012 DeviceToLogicalXRel(self, int x) -> int
4013
4014 Convert device X coordinate to relative logical coordinate, using the
4015 current mapping mode but ignoring the x axis orientation. Use this
4016 function for converting a width, for example.
4017 """
4018 return _gdi_.DC_DeviceToLogicalXRel(*args, **kwargs)
4019
4020 def DeviceToLogicalYRel(*args, **kwargs):
4021 """
4022 DeviceToLogicalYRel(self, int y) -> int
4023
4024 Convert device Y coordinate to relative logical coordinate, using the
4025 current mapping mode but ignoring the y axis orientation. Use this
4026 function for converting a height, for example.
4027 """
4028 return _gdi_.DC_DeviceToLogicalYRel(*args, **kwargs)
4029
4030 def LogicalToDeviceX(*args, **kwargs):
4031 """
4032 LogicalToDeviceX(self, int x) -> int
4033
4034 Converts logical X coordinate to device coordinate, using the current
4035 mapping mode.
4036 """
4037 return _gdi_.DC_LogicalToDeviceX(*args, **kwargs)
4038
4039 def LogicalToDeviceY(*args, **kwargs):
4040 """
4041 LogicalToDeviceY(self, int y) -> int
4042
4043 Converts logical Y coordinate to device coordinate, using the current
4044 mapping mode.
4045 """
4046 return _gdi_.DC_LogicalToDeviceY(*args, **kwargs)
4047
4048 def LogicalToDeviceXRel(*args, **kwargs):
4049 """
4050 LogicalToDeviceXRel(self, int x) -> int
4051
4052 Converts logical X coordinate to relative device coordinate, using the
4053 current mapping mode but ignoring the x axis orientation. Use this for
4054 converting a width, for example.
4055 """
4056 return _gdi_.DC_LogicalToDeviceXRel(*args, **kwargs)
4057
4058 def LogicalToDeviceYRel(*args, **kwargs):
4059 """
4060 LogicalToDeviceYRel(self, int y) -> int
4061
4062 Converts logical Y coordinate to relative device coordinate, using the
4063 current mapping mode but ignoring the y axis orientation. Use this for
4064 converting a height, for example.
4065 """
4066 return _gdi_.DC_LogicalToDeviceYRel(*args, **kwargs)
4067
4068 def CanDrawBitmap(*args, **kwargs):
4069 """CanDrawBitmap(self) -> bool"""
4070 return _gdi_.DC_CanDrawBitmap(*args, **kwargs)
4071
4072 def CanGetTextExtent(*args, **kwargs):
4073 """CanGetTextExtent(self) -> bool"""
4074 return _gdi_.DC_CanGetTextExtent(*args, **kwargs)
4075
4076 def GetDepth(*args, **kwargs):
4077 """
4078 GetDepth(self) -> int
4079
4080 Returns the colour depth of the DC.
4081 """
4082 return _gdi_.DC_GetDepth(*args, **kwargs)
4083
4084 def GetPPI(*args, **kwargs):
4085 """
4086 GetPPI(self) -> Size
4087
4088 Resolution in pixels per inch
4089 """
4090 return _gdi_.DC_GetPPI(*args, **kwargs)
4091
4092 def IsOk(*args, **kwargs):
4093 """
4094 IsOk(self) -> bool
4095
4096 Returns true if the DC is ok to use.
4097 """
4098 return _gdi_.DC_IsOk(*args, **kwargs)
4099
4100 Ok = IsOk
4101 def GetBackgroundMode(*args, **kwargs):
4102 """
4103 GetBackgroundMode(self) -> int
4104
4105 Returns the current background mode, either ``wx.SOLID`` or
4106 ``wx.TRANSPARENT``.
4107
4108 :see: `SetBackgroundMode`
4109 """
4110 return _gdi_.DC_GetBackgroundMode(*args, **kwargs)
4111
4112 def GetBackground(*args, **kwargs):
4113 """
4114 GetBackground(self) -> Brush
4115
4116 Gets the brush used for painting the background.
4117
4118 :see: `SetBackground`
4119 """
4120 return _gdi_.DC_GetBackground(*args, **kwargs)
4121
4122 def GetBrush(*args, **kwargs):
4123 """
4124 GetBrush(self) -> Brush
4125
4126 Gets the current brush
4127 """
4128 return _gdi_.DC_GetBrush(*args, **kwargs)
4129
4130 def GetFont(*args, **kwargs):
4131 """
4132 GetFont(self) -> Font
4133
4134 Gets the current font
4135 """
4136 return _gdi_.DC_GetFont(*args, **kwargs)
4137
4138 def GetPen(*args, **kwargs):
4139 """
4140 GetPen(self) -> Pen
4141
4142 Gets the current pen
4143 """
4144 return _gdi_.DC_GetPen(*args, **kwargs)
4145
4146 def GetTextBackground(*args, **kwargs):
4147 """
4148 GetTextBackground(self) -> Colour
4149
4150 Gets the current text background colour
4151 """
4152 return _gdi_.DC_GetTextBackground(*args, **kwargs)
4153
4154 def GetTextForeground(*args, **kwargs):
4155 """
4156 GetTextForeground(self) -> Colour
4157
4158 Gets the current text foreground colour
4159 """
4160 return _gdi_.DC_GetTextForeground(*args, **kwargs)
4161
4162 def SetTextForeground(*args, **kwargs):
4163 """
4164 SetTextForeground(self, Colour colour)
4165
4166 Sets the current text foreground colour for the DC.
4167 """
4168 return _gdi_.DC_SetTextForeground(*args, **kwargs)
4169
4170 def SetTextBackground(*args, **kwargs):
4171 """
4172 SetTextBackground(self, Colour colour)
4173
4174 Sets the current text background colour for the DC.
4175 """
4176 return _gdi_.DC_SetTextBackground(*args, **kwargs)
4177
4178 def GetMapMode(*args, **kwargs):
4179 """
4180 GetMapMode(self) -> int
4181
4182 Gets the current *mapping mode* for the device context
4183 """
4184 return _gdi_.DC_GetMapMode(*args, **kwargs)
4185
4186 def SetMapMode(*args, **kwargs):
4187 """
4188 SetMapMode(self, int mode)
4189
4190 The *mapping mode* of the device context defines the unit of
4191 measurement used to convert logical units to device units. The
4192 mapping mode can be one of the following:
4193
4194 ================ =============================================
4195 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
4196 of an inch.
4197 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
4198 wx.MM_METRIC Each logical unit is 1 mm.
4199 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
4200 wx.MM_TEXT Each logical unit is 1 pixel.
4201 ================ =============================================
4202
4203 Note that in X, text drawing isn't handled consistently with the
4204 mapping mode; a font is always specified in point size. However,
4205 setting the user scale (see `SetUserScale`) scales the text
4206 appropriately. In Windows, scalable TrueType fonts are always used; in
4207 X, results depend on availability of fonts, but usually a reasonable
4208 match is found.
4209
4210 The coordinate origin is always at the top left of the screen/printer.
4211
4212 Drawing to a Windows printer device context uses the current mapping
4213 mode, but mapping mode is currently ignored for PostScript output.
4214
4215 """
4216 return _gdi_.DC_SetMapMode(*args, **kwargs)
4217
4218 def GetUserScale(*args, **kwargs):
4219 """
4220 GetUserScale(self) -> (xScale, yScale)
4221
4222 Gets the current user scale factor (set by `SetUserScale`).
4223 """
4224 return _gdi_.DC_GetUserScale(*args, **kwargs)
4225
4226 def SetUserScale(*args, **kwargs):
4227 """
4228 SetUserScale(self, double x, double y)
4229
4230 Sets the user scaling factor, useful for applications which require
4231 'zooming'.
4232 """
4233 return _gdi_.DC_SetUserScale(*args, **kwargs)
4234
4235 def GetLogicalScale(*args, **kwargs):
4236 """GetLogicalScale() -> (xScale, yScale)"""
4237 return _gdi_.DC_GetLogicalScale(*args, **kwargs)
4238
4239 def SetLogicalScale(*args, **kwargs):
4240 """SetLogicalScale(self, double x, double y)"""
4241 return _gdi_.DC_SetLogicalScale(*args, **kwargs)
4242
4243 def GetLogicalOrigin(*args, **kwargs):
4244 """GetLogicalOrigin(self) -> Point"""
4245 return _gdi_.DC_GetLogicalOrigin(*args, **kwargs)
4246
4247 def GetLogicalOriginTuple(*args, **kwargs):
4248 """GetLogicalOriginTuple() -> (x,y)"""
4249 return _gdi_.DC_GetLogicalOriginTuple(*args, **kwargs)
4250
4251 def SetLogicalOrigin(*args, **kwargs):
4252 """SetLogicalOrigin(self, int x, int y)"""
4253 return _gdi_.DC_SetLogicalOrigin(*args, **kwargs)
4254
4255 def SetLogicalOriginPoint(*args, **kwargs):
4256 """SetLogicalOriginPoint(self, Point point)"""
4257 return _gdi_.DC_SetLogicalOriginPoint(*args, **kwargs)
4258
4259 def GetDeviceOrigin(*args, **kwargs):
4260 """GetDeviceOrigin(self) -> Point"""
4261 return _gdi_.DC_GetDeviceOrigin(*args, **kwargs)
4262
4263 def GetDeviceOriginTuple(*args, **kwargs):
4264 """GetDeviceOriginTuple() -> (x,y)"""
4265 return _gdi_.DC_GetDeviceOriginTuple(*args, **kwargs)
4266
4267 def SetDeviceOrigin(*args, **kwargs):
4268 """SetDeviceOrigin(self, int x, int y)"""
4269 return _gdi_.DC_SetDeviceOrigin(*args, **kwargs)
4270
4271 def SetDeviceOriginPoint(*args, **kwargs):
4272 """SetDeviceOriginPoint(self, Point point)"""
4273 return _gdi_.DC_SetDeviceOriginPoint(*args, **kwargs)
4274
4275 def SetAxisOrientation(*args, **kwargs):
4276 """
4277 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
4278
4279 Sets the x and y axis orientation (i.e., the direction from lowest to
4280 highest values on the axis). The default orientation is the natural
4281 orientation, e.g. x axis from left to right and y axis from bottom up.
4282 """
4283 return _gdi_.DC_SetAxisOrientation(*args, **kwargs)
4284
4285 def GetLogicalFunction(*args, **kwargs):
4286 """
4287 GetLogicalFunction(self) -> int
4288
4289 Gets the current logical function (set by `SetLogicalFunction`).
4290 """
4291 return _gdi_.DC_GetLogicalFunction(*args, **kwargs)
4292
4293 def SetLogicalFunction(*args, **kwargs):
4294 """
4295 SetLogicalFunction(self, int function)
4296
4297 Sets the current logical function for the device context. This
4298 determines how a source pixel (from a pen or brush colour, or source
4299 device context if using `Blit`) combines with a destination pixel in
4300 the current device context.
4301
4302 The possible values and their meaning in terms of source and
4303 destination pixel values are as follows:
4304
4305 ================ ==========================
4306 wx.AND src AND dst
4307 wx.AND_INVERT (NOT src) AND dst
4308 wx.AND_REVERSE src AND (NOT dst)
4309 wx.CLEAR 0
4310 wx.COPY src
4311 wx.EQUIV (NOT src) XOR dst
4312 wx.INVERT NOT dst
4313 wx.NAND (NOT src) OR (NOT dst)
4314 wx.NOR (NOT src) AND (NOT dst)
4315 wx.NO_OP dst
4316 wx.OR src OR dst
4317 wx.OR_INVERT (NOT src) OR dst
4318 wx.OR_REVERSE src OR (NOT dst)
4319 wx.SET 1
4320 wx.SRC_INVERT NOT src
4321 wx.XOR src XOR dst
4322 ================ ==========================
4323
4324 The default is wx.COPY, which simply draws with the current
4325 colour. The others combine the current colour and the background using
4326 a logical operation. wx.INVERT is commonly used for drawing rubber
4327 bands or moving outlines, since drawing twice reverts to the original
4328 colour.
4329
4330 """
4331 return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
4332
4333 def ComputeScaleAndOrigin(*args, **kwargs):
4334 """
4335 ComputeScaleAndOrigin(self)
4336
4337 Performs all necessary computations for given platform and context
4338 type after each change of scale and origin parameters. Usually called
4339 automatically internally after such changes.
4340
4341 """
4342 return _gdi_.DC_ComputeScaleAndOrigin(*args, **kwargs)
4343
4344 def SetOptimization(self, optimize):
4345 pass
4346 def GetOptimization(self):
4347 return False
4348
4349 SetOptimization = wx._deprecated(SetOptimization)
4350 GetOptimization = wx._deprecated(GetOptimization)
4351
4352 def CalcBoundingBox(*args, **kwargs):
4353 """
4354 CalcBoundingBox(self, int x, int y)
4355
4356 Adds the specified point to the bounding box which can be retrieved
4357 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4358 """
4359 return _gdi_.DC_CalcBoundingBox(*args, **kwargs)
4360
4361 def CalcBoundingBoxPoint(*args, **kwargs):
4362 """
4363 CalcBoundingBoxPoint(self, Point point)
4364
4365 Adds the specified point to the bounding box which can be retrieved
4366 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4367 """
4368 return _gdi_.DC_CalcBoundingBoxPoint(*args, **kwargs)
4369
4370 def ResetBoundingBox(*args, **kwargs):
4371 """
4372 ResetBoundingBox(self)
4373
4374 Resets the bounding box: after a call to this function, the bounding
4375 box doesn't contain anything.
4376 """
4377 return _gdi_.DC_ResetBoundingBox(*args, **kwargs)
4378
4379 def MinX(*args, **kwargs):
4380 """
4381 MinX(self) -> int
4382
4383 Gets the minimum horizontal extent used in drawing commands so far.
4384 """
4385 return _gdi_.DC_MinX(*args, **kwargs)
4386
4387 def MaxX(*args, **kwargs):
4388 """
4389 MaxX(self) -> int
4390
4391 Gets the maximum horizontal extent used in drawing commands so far.
4392 """
4393 return _gdi_.DC_MaxX(*args, **kwargs)
4394
4395 def MinY(*args, **kwargs):
4396 """
4397 MinY(self) -> int
4398
4399 Gets the minimum vertical extent used in drawing commands so far.
4400 """
4401 return _gdi_.DC_MinY(*args, **kwargs)
4402
4403 def MaxY(*args, **kwargs):
4404 """
4405 MaxY(self) -> int
4406
4407 Gets the maximum vertical extent used in drawing commands so far.
4408 """
4409 return _gdi_.DC_MaxY(*args, **kwargs)
4410
4411 def GetBoundingBox(*args, **kwargs):
4412 """
4413 GetBoundingBox() -> (x1,y1, x2,y2)
4414
4415 Returns the min and max points used in drawing commands so far.
4416 """
4417 return _gdi_.DC_GetBoundingBox(*args, **kwargs)
4418
4419 def __nonzero__(self): return self.IsOk()
4420 def GetLayoutDirection(*args, **kwargs):
4421 """
4422 GetLayoutDirection(self) -> int
4423
4424 Get the layout direction (LTR or RTL)_ for this dc. On platforms
4425 where RTL layout is supported, the return value will either be
4426 ``wx.Layout_LeftToRight`` or ``wx.Layout_RightToLeft``.
4427 ``wx.Layout_Default`` is returned if layout direction is not
4428 supported.
4429 """
4430 return _gdi_.DC_GetLayoutDirection(*args, **kwargs)
4431
4432 def SetLayoutDirection(*args, **kwargs):
4433 """
4434 SetLayoutDirection(self, int dir)
4435
4436 Change the layout direction for this dc.
4437 """
4438 return _gdi_.DC_SetLayoutDirection(*args, **kwargs)
4439
4440 def _DrawPointList(*args, **kwargs):
4441 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4442 return _gdi_.DC__DrawPointList(*args, **kwargs)
4443
4444 def _DrawLineList(*args, **kwargs):
4445 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4446 return _gdi_.DC__DrawLineList(*args, **kwargs)
4447
4448 def _DrawRectangleList(*args, **kwargs):
4449 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4450 return _gdi_.DC__DrawRectangleList(*args, **kwargs)
4451
4452 def _DrawEllipseList(*args, **kwargs):
4453 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4454 return _gdi_.DC__DrawEllipseList(*args, **kwargs)
4455
4456 def _DrawPolygonList(*args, **kwargs):
4457 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4458 return _gdi_.DC__DrawPolygonList(*args, **kwargs)
4459
4460 def _DrawTextList(*args, **kwargs):
4461 """
4462 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4463 PyObject backgroundList) -> PyObject
4464 """
4465 return _gdi_.DC__DrawTextList(*args, **kwargs)
4466
4467 def DrawPointList(self, points, pens=None):
4468 """
4469 Draw a list of points as quickly as possible.
4470
4471 :param points: A sequence of 2-element sequences representing
4472 each point to draw, (x,y).
4473 :param pens: If None, then the current pen is used. If a
4474 single pen then it will be used for all points. If
4475 a list of pens then there should be one for each point
4476 in points.
4477 """
4478 if pens is None:
4479 pens = []
4480 elif isinstance(pens, wx.Pen):
4481 pens = [pens]
4482 elif len(pens) != len(points):
4483 raise ValueError('points and pens must have same length')
4484 return self._DrawPointList(points, pens, [])
4485
4486
4487 def DrawLineList(self, lines, pens=None):
4488 """
4489 Draw a list of lines as quickly as possible.
4490
4491 :param lines: A sequence of 4-element sequences representing
4492 each line to draw, (x1,y1, x2,y2).
4493 :param pens: If None, then the current pen is used. If a
4494 single pen then it will be used for all lines. If
4495 a list of pens then there should be one for each line
4496 in lines.
4497 """
4498 if pens is None:
4499 pens = []
4500 elif isinstance(pens, wx.Pen):
4501 pens = [pens]
4502 elif len(pens) != len(lines):
4503 raise ValueError('lines and pens must have same length')
4504 return self._DrawLineList(lines, pens, [])
4505
4506
4507 def DrawRectangleList(self, rectangles, pens=None, brushes=None):
4508 """
4509 Draw a list of rectangles as quickly as possible.
4510
4511 :param rectangles: A sequence of 4-element sequences representing
4512 each rectangle to draw, (x,y, w,h).
4513 :param pens: If None, then the current pen is used. If a
4514 single pen then it will be used for all rectangles.
4515 If a list of pens then there should be one for each
4516 rectangle in rectangles.
4517 :param brushes: A brush or brushes to be used to fill the rectagles,
4518 with similar semantics as the pens parameter.
4519 """
4520 if pens is None:
4521 pens = []
4522 elif isinstance(pens, wx.Pen):
4523 pens = [pens]
4524 elif len(pens) != len(rectangles):
4525 raise ValueError('rectangles and pens must have same length')
4526 if brushes is None:
4527 brushes = []
4528 elif isinstance(brushes, wx.Brush):
4529 brushes = [brushes]
4530 elif len(brushes) != len(rectangles):
4531 raise ValueError('rectangles and brushes must have same length')
4532 return self._DrawRectangleList(rectangles, pens, brushes)
4533
4534
4535 def DrawEllipseList(self, ellipses, pens=None, brushes=None):
4536 """
4537 Draw a list of ellipses as quickly as possible.
4538
4539 :param ellipses: A sequence of 4-element sequences representing
4540 each ellipse to draw, (x,y, w,h).
4541 :param pens: If None, then the current pen is used. If a
4542 single pen then it will be used for all ellipses.
4543 If a list of pens then there should be one for each
4544 ellipse in ellipses.
4545 :param brushes: A brush or brushes to be used to fill the ellipses,
4546 with similar semantics as the pens parameter.
4547 """
4548 if pens is None:
4549 pens = []
4550 elif isinstance(pens, wx.Pen):
4551 pens = [pens]
4552 elif len(pens) != len(ellipses):
4553 raise ValueError('ellipses and pens must have same length')
4554 if brushes is None:
4555 brushes = []
4556 elif isinstance(brushes, wx.Brush):
4557 brushes = [brushes]
4558 elif len(brushes) != len(ellipses):
4559 raise ValueError('ellipses and brushes must have same length')
4560 return self._DrawEllipseList(ellipses, pens, brushes)
4561
4562
4563 def DrawPolygonList(self, polygons, pens=None, brushes=None):
4564 """
4565 Draw a list of polygons, each of which is a list of points.
4566
4567 :param polygons: A sequence of sequences of sequences.
4568 [[(x1,y1),(x2,y2),(x3,y3)...],
4569 [(x1,y1),(x2,y2),(x3,y3)...]]
4570
4571 :param pens: If None, then the current pen is used. If a
4572 single pen then it will be used for all polygons.
4573 If a list of pens then there should be one for each
4574 polygon.
4575 :param brushes: A brush or brushes to be used to fill the polygons,
4576 with similar semantics as the pens parameter.
4577 """
4578 if pens is None:
4579 pens = []
4580 elif isinstance(pens, wx.Pen):
4581 pens = [pens]
4582 elif len(pens) != len(polygons):
4583 raise ValueError('polygons and pens must have same length')
4584 if brushes is None:
4585 brushes = []
4586 elif isinstance(brushes, wx.Brush):
4587 brushes = [brushes]
4588 elif len(brushes) != len(polygons):
4589 raise ValueError('polygons and brushes must have same length')
4590 return self._DrawPolygonList(polygons, pens, brushes)
4591
4592
4593 def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None):
4594 """
4595 Draw a list of strings using a list of coordinants for positioning each string.
4596
4597 :param textList: A list of strings
4598 :param coords: A list of (x,y) positions
4599 :param foregrounds: A list of `wx.Colour` objects to use for the
4600 foregrounds of the strings.
4601 :param backgrounds: A list of `wx.Colour` objects to use for the
4602 backgrounds of the strings.
4603
4604 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4605 If you want backgrounds to do anything.
4606 """
4607 if type(textList) == type(''):
4608 textList = [textList]
4609 elif len(textList) != len(coords):
4610 raise ValueError('textlist and coords must have same length')
4611 if foregrounds is None:
4612 foregrounds = []
4613 elif isinstance(foregrounds, wx.Colour):
4614 foregrounds = [foregrounds]
4615 elif len(foregrounds) != len(coords):
4616 raise ValueError('foregrounds and coords must have same length')
4617 if backgrounds is None:
4618 backgrounds = []
4619 elif isinstance(backgrounds, wx.Colour):
4620 backgrounds = [backgrounds]
4621 elif len(backgrounds) != len(coords):
4622 raise ValueError('backgrounds and coords must have same length')
4623 return self._DrawTextList(textList, coords, foregrounds, backgrounds)
4624
4625 Background = property(GetBackground,SetBackground,doc="See `GetBackground` and `SetBackground`")
4626 BackgroundMode = property(GetBackgroundMode,SetBackgroundMode,doc="See `GetBackgroundMode` and `SetBackgroundMode`")
4627 BoundingBox = property(GetBoundingBox,doc="See `GetBoundingBox`")
4628 Brush = property(GetBrush,SetBrush,doc="See `GetBrush` and `SetBrush`")
4629 CharHeight = property(GetCharHeight,doc="See `GetCharHeight`")
4630 CharWidth = property(GetCharWidth,doc="See `GetCharWidth`")
4631 ClippingBox = property(GetClippingBox,doc="See `GetClippingBox`")
4632 ClippingRect = property(GetClippingRect,SetClippingRect,doc="See `GetClippingRect` and `SetClippingRect`")
4633 Depth = property(GetDepth,doc="See `GetDepth`")
4634 DeviceOrigin = property(GetDeviceOrigin,SetDeviceOrigin,doc="See `GetDeviceOrigin` and `SetDeviceOrigin`")
4635 Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`")
4636 FullTextExtent = property(GetFullTextExtent,doc="See `GetFullTextExtent`")
4637 LogicalFunction = property(GetLogicalFunction,SetLogicalFunction,doc="See `GetLogicalFunction` and `SetLogicalFunction`")
4638 LogicalOrigin = property(GetLogicalOrigin,SetLogicalOrigin,doc="See `GetLogicalOrigin` and `SetLogicalOrigin`")
4639 LogicalScale = property(GetLogicalScale,SetLogicalScale,doc="See `GetLogicalScale` and `SetLogicalScale`")
4640 MapMode = property(GetMapMode,SetMapMode,doc="See `GetMapMode` and `SetMapMode`")
4641 MultiLineTextExtent = property(GetMultiLineTextExtent,doc="See `GetMultiLineTextExtent`")
4642 Optimization = property(GetOptimization,SetOptimization,doc="See `GetOptimization` and `SetOptimization`")
4643 PPI = property(GetPPI,doc="See `GetPPI`")
4644 PartialTextExtents = property(GetPartialTextExtents,doc="See `GetPartialTextExtents`")
4645 Pen = property(GetPen,SetPen,doc="See `GetPen` and `SetPen`")
4646 Pixel = property(GetPixel,doc="See `GetPixel`")
4647 PixelPoint = property(GetPixelPoint,doc="See `GetPixelPoint`")
4648 Size = property(GetSize,doc="See `GetSize`")
4649 SizeMM = property(GetSizeMM,doc="See `GetSizeMM`")
4650 TextBackground = property(GetTextBackground,SetTextBackground,doc="See `GetTextBackground` and `SetTextBackground`")
4651 TextExtent = property(GetTextExtent,doc="See `GetTextExtent`")
4652 TextForeground = property(GetTextForeground,SetTextForeground,doc="See `GetTextForeground` and `SetTextForeground`")
4653 UserScale = property(GetUserScale,SetUserScale,doc="See `GetUserScale` and `SetUserScale`")
4654 LayoutDirection = property(GetLayoutDirection,SetLayoutDirection)
4655 _gdi_.DC_swigregister(DC)
4656
4657 #---------------------------------------------------------------------------
4658
4659 class MemoryDC(DC):
4660 """
4661 A memory device context provides a means to draw graphics onto a
4662 bitmap. A bitmap must be selected into the new memory DC before it may
4663 be used for anything. Typical usage is as follows::
4664
4665 dc = wx.MemoryDC()
4666 dc.SelectObject(bitmap)
4667 # draw on the dc using any of the Draw methods
4668 dc.SelectObject(wx.NullBitmap)
4669 # the bitmap now contains wahtever was drawn upon it
4670
4671 Note that the memory DC *must* be deleted (or the bitmap selected out
4672 of it) before a bitmap can be reselected into another memory DC.
4673
4674 """
4675 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4676 __repr__ = _swig_repr
4677 def __init__(self, *args, **kwargs):
4678 """
4679 __init__(self, Bitmap bitmap=NullBitmap) -> MemoryDC
4680
4681 Constructs a new memory device context.
4682
4683 Use the Ok member to test whether the constructor was successful in
4684 creating a usable device context. If a bitmap is not given to this
4685 constructor then don't forget to select a bitmap into the DC before
4686 drawing on it.
4687
4688 :see: `MemoryDCFromDC`
4689 """
4690 _gdi_.MemoryDC_swiginit(self,_gdi_.new_MemoryDC(*args, **kwargs))
4691 def SelectObject(*args, **kwargs):
4692 """
4693 SelectObject(self, Bitmap bitmap)
4694
4695 Selects the bitmap into the device context, to use as the memory
4696 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4697 the DC, and therefore the bitmap, and also to use Blit to copy the
4698 bitmap to a window.
4699
4700 If the argument is wx.NullBitmap (or some other uninitialised
4701 `wx.Bitmap`) the current bitmap is selected out of the device context,
4702 and the original bitmap restored, allowing the current bitmap to be
4703 destroyed safely.
4704 """
4705 return _gdi_.MemoryDC_SelectObject(*args, **kwargs)
4706
4707 _gdi_.MemoryDC_swigregister(MemoryDC)
4708
4709 def MemoryDCFromDC(*args, **kwargs):
4710 """
4711 MemoryDCFromDC(DC oldDC) -> MemoryDC
4712
4713 Creates a DC that is compatible with the oldDC.
4714 """
4715 val = _gdi_.new_MemoryDCFromDC(*args, **kwargs)
4716 return val
4717
4718 #---------------------------------------------------------------------------
4719
4720 class ScreenDC(DC):
4721 """
4722 A wxScreenDC can be used to paint anywhere on the screen. This should
4723 normally be constructed as a temporary stack object; don't store a
4724 wxScreenDC object.
4725
4726 """
4727 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4728 __repr__ = _swig_repr
4729 def __init__(self, *args, **kwargs):
4730 """
4731 __init__(self) -> ScreenDC
4732
4733 A wxScreenDC can be used to paint anywhere on the screen. This should
4734 normally be constructed as a temporary stack object; don't store a
4735 wxScreenDC object.
4736
4737 """
4738 _gdi_.ScreenDC_swiginit(self,_gdi_.new_ScreenDC(*args, **kwargs))
4739 def StartDrawingOnTopWin(*args, **kwargs):
4740 """
4741 StartDrawingOnTopWin(self, Window window) -> bool
4742
4743 Specify that the area of the screen to be drawn upon coincides with
4744 the given window.
4745
4746 :see: `EndDrawingOnTop`
4747 """
4748 return _gdi_.ScreenDC_StartDrawingOnTopWin(*args, **kwargs)
4749
4750 def StartDrawingOnTop(*args, **kwargs):
4751 """
4752 StartDrawingOnTop(self, Rect rect=None) -> bool
4753
4754 Specify that the area is the given rectangle, or the whole screen if
4755 ``None`` is passed.
4756
4757 :see: `EndDrawingOnTop`
4758 """
4759 return _gdi_.ScreenDC_StartDrawingOnTop(*args, **kwargs)
4760
4761 def EndDrawingOnTop(*args, **kwargs):
4762 """
4763 EndDrawingOnTop(self) -> bool
4764
4765 Use this in conjunction with `StartDrawingOnTop` or
4766 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4767 top of existing windows. Without this, some window systems (such as X)
4768 only allow drawing to take place underneath other windows.
4769
4770 You might use this pair of functions when implementing a drag feature,
4771 for example as in the `wx.SplitterWindow` implementation.
4772
4773 These functions are probably obsolete since the X implementations
4774 allow drawing directly on the screen now. However, the fact that this
4775 function allows the screen to be refreshed afterwards may be useful
4776 to some applications.
4777 """
4778 return _gdi_.ScreenDC_EndDrawingOnTop(*args, **kwargs)
4779
4780 _gdi_.ScreenDC_swigregister(ScreenDC)
4781
4782 #---------------------------------------------------------------------------
4783
4784 class WindowDC(DC):
4785 """
4786 A wx.WindowDC must be constructed if an application wishes to paint on
4787 the whole area of a window (client and decorations). This should
4788 normally be constructed as a temporary stack object; don't store a
4789 wx.WindowDC object.
4790 """
4791 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4792 __repr__ = _swig_repr
4793 def __init__(self, *args, **kwargs):
4794 """
4795 __init__(self, Window win) -> WindowDC
4796
4797 Constructor. Pass the window on which you wish to paint.
4798 """
4799 _gdi_.WindowDC_swiginit(self,_gdi_.new_WindowDC(*args, **kwargs))
4800 _gdi_.WindowDC_swigregister(WindowDC)
4801
4802 #---------------------------------------------------------------------------
4803
4804 class ClientDC(WindowDC):
4805 """
4806 A wx.ClientDC must be constructed if an application wishes to paint on
4807 the client area of a window from outside an EVT_PAINT event. This should
4808 normally be constructed as a temporary stack object; don't store a
4809 wx.ClientDC object long term.
4810
4811 To draw on a window from within an EVT_PAINT handler, construct a
4812 `wx.PaintDC` object.
4813
4814 To draw on the whole window including decorations, construct a
4815 `wx.WindowDC` object (Windows only).
4816
4817 """
4818 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4819 __repr__ = _swig_repr
4820 def __init__(self, *args, **kwargs):
4821 """
4822 __init__(self, Window win) -> ClientDC
4823
4824 Constructor. Pass the window on which you wish to paint.
4825 """
4826 _gdi_.ClientDC_swiginit(self,_gdi_.new_ClientDC(*args, **kwargs))
4827 _gdi_.ClientDC_swigregister(ClientDC)
4828
4829 #---------------------------------------------------------------------------
4830
4831 class PaintDC(ClientDC):
4832 """
4833 A wx.PaintDC must be constructed if an application wishes to paint on
4834 the client area of a window from within an EVT_PAINT event
4835 handler. This should normally be constructed as a temporary stack
4836 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4837 handler, you **must** create a wx.PaintDC object within it even if you
4838 don't actually use it.
4839
4840 Using wx.PaintDC within EVT_PAINT handlers is important because it
4841 automatically sets the clipping area to the damaged area of the
4842 window. Attempts to draw outside this area do not appear.
4843
4844 To draw on a window from outside EVT_PAINT handlers, construct a
4845 `wx.ClientDC` object.
4846
4847 """
4848 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4849 __repr__ = _swig_repr
4850 def __init__(self, *args, **kwargs):
4851 """
4852 __init__(self, Window win) -> PaintDC
4853
4854 Constructor. Pass the window on which you wish to paint.
4855 """
4856 _gdi_.PaintDC_swiginit(self,_gdi_.new_PaintDC(*args, **kwargs))
4857 _gdi_.PaintDC_swigregister(PaintDC)
4858
4859 #---------------------------------------------------------------------------
4860
4861 BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
4862 BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
4863 class BufferedDC(MemoryDC):
4864 """
4865 This simple class provides a simple way to avoid flicker: when drawing
4866 on it, everything is in fact first drawn on an in-memory buffer (a
4867 `wx.Bitmap`) and then copied to the screen only once, when this object
4868 is destroyed.
4869
4870 It can be used in the same way as any other device context.
4871 wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to
4872 use it in your EVT_PAINT handler, you should look at
4873 `wx.BufferedPaintDC`.
4874
4875 Please note that GTK+ 2.0 and OS X provide double buffering themselves
4876 natively. wxBufferedDC is aware of this however, and will bypass the buffering
4877 unless an explicit buffer bitmap is given.
4878
4879 """
4880 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4881 __repr__ = _swig_repr
4882 def __init__(self, *args):
4883 """
4884 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4885 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4886
4887 Constructs a buffered DC.
4888
4889 :param dc: The underlying DC: everything drawn to this object will
4890 be flushed to this DC when this object is destroyed. You may
4891 pass ``None`` in order to just initialize the buffer, and not
4892 flush it.
4893
4894 :param buffer: If a `wx.Size` object is passed as the 2nd arg then
4895 it is the size of the bitmap that will be created internally
4896 and used for an implicit buffer. If the 2nd arg is a
4897 `wx.Bitmap` then it is the explicit buffer that will be
4898 used. Using an explicit buffer is the most efficient solution
4899 as the bitmap doesn't have to be recreated each time but it
4900 also requires more memory as the bitmap is never freed. The
4901 bitmap should have appropriate size, anything drawn outside of
4902 its bounds is clipped. If wx.NullBitmap is used then a new
4903 buffer will be allocated that is the same size as the dc.
4904
4905 :param style: The style parameter indicates whether the supplied buffer is
4906 intended to cover the entire virtual size of a `wx.ScrolledWindow` or
4907 if it only covers the client area. Acceptable values are
4908 ``wx.BUFFER_VIRTUAL_AREA`` and ``wx.BUFFER_CLIENT_AREA``.
4909
4910
4911 """
4912 _gdi_.BufferedDC_swiginit(self,_gdi_.new_BufferedDC(*args))
4913 self.__dc = args[0] # save a ref so the other dc will not be deleted before self
4914
4915 __swig_destroy__ = _gdi_.delete_BufferedDC
4916 __del__ = lambda self : None;
4917 def UnMask(*args, **kwargs):
4918 """
4919 UnMask(self)
4920
4921 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4922 can be effectively used once only). This is usually only called in
4923 the destructor.
4924 """
4925 return _gdi_.BufferedDC_UnMask(*args, **kwargs)
4926
4927 _gdi_.BufferedDC_swigregister(BufferedDC)
4928
4929 class BufferedPaintDC(BufferedDC):
4930 """
4931 This is a subclass of `wx.BufferedDC` which can be used inside of an
4932 EVT_PAINT event handler. Just create an object of this class instead
4933 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4934 flicker. The only thing to watch out for is that if you are using this
4935 class together with `wx.ScrolledWindow`, you probably do **not** want
4936 to call `wx.Window.PrepareDC` on it as it already does this internally
4937 for the real underlying `wx.PaintDC`.
4938
4939 If your window is already fully buffered in a `wx.Bitmap` then your
4940 EVT_PAINT handler can be as simple as just creating a
4941 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4942 automatically when it is destroyed. For example::
4943
4944 def OnPaint(self, event):
4945 dc = wx.BufferedPaintDC(self, self.buffer)
4946
4947
4948
4949 """
4950 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4951 __repr__ = _swig_repr
4952 def __init__(self, *args, **kwargs):
4953 """
4954 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4955
4956 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4957 provide the bitmap to be used for buffering or let this object create
4958 one internally (in the latter case, the size of the client part of the
4959 window is automatically used).
4960 """
4961 _gdi_.BufferedPaintDC_swiginit(self,_gdi_.new_BufferedPaintDC(*args, **kwargs))
4962 _gdi_.BufferedPaintDC_swigregister(BufferedPaintDC)
4963
4964 #---------------------------------------------------------------------------
4965
4966 class AutoBufferedPaintDC(DC):
4967 """
4968 If the current platform double buffers by default then this DC is the
4969 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
4970
4971 :see: `wx.AutoBufferedPaintDCFactory`
4972
4973 """
4974 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4975 __repr__ = _swig_repr
4976 def __init__(self, *args, **kwargs):
4977 """
4978 __init__(self, Window win) -> AutoBufferedPaintDC
4979
4980 If the current platform double buffers by default then this DC is the
4981 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
4982
4983 :see: `wx.AutoBufferedPaintDCFactory`
4984
4985 """
4986 _gdi_.AutoBufferedPaintDC_swiginit(self,_gdi_.new_AutoBufferedPaintDC(*args, **kwargs))
4987 _gdi_.AutoBufferedPaintDC_swigregister(AutoBufferedPaintDC)
4988
4989
4990 def AutoBufferedPaintDCFactory(*args, **kwargs):
4991 """
4992 AutoBufferedPaintDCFactory(Window window) -> DC
4993
4994 Checks if the window is natively double buffered and will return a
4995 `wx.PaintDC` if it is, a `wx.BufferedPaintDC` otherwise. The advantage of
4996 this function over `wx.AutoBufferedPaintDC` is that this function will check
4997 if the the specified window has double-buffering enabled rather than just
4998 going by platform defaults.
4999 """
5000 return _gdi_.AutoBufferedPaintDCFactory(*args, **kwargs)
5001 #---------------------------------------------------------------------------
5002
5003 class MirrorDC(DC):
5004 """
5005 wx.MirrorDC is a simple wrapper class which is always associated with a
5006 real `wx.DC` object and either forwards all of its operations to it
5007 without changes (no mirroring takes place) or exchanges x and y
5008 coordinates which makes it possible to reuse the same code to draw a
5009 figure and its mirror -- i.e. reflection related to the diagonal line
5010 x == y.
5011 """
5012 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5013 __repr__ = _swig_repr
5014 def __init__(self, *args, **kwargs):
5015 """
5016 __init__(self, DC dc, bool mirror) -> MirrorDC
5017
5018 Creates a mirrored DC associated with the real *dc*. Everything drawn
5019 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
5020 *mirror* is True.
5021 """
5022 _gdi_.MirrorDC_swiginit(self,_gdi_.new_MirrorDC(*args, **kwargs))
5023 _gdi_.MirrorDC_swigregister(MirrorDC)
5024
5025 #---------------------------------------------------------------------------
5026
5027 class PostScriptDC(DC):
5028 """This is a `wx.DC` that can write to PostScript files on any platform."""
5029 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5030 __repr__ = _swig_repr
5031 def __init__(self, *args, **kwargs):
5032 """
5033 __init__(self, wxPrintData printData) -> PostScriptDC
5034
5035 Constructs a PostScript printer device context from a `wx.PrintData`
5036 object.
5037 """
5038 _gdi_.PostScriptDC_swiginit(self,_gdi_.new_PostScriptDC(*args, **kwargs))
5039 def GetPrintData(*args, **kwargs):
5040 """GetPrintData(self) -> wxPrintData"""
5041 return _gdi_.PostScriptDC_GetPrintData(*args, **kwargs)
5042
5043 def SetPrintData(*args, **kwargs):
5044 """SetPrintData(self, wxPrintData data)"""
5045 return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs)
5046
5047 def SetResolution(*args, **kwargs):
5048 """
5049 SetResolution(int ppi)
5050
5051 Set resolution (in pixels per inch) that will be used in PostScript
5052 output. Default is 720ppi.
5053 """
5054 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
5055
5056 SetResolution = staticmethod(SetResolution)
5057 def GetResolution(*args, **kwargs):
5058 """
5059 GetResolution() -> int
5060
5061 Return resolution used in PostScript output.
5062 """
5063 return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
5064
5065 GetResolution = staticmethod(GetResolution)
5066 PrintData = property(GetPrintData,SetPrintData,doc="See `GetPrintData` and `SetPrintData`")
5067 _gdi_.PostScriptDC_swigregister(PostScriptDC)
5068
5069 def PostScriptDC_SetResolution(*args, **kwargs):
5070 """
5071 PostScriptDC_SetResolution(int ppi)
5072
5073 Set resolution (in pixels per inch) that will be used in PostScript
5074 output. Default is 720ppi.
5075 """
5076 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
5077
5078 def PostScriptDC_GetResolution(*args):
5079 """
5080 PostScriptDC_GetResolution() -> int
5081
5082 Return resolution used in PostScript output.
5083 """
5084 return _gdi_.PostScriptDC_GetResolution(*args)
5085
5086 #---------------------------------------------------------------------------
5087
5088 class MetaFile(_core.Object):
5089 """Proxy of C++ MetaFile class"""
5090 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5091 __repr__ = _swig_repr
5092 def __init__(self, *args, **kwargs):
5093 """__init__(self, String filename=EmptyString) -> MetaFile"""
5094 _gdi_.MetaFile_swiginit(self,_gdi_.new_MetaFile(*args, **kwargs))
5095 _gdi_.MetaFile_swigregister(MetaFile)
5096
5097 class MetaFileDC(DC):
5098 """Proxy of C++ MetaFileDC class"""
5099 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5100 __repr__ = _swig_repr
5101 def __init__(self, *args, **kwargs):
5102 """
5103 __init__(self, String filename=EmptyString, int width=0, int height=0,
5104 String description=EmptyString) -> MetaFileDC
5105 """
5106 _gdi_.MetaFileDC_swiginit(self,_gdi_.new_MetaFileDC(*args, **kwargs))
5107 _gdi_.MetaFileDC_swigregister(MetaFileDC)
5108
5109 class PrinterDC(DC):
5110 """Proxy of C++ PrinterDC class"""
5111 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5112 __repr__ = _swig_repr
5113 def __init__(self, *args, **kwargs):
5114 """__init__(self, wxPrintData printData) -> PrinterDC"""
5115 _gdi_.PrinterDC_swiginit(self,_gdi_.new_PrinterDC(*args, **kwargs))
5116 _gdi_.PrinterDC_swigregister(PrinterDC)
5117
5118 #---------------------------------------------------------------------------
5119
5120 class GraphicsPath(object):
5121 """Proxy of C++ GraphicsPath class"""
5122 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5123 def __init__(self): raise AttributeError, "No constructor defined"
5124 __repr__ = _swig_repr
5125 __swig_destroy__ = _gdi_.delete_GraphicsPath
5126 __del__ = lambda self : None;
5127 def MoveToPoint(*args, **kwargs):
5128 """
5129 MoveToPoint(self, Double x, Double y)
5130
5131 Begins a new subpath at (x,y)
5132 """
5133 return _gdi_.GraphicsPath_MoveToPoint(*args, **kwargs)
5134
5135 def AddLineToPoint(*args, **kwargs):
5136 """
5137 AddLineToPoint(self, Double x, Double y)
5138
5139 Adds a straight line from the current point to (x,y)
5140 """
5141 return _gdi_.GraphicsPath_AddLineToPoint(*args, **kwargs)
5142
5143 def AddCurveToPoint(*args, **kwargs):
5144 """
5145 AddCurveToPoint(self, Double cx1, Double cy1, Double cx2, Double cy2, Double x,
5146 Double y)
5147
5148 Adds a cubic Bezier curve from the current point, using two control
5149 points and an end point
5150 """
5151 return _gdi_.GraphicsPath_AddCurveToPoint(*args, **kwargs)
5152
5153 def CloseSubpath(*args, **kwargs):
5154 """
5155 CloseSubpath(self)
5156
5157 closes the current sub-path
5158 """
5159 return _gdi_.GraphicsPath_CloseSubpath(*args, **kwargs)
5160
5161 def GetCurrentPoint(*args, **kwargs):
5162 """
5163 GetCurrentPoint(self) -> Point2D
5164
5165 Gets the last point of the current path, (0,0) if not yet set
5166 """
5167 return _gdi_.GraphicsPath_GetCurrentPoint(*args, **kwargs)
5168
5169 def AddArc(*args, **kwargs):
5170 """
5171 AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle,
5172 bool clockwise)
5173
5174 Adds an arc of a circle centering at (x,y) with radius (r) from
5175 startAngle to endAngle
5176 """
5177 return _gdi_.GraphicsPath_AddArc(*args, **kwargs)
5178
5179 def AddQuadCurveToPoint(*args, **kwargs):
5180 """
5181 AddQuadCurveToPoint(self, Double cx, Double cy, Double x, Double y)
5182
5183 Adds a quadratic Bezier curve from the current point, using a control
5184 point and an end point
5185 """
5186 return _gdi_.GraphicsPath_AddQuadCurveToPoint(*args, **kwargs)
5187
5188 def AddRectangle(*args, **kwargs):
5189 """
5190 AddRectangle(self, Double x, Double y, Double w, Double h)
5191
5192 Appends a rectangle as a new closed subpath
5193 """
5194 return _gdi_.GraphicsPath_AddRectangle(*args, **kwargs)
5195
5196 def AddCircle(*args, **kwargs):
5197 """
5198 AddCircle(self, Double x, Double y, Double r)
5199
5200 Appends a circle as a new closed subpath with the given radius.
5201 """
5202 return _gdi_.GraphicsPath_AddCircle(*args, **kwargs)
5203
5204 def AddArcToPoint(*args, **kwargs):
5205 """
5206 AddArcToPoint(self, Double x1, Double y1, Double x2, Double y2, Double r)
5207
5208 Draws a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1)
5209 to (x2,y2), also a straight line from (current) to (x1,y1)
5210 """
5211 return _gdi_.GraphicsPath_AddArcToPoint(*args, **kwargs)
5212
5213 _gdi_.GraphicsPath_swigregister(GraphicsPath)
5214
5215 class GraphicsContext(object):
5216 """Proxy of C++ GraphicsContext class"""
5217 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5218 def __init__(self): raise AttributeError, "No constructor defined"
5219 __repr__ = _swig_repr
5220 __swig_destroy__ = _gdi_.delete_GraphicsContext
5221 __del__ = lambda self : None;
5222 def Create(*args, **kwargs):
5223 """Create(WindowDC dc) -> GraphicsContext"""
5224 val = _gdi_.GraphicsContext_Create(*args, **kwargs)
5225 val.__dc = args[0] # save a ref so the other dc will not be deleted before self
5226 return val
5227
5228 Create = staticmethod(Create)
5229 def CreatePath(*args, **kwargs):
5230 """CreatePath(self) -> GraphicsPath"""
5231 return _gdi_.GraphicsContext_CreatePath(*args, **kwargs)
5232
5233 def PushState(*args, **kwargs):
5234 """PushState(self)"""
5235 return _gdi_.GraphicsContext_PushState(*args, **kwargs)
5236
5237 def PopState(*args, **kwargs):
5238 """PopState(self)"""
5239 return _gdi_.GraphicsContext_PopState(*args, **kwargs)
5240
5241 def Clip(*args, **kwargs):
5242 """Clip(self, Region region)"""
5243 return _gdi_.GraphicsContext_Clip(*args, **kwargs)
5244
5245 def Translate(*args, **kwargs):
5246 """Translate(self, Double dx, Double dy)"""
5247 return _gdi_.GraphicsContext_Translate(*args, **kwargs)
5248
5249 def Scale(*args, **kwargs):
5250 """Scale(self, Double xScale, Double yScale)"""
5251 return _gdi_.GraphicsContext_Scale(*args, **kwargs)
5252
5253 def Rotate(*args, **kwargs):
5254 """Rotate(self, Double angle)"""
5255 return _gdi_.GraphicsContext_Rotate(*args, **kwargs)
5256
5257 def SetPen(*args, **kwargs):
5258 """SetPen(self, Pen pen)"""
5259 return _gdi_.GraphicsContext_SetPen(*args, **kwargs)
5260
5261 def SetBrush(*args, **kwargs):
5262 """SetBrush(self, Brush brush)"""
5263 return _gdi_.GraphicsContext_SetBrush(*args, **kwargs)
5264
5265 def SetLinearGradientBrush(*args, **kwargs):
5266 """
5267 SetLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, Colour c1,
5268 Colour c2)
5269 """
5270 return _gdi_.GraphicsContext_SetLinearGradientBrush(*args, **kwargs)
5271
5272 def SetRadialGradientBrush(*args, **kwargs):
5273 """
5274 SetRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
5275 Colour oColor, Colour cColor)
5276 """
5277 return _gdi_.GraphicsContext_SetRadialGradientBrush(*args, **kwargs)
5278
5279 def SetFont(*args, **kwargs):
5280 """SetFont(self, Font font)"""
5281 return _gdi_.GraphicsContext_SetFont(*args, **kwargs)
5282
5283 def SetTextColor(*args, **kwargs):
5284 """SetTextColor(self, Colour col)"""
5285 return _gdi_.GraphicsContext_SetTextColor(*args, **kwargs)
5286
5287 def StrokePath(*args, **kwargs):
5288 """StrokePath(self, GraphicsPath path)"""
5289 return _gdi_.GraphicsContext_StrokePath(*args, **kwargs)
5290
5291 def FillPath(*args, **kwargs):
5292 """FillPath(self, GraphicsPath path, int fillStyle=WINDING_RULE)"""
5293 return _gdi_.GraphicsContext_FillPath(*args, **kwargs)
5294
5295 def DrawPath(*args, **kwargs):
5296 """DrawPath(self, GraphicsPath path, int fillStyle=WINDING_RULE)"""
5297 return _gdi_.GraphicsContext_DrawPath(*args, **kwargs)
5298
5299 def DrawText(*args, **kwargs):
5300 """DrawText(self, String str, Double x, Double y)"""
5301 return _gdi_.GraphicsContext_DrawText(*args, **kwargs)
5302
5303 def DrawRotatedText(*args, **kwargs):
5304 """DrawRotatedText(self, String str, Double x, Double y, Double angle)"""
5305 return _gdi_.GraphicsContext_DrawRotatedText(*args, **kwargs)
5306
5307 def GetTextExtent(*args, **kwargs):
5308 """GetTextExtend(self, text) --> (width, height, descent, externalLeading)"""
5309 return _gdi_.GraphicsContext_GetTextExtent(*args, **kwargs)
5310
5311 def GetPartialTextExtents(*args, **kwargs):
5312 """GetPartialTextExtents(self, text) -> [widths]"""
5313 return _gdi_.GraphicsContext_GetPartialTextExtents(*args, **kwargs)
5314
5315 def DrawBitmap(*args, **kwargs):
5316 """DrawBitmap(self, Bitmap bmp, Double x, Double y, Double w, Double h)"""
5317 return _gdi_.GraphicsContext_DrawBitmap(*args, **kwargs)
5318
5319 def DrawIcon(*args, **kwargs):
5320 """DrawIcon(self, Icon icon, Double x, Double y, Double w, Double h)"""
5321 return _gdi_.GraphicsContext_DrawIcon(*args, **kwargs)
5322
5323 def StrokeLine(*args, **kwargs):
5324 """StrokeLine(self, Double x1, Double y1, Double x2, Double y2)"""
5325 return _gdi_.GraphicsContext_StrokeLine(*args, **kwargs)
5326
5327 def StrokeLines(*args, **kwargs):
5328 """StrokeLines(self, List points)"""
5329 return _gdi_.GraphicsContext_StrokeLines(*args, **kwargs)
5330
5331 def StrokeLineSegements(*args, **kwargs):
5332 """StrokeLineSegements(self, PyObject beginPoints, PyObject endPoints)"""
5333 return _gdi_.GraphicsContext_StrokeLineSegements(*args, **kwargs)
5334
5335 def DrawLines(*args, **kwargs):
5336 """DrawLines(self, size_t points, int fillStyle=WINDING_RULE)"""
5337 return _gdi_.GraphicsContext_DrawLines(*args, **kwargs)
5338
5339 def DrawRectangle(*args, **kwargs):
5340 """DrawRectangle(self, Double x, Double y, Double w, Double h)"""
5341 return _gdi_.GraphicsContext_DrawRectangle(*args, **kwargs)
5342
5343 def DrawEllipse(*args, **kwargs):
5344 """DrawEllipse(self, Double x, Double y, Double w, Double h)"""
5345 return _gdi_.GraphicsContext_DrawEllipse(*args, **kwargs)
5346
5347 def DrawRoundedRectangle(*args, **kwargs):
5348 """DrawRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)"""
5349 return _gdi_.GraphicsContext_DrawRoundedRectangle(*args, **kwargs)
5350
5351 _gdi_.GraphicsContext_swigregister(GraphicsContext)
5352
5353 def GraphicsContext_Create(*args, **kwargs):
5354 """GraphicsContext_Create(WindowDC dc) -> GraphicsContext"""
5355 val = _gdi_.GraphicsContext_Create(*args, **kwargs)
5356 val.__dc = args[0] # save a ref so the other dc will not be deleted before self
5357 return val
5358
5359 class GCDC(DC):
5360 """Proxy of C++ GCDC class"""
5361 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5362 __repr__ = _swig_repr
5363 def __init__(self, *args, **kwargs):
5364 """__init__(self, WindowDC dc) -> GCDC"""
5365 _gdi_.GCDC_swiginit(self,_gdi_.new_GCDC(*args, **kwargs))
5366 self.__dc = args[0] # save a ref so the other dc will not be deleted before self
5367
5368 __swig_destroy__ = _gdi_.delete_GCDC
5369 __del__ = lambda self : None;
5370 def GetGraphicContext(*args, **kwargs):
5371 """GetGraphicContext(self) -> GraphicsContext"""
5372 return _gdi_.GCDC_GetGraphicContext(*args, **kwargs)
5373
5374 _gdi_.GCDC_swigregister(GCDC)
5375
5376 class Overlay(object):
5377 """Proxy of C++ Overlay class"""
5378 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5379 __repr__ = _swig_repr
5380 def __init__(self, *args, **kwargs):
5381 """__init__(self) -> Overlay"""
5382 _gdi_.Overlay_swiginit(self,_gdi_.new_Overlay(*args, **kwargs))
5383 __swig_destroy__ = _gdi_.delete_Overlay
5384 __del__ = lambda self : None;
5385 def Reset(*args, **kwargs):
5386 """Reset(self)"""
5387 return _gdi_.Overlay_Reset(*args, **kwargs)
5388
5389 _gdi_.Overlay_swigregister(Overlay)
5390
5391 class DCOverlay(object):
5392 """Proxy of C++ DCOverlay class"""
5393 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5394 __repr__ = _swig_repr
5395 def __init__(self, *args):
5396 """
5397 __init__(self, Overlay overlay, WindowDC dc, int x, int y, int width,
5398 int height) -> DCOverlay
5399 __init__(self, Overlay overlay, WindowDC dc) -> DCOverlay
5400 """
5401 _gdi_.DCOverlay_swiginit(self,_gdi_.new_DCOverlay(*args))
5402 __swig_destroy__ = _gdi_.delete_DCOverlay
5403 __del__ = lambda self : None;
5404 def Clear(*args, **kwargs):
5405 """Clear(self)"""
5406 return _gdi_.DCOverlay_Clear(*args, **kwargs)
5407
5408 _gdi_.DCOverlay_swigregister(DCOverlay)
5409
5410 #---------------------------------------------------------------------------
5411
5412 IMAGELIST_DRAW_NORMAL = _gdi_.IMAGELIST_DRAW_NORMAL
5413 IMAGELIST_DRAW_TRANSPARENT = _gdi_.IMAGELIST_DRAW_TRANSPARENT
5414 IMAGELIST_DRAW_SELECTED = _gdi_.IMAGELIST_DRAW_SELECTED
5415 IMAGELIST_DRAW_FOCUSED = _gdi_.IMAGELIST_DRAW_FOCUSED
5416 IMAGE_LIST_NORMAL = _gdi_.IMAGE_LIST_NORMAL
5417 IMAGE_LIST_SMALL = _gdi_.IMAGE_LIST_SMALL
5418 IMAGE_LIST_STATE = _gdi_.IMAGE_LIST_STATE
5419 class ImageList(_core.Object):
5420 """Proxy of C++ ImageList class"""
5421 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5422 __repr__ = _swig_repr
5423 def __init__(self, *args, **kwargs):
5424 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
5425 _gdi_.ImageList_swiginit(self,_gdi_.new_ImageList(*args, **kwargs))
5426 __swig_destroy__ = _gdi_.delete_ImageList
5427 __del__ = lambda self : None;
5428 def Add(*args, **kwargs):
5429 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
5430 return _gdi_.ImageList_Add(*args, **kwargs)
5431
5432 def AddWithColourMask(*args, **kwargs):
5433 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
5434 return _gdi_.ImageList_AddWithColourMask(*args, **kwargs)
5435
5436 def AddIcon(*args, **kwargs):
5437 """AddIcon(self, Icon icon) -> int"""
5438 return _gdi_.ImageList_AddIcon(*args, **kwargs)
5439
5440 def GetBitmap(*args, **kwargs):
5441 """GetBitmap(self, int index) -> Bitmap"""
5442 return _gdi_.ImageList_GetBitmap(*args, **kwargs)
5443
5444 def GetIcon(*args, **kwargs):
5445 """GetIcon(self, int index) -> Icon"""
5446 return _gdi_.ImageList_GetIcon(*args, **kwargs)
5447
5448 def Replace(*args, **kwargs):
5449 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
5450 return _gdi_.ImageList_Replace(*args, **kwargs)
5451
5452 def Draw(*args, **kwargs):
5453 """
5454 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
5455 bool solidBackground=False) -> bool
5456 """
5457 return _gdi_.ImageList_Draw(*args, **kwargs)
5458
5459 def GetImageCount(*args, **kwargs):
5460 """GetImageCount(self) -> int"""
5461 return _gdi_.ImageList_GetImageCount(*args, **kwargs)
5462
5463 def Remove(*args, **kwargs):
5464 """Remove(self, int index) -> bool"""
5465 return _gdi_.ImageList_Remove(*args, **kwargs)
5466
5467 def RemoveAll(*args, **kwargs):
5468 """RemoveAll(self) -> bool"""
5469 return _gdi_.ImageList_RemoveAll(*args, **kwargs)
5470
5471 def GetSize(*args, **kwargs):
5472 """GetSize(index) -> (width,height)"""
5473 return _gdi_.ImageList_GetSize(*args, **kwargs)
5474
5475 ImageCount = property(GetImageCount,doc="See `GetImageCount`")
5476 Size = property(GetSize,doc="See `GetSize`")
5477 _gdi_.ImageList_swigregister(ImageList)
5478
5479 #---------------------------------------------------------------------------
5480
5481 class StockGDI(object):
5482 """Proxy of C++ StockGDI class"""
5483 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5484 __repr__ = _swig_repr
5485 BRUSH_BLACK = _gdi_.StockGDI_BRUSH_BLACK
5486 BRUSH_BLUE = _gdi_.StockGDI_BRUSH_BLUE
5487 BRUSH_CYAN = _gdi_.StockGDI_BRUSH_CYAN
5488 BRUSH_GREEN = _gdi_.StockGDI_BRUSH_GREEN
5489 BRUSH_GREY = _gdi_.StockGDI_BRUSH_GREY
5490 BRUSH_LIGHTGREY = _gdi_.StockGDI_BRUSH_LIGHTGREY
5491 BRUSH_MEDIUMGREY = _gdi_.StockGDI_BRUSH_MEDIUMGREY
5492 BRUSH_RED = _gdi_.StockGDI_BRUSH_RED
5493 BRUSH_TRANSPARENT = _gdi_.StockGDI_BRUSH_TRANSPARENT
5494 BRUSH_WHITE = _gdi_.StockGDI_BRUSH_WHITE
5495 COLOUR_BLACK = _gdi_.StockGDI_COLOUR_BLACK
5496 COLOUR_BLUE = _gdi_.StockGDI_COLOUR_BLUE
5497 COLOUR_CYAN = _gdi_.StockGDI_COLOUR_CYAN
5498 COLOUR_GREEN = _gdi_.StockGDI_COLOUR_GREEN
5499 COLOUR_LIGHTGREY = _gdi_.StockGDI_COLOUR_LIGHTGREY
5500 COLOUR_RED = _gdi_.StockGDI_COLOUR_RED
5501 COLOUR_WHITE = _gdi_.StockGDI_COLOUR_WHITE
5502 CURSOR_CROSS = _gdi_.StockGDI_CURSOR_CROSS
5503 CURSOR_HOURGLASS = _gdi_.StockGDI_CURSOR_HOURGLASS
5504 CURSOR_STANDARD = _gdi_.StockGDI_CURSOR_STANDARD
5505 FONT_ITALIC = _gdi_.StockGDI_FONT_ITALIC
5506 FONT_NORMAL = _gdi_.StockGDI_FONT_NORMAL
5507 FONT_SMALL = _gdi_.StockGDI_FONT_SMALL
5508 FONT_SWISS = _gdi_.StockGDI_FONT_SWISS
5509 PEN_BLACK = _gdi_.StockGDI_PEN_BLACK
5510 PEN_BLACKDASHED = _gdi_.StockGDI_PEN_BLACKDASHED
5511 PEN_CYAN = _gdi_.StockGDI_PEN_CYAN
5512 PEN_GREEN = _gdi_.StockGDI_PEN_GREEN
5513 PEN_GREY = _gdi_.StockGDI_PEN_GREY
5514 PEN_LIGHTGREY = _gdi_.StockGDI_PEN_LIGHTGREY
5515 PEN_MEDIUMGREY = _gdi_.StockGDI_PEN_MEDIUMGREY
5516 PEN_RED = _gdi_.StockGDI_PEN_RED
5517 PEN_TRANSPARENT = _gdi_.StockGDI_PEN_TRANSPARENT
5518 PEN_WHITE = _gdi_.StockGDI_PEN_WHITE
5519 ITEMCOUNT = _gdi_.StockGDI_ITEMCOUNT
5520 def __init__(self, *args, **kwargs):
5521 """__init__(self) -> StockGDI"""
5522 _gdi_.StockGDI_swiginit(self,_gdi_.new_StockGDI(*args, **kwargs))
5523 __swig_destroy__ = _gdi_.delete_StockGDI
5524 __del__ = lambda self : None;
5525 def DeleteAll(*args, **kwargs):
5526 """DeleteAll()"""
5527 return _gdi_.StockGDI_DeleteAll(*args, **kwargs)
5528
5529 DeleteAll = staticmethod(DeleteAll)
5530 def instance(*args, **kwargs):
5531 """instance() -> StockGDI"""
5532 return _gdi_.StockGDI_instance(*args, **kwargs)
5533
5534 instance = staticmethod(instance)
5535 def GetBrush(*args, **kwargs):
5536 """GetBrush(int item) -> Brush"""
5537 return _gdi_.StockGDI_GetBrush(*args, **kwargs)
5538
5539 GetBrush = staticmethod(GetBrush)
5540 def GetColour(*args, **kwargs):
5541 """GetColour(int item) -> Colour"""
5542 return _gdi_.StockGDI_GetColour(*args, **kwargs)
5543
5544 GetColour = staticmethod(GetColour)
5545 def GetCursor(*args, **kwargs):
5546 """GetCursor(int item) -> Cursor"""
5547 return _gdi_.StockGDI_GetCursor(*args, **kwargs)
5548
5549 GetCursor = staticmethod(GetCursor)
5550 def GetPen(*args, **kwargs):
5551 """GetPen(int item) -> Pen"""
5552 return _gdi_.StockGDI_GetPen(*args, **kwargs)
5553
5554 GetPen = staticmethod(GetPen)
5555 def GetFont(*args, **kwargs):
5556 """GetFont(self, int item) -> Font"""
5557 return _gdi_.StockGDI_GetFont(*args, **kwargs)
5558
5559 def _initStockObjects():
5560 import wx
5561 wx.ITALIC_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_ITALIC).this
5562 wx.NORMAL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_NORMAL).this
5563 wx.SMALL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SMALL).this
5564 wx.SWISS_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SWISS).this
5565
5566 wx.BLACK_DASHED_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACKDASHED).this
5567 wx.BLACK_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACK).this
5568 wx.CYAN_PEN.this = StockGDI.GetPen(StockGDI.PEN_CYAN).this
5569 wx.GREEN_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREEN).this
5570 wx.GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREY).this
5571 wx.LIGHT_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_LIGHTGREY).this
5572 wx.MEDIUM_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_MEDIUMGREY).this
5573 wx.RED_PEN.this = StockGDI.GetPen(StockGDI.PEN_RED).this
5574 wx.TRANSPARENT_PEN.this = StockGDI.GetPen(StockGDI.PEN_TRANSPARENT).this
5575 wx.WHITE_PEN.this = StockGDI.GetPen(StockGDI.PEN_WHITE).this
5576
5577 wx.BLACK_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLACK).this
5578 wx.BLUE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLUE).this
5579 wx.CYAN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_CYAN).this
5580 wx.GREEN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREEN).this
5581 wx.GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREY).this
5582 wx.LIGHT_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_LIGHTGREY).this
5583 wx.MEDIUM_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_MEDIUMGREY).this
5584 wx.RED_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_RED).this
5585 wx.TRANSPARENT_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_TRANSPARENT).this
5586 wx.WHITE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_WHITE).this
5587
5588 wx.BLACK.this = StockGDI.GetColour(StockGDI.COLOUR_BLACK).this
5589 wx.BLUE.this = StockGDI.GetColour(StockGDI.COLOUR_BLUE).this
5590 wx.CYAN.this = StockGDI.GetColour(StockGDI.COLOUR_CYAN).this
5591 wx.GREEN.this = StockGDI.GetColour(StockGDI.COLOUR_GREEN).this
5592 wx.LIGHT_GREY.this = StockGDI.GetColour(StockGDI.COLOUR_LIGHTGREY).this
5593 wx.RED.this = StockGDI.GetColour(StockGDI.COLOUR_RED).this
5594 wx.WHITE.this = StockGDI.GetColour(StockGDI.COLOUR_WHITE).this
5595
5596 wx.CROSS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_CROSS).this
5597 wx.HOURGLASS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_HOURGLASS).this
5598 wx.STANDARD_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_STANDARD).this
5599
5600 wx.TheFontList.this = _wxPyInitTheFontList().this
5601 wx.ThePenList.this = _wxPyInitThePenList().this
5602 wx.TheBrushList.this = _wxPyInitTheBrushList().this
5603 wx.TheColourDatabase.this = _wxPyInitTheColourDatabase().this
5604
5605
5606 _initStockObjects = staticmethod(_initStockObjects)
5607
5608 _gdi_.StockGDI_swigregister(StockGDI)
5609
5610 def StockGDI_DeleteAll(*args):
5611 """StockGDI_DeleteAll()"""
5612 return _gdi_.StockGDI_DeleteAll(*args)
5613
5614 def StockGDI_instance(*args):
5615 """StockGDI_instance() -> StockGDI"""
5616 return _gdi_.StockGDI_instance(*args)
5617
5618 def StockGDI_GetBrush(*args, **kwargs):
5619 """StockGDI_GetBrush(int item) -> Brush"""
5620 return _gdi_.StockGDI_GetBrush(*args, **kwargs)
5621
5622 def StockGDI_GetColour(*args, **kwargs):
5623 """StockGDI_GetColour(int item) -> Colour"""
5624 return _gdi_.StockGDI_GetColour(*args, **kwargs)
5625
5626 def StockGDI_GetCursor(*args, **kwargs):
5627 """StockGDI_GetCursor(int item) -> Cursor"""
5628 return _gdi_.StockGDI_GetCursor(*args, **kwargs)
5629
5630 def StockGDI_GetPen(*args, **kwargs):
5631 """StockGDI_GetPen(int item) -> Pen"""
5632 return _gdi_.StockGDI_GetPen(*args, **kwargs)
5633
5634 # Create an uninitialized instance for the stock objects, they will
5635 # be initialized later when the wx.App object is created.
5636 ITALIC_FONT = Font.__new__(Font)
5637 NORMAL_FONT = Font.__new__(Font)
5638 SMALL_FONT = Font.__new__(Font)
5639 SWISS_FONT = Font.__new__(Font)
5640
5641 BLACK_DASHED_PEN = Pen.__new__(Pen)
5642 BLACK_PEN = Pen.__new__(Pen)
5643 CYAN_PEN = Pen.__new__(Pen)
5644 GREEN_PEN = Pen.__new__(Pen)
5645 GREY_PEN = Pen.__new__(Pen)
5646 LIGHT_GREY_PEN = Pen.__new__(Pen)
5647 MEDIUM_GREY_PEN = Pen.__new__(Pen)
5648 RED_PEN = Pen.__new__(Pen)
5649 TRANSPARENT_PEN = Pen.__new__(Pen)
5650 WHITE_PEN = Pen.__new__(Pen)
5651
5652 BLACK_BRUSH = Brush.__new__(Brush)
5653 BLUE_BRUSH = Brush.__new__(Brush)
5654 CYAN_BRUSH = Brush.__new__(Brush)
5655 GREEN_BRUSH = Brush.__new__(Brush)
5656 GREY_BRUSH = Brush.__new__(Brush)
5657 LIGHT_GREY_BRUSH = Brush.__new__(Brush)
5658 MEDIUM_GREY_BRUSH = Brush.__new__(Brush)
5659 RED_BRUSH = Brush.__new__(Brush)
5660 TRANSPARENT_BRUSH = Brush.__new__(Brush)
5661 WHITE_BRUSH = Brush.__new__(Brush)
5662
5663 BLACK = Colour.__new__(Colour)
5664 BLUE = Colour.__new__(Colour)
5665 CYAN = Colour.__new__(Colour)
5666 GREEN = Colour.__new__(Colour)
5667 LIGHT_GREY = Colour.__new__(Colour)
5668 RED = Colour.__new__(Colour)
5669 WHITE = Colour.__new__(Colour)
5670
5671 CROSS_CURSOR = Cursor.__new__(Cursor)
5672 HOURGLASS_CURSOR = Cursor.__new__(Cursor)
5673 STANDARD_CURSOR = Cursor.__new__(Cursor)
5674
5675 class GDIObjListBase(object):
5676 """Proxy of C++ GDIObjListBase class"""
5677 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5678 __repr__ = _swig_repr
5679 def __init__(self, *args, **kwargs):
5680 """__init__(self) -> GDIObjListBase"""
5681 _gdi_.GDIObjListBase_swiginit(self,_gdi_.new_GDIObjListBase(*args, **kwargs))
5682 __swig_destroy__ = _gdi_.delete_GDIObjListBase
5683 __del__ = lambda self : None;
5684 _gdi_.GDIObjListBase_swigregister(GDIObjListBase)
5685 cvar = _gdi_.cvar
5686 NullBitmap = cvar.NullBitmap
5687 NullIcon = cvar.NullIcon
5688 NullCursor = cvar.NullCursor
5689 NullPen = cvar.NullPen
5690 NullBrush = cvar.NullBrush
5691 NullPalette = cvar.NullPalette
5692 NullFont = cvar.NullFont
5693 NullColour = cvar.NullColour
5694
5695 class PenList(GDIObjListBase):
5696 """Proxy of C++ PenList class"""
5697 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5698 def __init__(self): raise AttributeError, "No constructor defined"
5699 __repr__ = _swig_repr
5700 def FindOrCreatePen(*args, **kwargs):
5701 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
5702 return _gdi_.PenList_FindOrCreatePen(*args, **kwargs)
5703
5704 def AddPen(*args, **kwargs):
5705 """AddPen(self, Pen pen)"""
5706 return _gdi_.PenList_AddPen(*args, **kwargs)
5707
5708 def RemovePen(*args, **kwargs):
5709 """RemovePen(self, Pen pen)"""
5710 return _gdi_.PenList_RemovePen(*args, **kwargs)
5711
5712 AddPen = wx._deprecated(AddPen)
5713 RemovePen = wx._deprecated(RemovePen)
5714
5715 _gdi_.PenList_swigregister(PenList)
5716
5717 class BrushList(GDIObjListBase):
5718 """Proxy of C++ BrushList class"""
5719 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5720 def __init__(self): raise AttributeError, "No constructor defined"
5721 __repr__ = _swig_repr
5722 def FindOrCreateBrush(*args, **kwargs):
5723 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
5724 return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs)
5725
5726 def AddBrush(*args, **kwargs):
5727 """AddBrush(self, Brush brush)"""
5728 return _gdi_.BrushList_AddBrush(*args, **kwargs)
5729
5730 def RemoveBrush(*args, **kwargs):
5731 """RemoveBrush(self, Brush brush)"""
5732 return _gdi_.BrushList_RemoveBrush(*args, **kwargs)
5733
5734 AddBrush = wx._deprecated(AddBrush)
5735 RemoveBrush = wx._deprecated(RemoveBrush)
5736
5737 _gdi_.BrushList_swigregister(BrushList)
5738
5739 class FontList(GDIObjListBase):
5740 """Proxy of C++ FontList class"""
5741 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5742 def __init__(self): raise AttributeError, "No constructor defined"
5743 __repr__ = _swig_repr
5744 def FindOrCreateFont(*args, **kwargs):
5745 """
5746 FindOrCreateFont(self, int point_size, int family, int style, int weight,
5747 bool underline=False, String facename=EmptyString,
5748 int encoding=FONTENCODING_DEFAULT) -> Font
5749 """
5750 return _gdi_.FontList_FindOrCreateFont(*args, **kwargs)
5751
5752 def AddFont(*args, **kwargs):
5753 """AddFont(self, Font font)"""
5754 return _gdi_.FontList_AddFont(*args, **kwargs)
5755
5756 def RemoveFont(*args, **kwargs):
5757 """RemoveFont(self, Font font)"""
5758 return _gdi_.FontList_RemoveFont(*args, **kwargs)
5759
5760 AddFont = wx._deprecated(AddFont)
5761 RemoveFont = wx._deprecated(RemoveFont)
5762
5763 _gdi_.FontList_swigregister(FontList)
5764
5765 class ColourDatabase(object):
5766 """Proxy of C++ ColourDatabase class"""
5767 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5768 __repr__ = _swig_repr
5769 def __init__(self, *args, **kwargs):
5770 """__init__(self) -> ColourDatabase"""
5771 _gdi_.ColourDatabase_swiginit(self,_gdi_.new_ColourDatabase(*args, **kwargs))
5772 __swig_destroy__ = _gdi_.delete_ColourDatabase
5773 __del__ = lambda self : None;
5774 def Find(*args, **kwargs):
5775 """Find(self, String name) -> Colour"""
5776 return _gdi_.ColourDatabase_Find(*args, **kwargs)
5777
5778 def FindName(*args, **kwargs):
5779 """FindName(self, Colour colour) -> String"""
5780 return _gdi_.ColourDatabase_FindName(*args, **kwargs)
5781
5782 FindColour = Find
5783 def AddColour(*args, **kwargs):
5784 """AddColour(self, String name, Colour colour)"""
5785 return _gdi_.ColourDatabase_AddColour(*args, **kwargs)
5786
5787 def Append(*args, **kwargs):
5788 """Append(self, String name, int red, int green, int blue)"""
5789 return _gdi_.ColourDatabase_Append(*args, **kwargs)
5790
5791 _gdi_.ColourDatabase_swigregister(ColourDatabase)
5792
5793 #---------------------------------------------------------------------------
5794
5795
5796 def _wxPyInitTheFontList(*args):
5797 """_wxPyInitTheFontList() -> FontList"""
5798 return _gdi_._wxPyInitTheFontList(*args)
5799
5800 def _wxPyInitThePenList(*args):
5801 """_wxPyInitThePenList() -> PenList"""
5802 return _gdi_._wxPyInitThePenList(*args)
5803
5804 def _wxPyInitTheBrushList(*args):
5805 """_wxPyInitTheBrushList() -> BrushList"""
5806 return _gdi_._wxPyInitTheBrushList(*args)
5807
5808 def _wxPyInitTheColourDatabase(*args):
5809 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
5810 return _gdi_._wxPyInitTheColourDatabase(*args)
5811 # Create an uninitialized instance for the stock objects, they will
5812 # be initialized later when the wx.App object is created.
5813 TheFontList = FontList.__new__(FontList)
5814 ThePenList = PenList.__new__(PenList)
5815 TheBrushList = BrushList.__new__(BrushList)
5816 TheColourDatabase = ColourDatabase.__new__(ColourDatabase)
5817
5818 NullColor = NullColour
5819 #---------------------------------------------------------------------------
5820
5821 class Effects(_core.Object):
5822 """Proxy of C++ Effects class"""
5823 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5824 __repr__ = _swig_repr
5825 def __init__(self, *args, **kwargs):
5826 """__init__(self) -> Effects"""
5827 _gdi_.Effects_swiginit(self,_gdi_.new_Effects(*args, **kwargs))
5828 def GetHighlightColour(*args, **kwargs):
5829 """GetHighlightColour(self) -> Colour"""
5830 return _gdi_.Effects_GetHighlightColour(*args, **kwargs)
5831
5832 def GetLightShadow(*args, **kwargs):
5833 """GetLightShadow(self) -> Colour"""
5834 return _gdi_.Effects_GetLightShadow(*args, **kwargs)
5835
5836 def GetFaceColour(*args, **kwargs):
5837 """GetFaceColour(self) -> Colour"""
5838 return _gdi_.Effects_GetFaceColour(*args, **kwargs)
5839
5840 def GetMediumShadow(*args, **kwargs):
5841 """GetMediumShadow(self) -> Colour"""
5842 return _gdi_.Effects_GetMediumShadow(*args, **kwargs)
5843
5844 def GetDarkShadow(*args, **kwargs):
5845 """GetDarkShadow(self) -> Colour"""
5846 return _gdi_.Effects_GetDarkShadow(*args, **kwargs)
5847
5848 def SetHighlightColour(*args, **kwargs):
5849 """SetHighlightColour(self, Colour c)"""
5850 return _gdi_.Effects_SetHighlightColour(*args, **kwargs)
5851
5852 def SetLightShadow(*args, **kwargs):
5853 """SetLightShadow(self, Colour c)"""
5854 return _gdi_.Effects_SetLightShadow(*args, **kwargs)
5855
5856 def SetFaceColour(*args, **kwargs):
5857 """SetFaceColour(self, Colour c)"""
5858 return _gdi_.Effects_SetFaceColour(*args, **kwargs)
5859
5860 def SetMediumShadow(*args, **kwargs):
5861 """SetMediumShadow(self, Colour c)"""
5862 return _gdi_.Effects_SetMediumShadow(*args, **kwargs)
5863
5864 def SetDarkShadow(*args, **kwargs):
5865 """SetDarkShadow(self, Colour c)"""
5866 return _gdi_.Effects_SetDarkShadow(*args, **kwargs)
5867
5868 def Set(*args, **kwargs):
5869 """
5870 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
5871 Colour mediumShadow, Colour darkShadow)
5872 """
5873 return _gdi_.Effects_Set(*args, **kwargs)
5874
5875 def DrawSunkenEdge(*args, **kwargs):
5876 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
5877 return _gdi_.Effects_DrawSunkenEdge(*args, **kwargs)
5878
5879 def TileBitmap(*args, **kwargs):
5880 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
5881 return _gdi_.Effects_TileBitmap(*args, **kwargs)
5882
5883 DarkShadow = property(GetDarkShadow,SetDarkShadow,doc="See `GetDarkShadow` and `SetDarkShadow`")
5884 FaceColour = property(GetFaceColour,SetFaceColour,doc="See `GetFaceColour` and `SetFaceColour`")
5885 HighlightColour = property(GetHighlightColour,SetHighlightColour,doc="See `GetHighlightColour` and `SetHighlightColour`")
5886 LightShadow = property(GetLightShadow,SetLightShadow,doc="See `GetLightShadow` and `SetLightShadow`")
5887 MediumShadow = property(GetMediumShadow,SetMediumShadow,doc="See `GetMediumShadow` and `SetMediumShadow`")
5888 _gdi_.Effects_swigregister(Effects)
5889
5890 #---------------------------------------------------------------------------
5891
5892 CONTROL_DISABLED = _gdi_.CONTROL_DISABLED
5893 CONTROL_FOCUSED = _gdi_.CONTROL_FOCUSED
5894 CONTROL_PRESSED = _gdi_.CONTROL_PRESSED
5895 CONTROL_SPECIAL = _gdi_.CONTROL_SPECIAL
5896 CONTROL_ISDEFAULT = _gdi_.CONTROL_ISDEFAULT
5897 CONTROL_ISSUBMENU = _gdi_.CONTROL_ISSUBMENU
5898 CONTROL_EXPANDED = _gdi_.CONTROL_EXPANDED
5899 CONTROL_SIZEGRIP = _gdi_.CONTROL_SIZEGRIP
5900 CONTROL_CURRENT = _gdi_.CONTROL_CURRENT
5901 CONTROL_SELECTED = _gdi_.CONTROL_SELECTED
5902 CONTROL_CHECKED = _gdi_.CONTROL_CHECKED
5903 CONTROL_CHECKABLE = _gdi_.CONTROL_CHECKABLE
5904 CONTROL_UNDETERMINED = _gdi_.CONTROL_UNDETERMINED
5905 CONTROL_FLAGS_MASK = _gdi_.CONTROL_FLAGS_MASK
5906 CONTROL_DIRTY = _gdi_.CONTROL_DIRTY
5907 class SplitterRenderParams(object):
5908 """
5909 This is just a simple struct used as a return value of
5910 `wx.RendererNative.GetSplitterParams` and contains some platform
5911 specific metrics about splitters.
5912
5913 * widthSash: the width of the splitter sash.
5914 * border: the width of the border of the splitter window.
5915 * isHotSensitive: ``True`` if the splitter changes its
5916 appearance when the mouse is over it.
5917
5918
5919 """
5920 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5921 __repr__ = _swig_repr
5922 def __init__(self, *args, **kwargs):
5923 """
5924 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
5925
5926 This is just a simple struct used as a return value of
5927 `wx.RendererNative.GetSplitterParams` and contains some platform
5928 specific metrics about splitters.
5929
5930 * widthSash: the width of the splitter sash.
5931 * border: the width of the border of the splitter window.
5932 * isHotSensitive: ``True`` if the splitter changes its
5933 appearance when the mouse is over it.
5934
5935
5936 """
5937 _gdi_.SplitterRenderParams_swiginit(self,_gdi_.new_SplitterRenderParams(*args, **kwargs))
5938 __swig_destroy__ = _gdi_.delete_SplitterRenderParams
5939 __del__ = lambda self : None;
5940 widthSash = property(_gdi_.SplitterRenderParams_widthSash_get)
5941 border = property(_gdi_.SplitterRenderParams_border_get)
5942 isHotSensitive = property(_gdi_.SplitterRenderParams_isHotSensitive_get)
5943 _gdi_.SplitterRenderParams_swigregister(SplitterRenderParams)
5944
5945 class HeaderButtonParams(object):
5946 """Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`"""
5947 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5948 __repr__ = _swig_repr
5949 def __init__(self, *args, **kwargs):
5950 """
5951 __init__(self) -> HeaderButtonParams
5952
5953 Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`
5954 """
5955 _gdi_.HeaderButtonParams_swiginit(self,_gdi_.new_HeaderButtonParams(*args, **kwargs))
5956 __swig_destroy__ = _gdi_.delete_HeaderButtonParams
5957 __del__ = lambda self : None;
5958 m_arrowColour = property(_gdi_.HeaderButtonParams_m_arrowColour_get, _gdi_.HeaderButtonParams_m_arrowColour_set)
5959 m_selectionColour = property(_gdi_.HeaderButtonParams_m_selectionColour_get, _gdi_.HeaderButtonParams_m_selectionColour_set)
5960 m_labelText = property(_gdi_.HeaderButtonParams_m_labelText_get, _gdi_.HeaderButtonParams_m_labelText_set)
5961 m_labelFont = property(_gdi_.HeaderButtonParams_m_labelFont_get, _gdi_.HeaderButtonParams_m_labelFont_set)
5962 m_labelColour = property(_gdi_.HeaderButtonParams_m_labelColour_get, _gdi_.HeaderButtonParams_m_labelColour_set)
5963 m_labelBitmap = property(_gdi_.HeaderButtonParams_m_labelBitmap_get, _gdi_.HeaderButtonParams_m_labelBitmap_set)
5964 m_labelAlignment = property(_gdi_.HeaderButtonParams_m_labelAlignment_get, _gdi_.HeaderButtonParams_m_labelAlignment_set)
5965 _gdi_.HeaderButtonParams_swigregister(HeaderButtonParams)
5966
5967 HDR_SORT_ICON_NONE = _gdi_.HDR_SORT_ICON_NONE
5968 HDR_SORT_ICON_UP = _gdi_.HDR_SORT_ICON_UP
5969 HDR_SORT_ICON_DOWN = _gdi_.HDR_SORT_ICON_DOWN
5970 class RendererVersion(object):
5971 """
5972 This simple struct represents the `wx.RendererNative` interface
5973 version and is only used as the return value of
5974 `wx.RendererNative.GetVersion`.
5975 """
5976 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5977 __repr__ = _swig_repr
5978 def __init__(self, *args, **kwargs):
5979 """
5980 __init__(self, int version_, int age_) -> RendererVersion
5981
5982 This simple struct represents the `wx.RendererNative` interface
5983 version and is only used as the return value of
5984 `wx.RendererNative.GetVersion`.
5985 """
5986 _gdi_.RendererVersion_swiginit(self,_gdi_.new_RendererVersion(*args, **kwargs))
5987 __swig_destroy__ = _gdi_.delete_RendererVersion
5988 __del__ = lambda self : None;
5989 Current_Version = _gdi_.RendererVersion_Current_Version
5990 Current_Age = _gdi_.RendererVersion_Current_Age
5991 def IsCompatible(*args, **kwargs):
5992 """IsCompatible(RendererVersion ver) -> bool"""
5993 return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
5994
5995 IsCompatible = staticmethod(IsCompatible)
5996 version = property(_gdi_.RendererVersion_version_get)
5997 age = property(_gdi_.RendererVersion_age_get)
5998 _gdi_.RendererVersion_swigregister(RendererVersion)
5999
6000 def RendererVersion_IsCompatible(*args, **kwargs):
6001 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
6002 return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
6003
6004 class RendererNative(object):
6005 """
6006 One of the design principles of wxWidgets is to use the native
6007 widgets on every platform in order to be as close as possible to
6008 the native look and feel on every platform. However there are
6009 still cases when some generic widgets are needed for various
6010 reasons, but it can sometimes take a lot of messy work to make
6011 them conform to the native LnF.
6012
6013 The wx.RendererNative class is a collection of functions that have
6014 platform-specific implementations for drawing certain parts of
6015 genereic controls in ways that are as close to the native look as
6016 possible.
6017
6018 Note that each drawing function restores the `wx.DC` attributes if it
6019 changes them, so it is safe to assume that the same pen, brush and
6020 colours that were active before the call to this function are still in
6021 effect after it.
6022
6023 """
6024 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6025 def __init__(self): raise AttributeError, "No constructor defined"
6026 __repr__ = _swig_repr
6027 def DrawHeaderButton(*args, **kwargs):
6028 """
6029 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6030 HeaderButtonParams params=None)
6031
6032 Draw the header control button (such as what is used by `wx.ListCtrl`
6033 in report mode.)
6034 """
6035 return _gdi_.RendererNative_DrawHeaderButton(*args, **kwargs)
6036
6037 def DrawHeaderButtonContents(*args, **kwargs):
6038 """
6039 DrawHeaderButtonContents(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6040 HeaderButtonParams params=None)
6041
6042 Draw the contents of a header control button, (label, sort
6043 arrows, etc.) Normally this is only called by `DrawHeaderButton`.
6044 """
6045 return _gdi_.RendererNative_DrawHeaderButtonContents(*args, **kwargs)
6046
6047 def GetHeaderButtonHeight(*args, **kwargs):
6048 """
6049 GetHeaderButtonHeight(self, Window win) -> int
6050
6051 Returns the default height of a header button, either a fixed platform
6052 height if available, or a generic height based on the window's font.
6053 """
6054 return _gdi_.RendererNative_GetHeaderButtonHeight(*args, **kwargs)
6055
6056 def DrawTreeItemButton(*args, **kwargs):
6057 """
6058 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
6059
6060 Draw the expanded/collapsed icon for a tree control item.
6061 """
6062 return _gdi_.RendererNative_DrawTreeItemButton(*args, **kwargs)
6063
6064 def DrawSplitterBorder(*args, **kwargs):
6065 """
6066 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
6067
6068 Draw the border for a sash window: this border must be such that the
6069 sash drawn by `DrawSplitterSash` blends into it well.
6070 """
6071 return _gdi_.RendererNative_DrawSplitterBorder(*args, **kwargs)
6072
6073 def DrawSplitterSash(*args, **kwargs):
6074 """
6075 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
6076 int flags=0)
6077
6078 Draw a sash. The orient parameter defines whether the sash should be
6079 vertical or horizontal and how the position should be interpreted.
6080 """
6081 return _gdi_.RendererNative_DrawSplitterSash(*args, **kwargs)
6082
6083 def DrawComboBoxDropButton(*args, **kwargs):
6084 """
6085 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
6086
6087 Draw a button like the one used by `wx.ComboBox` to show a drop down
6088 window. The usual appearance is a downwards pointing arrow.
6089
6090 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
6091 ``wx.CONTROL_CURRENT`` bits set.
6092 """
6093 return _gdi_.RendererNative_DrawComboBoxDropButton(*args, **kwargs)
6094
6095 def DrawDropArrow(*args, **kwargs):
6096 """
6097 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
6098
6099 Draw a drop down arrow that is suitable for use outside a combo
6100 box. Arrow will have a transparent background.
6101
6102 ``rect`` is not entirely filled by the arrow. Instead, you should use
6103 bounding rectangle of a drop down button which arrow matches the size
6104 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
6105 ``wx.CONTROL_CURRENT`` bit set.
6106 """
6107 return _gdi_.RendererNative_DrawDropArrow(*args, **kwargs)
6108
6109 def DrawCheckBox(*args, **kwargs):
6110 """
6111 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
6112
6113 Draw a check button. Flags may use wx.CONTROL_CHECKED,
6114 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
6115 """
6116 return _gdi_.RendererNative_DrawCheckBox(*args, **kwargs)
6117
6118 def DrawPushButton(*args, **kwargs):
6119 """
6120 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
6121
6122 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
6123 wx.CONTROL_ISDEFAULT
6124 """
6125 return _gdi_.RendererNative_DrawPushButton(*args, **kwargs)
6126
6127 def DrawItemSelectionRect(*args, **kwargs):
6128 """
6129 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
6130
6131 Draw rectangle indicating that an item in e.g. a list control has been
6132 selected or focused
6133
6134 The flags parameter may be:
6135
6136 ==================== ============================================
6137 wx.CONTROL_SELECTED item is selected, e.g. draw background
6138 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
6139 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
6140 background vs. grey otherwise
6141 ==================== ============================================
6142
6143 """
6144 return _gdi_.RendererNative_DrawItemSelectionRect(*args, **kwargs)
6145
6146 def GetSplitterParams(*args, **kwargs):
6147 """
6148 GetSplitterParams(self, Window win) -> SplitterRenderParams
6149
6150 Get the splitter parameters, see `wx.SplitterRenderParams`.
6151 """
6152 return _gdi_.RendererNative_GetSplitterParams(*args, **kwargs)
6153
6154 def Get(*args, **kwargs):
6155 """
6156 Get() -> RendererNative
6157
6158 Return the currently used renderer
6159 """
6160 return _gdi_.RendererNative_Get(*args, **kwargs)
6161
6162 Get = staticmethod(Get)
6163 def GetGeneric(*args, **kwargs):
6164 """
6165 GetGeneric() -> RendererNative
6166
6167 Return the generic implementation of the renderer. Under some
6168 platforms, this is the default renderer implementation, others have
6169 platform-specific default renderer which can be retrieved by calling
6170 `wx.RendererNative.GetDefault`.
6171 """
6172 return _gdi_.RendererNative_GetGeneric(*args, **kwargs)
6173
6174 GetGeneric = staticmethod(GetGeneric)
6175 def GetDefault(*args, **kwargs):
6176 """
6177 GetDefault() -> RendererNative
6178
6179 Return the default (native) implementation for this platform -- this
6180 is also the one used by default but this may be changed by calling
6181 `wx.RendererNative.Set` in which case the return value of this method
6182 may be different from the return value of `wx.RendererNative.Get`.
6183 """
6184 return _gdi_.RendererNative_GetDefault(*args, **kwargs)
6185
6186 GetDefault = staticmethod(GetDefault)
6187 def Set(*args, **kwargs):
6188 """
6189 Set(RendererNative renderer) -> RendererNative
6190
6191 Set the renderer to use, passing None reverts to using the default
6192 renderer. Returns the previous renderer used with Set or None.
6193 """
6194 return _gdi_.RendererNative_Set(*args, **kwargs)
6195
6196 Set = staticmethod(Set)
6197 def GetVersion(*args, **kwargs):
6198 """
6199 GetVersion(self) -> RendererVersion
6200
6201 Returns the version of the renderer. Will be used for ensuring
6202 compatibility of dynamically loaded renderers.
6203 """
6204 return _gdi_.RendererNative_GetVersion(*args, **kwargs)
6205
6206 SplitterParams = property(GetSplitterParams,doc="See `GetSplitterParams`")
6207 Version = property(GetVersion,doc="See `GetVersion`")
6208 _gdi_.RendererNative_swigregister(RendererNative)
6209
6210 def RendererNative_Get(*args):
6211 """
6212 RendererNative_Get() -> RendererNative
6213
6214 Return the currently used renderer
6215 """
6216 return _gdi_.RendererNative_Get(*args)
6217
6218 def RendererNative_GetGeneric(*args):
6219 """
6220 RendererNative_GetGeneric() -> RendererNative
6221
6222 Return the generic implementation of the renderer. Under some
6223 platforms, this is the default renderer implementation, others have
6224 platform-specific default renderer which can be retrieved by calling
6225 `wx.RendererNative.GetDefault`.
6226 """
6227 return _gdi_.RendererNative_GetGeneric(*args)
6228
6229 def RendererNative_GetDefault(*args):
6230 """
6231 RendererNative_GetDefault() -> RendererNative
6232
6233 Return the default (native) implementation for this platform -- this
6234 is also the one used by default but this may be changed by calling
6235 `wx.RendererNative.Set` in which case the return value of this method
6236 may be different from the return value of `wx.RendererNative.Get`.
6237 """
6238 return _gdi_.RendererNative_GetDefault(*args)
6239
6240 def RendererNative_Set(*args, **kwargs):
6241 """
6242 RendererNative_Set(RendererNative renderer) -> RendererNative
6243
6244 Set the renderer to use, passing None reverts to using the default
6245 renderer. Returns the previous renderer used with Set or None.
6246 """
6247 return _gdi_.RendererNative_Set(*args, **kwargs)
6248
6249 #---------------------------------------------------------------------------
6250
6251 class PseudoDC(_core.Object):
6252 """
6253 A PseudoDC is an object that can be used as if it were a `wx.DC`. All
6254 commands issued to the PseudoDC are stored in a list. You can then
6255 play these commands back to a real DC object using the DrawToDC
6256 method. Commands in the command list are indexed by ID. You can use
6257 this to clear the operations associated with a single ID and then
6258 re-draw the object associated with that ID.
6259 """
6260 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6261 __repr__ = _swig_repr
6262 def __init__(self, *args, **kwargs):
6263 """
6264 __init__(self) -> PseudoDC
6265
6266 Constructs a new Pseudo device context for recording dc operations
6267 """
6268 _gdi_.PseudoDC_swiginit(self,_gdi_.new_PseudoDC(*args, **kwargs))
6269 def BeginDrawing(*args, **kwargs):
6270 """
6271 BeginDrawing(self)
6272
6273 Allows for optimization of drawing code on platforms that need it. On
6274 other platforms this is just an empty function and is harmless. To
6275 take advantage of this postential optimization simply enclose each
6276 group of calls to the drawing primitives within calls to
6277 `BeginDrawing` and `EndDrawing`.
6278 """
6279 return _gdi_.PseudoDC_BeginDrawing(*args, **kwargs)
6280
6281 def EndDrawing(*args, **kwargs):
6282 """
6283 EndDrawing(self)
6284
6285 Ends the group of drawing primitives started with `BeginDrawing`, and
6286 invokes whatever optimization is available for this DC type on the
6287 current platform.
6288 """
6289 return _gdi_.PseudoDC_EndDrawing(*args, **kwargs)
6290
6291 __swig_destroy__ = _gdi_.delete_PseudoDC
6292 __del__ = lambda self : None;
6293 def RemoveAll(*args, **kwargs):
6294 """
6295 RemoveAll(self)
6296
6297 Removes all objects and operations from the recorded list.
6298 """
6299 return _gdi_.PseudoDC_RemoveAll(*args, **kwargs)
6300
6301 def GetLen(*args, **kwargs):
6302 """
6303 GetLen(self) -> int
6304
6305 Returns the number of operations in the recorded list.
6306 """
6307 return _gdi_.PseudoDC_GetLen(*args, **kwargs)
6308
6309 def SetId(*args, **kwargs):
6310 """
6311 SetId(self, int id)
6312
6313 Sets the id to be associated with subsequent operations.
6314 """
6315 return _gdi_.PseudoDC_SetId(*args, **kwargs)
6316
6317 def ClearId(*args, **kwargs):
6318 """
6319 ClearId(self, int id)
6320
6321 Removes all operations associated with id so the object can be redrawn.
6322 """
6323 return _gdi_.PseudoDC_ClearId(*args, **kwargs)
6324
6325 def RemoveId(*args, **kwargs):
6326 """
6327 RemoveId(self, int id)
6328
6329 Remove the object node (and all operations) associated with an id.
6330 """
6331 return _gdi_.PseudoDC_RemoveId(*args, **kwargs)
6332
6333 def TranslateId(*args, **kwargs):
6334 """
6335 TranslateId(self, int id, int dx, int dy)
6336
6337 Translate the operations of id by dx,dy.
6338 """
6339 return _gdi_.PseudoDC_TranslateId(*args, **kwargs)
6340
6341 def SetIdGreyedOut(*args, **kwargs):
6342 """
6343 SetIdGreyedOut(self, int id, bool greyout=True)
6344
6345 Set whether an object is drawn greyed out or not.
6346 """
6347 return _gdi_.PseudoDC_SetIdGreyedOut(*args, **kwargs)
6348
6349 def GetIdGreyedOut(*args, **kwargs):
6350 """
6351 GetIdGreyedOut(self, int id) -> bool
6352
6353 Get whether an object is drawn greyed out or not.
6354 """
6355 return _gdi_.PseudoDC_GetIdGreyedOut(*args, **kwargs)
6356
6357 def FindObjects(*args, **kwargs):
6358 """
6359 FindObjects(self, int x, int y, int radius=1, wxColor bg=*wxWHITE) -> PyObject
6360
6361 Returns a list of all the id's that draw a pixel with color
6362 not equal to bg within radius of (x,y).
6363 Returns an empty list if nothing is found. The list is in
6364 reverse drawing order so list[0] is the top id.
6365 """
6366 return _gdi_.PseudoDC_FindObjects(*args, **kwargs)
6367
6368 def FindObjectsByBBox(*args, **kwargs):
6369 """
6370 FindObjectsByBBox(self, int x, int y) -> PyObject
6371
6372 Returns a list of all the id's whose bounding boxes include (x,y).
6373 Returns an empty list if nothing is found. The list is in
6374 reverse drawing order so list[0] is the top id.
6375 """
6376 return _gdi_.PseudoDC_FindObjectsByBBox(*args, **kwargs)
6377
6378 def DrawIdToDC(*args, **kwargs):
6379 """
6380 DrawIdToDC(self, int id, DC dc)
6381
6382 Draw recorded operations of id to dc.
6383 """
6384 return _gdi_.PseudoDC_DrawIdToDC(*args, **kwargs)
6385
6386 def SetIdBounds(*args, **kwargs):
6387 """
6388 SetIdBounds(self, int id, Rect rect)
6389
6390 Set the bounding rect of a given object. This will create
6391 an object node if one doesn't exist.
6392 """
6393 return _gdi_.PseudoDC_SetIdBounds(*args, **kwargs)
6394
6395 def GetIdBounds(*args, **kwargs):
6396 """
6397 GetIdBounds(self, int id) -> Rect
6398
6399 Returns the bounding rectangle previouly set with SetIdBounds. If
6400 no bounds have been set, it returns wx.Rect(0,0,0,0).
6401 """
6402 return _gdi_.PseudoDC_GetIdBounds(*args, **kwargs)
6403
6404 def DrawToDCClipped(*args, **kwargs):
6405 """
6406 DrawToDCClipped(self, DC dc, Rect rect)
6407
6408 Draws the recorded operations to dc unless the operation is known to
6409 be outside rect.
6410 """
6411 return _gdi_.PseudoDC_DrawToDCClipped(*args, **kwargs)
6412
6413 def DrawToDCClippedRgn(*args, **kwargs):
6414 """
6415 DrawToDCClippedRgn(self, DC dc, Region region)
6416
6417 Draws the recorded operations to dc unless the operation is known to
6418 be outside rect.
6419 """
6420 return _gdi_.PseudoDC_DrawToDCClippedRgn(*args, **kwargs)
6421
6422 def DrawToDC(*args, **kwargs):
6423 """
6424 DrawToDC(self, DC dc)
6425
6426 Draws the recorded operations to dc.
6427 """
6428 return _gdi_.PseudoDC_DrawToDC(*args, **kwargs)
6429
6430 def FloodFill(*args, **kwargs):
6431 """
6432 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
6433
6434 Flood fills the device context starting from the given point, using
6435 the current brush colour, and using a style:
6436
6437 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
6438 the given colour is encountered.
6439
6440 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
6441 colour.
6442
6443 Returns False if the operation failed.
6444
6445 Note: The present implementation for non-Windows platforms may fail to
6446 find colour borders if the pixels do not match the colour
6447 exactly. However the function will still return true.
6448 """
6449 return _gdi_.PseudoDC_FloodFill(*args, **kwargs)
6450
6451 def FloodFillPoint(*args, **kwargs):
6452 """
6453 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
6454
6455 Flood fills the device context starting from the given point, using
6456 the current brush colour, and using a style:
6457
6458 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
6459 the given colour is encountered.
6460
6461 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
6462 colour.
6463
6464 Returns False if the operation failed.
6465
6466 Note: The present implementation for non-Windows platforms may fail to
6467 find colour borders if the pixels do not match the colour
6468 exactly. However the function will still return true.
6469 """
6470 return _gdi_.PseudoDC_FloodFillPoint(*args, **kwargs)
6471
6472 def DrawLine(*args, **kwargs):
6473 """
6474 DrawLine(self, int x1, int y1, int x2, int y2)
6475
6476 Draws a line from the first point to the second. The current pen is
6477 used for drawing the line. Note that the second point is *not* part of
6478 the line and is not drawn by this function (this is consistent with
6479 the behaviour of many other toolkits).
6480 """
6481 return _gdi_.PseudoDC_DrawLine(*args, **kwargs)
6482
6483 def DrawLinePoint(*args, **kwargs):
6484 """
6485 DrawLinePoint(self, Point pt1, Point pt2)
6486
6487 Draws a line from the first point to the second. The current pen is
6488 used for drawing the line. Note that the second point is *not* part of
6489 the line and is not drawn by this function (this is consistent with
6490 the behaviour of many other toolkits).
6491 """
6492 return _gdi_.PseudoDC_DrawLinePoint(*args, **kwargs)
6493
6494 def CrossHair(*args, **kwargs):
6495 """
6496 CrossHair(self, int x, int y)
6497
6498 Displays a cross hair using the current pen. This is a vertical and
6499 horizontal line the height and width of the window, centred on the
6500 given point.
6501 """
6502 return _gdi_.PseudoDC_CrossHair(*args, **kwargs)
6503
6504 def CrossHairPoint(*args, **kwargs):
6505 """
6506 CrossHairPoint(self, Point pt)
6507
6508 Displays a cross hair using the current pen. This is a vertical and
6509 horizontal line the height and width of the window, centred on the
6510 given point.
6511 """
6512 return _gdi_.PseudoDC_CrossHairPoint(*args, **kwargs)
6513
6514 def DrawArc(*args, **kwargs):
6515 """
6516 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
6517
6518 Draws an arc of a circle, centred on the *center* point (xc, yc), from
6519 the first point to the second. The current pen is used for the outline
6520 and the current brush for filling the shape.
6521
6522 The arc is drawn in an anticlockwise direction from the start point to
6523 the end point.
6524 """
6525 return _gdi_.PseudoDC_DrawArc(*args, **kwargs)
6526
6527 def DrawArcPoint(*args, **kwargs):
6528 """
6529 DrawArcPoint(self, Point pt1, Point pt2, Point center)
6530
6531 Draws an arc of a circle, centred on the *center* point (xc, yc), from
6532 the first point to the second. The current pen is used for the outline
6533 and the current brush for filling the shape.
6534
6535 The arc is drawn in an anticlockwise direction from the start point to
6536 the end point.
6537 """
6538 return _gdi_.PseudoDC_DrawArcPoint(*args, **kwargs)
6539
6540 def DrawCheckMark(*args, **kwargs):
6541 """
6542 DrawCheckMark(self, int x, int y, int width, int height)
6543
6544 Draws a check mark inside the given rectangle.
6545 """
6546 return _gdi_.PseudoDC_DrawCheckMark(*args, **kwargs)
6547
6548 def DrawCheckMarkRect(*args, **kwargs):
6549 """
6550 DrawCheckMarkRect(self, Rect rect)
6551
6552 Draws a check mark inside the given rectangle.
6553 """
6554 return _gdi_.PseudoDC_DrawCheckMarkRect(*args, **kwargs)
6555
6556 def DrawEllipticArc(*args, **kwargs):
6557 """
6558 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
6559
6560 Draws an arc of an ellipse, with the given rectangle defining the
6561 bounds of the ellipse. The current pen is used for drawing the arc and
6562 the current brush is used for drawing the pie.
6563
6564 The *start* and *end* parameters specify the start and end of the arc
6565 relative to the three-o'clock position from the center of the
6566 rectangle. Angles are specified in degrees (360 is a complete
6567 circle). Positive values mean counter-clockwise motion. If start is
6568 equal to end, a complete ellipse will be drawn.
6569 """
6570 return _gdi_.PseudoDC_DrawEllipticArc(*args, **kwargs)
6571
6572 def DrawEllipticArcPointSize(*args, **kwargs):
6573 """
6574 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
6575
6576 Draws an arc of an ellipse, with the given rectangle defining the
6577 bounds of the ellipse. The current pen is used for drawing the arc and
6578 the current brush is used for drawing the pie.
6579
6580 The *start* and *end* parameters specify the start and end of the arc
6581 relative to the three-o'clock position from the center of the
6582 rectangle. Angles are specified in degrees (360 is a complete
6583 circle). Positive values mean counter-clockwise motion. If start is
6584 equal to end, a complete ellipse will be drawn.
6585 """
6586 return _gdi_.PseudoDC_DrawEllipticArcPointSize(*args, **kwargs)
6587
6588 def DrawPoint(*args, **kwargs):
6589 """
6590 DrawPoint(self, int x, int y)
6591
6592 Draws a point using the current pen.
6593 """
6594 return _gdi_.PseudoDC_DrawPoint(*args, **kwargs)
6595
6596 def DrawPointPoint(*args, **kwargs):
6597 """
6598 DrawPointPoint(self, Point pt)
6599
6600 Draws a point using the current pen.
6601 """
6602 return _gdi_.PseudoDC_DrawPointPoint(*args, **kwargs)
6603
6604 def DrawRectangle(*args, **kwargs):
6605 """
6606 DrawRectangle(self, int x, int y, int width, int height)
6607
6608 Draws a rectangle with the given top left corner, and with the given
6609 size. The current pen is used for the outline and the current brush
6610 for filling the shape.
6611 """
6612 return _gdi_.PseudoDC_DrawRectangle(*args, **kwargs)
6613
6614 def DrawRectangleRect(*args, **kwargs):
6615 """
6616 DrawRectangleRect(self, Rect rect)
6617
6618 Draws a rectangle with the given top left corner, and with the given
6619 size. The current pen is used for the outline and the current brush
6620 for filling the shape.
6621 """
6622 return _gdi_.PseudoDC_DrawRectangleRect(*args, **kwargs)
6623
6624 def DrawRectanglePointSize(*args, **kwargs):
6625 """
6626 DrawRectanglePointSize(self, Point pt, Size sz)
6627
6628 Draws a rectangle with the given top left corner, and with the given
6629 size. The current pen is used for the outline and the current brush
6630 for filling the shape.
6631 """
6632 return _gdi_.PseudoDC_DrawRectanglePointSize(*args, **kwargs)
6633
6634 def DrawRoundedRectangle(*args, **kwargs):
6635 """
6636 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
6637
6638 Draws a rectangle with the given top left corner, and with the given
6639 size. The corners are quarter-circles using the given radius. The
6640 current pen is used for the outline and the current brush for filling
6641 the shape.
6642
6643 If radius is positive, the value is assumed to be the radius of the
6644 rounded corner. If radius is negative, the absolute value is assumed
6645 to be the proportion of the smallest dimension of the rectangle. This
6646 means that the corner can be a sensible size relative to the size of
6647 the rectangle, and also avoids the strange effects X produces when the
6648 corners are too big for the rectangle.
6649 """
6650 return _gdi_.PseudoDC_DrawRoundedRectangle(*args, **kwargs)
6651
6652 def DrawRoundedRectangleRect(*args, **kwargs):
6653 """
6654 DrawRoundedRectangleRect(self, Rect r, double radius)
6655
6656 Draws a rectangle with the given top left corner, and with the given
6657 size. The corners are quarter-circles using the given radius. The
6658 current pen is used for the outline and the current brush for filling
6659 the shape.
6660
6661 If radius is positive, the value is assumed to be the radius of the
6662 rounded corner. If radius is negative, the absolute value is assumed
6663 to be the proportion of the smallest dimension of the rectangle. This
6664 means that the corner can be a sensible size relative to the size of
6665 the rectangle, and also avoids the strange effects X produces when the
6666 corners are too big for the rectangle.
6667 """
6668 return _gdi_.PseudoDC_DrawRoundedRectangleRect(*args, **kwargs)
6669
6670 def DrawRoundedRectanglePointSize(*args, **kwargs):
6671 """
6672 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
6673
6674 Draws a rectangle with the given top left corner, and with the given
6675 size. The corners are quarter-circles using the given radius. The
6676 current pen is used for the outline and the current brush for filling
6677 the shape.
6678
6679 If radius is positive, the value is assumed to be the radius of the
6680 rounded corner. If radius is negative, the absolute value is assumed
6681 to be the proportion of the smallest dimension of the rectangle. This
6682 means that the corner can be a sensible size relative to the size of
6683 the rectangle, and also avoids the strange effects X produces when the
6684 corners are too big for the rectangle.
6685 """
6686 return _gdi_.PseudoDC_DrawRoundedRectanglePointSize(*args, **kwargs)
6687
6688 def DrawCircle(*args, **kwargs):
6689 """
6690 DrawCircle(self, int x, int y, int radius)
6691
6692 Draws a circle with the given center point and radius. The current
6693 pen is used for the outline and the current brush for filling the
6694 shape.
6695
6696 :see: `DrawEllipse`
6697 """
6698 return _gdi_.PseudoDC_DrawCircle(*args, **kwargs)
6699
6700 def DrawCirclePoint(*args, **kwargs):
6701 """
6702 DrawCirclePoint(self, Point pt, int radius)
6703
6704 Draws a circle with the given center point and radius. The current
6705 pen is used for the outline and the current brush for filling the
6706 shape.
6707
6708 :see: `DrawEllipse`
6709 """
6710 return _gdi_.PseudoDC_DrawCirclePoint(*args, **kwargs)
6711
6712 def DrawEllipse(*args, **kwargs):
6713 """
6714 DrawEllipse(self, int x, int y, int width, int height)
6715
6716 Draws an ellipse contained in the specified rectangle. The current pen
6717 is used for the outline and the current brush for filling the shape.
6718
6719 :see: `DrawCircle`
6720 """
6721 return _gdi_.PseudoDC_DrawEllipse(*args, **kwargs)
6722
6723 def DrawEllipseRect(*args, **kwargs):
6724 """
6725 DrawEllipseRect(self, Rect rect)
6726
6727 Draws an ellipse contained in the specified rectangle. The current pen
6728 is used for the outline and the current brush for filling the shape.
6729
6730 :see: `DrawCircle`
6731 """
6732 return _gdi_.PseudoDC_DrawEllipseRect(*args, **kwargs)
6733
6734 def DrawEllipsePointSize(*args, **kwargs):
6735 """
6736 DrawEllipsePointSize(self, Point pt, Size sz)
6737
6738 Draws an ellipse contained in the specified rectangle. The current pen
6739 is used for the outline and the current brush for filling the shape.
6740
6741 :see: `DrawCircle`
6742 """
6743 return _gdi_.PseudoDC_DrawEllipsePointSize(*args, **kwargs)
6744
6745 def DrawIcon(*args, **kwargs):
6746 """
6747 DrawIcon(self, Icon icon, int x, int y)
6748
6749 Draw an icon on the display (does nothing if the device context is
6750 PostScript). This can be the simplest way of drawing bitmaps on a
6751 window.
6752 """
6753 return _gdi_.PseudoDC_DrawIcon(*args, **kwargs)
6754
6755 def DrawIconPoint(*args, **kwargs):
6756 """
6757 DrawIconPoint(self, Icon icon, Point pt)
6758
6759 Draw an icon on the display (does nothing if the device context is
6760 PostScript). This can be the simplest way of drawing bitmaps on a
6761 window.
6762 """
6763 return _gdi_.PseudoDC_DrawIconPoint(*args, **kwargs)
6764
6765 def DrawBitmap(*args, **kwargs):
6766 """
6767 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
6768
6769 Draw a bitmap on the device context at the specified point. If
6770 *transparent* is true and the bitmap has a transparency mask, (or
6771 alpha channel on the platforms that support it) then the bitmap will
6772 be drawn transparently.
6773
6774 When drawing a mono-bitmap, the current text foreground colour will be
6775 used to draw the foreground of the bitmap (all bits set to 1), and the
6776 current text background colour to draw the background (all bits set to
6777 0).
6778
6779 :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`
6780 """
6781 return _gdi_.PseudoDC_DrawBitmap(*args, **kwargs)
6782
6783 def DrawBitmapPoint(*args, **kwargs):
6784 """
6785 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
6786
6787 Draw a bitmap on the device context at the specified point. If
6788 *transparent* is true and the bitmap has a transparency mask, (or
6789 alpha channel on the platforms that support it) then the bitmap will
6790 be drawn transparently.
6791
6792 When drawing a mono-bitmap, the current text foreground colour will be
6793 used to draw the foreground of the bitmap (all bits set to 1), and the
6794 current text background colour to draw the background (all bits set to
6795 0).
6796
6797 :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`
6798 """
6799 return _gdi_.PseudoDC_DrawBitmapPoint(*args, **kwargs)
6800
6801 def DrawText(*args, **kwargs):
6802 """
6803 DrawText(self, String text, int x, int y)
6804
6805 Draws a text string at the specified point, using the current text
6806 font, and the current text foreground and background colours.
6807
6808 The coordinates refer to the top-left corner of the rectangle bounding
6809 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
6810 a text string, which can be used to position the text more precisely,
6811 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
6812 not implement it.)
6813
6814 **NOTE**: under wxGTK the current logical function is used by this
6815 function but it is ignored by wxMSW. Thus, you should avoid using
6816 logical functions with this function in portable programs.
6817
6818 :see: `DrawRotatedText`
6819 """
6820 return _gdi_.PseudoDC_DrawText(*args, **kwargs)
6821
6822 def DrawTextPoint(*args, **kwargs):
6823 """
6824 DrawTextPoint(self, String text, Point pt)
6825
6826 Draws a text string at the specified point, using the current text
6827 font, and the current text foreground and background colours.
6828
6829 The coordinates refer to the top-left corner of the rectangle bounding
6830 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
6831 a text string, which can be used to position the text more precisely,
6832 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
6833 not implement it.)
6834
6835 **NOTE**: under wxGTK the current logical function is used by this
6836 function but it is ignored by wxMSW. Thus, you should avoid using
6837 logical functions with this function in portable programs.
6838
6839 :see: `DrawRotatedText`
6840 """
6841 return _gdi_.PseudoDC_DrawTextPoint(*args, **kwargs)
6842
6843 def DrawRotatedText(*args, **kwargs):
6844 """
6845 DrawRotatedText(self, String text, int x, int y, double angle)
6846
6847 Draws the text rotated by *angle* degrees, if supported by the platform.
6848
6849 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6850 function. In particular, a font different from ``wx.NORMAL_FONT``
6851 should be used as the it is not normally a TrueType
6852 font. ``wx.SWISS_FONT`` is an example of a font which is.
6853
6854 :see: `DrawText`
6855 """
6856 return _gdi_.PseudoDC_DrawRotatedText(*args, **kwargs)
6857
6858 def DrawRotatedTextPoint(*args, **kwargs):
6859 """
6860 DrawRotatedTextPoint(self, String text, Point pt, double angle)
6861
6862 Draws the text rotated by *angle* degrees, if supported by the platform.
6863
6864 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6865 function. In particular, a font different from ``wx.NORMAL_FONT``
6866 should be used as the it is not normally a TrueType
6867 font. ``wx.SWISS_FONT`` is an example of a font which is.
6868
6869 :see: `DrawText`
6870 """
6871 return _gdi_.PseudoDC_DrawRotatedTextPoint(*args, **kwargs)
6872
6873 def DrawLines(*args, **kwargs):
6874 """
6875 DrawLines(self, List points, int xoffset=0, int yoffset=0)
6876
6877 Draws lines using a sequence of `wx.Point` objects, adding the
6878 optional offset coordinate. The current pen is used for drawing the
6879 lines.
6880 """
6881 return _gdi_.PseudoDC_DrawLines(*args, **kwargs)
6882
6883 def DrawPolygon(*args, **kwargs):
6884 """
6885 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
6886 int fillStyle=ODDEVEN_RULE)
6887
6888 Draws a filled polygon using a sequence of `wx.Point` objects, adding
6889 the optional offset coordinate. The last argument specifies the fill
6890 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
6891
6892 The current pen is used for drawing the outline, and the current brush
6893 for filling the shape. Using a transparent brush suppresses
6894 filling. Note that wxWidgets automatically closes the first and last
6895 points.
6896 """
6897 return _gdi_.PseudoDC_DrawPolygon(*args, **kwargs)
6898
6899 def DrawLabel(*args, **kwargs):
6900 """
6901 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6902 int indexAccel=-1)
6903
6904 Draw *text* within the specified rectangle, abiding by the alignment
6905 flags. Will additionally emphasize the character at *indexAccel* if
6906 it is not -1.
6907
6908 :see: `DrawImageLabel`
6909 """
6910 return _gdi_.PseudoDC_DrawLabel(*args, **kwargs)
6911
6912 def DrawImageLabel(*args, **kwargs):
6913 """
6914 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6915 int indexAccel=-1)
6916
6917 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
6918 drawing it) within the specified rectangle, abiding by the alignment
6919 flags. Will additionally emphasize the character at *indexAccel* if
6920 it is not -1.
6921 """
6922 return _gdi_.PseudoDC_DrawImageLabel(*args, **kwargs)
6923
6924 def DrawSpline(*args, **kwargs):
6925 """
6926 DrawSpline(self, List points)
6927
6928 Draws a spline between all given control points, (a list of `wx.Point`
6929 objects) using the current pen. The spline is drawn using a series of
6930 lines, using an algorithm taken from the X drawing program 'XFIG'.
6931 """
6932 return _gdi_.PseudoDC_DrawSpline(*args, **kwargs)
6933
6934 def Clear(*args, **kwargs):
6935 """
6936 Clear(self)
6937
6938 Clears the device context using the current background brush.
6939 """
6940 return _gdi_.PseudoDC_Clear(*args, **kwargs)
6941
6942 def SetFont(*args, **kwargs):
6943 """
6944 SetFont(self, Font font)
6945
6946 Sets the current font for the DC. It must be a valid font, in
6947 particular you should not pass ``wx.NullFont`` to this method.
6948
6949 :see: `wx.Font`
6950 """
6951 return _gdi_.PseudoDC_SetFont(*args, **kwargs)
6952
6953 def SetPen(*args, **kwargs):
6954 """
6955 SetPen(self, Pen pen)
6956
6957 Sets the current pen for the DC.
6958
6959 If the argument is ``wx.NullPen``, the current pen is selected out of the
6960 device context, and the original pen restored.
6961
6962 :see: `wx.Pen`
6963 """
6964 return _gdi_.PseudoDC_SetPen(*args, **kwargs)
6965
6966 def SetBrush(*args, **kwargs):
6967 """
6968 SetBrush(self, Brush brush)
6969
6970 Sets the current brush for the DC.
6971
6972 If the argument is ``wx.NullBrush``, the current brush is selected out
6973 of the device context, and the original brush restored, allowing the
6974 current brush to be destroyed safely.
6975
6976 :see: `wx.Brush`
6977 """
6978 return _gdi_.PseudoDC_SetBrush(*args, **kwargs)
6979
6980 def SetBackground(*args, **kwargs):
6981 """
6982 SetBackground(self, Brush brush)
6983
6984 Sets the current background brush for the DC.
6985 """
6986 return _gdi_.PseudoDC_SetBackground(*args, **kwargs)
6987
6988 def SetBackgroundMode(*args, **kwargs):
6989 """
6990 SetBackgroundMode(self, int mode)
6991
6992 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
6993 determines whether text will be drawn with a background colour or
6994 not.
6995 """
6996 return _gdi_.PseudoDC_SetBackgroundMode(*args, **kwargs)
6997
6998 def SetPalette(*args, **kwargs):
6999 """
7000 SetPalette(self, Palette palette)
7001
7002 If this is a window DC or memory DC, assigns the given palette to the
7003 window or bitmap associated with the DC. If the argument is
7004 ``wx.NullPalette``, the current palette is selected out of the device
7005 context, and the original palette restored.
7006
7007 :see: `wx.Palette`
7008 """
7009 return _gdi_.PseudoDC_SetPalette(*args, **kwargs)
7010
7011 def SetTextForeground(*args, **kwargs):
7012 """
7013 SetTextForeground(self, Colour colour)
7014
7015 Sets the current text foreground colour for the DC.
7016 """
7017 return _gdi_.PseudoDC_SetTextForeground(*args, **kwargs)
7018
7019 def SetTextBackground(*args, **kwargs):
7020 """
7021 SetTextBackground(self, Colour colour)
7022
7023 Sets the current text background colour for the DC.
7024 """
7025 return _gdi_.PseudoDC_SetTextBackground(*args, **kwargs)
7026
7027 def SetLogicalFunction(*args, **kwargs):
7028 """
7029 SetLogicalFunction(self, int function)
7030
7031 Sets the current logical function for the device context. This
7032 determines how a source pixel (from a pen or brush colour, combines
7033 with a destination pixel in the current device context.
7034
7035 The possible values and their meaning in terms of source and
7036 destination pixel values are as follows:
7037
7038 ================ ==========================
7039 wx.AND src AND dst
7040 wx.AND_INVERT (NOT src) AND dst
7041 wx.AND_REVERSE src AND (NOT dst)
7042 wx.CLEAR 0
7043 wx.COPY src
7044 wx.EQUIV (NOT src) XOR dst
7045 wx.INVERT NOT dst
7046 wx.NAND (NOT src) OR (NOT dst)
7047 wx.NOR (NOT src) AND (NOT dst)
7048 wx.NO_OP dst
7049 wx.OR src OR dst
7050 wx.OR_INVERT (NOT src) OR dst
7051 wx.OR_REVERSE src OR (NOT dst)
7052 wx.SET 1
7053 wx.SRC_INVERT NOT src
7054 wx.XOR src XOR dst
7055 ================ ==========================
7056
7057 The default is wx.COPY, which simply draws with the current
7058 colour. The others combine the current colour and the background using
7059 a logical operation. wx.INVERT is commonly used for drawing rubber
7060 bands or moving outlines, since drawing twice reverts to the original
7061 colour.
7062
7063 """
7064 return _gdi_.PseudoDC_SetLogicalFunction(*args, **kwargs)
7065
7066 IdBounds = property(GetIdBounds,SetIdBounds,doc="See `GetIdBounds` and `SetIdBounds`")
7067 Len = property(GetLen,doc="See `GetLen`")
7068 _gdi_.PseudoDC_swigregister(PseudoDC)
7069
7070
7071