1 # This file was created automatically by SWIG 1.3.29.
2 # Don't modify this file, modify the SWIG interface instead.
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
)
10 if type(value
).__name
__ == 'PySwigObject':
11 self
.__dict
__[name
] = value
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
18 raise AttributeError("You cannot add attributes to %s" % self
)
20 def _swig_setattr(self
,class_type
,name
,value
):
21 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
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
30 try: strthis
= "proxy of " + self
.this
.__repr
__()
32 return "<%s.%s; %s >" % (self
.__class
__.__module
__, self
.__class
__.__name
__, strthis
,)
36 _object
= types
.ObjectType
38 except AttributeError:
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"):
50 raise AttributeError("You cannot add attributes to %s" % self
)
56 #---------------------------------------------------------------------------
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')
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
)
71 GDIObject_swigregister
= _gdi_
.GDIObject_swigregister
72 GDIObject_swigregister(GDIObject
)
74 #---------------------------------------------------------------------------
76 C2S_NAME
= _gdi_
.C2S_NAME
77 C2S_CSS_SYNTAX
= _gdi_
.C2S_CSS_SYNTAX
78 C2S_HTML_SYNTAX
= _gdi_
.C2S_HTML_SYNTAX
79 class Colour(_core
.Object
):
81 A colour is an object representing a combination of Red, Green, and
82 Blue (RGB) intensity values, and is used to determine drawing colours,
83 window colours, etc. Valid RGB values are in the range 0 to 255.
85 In wxPython there are typemaps that will automatically convert from a
86 colour name, from a '#RRGGBB' colour hex value string, or from a 3
87 integer tuple to a wx.Colour object when calling C++ methods that
88 expect a wxColour. This means that the following are all
91 win.SetBackgroundColour(wxColour(0,0,255))
92 win.SetBackgroundColour('BLUE')
93 win.SetBackgroundColour('#0000FF')
94 win.SetBackgroundColour((0,0,255))
96 Additional colour names and their coresponding values can be added
97 using `wx.ColourDatabase`. Various system colours (as set in the
98 user's system preferences) can be retrieved with
99 `wx.SystemSettings.GetColour`.
102 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
103 __repr__
= _swig_repr
104 def __init__(self
, *args
, **kwargs
):
106 __init__(self, byte red=0, byte green=0, byte blue=0) -> Colour
108 Constructs a colour from red, green and blue values.
110 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
113 _gdi_
.Colour_swiginit(self
,_gdi_
.new_Colour(*args
, **kwargs
))
114 __swig_destroy__
= _gdi_
.delete_Colour
115 __del__
= lambda self
: None;
116 def Red(*args
, **kwargs
):
120 Returns the red intensity.
122 return _gdi_
.Colour_Red(*args
, **kwargs
)
124 def Green(*args
, **kwargs
):
128 Returns the green intensity.
130 return _gdi_
.Colour_Green(*args
, **kwargs
)
132 def Blue(*args
, **kwargs
):
136 Returns the blue intensity.
138 return _gdi_
.Colour_Blue(*args
, **kwargs
)
140 def Ok(*args
, **kwargs
):
144 Returns True if the colour object is valid (the colour has been
145 initialised with RGB values).
147 return _gdi_
.Colour_Ok(*args
, **kwargs
)
149 def Set(*args
, **kwargs
):
151 Set(self, byte red, byte green, byte blue)
153 Sets the RGB intensity values.
155 return _gdi_
.Colour_Set(*args
, **kwargs
)
157 def SetRGB(*args
, **kwargs
):
159 SetRGB(self, unsigned long colRGB)
161 Sets the RGB intensity values from a packed RGB value.
163 return _gdi_
.Colour_SetRGB(*args
, **kwargs
)
165 def SetFromName(*args
, **kwargs
):
167 SetFromName(self, String colourName)
169 Sets the RGB intensity values using a colour name listed in
170 ``wx.TheColourDatabase``.
172 return _gdi_
.Colour_SetFromName(*args
, **kwargs
)
174 def GetAsString(*args
, **kwargs
):
176 GetAsString(self, long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) -> String
178 Return the colour as a string. Acceptable flags are:
180 =================== ==================================
181 wx.C2S_NAME return colour name, when possible
182 wx.C2S_CSS_SYNTAX return colour in rgb(r,g,b) syntax
183 wx.C2S_HTML_SYNTAX return colour in #rrggbb syntax
184 =================== ==================================
186 return _gdi_
.Colour_GetAsString(*args
, **kwargs
)
188 def GetPixel(*args
, **kwargs
):
190 GetPixel(self) -> long
192 Returns a pixel value which is platform-dependent. On Windows, a
193 COLORREF is returned. On X, an allocated pixel value is returned. -1
194 is returned if the pixel is invalid (on X, unallocated).
196 return _gdi_
.Colour_GetPixel(*args
, **kwargs
)
198 def __eq__(*args
, **kwargs
):
200 __eq__(self, PyObject other) -> bool
202 Compare colours for equality.
204 return _gdi_
.Colour___eq__(*args
, **kwargs
)
206 def __ne__(*args
, **kwargs
):
208 __ne__(self, PyObject other) -> bool
210 Compare colours for inequality.
212 return _gdi_
.Colour___ne__(*args
, **kwargs
)
214 def Get(*args
, **kwargs
):
218 Returns the RGB intensity values as a tuple.
220 return _gdi_
.Colour_Get(*args
, **kwargs
)
222 def GetRGB(*args
, **kwargs
):
224 GetRGB(self) -> unsigned long
226 Return the colour as a packed RGB value
228 return _gdi_
.Colour_GetRGB(*args
, **kwargs
)
230 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
231 def __str__(self
): return str(self
.Get())
232 def __repr__(self
): return 'wx.Colour' + str(self
.Get())
233 def __nonzero__(self
): return self
.Ok()
234 __safe_for_unpickling__
= True
235 def __reduce__(self
): return (Colour
, self
.Get())
237 Colour_swigregister
= _gdi_
.Colour_swigregister
238 Colour_swigregister(Colour
)
240 def NamedColour(*args
, **kwargs
):
242 NamedColour(String colorName) -> Colour
244 Constructs a colour object using a colour name listed in
245 ``wx.TheColourDatabase``.
247 val
= _gdi_
.new_NamedColour(*args
, **kwargs
)
250 def ColourRGB(*args
, **kwargs
):
252 ColourRGB(unsigned long colRGB) -> Colour
254 Constructs a colour from a packed RGB value.
256 val
= _gdi_
.new_ColourRGB(*args
, **kwargs
)
260 NamedColor
= NamedColour
263 class Palette(GDIObject
):
264 """Proxy of C++ Palette class"""
265 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
266 __repr__
= _swig_repr
267 def __init__(self
, *args
, **kwargs
):
268 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
269 _gdi_
.Palette_swiginit(self
,_gdi_
.new_Palette(*args
, **kwargs
))
270 __swig_destroy__
= _gdi_
.delete_Palette
271 __del__
= lambda self
: None;
272 def GetPixel(*args
, **kwargs
):
273 """GetPixel(self, byte red, byte green, byte blue) -> int"""
274 return _gdi_
.Palette_GetPixel(*args
, **kwargs
)
276 def GetRGB(*args
, **kwargs
):
277 """GetRGB(self, int pixel) -> (R,G,B)"""
278 return _gdi_
.Palette_GetRGB(*args
, **kwargs
)
280 def GetColoursCount(*args
, **kwargs
):
281 """GetColoursCount(self) -> int"""
282 return _gdi_
.Palette_GetColoursCount(*args
, **kwargs
)
284 def Ok(*args
, **kwargs
):
285 """Ok(self) -> bool"""
286 return _gdi_
.Palette_Ok(*args
, **kwargs
)
288 def __nonzero__(self
): return self
.Ok()
289 Palette_swigregister
= _gdi_
.Palette_swigregister
290 Palette_swigregister(Palette
)
292 #---------------------------------------------------------------------------
294 class Pen(GDIObject
):
295 """Proxy of C++ Pen class"""
296 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
297 __repr__
= _swig_repr
298 def __init__(self
, *args
, **kwargs
):
299 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
300 _gdi_
.Pen_swiginit(self
,_gdi_
.new_Pen(*args
, **kwargs
))
301 __swig_destroy__
= _gdi_
.delete_Pen
302 __del__
= lambda self
: None;
303 def GetCap(*args
, **kwargs
):
304 """GetCap(self) -> int"""
305 return _gdi_
.Pen_GetCap(*args
, **kwargs
)
307 def GetColour(*args
, **kwargs
):
308 """GetColour(self) -> Colour"""
309 return _gdi_
.Pen_GetColour(*args
, **kwargs
)
311 def GetJoin(*args
, **kwargs
):
312 """GetJoin(self) -> int"""
313 return _gdi_
.Pen_GetJoin(*args
, **kwargs
)
315 def GetStyle(*args
, **kwargs
):
316 """GetStyle(self) -> int"""
317 return _gdi_
.Pen_GetStyle(*args
, **kwargs
)
319 def GetWidth(*args
, **kwargs
):
320 """GetWidth(self) -> int"""
321 return _gdi_
.Pen_GetWidth(*args
, **kwargs
)
323 def Ok(*args
, **kwargs
):
324 """Ok(self) -> bool"""
325 return _gdi_
.Pen_Ok(*args
, **kwargs
)
327 def SetCap(*args
, **kwargs
):
328 """SetCap(self, int cap_style)"""
329 return _gdi_
.Pen_SetCap(*args
, **kwargs
)
331 def SetColour(*args
, **kwargs
):
332 """SetColour(self, Colour colour)"""
333 return _gdi_
.Pen_SetColour(*args
, **kwargs
)
335 def SetJoin(*args
, **kwargs
):
336 """SetJoin(self, int join_style)"""
337 return _gdi_
.Pen_SetJoin(*args
, **kwargs
)
339 def SetStyle(*args
, **kwargs
):
340 """SetStyle(self, int style)"""
341 return _gdi_
.Pen_SetStyle(*args
, **kwargs
)
343 def SetWidth(*args
, **kwargs
):
344 """SetWidth(self, int width)"""
345 return _gdi_
.Pen_SetWidth(*args
, **kwargs
)
347 def SetDashes(*args
, **kwargs
):
348 """SetDashes(self, int dashes)"""
349 return _gdi_
.Pen_SetDashes(*args
, **kwargs
)
351 def GetDashes(*args
, **kwargs
):
352 """GetDashes(self) -> PyObject"""
353 return _gdi_
.Pen_GetDashes(*args
, **kwargs
)
355 def _SetDashes(*args
, **kwargs
):
356 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
357 return _gdi_
.Pen__SetDashes(*args
, **kwargs
)
359 def SetDashes(self
, dashes
):
361 Associate a list of dash lengths with the Pen.
363 self
._SetDashes
(self
, dashes
)
365 def GetDashCount(*args
, **kwargs
):
366 """GetDashCount(self) -> int"""
367 return _gdi_
.Pen_GetDashCount(*args
, **kwargs
)
369 def __eq__(*args
, **kwargs
):
370 """__eq__(self, Pen other) -> bool"""
371 return _gdi_
.Pen___eq__(*args
, **kwargs
)
373 def __ne__(*args
, **kwargs
):
374 """__ne__(self, Pen other) -> bool"""
375 return _gdi_
.Pen___ne__(*args
, **kwargs
)
377 def __nonzero__(self
): return self
.Ok()
378 Pen_swigregister
= _gdi_
.Pen_swigregister
379 Pen_swigregister(Pen
)
381 #---------------------------------------------------------------------------
383 class Brush(GDIObject
):
385 A brush is a drawing tool for filling in areas. It is used for
386 painting the background of rectangles, ellipses, etc. when drawing on
387 a `wx.DC`. It has a colour and a style.
389 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
390 __repr__
= _swig_repr
391 def __init__(self
, *args
, **kwargs
):
393 __init__(self, Colour colour, int style=SOLID) -> Brush
395 Constructs a brush from a `wx.Colour` object and a style.
397 _gdi_
.Brush_swiginit(self
,_gdi_
.new_Brush(*args
, **kwargs
))
398 __swig_destroy__
= _gdi_
.delete_Brush
399 __del__
= lambda self
: None;
400 def SetColour(*args
, **kwargs
):
402 SetColour(self, Colour col)
404 Set the brush's `wx.Colour`.
406 return _gdi_
.Brush_SetColour(*args
, **kwargs
)
408 def SetStyle(*args
, **kwargs
):
410 SetStyle(self, int style)
412 Sets the style of the brush. See `__init__` for a listing of styles.
414 return _gdi_
.Brush_SetStyle(*args
, **kwargs
)
416 def SetStipple(*args
, **kwargs
):
418 SetStipple(self, Bitmap stipple)
420 Sets the stipple `wx.Bitmap`.
422 return _gdi_
.Brush_SetStipple(*args
, **kwargs
)
424 def GetColour(*args
, **kwargs
):
426 GetColour(self) -> Colour
428 Returns the `wx.Colour` of the brush.
430 return _gdi_
.Brush_GetColour(*args
, **kwargs
)
432 def GetStyle(*args
, **kwargs
):
434 GetStyle(self) -> int
436 Returns the style of the brush. See `__init__` for a listing of
439 return _gdi_
.Brush_GetStyle(*args
, **kwargs
)
441 def GetStipple(*args
, **kwargs
):
443 GetStipple(self) -> Bitmap
445 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
446 have a wx.STIPPLE style, then the return value may be non-None but an
447 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
449 return _gdi_
.Brush_GetStipple(*args
, **kwargs
)
451 def IsHatch(*args
, **kwargs
):
453 IsHatch(self) -> bool
455 Is the current style a hatch type?
457 return _gdi_
.Brush_IsHatch(*args
, **kwargs
)
459 def Ok(*args
, **kwargs
):
463 Returns True if the brush is initialised and valid.
465 return _gdi_
.Brush_Ok(*args
, **kwargs
)
467 def __nonzero__(self
): return self
.Ok()
468 Brush_swigregister
= _gdi_
.Brush_swigregister
469 Brush_swigregister(Brush
)
471 def BrushFromBitmap(*args
, **kwargs
):
473 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
475 Constructs a stippled brush using a bitmap.
477 val
= _gdi_
.new_BrushFromBitmap(*args
, **kwargs
)
480 class Bitmap(GDIObject
):
482 The wx.Bitmap class encapsulates the concept of a platform-dependent
483 bitmap. It can be either monochrome or colour, and either loaded from
484 a file or created dynamically. A bitmap can be selected into a memory
485 device context (instance of `wx.MemoryDC`). This enables the bitmap to
486 be copied to a window or memory device context using `wx.DC.Blit`, or
487 to be used as a drawing surface.
489 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
490 __repr__
= _swig_repr
491 def __init__(self
, *args
, **kwargs
):
493 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
495 Loads a bitmap from a file.
497 _gdi_
.Bitmap_swiginit(self
,_gdi_
.new_Bitmap(*args
, **kwargs
))
498 __swig_destroy__
= _gdi_
.delete_Bitmap
499 __del__
= lambda self
: None;
500 def Ok(*args
, **kwargs
):
501 """Ok(self) -> bool"""
502 return _gdi_
.Bitmap_Ok(*args
, **kwargs
)
504 def GetWidth(*args
, **kwargs
):
506 GetWidth(self) -> int
508 Gets the width of the bitmap in pixels.
510 return _gdi_
.Bitmap_GetWidth(*args
, **kwargs
)
512 def GetHeight(*args
, **kwargs
):
514 GetHeight(self) -> int
516 Gets the height of the bitmap in pixels.
518 return _gdi_
.Bitmap_GetHeight(*args
, **kwargs
)
520 def GetDepth(*args
, **kwargs
):
522 GetDepth(self) -> int
524 Gets the colour depth of the bitmap. A value of 1 indicates a
527 return _gdi_
.Bitmap_GetDepth(*args
, **kwargs
)
529 def GetSize(*args
, **kwargs
):
531 GetSize(self) -> Size
533 Get the size of the bitmap.
535 return _gdi_
.Bitmap_GetSize(*args
, **kwargs
)
537 def ConvertToImage(*args
, **kwargs
):
539 ConvertToImage(self) -> Image
541 Creates a platform-independent image from a platform-dependent
542 bitmap. This preserves mask information so that bitmaps and images can
543 be converted back and forth without loss in that respect.
545 return _gdi_
.Bitmap_ConvertToImage(*args
, **kwargs
)
547 def GetMask(*args
, **kwargs
):
549 GetMask(self) -> Mask
551 Gets the associated mask (if any) which may have been loaded from a
552 file or explpicitly set for the bitmap.
554 :see: `SetMask`, `wx.Mask`
557 return _gdi_
.Bitmap_GetMask(*args
, **kwargs
)
559 def SetMask(*args
, **kwargs
):
561 SetMask(self, Mask mask)
563 Sets the mask for this bitmap.
565 :see: `GetMask`, `wx.Mask`
568 return _gdi_
.Bitmap_SetMask(*args
, **kwargs
)
570 def SetMaskColour(*args
, **kwargs
):
572 SetMaskColour(self, Colour colour)
574 Create a Mask based on a specified colour in the Bitmap.
576 return _gdi_
.Bitmap_SetMaskColour(*args
, **kwargs
)
578 def GetSubBitmap(*args
, **kwargs
):
580 GetSubBitmap(self, Rect rect) -> Bitmap
582 Returns a sub-bitmap of the current one as long as the rect belongs
583 entirely to the bitmap. This function preserves bit depth and mask
586 return _gdi_
.Bitmap_GetSubBitmap(*args
, **kwargs
)
588 def SaveFile(*args
, **kwargs
):
590 SaveFile(self, String name, int type, Palette palette=None) -> bool
592 Saves a bitmap in the named file. See `__init__` for a description of
593 the ``type`` parameter.
595 return _gdi_
.Bitmap_SaveFile(*args
, **kwargs
)
597 def LoadFile(*args
, **kwargs
):
599 LoadFile(self, String name, int type) -> bool
601 Loads a bitmap from a file. See `__init__` for a description of the
604 return _gdi_
.Bitmap_LoadFile(*args
, **kwargs
)
606 def GetPalette(*args
, **kwargs
):
607 """GetPalette(self) -> Palette"""
608 return _gdi_
.Bitmap_GetPalette(*args
, **kwargs
)
610 def CopyFromIcon(*args
, **kwargs
):
611 """CopyFromIcon(self, Icon icon) -> bool"""
612 return _gdi_
.Bitmap_CopyFromIcon(*args
, **kwargs
)
614 def SetHeight(*args
, **kwargs
):
616 SetHeight(self, int height)
618 Set the height property (does not affect the existing bitmap data).
620 return _gdi_
.Bitmap_SetHeight(*args
, **kwargs
)
622 def SetWidth(*args
, **kwargs
):
624 SetWidth(self, int width)
626 Set the width property (does not affect the existing bitmap data).
628 return _gdi_
.Bitmap_SetWidth(*args
, **kwargs
)
630 def SetDepth(*args
, **kwargs
):
632 SetDepth(self, int depth)
634 Set the depth property (does not affect the existing bitmap data).
636 return _gdi_
.Bitmap_SetDepth(*args
, **kwargs
)
638 def SetSize(*args
, **kwargs
):
640 SetSize(self, Size size)
642 Set the bitmap size (does not affect the existing bitmap data).
644 return _gdi_
.Bitmap_SetSize(*args
, **kwargs
)
646 def __nonzero__(self
): return self
.Ok()
647 def __eq__(*args
, **kwargs
):
648 """__eq__(self, Bitmap other) -> bool"""
649 return _gdi_
.Bitmap___eq__(*args
, **kwargs
)
651 def __ne__(*args
, **kwargs
):
652 """__ne__(self, Bitmap other) -> bool"""
653 return _gdi_
.Bitmap___ne__(*args
, **kwargs
)
655 Bitmap_swigregister
= _gdi_
.Bitmap_swigregister
656 Bitmap_swigregister(Bitmap
)
658 def EmptyBitmap(*args
, **kwargs
):
660 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
662 Creates a new bitmap of the given size. A depth of -1 indicates the
663 depth of the current screen or visual. Some platforms only support 1
664 for monochrome and -1 for the current display depth.
666 val
= _gdi_
.new_EmptyBitmap(*args
, **kwargs
)
669 def BitmapFromIcon(*args
, **kwargs
):
671 BitmapFromIcon(Icon icon) -> Bitmap
673 Create a new bitmap from a `wx.Icon` object.
675 val
= _gdi_
.new_BitmapFromIcon(*args
, **kwargs
)
678 def BitmapFromImage(*args
, **kwargs
):
680 BitmapFromImage(Image image, int depth=-1) -> Bitmap
682 Creates bitmap object from a `wx.Image`. This has to be done to
683 actually display a `wx.Image` as you cannot draw an image directly on
684 a window. The resulting bitmap will use the provided colour depth (or
685 that of the current screen colour depth if depth is -1) which entails
686 that a colour reduction may have to take place.
688 val
= _gdi_
.new_BitmapFromImage(*args
, **kwargs
)
691 def BitmapFromXPMData(*args
, **kwargs
):
693 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
695 Construct a Bitmap from a list of strings formatted as XPM data.
697 val
= _gdi_
.new_BitmapFromXPMData(*args
, **kwargs
)
700 def BitmapFromBits(*args
, **kwargs
):
702 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
704 Creates a bitmap from an array of bits. You should only use this
705 function for monochrome bitmaps (depth 1) in portable programs: in
706 this case the bits parameter should contain an XBM image. For other
707 bit depths, the behaviour is platform dependent.
709 val
= _gdi_
.new_BitmapFromBits(*args
, **kwargs
)
712 class Mask(_core
.Object
):
714 This class encapsulates a monochrome mask bitmap, where the masked
715 area is black and the unmasked area is white. When associated with a
716 bitmap and drawn in a device context, the unmasked area of the bitmap
717 will be drawn, and the masked area will not be drawn.
719 A mask may be associated with a `wx.Bitmap`. It is used in
720 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
721 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
724 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
725 __repr__
= _swig_repr
726 def __init__(self
, *args
, **kwargs
):
728 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
730 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
731 that indicates the transparent portions of the mask. In other words,
732 the pixels in ``bitmap`` that match ``colour`` will be the transparent
733 portions of the mask. If no ``colour`` or an invalid ``colour`` is
734 passed then BLACK is used.
736 :see: `wx.Bitmap`, `wx.Colour`
738 _gdi_
.Mask_swiginit(self
,_gdi_
.new_Mask(*args
, **kwargs
))
739 __swig_destroy__
= _gdi_
.delete_Mask
740 __del__
= lambda self
: None;
741 Mask_swigregister
= _gdi_
.Mask_swigregister
742 Mask_swigregister(Mask
)
744 MaskColour
= wx
._deprecated
(Mask
, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
745 class Icon(GDIObject
):
746 """Proxy of C++ Icon class"""
747 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
748 __repr__
= _swig_repr
749 def __init__(self
, *args
, **kwargs
):
750 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
751 _gdi_
.Icon_swiginit(self
,_gdi_
.new_Icon(*args
, **kwargs
))
752 __swig_destroy__
= _gdi_
.delete_Icon
753 __del__
= lambda self
: None;
754 def LoadFile(*args
, **kwargs
):
755 """LoadFile(self, String name, int type) -> bool"""
756 return _gdi_
.Icon_LoadFile(*args
, **kwargs
)
758 def Ok(*args
, **kwargs
):
759 """Ok(self) -> bool"""
760 return _gdi_
.Icon_Ok(*args
, **kwargs
)
762 def GetWidth(*args
, **kwargs
):
763 """GetWidth(self) -> int"""
764 return _gdi_
.Icon_GetWidth(*args
, **kwargs
)
766 def GetHeight(*args
, **kwargs
):
767 """GetHeight(self) -> int"""
768 return _gdi_
.Icon_GetHeight(*args
, **kwargs
)
770 def GetDepth(*args
, **kwargs
):
771 """GetDepth(self) -> int"""
772 return _gdi_
.Icon_GetDepth(*args
, **kwargs
)
774 def SetWidth(*args
, **kwargs
):
775 """SetWidth(self, int w)"""
776 return _gdi_
.Icon_SetWidth(*args
, **kwargs
)
778 def SetHeight(*args
, **kwargs
):
779 """SetHeight(self, int h)"""
780 return _gdi_
.Icon_SetHeight(*args
, **kwargs
)
782 def SetDepth(*args
, **kwargs
):
783 """SetDepth(self, int d)"""
784 return _gdi_
.Icon_SetDepth(*args
, **kwargs
)
786 def CopyFromBitmap(*args
, **kwargs
):
787 """CopyFromBitmap(self, Bitmap bmp)"""
788 return _gdi_
.Icon_CopyFromBitmap(*args
, **kwargs
)
790 def __nonzero__(self
): return self
.Ok()
791 Icon_swigregister
= _gdi_
.Icon_swigregister
792 Icon_swigregister(Icon
)
794 def EmptyIcon(*args
, **kwargs
):
795 """EmptyIcon() -> Icon"""
796 val
= _gdi_
.new_EmptyIcon(*args
, **kwargs
)
799 def IconFromLocation(*args
, **kwargs
):
800 """IconFromLocation(IconLocation loc) -> Icon"""
801 val
= _gdi_
.new_IconFromLocation(*args
, **kwargs
)
804 def IconFromBitmap(*args
, **kwargs
):
805 """IconFromBitmap(Bitmap bmp) -> Icon"""
806 val
= _gdi_
.new_IconFromBitmap(*args
, **kwargs
)
809 def IconFromXPMData(*args
, **kwargs
):
810 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
811 val
= _gdi_
.new_IconFromXPMData(*args
, **kwargs
)
814 class IconLocation(object):
815 """Proxy of C++ IconLocation class"""
816 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
817 __repr__
= _swig_repr
818 def __init__(self
, *args
, **kwargs
):
819 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
820 _gdi_
.IconLocation_swiginit(self
,_gdi_
.new_IconLocation(*args
, **kwargs
))
821 __swig_destroy__
= _gdi_
.delete_IconLocation
822 __del__
= lambda self
: None;
823 def IsOk(*args
, **kwargs
):
824 """IsOk(self) -> bool"""
825 return _gdi_
.IconLocation_IsOk(*args
, **kwargs
)
827 def __nonzero__(self
): return self
.Ok()
828 def SetFileName(*args
, **kwargs
):
829 """SetFileName(self, String filename)"""
830 return _gdi_
.IconLocation_SetFileName(*args
, **kwargs
)
832 def GetFileName(*args
, **kwargs
):
833 """GetFileName(self) -> String"""
834 return _gdi_
.IconLocation_GetFileName(*args
, **kwargs
)
836 def SetIndex(*args
, **kwargs
):
837 """SetIndex(self, int num)"""
838 return _gdi_
.IconLocation_SetIndex(*args
, **kwargs
)
840 def GetIndex(*args
, **kwargs
):
841 """GetIndex(self) -> int"""
842 return _gdi_
.IconLocation_GetIndex(*args
, **kwargs
)
844 IconLocation_swigregister
= _gdi_
.IconLocation_swigregister
845 IconLocation_swigregister(IconLocation
)
847 class IconBundle(object):
848 """Proxy of C++ IconBundle class"""
849 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
850 __repr__
= _swig_repr
851 def __init__(self
, *args
, **kwargs
):
852 """__init__(self) -> IconBundle"""
853 _gdi_
.IconBundle_swiginit(self
,_gdi_
.new_IconBundle(*args
, **kwargs
))
854 __swig_destroy__
= _gdi_
.delete_IconBundle
855 __del__
= lambda self
: None;
856 def AddIcon(*args
, **kwargs
):
857 """AddIcon(self, Icon icon)"""
858 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
860 def AddIconFromFile(*args
, **kwargs
):
861 """AddIconFromFile(self, String file, long type)"""
862 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
864 def GetIcon(*args
, **kwargs
):
865 """GetIcon(self, Size size) -> Icon"""
866 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
868 IconBundle_swigregister
= _gdi_
.IconBundle_swigregister
869 IconBundle_swigregister(IconBundle
)
871 def IconBundleFromFile(*args
, **kwargs
):
872 """IconBundleFromFile(String file, long type) -> IconBundle"""
873 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
876 def IconBundleFromIcon(*args
, **kwargs
):
877 """IconBundleFromIcon(Icon icon) -> IconBundle"""
878 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
881 class Cursor(GDIObject
):
883 A cursor is a small bitmap usually used for denoting where the mouse
884 pointer is, with a picture that might indicate the interpretation of a
887 A single cursor object may be used in many windows (any subwindow
888 type). The wxWindows convention is to set the cursor for a window, as
889 in X, rather than to set it globally as in MS Windows, although a
890 global `wx.SetCursor` function is also available for use on MS Windows.
893 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
894 __repr__
= _swig_repr
895 def __init__(self
, *args
, **kwargs
):
897 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
899 Construct a Cursor from a file. Specify the type of file using
900 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
903 _gdi_
.Cursor_swiginit(self
,_gdi_
.new_Cursor(*args
, **kwargs
))
904 __swig_destroy__
= _gdi_
.delete_Cursor
905 __del__
= lambda self
: None;
906 def Ok(*args
, **kwargs
):
907 """Ok(self) -> bool"""
908 return _gdi_
.Cursor_Ok(*args
, **kwargs
)
910 def __nonzero__(self
): return self
.Ok()
911 Cursor_swigregister
= _gdi_
.Cursor_swigregister
912 Cursor_swigregister(Cursor
)
914 def StockCursor(*args
, **kwargs
):
916 StockCursor(int id) -> Cursor
918 Create a cursor using one of the stock cursors. Note that not all
919 stock cursors are available on all platforms.
921 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
924 def CursorFromImage(*args
, **kwargs
):
926 CursorFromImage(Image image) -> Cursor
928 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
929 for setting the transparent portions of the cursor.
931 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
934 #---------------------------------------------------------------------------
936 OutRegion
= _gdi_
.OutRegion
937 PartRegion
= _gdi_
.PartRegion
938 InRegion
= _gdi_
.InRegion
939 class Region(GDIObject
):
940 """Proxy of C++ Region class"""
941 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
942 __repr__
= _swig_repr
943 def __init__(self
, *args
, **kwargs
):
944 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
945 _gdi_
.Region_swiginit(self
,_gdi_
.new_Region(*args
, **kwargs
))
946 __swig_destroy__
= _gdi_
.delete_Region
947 __del__
= lambda self
: None;
948 def Clear(*args
, **kwargs
):
950 return _gdi_
.Region_Clear(*args
, **kwargs
)
952 def Offset(*args
, **kwargs
):
953 """Offset(self, int x, int y) -> bool"""
954 return _gdi_
.Region_Offset(*args
, **kwargs
)
956 def Contains(*args
, **kwargs
):
957 """Contains(self, int x, int y) -> int"""
958 return _gdi_
.Region_Contains(*args
, **kwargs
)
960 def ContainsPoint(*args
, **kwargs
):
961 """ContainsPoint(self, Point pt) -> int"""
962 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
964 def ContainsRect(*args
, **kwargs
):
965 """ContainsRect(self, Rect rect) -> int"""
966 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
968 def ContainsRectDim(*args
, **kwargs
):
969 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
970 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
972 def GetBox(*args
, **kwargs
):
973 """GetBox(self) -> Rect"""
974 return _gdi_
.Region_GetBox(*args
, **kwargs
)
976 def Intersect(*args
, **kwargs
):
977 """Intersect(self, int x, int y, int width, int height) -> bool"""
978 return _gdi_
.Region_Intersect(*args
, **kwargs
)
980 def IntersectRect(*args
, **kwargs
):
981 """IntersectRect(self, Rect rect) -> bool"""
982 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
984 def IntersectRegion(*args
, **kwargs
):
985 """IntersectRegion(self, Region region) -> bool"""
986 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
988 def IsEmpty(*args
, **kwargs
):
989 """IsEmpty(self) -> bool"""
990 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
992 def Union(*args
, **kwargs
):
993 """Union(self, int x, int y, int width, int height) -> bool"""
994 return _gdi_
.Region_Union(*args
, **kwargs
)
996 def UnionRect(*args
, **kwargs
):
997 """UnionRect(self, Rect rect) -> bool"""
998 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1000 def UnionRegion(*args
, **kwargs
):
1001 """UnionRegion(self, Region region) -> bool"""
1002 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1004 def Subtract(*args
, **kwargs
):
1005 """Subtract(self, int x, int y, int width, int height) -> bool"""
1006 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1008 def SubtractRect(*args
, **kwargs
):
1009 """SubtractRect(self, Rect rect) -> bool"""
1010 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1012 def SubtractRegion(*args
, **kwargs
):
1013 """SubtractRegion(self, Region region) -> bool"""
1014 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1016 def Xor(*args
, **kwargs
):
1017 """Xor(self, int x, int y, int width, int height) -> bool"""
1018 return _gdi_
.Region_Xor(*args
, **kwargs
)
1020 def XorRect(*args
, **kwargs
):
1021 """XorRect(self, Rect rect) -> bool"""
1022 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1024 def XorRegion(*args
, **kwargs
):
1025 """XorRegion(self, Region region) -> bool"""
1026 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1028 def ConvertToBitmap(*args
, **kwargs
):
1029 """ConvertToBitmap(self) -> Bitmap"""
1030 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1032 def UnionBitmap(*args
, **kwargs
):
1033 """UnionBitmap(self, Bitmap bmp) -> bool"""
1034 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1036 def UnionBitmapColour(*args
, **kwargs
):
1037 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1038 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1040 Region_swigregister
= _gdi_
.Region_swigregister
1041 Region_swigregister(Region
)
1043 def RegionFromBitmap(*args
, **kwargs
):
1044 """RegionFromBitmap(Bitmap bmp) -> Region"""
1045 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1048 def RegionFromBitmapColour(*args
, **kwargs
):
1049 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1050 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1053 def RegionFromPoints(*args
, **kwargs
):
1054 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1055 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1058 class RegionIterator(_core
.Object
):
1059 """Proxy of C++ RegionIterator class"""
1060 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1061 __repr__
= _swig_repr
1062 def __init__(self
, *args
, **kwargs
):
1063 """__init__(self, Region region) -> RegionIterator"""
1064 _gdi_
.RegionIterator_swiginit(self
,_gdi_
.new_RegionIterator(*args
, **kwargs
))
1065 __swig_destroy__
= _gdi_
.delete_RegionIterator
1066 __del__
= lambda self
: None;
1067 def GetX(*args
, **kwargs
):
1068 """GetX(self) -> int"""
1069 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1071 def GetY(*args
, **kwargs
):
1072 """GetY(self) -> int"""
1073 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1075 def GetW(*args
, **kwargs
):
1076 """GetW(self) -> int"""
1077 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1079 def GetWidth(*args
, **kwargs
):
1080 """GetWidth(self) -> int"""
1081 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1083 def GetH(*args
, **kwargs
):
1084 """GetH(self) -> int"""
1085 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1087 def GetHeight(*args
, **kwargs
):
1088 """GetHeight(self) -> int"""
1089 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1091 def GetRect(*args
, **kwargs
):
1092 """GetRect(self) -> Rect"""
1093 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1095 def HaveRects(*args
, **kwargs
):
1096 """HaveRects(self) -> bool"""
1097 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1099 def Reset(*args
, **kwargs
):
1101 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1103 def Next(*args
, **kwargs
):
1105 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1107 def __nonzero__(*args
, **kwargs
):
1108 """__nonzero__(self) -> bool"""
1109 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1111 RegionIterator_swigregister
= _gdi_
.RegionIterator_swigregister
1112 RegionIterator_swigregister(RegionIterator
)
1114 #---------------------------------------------------------------------------
1116 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1117 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1118 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1119 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1120 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1121 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1122 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1123 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1124 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1125 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1126 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1127 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1128 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1129 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1130 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1131 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1132 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1133 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1134 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1135 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1136 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1137 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1138 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1139 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1140 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1141 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1142 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1143 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1144 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1145 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1146 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1147 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1148 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1149 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1150 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1151 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1152 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1153 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1154 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1155 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1156 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1157 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1158 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1159 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1160 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1161 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1162 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1163 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1164 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1165 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1166 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1167 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1168 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1169 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1170 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1171 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1172 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1173 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1174 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1175 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1176 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1177 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1178 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1179 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1180 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1181 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1182 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1183 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1184 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1185 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1186 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1187 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1188 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1189 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1190 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1191 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1192 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1193 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1194 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1195 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1196 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1197 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1198 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1199 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1200 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1201 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1202 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1203 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1204 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1205 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1206 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1207 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1208 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1209 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1210 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1211 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1212 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1213 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1214 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1215 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1216 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1217 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1218 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1219 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1220 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1221 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1222 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1223 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1224 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1225 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1226 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1227 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1228 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1229 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1230 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1231 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1232 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1233 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1234 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1235 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1236 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1237 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1238 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1239 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1240 #---------------------------------------------------------------------------
1242 class NativeFontInfo(object):
1243 """Proxy of C++ NativeFontInfo class"""
1244 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1245 __repr__
= _swig_repr
1246 def __init__(self
, *args
, **kwargs
):
1247 """__init__(self) -> NativeFontInfo"""
1248 _gdi_
.NativeFontInfo_swiginit(self
,_gdi_
.new_NativeFontInfo(*args
, **kwargs
))
1249 __swig_destroy__
= _gdi_
.delete_NativeFontInfo
1250 __del__
= lambda self
: None;
1251 def Init(*args
, **kwargs
):
1253 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1255 def InitFromFont(*args
, **kwargs
):
1256 """InitFromFont(self, Font font)"""
1257 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1259 def GetPointSize(*args
, **kwargs
):
1260 """GetPointSize(self) -> int"""
1261 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1263 def GetStyle(*args
, **kwargs
):
1264 """GetStyle(self) -> int"""
1265 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1267 def GetWeight(*args
, **kwargs
):
1268 """GetWeight(self) -> int"""
1269 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1271 def GetUnderlined(*args
, **kwargs
):
1272 """GetUnderlined(self) -> bool"""
1273 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1275 def GetFaceName(*args
, **kwargs
):
1276 """GetFaceName(self) -> String"""
1277 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1279 def GetFamily(*args
, **kwargs
):
1280 """GetFamily(self) -> int"""
1281 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1283 def GetEncoding(*args
, **kwargs
):
1284 """GetEncoding(self) -> int"""
1285 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1287 def SetPointSize(*args
, **kwargs
):
1288 """SetPointSize(self, int pointsize)"""
1289 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1291 def SetStyle(*args
, **kwargs
):
1292 """SetStyle(self, int style)"""
1293 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1295 def SetWeight(*args
, **kwargs
):
1296 """SetWeight(self, int weight)"""
1297 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1299 def SetUnderlined(*args
, **kwargs
):
1300 """SetUnderlined(self, bool underlined)"""
1301 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1303 def SetFaceName(*args
, **kwargs
):
1304 """SetFaceName(self, String facename)"""
1305 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1307 def SetFamily(*args
, **kwargs
):
1308 """SetFamily(self, int family)"""
1309 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1311 def SetEncoding(*args
, **kwargs
):
1312 """SetEncoding(self, int encoding)"""
1313 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1315 def FromString(*args
, **kwargs
):
1316 """FromString(self, String s) -> bool"""
1317 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1319 def ToString(*args
, **kwargs
):
1320 """ToString(self) -> String"""
1321 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1323 def __str__(*args
, **kwargs
):
1324 """__str__(self) -> String"""
1325 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1327 def FromUserString(*args
, **kwargs
):
1328 """FromUserString(self, String s) -> bool"""
1329 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1331 def ToUserString(*args
, **kwargs
):
1332 """ToUserString(self) -> String"""
1333 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1335 NativeFontInfo_swigregister
= _gdi_
.NativeFontInfo_swigregister
1336 NativeFontInfo_swigregister(NativeFontInfo
)
1338 class NativeEncodingInfo(object):
1339 """Proxy of C++ NativeEncodingInfo class"""
1340 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1341 __repr__
= _swig_repr
1342 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1343 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1344 def __init__(self
, *args
, **kwargs
):
1345 """__init__(self) -> NativeEncodingInfo"""
1346 _gdi_
.NativeEncodingInfo_swiginit(self
,_gdi_
.new_NativeEncodingInfo(*args
, **kwargs
))
1347 __swig_destroy__
= _gdi_
.delete_NativeEncodingInfo
1348 __del__
= lambda self
: None;
1349 def FromString(*args
, **kwargs
):
1350 """FromString(self, String s) -> bool"""
1351 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1353 def ToString(*args
, **kwargs
):
1354 """ToString(self) -> String"""
1355 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1357 NativeEncodingInfo_swigregister
= _gdi_
.NativeEncodingInfo_swigregister
1358 NativeEncodingInfo_swigregister(NativeEncodingInfo
)
1361 def GetNativeFontEncoding(*args
, **kwargs
):
1362 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1363 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1365 def TestFontEncoding(*args
, **kwargs
):
1366 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1367 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1368 #---------------------------------------------------------------------------
1370 class FontMapper(object):
1371 """Proxy of C++ FontMapper class"""
1372 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1373 __repr__
= _swig_repr
1374 def __init__(self
, *args
, **kwargs
):
1375 """__init__(self) -> FontMapper"""
1376 _gdi_
.FontMapper_swiginit(self
,_gdi_
.new_FontMapper(*args
, **kwargs
))
1377 __swig_destroy__
= _gdi_
.delete_FontMapper
1378 __del__
= lambda self
: None;
1379 def Get(*args
, **kwargs
):
1380 """Get() -> FontMapper"""
1381 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1383 Get
= staticmethod(Get
)
1384 def Set(*args
, **kwargs
):
1385 """Set(FontMapper mapper) -> FontMapper"""
1386 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1388 Set
= staticmethod(Set
)
1389 def CharsetToEncoding(*args
, **kwargs
):
1390 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1391 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1393 def GetSupportedEncodingsCount(*args
, **kwargs
):
1394 """GetSupportedEncodingsCount() -> size_t"""
1395 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1397 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1398 def GetEncoding(*args
, **kwargs
):
1399 """GetEncoding(size_t n) -> int"""
1400 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1402 GetEncoding
= staticmethod(GetEncoding
)
1403 def GetEncodingName(*args
, **kwargs
):
1404 """GetEncodingName(int encoding) -> String"""
1405 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1407 GetEncodingName
= staticmethod(GetEncodingName
)
1408 def GetEncodingDescription(*args
, **kwargs
):
1409 """GetEncodingDescription(int encoding) -> String"""
1410 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1412 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1413 def GetEncodingFromName(*args
, **kwargs
):
1414 """GetEncodingFromName(String name) -> int"""
1415 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1417 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1418 def SetConfigPath(*args
, **kwargs
):
1419 """SetConfigPath(self, String prefix)"""
1420 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1422 def GetDefaultConfigPath(*args
, **kwargs
):
1423 """GetDefaultConfigPath() -> String"""
1424 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1426 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1427 def GetAltForEncoding(*args
, **kwargs
):
1428 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1429 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1431 def IsEncodingAvailable(*args
, **kwargs
):
1432 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1433 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1435 def SetDialogParent(*args
, **kwargs
):
1436 """SetDialogParent(self, Window parent)"""
1437 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1439 def SetDialogTitle(*args
, **kwargs
):
1440 """SetDialogTitle(self, String title)"""
1441 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1443 FontMapper_swigregister
= _gdi_
.FontMapper_swigregister
1444 FontMapper_swigregister(FontMapper
)
1446 def FontMapper_Get(*args
):
1447 """FontMapper_Get() -> FontMapper"""
1448 return _gdi_
.FontMapper_Get(*args
)
1450 def FontMapper_Set(*args
, **kwargs
):
1451 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1452 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1454 def FontMapper_GetSupportedEncodingsCount(*args
):
1455 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1456 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
)
1458 def FontMapper_GetEncoding(*args
, **kwargs
):
1459 """FontMapper_GetEncoding(size_t n) -> int"""
1460 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1462 def FontMapper_GetEncodingName(*args
, **kwargs
):
1463 """FontMapper_GetEncodingName(int encoding) -> String"""
1464 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1466 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1467 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1468 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1470 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1471 """FontMapper_GetEncodingFromName(String name) -> int"""
1472 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1474 def FontMapper_GetDefaultConfigPath(*args
):
1475 """FontMapper_GetDefaultConfigPath() -> String"""
1476 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
)
1478 #---------------------------------------------------------------------------
1480 class Font(GDIObject
):
1482 A font is an object which determines the appearance of text. Fonts are
1483 used for drawing text to a device context, and setting the appearance
1486 You can retrieve the current system font settings with `wx.SystemSettings`.
1488 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1489 __repr__
= _swig_repr
1490 def __init__(self
, *args
, **kwargs
):
1492 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1493 String face=EmptyString,
1494 int encoding=FONTENCODING_DEFAULT) -> Font
1496 Creates a font object with the specified attributes.
1498 :param pointSize: The size of the font in points.
1500 :param family: Font family. A generic way of referring to fonts
1501 without specifying actual facename. It can be One of
1502 the ``wx.FONTFAMILY_xxx`` constants.
1504 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1506 :param weight: Font weight, sometimes also referred to as font
1507 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1509 :param underline: The value can be ``True`` or ``False`` and
1510 indicates whether the font will include an underline. This
1511 may not be supported on all platforms.
1513 :param face: An optional string specifying the actual typeface to
1514 be used. If it is an empty string, a default typeface will be
1515 chosen based on the family.
1517 :param encoding: An encoding which may be one of the
1518 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1519 available, no font is created.
1521 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1522 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1525 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1526 _gdi_
.Font_swiginit(self
,_gdi_
.new_Font(*args
, **kwargs
))
1527 __swig_destroy__
= _gdi_
.delete_Font
1528 __del__
= lambda self
: None;
1529 def Ok(*args
, **kwargs
):
1533 Returns ``True`` if this font was successfully created.
1535 return _gdi_
.Font_Ok(*args
, **kwargs
)
1537 def __nonzero__(self
): return self
.Ok()
1538 def __eq__(*args
, **kwargs
):
1539 """__eq__(self, Font other) -> bool"""
1540 return _gdi_
.Font___eq__(*args
, **kwargs
)
1542 def __ne__(*args
, **kwargs
):
1543 """__ne__(self, Font other) -> bool"""
1544 return _gdi_
.Font___ne__(*args
, **kwargs
)
1546 def GetPointSize(*args
, **kwargs
):
1548 GetPointSize(self) -> int
1550 Gets the point size.
1552 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
1554 def GetPixelSize(*args
, **kwargs
):
1556 GetPixelSize(self) -> Size
1558 Returns the size in pixels if the font was constructed with a pixel
1561 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
1563 def IsUsingSizeInPixels(*args
, **kwargs
):
1565 IsUsingSizeInPixels(self) -> bool
1567 Returns ``True`` if the font is using a pixelSize.
1569 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
1571 def GetFamily(*args
, **kwargs
):
1573 GetFamily(self) -> int
1575 Gets the font family.
1577 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
1579 def GetStyle(*args
, **kwargs
):
1581 GetStyle(self) -> int
1583 Gets the font style.
1585 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
1587 def GetWeight(*args
, **kwargs
):
1589 GetWeight(self) -> int
1591 Gets the font weight.
1593 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
1595 def GetUnderlined(*args
, **kwargs
):
1597 GetUnderlined(self) -> bool
1599 Returns ``True`` if the font is underlined, ``False`` otherwise.
1601 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
1603 def GetFaceName(*args
, **kwargs
):
1605 GetFaceName(self) -> String
1607 Returns the typeface name associated with the font, or the empty
1608 string if there is no typeface information.
1610 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
1612 def GetEncoding(*args
, **kwargs
):
1614 GetEncoding(self) -> int
1616 Get the font's encoding.
1618 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
1620 def GetNativeFontInfo(*args
, **kwargs
):
1622 GetNativeFontInfo(self) -> NativeFontInfo
1624 Constructs a `wx.NativeFontInfo` object from this font.
1626 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
1628 def IsFixedWidth(*args
, **kwargs
):
1630 IsFixedWidth(self) -> bool
1632 Returns true if the font is a fixed width (or monospaced) font, false
1633 if it is a proportional one or font is invalid.
1635 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
1637 def GetNativeFontInfoDesc(*args
, **kwargs
):
1639 GetNativeFontInfoDesc(self) -> String
1641 Returns the platform-dependent string completely describing this font
1642 or an empty string if the font isn't valid.
1644 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
1646 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
1648 GetNativeFontInfoUserDesc(self) -> String
1650 Returns a human readable version of `GetNativeFontInfoDesc`.
1652 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
1654 def SetPointSize(*args
, **kwargs
):
1656 SetPointSize(self, int pointSize)
1658 Sets the point size.
1660 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
1662 def SetPixelSize(*args
, **kwargs
):
1664 SetPixelSize(self, Size pixelSize)
1666 Sets the size in pixels rather than points. If there is platform API
1667 support for this then it is used, otherwise a font with the closest
1668 size is found using a binary search.
1670 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
1672 def SetFamily(*args
, **kwargs
):
1674 SetFamily(self, int family)
1676 Sets the font family.
1678 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
1680 def SetStyle(*args
, **kwargs
):
1682 SetStyle(self, int style)
1684 Sets the font style.
1686 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
1688 def SetWeight(*args
, **kwargs
):
1690 SetWeight(self, int weight)
1692 Sets the font weight.
1694 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
1696 def SetFaceName(*args
, **kwargs
):
1698 SetFaceName(self, String faceName)
1700 Sets the facename for the font. The facename, which should be a valid
1701 font installed on the end-user's system.
1703 To avoid portability problems, don't rely on a specific face, but
1704 specify the font family instead or as well. A suitable font will be
1705 found on the end-user's system. If both the family and the facename
1706 are specified, wxWidgets will first search for the specific face, and
1707 then for a font belonging to the same family.
1709 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
1711 def SetUnderlined(*args
, **kwargs
):
1713 SetUnderlined(self, bool underlined)
1717 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
1719 def SetEncoding(*args
, **kwargs
):
1721 SetEncoding(self, int encoding)
1723 Set the font encoding.
1725 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
1727 def SetNativeFontInfo(*args
, **kwargs
):
1729 SetNativeFontInfo(self, NativeFontInfo info)
1731 Set the font's attributes from a `wx.NativeFontInfo` object.
1733 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
1735 def SetNativeFontInfoFromString(*args
, **kwargs
):
1737 SetNativeFontInfoFromString(self, String info)
1739 Set the font's attributes from string representation of a
1740 `wx.NativeFontInfo` object.
1742 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
1744 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
1746 SetNativeFontInfoUserDesc(self, String info)
1748 Set the font's attributes from a string formerly returned from
1749 `GetNativeFontInfoDesc`.
1751 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
1753 def GetFamilyString(*args
, **kwargs
):
1755 GetFamilyString(self) -> String
1757 Returns a string representation of the font family.
1759 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
1761 def GetStyleString(*args
, **kwargs
):
1763 GetStyleString(self) -> String
1765 Returns a string representation of the font style.
1767 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
1769 def GetWeightString(*args
, **kwargs
):
1771 GetWeightString(self) -> String
1773 Return a string representation of the font weight.
1775 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
1777 def SetNoAntiAliasing(*args
, **kwargs
):
1778 """SetNoAntiAliasing(self, bool no=True)"""
1779 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
1781 def GetNoAntiAliasing(*args
, **kwargs
):
1782 """GetNoAntiAliasing(self) -> bool"""
1783 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
1785 def GetDefaultEncoding(*args
, **kwargs
):
1787 GetDefaultEncoding() -> int
1789 Returns the encoding used for all fonts created with an encoding of
1790 ``wx.FONTENCODING_DEFAULT``.
1792 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
1794 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
1795 def SetDefaultEncoding(*args
, **kwargs
):
1797 SetDefaultEncoding(int encoding)
1799 Sets the default font encoding.
1801 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
1803 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
1804 Font_swigregister
= _gdi_
.Font_swigregister
1805 Font_swigregister(Font
)
1807 def FontFromNativeInfo(*args
, **kwargs
):
1809 FontFromNativeInfo(NativeFontInfo info) -> Font
1811 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
1813 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1814 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
1817 def FontFromNativeInfoString(*args
, **kwargs
):
1819 FontFromNativeInfoString(String info) -> Font
1821 Construct a `wx.Font` from the string representation of a
1822 `wx.NativeFontInfo` object.
1824 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1825 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
1828 def FFont(*args
, **kwargs
):
1830 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
1831 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
1833 A bit of a simpler way to create a `wx.Font` using flags instead of
1834 individual attribute settings. The value of flags can be a
1835 combination of the following:
1837 ============================ ==
1843 wx.FONTFLAG_ANTIALIASED
1844 wx.FONTFLAG_NOT_ANTIALIASED
1845 wx.FONTFLAG_UNDERLINED
1846 wx.FONTFLAG_STRIKETHROUGH
1847 ============================ ==
1849 :see: `wx.Font.__init__`
1851 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1852 val
= _gdi_
.new_FFont(*args
, **kwargs
)
1855 def FontFromPixelSize(*args
, **kwargs
):
1857 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
1858 bool underlined=False, String face=wxEmptyString,
1859 int encoding=FONTENCODING_DEFAULT) -> Font
1861 Creates a font using a size in pixels rather than points. If there is
1862 platform API support for this then it is used, otherwise a font with
1863 the closest size is found using a binary search.
1865 :see: `wx.Font.__init__`
1867 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1868 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
1871 def FFontFromPixelSize(*args
, **kwargs
):
1873 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
1874 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
1876 Creates a font using a size in pixels rather than points. If there is
1877 platform API support for this then it is used, otherwise a font with
1878 the closest size is found using a binary search.
1880 :see: `wx.Font.__init__`, `wx.FFont`
1882 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1883 val
= _gdi_
.new_FFontFromPixelSize(*args
, **kwargs
)
1886 def Font_GetDefaultEncoding(*args
):
1888 Font_GetDefaultEncoding() -> int
1890 Returns the encoding used for all fonts created with an encoding of
1891 ``wx.FONTENCODING_DEFAULT``.
1893 return _gdi_
.Font_GetDefaultEncoding(*args
)
1895 def Font_SetDefaultEncoding(*args
, **kwargs
):
1897 Font_SetDefaultEncoding(int encoding)
1899 Sets the default font encoding.
1901 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
1903 Font2
= wx
._deprecated
(FFont
, "Use `wx.FFont` instead.")
1904 #---------------------------------------------------------------------------
1906 class FontEnumerator(object):
1907 """Proxy of C++ FontEnumerator class"""
1908 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1909 __repr__
= _swig_repr
1910 def __init__(self
, *args
, **kwargs
):
1911 """__init__(self) -> FontEnumerator"""
1912 _gdi_
.FontEnumerator_swiginit(self
,_gdi_
.new_FontEnumerator(*args
, **kwargs
))
1913 self
._setCallbackInfo
(self
, FontEnumerator
, 0)
1915 __swig_destroy__
= _gdi_
.delete_FontEnumerator
1916 __del__
= lambda self
: None;
1917 def _setCallbackInfo(*args
, **kwargs
):
1918 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
1919 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
1921 def EnumerateFacenames(*args
, **kwargs
):
1922 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
1923 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
1925 def EnumerateEncodings(*args
, **kwargs
):
1926 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
1927 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
1929 def GetEncodings(*args
, **kwargs
):
1930 """GetEncodings(self) -> PyObject"""
1931 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
1933 def GetFacenames(*args
, **kwargs
):
1934 """GetFacenames(self) -> PyObject"""
1935 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
1937 FontEnumerator_swigregister
= _gdi_
.FontEnumerator_swigregister
1938 FontEnumerator_swigregister(FontEnumerator
)
1940 #---------------------------------------------------------------------------
1942 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
1943 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
1944 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
1945 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
1946 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
1947 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
1948 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
1949 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
1950 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
1951 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
1952 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
1953 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
1954 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
1955 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
1956 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
1957 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
1958 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
1959 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
1960 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
1961 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
1962 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
1963 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
1964 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
1965 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
1966 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
1967 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
1968 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
1969 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
1970 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
1971 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
1972 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
1973 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
1974 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
1975 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
1976 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
1977 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
1978 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
1979 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
1980 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
1981 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
1982 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
1983 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
1984 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
1985 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
1986 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
1987 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
1988 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
1989 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
1990 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
1991 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
1992 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
1993 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
1994 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
1995 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
1996 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
1997 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
1998 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
1999 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
2000 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
2001 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
2002 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
2003 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
2004 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
2005 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
2006 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
2007 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
2008 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
2009 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
2010 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
2011 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
2012 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
2013 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
2014 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
2015 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
2016 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
2017 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
2018 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
2019 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2020 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2021 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2022 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2023 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2024 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2025 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2026 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2027 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2028 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2029 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2030 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2031 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2032 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2033 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2034 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2035 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2036 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2037 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2038 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2039 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2040 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2041 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2042 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2043 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2044 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2045 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2046 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2047 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2048 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2049 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2050 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2051 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2052 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2053 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2054 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2055 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2056 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2057 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2058 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2059 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2060 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2061 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2062 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2063 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2064 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2065 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2066 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2067 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2068 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2069 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2070 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2071 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2072 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2073 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2074 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2075 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2076 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2077 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2078 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2079 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2080 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2081 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2082 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2083 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2084 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2085 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2086 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2087 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2088 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2089 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2090 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2091 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2092 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2093 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2094 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2095 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2096 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2097 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2098 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2099 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2100 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2101 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2102 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2103 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2104 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2105 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2106 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2107 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2108 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2109 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2110 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2111 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2112 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2113 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2114 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2115 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2116 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2117 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2118 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2119 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2120 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2121 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2122 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2123 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2124 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2125 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2126 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2127 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2128 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2129 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2130 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2131 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2132 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2133 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2134 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2135 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2136 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2137 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2138 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2139 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2140 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2141 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2142 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2143 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2144 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2145 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2146 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2147 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2148 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2149 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2150 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2151 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2152 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2153 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2154 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2155 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2156 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2157 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2158 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2159 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2160 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2161 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2162 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2163 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2164 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2165 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2166 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2167 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2168 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2169 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2170 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2171 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2172 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2173 class LanguageInfo(object):
2174 """Proxy of C++ LanguageInfo class"""
2175 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2176 def __init__(self
): raise AttributeError, "No constructor defined"
2177 __repr__
= _swig_repr
2178 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2179 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2180 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2181 LanguageInfo_swigregister
= _gdi_
.LanguageInfo_swigregister
2182 LanguageInfo_swigregister(LanguageInfo
)
2184 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2185 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2186 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2187 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2188 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2189 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2190 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2191 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2192 class Locale(object):
2193 """Proxy of C++ Locale class"""
2194 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2195 __repr__
= _swig_repr
2196 def __init__(self
, *args
, **kwargs
):
2197 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2198 _gdi_
.Locale_swiginit(self
,_gdi_
.new_Locale(*args
, **kwargs
))
2199 __swig_destroy__
= _gdi_
.delete_Locale
2200 __del__
= lambda self
: None;
2201 def Init1(*args
, **kwargs
):
2203 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2204 bool bLoadDefault=True,
2205 bool bConvertEncoding=False) -> bool
2207 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2209 def Init2(*args
, **kwargs
):
2210 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2211 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2213 def Init(self
, *_args
, **_kwargs
):
2214 if type(_args
[0]) in [type(''), type(u
'')]:
2215 val
= self
.Init1(*_args
, **_kwargs
)
2217 val
= self
.Init2(*_args
, **_kwargs
)
2220 def GetSystemLanguage(*args
, **kwargs
):
2221 """GetSystemLanguage() -> int"""
2222 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2224 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2225 def GetSystemEncoding(*args
, **kwargs
):
2226 """GetSystemEncoding() -> int"""
2227 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2229 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2230 def GetSystemEncodingName(*args
, **kwargs
):
2231 """GetSystemEncodingName() -> String"""
2232 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2234 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2235 def IsOk(*args
, **kwargs
):
2236 """IsOk(self) -> bool"""
2237 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2239 def __nonzero__(self
): return self
.IsOk()
2240 def GetLocale(*args
, **kwargs
):
2241 """GetLocale(self) -> String"""
2242 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2244 def GetLanguage(*args
, **kwargs
):
2245 """GetLanguage(self) -> int"""
2246 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2248 def GetSysName(*args
, **kwargs
):
2249 """GetSysName(self) -> String"""
2250 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2252 def GetCanonicalName(*args
, **kwargs
):
2253 """GetCanonicalName(self) -> String"""
2254 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2256 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2257 """AddCatalogLookupPathPrefix(String prefix)"""
2258 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2260 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2261 def AddCatalog(*args
, **kwargs
):
2262 """AddCatalog(self, String szDomain) -> bool"""
2263 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2265 def IsLoaded(*args
, **kwargs
):
2266 """IsLoaded(self, String szDomain) -> bool"""
2267 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2269 def GetLanguageInfo(*args
, **kwargs
):
2270 """GetLanguageInfo(int lang) -> LanguageInfo"""
2271 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2273 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2274 def GetLanguageName(*args
, **kwargs
):
2275 """GetLanguageName(int lang) -> String"""
2276 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2278 GetLanguageName
= staticmethod(GetLanguageName
)
2279 def FindLanguageInfo(*args
, **kwargs
):
2280 """FindLanguageInfo(String locale) -> LanguageInfo"""
2281 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2283 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2284 def AddLanguage(*args
, **kwargs
):
2285 """AddLanguage(LanguageInfo info)"""
2286 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2288 AddLanguage
= staticmethod(AddLanguage
)
2289 def GetString(*args
, **kwargs
):
2290 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2291 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2293 def GetName(*args
, **kwargs
):
2294 """GetName(self) -> String"""
2295 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2297 Locale_swigregister
= _gdi_
.Locale_swigregister
2298 Locale_swigregister(Locale
)
2300 def Locale_GetSystemLanguage(*args
):
2301 """Locale_GetSystemLanguage() -> int"""
2302 return _gdi_
.Locale_GetSystemLanguage(*args
)
2304 def Locale_GetSystemEncoding(*args
):
2305 """Locale_GetSystemEncoding() -> int"""
2306 return _gdi_
.Locale_GetSystemEncoding(*args
)
2308 def Locale_GetSystemEncodingName(*args
):
2309 """Locale_GetSystemEncodingName() -> String"""
2310 return _gdi_
.Locale_GetSystemEncodingName(*args
)
2312 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2313 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2314 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2316 def Locale_GetLanguageInfo(*args
, **kwargs
):
2317 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2318 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2320 def Locale_GetLanguageName(*args
, **kwargs
):
2321 """Locale_GetLanguageName(int lang) -> String"""
2322 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2324 def Locale_FindLanguageInfo(*args
, **kwargs
):
2325 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2326 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2328 def Locale_AddLanguage(*args
, **kwargs
):
2329 """Locale_AddLanguage(LanguageInfo info)"""
2330 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2333 def GetLocale(*args
):
2334 """GetLocale() -> Locale"""
2335 return _gdi_
.GetLocale(*args
)
2336 #---------------------------------------------------------------------------
2338 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2339 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2340 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2341 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2342 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2343 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2344 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2345 class EncodingConverter(_core
.Object
):
2346 """Proxy of C++ EncodingConverter class"""
2347 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2348 __repr__
= _swig_repr
2349 def __init__(self
, *args
, **kwargs
):
2350 """__init__(self) -> EncodingConverter"""
2351 _gdi_
.EncodingConverter_swiginit(self
,_gdi_
.new_EncodingConverter(*args
, **kwargs
))
2352 __swig_destroy__
= _gdi_
.delete_EncodingConverter
2353 __del__
= lambda self
: None;
2354 def Init(*args
, **kwargs
):
2355 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2356 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2358 def Convert(*args
, **kwargs
):
2359 """Convert(self, String input) -> String"""
2360 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2362 def GetPlatformEquivalents(*args
, **kwargs
):
2363 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2364 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2366 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
2367 def GetAllEquivalents(*args
, **kwargs
):
2368 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2369 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2371 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
2372 def CanConvert(*args
, **kwargs
):
2373 """CanConvert(int encIn, int encOut) -> bool"""
2374 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2376 CanConvert
= staticmethod(CanConvert
)
2377 def __nonzero__(self
): return self
.IsOk()
2378 EncodingConverter_swigregister
= _gdi_
.EncodingConverter_swigregister
2379 EncodingConverter_swigregister(EncodingConverter
)
2381 def GetTranslation(*args
):
2383 GetTranslation(String str) -> String
2384 GetTranslation(String str, String strPlural, size_t n) -> String
2386 return _gdi_
.GetTranslation(*args
)
2388 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
2389 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2390 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2392 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
2393 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2394 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2396 def EncodingConverter_CanConvert(*args
, **kwargs
):
2397 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2398 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2400 #----------------------------------------------------------------------------
2401 # On MSW add the directory where the wxWidgets catalogs were installed
2402 # to the default catalog path.
2403 if wx
.Platform
== "__WXMSW__":
2405 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "locale")
2406 Locale
.AddCatalogLookupPathPrefix(_localedir
)
2409 #----------------------------------------------------------------------------
2411 #---------------------------------------------------------------------------
2413 class DC(_core
.Object
):
2415 A wx.DC is a device context onto which graphics and text can be
2416 drawn. It is intended to represent a number of output devices in a
2417 generic way, so a window can have a device context associated with it,
2418 and a printer also has a device context. In this way, the same piece
2419 of code may write to a number of different devices, if the device
2420 context is used as a parameter.
2422 Derived types of wxDC have documentation for specific features only,
2423 so refer to this section for most device context information.
2425 The wx.DC class is abstract and can not be instantiated, you must use
2426 one of the derived classes instead. Which one will depend on the
2427 situation in which it is used.
2429 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2430 def __init__(self
): raise AttributeError, "No constructor defined"
2431 __repr__
= _swig_repr
2432 __swig_destroy__
= _gdi_
.delete_DC
2433 __del__
= lambda self
: None;
2434 # These have been deprecated in wxWidgets. Since they never
2435 # really did anything to begin with, just make them be NOPs.
2436 def BeginDrawing(self
): pass
2437 def EndDrawing(self
): pass
2439 def FloodFill(*args
, **kwargs
):
2441 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2443 Flood fills the device context starting from the given point, using
2444 the current brush colour, and using a style:
2446 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2447 the given colour is encountered.
2449 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2452 Returns False if the operation failed.
2454 Note: The present implementation for non-Windows platforms may fail to
2455 find colour borders if the pixels do not match the colour
2456 exactly. However the function will still return true.
2458 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
2460 def FloodFillPoint(*args
, **kwargs
):
2462 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2464 Flood fills the device context starting from the given point, using
2465 the current brush colour, and using a style:
2467 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2468 the given colour is encountered.
2470 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2473 Returns False if the operation failed.
2475 Note: The present implementation for non-Windows platforms may fail to
2476 find colour borders if the pixels do not match the colour
2477 exactly. However the function will still return true.
2479 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
2481 def GradientFillConcentric(*args
, **kwargs
):
2483 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
2486 Fill the area specified by rect with a radial gradient, starting from
2487 initialColour in the center of the circle and fading to destColour on
2488 the outside of the circle. The circleCenter argument is the relative
2489 coordinants of the center of the circle in the specified rect.
2491 Note: Currently this function is very slow, don't use it for real-time
2494 return _gdi_
.DC_GradientFillConcentric(*args
, **kwargs
)
2496 def GradientFillLinear(*args
, **kwargs
):
2498 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
2499 int nDirection=EAST)
2501 Fill the area specified by rect with a linear gradient, starting from
2502 initialColour and eventually fading to destColour. The nDirection
2503 parameter specifies the direction of the colour change, default is to
2504 use initialColour on the left part of the rectangle and destColour on
2507 return _gdi_
.DC_GradientFillLinear(*args
, **kwargs
)
2509 def GetPixel(*args
, **kwargs
):
2511 GetPixel(self, int x, int y) -> Colour
2513 Gets the colour at the specified location on the DC.
2515 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
2517 def GetPixelPoint(*args
, **kwargs
):
2518 """GetPixelPoint(self, Point pt) -> Colour"""
2519 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
2521 def DrawLine(*args
, **kwargs
):
2523 DrawLine(self, int x1, int y1, int x2, int y2)
2525 Draws a line from the first point to the second. The current pen is
2526 used for drawing the line. Note that the second point is *not* part of
2527 the line and is not drawn by this function (this is consistent with
2528 the behaviour of many other toolkits).
2530 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
2532 def DrawLinePoint(*args
, **kwargs
):
2534 DrawLinePoint(self, Point pt1, Point pt2)
2536 Draws a line from the first point to the second. The current pen is
2537 used for drawing the line. Note that the second point is *not* part of
2538 the line and is not drawn by this function (this is consistent with
2539 the behaviour of many other toolkits).
2541 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
2543 def CrossHair(*args
, **kwargs
):
2545 CrossHair(self, int x, int y)
2547 Displays a cross hair using the current pen. This is a vertical and
2548 horizontal line the height and width of the window, centred on the
2551 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
2553 def CrossHairPoint(*args
, **kwargs
):
2555 CrossHairPoint(self, Point pt)
2557 Displays a cross hair using the current pen. This is a vertical and
2558 horizontal line the height and width of the window, centred on the
2561 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
2563 def DrawArc(*args
, **kwargs
):
2565 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2567 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2568 the first point to the second. The current pen is used for the outline
2569 and the current brush for filling the shape.
2571 The arc is drawn in an anticlockwise direction from the start point to
2574 return _gdi_
.DC_DrawArc(*args
, **kwargs
)
2576 def DrawArcPoint(*args
, **kwargs
):
2578 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2580 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2581 the first point to the second. The current pen is used for the outline
2582 and the current brush for filling the shape.
2584 The arc is drawn in an anticlockwise direction from the start point to
2587 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
2589 def DrawCheckMark(*args
, **kwargs
):
2591 DrawCheckMark(self, int x, int y, int width, int height)
2593 Draws a check mark inside the given rectangle.
2595 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
2597 def DrawCheckMarkRect(*args
, **kwargs
):
2599 DrawCheckMarkRect(self, Rect rect)
2601 Draws a check mark inside the given rectangle.
2603 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
2605 def DrawEllipticArc(*args
, **kwargs
):
2607 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
2609 Draws an arc of an ellipse, with the given rectangle defining the
2610 bounds of the ellipse. The current pen is used for drawing the arc and
2611 the current brush is used for drawing the pie.
2613 The *start* and *end* parameters specify the start and end of the arc
2614 relative to the three-o'clock position from the center of the
2615 rectangle. Angles are specified in degrees (360 is a complete
2616 circle). Positive values mean counter-clockwise motion. If start is
2617 equal to end, a complete ellipse will be drawn.
2619 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
2621 def DrawEllipticArcPointSize(*args
, **kwargs
):
2623 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
2625 Draws an arc of an ellipse, with the given rectangle defining the
2626 bounds of the ellipse. The current pen is used for drawing the arc and
2627 the current brush is used for drawing the pie.
2629 The *start* and *end* parameters specify the start and end of the arc
2630 relative to the three-o'clock position from the center of the
2631 rectangle. Angles are specified in degrees (360 is a complete
2632 circle). Positive values mean counter-clockwise motion. If start is
2633 equal to end, a complete ellipse will be drawn.
2635 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
2637 def DrawPoint(*args
, **kwargs
):
2639 DrawPoint(self, int x, int y)
2641 Draws a point using the current pen.
2643 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
2645 def DrawPointPoint(*args
, **kwargs
):
2647 DrawPointPoint(self, Point pt)
2649 Draws a point using the current pen.
2651 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
2653 def DrawRectangle(*args
, **kwargs
):
2655 DrawRectangle(self, int x, int y, int width, int height)
2657 Draws a rectangle with the given top left corner, and with the given
2658 size. The current pen is used for the outline and the current brush
2659 for filling the shape.
2661 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
2663 def DrawRectangleRect(*args
, **kwargs
):
2665 DrawRectangleRect(self, Rect rect)
2667 Draws a rectangle with the given top left corner, and with the given
2668 size. The current pen is used for the outline and the current brush
2669 for filling the shape.
2671 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
2673 def DrawRectanglePointSize(*args
, **kwargs
):
2675 DrawRectanglePointSize(self, Point pt, Size sz)
2677 Draws a rectangle with the given top left corner, and with the given
2678 size. The current pen is used for the outline and the current brush
2679 for filling the shape.
2681 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
2683 def DrawRoundedRectangle(*args
, **kwargs
):
2685 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
2687 Draws a rectangle with the given top left corner, and with the given
2688 size. The corners are quarter-circles using the given radius. The
2689 current pen is used for the outline and the current brush for filling
2692 If radius is positive, the value is assumed to be the radius of the
2693 rounded corner. If radius is negative, the absolute value is assumed
2694 to be the proportion of the smallest dimension of the rectangle. This
2695 means that the corner can be a sensible size relative to the size of
2696 the rectangle, and also avoids the strange effects X produces when the
2697 corners are too big for the rectangle.
2699 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
2701 def DrawRoundedRectangleRect(*args
, **kwargs
):
2703 DrawRoundedRectangleRect(self, Rect r, double radius)
2705 Draws a rectangle with the given top left corner, and with the given
2706 size. The corners are quarter-circles using the given radius. The
2707 current pen is used for the outline and the current brush for filling
2710 If radius is positive, the value is assumed to be the radius of the
2711 rounded corner. If radius is negative, the absolute value is assumed
2712 to be the proportion of the smallest dimension of the rectangle. This
2713 means that the corner can be a sensible size relative to the size of
2714 the rectangle, and also avoids the strange effects X produces when the
2715 corners are too big for the rectangle.
2717 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
2719 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
2721 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
2723 Draws a rectangle with the given top left corner, and with the given
2724 size. The corners are quarter-circles using the given radius. The
2725 current pen is used for the outline and the current brush for filling
2728 If radius is positive, the value is assumed to be the radius of the
2729 rounded corner. If radius is negative, the absolute value is assumed
2730 to be the proportion of the smallest dimension of the rectangle. This
2731 means that the corner can be a sensible size relative to the size of
2732 the rectangle, and also avoids the strange effects X produces when the
2733 corners are too big for the rectangle.
2735 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
2737 def DrawCircle(*args
, **kwargs
):
2739 DrawCircle(self, int x, int y, int radius)
2741 Draws a circle with the given center point and radius. The current
2742 pen is used for the outline and the current brush for filling the
2745 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
2747 def DrawCirclePoint(*args
, **kwargs
):
2749 DrawCirclePoint(self, Point pt, int radius)
2751 Draws a circle with the given center point and radius. The current
2752 pen is used for the outline and the current brush for filling the
2755 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
2757 def DrawEllipse(*args
, **kwargs
):
2759 DrawEllipse(self, int x, int y, int width, int height)
2761 Draws an ellipse contained in the specified rectangle. The current pen
2762 is used for the outline and the current brush for filling the shape.
2764 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
2766 def DrawEllipseRect(*args
, **kwargs
):
2768 DrawEllipseRect(self, Rect rect)
2770 Draws an ellipse contained in the specified rectangle. The current pen
2771 is used for the outline and the current brush for filling the shape.
2773 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
2775 def DrawEllipsePointSize(*args
, **kwargs
):
2777 DrawEllipsePointSize(self, Point pt, Size sz)
2779 Draws an ellipse contained in the specified rectangle. The current pen
2780 is used for the outline and the current brush for filling the shape.
2782 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
2784 def DrawIcon(*args
, **kwargs
):
2786 DrawIcon(self, Icon icon, int x, int y)
2788 Draw an icon on the display (does nothing if the device context is
2789 PostScript). This can be the simplest way of drawing bitmaps on a
2792 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
2794 def DrawIconPoint(*args
, **kwargs
):
2796 DrawIconPoint(self, Icon icon, Point pt)
2798 Draw an icon on the display (does nothing if the device context is
2799 PostScript). This can be the simplest way of drawing bitmaps on a
2802 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
2804 def DrawBitmap(*args
, **kwargs
):
2806 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
2808 Draw a bitmap on the device context at the specified point. If
2809 *transparent* is true and the bitmap has a transparency mask, (or
2810 alpha channel on the platforms that support it) then the bitmap will
2811 be drawn transparently.
2813 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
2815 def DrawBitmapPoint(*args
, **kwargs
):
2817 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
2819 Draw a bitmap on the device context at the specified point. If
2820 *transparent* is true and the bitmap has a transparency mask, (or
2821 alpha channel on the platforms that support it) then the bitmap will
2822 be drawn transparently.
2824 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
2826 def DrawText(*args
, **kwargs
):
2828 DrawText(self, String text, int x, int y)
2830 Draws a text string at the specified point, using the current text
2831 font, and the current text foreground and background colours.
2833 The coordinates refer to the top-left corner of the rectangle bounding
2834 the string. See `GetTextExtent` for how to get the dimensions of a
2835 text string, which can be used to position the text more precisely.
2837 **NOTE**: under wxGTK the current logical function is used by this
2838 function but it is ignored by wxMSW. Thus, you should avoid using
2839 logical functions with this function in portable programs.
2841 return _gdi_
.DC_DrawText(*args
, **kwargs
)
2843 def DrawTextPoint(*args
, **kwargs
):
2845 DrawTextPoint(self, String text, Point pt)
2847 Draws a text string at the specified point, using the current text
2848 font, and the current text foreground and background colours.
2850 The coordinates refer to the top-left corner of the rectangle bounding
2851 the string. See `GetTextExtent` for how to get the dimensions of a
2852 text string, which can be used to position the text more precisely.
2854 **NOTE**: under wxGTK the current logical function is used by this
2855 function but it is ignored by wxMSW. Thus, you should avoid using
2856 logical functions with this function in portable programs.
2858 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
2860 def DrawRotatedText(*args
, **kwargs
):
2862 DrawRotatedText(self, String text, int x, int y, double angle)
2864 Draws the text rotated by *angle* degrees, if supported by the platform.
2866 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
2867 function. In particular, a font different from ``wx.NORMAL_FONT``
2868 should be used as the it is not normally a TrueType
2869 font. ``wx.SWISS_FONT`` is an example of a font which is.
2871 return _gdi_
.DC_DrawRotatedText(*args
, **kwargs
)
2873 def DrawRotatedTextPoint(*args
, **kwargs
):
2875 DrawRotatedTextPoint(self, String text, Point pt, double angle)
2877 Draws the text rotated by *angle* degrees, if supported by the platform.
2879 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
2880 function. In particular, a font different from ``wx.NORMAL_FONT``
2881 should be used as the it is not normally a TrueType
2882 font. ``wx.SWISS_FONT`` is an example of a font which is.
2884 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
2886 def Blit(*args
, **kwargs
):
2888 Blit(self, int xdest, int ydest, int width, int height, DC source,
2889 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
2890 int xsrcMask=-1, int ysrcMask=-1) -> bool
2892 Copy from a source DC to this DC. Parameters specify the destination
2893 coordinates, size of area to copy, source DC, source coordinates,
2894 logical function, whether to use a bitmap mask, and mask source
2897 return _gdi_
.DC_Blit(*args
, **kwargs
)
2899 def BlitPointSize(*args
, **kwargs
):
2901 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
2902 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
2904 Copy from a source DC to this DC. Parameters specify the destination
2905 coordinates, size of area to copy, source DC, source coordinates,
2906 logical function, whether to use a bitmap mask, and mask source
2909 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
2911 def SetClippingRegion(*args
, **kwargs
):
2913 SetClippingRegion(self, int x, int y, int width, int height)
2915 Sets the clipping region for this device context to the intersection
2916 of the given region described by the parameters of this method and the
2917 previously set clipping region. You should call `DestroyClippingRegion`
2918 if you want to set the clipping region exactly to the region
2921 The clipping region is an area to which drawing is
2922 restricted. Possible uses for the clipping region are for clipping
2923 text or for speeding up window redraws when only a known area of the
2926 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
2928 def SetClippingRegionPointSize(*args
, **kwargs
):
2930 SetClippingRegionPointSize(self, Point pt, Size sz)
2932 Sets the clipping region for this device context to the intersection
2933 of the given region described by the parameters of this method and the
2934 previously set clipping region. You should call `DestroyClippingRegion`
2935 if you want to set the clipping region exactly to the region
2938 The clipping region is an area to which drawing is
2939 restricted. Possible uses for the clipping region are for clipping
2940 text or for speeding up window redraws when only a known area of the
2943 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
2945 def SetClippingRegionAsRegion(*args
, **kwargs
):
2947 SetClippingRegionAsRegion(self, Region region)
2949 Sets the clipping region for this device context to the intersection
2950 of the given region described by the parameters of this method and the
2951 previously set clipping region. You should call `DestroyClippingRegion`
2952 if you want to set the clipping region exactly to the region
2955 The clipping region is an area to which drawing is
2956 restricted. Possible uses for the clipping region are for clipping
2957 text or for speeding up window redraws when only a known area of the
2960 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
2962 def SetClippingRect(*args
, **kwargs
):
2964 SetClippingRect(self, Rect rect)
2966 Sets the clipping region for this device context to the intersection
2967 of the given region described by the parameters of this method and the
2968 previously set clipping region. You should call `DestroyClippingRegion`
2969 if you want to set the clipping region exactly to the region
2972 The clipping region is an area to which drawing is
2973 restricted. Possible uses for the clipping region are for clipping
2974 text or for speeding up window redraws when only a known area of the
2977 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
2979 def DrawLines(*args
, **kwargs
):
2981 DrawLines(self, List points, int xoffset=0, int yoffset=0)
2983 Draws lines using a sequence of `wx.Point` objects, adding the
2984 optional offset coordinate. The current pen is used for drawing the
2987 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
2989 def DrawPolygon(*args
, **kwargs
):
2991 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
2992 int fillStyle=ODDEVEN_RULE)
2994 Draws a filled polygon using a sequence of `wx.Point` objects, adding
2995 the optional offset coordinate. The last argument specifies the fill
2996 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
2998 The current pen is used for drawing the outline, and the current brush
2999 for filling the shape. Using a transparent brush suppresses
3000 filling. Note that wxWidgets automatically closes the first and last
3003 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3005 def DrawLabel(*args
, **kwargs
):
3007 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3010 Draw *text* within the specified rectangle, abiding by the alignment
3011 flags. Will additionally emphasize the character at *indexAccel* if
3014 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3016 def DrawImageLabel(*args
, **kwargs
):
3018 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3019 int indexAccel=-1) -> Rect
3021 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3022 drawing it) within the specified rectangle, abiding by the alignment
3023 flags. Will additionally emphasize the character at *indexAccel* if
3024 it is not -1. Returns the bounding rectangle.
3026 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3028 def DrawSpline(*args
, **kwargs
):
3030 DrawSpline(self, List points)
3032 Draws a spline between all given control points, (a list of `wx.Point`
3033 objects) using the current pen. The spline is drawn using a series of
3034 lines, using an algorithm taken from the X drawing program 'XFIG'.
3036 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3038 def Clear(*args
, **kwargs
):
3042 Clears the device context using the current background brush.
3044 return _gdi_
.DC_Clear(*args
, **kwargs
)
3046 def StartDoc(*args
, **kwargs
):
3048 StartDoc(self, String message) -> bool
3050 Starts a document (only relevant when outputting to a
3051 printer). *Message* is a message to show whilst printing.
3053 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3055 def EndDoc(*args
, **kwargs
):
3059 Ends a document (only relevant when outputting to a printer).
3061 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3063 def StartPage(*args
, **kwargs
):
3067 Starts a document page (only relevant when outputting to a printer).
3069 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3071 def EndPage(*args
, **kwargs
):
3075 Ends a document page (only relevant when outputting to a printer).
3077 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3079 def SetFont(*args
, **kwargs
):
3081 SetFont(self, Font font)
3083 Sets the current font for the DC. It must be a valid font, in
3084 particular you should not pass ``wx.NullFont`` to this method.
3086 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3088 def SetPen(*args
, **kwargs
):
3090 SetPen(self, Pen pen)
3092 Sets the current pen for the DC.
3094 If the argument is ``wx.NullPen``, the current pen is selected out of the
3095 device context, and the original pen restored.
3097 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3099 def SetBrush(*args
, **kwargs
):
3101 SetBrush(self, Brush brush)
3103 Sets the current brush for the DC.
3105 If the argument is ``wx.NullBrush``, the current brush is selected out
3106 of the device context, and the original brush restored, allowing the
3107 current brush to be destroyed safely.
3109 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3111 def SetBackground(*args
, **kwargs
):
3113 SetBackground(self, Brush brush)
3115 Sets the current background brush for the DC.
3117 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3119 def SetBackgroundMode(*args
, **kwargs
):
3121 SetBackgroundMode(self, int mode)
3123 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3124 determines whether text will be drawn with a background colour or
3127 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3129 def SetPalette(*args
, **kwargs
):
3131 SetPalette(self, Palette palette)
3133 If this is a window DC or memory DC, assigns the given palette to the
3134 window or bitmap associated with the DC. If the argument is
3135 ``wx.NullPalette``, the current palette is selected out of the device
3136 context, and the original palette restored.
3138 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3140 def DestroyClippingRegion(*args
, **kwargs
):
3142 DestroyClippingRegion(self)
3144 Destroys the current clipping region so that none of the DC is
3147 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3149 def GetClippingBox(*args
, **kwargs
):
3151 GetClippingBox() -> (x, y, width, height)
3153 Gets the rectangle surrounding the current clipping region.
3155 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3157 def GetClippingRect(*args
, **kwargs
):
3159 GetClippingRect(self) -> Rect
3161 Gets the rectangle surrounding the current clipping region.
3163 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3165 def GetCharHeight(*args
, **kwargs
):
3167 GetCharHeight(self) -> int
3169 Gets the character height of the currently set font.
3171 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3173 def GetCharWidth(*args
, **kwargs
):
3175 GetCharWidth(self) -> int
3177 Gets the average character width of the currently set font.
3179 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3181 def GetTextExtent(*args
, **kwargs
):
3183 GetTextExtent(wxString string) -> (width, height)
3185 Get the width and height of the text using the current font. Only
3186 works for single line strings.
3188 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3190 def GetFullTextExtent(*args
, **kwargs
):
3192 GetFullTextExtent(wxString string, Font font=None) ->
3193 (width, height, descent, externalLeading)
3195 Get the width, height, decent and leading of the text using the
3196 current or specified font. Only works for single line strings.
3198 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3200 def GetMultiLineTextExtent(*args
, **kwargs
):
3202 GetMultiLineTextExtent(wxString string, Font font=None) ->
3203 (width, height, descent, externalLeading)
3205 Get the width, height, decent and leading of the text using the
3206 current or specified font. Works for single as well as multi-line
3209 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3211 def GetPartialTextExtents(*args
, **kwargs
):
3213 GetPartialTextExtents(self, text) -> [widths]
3215 Returns a list of integers such that each value is the distance in
3216 pixels from the begining of text to the coresponding character of
3217 *text*. The generic version simply builds a running total of the widths
3218 of each character using GetTextExtent, however if the various
3219 platforms have a native API function that is faster or more accurate
3220 than the generic implementation then it will be used instead.
3222 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3224 def GetSize(*args
, **kwargs
):
3226 GetSize(self) -> Size
3228 This gets the horizontal and vertical resolution in device units. It
3229 can be used to scale graphics to fit the page. For example, if *maxX*
3230 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3231 used in your application, the following code will scale the graphic to
3232 fit on the printer page::
3235 scaleX = maxX*1.0 / w
3236 scaleY = maxY*1.0 / h
3237 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3240 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3242 def GetSizeTuple(*args
, **kwargs
):
3244 GetSizeTuple() -> (width, height)
3246 This gets the horizontal and vertical resolution in device units. It
3247 can be used to scale graphics to fit the page. For example, if *maxX*
3248 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3249 used in your application, the following code will scale the graphic to
3250 fit on the printer page::
3253 scaleX = maxX*1.0 / w
3254 scaleY = maxY*1.0 / h
3255 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3258 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3260 def GetSizeMM(*args
, **kwargs
):
3262 GetSizeMM(self) -> Size
3264 Get the DC size in milimeters.
3266 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3268 def GetSizeMMTuple(*args
, **kwargs
):
3270 GetSizeMMTuple() -> (width, height)
3272 Get the DC size in milimeters.
3274 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3276 def DeviceToLogicalX(*args
, **kwargs
):
3278 DeviceToLogicalX(self, int x) -> int
3280 Convert device X coordinate to logical coordinate, using the current
3283 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
3285 def DeviceToLogicalY(*args
, **kwargs
):
3287 DeviceToLogicalY(self, int y) -> int
3289 Converts device Y coordinate to logical coordinate, using the current
3292 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
3294 def DeviceToLogicalXRel(*args
, **kwargs
):
3296 DeviceToLogicalXRel(self, int x) -> int
3298 Convert device X coordinate to relative logical coordinate, using the
3299 current mapping mode but ignoring the x axis orientation. Use this
3300 function for converting a width, for example.
3302 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
3304 def DeviceToLogicalYRel(*args
, **kwargs
):
3306 DeviceToLogicalYRel(self, int y) -> int
3308 Convert device Y coordinate to relative logical coordinate, using the
3309 current mapping mode but ignoring the y axis orientation. Use this
3310 function for converting a height, for example.
3312 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
3314 def LogicalToDeviceX(*args
, **kwargs
):
3316 LogicalToDeviceX(self, int x) -> int
3318 Converts logical X coordinate to device coordinate, using the current
3321 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
3323 def LogicalToDeviceY(*args
, **kwargs
):
3325 LogicalToDeviceY(self, int y) -> int
3327 Converts logical Y coordinate to device coordinate, using the current
3330 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
3332 def LogicalToDeviceXRel(*args
, **kwargs
):
3334 LogicalToDeviceXRel(self, int x) -> int
3336 Converts logical X coordinate to relative device coordinate, using the
3337 current mapping mode but ignoring the x axis orientation. Use this for
3338 converting a width, for example.
3340 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
3342 def LogicalToDeviceYRel(*args
, **kwargs
):
3344 LogicalToDeviceYRel(self, int y) -> int
3346 Converts logical Y coordinate to relative device coordinate, using the
3347 current mapping mode but ignoring the y axis orientation. Use this for
3348 converting a height, for example.
3350 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
3352 def CanDrawBitmap(*args
, **kwargs
):
3353 """CanDrawBitmap(self) -> bool"""
3354 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
3356 def CanGetTextExtent(*args
, **kwargs
):
3357 """CanGetTextExtent(self) -> bool"""
3358 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
3360 def GetDepth(*args
, **kwargs
):
3362 GetDepth(self) -> int
3364 Returns the colour depth of the DC.
3366 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
3368 def GetPPI(*args
, **kwargs
):
3370 GetPPI(self) -> Size
3372 Resolution in Pixels per inch
3374 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
3376 def Ok(*args
, **kwargs
):
3380 Returns true if the DC is ok to use.
3382 return _gdi_
.DC_Ok(*args
, **kwargs
)
3384 def GetBackgroundMode(*args
, **kwargs
):
3386 GetBackgroundMode(self) -> int
3388 Returns the current background mode, either ``wx.SOLID`` or
3391 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
3393 def GetBackground(*args
, **kwargs
):
3395 GetBackground(self) -> Brush
3397 Gets the brush used for painting the background.
3399 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
3401 def GetBrush(*args
, **kwargs
):
3403 GetBrush(self) -> Brush
3405 Gets the current brush
3407 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
3409 def GetFont(*args
, **kwargs
):
3411 GetFont(self) -> Font
3413 Gets the current font
3415 return _gdi_
.DC_GetFont(*args
, **kwargs
)
3417 def GetPen(*args
, **kwargs
):
3421 Gets the current pen
3423 return _gdi_
.DC_GetPen(*args
, **kwargs
)
3425 def GetTextBackground(*args
, **kwargs
):
3427 GetTextBackground(self) -> Colour
3429 Gets the current text background colour
3431 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
3433 def GetTextForeground(*args
, **kwargs
):
3435 GetTextForeground(self) -> Colour
3437 Gets the current text foreground colour
3439 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
3441 def SetTextForeground(*args
, **kwargs
):
3443 SetTextForeground(self, Colour colour)
3445 Sets the current text foreground colour for the DC.
3447 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
3449 def SetTextBackground(*args
, **kwargs
):
3451 SetTextBackground(self, Colour colour)
3453 Sets the current text background colour for the DC.
3455 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
3457 def GetMapMode(*args
, **kwargs
):
3459 GetMapMode(self) -> int
3461 Gets the current *mapping mode* for the device context
3463 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
3465 def SetMapMode(*args
, **kwargs
):
3467 SetMapMode(self, int mode)
3469 The *mapping mode* of the device context defines the unit of
3470 measurement used to convert logical units to device units. The
3471 mapping mode can be one of the following:
3473 ================ =============================================
3474 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3476 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3477 wx.MM_METRIC Each logical unit is 1 mm.
3478 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3479 wx.MM_TEXT Each logical unit is 1 pixel.
3480 ================ =============================================
3483 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
3485 def GetUserScale(*args
, **kwargs
):
3487 GetUserScale(self) -> (xScale, yScale)
3489 Gets the current user scale factor (set by `SetUserScale`).
3491 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
3493 def SetUserScale(*args
, **kwargs
):
3495 SetUserScale(self, double x, double y)
3497 Sets the user scaling factor, useful for applications which require
3500 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
3502 def GetLogicalScale(*args
, **kwargs
):
3503 """GetLogicalScale() -> (xScale, yScale)"""
3504 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
3506 def SetLogicalScale(*args
, **kwargs
):
3507 """SetLogicalScale(self, double x, double y)"""
3508 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
3510 def GetLogicalOrigin(*args
, **kwargs
):
3511 """GetLogicalOrigin(self) -> Point"""
3512 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
3514 def GetLogicalOriginTuple(*args
, **kwargs
):
3515 """GetLogicalOriginTuple() -> (x,y)"""
3516 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
3518 def SetLogicalOrigin(*args
, **kwargs
):
3519 """SetLogicalOrigin(self, int x, int y)"""
3520 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
3522 def SetLogicalOriginPoint(*args
, **kwargs
):
3523 """SetLogicalOriginPoint(self, Point point)"""
3524 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
3526 def GetDeviceOrigin(*args
, **kwargs
):
3527 """GetDeviceOrigin(self) -> Point"""
3528 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
3530 def GetDeviceOriginTuple(*args
, **kwargs
):
3531 """GetDeviceOriginTuple() -> (x,y)"""
3532 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
3534 def SetDeviceOrigin(*args
, **kwargs
):
3535 """SetDeviceOrigin(self, int x, int y)"""
3536 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
3538 def SetDeviceOriginPoint(*args
, **kwargs
):
3539 """SetDeviceOriginPoint(self, Point point)"""
3540 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
3542 def SetAxisOrientation(*args
, **kwargs
):
3544 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3546 Sets the x and y axis orientation (i.e., the direction from lowest to
3547 highest values on the axis). The default orientation is the natural
3548 orientation, e.g. x axis from left to right and y axis from bottom up.
3550 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
3552 def GetLogicalFunction(*args
, **kwargs
):
3554 GetLogicalFunction(self) -> int
3556 Gets the current logical function (set by `SetLogicalFunction`).
3558 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
3560 def SetLogicalFunction(*args
, **kwargs
):
3562 SetLogicalFunction(self, int function)
3564 Sets the current logical function for the device context. This
3565 determines how a source pixel (from a pen or brush colour, or source
3566 device context if using `Blit`) combines with a destination pixel in
3567 the current device context.
3569 The possible values and their meaning in terms of source and
3570 destination pixel values are as follows:
3572 ================ ==========================
3574 wx.AND_INVERT (NOT src) AND dst
3575 wx.AND_REVERSE src AND (NOT dst)
3578 wx.EQUIV (NOT src) XOR dst
3580 wx.NAND (NOT src) OR (NOT dst)
3581 wx.NOR (NOT src) AND (NOT dst)
3584 wx.OR_INVERT (NOT src) OR dst
3585 wx.OR_REVERSE src OR (NOT dst)
3587 wx.SRC_INVERT NOT src
3589 ================ ==========================
3591 The default is wx.COPY, which simply draws with the current
3592 colour. The others combine the current colour and the background using
3593 a logical operation. wx.INVERT is commonly used for drawing rubber
3594 bands or moving outlines, since drawing twice reverts to the original
3598 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
3600 def ComputeScaleAndOrigin(*args
, **kwargs
):
3602 ComputeScaleAndOrigin(self)
3604 Performs all necessary computations for given platform and context
3605 type after each change of scale and origin parameters. Usually called
3606 automatically internally after such changes.
3609 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
3611 def SetOptimization(self
, optimize
):
3613 def GetOptimization(self
):
3616 SetOptimization
= wx
._deprecated
(SetOptimization
)
3617 GetOptimization
= wx
._deprecated
(GetOptimization
)
3619 def CalcBoundingBox(*args
, **kwargs
):
3621 CalcBoundingBox(self, int x, int y)
3623 Adds the specified point to the bounding box which can be retrieved
3624 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3626 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
3628 def CalcBoundingBoxPoint(*args
, **kwargs
):
3630 CalcBoundingBoxPoint(self, Point point)
3632 Adds the specified point to the bounding box which can be retrieved
3633 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3635 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
3637 def ResetBoundingBox(*args
, **kwargs
):
3639 ResetBoundingBox(self)
3641 Resets the bounding box: after a call to this function, the bounding
3642 box doesn't contain anything.
3644 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
3646 def MinX(*args
, **kwargs
):
3650 Gets the minimum horizontal extent used in drawing commands so far.
3652 return _gdi_
.DC_MinX(*args
, **kwargs
)
3654 def MaxX(*args
, **kwargs
):
3658 Gets the maximum horizontal extent used in drawing commands so far.
3660 return _gdi_
.DC_MaxX(*args
, **kwargs
)
3662 def MinY(*args
, **kwargs
):
3666 Gets the minimum vertical extent used in drawing commands so far.
3668 return _gdi_
.DC_MinY(*args
, **kwargs
)
3670 def MaxY(*args
, **kwargs
):
3674 Gets the maximum vertical extent used in drawing commands so far.
3676 return _gdi_
.DC_MaxY(*args
, **kwargs
)
3678 def GetBoundingBox(*args
, **kwargs
):
3680 GetBoundingBox() -> (x1,y1, x2,y2)
3682 Returns the min and max points used in drawing commands so far.
3684 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
3686 def __nonzero__(self
): return self
.Ok()
3687 def _DrawPointList(*args
, **kwargs
):
3688 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3689 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
3691 def _DrawLineList(*args
, **kwargs
):
3692 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3693 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
3695 def _DrawRectangleList(*args
, **kwargs
):
3696 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3697 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
3699 def _DrawEllipseList(*args
, **kwargs
):
3700 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3701 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
3703 def _DrawPolygonList(*args
, **kwargs
):
3704 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3705 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
3707 def _DrawTextList(*args
, **kwargs
):
3709 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
3710 PyObject backgroundList) -> PyObject
3712 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
3714 def DrawPointList(self
, points
, pens
=None):
3716 Draw a list of points as quickly as possible.
3718 :param points: A sequence of 2-element sequences representing
3719 each point to draw, (x,y).
3720 :param pens: If None, then the current pen is used. If a
3721 single pen then it will be used for all points. If
3722 a list of pens then there should be one for each point
3727 elif isinstance(pens
, wx
.Pen
):
3729 elif len(pens
) != len(points
):
3730 raise ValueError('points and pens must have same length')
3731 return self
._DrawPointList
(points
, pens
, [])
3734 def DrawLineList(self
, lines
, pens
=None):
3736 Draw a list of lines as quickly as possible.
3738 :param lines: A sequence of 4-element sequences representing
3739 each line to draw, (x1,y1, x2,y2).
3740 :param pens: If None, then the current pen is used. If a
3741 single pen then it will be used for all lines. If
3742 a list of pens then there should be one for each line
3747 elif isinstance(pens
, wx
.Pen
):
3749 elif len(pens
) != len(lines
):
3750 raise ValueError('lines and pens must have same length')
3751 return self
._DrawLineList
(lines
, pens
, [])
3754 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
3756 Draw a list of rectangles as quickly as possible.
3758 :param rectangles: A sequence of 4-element sequences representing
3759 each rectangle to draw, (x,y, w,h).
3760 :param pens: If None, then the current pen is used. If a
3761 single pen then it will be used for all rectangles.
3762 If a list of pens then there should be one for each
3763 rectangle in rectangles.
3764 :param brushes: A brush or brushes to be used to fill the rectagles,
3765 with similar semantics as the pens parameter.
3769 elif isinstance(pens
, wx
.Pen
):
3771 elif len(pens
) != len(rectangles
):
3772 raise ValueError('rectangles and pens must have same length')
3775 elif isinstance(brushes
, wx
.Brush
):
3777 elif len(brushes
) != len(rectangles
):
3778 raise ValueError('rectangles and brushes must have same length')
3779 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
3782 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
3784 Draw a list of ellipses as quickly as possible.
3786 :param ellipses: A sequence of 4-element sequences representing
3787 each ellipse to draw, (x,y, w,h).
3788 :param pens: If None, then the current pen is used. If a
3789 single pen then it will be used for all ellipses.
3790 If a list of pens then there should be one for each
3791 ellipse in ellipses.
3792 :param brushes: A brush or brushes to be used to fill the ellipses,
3793 with similar semantics as the pens parameter.
3797 elif isinstance(pens
, wx
.Pen
):
3799 elif len(pens
) != len(ellipses
):
3800 raise ValueError('ellipses and pens must have same length')
3803 elif isinstance(brushes
, wx
.Brush
):
3805 elif len(brushes
) != len(ellipses
):
3806 raise ValueError('ellipses and brushes must have same length')
3807 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
3810 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
3812 Draw a list of polygons, each of which is a list of points.
3814 :param polygons: A sequence of sequences of sequences.
3815 [[(x1,y1),(x2,y2),(x3,y3)...],
3816 [(x1,y1),(x2,y2),(x3,y3)...]]
3818 :param pens: If None, then the current pen is used. If a
3819 single pen then it will be used for all polygons.
3820 If a list of pens then there should be one for each
3822 :param brushes: A brush or brushes to be used to fill the polygons,
3823 with similar semantics as the pens parameter.
3827 elif isinstance(pens
, wx
.Pen
):
3829 elif len(pens
) != len(polygons
):
3830 raise ValueError('polygons and pens must have same length')
3833 elif isinstance(brushes
, wx
.Brush
):
3835 elif len(brushes
) != len(polygons
):
3836 raise ValueError('polygons and brushes must have same length')
3837 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
3840 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
3842 Draw a list of strings using a list of coordinants for positioning each string.
3844 :param textList: A list of strings
3845 :param coords: A list of (x,y) positions
3846 :param foregrounds: A list of `wx.Colour` objects to use for the
3847 foregrounds of the strings.
3848 :param backgrounds: A list of `wx.Colour` objects to use for the
3849 backgrounds of the strings.
3851 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
3852 If you want backgrounds to do anything.
3854 if type(textList
) == type(''):
3855 textList
= [textList
]
3856 elif len(textList
) != len(coords
):
3857 raise ValueError('textlist and coords must have same length')
3858 if foregrounds
is None:
3860 elif isinstance(foregrounds
, wx
.Colour
):
3861 foregrounds
= [foregrounds
]
3862 elif len(foregrounds
) != len(coords
):
3863 raise ValueError('foregrounds and coords must have same length')
3864 if backgrounds
is None:
3866 elif isinstance(backgrounds
, wx
.Colour
):
3867 backgrounds
= [backgrounds
]
3868 elif len(backgrounds
) != len(coords
):
3869 raise ValueError('backgrounds and coords must have same length')
3870 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
3872 DC_swigregister
= _gdi_
.DC_swigregister
3875 #---------------------------------------------------------------------------
3879 A memory device context provides a means to draw graphics onto a
3880 bitmap. A bitmap must be selected into the new memory DC before it may
3881 be used for anything. Typical usage is as follows::
3884 dc.SelectObject(bitmap)
3885 # draw on the dc usign any of the Draw methods
3886 dc.SelectObject(wx.NullBitmap)
3887 # the bitmap now contains wahtever was drawn upon it
3889 Note that the memory DC *must* be deleted (or the bitmap selected out
3890 of it) before a bitmap can be reselected into another memory DC.
3893 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
3894 __repr__
= _swig_repr
3895 def __init__(self
, *args
, **kwargs
):
3897 __init__(self) -> MemoryDC
3899 Constructs a new memory device context.
3901 Use the Ok member to test whether the constructor was successful in
3902 creating a usable device context. Don't forget to select a bitmap into
3903 the DC before drawing on it.
3905 _gdi_
.MemoryDC_swiginit(self
,_gdi_
.new_MemoryDC(*args
, **kwargs
))
3906 def SelectObject(*args
, **kwargs
):
3908 SelectObject(self, Bitmap bitmap)
3910 Selects the bitmap into the device context, to use as the memory
3911 bitmap. Selecting the bitmap into a memory DC allows you to draw into
3912 the DC, and therefore the bitmap, and also to use Blit to copy the
3915 If the argument is wx.NullBitmap (or some other uninitialised
3916 `wx.Bitmap`) the current bitmap is selected out of the device context,
3917 and the original bitmap restored, allowing the current bitmap to be
3920 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
3922 MemoryDC_swigregister
= _gdi_
.MemoryDC_swigregister
3923 MemoryDC_swigregister(MemoryDC
)
3925 def MemoryDCFromDC(*args
, **kwargs
):
3927 MemoryDCFromDC(DC oldDC) -> MemoryDC
3929 Creates a DC that is compatible with the oldDC.
3931 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
3934 #---------------------------------------------------------------------------
3936 BUFFER_VIRTUAL_AREA
= _gdi_
.BUFFER_VIRTUAL_AREA
3937 BUFFER_CLIENT_AREA
= _gdi_
.BUFFER_CLIENT_AREA
3938 class BufferedDC(MemoryDC
):
3940 This simple class provides a simple way to avoid flicker: when drawing
3941 on it, everything is in fact first drawn on an in-memory buffer (a
3942 `wx.Bitmap`) and then copied to the screen only once, when this object
3945 It can be used in the same way as any other device
3946 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
3947 want to use it in your EVT_PAINT handler, you should look at
3948 `wx.BufferedPaintDC`.
3951 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
3952 __repr__
= _swig_repr
3953 def __init__(self
, *args
):
3955 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
3956 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
3958 Constructs a buffered DC.
3960 _gdi_
.BufferedDC_swiginit(self
,_gdi_
.new_BufferedDC(*args
))
3961 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
3963 __swig_destroy__
= _gdi_
.delete_BufferedDC
3964 __del__
= lambda self
: None;
3965 def UnMask(*args
, **kwargs
):
3969 Blits the buffer to the dc, and detaches the dc from the buffer (so it
3970 can be effectively used once only). This is usually only called in
3973 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
3975 BufferedDC_swigregister
= _gdi_
.BufferedDC_swigregister
3976 BufferedDC_swigregister(BufferedDC
)
3978 class BufferedPaintDC(BufferedDC
):
3980 This is a subclass of `wx.BufferedDC` which can be used inside of an
3981 EVT_PAINT event handler. Just create an object of this class instead
3982 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
3983 flicker. The only thing to watch out for is that if you are using this
3984 class together with `wx.ScrolledWindow`, you probably do **not** want
3985 to call `wx.Window.PrepareDC` on it as it already does this internally
3986 for the real underlying `wx.PaintDC`.
3988 If your window is already fully buffered in a `wx.Bitmap` then your
3989 EVT_PAINT handler can be as simple as just creating a
3990 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
3991 automatically when it is destroyed. For example::
3993 def OnPaint(self, event):
3994 dc = wx.BufferedPaintDC(self, self.buffer)
4001 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4002 __repr__
= _swig_repr
4003 def __init__(self
, *args
, **kwargs
):
4005 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4007 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4008 provide the bitmap to be used for buffering or let this object create
4009 one internally (in the latter case, the size of the client part of the
4010 window is automatically used).
4014 _gdi_
.BufferedPaintDC_swiginit(self
,_gdi_
.new_BufferedPaintDC(*args
, **kwargs
))
4015 BufferedPaintDC_swigregister
= _gdi_
.BufferedPaintDC_swigregister
4016 BufferedPaintDC_swigregister(BufferedPaintDC
)
4018 #---------------------------------------------------------------------------
4022 A wxScreenDC can be used to paint anywhere on the screen. This should
4023 normally be constructed as a temporary stack object; don't store a
4027 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4028 __repr__
= _swig_repr
4029 def __init__(self
, *args
, **kwargs
):
4031 __init__(self) -> ScreenDC
4033 A wxScreenDC can be used to paint anywhere on the screen. This should
4034 normally be constructed as a temporary stack object; don't store a
4038 _gdi_
.ScreenDC_swiginit(self
,_gdi_
.new_ScreenDC(*args
, **kwargs
))
4039 def StartDrawingOnTopWin(*args
, **kwargs
):
4041 StartDrawingOnTopWin(self, Window window) -> bool
4043 Specify that the area of the screen to be drawn upon coincides with
4046 :see: `EndDrawingOnTop`
4048 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4050 def StartDrawingOnTop(*args
, **kwargs
):
4052 StartDrawingOnTop(self, Rect rect=None) -> bool
4054 Specify that the area is the given rectangle, or the whole screen if
4057 :see: `EndDrawingOnTop`
4059 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4061 def EndDrawingOnTop(*args
, **kwargs
):
4063 EndDrawingOnTop(self) -> bool
4065 Use this in conjunction with `StartDrawingOnTop` or
4066 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4067 top of existing windows. Without this, some window systems (such as X)
4068 only allow drawing to take place underneath other windows.
4070 You might use this pair of functions when implementing a drag feature,
4071 for example as in the `wx.SplitterWindow` implementation.
4073 These functions are probably obsolete since the X implementations
4074 allow drawing directly on the screen now. However, the fact that this
4075 function allows the screen to be refreshed afterwards may be useful
4076 to some applications.
4078 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4080 ScreenDC_swigregister
= _gdi_
.ScreenDC_swigregister
4081 ScreenDC_swigregister(ScreenDC
)
4083 #---------------------------------------------------------------------------
4087 A wx.ClientDC must be constructed if an application wishes to paint on
4088 the client area of a window from outside an EVT_PAINT event. This should
4089 normally be constructed as a temporary stack object; don't store a
4090 wx.ClientDC object long term.
4092 To draw on a window from within an EVT_PAINT handler, construct a
4093 `wx.PaintDC` object.
4095 To draw on the whole window including decorations, construct a
4096 `wx.WindowDC` object (Windows only).
4099 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4100 __repr__
= _swig_repr
4101 def __init__(self
, *args
, **kwargs
):
4103 __init__(self, Window win) -> ClientDC
4105 Constructor. Pass the window on which you wish to paint.
4107 _gdi_
.ClientDC_swiginit(self
,_gdi_
.new_ClientDC(*args
, **kwargs
))
4108 ClientDC_swigregister
= _gdi_
.ClientDC_swigregister
4109 ClientDC_swigregister(ClientDC
)
4111 #---------------------------------------------------------------------------
4115 A wx.PaintDC must be constructed if an application wishes to paint on
4116 the client area of a window from within an EVT_PAINT event
4117 handler. This should normally be constructed as a temporary stack
4118 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4119 handler, you **must** create a wx.PaintDC object within it even if you
4120 don't actually use it.
4122 Using wx.PaintDC within EVT_PAINT handlers is important because it
4123 automatically sets the clipping area to the damaged area of the
4124 window. Attempts to draw outside this area do not appear.
4126 To draw on a window from outside EVT_PAINT handlers, construct a
4127 `wx.ClientDC` object.
4130 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4131 __repr__
= _swig_repr
4132 def __init__(self
, *args
, **kwargs
):
4134 __init__(self, Window win) -> PaintDC
4136 Constructor. Pass the window on which you wish to paint.
4138 _gdi_
.PaintDC_swiginit(self
,_gdi_
.new_PaintDC(*args
, **kwargs
))
4139 PaintDC_swigregister
= _gdi_
.PaintDC_swigregister
4140 PaintDC_swigregister(PaintDC
)
4142 #---------------------------------------------------------------------------
4146 A wx.WindowDC must be constructed if an application wishes to paint on
4147 the whole area of a window (client and decorations). This should
4148 normally be constructed as a temporary stack object; don't store a
4151 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4152 __repr__
= _swig_repr
4153 def __init__(self
, *args
, **kwargs
):
4155 __init__(self, Window win) -> WindowDC
4157 Constructor. Pass the window on which you wish to paint.
4159 _gdi_
.WindowDC_swiginit(self
,_gdi_
.new_WindowDC(*args
, **kwargs
))
4160 WindowDC_swigregister
= _gdi_
.WindowDC_swigregister
4161 WindowDC_swigregister(WindowDC
)
4163 #---------------------------------------------------------------------------
4167 wx.MirrorDC is a simple wrapper class which is always associated with a
4168 real `wx.DC` object and either forwards all of its operations to it
4169 without changes (no mirroring takes place) or exchanges x and y
4170 coordinates which makes it possible to reuse the same code to draw a
4171 figure and its mirror -- i.e. reflection related to the diagonal line
4174 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4175 __repr__
= _swig_repr
4176 def __init__(self
, *args
, **kwargs
):
4178 __init__(self, DC dc, bool mirror) -> MirrorDC
4180 Creates a mirrored DC associated with the real *dc*. Everything drawn
4181 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4184 _gdi_
.MirrorDC_swiginit(self
,_gdi_
.new_MirrorDC(*args
, **kwargs
))
4185 MirrorDC_swigregister
= _gdi_
.MirrorDC_swigregister
4186 MirrorDC_swigregister(MirrorDC
)
4188 #---------------------------------------------------------------------------
4190 class PostScriptDC(DC
):
4191 """This is a `wx.DC` that can write to PostScript files on any platform."""
4192 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4193 __repr__
= _swig_repr
4194 def __init__(self
, *args
, **kwargs
):
4196 __init__(self, wxPrintData printData) -> PostScriptDC
4198 Constructs a PostScript printer device context from a `wx.PrintData`
4201 _gdi_
.PostScriptDC_swiginit(self
,_gdi_
.new_PostScriptDC(*args
, **kwargs
))
4202 def GetPrintData(*args
, **kwargs
):
4203 """GetPrintData(self) -> wxPrintData"""
4204 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
4206 def SetPrintData(*args
, **kwargs
):
4207 """SetPrintData(self, wxPrintData data)"""
4208 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
4210 def SetResolution(*args
, **kwargs
):
4212 SetResolution(int ppi)
4214 Set resolution (in pixels per inch) that will be used in PostScript
4215 output. Default is 720ppi.
4217 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4219 SetResolution
= staticmethod(SetResolution
)
4220 def GetResolution(*args
, **kwargs
):
4222 GetResolution() -> int
4224 Return resolution used in PostScript output.
4226 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4228 GetResolution
= staticmethod(GetResolution
)
4229 PostScriptDC_swigregister
= _gdi_
.PostScriptDC_swigregister
4230 PostScriptDC_swigregister(PostScriptDC
)
4232 def PostScriptDC_SetResolution(*args
, **kwargs
):
4234 PostScriptDC_SetResolution(int ppi)
4236 Set resolution (in pixels per inch) that will be used in PostScript
4237 output. Default is 720ppi.
4239 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4241 def PostScriptDC_GetResolution(*args
):
4243 PostScriptDC_GetResolution() -> int
4245 Return resolution used in PostScript output.
4247 return _gdi_
.PostScriptDC_GetResolution(*args
)
4249 #---------------------------------------------------------------------------
4251 class MetaFile(_core
.Object
):
4252 """Proxy of C++ MetaFile class"""
4253 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4254 __repr__
= _swig_repr
4255 def __init__(self
, *args
, **kwargs
):
4256 """__init__(self, String filename=EmptyString) -> MetaFile"""
4257 _gdi_
.MetaFile_swiginit(self
,_gdi_
.new_MetaFile(*args
, **kwargs
))
4258 MetaFile_swigregister
= _gdi_
.MetaFile_swigregister
4259 MetaFile_swigregister(MetaFile
)
4261 class MetaFileDC(DC
):
4262 """Proxy of C++ MetaFileDC class"""
4263 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4264 __repr__
= _swig_repr
4265 def __init__(self
, *args
, **kwargs
):
4267 __init__(self, String filename=EmptyString, int width=0, int height=0,
4268 String description=EmptyString) -> MetaFileDC
4270 _gdi_
.MetaFileDC_swiginit(self
,_gdi_
.new_MetaFileDC(*args
, **kwargs
))
4271 MetaFileDC_swigregister
= _gdi_
.MetaFileDC_swigregister
4272 MetaFileDC_swigregister(MetaFileDC
)
4274 class PrinterDC(DC
):
4275 """Proxy of C++ PrinterDC class"""
4276 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4277 __repr__
= _swig_repr
4278 def __init__(self
, *args
, **kwargs
):
4279 """__init__(self, wxPrintData printData) -> PrinterDC"""
4280 _gdi_
.PrinterDC_swiginit(self
,_gdi_
.new_PrinterDC(*args
, **kwargs
))
4281 PrinterDC_swigregister
= _gdi_
.PrinterDC_swigregister
4282 PrinterDC_swigregister(PrinterDC
)
4284 #---------------------------------------------------------------------------
4286 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
4287 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
4288 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
4289 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
4290 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
4291 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
4292 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
4293 class ImageList(_core
.Object
):
4294 """Proxy of C++ ImageList class"""
4295 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4296 __repr__
= _swig_repr
4297 def __init__(self
, *args
, **kwargs
):
4298 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4299 _gdi_
.ImageList_swiginit(self
,_gdi_
.new_ImageList(*args
, **kwargs
))
4300 __swig_destroy__
= _gdi_
.delete_ImageList
4301 __del__
= lambda self
: None;
4302 def Add(*args
, **kwargs
):
4303 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4304 return _gdi_
.ImageList_Add(*args
, **kwargs
)
4306 def AddWithColourMask(*args
, **kwargs
):
4307 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4308 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
4310 def AddIcon(*args
, **kwargs
):
4311 """AddIcon(self, Icon icon) -> int"""
4312 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
4314 def GetBitmap(*args
, **kwargs
):
4315 """GetBitmap(self, int index) -> Bitmap"""
4316 return _gdi_
.ImageList_GetBitmap(*args
, **kwargs
)
4318 def GetIcon(*args
, **kwargs
):
4319 """GetIcon(self, int index) -> Icon"""
4320 return _gdi_
.ImageList_GetIcon(*args
, **kwargs
)
4322 def Replace(*args
, **kwargs
):
4323 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
4324 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
4326 def Draw(*args
, **kwargs
):
4328 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4329 bool solidBackground=False) -> bool
4331 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
4333 def GetImageCount(*args
, **kwargs
):
4334 """GetImageCount(self) -> int"""
4335 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
4337 def Remove(*args
, **kwargs
):
4338 """Remove(self, int index) -> bool"""
4339 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
4341 def RemoveAll(*args
, **kwargs
):
4342 """RemoveAll(self) -> bool"""
4343 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
4345 def GetSize(*args
, **kwargs
):
4346 """GetSize() -> (width,height)"""
4347 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
4349 ImageList_swigregister
= _gdi_
.ImageList_swigregister
4350 ImageList_swigregister(ImageList
)
4352 #---------------------------------------------------------------------------
4354 class StockGDI(object):
4355 """Proxy of C++ StockGDI class"""
4356 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4357 __repr__
= _swig_repr
4358 BRUSH_BLACK
= _gdi_
.StockGDI_BRUSH_BLACK
4359 BRUSH_BLUE
= _gdi_
.StockGDI_BRUSH_BLUE
4360 BRUSH_CYAN
= _gdi_
.StockGDI_BRUSH_CYAN
4361 BRUSH_GREEN
= _gdi_
.StockGDI_BRUSH_GREEN
4362 BRUSH_GREY
= _gdi_
.StockGDI_BRUSH_GREY
4363 BRUSH_LIGHTGREY
= _gdi_
.StockGDI_BRUSH_LIGHTGREY
4364 BRUSH_MEDIUMGREY
= _gdi_
.StockGDI_BRUSH_MEDIUMGREY
4365 BRUSH_RED
= _gdi_
.StockGDI_BRUSH_RED
4366 BRUSH_TRANSPARENT
= _gdi_
.StockGDI_BRUSH_TRANSPARENT
4367 BRUSH_WHITE
= _gdi_
.StockGDI_BRUSH_WHITE
4368 COLOUR_BLACK
= _gdi_
.StockGDI_COLOUR_BLACK
4369 COLOUR_BLUE
= _gdi_
.StockGDI_COLOUR_BLUE
4370 COLOUR_CYAN
= _gdi_
.StockGDI_COLOUR_CYAN
4371 COLOUR_GREEN
= _gdi_
.StockGDI_COLOUR_GREEN
4372 COLOUR_LIGHTGREY
= _gdi_
.StockGDI_COLOUR_LIGHTGREY
4373 COLOUR_RED
= _gdi_
.StockGDI_COLOUR_RED
4374 COLOUR_WHITE
= _gdi_
.StockGDI_COLOUR_WHITE
4375 CURSOR_CROSS
= _gdi_
.StockGDI_CURSOR_CROSS
4376 CURSOR_HOURGLASS
= _gdi_
.StockGDI_CURSOR_HOURGLASS
4377 CURSOR_STANDARD
= _gdi_
.StockGDI_CURSOR_STANDARD
4378 FONT_ITALIC
= _gdi_
.StockGDI_FONT_ITALIC
4379 FONT_NORMAL
= _gdi_
.StockGDI_FONT_NORMAL
4380 FONT_SMALL
= _gdi_
.StockGDI_FONT_SMALL
4381 FONT_SWISS
= _gdi_
.StockGDI_FONT_SWISS
4382 PEN_BLACK
= _gdi_
.StockGDI_PEN_BLACK
4383 PEN_BLACKDASHED
= _gdi_
.StockGDI_PEN_BLACKDASHED
4384 PEN_CYAN
= _gdi_
.StockGDI_PEN_CYAN
4385 PEN_GREEN
= _gdi_
.StockGDI_PEN_GREEN
4386 PEN_GREY
= _gdi_
.StockGDI_PEN_GREY
4387 PEN_LIGHTGREY
= _gdi_
.StockGDI_PEN_LIGHTGREY
4388 PEN_MEDIUMGREY
= _gdi_
.StockGDI_PEN_MEDIUMGREY
4389 PEN_RED
= _gdi_
.StockGDI_PEN_RED
4390 PEN_TRANSPARENT
= _gdi_
.StockGDI_PEN_TRANSPARENT
4391 PEN_WHITE
= _gdi_
.StockGDI_PEN_WHITE
4392 ITEMCOUNT
= _gdi_
.StockGDI_ITEMCOUNT
4393 def __init__(self
, *args
, **kwargs
):
4394 """__init__(self) -> StockGDI"""
4395 _gdi_
.StockGDI_swiginit(self
,_gdi_
.new_StockGDI(*args
, **kwargs
))
4396 __swig_destroy__
= _gdi_
.delete_StockGDI
4397 __del__
= lambda self
: None;
4398 def DeleteAll(*args
, **kwargs
):
4400 return _gdi_
.StockGDI_DeleteAll(*args
, **kwargs
)
4402 DeleteAll
= staticmethod(DeleteAll
)
4403 def instance(*args
, **kwargs
):
4404 """instance() -> StockGDI"""
4405 return _gdi_
.StockGDI_instance(*args
, **kwargs
)
4407 instance
= staticmethod(instance
)
4408 def GetBrush(*args
, **kwargs
):
4409 """GetBrush(int item) -> Brush"""
4410 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
4412 GetBrush
= staticmethod(GetBrush
)
4413 def GetColour(*args
, **kwargs
):
4414 """GetColour(int item) -> Colour"""
4415 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
4417 GetColour
= staticmethod(GetColour
)
4418 def GetCursor(*args
, **kwargs
):
4419 """GetCursor(int item) -> Cursor"""
4420 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
4422 GetCursor
= staticmethod(GetCursor
)
4423 def GetPen(*args
, **kwargs
):
4424 """GetPen(int item) -> Pen"""
4425 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
4427 GetPen
= staticmethod(GetPen
)
4428 def GetFont(*args
, **kwargs
):
4429 """GetFont(self, int item) -> Font"""
4430 return _gdi_
.StockGDI_GetFont(*args
, **kwargs
)
4432 def _initStockObjects():
4434 wx
.ITALIC_FONT
= StockGDI
.instance().GetFont(StockGDI
.FONT_ITALIC
)
4435 wx
.NORMAL_FONT
= StockGDI
.instance().GetFont(StockGDI
.FONT_NORMAL
)
4436 wx
.SMALL_FONT
= StockGDI
.instance().GetFont(StockGDI
.FONT_SMALL
)
4437 wx
.SWISS_FONT
= StockGDI
.instance().GetFont(StockGDI
.FONT_SWISS
)
4439 wx
.BLACK_DASHED_PEN
= StockGDI
.GetPen(StockGDI
.PEN_BLACKDASHED
)
4440 wx
.BLACK_PEN
= StockGDI
.GetPen(StockGDI
.PEN_BLACK
)
4441 wx
.CYAN_PEN
= StockGDI
.GetPen(StockGDI
.PEN_CYAN
)
4442 wx
.GREEN_PEN
= StockGDI
.GetPen(StockGDI
.PEN_GREEN
)
4443 wx
.GREY_PEN
= StockGDI
.GetPen(StockGDI
.PEN_GREY
)
4444 wx
.LIGHT_GREY_PEN
= StockGDI
.GetPen(StockGDI
.PEN_LIGHTGREY
)
4445 wx
.MEDIUM_GREY_PEN
= StockGDI
.GetPen(StockGDI
.PEN_MEDIUMGREY
)
4446 wx
.RED_PEN
= StockGDI
.GetPen(StockGDI
.PEN_RED
)
4447 wx
.TRANSPARENT_PEN
= StockGDI
.GetPen(StockGDI
.PEN_TRANSPARENT
)
4448 wx
.WHITE_PEN
= StockGDI
.GetPen(StockGDI
.PEN_WHITE
)
4450 wx
.BLACK_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLACK
)
4451 wx
.BLUE_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLUE
)
4452 wx
.CYAN_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_CYAN
)
4453 wx
.GREEN_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREEN
)
4454 wx
.GREY_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREY
)
4455 wx
.LIGHT_GREY_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_LIGHTGREY
)
4456 wx
.MEDIUM_GREY_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_MEDIUMGREY
)
4457 wx
.RED_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_RED
)
4458 wx
.TRANSPARENT_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_TRANSPARENT
)
4459 wx
.WHITE_BRUSH
= StockGDI
.GetBrush(StockGDI
.BRUSH_WHITE
)
4461 wx
.BLACK
= StockGDI
.GetColour(StockGDI
.COLOUR_BLACK
)
4462 wx
.BLUE
= StockGDI
.GetColour(StockGDI
.COLOUR_BLUE
)
4463 wx
.CYAN
= StockGDI
.GetColour(StockGDI
.COLOUR_CYAN
)
4464 wx
.GREEN
= StockGDI
.GetColour(StockGDI
.COLOUR_GREEN
)
4465 wx
.LIGHT_GREY
= StockGDI
.GetColour(StockGDI
.COLOUR_LIGHTGREY
)
4466 wx
.RED
= StockGDI
.GetColour(StockGDI
.COLOUR_RED
)
4467 wx
.WHITE
= StockGDI
.GetColour(StockGDI
.COLOUR_WHITE
)
4469 wx
.CROSS_CURSOR
= StockGDI
.GetCursor(StockGDI
.CURSOR_CROSS
)
4470 wx
.HOURGLASS_CURSOR
= StockGDI
.GetCursor(StockGDI
.CURSOR_HOURGLASS
)
4471 wx
.STANDARD_CURSOR
= StockGDI
.GetCursor(StockGDI
.CURSOR_STANDARD
)
4473 _initStockObjects
= staticmethod(_initStockObjects
)
4475 StockGDI_swigregister
= _gdi_
.StockGDI_swigregister
4476 StockGDI_swigregister(StockGDI
)
4478 def StockGDI_DeleteAll(*args
):
4479 """StockGDI_DeleteAll()"""
4480 return _gdi_
.StockGDI_DeleteAll(*args
)
4482 def StockGDI_instance(*args
):
4483 """StockGDI_instance() -> StockGDI"""
4484 return _gdi_
.StockGDI_instance(*args
)
4486 def StockGDI_GetBrush(*args
, **kwargs
):
4487 """StockGDI_GetBrush(int item) -> Brush"""
4488 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
4490 def StockGDI_GetColour(*args
, **kwargs
):
4491 """StockGDI_GetColour(int item) -> Colour"""
4492 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
4494 def StockGDI_GetCursor(*args
, **kwargs
):
4495 """StockGDI_GetCursor(int item) -> Cursor"""
4496 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
4498 def StockGDI_GetPen(*args
, **kwargs
):
4499 """StockGDI_GetPen(int item) -> Pen"""
4500 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
4502 class GDIObjListBase(object):
4503 """Proxy of C++ GDIObjListBase class"""
4504 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4505 __repr__
= _swig_repr
4506 def __init__(self
, *args
, **kwargs
):
4507 """__init__(self) -> GDIObjListBase"""
4508 _gdi_
.GDIObjListBase_swiginit(self
,_gdi_
.new_GDIObjListBase(*args
, **kwargs
))
4509 __swig_destroy__
= _gdi_
.delete_GDIObjListBase
4510 __del__
= lambda self
: None;
4511 GDIObjListBase_swigregister
= _gdi_
.GDIObjListBase_swigregister
4512 GDIObjListBase_swigregister(GDIObjListBase
)
4514 NullBitmap
= cvar
.NullBitmap
4515 NullIcon
= cvar
.NullIcon
4516 NullCursor
= cvar
.NullCursor
4517 NullPen
= cvar
.NullPen
4518 NullBrush
= cvar
.NullBrush
4519 NullPalette
= cvar
.NullPalette
4520 NullFont
= cvar
.NullFont
4521 NullColour
= cvar
.NullColour
4523 class PenList(GDIObjListBase
):
4524 """Proxy of C++ PenList class"""
4525 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4526 def __init__(self
): raise AttributeError, "No constructor defined"
4527 __repr__
= _swig_repr
4528 def FindOrCreatePen(*args
, **kwargs
):
4529 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
4530 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
4532 def AddPen(*args
, **kwargs
):
4533 """AddPen(self, Pen pen)"""
4534 return _gdi_
.PenList_AddPen(*args
, **kwargs
)
4536 def RemovePen(*args
, **kwargs
):
4537 """RemovePen(self, Pen pen)"""
4538 return _gdi_
.PenList_RemovePen(*args
, **kwargs
)
4540 AddPen
= wx
._deprecated
(AddPen
)
4541 RemovePen
= wx
._deprecated
(RemovePen
)
4543 PenList_swigregister
= _gdi_
.PenList_swigregister
4544 PenList_swigregister(PenList
)
4546 class BrushList(GDIObjListBase
):
4547 """Proxy of C++ BrushList class"""
4548 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4549 def __init__(self
): raise AttributeError, "No constructor defined"
4550 __repr__
= _swig_repr
4551 def FindOrCreateBrush(*args
, **kwargs
):
4552 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
4553 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
4555 def AddBrush(*args
, **kwargs
):
4556 """AddBrush(self, Brush brush)"""
4557 return _gdi_
.BrushList_AddBrush(*args
, **kwargs
)
4559 def RemoveBrush(*args
, **kwargs
):
4560 """RemoveBrush(self, Brush brush)"""
4561 return _gdi_
.BrushList_RemoveBrush(*args
, **kwargs
)
4563 AddBrush
= wx
._deprecated
(AddBrush
)
4564 RemoveBrush
= wx
._deprecated
(RemoveBrush
)
4566 BrushList_swigregister
= _gdi_
.BrushList_swigregister
4567 BrushList_swigregister(BrushList
)
4569 class FontList(GDIObjListBase
):
4570 """Proxy of C++ FontList class"""
4571 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4572 def __init__(self
): raise AttributeError, "No constructor defined"
4573 __repr__
= _swig_repr
4574 def FindOrCreateFont(*args
, **kwargs
):
4576 FindOrCreateFont(self, int point_size, int family, int style, int weight,
4577 bool underline=False, String facename=EmptyString,
4578 int encoding=FONTENCODING_DEFAULT) -> Font
4580 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
4582 def AddFont(*args
, **kwargs
):
4583 """AddFont(self, Font font)"""
4584 return _gdi_
.FontList_AddFont(*args
, **kwargs
)
4586 def RemoveFont(*args
, **kwargs
):
4587 """RemoveFont(self, Font font)"""
4588 return _gdi_
.FontList_RemoveFont(*args
, **kwargs
)
4590 AddFont
= wx
._deprecated
(AddFont
)
4591 RemoveFont
= wx
._deprecated
(RemoveFont
)
4593 FontList_swigregister
= _gdi_
.FontList_swigregister
4594 FontList_swigregister(FontList
)
4596 class ColourDatabase(object):
4597 """Proxy of C++ ColourDatabase class"""
4598 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4599 __repr__
= _swig_repr
4600 def __init__(self
, *args
, **kwargs
):
4601 """__init__(self) -> ColourDatabase"""
4602 _gdi_
.ColourDatabase_swiginit(self
,_gdi_
.new_ColourDatabase(*args
, **kwargs
))
4603 __swig_destroy__
= _gdi_
.delete_ColourDatabase
4604 __del__
= lambda self
: None;
4605 def Find(*args
, **kwargs
):
4606 """Find(self, String name) -> Colour"""
4607 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
4609 def FindName(*args
, **kwargs
):
4610 """FindName(self, Colour colour) -> String"""
4611 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
4614 def AddColour(*args
, **kwargs
):
4615 """AddColour(self, String name, Colour colour)"""
4616 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
4618 def Append(*args
, **kwargs
):
4619 """Append(self, String name, int red, int green, int blue)"""
4620 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
4622 ColourDatabase_swigregister
= _gdi_
.ColourDatabase_swigregister
4623 ColourDatabase_swigregister(ColourDatabase
)
4625 #---------------------------------------------------------------------------
4628 def _wxPyInitTheFontList(*args
):
4629 """_wxPyInitTheFontList() -> FontList"""
4630 return _gdi_
._wxPyInitTheFontList
(*args
)
4632 def _wxPyInitThePenList(*args
):
4633 """_wxPyInitThePenList() -> PenList"""
4634 return _gdi_
._wxPyInitThePenList
(*args
)
4636 def _wxPyInitTheBrushList(*args
):
4637 """_wxPyInitTheBrushList() -> BrushList"""
4638 return _gdi_
._wxPyInitTheBrushList
(*args
)
4640 def _wxPyInitTheColourDatabase(*args
):
4641 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
4642 return _gdi_
._wxPyInitTheColourDatabase
(*args
)
4643 # This function makes a class used to do delayed initialization of some
4644 # stock wx objects. When they are used the first time then an init function
4645 # is called to make the real instance, which is then used to replace the
4646 # original instance and class seen by the programmer.
4647 def _wxPyMakeDelayedInitWrapper(initFunc
):
4648 class _wxPyStockObjectWrapper(object):
4649 def __init__(self
, *args
):
4651 def __getattr__(self
, name
):
4652 obj
= initFunc(*self
._args
)
4653 self
.__class
__ = obj
.__class
__
4654 self
.__dict
__ = obj
.__dict
__
4655 return getattr(self
, name
)
4657 return self
.__getattr
__("__str__")()
4659 return self
.__getattr
__("__repr__")()
4660 return _wxPyStockObjectWrapper
4662 wxTheFontList
= _wxPyMakeDelayedInitWrapper(_wxPyInitTheFontList
)()
4663 wxThePenList
= _wxPyMakeDelayedInitWrapper(_wxPyInitThePenList
)()
4664 wxTheBrushList
= _wxPyMakeDelayedInitWrapper(_wxPyInitTheBrushList
)()
4665 wxTheColourDatabase
= _wxPyMakeDelayedInitWrapper(_wxPyInitTheColourDatabase
)()
4667 NullColor
= NullColour
4668 #---------------------------------------------------------------------------
4670 class Effects(_core
.Object
):
4671 """Proxy of C++ Effects class"""
4672 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4673 __repr__
= _swig_repr
4674 def __init__(self
, *args
, **kwargs
):
4675 """__init__(self) -> Effects"""
4676 _gdi_
.Effects_swiginit(self
,_gdi_
.new_Effects(*args
, **kwargs
))
4677 def GetHighlightColour(*args
, **kwargs
):
4678 """GetHighlightColour(self) -> Colour"""
4679 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
4681 def GetLightShadow(*args
, **kwargs
):
4682 """GetLightShadow(self) -> Colour"""
4683 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
4685 def GetFaceColour(*args
, **kwargs
):
4686 """GetFaceColour(self) -> Colour"""
4687 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
4689 def GetMediumShadow(*args
, **kwargs
):
4690 """GetMediumShadow(self) -> Colour"""
4691 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
4693 def GetDarkShadow(*args
, **kwargs
):
4694 """GetDarkShadow(self) -> Colour"""
4695 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
4697 def SetHighlightColour(*args
, **kwargs
):
4698 """SetHighlightColour(self, Colour c)"""
4699 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
4701 def SetLightShadow(*args
, **kwargs
):
4702 """SetLightShadow(self, Colour c)"""
4703 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
4705 def SetFaceColour(*args
, **kwargs
):
4706 """SetFaceColour(self, Colour c)"""
4707 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
4709 def SetMediumShadow(*args
, **kwargs
):
4710 """SetMediumShadow(self, Colour c)"""
4711 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
4713 def SetDarkShadow(*args
, **kwargs
):
4714 """SetDarkShadow(self, Colour c)"""
4715 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
4717 def Set(*args
, **kwargs
):
4719 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
4720 Colour mediumShadow, Colour darkShadow)
4722 return _gdi_
.Effects_Set(*args
, **kwargs
)
4724 def DrawSunkenEdge(*args
, **kwargs
):
4725 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
4726 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
4728 def TileBitmap(*args
, **kwargs
):
4729 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
4730 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
4732 Effects_swigregister
= _gdi_
.Effects_swigregister
4733 Effects_swigregister(Effects
)
4735 #---------------------------------------------------------------------------
4737 CONTROL_DISABLED
= _gdi_
.CONTROL_DISABLED
4738 CONTROL_FOCUSED
= _gdi_
.CONTROL_FOCUSED
4739 CONTROL_PRESSED
= _gdi_
.CONTROL_PRESSED
4740 CONTROL_ISDEFAULT
= _gdi_
.CONTROL_ISDEFAULT
4741 CONTROL_ISSUBMENU
= _gdi_
.CONTROL_ISSUBMENU
4742 CONTROL_EXPANDED
= _gdi_
.CONTROL_EXPANDED
4743 CONTROL_CURRENT
= _gdi_
.CONTROL_CURRENT
4744 CONTROL_SELECTED
= _gdi_
.CONTROL_SELECTED
4745 CONTROL_CHECKED
= _gdi_
.CONTROL_CHECKED
4746 CONTROL_CHECKABLE
= _gdi_
.CONTROL_CHECKABLE
4747 CONTROL_UNDETERMINED
= _gdi_
.CONTROL_UNDETERMINED
4748 CONTROL_FLAGS_MASK
= _gdi_
.CONTROL_FLAGS_MASK
4749 CONTROL_DIRTY
= _gdi_
.CONTROL_DIRTY
4750 class SplitterRenderParams(object):
4752 This is just a simple struct used as a return value of
4753 `wx.RendererNative.GetSplitterParams` and contains some platform
4754 specific metrics about splitters.
4756 * widthSash: the width of the splitter sash.
4757 * border: the width of the border of the splitter window.
4758 * isHotSensitive: ``True`` if the splitter changes its
4759 appearance when the mouse is over it.
4763 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4764 __repr__
= _swig_repr
4765 def __init__(self
, *args
, **kwargs
):
4767 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
4769 This is just a simple struct used as a return value of
4770 `wx.RendererNative.GetSplitterParams` and contains some platform
4771 specific metrics about splitters.
4773 * widthSash: the width of the splitter sash.
4774 * border: the width of the border of the splitter window.
4775 * isHotSensitive: ``True`` if the splitter changes its
4776 appearance when the mouse is over it.
4780 _gdi_
.SplitterRenderParams_swiginit(self
,_gdi_
.new_SplitterRenderParams(*args
, **kwargs
))
4781 __swig_destroy__
= _gdi_
.delete_SplitterRenderParams
4782 __del__
= lambda self
: None;
4783 widthSash
= property(_gdi_
.SplitterRenderParams_widthSash_get
)
4784 border
= property(_gdi_
.SplitterRenderParams_border_get
)
4785 isHotSensitive
= property(_gdi_
.SplitterRenderParams_isHotSensitive_get
)
4786 SplitterRenderParams_swigregister
= _gdi_
.SplitterRenderParams_swigregister
4787 SplitterRenderParams_swigregister(SplitterRenderParams
)
4789 class RendererVersion(object):
4791 This simple struct represents the `wx.RendererNative` interface
4792 version and is only used as the return value of
4793 `wx.RendererNative.GetVersion`.
4795 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4796 __repr__
= _swig_repr
4797 def __init__(self
, *args
, **kwargs
):
4799 __init__(self, int version_, int age_) -> RendererVersion
4801 This simple struct represents the `wx.RendererNative` interface
4802 version and is only used as the return value of
4803 `wx.RendererNative.GetVersion`.
4805 _gdi_
.RendererVersion_swiginit(self
,_gdi_
.new_RendererVersion(*args
, **kwargs
))
4806 __swig_destroy__
= _gdi_
.delete_RendererVersion
4807 __del__
= lambda self
: None;
4808 Current_Version
= _gdi_
.RendererVersion_Current_Version
4809 Current_Age
= _gdi_
.RendererVersion_Current_Age
4810 def IsCompatible(*args
, **kwargs
):
4811 """IsCompatible(RendererVersion ver) -> bool"""
4812 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
4814 IsCompatible
= staticmethod(IsCompatible
)
4815 version
= property(_gdi_
.RendererVersion_version_get
)
4816 age
= property(_gdi_
.RendererVersion_age_get
)
4817 RendererVersion_swigregister
= _gdi_
.RendererVersion_swigregister
4818 RendererVersion_swigregister(RendererVersion
)
4820 def RendererVersion_IsCompatible(*args
, **kwargs
):
4821 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
4822 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
4824 class RendererNative(object):
4826 One of the design principles of wxWidgets is to use the native widgets
4827 on every platform in order to be as close to the native look and feel
4828 on every platform. However there are still cases when some generic
4829 widgets are needed for various reasons, but it can sometimes take a
4830 lot of messy work to make them conform to the native LnF.
4832 The wx.RendererNative class is a collection of functions that have
4833 platform-specific implementations for drawing certain parts of
4834 genereic controls in ways that are as close to the native look as
4838 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4839 def __init__(self
): raise AttributeError, "No constructor defined"
4840 __repr__
= _swig_repr
4841 def DrawHeaderButton(*args
, **kwargs
):
4843 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0)
4845 Draw the header control button (such as what is used by `wx.ListCtrl`
4848 return _gdi_
.RendererNative_DrawHeaderButton(*args
, **kwargs
)
4850 def DrawTreeItemButton(*args
, **kwargs
):
4852 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
4854 Draw the expanded/collapsed icon for a tree control item.
4856 return _gdi_
.RendererNative_DrawTreeItemButton(*args
, **kwargs
)
4858 def DrawSplitterBorder(*args
, **kwargs
):
4860 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
4862 Draw the border for a sash window: this border must be such that the
4863 sash drawn by `DrawSplitterSash` blends into it well.
4865 return _gdi_
.RendererNative_DrawSplitterBorder(*args
, **kwargs
)
4867 def DrawSplitterSash(*args
, **kwargs
):
4869 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
4872 Draw a sash. The orient parameter defines whether the sash should be
4873 vertical or horizontal and how the position should be interpreted.
4875 return _gdi_
.RendererNative_DrawSplitterSash(*args
, **kwargs
)
4877 def DrawComboBoxDropButton(*args
, **kwargs
):
4879 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
4881 Draw a button like the one used by `wx.ComboBox` to show a drop down
4882 window. The usual appearance is a downwards pointing arrow.
4884 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
4885 ``wx.CONTROL_CURRENT`` bits set.
4887 return _gdi_
.RendererNative_DrawComboBoxDropButton(*args
, **kwargs
)
4889 def DrawDropArrow(*args
, **kwargs
):
4891 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
4893 Draw a drop down arrow that is suitable for use outside a combo
4894 box. Arrow will have a transparent background.
4896 ``rect`` is not entirely filled by the arrow. Instead, you should use
4897 bounding rectangle of a drop down button which arrow matches the size
4898 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
4899 ``wx.CONTROL_CURRENT`` bit set.
4901 return _gdi_
.RendererNative_DrawDropArrow(*args
, **kwargs
)
4903 def DrawCheckBox(*args
, **kwargs
):
4905 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
4907 Draw a check button. Flags may use wx.CONTROL_CHECKED,
4908 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
4910 return _gdi_
.RendererNative_DrawCheckBox(*args
, **kwargs
)
4912 def DrawPushButton(*args
, **kwargs
):
4914 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
4916 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
4917 wx.CONTROL_ISDEFAULT
4919 return _gdi_
.RendererNative_DrawPushButton(*args
, **kwargs
)
4921 def DrawItemSelectionRect(*args
, **kwargs
):
4923 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
4925 Draw rectangle indicating that an item in e.g. a list control has been
4928 The flags parameter may be:
4930 ==================== ============================================
4931 wx.CONTROL_SELECTED item is selected, e.g. draw background
4932 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
4933 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
4934 background vs. grey otherwise
4935 ==================== ============================================
4938 return _gdi_
.RendererNative_DrawItemSelectionRect(*args
, **kwargs
)
4940 def GetSplitterParams(*args
, **kwargs
):
4942 GetSplitterParams(self, Window win) -> SplitterRenderParams
4944 Get the splitter parameters, see `wx.SplitterRenderParams`.
4946 return _gdi_
.RendererNative_GetSplitterParams(*args
, **kwargs
)
4948 def Get(*args
, **kwargs
):
4950 Get() -> RendererNative
4952 Return the currently used renderer
4954 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
4956 Get
= staticmethod(Get
)
4957 def GetGeneric(*args
, **kwargs
):
4959 GetGeneric() -> RendererNative
4961 Return the generic implementation of the renderer. Under some
4962 platforms, this is the default renderer implementation, others have
4963 platform-specific default renderer which can be retrieved by calling
4966 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
4968 GetGeneric
= staticmethod(GetGeneric
)
4969 def GetDefault(*args
, **kwargs
):
4971 GetDefault() -> RendererNative
4973 Return the default (native) implementation for this platform -- this
4974 is also the one used by default but this may be changed by calling `Set`
4975 in which case the return value of this method may be different from
4976 the return value of `Get`.
4978 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
4980 GetDefault
= staticmethod(GetDefault
)
4981 def Set(*args
, **kwargs
):
4983 Set(RendererNative renderer) -> RendererNative
4985 Set the renderer to use, passing None reverts to using the default
4986 renderer. Returns the previous renderer used with Set or None.
4988 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
4990 Set
= staticmethod(Set
)
4991 def GetVersion(*args
, **kwargs
):
4993 GetVersion(self) -> RendererVersion
4995 Returns the version of the renderer. Will be used for ensuring
4996 compatibility of dynamically loaded renderers.
4998 return _gdi_
.RendererNative_GetVersion(*args
, **kwargs
)
5000 RendererNative_swigregister
= _gdi_
.RendererNative_swigregister
5001 RendererNative_swigregister(RendererNative
)
5003 def RendererNative_Get(*args
):
5005 RendererNative_Get() -> RendererNative
5007 Return the currently used renderer
5009 return _gdi_
.RendererNative_Get(*args
)
5011 def RendererNative_GetGeneric(*args
):
5013 RendererNative_GetGeneric() -> RendererNative
5015 Return the generic implementation of the renderer. Under some
5016 platforms, this is the default renderer implementation, others have
5017 platform-specific default renderer which can be retrieved by calling
5020 return _gdi_
.RendererNative_GetGeneric(*args
)
5022 def RendererNative_GetDefault(*args
):
5024 RendererNative_GetDefault() -> RendererNative
5026 Return the default (native) implementation for this platform -- this
5027 is also the one used by default but this may be changed by calling `Set`
5028 in which case the return value of this method may be different from
5029 the return value of `Get`.
5031 return _gdi_
.RendererNative_GetDefault(*args
)
5033 def RendererNative_Set(*args
, **kwargs
):
5035 RendererNative_Set(RendererNative renderer) -> RendererNative
5037 Set the renderer to use, passing None reverts to using the default
5038 renderer. Returns the previous renderer used with Set or None.
5040 return _gdi_
.RendererNative_Set(*args
, **kwargs
)