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 _gdi_
.GDIObject_swigregister(GDIObject
)
73 #---------------------------------------------------------------------------
75 C2S_NAME
= _gdi_
.C2S_NAME
76 C2S_CSS_SYNTAX
= _gdi_
.C2S_CSS_SYNTAX
77 C2S_HTML_SYNTAX
= _gdi_
.C2S_HTML_SYNTAX
78 ALPHA_TRANSPARENT
= _gdi_
.ALPHA_TRANSPARENT
79 ALPHA_OPAQUE
= _gdi_
.ALPHA_OPAQUE
80 class Colour(_core
.Object
):
82 A colour is an object representing a combination of Red, Green, and
83 Blue (RGB) intensity values, and is used to determine drawing colours,
84 window colours, etc. Valid RGB values are in the range 0 to 255.
86 In wxPython there are typemaps that will automatically convert from a
87 colour name, from a '#RRGGBB' colour hex value string, or from a 3
88 integer tuple to a wx.Colour object when calling C++ methods that
89 expect a wxColour. This means that the following are all
92 win.SetBackgroundColour(wxColour(0,0,255))
93 win.SetBackgroundColour('BLUE')
94 win.SetBackgroundColour('#0000FF')
95 win.SetBackgroundColour((0,0,255))
97 Additional colour names and their coresponding values can be added
98 using `wx.ColourDatabase`. Various system colours (as set in the
99 user's system preferences) can be retrieved with
100 `wx.SystemSettings.GetColour`.
103 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
104 __repr__
= _swig_repr
105 def __init__(self
, *args
, **kwargs
):
107 __init__(self, byte red=0, byte green=0, byte blue=0, byte alpha=ALPHA_OPAQUE) -> Colour
109 Constructs a colour from red, green and blue values.
111 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
114 _gdi_
.Colour_swiginit(self
,_gdi_
.new_Colour(*args
, **kwargs
))
115 __swig_destroy__
= _gdi_
.delete_Colour
116 __del__
= lambda self
: None;
117 def Red(*args
, **kwargs
):
121 Returns the red intensity.
123 return _gdi_
.Colour_Red(*args
, **kwargs
)
125 def Green(*args
, **kwargs
):
129 Returns the green intensity.
131 return _gdi_
.Colour_Green(*args
, **kwargs
)
133 def Blue(*args
, **kwargs
):
137 Returns the blue intensity.
139 return _gdi_
.Colour_Blue(*args
, **kwargs
)
141 def Alpha(*args
, **kwargs
):
145 Returns the Alpha value.
147 return _gdi_
.Colour_Alpha(*args
, **kwargs
)
149 def IsOk(*args
, **kwargs
):
153 Returns True if the colour object is valid (the colour has been
154 initialised with RGB values).
156 return _gdi_
.Colour_IsOk(*args
, **kwargs
)
159 def Set(*args
, **kwargs
):
161 Set(self, byte red, byte green, byte blue, byte alpha=ALPHA_OPAQUE)
163 Sets the RGB intensity values.
165 return _gdi_
.Colour_Set(*args
, **kwargs
)
167 def SetRGB(*args
, **kwargs
):
169 SetRGB(self, unsigned long colRGB)
171 Sets the RGB intensity values from a packed RGB value.
173 return _gdi_
.Colour_SetRGB(*args
, **kwargs
)
175 def SetFromName(*args
, **kwargs
):
177 SetFromName(self, String colourName)
179 Sets the RGB intensity values using a colour name listed in
180 ``wx.TheColourDatabase``.
182 return _gdi_
.Colour_SetFromName(*args
, **kwargs
)
184 def GetAsString(*args
, **kwargs
):
186 GetAsString(self, long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) -> String
188 Return the colour as a string. Acceptable flags are:
190 =================== ==================================
191 wx.C2S_NAME return colour name, when possible
192 wx.C2S_CSS_SYNTAX return colour in rgb(r,g,b) syntax
193 wx.C2S_HTML_SYNTAX return colour in #rrggbb syntax
194 =================== ==================================
196 return _gdi_
.Colour_GetAsString(*args
, **kwargs
)
198 def GetPixel(*args
, **kwargs
):
200 GetPixel(self) -> long
202 Returns a pixel value which is platform-dependent. On Windows, a
203 COLORREF is returned. On X, an allocated pixel value is returned. -1
204 is returned if the pixel is invalid (on X, unallocated).
206 return _gdi_
.Colour_GetPixel(*args
, **kwargs
)
208 def __eq__(*args
, **kwargs
):
210 __eq__(self, PyObject other) -> bool
212 Compare colours for equality.
214 return _gdi_
.Colour___eq__(*args
, **kwargs
)
216 def __ne__(*args
, **kwargs
):
218 __ne__(self, PyObject other) -> bool
220 Compare colours for inequality.
222 return _gdi_
.Colour___ne__(*args
, **kwargs
)
224 def Get(*args
, **kwargs
):
228 Returns the RGB intensity values as a tuple.
230 return _gdi_
.Colour_Get(*args
, **kwargs
)
232 def GetRGB(*args
, **kwargs
):
234 GetRGB(self) -> unsigned long
236 Return the colour as a packed RGB value
238 return _gdi_
.Colour_GetRGB(*args
, **kwargs
)
240 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
241 def __str__(self
): return str(self
.Get(True))
242 def __repr__(self
): return 'wx.Colour' + str(self
.Get(True))
243 def __len__(self
): return len(self
.Get())
244 def __getitem__(self
, index
): return self
.Get()[index
]
245 def __nonzero__(self
): return self
.IsOk()
246 __safe_for_unpickling__
= True
247 def __reduce__(self
): return (Colour
, self
.Get(True))
249 Pixel
= property(GetPixel
,doc
="See `GetPixel`")
250 RGB
= property(GetRGB
,SetRGB
,doc
="See `GetRGB` and `SetRGB`")
251 _gdi_
.Colour_swigregister(Colour
)
253 def NamedColour(*args
, **kwargs
):
255 NamedColour(String colorName) -> Colour
257 Constructs a colour object using a colour name listed in
258 ``wx.TheColourDatabase``.
260 val
= _gdi_
.new_NamedColour(*args
, **kwargs
)
263 def ColourRGB(*args
, **kwargs
):
265 ColourRGB(unsigned long colRGB) -> Colour
267 Constructs a colour from a packed RGB value.
269 val
= _gdi_
.new_ColourRGB(*args
, **kwargs
)
273 NamedColor
= NamedColour
276 class Palette(GDIObject
):
277 """Proxy of C++ Palette class"""
278 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
279 __repr__
= _swig_repr
280 def __init__(self
, *args
, **kwargs
):
281 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
282 _gdi_
.Palette_swiginit(self
,_gdi_
.new_Palette(*args
, **kwargs
))
283 __swig_destroy__
= _gdi_
.delete_Palette
284 __del__
= lambda self
: None;
285 def GetPixel(*args
, **kwargs
):
286 """GetPixel(self, byte red, byte green, byte blue) -> int"""
287 return _gdi_
.Palette_GetPixel(*args
, **kwargs
)
289 def GetRGB(*args
, **kwargs
):
290 """GetRGB(self, int pixel) -> (R,G,B)"""
291 return _gdi_
.Palette_GetRGB(*args
, **kwargs
)
293 def GetColoursCount(*args
, **kwargs
):
294 """GetColoursCount(self) -> int"""
295 return _gdi_
.Palette_GetColoursCount(*args
, **kwargs
)
297 def IsOk(*args
, **kwargs
):
298 """IsOk(self) -> bool"""
299 return _gdi_
.Palette_IsOk(*args
, **kwargs
)
302 def __nonzero__(self
): return self
.IsOk()
303 ColoursCount
= property(GetColoursCount
,doc
="See `GetColoursCount`")
304 _gdi_
.Palette_swigregister(Palette
)
306 #---------------------------------------------------------------------------
308 class Pen(GDIObject
):
309 """Proxy of C++ Pen class"""
310 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
311 __repr__
= _swig_repr
312 def __init__(self
, *args
, **kwargs
):
313 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
314 _gdi_
.Pen_swiginit(self
,_gdi_
.new_Pen(*args
, **kwargs
))
315 __swig_destroy__
= _gdi_
.delete_Pen
316 __del__
= lambda self
: None;
317 def GetCap(*args
, **kwargs
):
318 """GetCap(self) -> int"""
319 return _gdi_
.Pen_GetCap(*args
, **kwargs
)
321 def GetColour(*args
, **kwargs
):
322 """GetColour(self) -> Colour"""
323 return _gdi_
.Pen_GetColour(*args
, **kwargs
)
325 def GetJoin(*args
, **kwargs
):
326 """GetJoin(self) -> int"""
327 return _gdi_
.Pen_GetJoin(*args
, **kwargs
)
329 def GetStyle(*args
, **kwargs
):
330 """GetStyle(self) -> int"""
331 return _gdi_
.Pen_GetStyle(*args
, **kwargs
)
333 def GetWidth(*args
, **kwargs
):
334 """GetWidth(self) -> int"""
335 return _gdi_
.Pen_GetWidth(*args
, **kwargs
)
337 def IsOk(*args
, **kwargs
):
338 """IsOk(self) -> bool"""
339 return _gdi_
.Pen_IsOk(*args
, **kwargs
)
342 def SetCap(*args
, **kwargs
):
343 """SetCap(self, int cap_style)"""
344 return _gdi_
.Pen_SetCap(*args
, **kwargs
)
346 def SetColour(*args
, **kwargs
):
347 """SetColour(self, Colour colour)"""
348 return _gdi_
.Pen_SetColour(*args
, **kwargs
)
350 def SetJoin(*args
, **kwargs
):
351 """SetJoin(self, int join_style)"""
352 return _gdi_
.Pen_SetJoin(*args
, **kwargs
)
354 def SetStyle(*args
, **kwargs
):
355 """SetStyle(self, int style)"""
356 return _gdi_
.Pen_SetStyle(*args
, **kwargs
)
358 def SetWidth(*args
, **kwargs
):
359 """SetWidth(self, int width)"""
360 return _gdi_
.Pen_SetWidth(*args
, **kwargs
)
362 def SetDashes(*args
, **kwargs
):
363 """SetDashes(self, int dashes)"""
364 return _gdi_
.Pen_SetDashes(*args
, **kwargs
)
366 def GetDashes(*args
, **kwargs
):
367 """GetDashes(self) -> PyObject"""
368 return _gdi_
.Pen_GetDashes(*args
, **kwargs
)
370 def _SetDashes(*args
, **kwargs
):
371 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
372 return _gdi_
.Pen__SetDashes(*args
, **kwargs
)
374 def SetDashes(self
, dashes
):
376 Associate a list of dash lengths with the Pen.
378 self
._SetDashes
(self
, dashes
)
380 def GetDashCount(*args
, **kwargs
):
381 """GetDashCount(self) -> int"""
382 return _gdi_
.Pen_GetDashCount(*args
, **kwargs
)
384 DashCount
= property(GetDashCount
,doc
="See `GetDashCount`")
385 def __eq__(*args
, **kwargs
):
386 """__eq__(self, Pen other) -> bool"""
387 return _gdi_
.Pen___eq__(*args
, **kwargs
)
389 def __ne__(*args
, **kwargs
):
390 """__ne__(self, Pen other) -> bool"""
391 return _gdi_
.Pen___ne__(*args
, **kwargs
)
393 def __nonzero__(self
): return self
.IsOk()
394 Cap
= property(GetCap
,SetCap
,doc
="See `GetCap` and `SetCap`")
395 Colour
= property(GetColour
,SetColour
,doc
="See `GetColour` and `SetColour`")
396 Dashes
= property(GetDashes
,SetDashes
,doc
="See `GetDashes` and `SetDashes`")
397 Join
= property(GetJoin
,SetJoin
,doc
="See `GetJoin` and `SetJoin`")
398 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
399 Width
= property(GetWidth
,SetWidth
,doc
="See `GetWidth` and `SetWidth`")
400 _gdi_
.Pen_swigregister(Pen
)
402 #---------------------------------------------------------------------------
404 class Brush(GDIObject
):
406 A brush is a drawing tool for filling in areas. It is used for
407 painting the background of rectangles, ellipses, etc. when drawing on
408 a `wx.DC`. It has a colour and a style.
410 :warning: Do not create instances of wx.Brush before the `wx.App`
411 object has been created because, depending on the platform,
412 required internal data structures may not have been initialized
413 yet. Instead create your brushes in the app's OnInit or as they
414 are needed for drawing.
416 :note: On monochrome displays all brushes are white, unless the colour
419 :see: `wx.BrushList`, `wx.DC`, `wx.DC.SetBrush`
422 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
423 __repr__
= _swig_repr
424 def __init__(self
, *args
, **kwargs
):
426 __init__(self, Colour colour, int style=SOLID) -> Brush
428 Constructs a brush from a `wx.Colour` object and a style.The style parameter may be one of the following:
430 =================== =============================
432 =================== =============================
433 wx.TRANSPARENT Transparent (no fill).
435 wx.STIPPLE Uses a bitmap as a stipple.
436 wx.BDIAGONAL_HATCH Backward diagonal hatch.
437 wx.CROSSDIAG_HATCH Cross-diagonal hatch.
438 wx.FDIAGONAL_HATCH Forward diagonal hatch.
439 wx.CROSS_HATCH Cross hatch.
440 wx.HORIZONTAL_HATCH Horizontal hatch.
441 wx.VERTICAL_HATCH Vertical hatch.
442 =================== =============================
444 :see: `wx.BrushFromBitmap`
447 _gdi_
.Brush_swiginit(self
,_gdi_
.new_Brush(*args
, **kwargs
))
448 __swig_destroy__
= _gdi_
.delete_Brush
449 __del__
= lambda self
: None;
450 def SetColour(*args
, **kwargs
):
452 SetColour(self, Colour col)
454 Set the brush's `wx.Colour`.
456 return _gdi_
.Brush_SetColour(*args
, **kwargs
)
458 def SetStyle(*args
, **kwargs
):
460 SetStyle(self, int style)
462 Sets the style of the brush. See `__init__` for a listing of styles.
464 return _gdi_
.Brush_SetStyle(*args
, **kwargs
)
466 def SetStipple(*args
, **kwargs
):
468 SetStipple(self, Bitmap stipple)
470 Sets the stipple `wx.Bitmap`.
472 return _gdi_
.Brush_SetStipple(*args
, **kwargs
)
474 def GetColour(*args
, **kwargs
):
476 GetColour(self) -> Colour
478 Returns the `wx.Colour` of the brush.
480 return _gdi_
.Brush_GetColour(*args
, **kwargs
)
482 def GetStyle(*args
, **kwargs
):
484 GetStyle(self) -> int
486 Returns the style of the brush. See `__init__` for a listing of
489 return _gdi_
.Brush_GetStyle(*args
, **kwargs
)
491 def GetStipple(*args
, **kwargs
):
493 GetStipple(self) -> Bitmap
495 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
496 have a wx.STIPPLE style, then the return value may be non-None but an
497 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
499 return _gdi_
.Brush_GetStipple(*args
, **kwargs
)
501 def IsHatch(*args
, **kwargs
):
503 IsHatch(self) -> bool
505 Is the current style a hatch type?
507 return _gdi_
.Brush_IsHatch(*args
, **kwargs
)
509 def IsOk(*args
, **kwargs
):
513 Returns True if the brush is initialised and valid.
515 return _gdi_
.Brush_IsOk(*args
, **kwargs
)
518 def __nonzero__(self
): return self
.IsOk()
519 Colour
= property(GetColour
,SetColour
,doc
="See `GetColour` and `SetColour`")
520 Stipple
= property(GetStipple
,SetStipple
,doc
="See `GetStipple` and `SetStipple`")
521 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
522 _gdi_
.Brush_swigregister(Brush
)
524 def BrushFromBitmap(*args
, **kwargs
):
526 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
528 Constructs a stippled brush using a bitmap.
530 val
= _gdi_
.new_BrushFromBitmap(*args
, **kwargs
)
533 class Bitmap(GDIObject
):
535 The wx.Bitmap class encapsulates the concept of a platform-dependent
536 bitmap. It can be either monochrome or colour, and either loaded from
537 a file or created dynamically. A bitmap can be selected into a memory
538 device context (instance of `wx.MemoryDC`). This enables the bitmap to
539 be copied to a window or memory device context using `wx.DC.Blit`, or
540 to be used as a drawing surface.
542 The BMP and XMP image file formats are supported on all platforms by
543 wx.Bitmap. Other formats are automatically loaded by `wx.Image` and
544 converted to a wx.Bitmap, so any image file format supported by
545 `wx.Image` can be used.
547 :todo: Add wrappers and support for raw bitmap data access. Can this
548 be be put into Python without losing the speed benefits of the
549 teplates and iterators in rawbmp.h?
551 :todo: Find a way to do very efficient PIL Image <--> wx.Bitmap
554 :see: `wx.EmptyBitmap`, `wx.BitmapFromIcon`, `wx.BitmapFromImage`,
555 `wx.BitmapFromXPMData`, `wx.BitmapFromBits`, `wx.BitmapFromBuffer`,
556 `wx.BitmapFromBufferRGBA`, `wx.Image`
559 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
560 __repr__
= _swig_repr
561 def __init__(self
, *args
, **kwargs
):
563 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
565 Loads a bitmap from a file.
566 :param name: Name of the file to load the bitmap from.
567 :param type: The type of image to expect. Can be one of the following
568 constants (assuming that the neccessary `wx.Image` handlers are
580 * wx.BITMAP_TYPE_JPEG
583 * wx.BITMAP_TYPE_PICT
584 * wx.BITMAP_TYPE_ICON
588 :see: Alternate constructors `wx.EmptyBitmap`, `wx.BitmapFromIcon`,
589 `wx.BitmapFromImage`, `wx.BitmapFromXPMData`, `wx.BitmapFromBits`,
590 `wx.BitmapFromBuffer`, `wx.BitmapFromBufferRGBA`,
593 _gdi_
.Bitmap_swiginit(self
,_gdi_
.new_Bitmap(*args
, **kwargs
))
594 __swig_destroy__
= _gdi_
.delete_Bitmap
595 __del__
= lambda self
: None;
596 def IsOk(*args
, **kwargs
):
597 """IsOk(self) -> bool"""
598 return _gdi_
.Bitmap_IsOk(*args
, **kwargs
)
601 def GetWidth(*args
, **kwargs
):
603 GetWidth(self) -> int
605 Gets the width of the bitmap in pixels.
607 return _gdi_
.Bitmap_GetWidth(*args
, **kwargs
)
609 def GetHeight(*args
, **kwargs
):
611 GetHeight(self) -> int
613 Gets the height of the bitmap in pixels.
615 return _gdi_
.Bitmap_GetHeight(*args
, **kwargs
)
617 def GetDepth(*args
, **kwargs
):
619 GetDepth(self) -> int
621 Gets the colour depth of the bitmap. A value of 1 indicates a
624 return _gdi_
.Bitmap_GetDepth(*args
, **kwargs
)
626 def GetSize(*args
, **kwargs
):
628 GetSize(self) -> Size
630 Get the size of the bitmap.
632 return _gdi_
.Bitmap_GetSize(*args
, **kwargs
)
634 def ConvertToImage(*args
, **kwargs
):
636 ConvertToImage(self) -> Image
638 Creates a platform-independent image from a platform-dependent
639 bitmap. This preserves mask information so that bitmaps and images can
640 be converted back and forth without loss in that respect.
642 return _gdi_
.Bitmap_ConvertToImage(*args
, **kwargs
)
644 def GetMask(*args
, **kwargs
):
646 GetMask(self) -> Mask
648 Gets the associated mask (if any) which may have been loaded from a
649 file or explpicitly set for the bitmap.
651 :see: `SetMask`, `wx.Mask`
654 return _gdi_
.Bitmap_GetMask(*args
, **kwargs
)
656 def SetMask(*args
, **kwargs
):
658 SetMask(self, Mask mask)
660 Sets the mask for this bitmap.
662 :see: `GetMask`, `wx.Mask`
665 return _gdi_
.Bitmap_SetMask(*args
, **kwargs
)
667 def SetMaskColour(*args
, **kwargs
):
669 SetMaskColour(self, Colour colour)
671 Create a Mask based on a specified colour in the Bitmap.
673 return _gdi_
.Bitmap_SetMaskColour(*args
, **kwargs
)
675 def GetSubBitmap(*args
, **kwargs
):
677 GetSubBitmap(self, Rect rect) -> Bitmap
679 Returns a sub-bitmap of the current one as long as the rect belongs
680 entirely to the bitmap. This function preserves bit depth and mask
683 return _gdi_
.Bitmap_GetSubBitmap(*args
, **kwargs
)
685 def SaveFile(*args
, **kwargs
):
687 SaveFile(self, String name, int type, Palette palette=None) -> bool
689 Saves a bitmap in the named file. See `__init__` for a description of
690 the ``type`` parameter.
692 return _gdi_
.Bitmap_SaveFile(*args
, **kwargs
)
694 def LoadFile(*args
, **kwargs
):
696 LoadFile(self, String name, int type) -> bool
698 Loads a bitmap from a file. See `__init__` for a description of the
701 return _gdi_
.Bitmap_LoadFile(*args
, **kwargs
)
703 def GetPalette(*args
, **kwargs
):
704 """GetPalette(self) -> Palette"""
705 return _gdi_
.Bitmap_GetPalette(*args
, **kwargs
)
707 def CopyFromIcon(*args
, **kwargs
):
708 """CopyFromIcon(self, Icon icon) -> bool"""
709 return _gdi_
.Bitmap_CopyFromIcon(*args
, **kwargs
)
711 def SetHeight(*args
, **kwargs
):
713 SetHeight(self, int height)
715 Set the height property (does not affect the existing bitmap data).
717 return _gdi_
.Bitmap_SetHeight(*args
, **kwargs
)
719 def SetWidth(*args
, **kwargs
):
721 SetWidth(self, int width)
723 Set the width property (does not affect the existing bitmap data).
725 return _gdi_
.Bitmap_SetWidth(*args
, **kwargs
)
727 def SetDepth(*args
, **kwargs
):
729 SetDepth(self, int depth)
731 Set the depth property (does not affect the existing bitmap data).
733 return _gdi_
.Bitmap_SetDepth(*args
, **kwargs
)
735 def SetSize(*args
, **kwargs
):
737 SetSize(self, Size size)
739 Set the bitmap size (does not affect the existing bitmap data).
741 return _gdi_
.Bitmap_SetSize(*args
, **kwargs
)
743 def __nonzero__(self
): return self
.IsOk()
744 def __eq__(*args
, **kwargs
):
745 """__eq__(self, Bitmap other) -> bool"""
746 return _gdi_
.Bitmap___eq__(*args
, **kwargs
)
748 def __ne__(*args
, **kwargs
):
749 """__ne__(self, Bitmap other) -> bool"""
750 return _gdi_
.Bitmap___ne__(*args
, **kwargs
)
752 Depth
= property(GetDepth
,SetDepth
,doc
="See `GetDepth` and `SetDepth`")
753 Height
= property(GetHeight
,SetHeight
,doc
="See `GetHeight` and `SetHeight`")
754 Mask
= property(GetMask
,SetMask
,doc
="See `GetMask` and `SetMask`")
755 Palette
= property(GetPalette
,doc
="See `GetPalette`")
756 Size
= property(GetSize
,SetSize
,doc
="See `GetSize` and `SetSize`")
757 SubBitmap
= property(GetSubBitmap
,doc
="See `GetSubBitmap`")
758 Width
= property(GetWidth
,SetWidth
,doc
="See `GetWidth` and `SetWidth`")
759 _gdi_
.Bitmap_swigregister(Bitmap
)
761 def EmptyBitmap(*args
, **kwargs
):
763 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
765 Creates a new bitmap of the given size. A depth of -1 indicates the
766 depth of the current screen or visual. Some platforms only support 1
767 for monochrome and -1 for the current display depth.
769 val
= _gdi_
.new_EmptyBitmap(*args
, **kwargs
)
772 def BitmapFromIcon(*args
, **kwargs
):
774 BitmapFromIcon(Icon icon) -> Bitmap
776 Create a new bitmap from a `wx.Icon` object.
778 val
= _gdi_
.new_BitmapFromIcon(*args
, **kwargs
)
781 def BitmapFromImage(*args
, **kwargs
):
783 BitmapFromImage(Image image, int depth=-1) -> Bitmap
785 Creates bitmap object from a `wx.Image`. This has to be done to
786 actually display a `wx.Image` as you cannot draw an image directly on
787 a window. The resulting bitmap will use the provided colour depth (or
788 that of the current screen colour depth if depth is -1) which entails
789 that a colour reduction may have to take place.
791 val
= _gdi_
.new_BitmapFromImage(*args
, **kwargs
)
794 def BitmapFromXPMData(*args
, **kwargs
):
796 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
798 Construct a Bitmap from a list of strings formatted as XPM data.
800 val
= _gdi_
.new_BitmapFromXPMData(*args
, **kwargs
)
803 def BitmapFromBits(*args
, **kwargs
):
805 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
807 Creates a bitmap from an array of bits. You should only use this
808 function for monochrome bitmaps (depth 1) in portable programs: in
809 this case the bits parameter should contain an XBM image. For other
810 bit depths, the behaviour is platform dependent.
812 val
= _gdi_
.new_BitmapFromBits(*args
, **kwargs
)
816 def _BitmapFromBufferAlpha(*args
, **kwargs
):
817 """_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
818 return _gdi_
._BitmapFromBufferAlpha
(*args
, **kwargs
)
820 def _BitmapFromBuffer(*args
, **kwargs
):
821 """_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
822 return _gdi_
._BitmapFromBuffer
(*args
, **kwargs
)
823 def BitmapFromBuffer(width
, height
, dataBuffer
, alphaBuffer
=None):
825 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
826 parameter must be a Python object that implements the buffer
827 interface, such as a string, array, etc. The dataBuffer object is
828 expected to contain a series of RGB bytes and be width*height*3
829 bytes long. A buffer object can optionally be supplied for the
830 image's alpha channel data, and it is expected to be width*height
831 bytes long. On Windows the RGB values are 'premultiplied' by the
832 alpha values. (The other platforms do the multiplication
835 Unlike `wx.ImageFromBuffer` the bitmap created with this function
836 does not share the memory buffer with the buffer object. This is
837 because the native pixel buffer format varies on different
838 platforms, and so instead an efficient as possible copy of the
839 data is made from the buffer objects to the bitmap's native pixel
840 buffer. For direct access to a bitmap's pixel buffer see
841 `wx.NativePixelData` and `wx.AlphaPixelData`.
843 :see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
844 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
846 if alphaBuffer
is not None:
847 return _gdi_
._BitmapFromBufferAlpha
(width
, height
, dataBuffer
, alphaBuffer
)
849 return _gdi_
._BitmapFromBuffer
(width
, height
, dataBuffer
)
852 def _BitmapFromBufferRGBA(*args
, **kwargs
):
853 """_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
854 return _gdi_
._BitmapFromBufferRGBA
(*args
, **kwargs
)
855 def BitmapFromBufferRGBA(width
, height
, dataBuffer
):
857 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
858 parameter must be a Python object that implements the buffer
859 interface, such as a string, array, etc. The dataBuffer object is
860 expected to contain a series of RGBA bytes (red, green, blue and
861 alpha) and be width*height*4 bytes long. On Windows the RGB
862 values are 'premultiplied' by the alpha values. (The other
863 platforms do the multiplication themselves.)
865 Unlike `wx.ImageFromBuffer` the bitmap created with this function
866 does not share the memory buffer with the buffer object. This is
867 because the native pixel buffer format varies on different
868 platforms, and so instead an efficient as possible copy of the
869 data is made from the buffer object to the bitmap's native pixel
870 buffer. For direct access to a bitmap's pixel buffer see
871 `wx.NativePixelData` and `wx.AlphaPixelData`.
873 :see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
874 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
876 return _gdi_
._BitmapFromBufferRGBA
(width
, height
, dataBuffer
)
878 class PixelDataBase(object):
879 """Proxy of C++ PixelDataBase class"""
880 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
881 def __init__(self
): raise AttributeError, "No constructor defined"
882 __repr__
= _swig_repr
883 def GetOrigin(*args
, **kwargs
):
884 """GetOrigin(self) -> Point"""
885 return _gdi_
.PixelDataBase_GetOrigin(*args
, **kwargs
)
887 def GetWidth(*args
, **kwargs
):
888 """GetWidth(self) -> int"""
889 return _gdi_
.PixelDataBase_GetWidth(*args
, **kwargs
)
891 def GetHeight(*args
, **kwargs
):
892 """GetHeight(self) -> int"""
893 return _gdi_
.PixelDataBase_GetHeight(*args
, **kwargs
)
895 def GetSize(*args
, **kwargs
):
896 """GetSize(self) -> Size"""
897 return _gdi_
.PixelDataBase_GetSize(*args
, **kwargs
)
899 def GetRowStride(*args
, **kwargs
):
900 """GetRowStride(self) -> int"""
901 return _gdi_
.PixelDataBase_GetRowStride(*args
, **kwargs
)
903 Height
= property(GetHeight
,doc
="See `GetHeight`")
904 Origin
= property(GetOrigin
,doc
="See `GetOrigin`")
905 RowStride
= property(GetRowStride
,doc
="See `GetRowStride`")
906 Size
= property(GetSize
,doc
="See `GetSize`")
907 Width
= property(GetWidth
,doc
="See `GetWidth`")
908 _gdi_
.PixelDataBase_swigregister(PixelDataBase
)
910 class NativePixelData(PixelDataBase
):
911 """Proxy of C++ NativePixelData class"""
912 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
913 __repr__
= _swig_repr
914 def __init__(self
, *args
):
916 __init__(self, Bitmap bmp) -> NativePixelData
917 __init__(self, Bitmap bmp, Rect rect) -> NativePixelData
918 __init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
920 _gdi_
.NativePixelData_swiginit(self
,_gdi_
.new_NativePixelData(*args
))
921 __swig_destroy__
= _gdi_
.delete_NativePixelData
922 __del__
= lambda self
: None;
923 def GetPixels(*args
, **kwargs
):
924 """GetPixels(self) -> NativePixelData_Accessor"""
925 return _gdi_
.NativePixelData_GetPixels(*args
, **kwargs
)
927 def UseAlpha(*args
, **kwargs
):
929 return _gdi_
.NativePixelData_UseAlpha(*args
, **kwargs
)
931 def __nonzero__(*args
, **kwargs
):
932 """__nonzero__(self) -> bool"""
933 return _gdi_
.NativePixelData___nonzero__(*args
, **kwargs
)
937 Create and return an iterator object for this pixel data
938 object. (It's really a generator but I won't tell if you
941 width
= self
.GetWidth()
942 height
= self
.GetHeight()
943 pixels
= self
.GetPixels()
948 class PixelFacade(object):
951 def Set(self
, *args
, **kw
):
952 return pixels
.Set(*args
, **kw
)
954 return str(self
.Get())
956 return 'pixel(%d,%d): %s' % (x
,y
,self
.Get())
957 X
= property(lambda self
: x
)
958 Y
= property(lambda self
: y
)
961 for y
in xrange(height
):
962 for x
in xrange(width
):
968 pixels
.MoveTo(self
, 0, y
)
970 Pixels
= property(GetPixels
,doc
="See `GetPixels`")
971 _gdi_
.NativePixelData_swigregister(NativePixelData
)
973 class NativePixelData_Accessor(object):
974 """Proxy of C++ NativePixelData_Accessor class"""
975 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
976 __repr__
= _swig_repr
977 def __init__(self
, *args
):
979 __init__(self, NativePixelData data) -> NativePixelData_Accessor
980 __init__(self, Bitmap bmp, NativePixelData data) -> NativePixelData_Accessor
981 __init__(self) -> NativePixelData_Accessor
983 _gdi_
.NativePixelData_Accessor_swiginit(self
,_gdi_
.new_NativePixelData_Accessor(*args
))
984 __swig_destroy__
= _gdi_
.delete_NativePixelData_Accessor
985 __del__
= lambda self
: None;
986 def Reset(*args
, **kwargs
):
987 """Reset(self, NativePixelData data)"""
988 return _gdi_
.NativePixelData_Accessor_Reset(*args
, **kwargs
)
990 def IsOk(*args
, **kwargs
):
991 """IsOk(self) -> bool"""
992 return _gdi_
.NativePixelData_Accessor_IsOk(*args
, **kwargs
)
994 def nextPixel(*args
, **kwargs
):
995 """nextPixel(self)"""
996 return _gdi_
.NativePixelData_Accessor_nextPixel(*args
, **kwargs
)
998 def Offset(*args
, **kwargs
):
999 """Offset(self, NativePixelData data, int x, int y)"""
1000 return _gdi_
.NativePixelData_Accessor_Offset(*args
, **kwargs
)
1002 def OffsetX(*args
, **kwargs
):
1003 """OffsetX(self, NativePixelData data, int x)"""
1004 return _gdi_
.NativePixelData_Accessor_OffsetX(*args
, **kwargs
)
1006 def OffsetY(*args
, **kwargs
):
1007 """OffsetY(self, NativePixelData data, int y)"""
1008 return _gdi_
.NativePixelData_Accessor_OffsetY(*args
, **kwargs
)
1010 def MoveTo(*args
, **kwargs
):
1011 """MoveTo(self, NativePixelData data, int x, int y)"""
1012 return _gdi_
.NativePixelData_Accessor_MoveTo(*args
, **kwargs
)
1014 def Set(*args
, **kwargs
):
1015 """Set(self, byte red, byte green, byte blue)"""
1016 return _gdi_
.NativePixelData_Accessor_Set(*args
, **kwargs
)
1018 def Get(*args
, **kwargs
):
1019 """Get(self) -> PyObject"""
1020 return _gdi_
.NativePixelData_Accessor_Get(*args
, **kwargs
)
1022 _gdi_
.NativePixelData_Accessor_swigregister(NativePixelData_Accessor
)
1024 class AlphaPixelData(PixelDataBase
):
1025 """Proxy of C++ AlphaPixelData class"""
1026 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1027 __repr__
= _swig_repr
1028 def __init__(self
, *args
):
1030 __init__(self, Bitmap bmp) -> AlphaPixelData
1031 __init__(self, Bitmap bmp, Rect rect) -> AlphaPixelData
1032 __init__(self, Bitmap bmp, Point pt, Size sz) -> AlphaPixelData
1034 _gdi_
.AlphaPixelData_swiginit(self
,_gdi_
.new_AlphaPixelData(*args
))
1037 __swig_destroy__
= _gdi_
.delete_AlphaPixelData
1038 __del__
= lambda self
: None;
1039 def GetPixels(*args
, **kwargs
):
1040 """GetPixels(self) -> AlphaPixelData_Accessor"""
1041 return _gdi_
.AlphaPixelData_GetPixels(*args
, **kwargs
)
1043 def UseAlpha(*args
, **kwargs
):
1044 """UseAlpha(self)"""
1045 return _gdi_
.AlphaPixelData_UseAlpha(*args
, **kwargs
)
1047 def __nonzero__(*args
, **kwargs
):
1048 """__nonzero__(self) -> bool"""
1049 return _gdi_
.AlphaPixelData___nonzero__(*args
, **kwargs
)
1053 Create and return an iterator object for this pixel data
1054 object. (It's really a generator but I won't tell if you
1057 width
= self
.GetWidth()
1058 height
= self
.GetHeight()
1059 pixels
= self
.GetPixels()
1064 class PixelFacade(object):
1067 def Set(self
, *args
, **kw
):
1068 return pixels
.Set(*args
, **kw
)
1070 return str(self
.Get())
1072 return 'pixel(%d,%d): %s' % (x
,y
,self
.Get())
1073 X
= property(lambda self
: x
)
1074 Y
= property(lambda self
: y
)
1077 for y
in xrange(height
):
1078 for x
in xrange(width
):
1084 pixels
.MoveTo(self
, 0, y
)
1086 Pixels
= property(GetPixels
,doc
="See `GetPixels`")
1087 _gdi_
.AlphaPixelData_swigregister(AlphaPixelData
)
1089 class AlphaPixelData_Accessor(object):
1090 """Proxy of C++ AlphaPixelData_Accessor class"""
1091 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1092 __repr__
= _swig_repr
1093 def __init__(self
, *args
):
1095 __init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
1096 __init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
1097 __init__(self) -> AlphaPixelData_Accessor
1099 _gdi_
.AlphaPixelData_Accessor_swiginit(self
,_gdi_
.new_AlphaPixelData_Accessor(*args
))
1100 __swig_destroy__
= _gdi_
.delete_AlphaPixelData_Accessor
1101 __del__
= lambda self
: None;
1102 def Reset(*args
, **kwargs
):
1103 """Reset(self, AlphaPixelData data)"""
1104 return _gdi_
.AlphaPixelData_Accessor_Reset(*args
, **kwargs
)
1106 def IsOk(*args
, **kwargs
):
1107 """IsOk(self) -> bool"""
1108 return _gdi_
.AlphaPixelData_Accessor_IsOk(*args
, **kwargs
)
1110 def nextPixel(*args
, **kwargs
):
1111 """nextPixel(self)"""
1112 return _gdi_
.AlphaPixelData_Accessor_nextPixel(*args
, **kwargs
)
1114 def Offset(*args
, **kwargs
):
1115 """Offset(self, AlphaPixelData data, int x, int y)"""
1116 return _gdi_
.AlphaPixelData_Accessor_Offset(*args
, **kwargs
)
1118 def OffsetX(*args
, **kwargs
):
1119 """OffsetX(self, AlphaPixelData data, int x)"""
1120 return _gdi_
.AlphaPixelData_Accessor_OffsetX(*args
, **kwargs
)
1122 def OffsetY(*args
, **kwargs
):
1123 """OffsetY(self, AlphaPixelData data, int y)"""
1124 return _gdi_
.AlphaPixelData_Accessor_OffsetY(*args
, **kwargs
)
1126 def MoveTo(*args
, **kwargs
):
1127 """MoveTo(self, AlphaPixelData data, int x, int y)"""
1128 return _gdi_
.AlphaPixelData_Accessor_MoveTo(*args
, **kwargs
)
1130 def Set(*args
, **kwargs
):
1131 """Set(self, byte red, byte green, byte blue, byte alpha)"""
1132 return _gdi_
.AlphaPixelData_Accessor_Set(*args
, **kwargs
)
1134 def Get(*args
, **kwargs
):
1135 """Get(self) -> PyObject"""
1136 return _gdi_
.AlphaPixelData_Accessor_Get(*args
, **kwargs
)
1138 _gdi_
.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor
)
1140 class Mask(_core
.Object
):
1142 This class encapsulates a monochrome mask bitmap, where the masked
1143 area is black and the unmasked area is white. When associated with a
1144 bitmap and drawn in a device context, the unmasked area of the bitmap
1145 will be drawn, and the masked area will not be drawn.
1147 A mask may be associated with a `wx.Bitmap`. It is used in
1148 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
1149 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
1152 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1153 __repr__
= _swig_repr
1154 def __init__(self
, *args
, **kwargs
):
1156 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
1158 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
1159 that indicates the transparent portions of the mask. In other words,
1160 the pixels in ``bitmap`` that match ``colour`` will be the transparent
1161 portions of the mask. If no ``colour`` or an invalid ``colour`` is
1162 passed then BLACK is used.
1164 :see: `wx.Bitmap`, `wx.Colour`
1166 _gdi_
.Mask_swiginit(self
,_gdi_
.new_Mask(*args
, **kwargs
))
1167 __swig_destroy__
= _gdi_
.delete_Mask
1168 __del__
= lambda self
: None;
1169 _gdi_
.Mask_swigregister(Mask
)
1171 MaskColour
= wx
._deprecated
(Mask
, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
1172 class Icon(GDIObject
):
1173 """Proxy of C++ Icon class"""
1174 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1175 __repr__
= _swig_repr
1176 def __init__(self
, *args
, **kwargs
):
1177 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
1178 _gdi_
.Icon_swiginit(self
,_gdi_
.new_Icon(*args
, **kwargs
))
1179 __swig_destroy__
= _gdi_
.delete_Icon
1180 __del__
= lambda self
: None;
1181 def LoadFile(*args
, **kwargs
):
1182 """LoadFile(self, String name, int type) -> bool"""
1183 return _gdi_
.Icon_LoadFile(*args
, **kwargs
)
1185 def IsOk(*args
, **kwargs
):
1186 """IsOk(self) -> bool"""
1187 return _gdi_
.Icon_IsOk(*args
, **kwargs
)
1190 def GetWidth(*args
, **kwargs
):
1191 """GetWidth(self) -> int"""
1192 return _gdi_
.Icon_GetWidth(*args
, **kwargs
)
1194 def GetHeight(*args
, **kwargs
):
1195 """GetHeight(self) -> int"""
1196 return _gdi_
.Icon_GetHeight(*args
, **kwargs
)
1198 def GetDepth(*args
, **kwargs
):
1199 """GetDepth(self) -> int"""
1200 return _gdi_
.Icon_GetDepth(*args
, **kwargs
)
1202 def SetWidth(*args
, **kwargs
):
1203 """SetWidth(self, int w)"""
1204 return _gdi_
.Icon_SetWidth(*args
, **kwargs
)
1206 def SetHeight(*args
, **kwargs
):
1207 """SetHeight(self, int h)"""
1208 return _gdi_
.Icon_SetHeight(*args
, **kwargs
)
1210 def SetDepth(*args
, **kwargs
):
1211 """SetDepth(self, int d)"""
1212 return _gdi_
.Icon_SetDepth(*args
, **kwargs
)
1214 def CopyFromBitmap(*args
, **kwargs
):
1215 """CopyFromBitmap(self, Bitmap bmp)"""
1216 return _gdi_
.Icon_CopyFromBitmap(*args
, **kwargs
)
1218 def __nonzero__(self
): return self
.IsOk()
1219 Depth
= property(GetDepth
,SetDepth
,doc
="See `GetDepth` and `SetDepth`")
1220 Height
= property(GetHeight
,SetHeight
,doc
="See `GetHeight` and `SetHeight`")
1221 Width
= property(GetWidth
,SetWidth
,doc
="See `GetWidth` and `SetWidth`")
1222 _gdi_
.Icon_swigregister(Icon
)
1224 def EmptyIcon(*args
, **kwargs
):
1225 """EmptyIcon() -> Icon"""
1226 val
= _gdi_
.new_EmptyIcon(*args
, **kwargs
)
1229 def IconFromLocation(*args
, **kwargs
):
1230 """IconFromLocation(IconLocation loc) -> Icon"""
1231 val
= _gdi_
.new_IconFromLocation(*args
, **kwargs
)
1234 def IconFromBitmap(*args
, **kwargs
):
1235 """IconFromBitmap(Bitmap bmp) -> Icon"""
1236 val
= _gdi_
.new_IconFromBitmap(*args
, **kwargs
)
1239 def IconFromXPMData(*args
, **kwargs
):
1240 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
1241 val
= _gdi_
.new_IconFromXPMData(*args
, **kwargs
)
1244 class IconLocation(object):
1245 """Proxy of C++ IconLocation class"""
1246 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1247 __repr__
= _swig_repr
1248 def __init__(self
, *args
, **kwargs
):
1249 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
1250 _gdi_
.IconLocation_swiginit(self
,_gdi_
.new_IconLocation(*args
, **kwargs
))
1251 __swig_destroy__
= _gdi_
.delete_IconLocation
1252 __del__
= lambda self
: None;
1253 def IsOk(*args
, **kwargs
):
1254 """IsOk(self) -> bool"""
1255 return _gdi_
.IconLocation_IsOk(*args
, **kwargs
)
1257 def __nonzero__(self
): return self
.IsOk()
1258 def SetFileName(*args
, **kwargs
):
1259 """SetFileName(self, String filename)"""
1260 return _gdi_
.IconLocation_SetFileName(*args
, **kwargs
)
1262 def GetFileName(*args
, **kwargs
):
1263 """GetFileName(self) -> String"""
1264 return _gdi_
.IconLocation_GetFileName(*args
, **kwargs
)
1266 def SetIndex(*args
, **kwargs
):
1267 """SetIndex(self, int num)"""
1268 return _gdi_
.IconLocation_SetIndex(*args
, **kwargs
)
1270 def GetIndex(*args
, **kwargs
):
1271 """GetIndex(self) -> int"""
1272 return _gdi_
.IconLocation_GetIndex(*args
, **kwargs
)
1274 FileName
= property(GetFileName
,SetFileName
,doc
="See `GetFileName` and `SetFileName`")
1275 Index
= property(GetIndex
,SetIndex
,doc
="See `GetIndex` and `SetIndex`")
1276 _gdi_
.IconLocation_swigregister(IconLocation
)
1278 class IconBundle(object):
1279 """Proxy of C++ IconBundle class"""
1280 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1281 __repr__
= _swig_repr
1282 def __init__(self
, *args
, **kwargs
):
1283 """__init__(self) -> IconBundle"""
1284 _gdi_
.IconBundle_swiginit(self
,_gdi_
.new_IconBundle(*args
, **kwargs
))
1285 __swig_destroy__
= _gdi_
.delete_IconBundle
1286 __del__
= lambda self
: None;
1287 def AddIcon(*args
, **kwargs
):
1288 """AddIcon(self, Icon icon)"""
1289 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
1291 def AddIconFromFile(*args
, **kwargs
):
1292 """AddIconFromFile(self, String file, long type)"""
1293 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
1295 def GetIcon(*args
, **kwargs
):
1296 """GetIcon(self, Size size) -> Icon"""
1297 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
1299 Icon
= property(GetIcon
,doc
="See `GetIcon`")
1300 _gdi_
.IconBundle_swigregister(IconBundle
)
1302 def IconBundleFromFile(*args
, **kwargs
):
1303 """IconBundleFromFile(String file, long type) -> IconBundle"""
1304 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
1307 def IconBundleFromIcon(*args
, **kwargs
):
1308 """IconBundleFromIcon(Icon icon) -> IconBundle"""
1309 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
1312 class Cursor(GDIObject
):
1314 A cursor is a small bitmap usually used for denoting where the mouse
1315 pointer is, with a picture that might indicate the interpretation of a
1318 A single cursor object may be used in many windows (any subwindow
1319 type). The wxWindows convention is to set the cursor for a window, as
1320 in X, rather than to set it globally as in MS Windows, although a
1321 global `wx.SetCursor` function is also available for use on MS Windows.
1326 ======================== ======================================
1327 wx.CURSOR_ARROW A standard arrow cursor.
1328 wx.CURSOR_RIGHT_ARROW A standard arrow cursor pointing to the right.
1329 wx.CURSOR_BLANK Transparent cursor.
1330 wx.CURSOR_BULLSEYE Bullseye cursor.
1331 wx.CURSOR_CHAR Rectangular character cursor.
1332 wx.CURSOR_CROSS A cross cursor.
1333 wx.CURSOR_HAND A hand cursor.
1334 wx.CURSOR_IBEAM An I-beam cursor (vertical line).
1335 wx.CURSOR_LEFT_BUTTON Represents a mouse with the left button depressed.
1336 wx.CURSOR_MAGNIFIER A magnifier icon.
1337 wx.CURSOR_MIDDLE_BUTTON Represents a mouse with the middle button depressed.
1338 wx.CURSOR_NO_ENTRY A no-entry sign cursor.
1339 wx.CURSOR_PAINT_BRUSH A paintbrush cursor.
1340 wx.CURSOR_PENCIL A pencil cursor.
1341 wx.CURSOR_POINT_LEFT A cursor that points left.
1342 wx.CURSOR_POINT_RIGHT A cursor that points right.
1343 wx.CURSOR_QUESTION_ARROW An arrow and question mark.
1344 wx.CURSOR_RIGHT_BUTTON Represents a mouse with the right button depressed.
1345 wx.CURSOR_SIZENESW A sizing cursor pointing NE-SW.
1346 wx.CURSOR_SIZENS A sizing cursor pointing N-S.
1347 wx.CURSOR_SIZENWSE A sizing cursor pointing NW-SE.
1348 wx.CURSOR_SIZEWE A sizing cursor pointing W-E.
1349 wx.CURSOR_SIZING A general sizing cursor.
1350 wx.CURSOR_SPRAYCAN A spraycan cursor.
1351 wx.CURSOR_WAIT A wait cursor.
1352 wx.CURSOR_WATCH A watch cursor.
1353 wx.CURSOR_ARROWWAIT A cursor with both an arrow and an hourglass, (windows.)
1354 ======================== ======================================
1358 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1359 __repr__
= _swig_repr
1360 def __init__(self
, *args
, **kwargs
):
1362 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1364 Construct a Cursor from a file. Specify the type of file using
1365 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1367 :see: Alternate constructors `wx.StockCursor`,`wx.CursorFromImage`
1369 _gdi_
.Cursor_swiginit(self
,_gdi_
.new_Cursor(*args
, **kwargs
))
1370 __swig_destroy__
= _gdi_
.delete_Cursor
1371 __del__
= lambda self
: None;
1372 def IsOk(*args
, **kwargs
):
1373 """IsOk(self) -> bool"""
1374 return _gdi_
.Cursor_IsOk(*args
, **kwargs
)
1377 def __nonzero__(self
): return self
.IsOk()
1378 _gdi_
.Cursor_swigregister(Cursor
)
1380 def StockCursor(*args
, **kwargs
):
1382 StockCursor(int id) -> Cursor
1384 Create a cursor using one of the stock cursors. Note that not all
1385 stock cursors are available on all platforms.
1387 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
1390 def CursorFromImage(*args
, **kwargs
):
1392 CursorFromImage(Image image) -> Cursor
1394 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1395 for setting the transparent portions of the cursor.
1396 In MSW the cursor is resized to 32x32 if it was larger.
1398 In GTK the cursor will be displayed at the size of the image.
1400 On MacOS the cursor is resized to 16x16 if it was larger.
1402 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
1405 #---------------------------------------------------------------------------
1407 OutRegion
= _gdi_
.OutRegion
1408 PartRegion
= _gdi_
.PartRegion
1409 InRegion
= _gdi_
.InRegion
1410 class Region(GDIObject
):
1411 """Proxy of C++ Region class"""
1412 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1413 __repr__
= _swig_repr
1414 def __init__(self
, *args
, **kwargs
):
1415 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1416 _gdi_
.Region_swiginit(self
,_gdi_
.new_Region(*args
, **kwargs
))
1417 __swig_destroy__
= _gdi_
.delete_Region
1418 __del__
= lambda self
: None;
1419 def Clear(*args
, **kwargs
):
1421 return _gdi_
.Region_Clear(*args
, **kwargs
)
1423 def Offset(*args
, **kwargs
):
1424 """Offset(self, int x, int y) -> bool"""
1425 return _gdi_
.Region_Offset(*args
, **kwargs
)
1427 def Contains(*args
, **kwargs
):
1428 """Contains(self, int x, int y) -> int"""
1429 return _gdi_
.Region_Contains(*args
, **kwargs
)
1431 def ContainsPoint(*args
, **kwargs
):
1432 """ContainsPoint(self, Point pt) -> int"""
1433 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
1435 def ContainsRect(*args
, **kwargs
):
1436 """ContainsRect(self, Rect rect) -> int"""
1437 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
1439 def ContainsRectDim(*args
, **kwargs
):
1440 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1441 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
1443 def GetBox(*args
, **kwargs
):
1444 """GetBox(self) -> Rect"""
1445 return _gdi_
.Region_GetBox(*args
, **kwargs
)
1447 def Intersect(*args
, **kwargs
):
1448 """Intersect(self, int x, int y, int width, int height) -> bool"""
1449 return _gdi_
.Region_Intersect(*args
, **kwargs
)
1451 def IntersectRect(*args
, **kwargs
):
1452 """IntersectRect(self, Rect rect) -> bool"""
1453 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
1455 def IntersectRegion(*args
, **kwargs
):
1456 """IntersectRegion(self, Region region) -> bool"""
1457 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
1459 def IsEmpty(*args
, **kwargs
):
1460 """IsEmpty(self) -> bool"""
1461 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
1463 def IsEqual(*args
, **kwargs
):
1464 """IsEqual(self, Region region) -> bool"""
1465 return _gdi_
.Region_IsEqual(*args
, **kwargs
)
1467 def Union(*args
, **kwargs
):
1468 """Union(self, int x, int y, int width, int height) -> bool"""
1469 return _gdi_
.Region_Union(*args
, **kwargs
)
1471 def UnionRect(*args
, **kwargs
):
1472 """UnionRect(self, Rect rect) -> bool"""
1473 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1475 def UnionRegion(*args
, **kwargs
):
1476 """UnionRegion(self, Region region) -> bool"""
1477 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1479 def Subtract(*args
, **kwargs
):
1480 """Subtract(self, int x, int y, int width, int height) -> bool"""
1481 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1483 def SubtractRect(*args
, **kwargs
):
1484 """SubtractRect(self, Rect rect) -> bool"""
1485 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1487 def SubtractRegion(*args
, **kwargs
):
1488 """SubtractRegion(self, Region region) -> bool"""
1489 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1491 def Xor(*args
, **kwargs
):
1492 """Xor(self, int x, int y, int width, int height) -> bool"""
1493 return _gdi_
.Region_Xor(*args
, **kwargs
)
1495 def XorRect(*args
, **kwargs
):
1496 """XorRect(self, Rect rect) -> bool"""
1497 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1499 def XorRegion(*args
, **kwargs
):
1500 """XorRegion(self, Region region) -> bool"""
1501 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1503 def ConvertToBitmap(*args
, **kwargs
):
1504 """ConvertToBitmap(self) -> Bitmap"""
1505 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1507 def UnionBitmap(*args
, **kwargs
):
1508 """UnionBitmap(self, Bitmap bmp) -> bool"""
1509 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1511 def UnionBitmapColour(*args
, **kwargs
):
1512 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1513 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1515 Box
= property(GetBox
,doc
="See `GetBox`")
1516 _gdi_
.Region_swigregister(Region
)
1518 def RegionFromBitmap(*args
, **kwargs
):
1519 """RegionFromBitmap(Bitmap bmp) -> Region"""
1520 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1523 def RegionFromBitmapColour(*args
, **kwargs
):
1524 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1525 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1528 def RegionFromPoints(*args
, **kwargs
):
1529 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1530 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1533 class RegionIterator(_core
.Object
):
1534 """Proxy of C++ RegionIterator class"""
1535 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1536 __repr__
= _swig_repr
1537 def __init__(self
, *args
, **kwargs
):
1538 """__init__(self, Region region) -> RegionIterator"""
1539 _gdi_
.RegionIterator_swiginit(self
,_gdi_
.new_RegionIterator(*args
, **kwargs
))
1540 __swig_destroy__
= _gdi_
.delete_RegionIterator
1541 __del__
= lambda self
: None;
1542 def GetX(*args
, **kwargs
):
1543 """GetX(self) -> int"""
1544 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1546 def GetY(*args
, **kwargs
):
1547 """GetY(self) -> int"""
1548 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1550 def GetW(*args
, **kwargs
):
1551 """GetW(self) -> int"""
1552 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1554 def GetWidth(*args
, **kwargs
):
1555 """GetWidth(self) -> int"""
1556 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1558 def GetH(*args
, **kwargs
):
1559 """GetH(self) -> int"""
1560 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1562 def GetHeight(*args
, **kwargs
):
1563 """GetHeight(self) -> int"""
1564 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1566 def GetRect(*args
, **kwargs
):
1567 """GetRect(self) -> Rect"""
1568 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1570 def HaveRects(*args
, **kwargs
):
1571 """HaveRects(self) -> bool"""
1572 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1574 def Reset(*args
, **kwargs
):
1576 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1578 def Next(*args
, **kwargs
):
1580 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1582 def __nonzero__(*args
, **kwargs
):
1583 """__nonzero__(self) -> bool"""
1584 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1586 H
= property(GetH
,doc
="See `GetH`")
1587 Height
= property(GetHeight
,doc
="See `GetHeight`")
1588 Rect
= property(GetRect
,doc
="See `GetRect`")
1589 W
= property(GetW
,doc
="See `GetW`")
1590 Width
= property(GetWidth
,doc
="See `GetWidth`")
1591 X
= property(GetX
,doc
="See `GetX`")
1592 Y
= property(GetY
,doc
="See `GetY`")
1593 _gdi_
.RegionIterator_swigregister(RegionIterator
)
1595 #---------------------------------------------------------------------------
1597 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1598 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1599 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1600 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1601 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1602 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1603 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1604 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1605 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1606 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1607 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1608 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1609 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1610 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1611 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1612 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1613 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1614 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1615 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1616 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1617 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1618 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1619 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1620 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1621 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1622 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1623 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1624 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1625 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1626 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1627 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1628 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1629 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1630 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1631 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1632 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1633 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1634 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1635 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1636 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1637 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1638 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1639 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1640 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1641 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1642 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1643 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1644 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1645 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1646 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1647 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1648 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1649 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1650 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1651 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1652 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1653 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1654 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1655 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1656 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1657 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1658 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1659 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1660 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1661 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1662 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1663 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1664 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1665 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1666 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1667 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1668 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1669 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1670 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1671 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1672 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1673 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1674 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1675 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1676 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1677 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1678 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1679 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1680 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1681 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1682 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1683 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1684 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1685 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1686 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1687 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1688 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1689 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1690 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1691 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1692 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1693 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1694 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1695 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1696 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1697 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1698 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1699 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1700 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1701 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1702 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1703 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1704 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1705 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1706 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1707 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1708 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1709 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1710 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1711 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1712 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1713 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1714 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1715 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1716 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1717 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1718 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1719 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1720 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1721 #---------------------------------------------------------------------------
1723 class NativeFontInfo(object):
1724 """Proxy of C++ NativeFontInfo class"""
1725 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1726 __repr__
= _swig_repr
1727 def __init__(self
, *args
, **kwargs
):
1728 """__init__(self) -> NativeFontInfo"""
1729 _gdi_
.NativeFontInfo_swiginit(self
,_gdi_
.new_NativeFontInfo(*args
, **kwargs
))
1730 __swig_destroy__
= _gdi_
.delete_NativeFontInfo
1731 __del__
= lambda self
: None;
1732 def Init(*args
, **kwargs
):
1734 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1736 def InitFromFont(*args
, **kwargs
):
1737 """InitFromFont(self, Font font)"""
1738 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1740 def GetPointSize(*args
, **kwargs
):
1741 """GetPointSize(self) -> int"""
1742 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1744 def GetStyle(*args
, **kwargs
):
1745 """GetStyle(self) -> int"""
1746 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1748 def GetWeight(*args
, **kwargs
):
1749 """GetWeight(self) -> int"""
1750 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1752 def GetUnderlined(*args
, **kwargs
):
1753 """GetUnderlined(self) -> bool"""
1754 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1756 def GetFaceName(*args
, **kwargs
):
1757 """GetFaceName(self) -> String"""
1758 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1760 def GetFamily(*args
, **kwargs
):
1761 """GetFamily(self) -> int"""
1762 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1764 def GetEncoding(*args
, **kwargs
):
1765 """GetEncoding(self) -> int"""
1766 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1768 def SetPointSize(*args
, **kwargs
):
1769 """SetPointSize(self, int pointsize)"""
1770 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1772 def SetStyle(*args
, **kwargs
):
1773 """SetStyle(self, int style)"""
1774 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1776 def SetWeight(*args
, **kwargs
):
1777 """SetWeight(self, int weight)"""
1778 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1780 def SetUnderlined(*args
, **kwargs
):
1781 """SetUnderlined(self, bool underlined)"""
1782 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1784 def SetFaceName(*args
, **kwargs
):
1785 """SetFaceName(self, String facename) -> bool"""
1786 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1788 def SetFamily(*args
, **kwargs
):
1789 """SetFamily(self, int family)"""
1790 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1792 def SetEncoding(*args
, **kwargs
):
1793 """SetEncoding(self, int encoding)"""
1794 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1796 def FromString(*args
, **kwargs
):
1797 """FromString(self, String s) -> bool"""
1798 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1800 def ToString(*args
, **kwargs
):
1801 """ToString(self) -> String"""
1802 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1804 def __str__(*args
, **kwargs
):
1805 """__str__(self) -> String"""
1806 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1808 def FromUserString(*args
, **kwargs
):
1809 """FromUserString(self, String s) -> bool"""
1810 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1812 def ToUserString(*args
, **kwargs
):
1813 """ToUserString(self) -> String"""
1814 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1816 Encoding
= property(GetEncoding
,SetEncoding
,doc
="See `GetEncoding` and `SetEncoding`")
1817 FaceName
= property(GetFaceName
,SetFaceName
,doc
="See `GetFaceName` and `SetFaceName`")
1818 Family
= property(GetFamily
,SetFamily
,doc
="See `GetFamily` and `SetFamily`")
1819 PointSize
= property(GetPointSize
,SetPointSize
,doc
="See `GetPointSize` and `SetPointSize`")
1820 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
1821 Underlined
= property(GetUnderlined
,SetUnderlined
,doc
="See `GetUnderlined` and `SetUnderlined`")
1822 Weight
= property(GetWeight
,SetWeight
,doc
="See `GetWeight` and `SetWeight`")
1823 _gdi_
.NativeFontInfo_swigregister(NativeFontInfo
)
1825 class NativeEncodingInfo(object):
1826 """Proxy of C++ NativeEncodingInfo class"""
1827 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1828 __repr__
= _swig_repr
1829 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1830 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1831 def __init__(self
, *args
, **kwargs
):
1832 """__init__(self) -> NativeEncodingInfo"""
1833 _gdi_
.NativeEncodingInfo_swiginit(self
,_gdi_
.new_NativeEncodingInfo(*args
, **kwargs
))
1834 __swig_destroy__
= _gdi_
.delete_NativeEncodingInfo
1835 __del__
= lambda self
: None;
1836 def FromString(*args
, **kwargs
):
1837 """FromString(self, String s) -> bool"""
1838 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1840 def ToString(*args
, **kwargs
):
1841 """ToString(self) -> String"""
1842 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1844 _gdi_
.NativeEncodingInfo_swigregister(NativeEncodingInfo
)
1847 def GetNativeFontEncoding(*args
, **kwargs
):
1848 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1849 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1851 def TestFontEncoding(*args
, **kwargs
):
1852 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1853 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1854 #---------------------------------------------------------------------------
1856 class FontMapper(object):
1857 """Proxy of C++ FontMapper class"""
1858 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1859 __repr__
= _swig_repr
1860 def __init__(self
, *args
, **kwargs
):
1861 """__init__(self) -> FontMapper"""
1862 _gdi_
.FontMapper_swiginit(self
,_gdi_
.new_FontMapper(*args
, **kwargs
))
1863 __swig_destroy__
= _gdi_
.delete_FontMapper
1864 __del__
= lambda self
: None;
1865 def Get(*args
, **kwargs
):
1866 """Get() -> FontMapper"""
1867 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1869 Get
= staticmethod(Get
)
1870 def Set(*args
, **kwargs
):
1871 """Set(FontMapper mapper) -> FontMapper"""
1872 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1874 Set
= staticmethod(Set
)
1875 def CharsetToEncoding(*args
, **kwargs
):
1876 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1877 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1879 def GetSupportedEncodingsCount(*args
, **kwargs
):
1880 """GetSupportedEncodingsCount() -> size_t"""
1881 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1883 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1884 def GetEncoding(*args
, **kwargs
):
1885 """GetEncoding(size_t n) -> int"""
1886 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1888 GetEncoding
= staticmethod(GetEncoding
)
1889 def GetEncodingName(*args
, **kwargs
):
1890 """GetEncodingName(int encoding) -> String"""
1891 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1893 GetEncodingName
= staticmethod(GetEncodingName
)
1894 def GetEncodingDescription(*args
, **kwargs
):
1895 """GetEncodingDescription(int encoding) -> String"""
1896 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1898 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1899 def GetEncodingFromName(*args
, **kwargs
):
1900 """GetEncodingFromName(String name) -> int"""
1901 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1903 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1904 def SetConfigPath(*args
, **kwargs
):
1905 """SetConfigPath(self, String prefix)"""
1906 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1908 def GetDefaultConfigPath(*args
, **kwargs
):
1909 """GetDefaultConfigPath() -> String"""
1910 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1912 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1913 def GetAltForEncoding(*args
, **kwargs
):
1914 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1915 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1917 def IsEncodingAvailable(*args
, **kwargs
):
1918 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1919 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1921 def SetDialogParent(*args
, **kwargs
):
1922 """SetDialogParent(self, Window parent)"""
1923 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1925 def SetDialogTitle(*args
, **kwargs
):
1926 """SetDialogTitle(self, String title)"""
1927 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1929 AltForEncoding
= property(GetAltForEncoding
,doc
="See `GetAltForEncoding`")
1930 _gdi_
.FontMapper_swigregister(FontMapper
)
1932 def FontMapper_Get(*args
):
1933 """FontMapper_Get() -> FontMapper"""
1934 return _gdi_
.FontMapper_Get(*args
)
1936 def FontMapper_Set(*args
, **kwargs
):
1937 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1938 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1940 def FontMapper_GetSupportedEncodingsCount(*args
):
1941 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1942 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
)
1944 def FontMapper_GetEncoding(*args
, **kwargs
):
1945 """FontMapper_GetEncoding(size_t n) -> int"""
1946 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1948 def FontMapper_GetEncodingName(*args
, **kwargs
):
1949 """FontMapper_GetEncodingName(int encoding) -> String"""
1950 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1952 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1953 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1954 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1956 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1957 """FontMapper_GetEncodingFromName(String name) -> int"""
1958 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1960 def FontMapper_GetDefaultConfigPath(*args
):
1961 """FontMapper_GetDefaultConfigPath() -> String"""
1962 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
)
1964 #---------------------------------------------------------------------------
1966 class Font(GDIObject
):
1968 A font is an object which determines the appearance of text. Fonts are
1969 used for drawing text to a device context, and setting the appearance
1972 You can retrieve the current system font settings with `wx.SystemSettings`.
1974 The possible values for the family parameter of wx.Font constructor are:
1976 ======================== =============================
1977 wx.FONTFAMILY_DEFAULT Chooses a default font.
1978 wx.FONTFAMILY_DECORATIVE A decorative font.
1979 wx.FONTFAMILY_ROMAN A formal, serif font.
1980 wx.FONTFAMILY_SCRIPT A handwriting font.
1981 wx.FONTFAMILY_SWISS A sans-serif font.
1982 wx.FONTFAMILY_MODERN Usually a fixed pitch font.
1983 wx.FONTFAMILY_TELETYPE A teletype font.
1984 ======================== =============================
1986 The possible values for the weight parameter are:
1988 ==================== ==
1989 wx.FONTWEIGHT_NORMAL
1992 ==================== ==
1994 The known font encodings are:
1996 =========================== ====================================
1997 wx.FONTENCODING_SYSTEM system default
1998 wx.FONTENCODING_DEFAULT current default encoding
1999 wx.FONTENCODING_ISO8859_1 West European (Latin1)
2000 wx.FONTENCODING_ISO8859_2 Central and East European (Latin2)
2001 wx.FONTENCODING_ISO8859_3 Esperanto (Latin3)
2002 wx.FONTENCODING_ISO8859_4 Baltic (old) (Latin4)
2003 wx.FONTENCODING_ISO8859_5 Cyrillic
2004 wx.FONTENCODING_ISO8859_6 Arabic
2005 wx.FONTENCODING_ISO8859_7 Greek
2006 wx.FONTENCODING_ISO8859_8 Hebrew
2007 wx.FONTENCODING_ISO8859_9 Turkish (Latin5)
2008 wx.FONTENCODING_ISO8859_10 Variation of Latin4 (Latin6)
2009 wx.FONTENCODING_ISO8859_11 Thai
2010 wx.FONTENCODING_ISO8859_12 doesn't exist currently, but put it
2011 here anyhow to make all ISO8859
2013 wx.FONTENCODING_ISO8859_13 Baltic (Latin7)
2014 wx.FONTENCODING_ISO8859_14 Latin8
2015 wx.FONTENCODING_ISO8859_15 Latin9 (a.k.a. Latin0, includes euro)
2016 wx.FONTENCODING_KOI8 Cyrillic charset
2017 wx.FONTENCODING_ALTERNATIVE same as MS-DOS CP866
2018 wx.FONTENCODING_BULGARIAN used under Linux in Bulgaria
2019 wx.FONTENCODING_CP437 original MS-DOS codepage
2020 wx.FONTENCODING_CP850 CP437 merged with Latin1
2021 wx.FONTENCODING_CP852 CP437 merged with Latin2
2022 wx.FONTENCODING_CP855 another cyrillic encoding
2023 wx.FONTENCODING_CP866 and another one
2024 wx.FONTENCODING_CP874 WinThai
2025 wx.FONTENCODING_CP1250 WinLatin2
2026 wx.FONTENCODING_CP1251 WinCyrillic
2027 wx.FONTENCODING_CP1252 WinLatin1
2028 wx.FONTENCODING_CP1253 WinGreek (8859-7)
2029 wx.FONTENCODING_CP1254 WinTurkish
2030 wx.FONTENCODING_CP1255 WinHebrew
2031 wx.FONTENCODING_CP1256 WinArabic
2032 wx.FONTENCODING_CP1257 WinBaltic (same as Latin 7)
2033 wx.FONTENCODING_UTF7 UTF-7 Unicode encoding
2034 wx.FONTENCODING_UTF8 UTF-8 Unicode encoding
2035 =========================== ====================================
2039 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2040 __repr__
= _swig_repr
2041 def __init__(self
, *args
, **kwargs
):
2043 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
2044 String face=EmptyString,
2045 int encoding=FONTENCODING_DEFAULT) -> Font
2047 Creates a font object with the specified attributes.
2049 :param pointSize: The size of the font in points.
2051 :param family: Font family. A generic way of referring to fonts
2052 without specifying actual facename. It can be One of
2053 the ``wx.FONTFAMILY_xxx`` constants.
2055 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
2057 :param weight: Font weight, sometimes also referred to as font
2058 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
2060 :param underline: The value can be ``True`` or ``False`` and
2061 indicates whether the font will include an underline. This
2062 may not be supported on all platforms.
2064 :param face: An optional string specifying the actual typeface to
2065 be used. If it is an empty string, a default typeface will be
2066 chosen based on the family.
2068 :param encoding: An encoding which may be one of the
2069 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
2070 available, no font is created.
2072 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
2073 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
2076 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2077 _gdi_
.Font_swiginit(self
,_gdi_
.new_Font(*args
, **kwargs
))
2078 __swig_destroy__
= _gdi_
.delete_Font
2079 __del__
= lambda self
: None;
2080 def IsOk(*args
, **kwargs
):
2084 Returns ``True`` if this font was successfully created.
2086 return _gdi_
.Font_IsOk(*args
, **kwargs
)
2089 def __nonzero__(self
): return self
.IsOk()
2090 def __eq__(*args
, **kwargs
):
2091 """__eq__(self, Font other) -> bool"""
2092 return _gdi_
.Font___eq__(*args
, **kwargs
)
2094 def __ne__(*args
, **kwargs
):
2095 """__ne__(self, Font other) -> bool"""
2096 return _gdi_
.Font___ne__(*args
, **kwargs
)
2098 def GetPointSize(*args
, **kwargs
):
2100 GetPointSize(self) -> int
2102 Gets the point size.
2104 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
2106 def GetPixelSize(*args
, **kwargs
):
2108 GetPixelSize(self) -> Size
2110 Returns the size in pixels if the font was constructed with a pixel
2113 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
2115 def IsUsingSizeInPixels(*args
, **kwargs
):
2117 IsUsingSizeInPixels(self) -> bool
2119 Returns ``True`` if the font is using a pixelSize.
2121 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
2123 def GetFamily(*args
, **kwargs
):
2125 GetFamily(self) -> int
2127 Gets the font family.
2129 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
2131 def GetStyle(*args
, **kwargs
):
2133 GetStyle(self) -> int
2135 Gets the font style.
2137 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
2139 def GetWeight(*args
, **kwargs
):
2141 GetWeight(self) -> int
2143 Gets the font weight.
2145 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
2147 def GetUnderlined(*args
, **kwargs
):
2149 GetUnderlined(self) -> bool
2151 Returns ``True`` if the font is underlined, ``False`` otherwise.
2153 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
2155 def GetFaceName(*args
, **kwargs
):
2157 GetFaceName(self) -> String
2159 Returns the typeface name associated with the font, or the empty
2160 string if there is no typeface information.
2162 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
2164 def GetEncoding(*args
, **kwargs
):
2166 GetEncoding(self) -> int
2168 Get the font's encoding.
2170 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
2172 def GetNativeFontInfo(*args
, **kwargs
):
2174 GetNativeFontInfo(self) -> NativeFontInfo
2176 Constructs a `wx.NativeFontInfo` object from this font.
2178 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
2180 def IsFixedWidth(*args
, **kwargs
):
2182 IsFixedWidth(self) -> bool
2184 Returns true if the font is a fixed width (or monospaced) font, false
2185 if it is a proportional one or font is invalid.
2187 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
2189 def GetNativeFontInfoDesc(*args
, **kwargs
):
2191 GetNativeFontInfoDesc(self) -> String
2193 Returns the platform-dependent string completely describing this font
2194 or an empty string if the font isn't valid.
2196 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
2198 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
2200 GetNativeFontInfoUserDesc(self) -> String
2202 Returns a human readable version of `GetNativeFontInfoDesc`.
2204 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
2206 def SetPointSize(*args
, **kwargs
):
2208 SetPointSize(self, int pointSize)
2210 Sets the point size.
2212 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
2214 def SetPixelSize(*args
, **kwargs
):
2216 SetPixelSize(self, Size pixelSize)
2218 Sets the size in pixels rather than points. If there is platform API
2219 support for this then it is used, otherwise a font with the closest
2220 size is found using a binary search.
2222 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
2224 def SetFamily(*args
, **kwargs
):
2226 SetFamily(self, int family)
2228 Sets the font family.
2230 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
2232 def SetStyle(*args
, **kwargs
):
2234 SetStyle(self, int style)
2236 Sets the font style.
2238 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
2240 def SetWeight(*args
, **kwargs
):
2242 SetWeight(self, int weight)
2244 Sets the font weight.
2246 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
2248 def SetFaceName(*args
, **kwargs
):
2250 SetFaceName(self, String faceName) -> bool
2252 Sets the facename for the font. The facename, which should be a valid
2253 font installed on the end-user's system.
2255 To avoid portability problems, don't rely on a specific face, but
2256 specify the font family instead or as well. A suitable font will be
2257 found on the end-user's system. If both the family and the facename
2258 are specified, wxWidgets will first search for the specific face, and
2259 then for a font belonging to the same family.
2261 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
2263 def SetUnderlined(*args
, **kwargs
):
2265 SetUnderlined(self, bool underlined)
2269 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
2271 def SetEncoding(*args
, **kwargs
):
2273 SetEncoding(self, int encoding)
2275 Set the font encoding.
2277 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
2279 def SetNativeFontInfo(*args
, **kwargs
):
2281 SetNativeFontInfo(self, NativeFontInfo info)
2283 Set the font's attributes from a `wx.NativeFontInfo` object.
2285 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
2287 def SetNativeFontInfoFromString(*args
, **kwargs
):
2289 SetNativeFontInfoFromString(self, String info) -> bool
2291 Set the font's attributes from string representation of a
2292 `wx.NativeFontInfo` object.
2294 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
2296 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
2298 SetNativeFontInfoUserDesc(self, String info) -> bool
2300 Set the font's attributes from a string formerly returned from
2301 `GetNativeFontInfoDesc`.
2303 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
2305 def GetFamilyString(*args
, **kwargs
):
2307 GetFamilyString(self) -> String
2309 Returns a string representation of the font family.
2311 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
2313 def GetStyleString(*args
, **kwargs
):
2315 GetStyleString(self) -> String
2317 Returns a string representation of the font style.
2319 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
2321 def GetWeightString(*args
, **kwargs
):
2323 GetWeightString(self) -> String
2325 Return a string representation of the font weight.
2327 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
2329 def SetNoAntiAliasing(*args
, **kwargs
):
2330 """SetNoAntiAliasing(self, bool no=True)"""
2331 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
2333 def GetNoAntiAliasing(*args
, **kwargs
):
2334 """GetNoAntiAliasing(self) -> bool"""
2335 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
2337 def GetDefaultEncoding(*args
, **kwargs
):
2339 GetDefaultEncoding() -> int
2341 Returns the encoding used for all fonts created with an encoding of
2342 ``wx.FONTENCODING_DEFAULT``.
2344 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
2346 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
2347 def SetDefaultEncoding(*args
, **kwargs
):
2349 SetDefaultEncoding(int encoding)
2351 Sets the default font encoding.
2353 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2355 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
2356 Encoding
= property(GetEncoding
,SetEncoding
,doc
="See `GetEncoding` and `SetEncoding`")
2357 FaceName
= property(GetFaceName
,SetFaceName
,doc
="See `GetFaceName` and `SetFaceName`")
2358 Family
= property(GetFamily
,SetFamily
,doc
="See `GetFamily` and `SetFamily`")
2359 FamilyString
= property(GetFamilyString
,doc
="See `GetFamilyString`")
2360 NativeFontInfo
= property(GetNativeFontInfo
,SetNativeFontInfo
,doc
="See `GetNativeFontInfo` and `SetNativeFontInfo`")
2361 NativeFontInfoDesc
= property(GetNativeFontInfoDesc
,doc
="See `GetNativeFontInfoDesc`")
2362 NativeFontInfoUserDesc
= property(GetNativeFontInfoUserDesc
,SetNativeFontInfoUserDesc
,doc
="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`")
2363 NoAntiAliasing
= property(GetNoAntiAliasing
,SetNoAntiAliasing
,doc
="See `GetNoAntiAliasing` and `SetNoAntiAliasing`")
2364 PixelSize
= property(GetPixelSize
,SetPixelSize
,doc
="See `GetPixelSize` and `SetPixelSize`")
2365 PointSize
= property(GetPointSize
,SetPointSize
,doc
="See `GetPointSize` and `SetPointSize`")
2366 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
2367 StyleString
= property(GetStyleString
,doc
="See `GetStyleString`")
2368 Underlined
= property(GetUnderlined
,SetUnderlined
,doc
="See `GetUnderlined` and `SetUnderlined`")
2369 Weight
= property(GetWeight
,SetWeight
,doc
="See `GetWeight` and `SetWeight`")
2370 WeightString
= property(GetWeightString
,doc
="See `GetWeightString`")
2371 _gdi_
.Font_swigregister(Font
)
2373 def FontFromNativeInfo(*args
, **kwargs
):
2375 FontFromNativeInfo(NativeFontInfo info) -> Font
2377 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2379 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2380 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
2383 def FontFromNativeInfoString(*args
, **kwargs
):
2385 FontFromNativeInfoString(String info) -> Font
2387 Construct a `wx.Font` from the string representation of a
2388 `wx.NativeFontInfo` object.
2390 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2391 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
2394 def FFont(*args
, **kwargs
):
2396 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2397 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2399 A bit of a simpler way to create a `wx.Font` using flags instead of
2400 individual attribute settings. The value of flags can be a
2401 combination of the following:
2403 ============================ ==
2409 wx.FONTFLAG_ANTIALIASED
2410 wx.FONTFLAG_NOT_ANTIALIASED
2411 wx.FONTFLAG_UNDERLINED
2412 wx.FONTFLAG_STRIKETHROUGH
2413 ============================ ==
2415 :see: `wx.Font.__init__`
2417 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2418 val
= _gdi_
.new_FFont(*args
, **kwargs
)
2421 def FontFromPixelSize(*args
, **kwargs
):
2423 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2424 bool underlined=False, String face=wxEmptyString,
2425 int encoding=FONTENCODING_DEFAULT) -> Font
2427 Creates a font using a size in pixels rather than points. If there is
2428 platform API support for this then it is used, otherwise a font with
2429 the closest size is found using a binary search.
2431 :see: `wx.Font.__init__`
2433 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2434 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
2437 def FFontFromPixelSize(*args
, **kwargs
):
2439 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2440 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2442 Creates a font using a size in pixels rather than points. If there is
2443 platform API support for this then it is used, otherwise a font with
2444 the closest size is found using a binary search.
2446 :see: `wx.Font.__init__`, `wx.FFont`
2448 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2449 val
= _gdi_
.new_FFontFromPixelSize(*args
, **kwargs
)
2452 def Font_GetDefaultEncoding(*args
):
2454 Font_GetDefaultEncoding() -> int
2456 Returns the encoding used for all fonts created with an encoding of
2457 ``wx.FONTENCODING_DEFAULT``.
2459 return _gdi_
.Font_GetDefaultEncoding(*args
)
2461 def Font_SetDefaultEncoding(*args
, **kwargs
):
2463 Font_SetDefaultEncoding(int encoding)
2465 Sets the default font encoding.
2467 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2469 Font2
= wx
._deprecated
(FFont
, "Use `wx.FFont` instead.")
2470 #---------------------------------------------------------------------------
2472 class FontEnumerator(object):
2473 """Proxy of C++ FontEnumerator class"""
2474 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2475 __repr__
= _swig_repr
2476 def __init__(self
, *args
, **kwargs
):
2477 """__init__(self) -> FontEnumerator"""
2478 _gdi_
.FontEnumerator_swiginit(self
,_gdi_
.new_FontEnumerator(*args
, **kwargs
))
2479 self
._setCallbackInfo
(self
, FontEnumerator
, 0)
2481 __swig_destroy__
= _gdi_
.delete_FontEnumerator
2482 __del__
= lambda self
: None;
2483 def _setCallbackInfo(*args
, **kwargs
):
2484 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
2485 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
2487 def EnumerateFacenames(*args
, **kwargs
):
2488 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2489 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
2491 def EnumerateEncodings(*args
, **kwargs
):
2492 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2493 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
2495 def GetEncodings(*args
, **kwargs
):
2496 """GetEncodings() -> PyObject"""
2497 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
2499 GetEncodings
= staticmethod(GetEncodings
)
2500 def GetFacenames(*args
, **kwargs
):
2501 """GetFacenames() -> PyObject"""
2502 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
2504 GetFacenames
= staticmethod(GetFacenames
)
2505 def IsValidFacename(*args
, **kwargs
):
2507 IsValidFacename(String str) -> bool
2509 Convenience function that returns true if the given face name exist in
2512 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2514 IsValidFacename
= staticmethod(IsValidFacename
)
2515 _gdi_
.FontEnumerator_swigregister(FontEnumerator
)
2517 def FontEnumerator_GetEncodings(*args
):
2518 """FontEnumerator_GetEncodings() -> PyObject"""
2519 return _gdi_
.FontEnumerator_GetEncodings(*args
)
2521 def FontEnumerator_GetFacenames(*args
):
2522 """FontEnumerator_GetFacenames() -> PyObject"""
2523 return _gdi_
.FontEnumerator_GetFacenames(*args
)
2525 def FontEnumerator_IsValidFacename(*args
, **kwargs
):
2527 FontEnumerator_IsValidFacename(String str) -> bool
2529 Convenience function that returns true if the given face name exist in
2532 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2534 #---------------------------------------------------------------------------
2536 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
2537 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
2538 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
2539 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
2540 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
2541 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
2542 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
2543 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
2544 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
2545 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
2546 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
2547 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
2548 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
2549 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
2550 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
2551 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
2552 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
2553 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
2554 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
2555 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
2556 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
2557 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
2558 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
2559 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
2560 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
2561 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
2562 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
2563 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
2564 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
2565 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
2566 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
2567 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
2568 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
2569 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
2570 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
2571 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
2572 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
2573 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
2574 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
2575 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
2576 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
2577 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
2578 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
2579 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
2580 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
2581 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
2582 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
2583 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
2584 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
2585 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
2586 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
2587 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
2588 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
2589 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
2590 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
2591 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
2592 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
2593 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
2594 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
2595 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
2596 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
2597 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
2598 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
2599 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
2600 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
2601 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
2602 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
2603 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
2604 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
2605 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
2606 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
2607 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
2608 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
2609 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
2610 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
2611 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
2612 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
2613 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2614 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2615 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2616 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2617 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2618 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2619 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2620 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2621 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2622 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2623 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2624 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2625 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2626 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2627 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2628 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2629 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2630 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2631 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2632 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2633 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2634 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2635 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2636 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2637 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2638 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2639 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2640 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2641 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2642 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2643 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2644 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2645 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2646 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2647 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2648 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2649 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2650 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2651 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2652 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2653 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2654 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2655 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2656 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2657 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2658 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2659 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2660 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2661 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2662 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2663 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2664 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2665 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2666 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2667 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2668 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2669 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2670 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2671 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2672 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2673 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2674 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2675 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2676 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2677 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2678 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2679 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2680 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2681 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2682 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2683 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2684 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2685 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2686 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2687 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2688 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2689 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2690 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2691 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2692 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2693 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2694 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2695 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2696 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2697 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2698 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2699 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2700 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2701 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2702 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2703 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2704 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2705 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2706 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2707 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2708 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2709 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2710 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2711 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2712 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2713 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2714 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2715 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2716 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2717 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2718 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2719 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2720 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2721 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2722 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2723 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2724 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2725 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2726 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2727 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2728 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2729 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2730 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2731 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2732 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2733 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2734 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2735 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2736 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2737 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2738 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2739 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2740 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2741 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2742 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2743 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2744 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2745 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2746 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2747 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2748 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2749 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2750 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2751 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2752 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2753 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2754 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2755 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2756 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2757 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2758 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2759 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2760 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2761 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2762 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2763 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2764 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2765 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2766 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2767 class LanguageInfo(object):
2768 """Proxy of C++ LanguageInfo class"""
2769 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2770 def __init__(self
): raise AttributeError, "No constructor defined"
2771 __repr__
= _swig_repr
2772 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2773 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2774 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2775 _gdi_
.LanguageInfo_swigregister(LanguageInfo
)
2777 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2778 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2779 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2780 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2781 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2782 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2783 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2784 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2785 class Locale(object):
2786 """Proxy of C++ Locale class"""
2787 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2788 __repr__
= _swig_repr
2789 def __init__(self
, *args
, **kwargs
):
2790 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2791 _gdi_
.Locale_swiginit(self
,_gdi_
.new_Locale(*args
, **kwargs
))
2792 __swig_destroy__
= _gdi_
.delete_Locale
2793 __del__
= lambda self
: None;
2794 def Init1(*args
, **kwargs
):
2796 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2797 bool bLoadDefault=True,
2798 bool bConvertEncoding=False) -> bool
2800 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2802 def Init2(*args
, **kwargs
):
2803 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2804 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2806 def Init(self
, *_args
, **_kwargs
):
2807 if type(_args
[0]) in [type(''), type(u
'')]:
2808 val
= self
.Init1(*_args
, **_kwargs
)
2810 val
= self
.Init2(*_args
, **_kwargs
)
2813 def GetSystemLanguage(*args
, **kwargs
):
2814 """GetSystemLanguage() -> int"""
2815 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2817 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2818 def GetSystemEncoding(*args
, **kwargs
):
2819 """GetSystemEncoding() -> int"""
2820 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2822 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2823 def GetSystemEncodingName(*args
, **kwargs
):
2824 """GetSystemEncodingName() -> String"""
2825 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2827 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2828 def IsOk(*args
, **kwargs
):
2829 """IsOk(self) -> bool"""
2830 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2832 def __nonzero__(self
): return self
.IsOk()
2833 def GetLocale(*args
, **kwargs
):
2834 """GetLocale(self) -> String"""
2835 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2837 def GetLanguage(*args
, **kwargs
):
2838 """GetLanguage(self) -> int"""
2839 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2841 def GetSysName(*args
, **kwargs
):
2842 """GetSysName(self) -> String"""
2843 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2845 def GetCanonicalName(*args
, **kwargs
):
2846 """GetCanonicalName(self) -> String"""
2847 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2849 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2850 """AddCatalogLookupPathPrefix(String prefix)"""
2851 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2853 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2854 def AddCatalog(*args
, **kwargs
):
2855 """AddCatalog(self, String szDomain) -> bool"""
2856 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2858 def IsAvailable(*args
, **kwargs
):
2859 """IsAvailable(int lang) -> bool"""
2860 return _gdi_
.Locale_IsAvailable(*args
, **kwargs
)
2862 IsAvailable
= staticmethod(IsAvailable
)
2863 def IsLoaded(*args
, **kwargs
):
2864 """IsLoaded(self, String szDomain) -> bool"""
2865 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2867 def GetLanguageInfo(*args
, **kwargs
):
2868 """GetLanguageInfo(int lang) -> LanguageInfo"""
2869 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2871 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2872 def GetLanguageName(*args
, **kwargs
):
2873 """GetLanguageName(int lang) -> String"""
2874 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2876 GetLanguageName
= staticmethod(GetLanguageName
)
2877 def FindLanguageInfo(*args
, **kwargs
):
2878 """FindLanguageInfo(String locale) -> LanguageInfo"""
2879 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2881 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2882 def AddLanguage(*args
, **kwargs
):
2883 """AddLanguage(LanguageInfo info)"""
2884 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2886 AddLanguage
= staticmethod(AddLanguage
)
2887 def GetString(*args
, **kwargs
):
2888 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2889 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2891 def GetName(*args
, **kwargs
):
2892 """GetName(self) -> String"""
2893 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2895 CanonicalName
= property(GetCanonicalName
,doc
="See `GetCanonicalName`")
2896 Language
= property(GetLanguage
,doc
="See `GetLanguage`")
2897 Locale
= property(GetLocale
,doc
="See `GetLocale`")
2898 Name
= property(GetName
,doc
="See `GetName`")
2899 String
= property(GetString
,doc
="See `GetString`")
2900 SysName
= property(GetSysName
,doc
="See `GetSysName`")
2901 _gdi_
.Locale_swigregister(Locale
)
2903 def Locale_GetSystemLanguage(*args
):
2904 """Locale_GetSystemLanguage() -> int"""
2905 return _gdi_
.Locale_GetSystemLanguage(*args
)
2907 def Locale_GetSystemEncoding(*args
):
2908 """Locale_GetSystemEncoding() -> int"""
2909 return _gdi_
.Locale_GetSystemEncoding(*args
)
2911 def Locale_GetSystemEncodingName(*args
):
2912 """Locale_GetSystemEncodingName() -> String"""
2913 return _gdi_
.Locale_GetSystemEncodingName(*args
)
2915 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2916 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2917 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2919 def Locale_IsAvailable(*args
, **kwargs
):
2920 """Locale_IsAvailable(int lang) -> bool"""
2921 return _gdi_
.Locale_IsAvailable(*args
, **kwargs
)
2923 def Locale_GetLanguageInfo(*args
, **kwargs
):
2924 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2925 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2927 def Locale_GetLanguageName(*args
, **kwargs
):
2928 """Locale_GetLanguageName(int lang) -> String"""
2929 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2931 def Locale_FindLanguageInfo(*args
, **kwargs
):
2932 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2933 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2935 def Locale_AddLanguage(*args
, **kwargs
):
2936 """Locale_AddLanguage(LanguageInfo info)"""
2937 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2939 class PyLocale(Locale
):
2940 """Proxy of C++ PyLocale class"""
2941 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2942 __repr__
= _swig_repr
2943 def __init__(self
, *args
, **kwargs
):
2944 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
2945 _gdi_
.PyLocale_swiginit(self
,_gdi_
.new_PyLocale(*args
, **kwargs
))
2946 self
._setCallbackInfo
(self
, PyLocale
)
2948 __swig_destroy__
= _gdi_
.delete_PyLocale
2949 __del__
= lambda self
: None;
2950 def _setCallbackInfo(*args
, **kwargs
):
2951 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
2952 return _gdi_
.PyLocale__setCallbackInfo(*args
, **kwargs
)
2954 def GetSingularString(*args
, **kwargs
):
2955 """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar"""
2956 return _gdi_
.PyLocale_GetSingularString(*args
, **kwargs
)
2958 def GetPluralString(*args
, **kwargs
):
2960 GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n,
2961 wxChar szDomain=None) -> wxChar
2963 return _gdi_
.PyLocale_GetPluralString(*args
, **kwargs
)
2965 _gdi_
.PyLocale_swigregister(PyLocale
)
2968 def GetLocale(*args
):
2969 """GetLocale() -> Locale"""
2970 return _gdi_
.GetLocale(*args
)
2971 #---------------------------------------------------------------------------
2973 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2974 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2975 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2976 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2977 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2978 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2979 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2980 class EncodingConverter(_core
.Object
):
2981 """Proxy of C++ EncodingConverter class"""
2982 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2983 __repr__
= _swig_repr
2984 def __init__(self
, *args
, **kwargs
):
2985 """__init__(self) -> EncodingConverter"""
2986 _gdi_
.EncodingConverter_swiginit(self
,_gdi_
.new_EncodingConverter(*args
, **kwargs
))
2987 __swig_destroy__
= _gdi_
.delete_EncodingConverter
2988 __del__
= lambda self
: None;
2989 def Init(*args
, **kwargs
):
2990 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2991 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2993 def Convert(*args
, **kwargs
):
2994 """Convert(self, String input) -> String"""
2995 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2997 def GetPlatformEquivalents(*args
, **kwargs
):
2998 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2999 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
3001 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
3002 def GetAllEquivalents(*args
, **kwargs
):
3003 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
3004 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
3006 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
3007 def CanConvert(*args
, **kwargs
):
3008 """CanConvert(int encIn, int encOut) -> bool"""
3009 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
3011 CanConvert
= staticmethod(CanConvert
)
3012 def __nonzero__(self
): return self
.IsOk()
3013 _gdi_
.EncodingConverter_swigregister(EncodingConverter
)
3015 def GetTranslation(*args
):
3017 GetTranslation(String str) -> String
3018 GetTranslation(String str, String domain) -> String
3019 GetTranslation(String str, String strPlural, size_t n) -> String
3020 GetTranslation(String str, String strPlural, size_t n, String domain) -> String
3022 return _gdi_
.GetTranslation(*args
)
3024 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
3025 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
3026 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
3028 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
3029 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
3030 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
3032 def EncodingConverter_CanConvert(*args
, **kwargs
):
3033 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
3034 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
3036 #----------------------------------------------------------------------------
3037 # On MSW add the directory where the wxWidgets catalogs were installed
3038 # to the default catalog path.
3039 if wx
.Platform
== "__WXMSW__":
3041 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "locale")
3042 Locale
.AddCatalogLookupPathPrefix(_localedir
)
3045 #----------------------------------------------------------------------------
3047 #---------------------------------------------------------------------------
3049 class DC(_core
.Object
):
3051 A wx.DC is a device context onto which graphics and text can be
3052 drawn. It is intended to represent a number of output devices in a
3053 generic way, so a window can have a device context associated with it,
3054 and a printer also has a device context. In this way, the same piece
3055 of code may write to a number of different devices, if the device
3056 context is used as a parameter.
3058 Derived types of wxDC have documentation for specific features only,
3059 so refer to this section for most device context information.
3061 The wx.DC class is abstract and can not be instantiated, you must use
3062 one of the derived classes instead. Which one will depend on the
3063 situation in which it is used.
3065 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
3066 def __init__(self
): raise AttributeError, "No constructor defined"
3067 __repr__
= _swig_repr
3068 __swig_destroy__
= _gdi_
.delete_DC
3069 __del__
= lambda self
: None;
3070 # These have been deprecated in wxWidgets. Since they never
3071 # really did anything to begin with, just make them be NOPs.
3072 def BeginDrawing(self
): pass
3073 def EndDrawing(self
): pass
3075 def FloodFill(*args
, **kwargs
):
3077 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
3079 Flood fills the device context starting from the given point, using
3080 the current brush colour, and using a style:
3082 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
3083 the given colour is encountered.
3085 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
3088 Returns False if the operation failed.
3090 Note: The present implementation for non-Windows platforms may fail to
3091 find colour borders if the pixels do not match the colour
3092 exactly. However the function will still return true.
3094 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
3096 def FloodFillPoint(*args
, **kwargs
):
3098 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
3100 Flood fills the device context starting from the given point, using
3101 the current brush colour, and using a style:
3103 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
3104 the given colour is encountered.
3106 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
3109 Returns False if the operation failed.
3111 Note: The present implementation for non-Windows platforms may fail to
3112 find colour borders if the pixels do not match the colour
3113 exactly. However the function will still return true.
3115 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
3117 def GradientFillConcentric(*args
, **kwargs
):
3119 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
3122 Fill the area specified by rect with a radial gradient, starting from
3123 initialColour in the center of the circle and fading to destColour on
3124 the outside of the circle. The circleCenter argument is the relative
3125 coordinants of the center of the circle in the specified rect.
3127 Note: Currently this function is very slow, don't use it for real-time
3130 return _gdi_
.DC_GradientFillConcentric(*args
, **kwargs
)
3132 def GradientFillLinear(*args
, **kwargs
):
3134 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
3135 int nDirection=EAST)
3137 Fill the area specified by rect with a linear gradient, starting from
3138 initialColour and eventually fading to destColour. The nDirection
3139 parameter specifies the direction of the colour change, default is to
3140 use initialColour on the left part of the rectangle and destColour on
3143 return _gdi_
.DC_GradientFillLinear(*args
, **kwargs
)
3145 def GetPixel(*args
, **kwargs
):
3147 GetPixel(self, int x, int y) -> Colour
3149 Gets the colour at the specified location on the DC.
3151 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
3153 def GetPixelPoint(*args
, **kwargs
):
3154 """GetPixelPoint(self, Point pt) -> Colour"""
3155 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
3157 def DrawLine(*args
, **kwargs
):
3159 DrawLine(self, int x1, int y1, int x2, int y2)
3161 Draws a line from the first point to the second. The current pen is
3162 used for drawing the line. Note that the second point is *not* part of
3163 the line and is not drawn by this function (this is consistent with
3164 the behaviour of many other toolkits).
3166 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
3168 def DrawLinePoint(*args
, **kwargs
):
3170 DrawLinePoint(self, Point pt1, Point pt2)
3172 Draws a line from the first point to the second. The current pen is
3173 used for drawing the line. Note that the second point is *not* part of
3174 the line and is not drawn by this function (this is consistent with
3175 the behaviour of many other toolkits).
3177 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
3179 def CrossHair(*args
, **kwargs
):
3181 CrossHair(self, int x, int y)
3183 Displays a cross hair using the current pen. This is a vertical and
3184 horizontal line the height and width of the window, centred on the
3187 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
3189 def CrossHairPoint(*args
, **kwargs
):
3191 CrossHairPoint(self, Point pt)
3193 Displays a cross hair using the current pen. This is a vertical and
3194 horizontal line the height and width of the window, centred on the
3197 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
3199 def DrawArc(*args
, **kwargs
):
3201 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
3203 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3204 the first point to the second. The current pen is used for the outline
3205 and the current brush for filling the shape.
3207 The arc is drawn in an anticlockwise direction from the start point to
3210 return _gdi_
.DC_DrawArc(*args
, **kwargs
)
3212 def DrawArcPoint(*args
, **kwargs
):
3214 DrawArcPoint(self, Point pt1, Point pt2, Point center)
3216 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3217 the first point to the second. The current pen is used for the outline
3218 and the current brush for filling the shape.
3220 The arc is drawn in an anticlockwise direction from the start point to
3223 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
3225 def DrawCheckMark(*args
, **kwargs
):
3227 DrawCheckMark(self, int x, int y, int width, int height)
3229 Draws a check mark inside the given rectangle.
3231 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
3233 def DrawCheckMarkRect(*args
, **kwargs
):
3235 DrawCheckMarkRect(self, Rect rect)
3237 Draws a check mark inside the given rectangle.
3239 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
3241 def DrawEllipticArc(*args
, **kwargs
):
3243 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3245 Draws an arc of an ellipse, with the given rectangle defining the
3246 bounds of the ellipse. The current pen is used for drawing the arc and
3247 the current brush is used for drawing the pie.
3249 The *start* and *end* parameters specify the start and end of the arc
3250 relative to the three-o'clock position from the center of the
3251 rectangle. Angles are specified in degrees (360 is a complete
3252 circle). Positive values mean counter-clockwise motion. If start is
3253 equal to end, a complete ellipse will be drawn.
3255 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
3257 def DrawEllipticArcPointSize(*args
, **kwargs
):
3259 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3261 Draws an arc of an ellipse, with the given rectangle defining the
3262 bounds of the ellipse. The current pen is used for drawing the arc and
3263 the current brush is used for drawing the pie.
3265 The *start* and *end* parameters specify the start and end of the arc
3266 relative to the three-o'clock position from the center of the
3267 rectangle. Angles are specified in degrees (360 is a complete
3268 circle). Positive values mean counter-clockwise motion. If start is
3269 equal to end, a complete ellipse will be drawn.
3271 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
3273 def DrawPoint(*args
, **kwargs
):
3275 DrawPoint(self, int x, int y)
3277 Draws a point using the current pen.
3279 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
3281 def DrawPointPoint(*args
, **kwargs
):
3283 DrawPointPoint(self, Point pt)
3285 Draws a point using the current pen.
3287 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
3289 def DrawRectangle(*args
, **kwargs
):
3291 DrawRectangle(self, int x, int y, int width, int height)
3293 Draws a rectangle with the given top left corner, and with the given
3294 size. The current pen is used for the outline and the current brush
3295 for filling the shape.
3297 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
3299 def DrawRectangleRect(*args
, **kwargs
):
3301 DrawRectangleRect(self, Rect rect)
3303 Draws a rectangle with the given top left corner, and with the given
3304 size. The current pen is used for the outline and the current brush
3305 for filling the shape.
3307 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
3309 def DrawRectanglePointSize(*args
, **kwargs
):
3311 DrawRectanglePointSize(self, Point pt, Size sz)
3313 Draws a rectangle with the given top left corner, and with the given
3314 size. The current pen is used for the outline and the current brush
3315 for filling the shape.
3317 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
3319 def DrawRoundedRectangle(*args
, **kwargs
):
3321 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3323 Draws a rectangle with the given top left corner, and with the given
3324 size. The corners are quarter-circles using the given radius. The
3325 current pen is used for the outline and the current brush for filling
3328 If radius is positive, the value is assumed to be the radius of the
3329 rounded corner. If radius is negative, the absolute value is assumed
3330 to be the proportion of the smallest dimension of the rectangle. This
3331 means that the corner can be a sensible size relative to the size of
3332 the rectangle, and also avoids the strange effects X produces when the
3333 corners are too big for the rectangle.
3335 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
3337 def DrawRoundedRectangleRect(*args
, **kwargs
):
3339 DrawRoundedRectangleRect(self, Rect r, double radius)
3341 Draws a rectangle with the given top left corner, and with the given
3342 size. The corners are quarter-circles using the given radius. The
3343 current pen is used for the outline and the current brush for filling
3346 If radius is positive, the value is assumed to be the radius of the
3347 rounded corner. If radius is negative, the absolute value is assumed
3348 to be the proportion of the smallest dimension of the rectangle. This
3349 means that the corner can be a sensible size relative to the size of
3350 the rectangle, and also avoids the strange effects X produces when the
3351 corners are too big for the rectangle.
3353 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
3355 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
3357 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3359 Draws a rectangle with the given top left corner, and with the given
3360 size. The corners are quarter-circles using the given radius. The
3361 current pen is used for the outline and the current brush for filling
3364 If radius is positive, the value is assumed to be the radius of the
3365 rounded corner. If radius is negative, the absolute value is assumed
3366 to be the proportion of the smallest dimension of the rectangle. This
3367 means that the corner can be a sensible size relative to the size of
3368 the rectangle, and also avoids the strange effects X produces when the
3369 corners are too big for the rectangle.
3371 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
3373 def DrawCircle(*args
, **kwargs
):
3375 DrawCircle(self, int x, int y, int radius)
3377 Draws a circle with the given center point and radius. The current
3378 pen is used for the outline and the current brush for filling the
3383 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
3385 def DrawCirclePoint(*args
, **kwargs
):
3387 DrawCirclePoint(self, Point pt, int radius)
3389 Draws a circle with the given center point and radius. The current
3390 pen is used for the outline and the current brush for filling the
3395 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
3397 def DrawEllipse(*args
, **kwargs
):
3399 DrawEllipse(self, int x, int y, int width, int height)
3401 Draws an ellipse contained in the specified rectangle. The current pen
3402 is used for the outline and the current brush for filling the shape.
3406 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
3408 def DrawEllipseRect(*args
, **kwargs
):
3410 DrawEllipseRect(self, Rect rect)
3412 Draws an ellipse contained in the specified rectangle. The current pen
3413 is used for the outline and the current brush for filling the shape.
3417 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
3419 def DrawEllipsePointSize(*args
, **kwargs
):
3421 DrawEllipsePointSize(self, Point pt, Size sz)
3423 Draws an ellipse contained in the specified rectangle. The current pen
3424 is used for the outline and the current brush for filling the shape.
3428 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
3430 def DrawIcon(*args
, **kwargs
):
3432 DrawIcon(self, Icon icon, int x, int y)
3434 Draw an icon on the display (does nothing if the device context is
3435 PostScript). This can be the simplest way of drawing bitmaps on a
3438 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
3440 def DrawIconPoint(*args
, **kwargs
):
3442 DrawIconPoint(self, Icon icon, Point pt)
3444 Draw an icon on the display (does nothing if the device context is
3445 PostScript). This can be the simplest way of drawing bitmaps on a
3448 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
3450 def DrawBitmap(*args
, **kwargs
):
3452 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3454 Draw a bitmap on the device context at the specified point. If
3455 *transparent* is true and the bitmap has a transparency mask, (or
3456 alpha channel on the platforms that support it) then the bitmap will
3457 be drawn transparently.
3459 When drawing a mono-bitmap, the current text foreground colour will be
3460 used to draw the foreground of the bitmap (all bits set to 1), and the
3461 current text background colour to draw the background (all bits set to
3464 :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`
3466 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
3468 def DrawBitmapPoint(*args
, **kwargs
):
3470 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3472 Draw a bitmap on the device context at the specified point. If
3473 *transparent* is true and the bitmap has a transparency mask, (or
3474 alpha channel on the platforms that support it) then the bitmap will
3475 be drawn transparently.
3477 When drawing a mono-bitmap, the current text foreground colour will be
3478 used to draw the foreground of the bitmap (all bits set to 1), and the
3479 current text background colour to draw the background (all bits set to
3482 :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`
3484 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
3486 def DrawText(*args
, **kwargs
):
3488 DrawText(self, String text, int x, int y)
3490 Draws a text string at the specified point, using the current text
3491 font, and the current text foreground and background colours.
3493 The coordinates refer to the top-left corner of the rectangle bounding
3494 the string. See `GetTextExtent` for how to get the dimensions of a
3495 text string, which can be used to position the text more precisely.
3497 **NOTE**: under wxGTK the current logical function is used by this
3498 function but it is ignored by wxMSW. Thus, you should avoid using
3499 logical functions with this function in portable programs.
3501 :see: `DrawRotatedText`
3503 return _gdi_
.DC_DrawText(*args
, **kwargs
)
3505 def DrawTextPoint(*args
, **kwargs
):
3507 DrawTextPoint(self, String text, Point pt)
3509 Draws a text string at the specified point, using the current text
3510 font, and the current text foreground and background colours.
3512 The coordinates refer to the top-left corner of the rectangle bounding
3513 the string. See `GetTextExtent` for how to get the dimensions of a
3514 text string, which can be used to position the text more precisely.
3516 **NOTE**: under wxGTK the current logical function is used by this
3517 function but it is ignored by wxMSW. Thus, you should avoid using
3518 logical functions with this function in portable programs.
3520 :see: `DrawRotatedText`
3522 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
3524 def DrawRotatedText(*args
, **kwargs
):
3526 DrawRotatedText(self, String text, int x, int y, double angle)
3528 Draws the text rotated by *angle* degrees, if supported by the platform.
3530 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3531 function. In particular, a font different from ``wx.NORMAL_FONT``
3532 should be used as the it is not normally a TrueType
3533 font. ``wx.SWISS_FONT`` is an example of a font which is.
3537 return _gdi_
.DC_DrawRotatedText(*args
, **kwargs
)
3539 def DrawRotatedTextPoint(*args
, **kwargs
):
3541 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3543 Draws the text rotated by *angle* degrees, if supported by the platform.
3545 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3546 function. In particular, a font different from ``wx.NORMAL_FONT``
3547 should be used as the it is not normally a TrueType
3548 font. ``wx.SWISS_FONT`` is an example of a font which is.
3552 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
3554 def Blit(*args
, **kwargs
):
3556 Blit(self, int xdest, int ydest, int width, int height, DC source,
3557 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3558 int xsrcMask=-1, int ysrcMask=-1) -> bool
3560 Copy from a source DC to this DC. Parameters specify the destination
3561 coordinates, size of area to copy, source DC, source coordinates,
3562 logical function, whether to use a bitmap mask, and mask source
3565 :param xdest: Destination device context x position.
3566 :param ydest: Destination device context y position.
3567 :param width: Width of source area to be copied.
3568 :param height: Height of source area to be copied.
3569 :param source: Source device context.
3570 :param xsrc: Source device context x position.
3571 :param ysrc: Source device context y position.
3572 :param rop: Logical function to use: see `SetLogicalFunction`.
3573 :param useMask: If true, Blit does a transparent blit using the mask
3574 that is associated with the bitmap selected into the
3575 source device context.
3576 :param xsrcMask: Source x position on the mask. If both xsrcMask and
3577 ysrcMask are -1, xsrc and ysrc will be assumed for
3578 the mask source position.
3579 :param ysrcMask: Source y position on the mask.
3582 return _gdi_
.DC_Blit(*args
, **kwargs
)
3584 def BlitPointSize(*args
, **kwargs
):
3586 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3587 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3589 Copy from a source DC to this DC. Parameters specify the destination
3590 coordinates, size of area to copy, source DC, source coordinates,
3591 logical function, whether to use a bitmap mask, and mask source
3594 :param destPt: Destination device context position.
3595 :param sz: Size of source area to be copied.
3596 :param source: Source device context.
3597 :param srcPt: Source device context position.
3598 :param rop: Logical function to use: see `SetLogicalFunction`.
3599 :param useMask: If true, Blit does a transparent blit using the mask
3600 that is associated with the bitmap selected into the
3601 source device context.
3602 :param srcPtMask: Source position on the mask.
3605 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
3607 def SetClippingRegion(*args
, **kwargs
):
3609 SetClippingRegion(self, int x, int y, int width, int height)
3611 Sets the clipping region for this device context to the intersection
3612 of the given region described by the parameters of this method and the
3613 previously set clipping region. You should call `DestroyClippingRegion`
3614 if you want to set the clipping region exactly to the region
3617 The clipping region is an area to which drawing is
3618 restricted. Possible uses for the clipping region are for clipping
3619 text or for speeding up window redraws when only a known area of the
3622 :see: `DestroyClippingRegion`, `wx.Region`
3624 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
3626 def SetClippingRegionPointSize(*args
, **kwargs
):
3628 SetClippingRegionPointSize(self, Point pt, Size sz)
3630 Sets the clipping region for this device context to the intersection
3631 of the given region described by the parameters of this method and the
3632 previously set clipping region. You should call `DestroyClippingRegion`
3633 if you want to set the clipping region exactly to the region
3636 The clipping region is an area to which drawing is
3637 restricted. Possible uses for the clipping region are for clipping
3638 text or for speeding up window redraws when only a known area of the
3641 :see: `DestroyClippingRegion`, `wx.Region`
3643 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
3645 def SetClippingRegionAsRegion(*args
, **kwargs
):
3647 SetClippingRegionAsRegion(self, Region region)
3649 Sets the clipping region for this device context to the intersection
3650 of the given region described by the parameters of this method and the
3651 previously set clipping region. You should call `DestroyClippingRegion`
3652 if you want to set the clipping region exactly to the region
3655 The clipping region is an area to which drawing is
3656 restricted. Possible uses for the clipping region are for clipping
3657 text or for speeding up window redraws when only a known area of the
3660 :see: `DestroyClippingRegion`, `wx.Region`
3662 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
3664 def SetClippingRect(*args
, **kwargs
):
3666 SetClippingRect(self, Rect rect)
3668 Sets the clipping region for this device context to the intersection
3669 of the given region described by the parameters of this method and the
3670 previously set clipping region. You should call `DestroyClippingRegion`
3671 if you want to set the clipping region exactly to the region
3674 The clipping region is an area to which drawing is
3675 restricted. Possible uses for the clipping region are for clipping
3676 text or for speeding up window redraws when only a known area of the
3679 :see: `DestroyClippingRegion`, `wx.Region`
3681 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
3683 def DrawLines(*args
, **kwargs
):
3685 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3687 Draws lines using a sequence of `wx.Point` objects, adding the
3688 optional offset coordinate. The current pen is used for drawing the
3691 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
3693 def DrawPolygon(*args
, **kwargs
):
3695 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3696 int fillStyle=ODDEVEN_RULE)
3698 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3699 the optional offset coordinate. The last argument specifies the fill
3700 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3702 The current pen is used for drawing the outline, and the current brush
3703 for filling the shape. Using a transparent brush suppresses
3704 filling. Note that wxWidgets automatically closes the first and last
3707 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3709 def DrawLabel(*args
, **kwargs
):
3711 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3714 Draw *text* within the specified rectangle, abiding by the alignment
3715 flags. Will additionally emphasize the character at *indexAccel* if
3718 :see: `DrawImageLabel`
3720 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3722 def DrawImageLabel(*args
, **kwargs
):
3724 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3725 int indexAccel=-1) -> Rect
3727 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3728 drawing it) within the specified rectangle, abiding by the alignment
3729 flags. Will additionally emphasize the character at *indexAccel* if
3730 it is not -1. Returns the bounding rectangle.
3732 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3734 def DrawSpline(*args
, **kwargs
):
3736 DrawSpline(self, List points)
3738 Draws a spline between all given control points, (a list of `wx.Point`
3739 objects) using the current pen. The spline is drawn using a series of
3740 lines, using an algorithm taken from the X drawing program 'XFIG'.
3742 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3744 def Clear(*args
, **kwargs
):
3748 Clears the device context using the current background brush.
3750 return _gdi_
.DC_Clear(*args
, **kwargs
)
3752 def StartDoc(*args
, **kwargs
):
3754 StartDoc(self, String message) -> bool
3756 Starts a document (only relevant when outputting to a
3757 printer). *Message* is a message to show whilst printing.
3759 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3761 def EndDoc(*args
, **kwargs
):
3765 Ends a document (only relevant when outputting to a printer).
3767 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3769 def StartPage(*args
, **kwargs
):
3773 Starts a document page (only relevant when outputting to a printer).
3775 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3777 def EndPage(*args
, **kwargs
):
3781 Ends a document page (only relevant when outputting to a printer).
3783 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3785 def SetFont(*args
, **kwargs
):
3787 SetFont(self, Font font)
3789 Sets the current font for the DC. It must be a valid font, in
3790 particular you should not pass ``wx.NullFont`` to this method.
3794 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3796 def SetPen(*args
, **kwargs
):
3798 SetPen(self, Pen pen)
3800 Sets the current pen for the DC.
3802 If the argument is ``wx.NullPen``, the current pen is selected out of the
3803 device context, and the original pen restored.
3807 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3809 def SetBrush(*args
, **kwargs
):
3811 SetBrush(self, Brush brush)
3813 Sets the current brush for the DC.
3815 If the argument is ``wx.NullBrush``, the current brush is selected out
3816 of the device context, and the original brush restored, allowing the
3817 current brush to be destroyed safely.
3821 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3823 def SetBackground(*args
, **kwargs
):
3825 SetBackground(self, Brush brush)
3827 Sets the current background brush for the DC.
3829 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3831 def SetBackgroundMode(*args
, **kwargs
):
3833 SetBackgroundMode(self, int mode)
3835 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3836 determines whether text will be drawn with a background colour or
3839 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3841 def SetPalette(*args
, **kwargs
):
3843 SetPalette(self, Palette palette)
3845 If this is a window DC or memory DC, assigns the given palette to the
3846 window or bitmap associated with the DC. If the argument is
3847 ``wx.NullPalette``, the current palette is selected out of the device
3848 context, and the original palette restored.
3852 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3854 def DestroyClippingRegion(*args
, **kwargs
):
3856 DestroyClippingRegion(self)
3858 Destroys the current clipping region so that none of the DC is
3861 :see: `SetClippingRegion`
3863 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3865 def GetClippingBox(*args
, **kwargs
):
3867 GetClippingBox() -> (x, y, width, height)
3869 Gets the rectangle surrounding the current clipping region.
3871 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3873 def GetClippingRect(*args
, **kwargs
):
3875 GetClippingRect(self) -> Rect
3877 Gets the rectangle surrounding the current clipping region.
3879 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3881 def GetCharHeight(*args
, **kwargs
):
3883 GetCharHeight(self) -> int
3885 Gets the character height of the currently set font.
3887 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3889 def GetCharWidth(*args
, **kwargs
):
3891 GetCharWidth(self) -> int
3893 Gets the average character width of the currently set font.
3895 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3897 def GetTextExtent(*args
, **kwargs
):
3899 GetTextExtent(wxString string) -> (width, height)
3901 Get the width and height of the text using the current font. Only
3902 works for single line strings.
3904 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3906 def GetFullTextExtent(*args
, **kwargs
):
3908 GetFullTextExtent(wxString string, Font font=None) ->
3909 (width, height, descent, externalLeading)
3911 Get the width, height, decent and leading of the text using the
3912 current or specified font. Only works for single line strings.
3914 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3916 def GetMultiLineTextExtent(*args
, **kwargs
):
3918 GetMultiLineTextExtent(wxString string, Font font=None) ->
3919 (width, height, lineHeight)
3921 Get the width, height, and line height of the text using the
3922 current or specified font. Works for single as well as multi-line
3925 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3927 def GetPartialTextExtents(*args
, **kwargs
):
3929 GetPartialTextExtents(self, text) -> [widths]
3931 Returns a list of integers such that each value is the distance in
3932 pixels from the begining of text to the coresponding character of
3933 *text*. The generic version simply builds a running total of the widths
3934 of each character using GetTextExtent, however if the various
3935 platforms have a native API function that is faster or more accurate
3936 than the generic implementation then it will be used instead.
3938 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3940 def GetSize(*args
, **kwargs
):
3942 GetSize(self) -> Size
3944 This gets the horizontal and vertical resolution in device units. It
3945 can be used to scale graphics to fit the page. For example, if *maxX*
3946 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3947 used in your application, the following code will scale the graphic to
3948 fit on the printer page::
3951 scaleX = maxX*1.0 / w
3952 scaleY = maxY*1.0 / h
3953 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3956 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3958 def GetSizeTuple(*args
, **kwargs
):
3960 GetSizeTuple() -> (width, height)
3962 This gets the horizontal and vertical resolution in device units. It
3963 can be used to scale graphics to fit the page. For example, if *maxX*
3964 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3965 used in your application, the following code will scale the graphic to
3966 fit on the printer page::
3969 scaleX = maxX*1.0 / w
3970 scaleY = maxY*1.0 / h
3971 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3974 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3976 def GetSizeMM(*args
, **kwargs
):
3978 GetSizeMM(self) -> Size
3980 Get the DC size in milimeters.
3982 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3984 def GetSizeMMTuple(*args
, **kwargs
):
3986 GetSizeMMTuple() -> (width, height)
3988 Get the DC size in milimeters.
3990 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3992 def DeviceToLogicalX(*args
, **kwargs
):
3994 DeviceToLogicalX(self, int x) -> int
3996 Convert device X coordinate to logical coordinate, using the current
3999 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
4001 def DeviceToLogicalY(*args
, **kwargs
):
4003 DeviceToLogicalY(self, int y) -> int
4005 Converts device Y coordinate to logical coordinate, using the current
4008 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
4010 def DeviceToLogicalXRel(*args
, **kwargs
):
4012 DeviceToLogicalXRel(self, int x) -> int
4014 Convert device X coordinate to relative logical coordinate, using the
4015 current mapping mode but ignoring the x axis orientation. Use this
4016 function for converting a width, for example.
4018 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
4020 def DeviceToLogicalYRel(*args
, **kwargs
):
4022 DeviceToLogicalYRel(self, int y) -> int
4024 Convert device Y coordinate to relative logical coordinate, using the
4025 current mapping mode but ignoring the y axis orientation. Use this
4026 function for converting a height, for example.
4028 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
4030 def LogicalToDeviceX(*args
, **kwargs
):
4032 LogicalToDeviceX(self, int x) -> int
4034 Converts logical X coordinate to device coordinate, using the current
4037 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
4039 def LogicalToDeviceY(*args
, **kwargs
):
4041 LogicalToDeviceY(self, int y) -> int
4043 Converts logical Y coordinate to device coordinate, using the current
4046 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
4048 def LogicalToDeviceXRel(*args
, **kwargs
):
4050 LogicalToDeviceXRel(self, int x) -> int
4052 Converts logical X coordinate to relative device coordinate, using the
4053 current mapping mode but ignoring the x axis orientation. Use this for
4054 converting a width, for example.
4056 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
4058 def LogicalToDeviceYRel(*args
, **kwargs
):
4060 LogicalToDeviceYRel(self, int y) -> int
4062 Converts logical Y coordinate to relative device coordinate, using the
4063 current mapping mode but ignoring the y axis orientation. Use this for
4064 converting a height, for example.
4066 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
4068 def CanDrawBitmap(*args
, **kwargs
):
4069 """CanDrawBitmap(self) -> bool"""
4070 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
4072 def CanGetTextExtent(*args
, **kwargs
):
4073 """CanGetTextExtent(self) -> bool"""
4074 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
4076 def GetDepth(*args
, **kwargs
):
4078 GetDepth(self) -> int
4080 Returns the colour depth of the DC.
4082 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
4084 def GetPPI(*args
, **kwargs
):
4086 GetPPI(self) -> Size
4088 Resolution in pixels per inch
4090 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
4092 def IsOk(*args
, **kwargs
):
4096 Returns true if the DC is ok to use.
4098 return _gdi_
.DC_IsOk(*args
, **kwargs
)
4101 def GetBackgroundMode(*args
, **kwargs
):
4103 GetBackgroundMode(self) -> int
4105 Returns the current background mode, either ``wx.SOLID`` or
4108 :see: `SetBackgroundMode`
4110 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
4112 def GetBackground(*args
, **kwargs
):
4114 GetBackground(self) -> Brush
4116 Gets the brush used for painting the background.
4118 :see: `SetBackground`
4120 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
4122 def GetBrush(*args
, **kwargs
):
4124 GetBrush(self) -> Brush
4126 Gets the current brush
4128 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
4130 def GetFont(*args
, **kwargs
):
4132 GetFont(self) -> Font
4134 Gets the current font
4136 return _gdi_
.DC_GetFont(*args
, **kwargs
)
4138 def GetPen(*args
, **kwargs
):
4142 Gets the current pen
4144 return _gdi_
.DC_GetPen(*args
, **kwargs
)
4146 def GetTextBackground(*args
, **kwargs
):
4148 GetTextBackground(self) -> Colour
4150 Gets the current text background colour
4152 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
4154 def GetTextForeground(*args
, **kwargs
):
4156 GetTextForeground(self) -> Colour
4158 Gets the current text foreground colour
4160 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
4162 def SetTextForeground(*args
, **kwargs
):
4164 SetTextForeground(self, Colour colour)
4166 Sets the current text foreground colour for the DC.
4168 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
4170 def SetTextBackground(*args
, **kwargs
):
4172 SetTextBackground(self, Colour colour)
4174 Sets the current text background colour for the DC.
4176 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
4178 def GetMapMode(*args
, **kwargs
):
4180 GetMapMode(self) -> int
4182 Gets the current *mapping mode* for the device context
4184 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
4186 def SetMapMode(*args
, **kwargs
):
4188 SetMapMode(self, int mode)
4190 The *mapping mode* of the device context defines the unit of
4191 measurement used to convert logical units to device units. The
4192 mapping mode can be one of the following:
4194 ================ =============================================
4195 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
4197 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
4198 wx.MM_METRIC Each logical unit is 1 mm.
4199 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
4200 wx.MM_TEXT Each logical unit is 1 pixel.
4201 ================ =============================================
4203 Note that in X, text drawing isn't handled consistently with the
4204 mapping mode; a font is always specified in point size. However,
4205 setting the user scale (see `SetUserScale`) scales the text
4206 appropriately. In Windows, scalable TrueType fonts are always used; in
4207 X, results depend on availability of fonts, but usually a reasonable
4210 The coordinate origin is always at the top left of the screen/printer.
4212 Drawing to a Windows printer device context uses the current mapping
4213 mode, but mapping mode is currently ignored for PostScript output.
4216 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
4218 def GetUserScale(*args
, **kwargs
):
4220 GetUserScale(self) -> (xScale, yScale)
4222 Gets the current user scale factor (set by `SetUserScale`).
4224 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
4226 def SetUserScale(*args
, **kwargs
):
4228 SetUserScale(self, double x, double y)
4230 Sets the user scaling factor, useful for applications which require
4233 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
4235 def GetLogicalScale(*args
, **kwargs
):
4236 """GetLogicalScale() -> (xScale, yScale)"""
4237 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
4239 def SetLogicalScale(*args
, **kwargs
):
4240 """SetLogicalScale(self, double x, double y)"""
4241 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
4243 def GetLogicalOrigin(*args
, **kwargs
):
4244 """GetLogicalOrigin(self) -> Point"""
4245 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
4247 def GetLogicalOriginTuple(*args
, **kwargs
):
4248 """GetLogicalOriginTuple() -> (x,y)"""
4249 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
4251 def SetLogicalOrigin(*args
, **kwargs
):
4252 """SetLogicalOrigin(self, int x, int y)"""
4253 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
4255 def SetLogicalOriginPoint(*args
, **kwargs
):
4256 """SetLogicalOriginPoint(self, Point point)"""
4257 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
4259 def GetDeviceOrigin(*args
, **kwargs
):
4260 """GetDeviceOrigin(self) -> Point"""
4261 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
4263 def GetDeviceOriginTuple(*args
, **kwargs
):
4264 """GetDeviceOriginTuple() -> (x,y)"""
4265 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
4267 def SetDeviceOrigin(*args
, **kwargs
):
4268 """SetDeviceOrigin(self, int x, int y)"""
4269 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
4271 def SetDeviceOriginPoint(*args
, **kwargs
):
4272 """SetDeviceOriginPoint(self, Point point)"""
4273 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
4275 def SetAxisOrientation(*args
, **kwargs
):
4277 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
4279 Sets the x and y axis orientation (i.e., the direction from lowest to
4280 highest values on the axis). The default orientation is the natural
4281 orientation, e.g. x axis from left to right and y axis from bottom up.
4283 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
4285 def GetLogicalFunction(*args
, **kwargs
):
4287 GetLogicalFunction(self) -> int
4289 Gets the current logical function (set by `SetLogicalFunction`).
4291 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
4293 def SetLogicalFunction(*args
, **kwargs
):
4295 SetLogicalFunction(self, int function)
4297 Sets the current logical function for the device context. This
4298 determines how a source pixel (from a pen or brush colour, or source
4299 device context if using `Blit`) combines with a destination pixel in
4300 the current device context.
4302 The possible values and their meaning in terms of source and
4303 destination pixel values are as follows:
4305 ================ ==========================
4307 wx.AND_INVERT (NOT src) AND dst
4308 wx.AND_REVERSE src AND (NOT dst)
4311 wx.EQUIV (NOT src) XOR dst
4313 wx.NAND (NOT src) OR (NOT dst)
4314 wx.NOR (NOT src) AND (NOT dst)
4317 wx.OR_INVERT (NOT src) OR dst
4318 wx.OR_REVERSE src OR (NOT dst)
4320 wx.SRC_INVERT NOT src
4322 ================ ==========================
4324 The default is wx.COPY, which simply draws with the current
4325 colour. The others combine the current colour and the background using
4326 a logical operation. wx.INVERT is commonly used for drawing rubber
4327 bands or moving outlines, since drawing twice reverts to the original
4331 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
4333 def ComputeScaleAndOrigin(*args
, **kwargs
):
4335 ComputeScaleAndOrigin(self)
4337 Performs all necessary computations for given platform and context
4338 type after each change of scale and origin parameters. Usually called
4339 automatically internally after such changes.
4342 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
4344 def SetOptimization(self
, optimize
):
4346 def GetOptimization(self
):
4349 SetOptimization
= wx
._deprecated
(SetOptimization
)
4350 GetOptimization
= wx
._deprecated
(GetOptimization
)
4352 def CalcBoundingBox(*args
, **kwargs
):
4354 CalcBoundingBox(self, int x, int y)
4356 Adds the specified point to the bounding box which can be retrieved
4357 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4359 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
4361 def CalcBoundingBoxPoint(*args
, **kwargs
):
4363 CalcBoundingBoxPoint(self, Point point)
4365 Adds the specified point to the bounding box which can be retrieved
4366 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4368 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
4370 def ResetBoundingBox(*args
, **kwargs
):
4372 ResetBoundingBox(self)
4374 Resets the bounding box: after a call to this function, the bounding
4375 box doesn't contain anything.
4377 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
4379 def MinX(*args
, **kwargs
):
4383 Gets the minimum horizontal extent used in drawing commands so far.
4385 return _gdi_
.DC_MinX(*args
, **kwargs
)
4387 def MaxX(*args
, **kwargs
):
4391 Gets the maximum horizontal extent used in drawing commands so far.
4393 return _gdi_
.DC_MaxX(*args
, **kwargs
)
4395 def MinY(*args
, **kwargs
):
4399 Gets the minimum vertical extent used in drawing commands so far.
4401 return _gdi_
.DC_MinY(*args
, **kwargs
)
4403 def MaxY(*args
, **kwargs
):
4407 Gets the maximum vertical extent used in drawing commands so far.
4409 return _gdi_
.DC_MaxY(*args
, **kwargs
)
4411 def GetBoundingBox(*args
, **kwargs
):
4413 GetBoundingBox() -> (x1,y1, x2,y2)
4415 Returns the min and max points used in drawing commands so far.
4417 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
4419 def __nonzero__(self
): return self
.IsOk()
4420 def GetLayoutDirection(*args
, **kwargs
):
4422 GetLayoutDirection(self) -> int
4424 Get the layout direction (LTR or RTL)_ for this dc. On platforms
4425 where RTL layout is supported, the return value will either be
4426 ``wx.Layout_LeftToRight`` or ``wx.Layout_RightToLeft``.
4427 ``wx.Layout_Default`` is returned if layout direction is not
4430 return _gdi_
.DC_GetLayoutDirection(*args
, **kwargs
)
4432 def SetLayoutDirection(*args
, **kwargs
):
4434 SetLayoutDirection(self, int dir)
4436 Change the layout direction for this dc.
4438 return _gdi_
.DC_SetLayoutDirection(*args
, **kwargs
)
4440 def _DrawPointList(*args
, **kwargs
):
4441 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4442 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
4444 def _DrawLineList(*args
, **kwargs
):
4445 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4446 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
4448 def _DrawRectangleList(*args
, **kwargs
):
4449 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4450 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
4452 def _DrawEllipseList(*args
, **kwargs
):
4453 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4454 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
4456 def _DrawPolygonList(*args
, **kwargs
):
4457 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4458 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
4460 def _DrawTextList(*args
, **kwargs
):
4462 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4463 PyObject backgroundList) -> PyObject
4465 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
4467 def DrawPointList(self
, points
, pens
=None):
4469 Draw a list of points as quickly as possible.
4471 :param points: A sequence of 2-element sequences representing
4472 each point to draw, (x,y).
4473 :param pens: If None, then the current pen is used. If a
4474 single pen then it will be used for all points. If
4475 a list of pens then there should be one for each point
4480 elif isinstance(pens
, wx
.Pen
):
4482 elif len(pens
) != len(points
):
4483 raise ValueError('points and pens must have same length')
4484 return self
._DrawPointList
(points
, pens
, [])
4487 def DrawLineList(self
, lines
, pens
=None):
4489 Draw a list of lines as quickly as possible.
4491 :param lines: A sequence of 4-element sequences representing
4492 each line to draw, (x1,y1, x2,y2).
4493 :param pens: If None, then the current pen is used. If a
4494 single pen then it will be used for all lines. If
4495 a list of pens then there should be one for each line
4500 elif isinstance(pens
, wx
.Pen
):
4502 elif len(pens
) != len(lines
):
4503 raise ValueError('lines and pens must have same length')
4504 return self
._DrawLineList
(lines
, pens
, [])
4507 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
4509 Draw a list of rectangles as quickly as possible.
4511 :param rectangles: A sequence of 4-element sequences representing
4512 each rectangle to draw, (x,y, w,h).
4513 :param pens: If None, then the current pen is used. If a
4514 single pen then it will be used for all rectangles.
4515 If a list of pens then there should be one for each
4516 rectangle in rectangles.
4517 :param brushes: A brush or brushes to be used to fill the rectagles,
4518 with similar semantics as the pens parameter.
4522 elif isinstance(pens
, wx
.Pen
):
4524 elif len(pens
) != len(rectangles
):
4525 raise ValueError('rectangles and pens must have same length')
4528 elif isinstance(brushes
, wx
.Brush
):
4530 elif len(brushes
) != len(rectangles
):
4531 raise ValueError('rectangles and brushes must have same length')
4532 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
4535 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
4537 Draw a list of ellipses as quickly as possible.
4539 :param ellipses: A sequence of 4-element sequences representing
4540 each ellipse to draw, (x,y, w,h).
4541 :param pens: If None, then the current pen is used. If a
4542 single pen then it will be used for all ellipses.
4543 If a list of pens then there should be one for each
4544 ellipse in ellipses.
4545 :param brushes: A brush or brushes to be used to fill the ellipses,
4546 with similar semantics as the pens parameter.
4550 elif isinstance(pens
, wx
.Pen
):
4552 elif len(pens
) != len(ellipses
):
4553 raise ValueError('ellipses and pens must have same length')
4556 elif isinstance(brushes
, wx
.Brush
):
4558 elif len(brushes
) != len(ellipses
):
4559 raise ValueError('ellipses and brushes must have same length')
4560 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
4563 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
4565 Draw a list of polygons, each of which is a list of points.
4567 :param polygons: A sequence of sequences of sequences.
4568 [[(x1,y1),(x2,y2),(x3,y3)...],
4569 [(x1,y1),(x2,y2),(x3,y3)...]]
4571 :param pens: If None, then the current pen is used. If a
4572 single pen then it will be used for all polygons.
4573 If a list of pens then there should be one for each
4575 :param brushes: A brush or brushes to be used to fill the polygons,
4576 with similar semantics as the pens parameter.
4580 elif isinstance(pens
, wx
.Pen
):
4582 elif len(pens
) != len(polygons
):
4583 raise ValueError('polygons and pens must have same length')
4586 elif isinstance(brushes
, wx
.Brush
):
4588 elif len(brushes
) != len(polygons
):
4589 raise ValueError('polygons and brushes must have same length')
4590 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
4593 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
4595 Draw a list of strings using a list of coordinants for positioning each string.
4597 :param textList: A list of strings
4598 :param coords: A list of (x,y) positions
4599 :param foregrounds: A list of `wx.Colour` objects to use for the
4600 foregrounds of the strings.
4601 :param backgrounds: A list of `wx.Colour` objects to use for the
4602 backgrounds of the strings.
4604 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4605 If you want backgrounds to do anything.
4607 if type(textList
) == type(''):
4608 textList
= [textList
]
4609 elif len(textList
) != len(coords
):
4610 raise ValueError('textlist and coords must have same length')
4611 if foregrounds
is None:
4613 elif isinstance(foregrounds
, wx
.Colour
):
4614 foregrounds
= [foregrounds
]
4615 elif len(foregrounds
) != len(coords
):
4616 raise ValueError('foregrounds and coords must have same length')
4617 if backgrounds
is None:
4619 elif isinstance(backgrounds
, wx
.Colour
):
4620 backgrounds
= [backgrounds
]
4621 elif len(backgrounds
) != len(coords
):
4622 raise ValueError('backgrounds and coords must have same length')
4623 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
4625 Background
= property(GetBackground
,SetBackground
,doc
="See `GetBackground` and `SetBackground`")
4626 BackgroundMode
= property(GetBackgroundMode
,SetBackgroundMode
,doc
="See `GetBackgroundMode` and `SetBackgroundMode`")
4627 BoundingBox
= property(GetBoundingBox
,doc
="See `GetBoundingBox`")
4628 Brush
= property(GetBrush
,SetBrush
,doc
="See `GetBrush` and `SetBrush`")
4629 CharHeight
= property(GetCharHeight
,doc
="See `GetCharHeight`")
4630 CharWidth
= property(GetCharWidth
,doc
="See `GetCharWidth`")
4631 ClippingBox
= property(GetClippingBox
,doc
="See `GetClippingBox`")
4632 ClippingRect
= property(GetClippingRect
,SetClippingRect
,doc
="See `GetClippingRect` and `SetClippingRect`")
4633 Depth
= property(GetDepth
,doc
="See `GetDepth`")
4634 DeviceOrigin
= property(GetDeviceOrigin
,SetDeviceOrigin
,doc
="See `GetDeviceOrigin` and `SetDeviceOrigin`")
4635 Font
= property(GetFont
,SetFont
,doc
="See `GetFont` and `SetFont`")
4636 FullTextExtent
= property(GetFullTextExtent
,doc
="See `GetFullTextExtent`")
4637 LogicalFunction
= property(GetLogicalFunction
,SetLogicalFunction
,doc
="See `GetLogicalFunction` and `SetLogicalFunction`")
4638 LogicalOrigin
= property(GetLogicalOrigin
,SetLogicalOrigin
,doc
="See `GetLogicalOrigin` and `SetLogicalOrigin`")
4639 LogicalScale
= property(GetLogicalScale
,SetLogicalScale
,doc
="See `GetLogicalScale` and `SetLogicalScale`")
4640 MapMode
= property(GetMapMode
,SetMapMode
,doc
="See `GetMapMode` and `SetMapMode`")
4641 MultiLineTextExtent
= property(GetMultiLineTextExtent
,doc
="See `GetMultiLineTextExtent`")
4642 Optimization
= property(GetOptimization
,SetOptimization
,doc
="See `GetOptimization` and `SetOptimization`")
4643 PPI
= property(GetPPI
,doc
="See `GetPPI`")
4644 PartialTextExtents
= property(GetPartialTextExtents
,doc
="See `GetPartialTextExtents`")
4645 Pen
= property(GetPen
,SetPen
,doc
="See `GetPen` and `SetPen`")
4646 Pixel
= property(GetPixel
,doc
="See `GetPixel`")
4647 PixelPoint
= property(GetPixelPoint
,doc
="See `GetPixelPoint`")
4648 Size
= property(GetSize
,doc
="See `GetSize`")
4649 SizeMM
= property(GetSizeMM
,doc
="See `GetSizeMM`")
4650 TextBackground
= property(GetTextBackground
,SetTextBackground
,doc
="See `GetTextBackground` and `SetTextBackground`")
4651 TextExtent
= property(GetTextExtent
,doc
="See `GetTextExtent`")
4652 TextForeground
= property(GetTextForeground
,SetTextForeground
,doc
="See `GetTextForeground` and `SetTextForeground`")
4653 UserScale
= property(GetUserScale
,SetUserScale
,doc
="See `GetUserScale` and `SetUserScale`")
4654 LayoutDirection
= property(GetLayoutDirection
,SetLayoutDirection
)
4655 _gdi_
.DC_swigregister(DC
)
4657 #---------------------------------------------------------------------------
4661 A memory device context provides a means to draw graphics onto a
4662 bitmap. A bitmap must be selected into the new memory DC before it may
4663 be used for anything. Typical usage is as follows::
4666 dc.SelectObject(bitmap)
4667 # draw on the dc using any of the Draw methods
4668 dc.SelectObject(wx.NullBitmap)
4669 # the bitmap now contains wahtever was drawn upon it
4671 Note that the memory DC *must* be deleted (or the bitmap selected out
4672 of it) before a bitmap can be reselected into another memory DC.
4675 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4676 __repr__
= _swig_repr
4677 def __init__(self
, *args
, **kwargs
):
4679 __init__(self, Bitmap bitmap=NullBitmap) -> MemoryDC
4681 Constructs a new memory device context.
4683 Use the Ok member to test whether the constructor was successful in
4684 creating a usable device context. If a bitmap is not given to this
4685 constructor then don't forget to select a bitmap into the DC before
4688 :see: `MemoryDCFromDC`
4690 _gdi_
.MemoryDC_swiginit(self
,_gdi_
.new_MemoryDC(*args
, **kwargs
))
4691 def SelectObject(*args
, **kwargs
):
4693 SelectObject(self, Bitmap bitmap)
4695 Selects the bitmap into the device context, to use as the memory
4696 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4697 the DC, and therefore the bitmap, and also to use Blit to copy the
4700 If the argument is wx.NullBitmap (or some other uninitialised
4701 `wx.Bitmap`) the current bitmap is selected out of the device context,
4702 and the original bitmap restored, allowing the current bitmap to be
4705 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
4707 _gdi_
.MemoryDC_swigregister(MemoryDC
)
4709 def MemoryDCFromDC(*args
, **kwargs
):
4711 MemoryDCFromDC(DC oldDC) -> MemoryDC
4713 Creates a DC that is compatible with the oldDC.
4715 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
4718 #---------------------------------------------------------------------------
4722 A wxScreenDC can be used to paint anywhere on the screen. This should
4723 normally be constructed as a temporary stack object; don't store a
4727 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4728 __repr__
= _swig_repr
4729 def __init__(self
, *args
, **kwargs
):
4731 __init__(self) -> ScreenDC
4733 A wxScreenDC can be used to paint anywhere on the screen. This should
4734 normally be constructed as a temporary stack object; don't store a
4738 _gdi_
.ScreenDC_swiginit(self
,_gdi_
.new_ScreenDC(*args
, **kwargs
))
4739 def StartDrawingOnTopWin(*args
, **kwargs
):
4741 StartDrawingOnTopWin(self, Window window) -> bool
4743 Specify that the area of the screen to be drawn upon coincides with
4746 :see: `EndDrawingOnTop`
4748 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4750 def StartDrawingOnTop(*args
, **kwargs
):
4752 StartDrawingOnTop(self, Rect rect=None) -> bool
4754 Specify that the area is the given rectangle, or the whole screen if
4757 :see: `EndDrawingOnTop`
4759 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4761 def EndDrawingOnTop(*args
, **kwargs
):
4763 EndDrawingOnTop(self) -> bool
4765 Use this in conjunction with `StartDrawingOnTop` or
4766 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4767 top of existing windows. Without this, some window systems (such as X)
4768 only allow drawing to take place underneath other windows.
4770 You might use this pair of functions when implementing a drag feature,
4771 for example as in the `wx.SplitterWindow` implementation.
4773 These functions are probably obsolete since the X implementations
4774 allow drawing directly on the screen now. However, the fact that this
4775 function allows the screen to be refreshed afterwards may be useful
4776 to some applications.
4778 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4780 _gdi_
.ScreenDC_swigregister(ScreenDC
)
4782 #---------------------------------------------------------------------------
4786 A wx.WindowDC must be constructed if an application wishes to paint on
4787 the whole area of a window (client and decorations). This should
4788 normally be constructed as a temporary stack object; don't store a
4791 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4792 __repr__
= _swig_repr
4793 def __init__(self
, *args
, **kwargs
):
4795 __init__(self, Window win) -> WindowDC
4797 Constructor. Pass the window on which you wish to paint.
4799 _gdi_
.WindowDC_swiginit(self
,_gdi_
.new_WindowDC(*args
, **kwargs
))
4800 _gdi_
.WindowDC_swigregister(WindowDC
)
4802 #---------------------------------------------------------------------------
4804 class ClientDC(WindowDC
):
4806 A wx.ClientDC must be constructed if an application wishes to paint on
4807 the client area of a window from outside an EVT_PAINT event. This should
4808 normally be constructed as a temporary stack object; don't store a
4809 wx.ClientDC object long term.
4811 To draw on a window from within an EVT_PAINT handler, construct a
4812 `wx.PaintDC` object.
4814 To draw on the whole window including decorations, construct a
4815 `wx.WindowDC` object (Windows only).
4818 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4819 __repr__
= _swig_repr
4820 def __init__(self
, *args
, **kwargs
):
4822 __init__(self, Window win) -> ClientDC
4824 Constructor. Pass the window on which you wish to paint.
4826 _gdi_
.ClientDC_swiginit(self
,_gdi_
.new_ClientDC(*args
, **kwargs
))
4827 _gdi_
.ClientDC_swigregister(ClientDC
)
4829 #---------------------------------------------------------------------------
4831 class PaintDC(ClientDC
):
4833 A wx.PaintDC must be constructed if an application wishes to paint on
4834 the client area of a window from within an EVT_PAINT event
4835 handler. This should normally be constructed as a temporary stack
4836 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4837 handler, you **must** create a wx.PaintDC object within it even if you
4838 don't actually use it.
4840 Using wx.PaintDC within EVT_PAINT handlers is important because it
4841 automatically sets the clipping area to the damaged area of the
4842 window. Attempts to draw outside this area do not appear.
4844 To draw on a window from outside EVT_PAINT handlers, construct a
4845 `wx.ClientDC` object.
4848 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4849 __repr__
= _swig_repr
4850 def __init__(self
, *args
, **kwargs
):
4852 __init__(self, Window win) -> PaintDC
4854 Constructor. Pass the window on which you wish to paint.
4856 _gdi_
.PaintDC_swiginit(self
,_gdi_
.new_PaintDC(*args
, **kwargs
))
4857 _gdi_
.PaintDC_swigregister(PaintDC
)
4859 #---------------------------------------------------------------------------
4861 BUFFER_VIRTUAL_AREA
= _gdi_
.BUFFER_VIRTUAL_AREA
4862 BUFFER_CLIENT_AREA
= _gdi_
.BUFFER_CLIENT_AREA
4863 class BufferedDC(MemoryDC
):
4865 This simple class provides a simple way to avoid flicker: when drawing
4866 on it, everything is in fact first drawn on an in-memory buffer (a
4867 `wx.Bitmap`) and then copied to the screen only once, when this object
4870 It can be used in the same way as any other device context.
4871 wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to
4872 use it in your EVT_PAINT handler, you should look at
4873 `wx.BufferedPaintDC`.
4875 Please note that GTK+ 2.0 and OS X provide double buffering themselves
4876 natively. wxBufferedDC is aware of this however, and will bypass the buffering
4877 unless an explicit buffer bitmap is given.
4880 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4881 __repr__
= _swig_repr
4882 def __init__(self
, *args
):
4884 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4885 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4887 Constructs a buffered DC.
4889 :param dc: The underlying DC: everything drawn to this object will
4890 be flushed to this DC when this object is destroyed. You may
4891 pass ``None`` in order to just initialize the buffer, and not
4894 :param buffer: If a `wx.Size` object is passed as the 2nd arg then
4895 it is the size of the bitmap that will be created internally
4896 and used for an implicit buffer. If the 2nd arg is a
4897 `wx.Bitmap` then it is the explicit buffer that will be
4898 used. Using an explicit buffer is the most efficient solution
4899 as the bitmap doesn't have to be recreated each time but it
4900 also requires more memory as the bitmap is never freed. The
4901 bitmap should have appropriate size, anything drawn outside of
4902 its bounds is clipped. If wx.NullBitmap is used then a new
4903 buffer will be allocated that is the same size as the dc.
4905 :param style: The style parameter indicates whether the supplied buffer is
4906 intended to cover the entire virtual size of a `wx.ScrolledWindow` or
4907 if it only covers the client area. Acceptable values are
4908 ``wx.BUFFER_VIRTUAL_AREA`` and ``wx.BUFFER_CLIENT_AREA``.
4912 _gdi_
.BufferedDC_swiginit(self
,_gdi_
.new_BufferedDC(*args
))
4913 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
4915 __swig_destroy__
= _gdi_
.delete_BufferedDC
4916 __del__
= lambda self
: None;
4917 def UnMask(*args
, **kwargs
):
4921 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4922 can be effectively used once only). This is usually only called in
4925 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
4927 _gdi_
.BufferedDC_swigregister(BufferedDC
)
4929 class BufferedPaintDC(BufferedDC
):
4931 This is a subclass of `wx.BufferedDC` which can be used inside of an
4932 EVT_PAINT event handler. Just create an object of this class instead
4933 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4934 flicker. The only thing to watch out for is that if you are using this
4935 class together with `wx.ScrolledWindow`, you probably do **not** want
4936 to call `wx.Window.PrepareDC` on it as it already does this internally
4937 for the real underlying `wx.PaintDC`.
4939 If your window is already fully buffered in a `wx.Bitmap` then your
4940 EVT_PAINT handler can be as simple as just creating a
4941 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4942 automatically when it is destroyed. For example::
4944 def OnPaint(self, event):
4945 dc = wx.BufferedPaintDC(self, self.buffer)
4950 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4951 __repr__
= _swig_repr
4952 def __init__(self
, *args
, **kwargs
):
4954 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4956 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4957 provide the bitmap to be used for buffering or let this object create
4958 one internally (in the latter case, the size of the client part of the
4959 window is automatically used).
4961 _gdi_
.BufferedPaintDC_swiginit(self
,_gdi_
.new_BufferedPaintDC(*args
, **kwargs
))
4962 _gdi_
.BufferedPaintDC_swigregister(BufferedPaintDC
)
4964 #---------------------------------------------------------------------------
4966 class AutoBufferedPaintDC(DC
):
4968 If the current platform double buffers by default then this DC is the
4969 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
4971 :see: `wx.AutoBufferedPaintDCFactory`
4974 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4975 __repr__
= _swig_repr
4976 def __init__(self
, *args
, **kwargs
):
4978 __init__(self, Window win) -> AutoBufferedPaintDC
4980 If the current platform double buffers by default then this DC is the
4981 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
4983 :see: `wx.AutoBufferedPaintDCFactory`
4986 _gdi_
.AutoBufferedPaintDC_swiginit(self
,_gdi_
.new_AutoBufferedPaintDC(*args
, **kwargs
))
4987 _gdi_
.AutoBufferedPaintDC_swigregister(AutoBufferedPaintDC
)
4990 def AutoBufferedPaintDCFactory(*args
, **kwargs
):
4992 AutoBufferedPaintDCFactory(Window window) -> DC
4994 Checks if the window is natively double buffered and will return a
4995 `wx.PaintDC` if it is, a `wx.BufferedPaintDC` otherwise. The advantage of
4996 this function over `wx.AutoBufferedPaintDC` is that this function will check
4997 if the the specified window has double-buffering enabled rather than just
4998 going by platform defaults.
5000 return _gdi_
.AutoBufferedPaintDCFactory(*args
, **kwargs
)
5001 #---------------------------------------------------------------------------
5005 wx.MirrorDC is a simple wrapper class which is always associated with a
5006 real `wx.DC` object and either forwards all of its operations to it
5007 without changes (no mirroring takes place) or exchanges x and y
5008 coordinates which makes it possible to reuse the same code to draw a
5009 figure and its mirror -- i.e. reflection related to the diagonal line
5012 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5013 __repr__
= _swig_repr
5014 def __init__(self
, *args
, **kwargs
):
5016 __init__(self, DC dc, bool mirror) -> MirrorDC
5018 Creates a mirrored DC associated with the real *dc*. Everything drawn
5019 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
5022 _gdi_
.MirrorDC_swiginit(self
,_gdi_
.new_MirrorDC(*args
, **kwargs
))
5023 _gdi_
.MirrorDC_swigregister(MirrorDC
)
5025 #---------------------------------------------------------------------------
5027 class PostScriptDC(DC
):
5028 """This is a `wx.DC` that can write to PostScript files on any platform."""
5029 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5030 __repr__
= _swig_repr
5031 def __init__(self
, *args
, **kwargs
):
5033 __init__(self, wxPrintData printData) -> PostScriptDC
5035 Constructs a PostScript printer device context from a `wx.PrintData`
5038 _gdi_
.PostScriptDC_swiginit(self
,_gdi_
.new_PostScriptDC(*args
, **kwargs
))
5039 def GetPrintData(*args
, **kwargs
):
5040 """GetPrintData(self) -> wxPrintData"""
5041 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
5043 def SetPrintData(*args
, **kwargs
):
5044 """SetPrintData(self, wxPrintData data)"""
5045 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
5047 def SetResolution(*args
, **kwargs
):
5049 SetResolution(int ppi)
5051 Set resolution (in pixels per inch) that will be used in PostScript
5052 output. Default is 720ppi.
5054 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
5056 SetResolution
= staticmethod(SetResolution
)
5057 def GetResolution(*args
, **kwargs
):
5059 GetResolution() -> int
5061 Return resolution used in PostScript output.
5063 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
5065 GetResolution
= staticmethod(GetResolution
)
5066 PrintData
= property(GetPrintData
,SetPrintData
,doc
="See `GetPrintData` and `SetPrintData`")
5067 _gdi_
.PostScriptDC_swigregister(PostScriptDC
)
5069 def PostScriptDC_SetResolution(*args
, **kwargs
):
5071 PostScriptDC_SetResolution(int ppi)
5073 Set resolution (in pixels per inch) that will be used in PostScript
5074 output. Default is 720ppi.
5076 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
5078 def PostScriptDC_GetResolution(*args
):
5080 PostScriptDC_GetResolution() -> int
5082 Return resolution used in PostScript output.
5084 return _gdi_
.PostScriptDC_GetResolution(*args
)
5086 #---------------------------------------------------------------------------
5088 class MetaFile(_core
.Object
):
5089 """Proxy of C++ MetaFile class"""
5090 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5091 __repr__
= _swig_repr
5092 def __init__(self
, *args
, **kwargs
):
5093 """__init__(self, String filename=EmptyString) -> MetaFile"""
5094 _gdi_
.MetaFile_swiginit(self
,_gdi_
.new_MetaFile(*args
, **kwargs
))
5095 _gdi_
.MetaFile_swigregister(MetaFile
)
5097 class MetaFileDC(DC
):
5098 """Proxy of C++ MetaFileDC class"""
5099 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5100 __repr__
= _swig_repr
5101 def __init__(self
, *args
, **kwargs
):
5103 __init__(self, String filename=EmptyString, int width=0, int height=0,
5104 String description=EmptyString) -> MetaFileDC
5106 _gdi_
.MetaFileDC_swiginit(self
,_gdi_
.new_MetaFileDC(*args
, **kwargs
))
5107 _gdi_
.MetaFileDC_swigregister(MetaFileDC
)
5109 class PrinterDC(DC
):
5110 """Proxy of C++ PrinterDC class"""
5111 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5112 __repr__
= _swig_repr
5113 def __init__(self
, *args
, **kwargs
):
5114 """__init__(self, wxPrintData printData) -> PrinterDC"""
5115 _gdi_
.PrinterDC_swiginit(self
,_gdi_
.new_PrinterDC(*args
, **kwargs
))
5116 _gdi_
.PrinterDC_swigregister(PrinterDC
)
5118 #---------------------------------------------------------------------------
5120 class GraphicsPath(object):
5121 """Proxy of C++ GraphicsPath class"""
5122 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5123 def __init__(self
): raise AttributeError, "No constructor defined"
5124 __repr__
= _swig_repr
5125 __swig_destroy__
= _gdi_
.delete_GraphicsPath
5126 __del__
= lambda self
: None;
5127 def MoveToPoint(*args
, **kwargs
):
5129 MoveToPoint(self, Double x, Double y)
5131 Begins a new subpath at (x,y)
5133 return _gdi_
.GraphicsPath_MoveToPoint(*args
, **kwargs
)
5135 def AddLineToPoint(*args
, **kwargs
):
5137 AddLineToPoint(self, Double x, Double y)
5139 Adds a straight line from the current point to (x,y)
5141 return _gdi_
.GraphicsPath_AddLineToPoint(*args
, **kwargs
)
5143 def AddCurveToPoint(*args
, **kwargs
):
5145 AddCurveToPoint(self, Double cx1, Double cy1, Double cx2, Double cy2, Double x,
5148 Adds a cubic Bezier curve from the current point, using two control
5149 points and an end point
5151 return _gdi_
.GraphicsPath_AddCurveToPoint(*args
, **kwargs
)
5153 def CloseSubpath(*args
, **kwargs
):
5157 closes the current sub-path
5159 return _gdi_
.GraphicsPath_CloseSubpath(*args
, **kwargs
)
5161 def GetCurrentPoint(*args
, **kwargs
):
5163 GetCurrentPoint(self) -> Point2D
5165 Gets the last point of the current path, (0,0) if not yet set
5167 return _gdi_
.GraphicsPath_GetCurrentPoint(*args
, **kwargs
)
5169 def AddArc(*args
, **kwargs
):
5171 AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle,
5174 Adds an arc of a circle centering at (x,y) with radius (r) from
5175 startAngle to endAngle
5177 return _gdi_
.GraphicsPath_AddArc(*args
, **kwargs
)
5179 def AddQuadCurveToPoint(*args
, **kwargs
):
5181 AddQuadCurveToPoint(self, Double cx, Double cy, Double x, Double y)
5183 Adds a quadratic Bezier curve from the current point, using a control
5184 point and an end point
5186 return _gdi_
.GraphicsPath_AddQuadCurveToPoint(*args
, **kwargs
)
5188 def AddRectangle(*args
, **kwargs
):
5190 AddRectangle(self, Double x, Double y, Double w, Double h)
5192 Appends a rectangle as a new closed subpath
5194 return _gdi_
.GraphicsPath_AddRectangle(*args
, **kwargs
)
5196 def AddCircle(*args
, **kwargs
):
5198 AddCircle(self, Double x, Double y, Double r)
5200 Appends a circle as a new closed subpath with the given radius.
5202 return _gdi_
.GraphicsPath_AddCircle(*args
, **kwargs
)
5204 def AddArcToPoint(*args
, **kwargs
):
5206 AddArcToPoint(self, Double x1, Double y1, Double x2, Double y2, Double r)
5208 Draws a an arc to two tangents connecting (current) to (x1,y1) and (x1,y1)
5209 to (x2,y2), also a straight line from (current) to (x1,y1)
5211 return _gdi_
.GraphicsPath_AddArcToPoint(*args
, **kwargs
)
5213 _gdi_
.GraphicsPath_swigregister(GraphicsPath
)
5215 class GraphicsContext(object):
5216 """Proxy of C++ GraphicsContext class"""
5217 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5218 def __init__(self
): raise AttributeError, "No constructor defined"
5219 __repr__
= _swig_repr
5220 __swig_destroy__
= _gdi_
.delete_GraphicsContext
5221 __del__
= lambda self
: None;
5222 def Create(*args
, **kwargs
):
5223 """Create(WindowDC dc) -> GraphicsContext"""
5224 val
= _gdi_
.GraphicsContext_Create(*args
, **kwargs
)
5225 val
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
5228 Create
= staticmethod(Create
)
5229 def CreatePath(*args
, **kwargs
):
5230 """CreatePath(self) -> GraphicsPath"""
5231 return _gdi_
.GraphicsContext_CreatePath(*args
, **kwargs
)
5233 def PushState(*args
, **kwargs
):
5234 """PushState(self)"""
5235 return _gdi_
.GraphicsContext_PushState(*args
, **kwargs
)
5237 def PopState(*args
, **kwargs
):
5238 """PopState(self)"""
5239 return _gdi_
.GraphicsContext_PopState(*args
, **kwargs
)
5241 def Clip(*args
, **kwargs
):
5242 """Clip(self, Region region)"""
5243 return _gdi_
.GraphicsContext_Clip(*args
, **kwargs
)
5245 def Translate(*args
, **kwargs
):
5246 """Translate(self, Double dx, Double dy)"""
5247 return _gdi_
.GraphicsContext_Translate(*args
, **kwargs
)
5249 def Scale(*args
, **kwargs
):
5250 """Scale(self, Double xScale, Double yScale)"""
5251 return _gdi_
.GraphicsContext_Scale(*args
, **kwargs
)
5253 def Rotate(*args
, **kwargs
):
5254 """Rotate(self, Double angle)"""
5255 return _gdi_
.GraphicsContext_Rotate(*args
, **kwargs
)
5257 def SetPen(*args
, **kwargs
):
5258 """SetPen(self, Pen pen)"""
5259 return _gdi_
.GraphicsContext_SetPen(*args
, **kwargs
)
5261 def SetBrush(*args
, **kwargs
):
5262 """SetBrush(self, Brush brush)"""
5263 return _gdi_
.GraphicsContext_SetBrush(*args
, **kwargs
)
5265 def SetLinearGradientBrush(*args
, **kwargs
):
5267 SetLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, Colour c1,
5270 return _gdi_
.GraphicsContext_SetLinearGradientBrush(*args
, **kwargs
)
5272 def SetRadialGradientBrush(*args
, **kwargs
):
5274 SetRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
5275 Colour oColor, Colour cColor)
5277 return _gdi_
.GraphicsContext_SetRadialGradientBrush(*args
, **kwargs
)
5279 def SetFont(*args
, **kwargs
):
5280 """SetFont(self, Font font)"""
5281 return _gdi_
.GraphicsContext_SetFont(*args
, **kwargs
)
5283 def SetTextColor(*args
, **kwargs
):
5284 """SetTextColor(self, Colour col)"""
5285 return _gdi_
.GraphicsContext_SetTextColor(*args
, **kwargs
)
5287 def StrokePath(*args
, **kwargs
):
5288 """StrokePath(self, GraphicsPath path)"""
5289 return _gdi_
.GraphicsContext_StrokePath(*args
, **kwargs
)
5291 def FillPath(*args
, **kwargs
):
5292 """FillPath(self, GraphicsPath path, int fillStyle=WINDING_RULE)"""
5293 return _gdi_
.GraphicsContext_FillPath(*args
, **kwargs
)
5295 def DrawPath(*args
, **kwargs
):
5296 """DrawPath(self, GraphicsPath path, int fillStyle=WINDING_RULE)"""
5297 return _gdi_
.GraphicsContext_DrawPath(*args
, **kwargs
)
5299 def DrawText(*args
, **kwargs
):
5300 """DrawText(self, String str, Double x, Double y)"""
5301 return _gdi_
.GraphicsContext_DrawText(*args
, **kwargs
)
5303 def DrawRotatedText(*args
, **kwargs
):
5304 """DrawRotatedText(self, String str, Double x, Double y, Double angle)"""
5305 return _gdi_
.GraphicsContext_DrawRotatedText(*args
, **kwargs
)
5307 def GetTextExtent(*args
, **kwargs
):
5308 """GetTextExtend(self, text) --> (width, height, descent, externalLeading)"""
5309 return _gdi_
.GraphicsContext_GetTextExtent(*args
, **kwargs
)
5311 def GetPartialTextExtents(*args
, **kwargs
):
5312 """GetPartialTextExtents(self, text) -> [widths]"""
5313 return _gdi_
.GraphicsContext_GetPartialTextExtents(*args
, **kwargs
)
5315 def DrawBitmap(*args
, **kwargs
):
5316 """DrawBitmap(self, Bitmap bmp, Double x, Double y, Double w, Double h)"""
5317 return _gdi_
.GraphicsContext_DrawBitmap(*args
, **kwargs
)
5319 def DrawIcon(*args
, **kwargs
):
5320 """DrawIcon(self, Icon icon, Double x, Double y, Double w, Double h)"""
5321 return _gdi_
.GraphicsContext_DrawIcon(*args
, **kwargs
)
5323 def StrokeLine(*args
, **kwargs
):
5324 """StrokeLine(self, Double x1, Double y1, Double x2, Double y2)"""
5325 return _gdi_
.GraphicsContext_StrokeLine(*args
, **kwargs
)
5327 def StrokeLines(*args
, **kwargs
):
5328 """StrokeLines(self, List points)"""
5329 return _gdi_
.GraphicsContext_StrokeLines(*args
, **kwargs
)
5331 def StrokeLineSegements(*args
, **kwargs
):
5332 """StrokeLineSegements(self, PyObject beginPoints, PyObject endPoints)"""
5333 return _gdi_
.GraphicsContext_StrokeLineSegements(*args
, **kwargs
)
5335 def DrawLines(*args
, **kwargs
):
5336 """DrawLines(self, size_t points, int fillStyle=WINDING_RULE)"""
5337 return _gdi_
.GraphicsContext_DrawLines(*args
, **kwargs
)
5339 def DrawRectangle(*args
, **kwargs
):
5340 """DrawRectangle(self, Double x, Double y, Double w, Double h)"""
5341 return _gdi_
.GraphicsContext_DrawRectangle(*args
, **kwargs
)
5343 def DrawEllipse(*args
, **kwargs
):
5344 """DrawEllipse(self, Double x, Double y, Double w, Double h)"""
5345 return _gdi_
.GraphicsContext_DrawEllipse(*args
, **kwargs
)
5347 def DrawRoundedRectangle(*args
, **kwargs
):
5348 """DrawRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)"""
5349 return _gdi_
.GraphicsContext_DrawRoundedRectangle(*args
, **kwargs
)
5351 _gdi_
.GraphicsContext_swigregister(GraphicsContext
)
5353 def GraphicsContext_Create(*args
, **kwargs
):
5354 """GraphicsContext_Create(WindowDC dc) -> GraphicsContext"""
5355 val
= _gdi_
.GraphicsContext_Create(*args
, **kwargs
)
5356 val
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
5360 """Proxy of C++ GCDC class"""
5361 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5362 __repr__
= _swig_repr
5363 def __init__(self
, *args
, **kwargs
):
5364 """__init__(self, WindowDC dc) -> GCDC"""
5365 _gdi_
.GCDC_swiginit(self
,_gdi_
.new_GCDC(*args
, **kwargs
))
5366 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
5368 __swig_destroy__
= _gdi_
.delete_GCDC
5369 __del__
= lambda self
: None;
5370 def GetGraphicContext(*args
, **kwargs
):
5371 """GetGraphicContext(self) -> GraphicsContext"""
5372 return _gdi_
.GCDC_GetGraphicContext(*args
, **kwargs
)
5374 _gdi_
.GCDC_swigregister(GCDC
)
5376 class Overlay(object):
5377 """Proxy of C++ Overlay class"""
5378 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5379 __repr__
= _swig_repr
5380 def __init__(self
, *args
, **kwargs
):
5381 """__init__(self) -> Overlay"""
5382 _gdi_
.Overlay_swiginit(self
,_gdi_
.new_Overlay(*args
, **kwargs
))
5383 __swig_destroy__
= _gdi_
.delete_Overlay
5384 __del__
= lambda self
: None;
5385 def Reset(*args
, **kwargs
):
5387 return _gdi_
.Overlay_Reset(*args
, **kwargs
)
5389 _gdi_
.Overlay_swigregister(Overlay
)
5391 class DCOverlay(object):
5392 """Proxy of C++ DCOverlay class"""
5393 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5394 __repr__
= _swig_repr
5395 def __init__(self
, *args
):
5397 __init__(self, Overlay overlay, WindowDC dc, int x, int y, int width,
5398 int height) -> DCOverlay
5399 __init__(self, Overlay overlay, WindowDC dc) -> DCOverlay
5401 _gdi_
.DCOverlay_swiginit(self
,_gdi_
.new_DCOverlay(*args
))
5402 __swig_destroy__
= _gdi_
.delete_DCOverlay
5403 __del__
= lambda self
: None;
5404 def Clear(*args
, **kwargs
):
5406 return _gdi_
.DCOverlay_Clear(*args
, **kwargs
)
5408 _gdi_
.DCOverlay_swigregister(DCOverlay
)
5410 #---------------------------------------------------------------------------
5412 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
5413 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
5414 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
5415 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
5416 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
5417 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
5418 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
5419 class ImageList(_core
.Object
):
5420 """Proxy of C++ ImageList class"""
5421 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5422 __repr__
= _swig_repr
5423 def __init__(self
, *args
, **kwargs
):
5424 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
5425 _gdi_
.ImageList_swiginit(self
,_gdi_
.new_ImageList(*args
, **kwargs
))
5426 __swig_destroy__
= _gdi_
.delete_ImageList
5427 __del__
= lambda self
: None;
5428 def Add(*args
, **kwargs
):
5429 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
5430 return _gdi_
.ImageList_Add(*args
, **kwargs
)
5432 def AddWithColourMask(*args
, **kwargs
):
5433 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
5434 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
5436 def AddIcon(*args
, **kwargs
):
5437 """AddIcon(self, Icon icon) -> int"""
5438 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
5440 def GetBitmap(*args
, **kwargs
):
5441 """GetBitmap(self, int index) -> Bitmap"""
5442 return _gdi_
.ImageList_GetBitmap(*args
, **kwargs
)
5444 def GetIcon(*args
, **kwargs
):
5445 """GetIcon(self, int index) -> Icon"""
5446 return _gdi_
.ImageList_GetIcon(*args
, **kwargs
)
5448 def Replace(*args
, **kwargs
):
5449 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
5450 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
5452 def Draw(*args
, **kwargs
):
5454 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
5455 bool solidBackground=False) -> bool
5457 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
5459 def GetImageCount(*args
, **kwargs
):
5460 """GetImageCount(self) -> int"""
5461 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
5463 def Remove(*args
, **kwargs
):
5464 """Remove(self, int index) -> bool"""
5465 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
5467 def RemoveAll(*args
, **kwargs
):
5468 """RemoveAll(self) -> bool"""
5469 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
5471 def GetSize(*args
, **kwargs
):
5472 """GetSize(index) -> (width,height)"""
5473 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
5475 ImageCount
= property(GetImageCount
,doc
="See `GetImageCount`")
5476 Size
= property(GetSize
,doc
="See `GetSize`")
5477 _gdi_
.ImageList_swigregister(ImageList
)
5479 #---------------------------------------------------------------------------
5481 class StockGDI(object):
5482 """Proxy of C++ StockGDI class"""
5483 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5484 __repr__
= _swig_repr
5485 BRUSH_BLACK
= _gdi_
.StockGDI_BRUSH_BLACK
5486 BRUSH_BLUE
= _gdi_
.StockGDI_BRUSH_BLUE
5487 BRUSH_CYAN
= _gdi_
.StockGDI_BRUSH_CYAN
5488 BRUSH_GREEN
= _gdi_
.StockGDI_BRUSH_GREEN
5489 BRUSH_GREY
= _gdi_
.StockGDI_BRUSH_GREY
5490 BRUSH_LIGHTGREY
= _gdi_
.StockGDI_BRUSH_LIGHTGREY
5491 BRUSH_MEDIUMGREY
= _gdi_
.StockGDI_BRUSH_MEDIUMGREY
5492 BRUSH_RED
= _gdi_
.StockGDI_BRUSH_RED
5493 BRUSH_TRANSPARENT
= _gdi_
.StockGDI_BRUSH_TRANSPARENT
5494 BRUSH_WHITE
= _gdi_
.StockGDI_BRUSH_WHITE
5495 COLOUR_BLACK
= _gdi_
.StockGDI_COLOUR_BLACK
5496 COLOUR_BLUE
= _gdi_
.StockGDI_COLOUR_BLUE
5497 COLOUR_CYAN
= _gdi_
.StockGDI_COLOUR_CYAN
5498 COLOUR_GREEN
= _gdi_
.StockGDI_COLOUR_GREEN
5499 COLOUR_LIGHTGREY
= _gdi_
.StockGDI_COLOUR_LIGHTGREY
5500 COLOUR_RED
= _gdi_
.StockGDI_COLOUR_RED
5501 COLOUR_WHITE
= _gdi_
.StockGDI_COLOUR_WHITE
5502 CURSOR_CROSS
= _gdi_
.StockGDI_CURSOR_CROSS
5503 CURSOR_HOURGLASS
= _gdi_
.StockGDI_CURSOR_HOURGLASS
5504 CURSOR_STANDARD
= _gdi_
.StockGDI_CURSOR_STANDARD
5505 FONT_ITALIC
= _gdi_
.StockGDI_FONT_ITALIC
5506 FONT_NORMAL
= _gdi_
.StockGDI_FONT_NORMAL
5507 FONT_SMALL
= _gdi_
.StockGDI_FONT_SMALL
5508 FONT_SWISS
= _gdi_
.StockGDI_FONT_SWISS
5509 PEN_BLACK
= _gdi_
.StockGDI_PEN_BLACK
5510 PEN_BLACKDASHED
= _gdi_
.StockGDI_PEN_BLACKDASHED
5511 PEN_CYAN
= _gdi_
.StockGDI_PEN_CYAN
5512 PEN_GREEN
= _gdi_
.StockGDI_PEN_GREEN
5513 PEN_GREY
= _gdi_
.StockGDI_PEN_GREY
5514 PEN_LIGHTGREY
= _gdi_
.StockGDI_PEN_LIGHTGREY
5515 PEN_MEDIUMGREY
= _gdi_
.StockGDI_PEN_MEDIUMGREY
5516 PEN_RED
= _gdi_
.StockGDI_PEN_RED
5517 PEN_TRANSPARENT
= _gdi_
.StockGDI_PEN_TRANSPARENT
5518 PEN_WHITE
= _gdi_
.StockGDI_PEN_WHITE
5519 ITEMCOUNT
= _gdi_
.StockGDI_ITEMCOUNT
5520 def __init__(self
, *args
, **kwargs
):
5521 """__init__(self) -> StockGDI"""
5522 _gdi_
.StockGDI_swiginit(self
,_gdi_
.new_StockGDI(*args
, **kwargs
))
5523 __swig_destroy__
= _gdi_
.delete_StockGDI
5524 __del__
= lambda self
: None;
5525 def DeleteAll(*args
, **kwargs
):
5527 return _gdi_
.StockGDI_DeleteAll(*args
, **kwargs
)
5529 DeleteAll
= staticmethod(DeleteAll
)
5530 def instance(*args
, **kwargs
):
5531 """instance() -> StockGDI"""
5532 return _gdi_
.StockGDI_instance(*args
, **kwargs
)
5534 instance
= staticmethod(instance
)
5535 def GetBrush(*args
, **kwargs
):
5536 """GetBrush(int item) -> Brush"""
5537 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
5539 GetBrush
= staticmethod(GetBrush
)
5540 def GetColour(*args
, **kwargs
):
5541 """GetColour(int item) -> Colour"""
5542 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
5544 GetColour
= staticmethod(GetColour
)
5545 def GetCursor(*args
, **kwargs
):
5546 """GetCursor(int item) -> Cursor"""
5547 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
5549 GetCursor
= staticmethod(GetCursor
)
5550 def GetPen(*args
, **kwargs
):
5551 """GetPen(int item) -> Pen"""
5552 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
5554 GetPen
= staticmethod(GetPen
)
5555 def GetFont(*args
, **kwargs
):
5556 """GetFont(self, int item) -> Font"""
5557 return _gdi_
.StockGDI_GetFont(*args
, **kwargs
)
5559 def _initStockObjects():
5561 wx
.ITALIC_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_ITALIC
).this
5562 wx
.NORMAL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_NORMAL
).this
5563 wx
.SMALL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SMALL
).this
5564 wx
.SWISS_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SWISS
).this
5566 wx
.BLACK_DASHED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACKDASHED
).this
5567 wx
.BLACK_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACK
).this
5568 wx
.CYAN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_CYAN
).this
5569 wx
.GREEN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREEN
).this
5570 wx
.GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREY
).this
5571 wx
.LIGHT_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_LIGHTGREY
).this
5572 wx
.MEDIUM_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_MEDIUMGREY
).this
5573 wx
.RED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_RED
).this
5574 wx
.TRANSPARENT_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_TRANSPARENT
).this
5575 wx
.WHITE_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_WHITE
).this
5577 wx
.BLACK_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLACK
).this
5578 wx
.BLUE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLUE
).this
5579 wx
.CYAN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_CYAN
).this
5580 wx
.GREEN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREEN
).this
5581 wx
.GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREY
).this
5582 wx
.LIGHT_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_LIGHTGREY
).this
5583 wx
.MEDIUM_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_MEDIUMGREY
).this
5584 wx
.RED_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_RED
).this
5585 wx
.TRANSPARENT_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_TRANSPARENT
).this
5586 wx
.WHITE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_WHITE
).this
5588 wx
.BLACK
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLACK
).this
5589 wx
.BLUE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLUE
).this
5590 wx
.CYAN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_CYAN
).this
5591 wx
.GREEN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_GREEN
).this
5592 wx
.LIGHT_GREY
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_LIGHTGREY
).this
5593 wx
.RED
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_RED
).this
5594 wx
.WHITE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_WHITE
).this
5596 wx
.CROSS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_CROSS
).this
5597 wx
.HOURGLASS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_HOURGLASS
).this
5598 wx
.STANDARD_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_STANDARD
).this
5600 wx
.TheFontList
.this
= _wxPyInitTheFontList().this
5601 wx
.ThePenList
.this
= _wxPyInitThePenList().this
5602 wx
.TheBrushList
.this
= _wxPyInitTheBrushList().this
5603 wx
.TheColourDatabase
.this
= _wxPyInitTheColourDatabase().this
5606 _initStockObjects
= staticmethod(_initStockObjects
)
5608 _gdi_
.StockGDI_swigregister(StockGDI
)
5610 def StockGDI_DeleteAll(*args
):
5611 """StockGDI_DeleteAll()"""
5612 return _gdi_
.StockGDI_DeleteAll(*args
)
5614 def StockGDI_instance(*args
):
5615 """StockGDI_instance() -> StockGDI"""
5616 return _gdi_
.StockGDI_instance(*args
)
5618 def StockGDI_GetBrush(*args
, **kwargs
):
5619 """StockGDI_GetBrush(int item) -> Brush"""
5620 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
5622 def StockGDI_GetColour(*args
, **kwargs
):
5623 """StockGDI_GetColour(int item) -> Colour"""
5624 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
5626 def StockGDI_GetCursor(*args
, **kwargs
):
5627 """StockGDI_GetCursor(int item) -> Cursor"""
5628 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
5630 def StockGDI_GetPen(*args
, **kwargs
):
5631 """StockGDI_GetPen(int item) -> Pen"""
5632 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
5634 # Create an uninitialized instance for the stock objects, they will
5635 # be initialized later when the wx.App object is created.
5636 ITALIC_FONT
= Font
.__new
__(Font
)
5637 NORMAL_FONT
= Font
.__new
__(Font
)
5638 SMALL_FONT
= Font
.__new
__(Font
)
5639 SWISS_FONT
= Font
.__new
__(Font
)
5641 BLACK_DASHED_PEN
= Pen
.__new
__(Pen
)
5642 BLACK_PEN
= Pen
.__new
__(Pen
)
5643 CYAN_PEN
= Pen
.__new
__(Pen
)
5644 GREEN_PEN
= Pen
.__new
__(Pen
)
5645 GREY_PEN
= Pen
.__new
__(Pen
)
5646 LIGHT_GREY_PEN
= Pen
.__new
__(Pen
)
5647 MEDIUM_GREY_PEN
= Pen
.__new
__(Pen
)
5648 RED_PEN
= Pen
.__new
__(Pen
)
5649 TRANSPARENT_PEN
= Pen
.__new
__(Pen
)
5650 WHITE_PEN
= Pen
.__new
__(Pen
)
5652 BLACK_BRUSH
= Brush
.__new
__(Brush
)
5653 BLUE_BRUSH
= Brush
.__new
__(Brush
)
5654 CYAN_BRUSH
= Brush
.__new
__(Brush
)
5655 GREEN_BRUSH
= Brush
.__new
__(Brush
)
5656 GREY_BRUSH
= Brush
.__new
__(Brush
)
5657 LIGHT_GREY_BRUSH
= Brush
.__new
__(Brush
)
5658 MEDIUM_GREY_BRUSH
= Brush
.__new
__(Brush
)
5659 RED_BRUSH
= Brush
.__new
__(Brush
)
5660 TRANSPARENT_BRUSH
= Brush
.__new
__(Brush
)
5661 WHITE_BRUSH
= Brush
.__new
__(Brush
)
5663 BLACK
= Colour
.__new
__(Colour
)
5664 BLUE
= Colour
.__new
__(Colour
)
5665 CYAN
= Colour
.__new
__(Colour
)
5666 GREEN
= Colour
.__new
__(Colour
)
5667 LIGHT_GREY
= Colour
.__new
__(Colour
)
5668 RED
= Colour
.__new
__(Colour
)
5669 WHITE
= Colour
.__new
__(Colour
)
5671 CROSS_CURSOR
= Cursor
.__new
__(Cursor
)
5672 HOURGLASS_CURSOR
= Cursor
.__new
__(Cursor
)
5673 STANDARD_CURSOR
= Cursor
.__new
__(Cursor
)
5675 class GDIObjListBase(object):
5676 """Proxy of C++ GDIObjListBase class"""
5677 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5678 __repr__
= _swig_repr
5679 def __init__(self
, *args
, **kwargs
):
5680 """__init__(self) -> GDIObjListBase"""
5681 _gdi_
.GDIObjListBase_swiginit(self
,_gdi_
.new_GDIObjListBase(*args
, **kwargs
))
5682 __swig_destroy__
= _gdi_
.delete_GDIObjListBase
5683 __del__
= lambda self
: None;
5684 _gdi_
.GDIObjListBase_swigregister(GDIObjListBase
)
5686 NullBitmap
= cvar
.NullBitmap
5687 NullIcon
= cvar
.NullIcon
5688 NullCursor
= cvar
.NullCursor
5689 NullPen
= cvar
.NullPen
5690 NullBrush
= cvar
.NullBrush
5691 NullPalette
= cvar
.NullPalette
5692 NullFont
= cvar
.NullFont
5693 NullColour
= cvar
.NullColour
5695 class PenList(GDIObjListBase
):
5696 """Proxy of C++ PenList class"""
5697 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5698 def __init__(self
): raise AttributeError, "No constructor defined"
5699 __repr__
= _swig_repr
5700 def FindOrCreatePen(*args
, **kwargs
):
5701 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
5702 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
5704 def AddPen(*args
, **kwargs
):
5705 """AddPen(self, Pen pen)"""
5706 return _gdi_
.PenList_AddPen(*args
, **kwargs
)
5708 def RemovePen(*args
, **kwargs
):
5709 """RemovePen(self, Pen pen)"""
5710 return _gdi_
.PenList_RemovePen(*args
, **kwargs
)
5712 AddPen
= wx
._deprecated
(AddPen
)
5713 RemovePen
= wx
._deprecated
(RemovePen
)
5715 _gdi_
.PenList_swigregister(PenList
)
5717 class BrushList(GDIObjListBase
):
5718 """Proxy of C++ BrushList class"""
5719 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5720 def __init__(self
): raise AttributeError, "No constructor defined"
5721 __repr__
= _swig_repr
5722 def FindOrCreateBrush(*args
, **kwargs
):
5723 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
5724 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
5726 def AddBrush(*args
, **kwargs
):
5727 """AddBrush(self, Brush brush)"""
5728 return _gdi_
.BrushList_AddBrush(*args
, **kwargs
)
5730 def RemoveBrush(*args
, **kwargs
):
5731 """RemoveBrush(self, Brush brush)"""
5732 return _gdi_
.BrushList_RemoveBrush(*args
, **kwargs
)
5734 AddBrush
= wx
._deprecated
(AddBrush
)
5735 RemoveBrush
= wx
._deprecated
(RemoveBrush
)
5737 _gdi_
.BrushList_swigregister(BrushList
)
5739 class FontList(GDIObjListBase
):
5740 """Proxy of C++ FontList class"""
5741 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5742 def __init__(self
): raise AttributeError, "No constructor defined"
5743 __repr__
= _swig_repr
5744 def FindOrCreateFont(*args
, **kwargs
):
5746 FindOrCreateFont(self, int point_size, int family, int style, int weight,
5747 bool underline=False, String facename=EmptyString,
5748 int encoding=FONTENCODING_DEFAULT) -> Font
5750 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
5752 def AddFont(*args
, **kwargs
):
5753 """AddFont(self, Font font)"""
5754 return _gdi_
.FontList_AddFont(*args
, **kwargs
)
5756 def RemoveFont(*args
, **kwargs
):
5757 """RemoveFont(self, Font font)"""
5758 return _gdi_
.FontList_RemoveFont(*args
, **kwargs
)
5760 AddFont
= wx
._deprecated
(AddFont
)
5761 RemoveFont
= wx
._deprecated
(RemoveFont
)
5763 _gdi_
.FontList_swigregister(FontList
)
5765 class ColourDatabase(object):
5766 """Proxy of C++ ColourDatabase class"""
5767 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5768 __repr__
= _swig_repr
5769 def __init__(self
, *args
, **kwargs
):
5770 """__init__(self) -> ColourDatabase"""
5771 _gdi_
.ColourDatabase_swiginit(self
,_gdi_
.new_ColourDatabase(*args
, **kwargs
))
5772 __swig_destroy__
= _gdi_
.delete_ColourDatabase
5773 __del__
= lambda self
: None;
5774 def Find(*args
, **kwargs
):
5775 """Find(self, String name) -> Colour"""
5776 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
5778 def FindName(*args
, **kwargs
):
5779 """FindName(self, Colour colour) -> String"""
5780 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
5783 def AddColour(*args
, **kwargs
):
5784 """AddColour(self, String name, Colour colour)"""
5785 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
5787 def Append(*args
, **kwargs
):
5788 """Append(self, String name, int red, int green, int blue)"""
5789 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
5791 _gdi_
.ColourDatabase_swigregister(ColourDatabase
)
5793 #---------------------------------------------------------------------------
5796 def _wxPyInitTheFontList(*args
):
5797 """_wxPyInitTheFontList() -> FontList"""
5798 return _gdi_
._wxPyInitTheFontList
(*args
)
5800 def _wxPyInitThePenList(*args
):
5801 """_wxPyInitThePenList() -> PenList"""
5802 return _gdi_
._wxPyInitThePenList
(*args
)
5804 def _wxPyInitTheBrushList(*args
):
5805 """_wxPyInitTheBrushList() -> BrushList"""
5806 return _gdi_
._wxPyInitTheBrushList
(*args
)
5808 def _wxPyInitTheColourDatabase(*args
):
5809 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
5810 return _gdi_
._wxPyInitTheColourDatabase
(*args
)
5811 # Create an uninitialized instance for the stock objects, they will
5812 # be initialized later when the wx.App object is created.
5813 TheFontList
= FontList
.__new
__(FontList
)
5814 ThePenList
= PenList
.__new
__(PenList
)
5815 TheBrushList
= BrushList
.__new
__(BrushList
)
5816 TheColourDatabase
= ColourDatabase
.__new
__(ColourDatabase
)
5818 NullColor
= NullColour
5819 #---------------------------------------------------------------------------
5821 class Effects(_core
.Object
):
5822 """Proxy of C++ Effects class"""
5823 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5824 __repr__
= _swig_repr
5825 def __init__(self
, *args
, **kwargs
):
5826 """__init__(self) -> Effects"""
5827 _gdi_
.Effects_swiginit(self
,_gdi_
.new_Effects(*args
, **kwargs
))
5828 def GetHighlightColour(*args
, **kwargs
):
5829 """GetHighlightColour(self) -> Colour"""
5830 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
5832 def GetLightShadow(*args
, **kwargs
):
5833 """GetLightShadow(self) -> Colour"""
5834 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
5836 def GetFaceColour(*args
, **kwargs
):
5837 """GetFaceColour(self) -> Colour"""
5838 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
5840 def GetMediumShadow(*args
, **kwargs
):
5841 """GetMediumShadow(self) -> Colour"""
5842 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
5844 def GetDarkShadow(*args
, **kwargs
):
5845 """GetDarkShadow(self) -> Colour"""
5846 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
5848 def SetHighlightColour(*args
, **kwargs
):
5849 """SetHighlightColour(self, Colour c)"""
5850 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
5852 def SetLightShadow(*args
, **kwargs
):
5853 """SetLightShadow(self, Colour c)"""
5854 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
5856 def SetFaceColour(*args
, **kwargs
):
5857 """SetFaceColour(self, Colour c)"""
5858 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
5860 def SetMediumShadow(*args
, **kwargs
):
5861 """SetMediumShadow(self, Colour c)"""
5862 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
5864 def SetDarkShadow(*args
, **kwargs
):
5865 """SetDarkShadow(self, Colour c)"""
5866 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
5868 def Set(*args
, **kwargs
):
5870 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
5871 Colour mediumShadow, Colour darkShadow)
5873 return _gdi_
.Effects_Set(*args
, **kwargs
)
5875 def DrawSunkenEdge(*args
, **kwargs
):
5876 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
5877 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
5879 def TileBitmap(*args
, **kwargs
):
5880 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
5881 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
5883 DarkShadow
= property(GetDarkShadow
,SetDarkShadow
,doc
="See `GetDarkShadow` and `SetDarkShadow`")
5884 FaceColour
= property(GetFaceColour
,SetFaceColour
,doc
="See `GetFaceColour` and `SetFaceColour`")
5885 HighlightColour
= property(GetHighlightColour
,SetHighlightColour
,doc
="See `GetHighlightColour` and `SetHighlightColour`")
5886 LightShadow
= property(GetLightShadow
,SetLightShadow
,doc
="See `GetLightShadow` and `SetLightShadow`")
5887 MediumShadow
= property(GetMediumShadow
,SetMediumShadow
,doc
="See `GetMediumShadow` and `SetMediumShadow`")
5888 _gdi_
.Effects_swigregister(Effects
)
5890 #---------------------------------------------------------------------------
5892 CONTROL_DISABLED
= _gdi_
.CONTROL_DISABLED
5893 CONTROL_FOCUSED
= _gdi_
.CONTROL_FOCUSED
5894 CONTROL_PRESSED
= _gdi_
.CONTROL_PRESSED
5895 CONTROL_SPECIAL
= _gdi_
.CONTROL_SPECIAL
5896 CONTROL_ISDEFAULT
= _gdi_
.CONTROL_ISDEFAULT
5897 CONTROL_ISSUBMENU
= _gdi_
.CONTROL_ISSUBMENU
5898 CONTROL_EXPANDED
= _gdi_
.CONTROL_EXPANDED
5899 CONTROL_SIZEGRIP
= _gdi_
.CONTROL_SIZEGRIP
5900 CONTROL_CURRENT
= _gdi_
.CONTROL_CURRENT
5901 CONTROL_SELECTED
= _gdi_
.CONTROL_SELECTED
5902 CONTROL_CHECKED
= _gdi_
.CONTROL_CHECKED
5903 CONTROL_CHECKABLE
= _gdi_
.CONTROL_CHECKABLE
5904 CONTROL_UNDETERMINED
= _gdi_
.CONTROL_UNDETERMINED
5905 CONTROL_FLAGS_MASK
= _gdi_
.CONTROL_FLAGS_MASK
5906 CONTROL_DIRTY
= _gdi_
.CONTROL_DIRTY
5907 class SplitterRenderParams(object):
5909 This is just a simple struct used as a return value of
5910 `wx.RendererNative.GetSplitterParams` and contains some platform
5911 specific metrics about splitters.
5913 * widthSash: the width of the splitter sash.
5914 * border: the width of the border of the splitter window.
5915 * isHotSensitive: ``True`` if the splitter changes its
5916 appearance when the mouse is over it.
5920 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5921 __repr__
= _swig_repr
5922 def __init__(self
, *args
, **kwargs
):
5924 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
5926 This is just a simple struct used as a return value of
5927 `wx.RendererNative.GetSplitterParams` and contains some platform
5928 specific metrics about splitters.
5930 * widthSash: the width of the splitter sash.
5931 * border: the width of the border of the splitter window.
5932 * isHotSensitive: ``True`` if the splitter changes its
5933 appearance when the mouse is over it.
5937 _gdi_
.SplitterRenderParams_swiginit(self
,_gdi_
.new_SplitterRenderParams(*args
, **kwargs
))
5938 __swig_destroy__
= _gdi_
.delete_SplitterRenderParams
5939 __del__
= lambda self
: None;
5940 widthSash
= property(_gdi_
.SplitterRenderParams_widthSash_get
)
5941 border
= property(_gdi_
.SplitterRenderParams_border_get
)
5942 isHotSensitive
= property(_gdi_
.SplitterRenderParams_isHotSensitive_get
)
5943 _gdi_
.SplitterRenderParams_swigregister(SplitterRenderParams
)
5945 class HeaderButtonParams(object):
5946 """Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`"""
5947 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5948 __repr__
= _swig_repr
5949 def __init__(self
, *args
, **kwargs
):
5951 __init__(self) -> HeaderButtonParams
5953 Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`
5955 _gdi_
.HeaderButtonParams_swiginit(self
,_gdi_
.new_HeaderButtonParams(*args
, **kwargs
))
5956 __swig_destroy__
= _gdi_
.delete_HeaderButtonParams
5957 __del__
= lambda self
: None;
5958 m_arrowColour
= property(_gdi_
.HeaderButtonParams_m_arrowColour_get
, _gdi_
.HeaderButtonParams_m_arrowColour_set
)
5959 m_selectionColour
= property(_gdi_
.HeaderButtonParams_m_selectionColour_get
, _gdi_
.HeaderButtonParams_m_selectionColour_set
)
5960 m_labelText
= property(_gdi_
.HeaderButtonParams_m_labelText_get
, _gdi_
.HeaderButtonParams_m_labelText_set
)
5961 m_labelFont
= property(_gdi_
.HeaderButtonParams_m_labelFont_get
, _gdi_
.HeaderButtonParams_m_labelFont_set
)
5962 m_labelColour
= property(_gdi_
.HeaderButtonParams_m_labelColour_get
, _gdi_
.HeaderButtonParams_m_labelColour_set
)
5963 m_labelBitmap
= property(_gdi_
.HeaderButtonParams_m_labelBitmap_get
, _gdi_
.HeaderButtonParams_m_labelBitmap_set
)
5964 m_labelAlignment
= property(_gdi_
.HeaderButtonParams_m_labelAlignment_get
, _gdi_
.HeaderButtonParams_m_labelAlignment_set
)
5965 _gdi_
.HeaderButtonParams_swigregister(HeaderButtonParams
)
5967 HDR_SORT_ICON_NONE
= _gdi_
.HDR_SORT_ICON_NONE
5968 HDR_SORT_ICON_UP
= _gdi_
.HDR_SORT_ICON_UP
5969 HDR_SORT_ICON_DOWN
= _gdi_
.HDR_SORT_ICON_DOWN
5970 class RendererVersion(object):
5972 This simple struct represents the `wx.RendererNative` interface
5973 version and is only used as the return value of
5974 `wx.RendererNative.GetVersion`.
5976 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5977 __repr__
= _swig_repr
5978 def __init__(self
, *args
, **kwargs
):
5980 __init__(self, int version_, int age_) -> RendererVersion
5982 This simple struct represents the `wx.RendererNative` interface
5983 version and is only used as the return value of
5984 `wx.RendererNative.GetVersion`.
5986 _gdi_
.RendererVersion_swiginit(self
,_gdi_
.new_RendererVersion(*args
, **kwargs
))
5987 __swig_destroy__
= _gdi_
.delete_RendererVersion
5988 __del__
= lambda self
: None;
5989 Current_Version
= _gdi_
.RendererVersion_Current_Version
5990 Current_Age
= _gdi_
.RendererVersion_Current_Age
5991 def IsCompatible(*args
, **kwargs
):
5992 """IsCompatible(RendererVersion ver) -> bool"""
5993 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
5995 IsCompatible
= staticmethod(IsCompatible
)
5996 version
= property(_gdi_
.RendererVersion_version_get
)
5997 age
= property(_gdi_
.RendererVersion_age_get
)
5998 _gdi_
.RendererVersion_swigregister(RendererVersion
)
6000 def RendererVersion_IsCompatible(*args
, **kwargs
):
6001 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
6002 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
6004 class RendererNative(object):
6006 One of the design principles of wxWidgets is to use the native
6007 widgets on every platform in order to be as close as possible to
6008 the native look and feel on every platform. However there are
6009 still cases when some generic widgets are needed for various
6010 reasons, but it can sometimes take a lot of messy work to make
6011 them conform to the native LnF.
6013 The wx.RendererNative class is a collection of functions that have
6014 platform-specific implementations for drawing certain parts of
6015 genereic controls in ways that are as close to the native look as
6018 Note that each drawing function restores the `wx.DC` attributes if it
6019 changes them, so it is safe to assume that the same pen, brush and
6020 colours that were active before the call to this function are still in
6024 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6025 def __init__(self
): raise AttributeError, "No constructor defined"
6026 __repr__
= _swig_repr
6027 def DrawHeaderButton(*args
, **kwargs
):
6029 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6030 HeaderButtonParams params=None)
6032 Draw the header control button (such as what is used by `wx.ListCtrl`
6035 return _gdi_
.RendererNative_DrawHeaderButton(*args
, **kwargs
)
6037 def DrawHeaderButtonContents(*args
, **kwargs
):
6039 DrawHeaderButtonContents(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6040 HeaderButtonParams params=None)
6042 Draw the contents of a header control button, (label, sort
6043 arrows, etc.) Normally this is only called by `DrawHeaderButton`.
6045 return _gdi_
.RendererNative_DrawHeaderButtonContents(*args
, **kwargs
)
6047 def GetHeaderButtonHeight(*args
, **kwargs
):
6049 GetHeaderButtonHeight(self, Window win) -> int
6051 Returns the default height of a header button, either a fixed platform
6052 height if available, or a generic height based on the window's font.
6054 return _gdi_
.RendererNative_GetHeaderButtonHeight(*args
, **kwargs
)
6056 def DrawTreeItemButton(*args
, **kwargs
):
6058 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
6060 Draw the expanded/collapsed icon for a tree control item.
6062 return _gdi_
.RendererNative_DrawTreeItemButton(*args
, **kwargs
)
6064 def DrawSplitterBorder(*args
, **kwargs
):
6066 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
6068 Draw the border for a sash window: this border must be such that the
6069 sash drawn by `DrawSplitterSash` blends into it well.
6071 return _gdi_
.RendererNative_DrawSplitterBorder(*args
, **kwargs
)
6073 def DrawSplitterSash(*args
, **kwargs
):
6075 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
6078 Draw a sash. The orient parameter defines whether the sash should be
6079 vertical or horizontal and how the position should be interpreted.
6081 return _gdi_
.RendererNative_DrawSplitterSash(*args
, **kwargs
)
6083 def DrawComboBoxDropButton(*args
, **kwargs
):
6085 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
6087 Draw a button like the one used by `wx.ComboBox` to show a drop down
6088 window. The usual appearance is a downwards pointing arrow.
6090 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
6091 ``wx.CONTROL_CURRENT`` bits set.
6093 return _gdi_
.RendererNative_DrawComboBoxDropButton(*args
, **kwargs
)
6095 def DrawDropArrow(*args
, **kwargs
):
6097 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
6099 Draw a drop down arrow that is suitable for use outside a combo
6100 box. Arrow will have a transparent background.
6102 ``rect`` is not entirely filled by the arrow. Instead, you should use
6103 bounding rectangle of a drop down button which arrow matches the size
6104 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
6105 ``wx.CONTROL_CURRENT`` bit set.
6107 return _gdi_
.RendererNative_DrawDropArrow(*args
, **kwargs
)
6109 def DrawCheckBox(*args
, **kwargs
):
6111 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
6113 Draw a check button. Flags may use wx.CONTROL_CHECKED,
6114 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
6116 return _gdi_
.RendererNative_DrawCheckBox(*args
, **kwargs
)
6118 def DrawPushButton(*args
, **kwargs
):
6120 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
6122 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
6123 wx.CONTROL_ISDEFAULT
6125 return _gdi_
.RendererNative_DrawPushButton(*args
, **kwargs
)
6127 def DrawItemSelectionRect(*args
, **kwargs
):
6129 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
6131 Draw rectangle indicating that an item in e.g. a list control has been
6134 The flags parameter may be:
6136 ==================== ============================================
6137 wx.CONTROL_SELECTED item is selected, e.g. draw background
6138 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
6139 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
6140 background vs. grey otherwise
6141 ==================== ============================================
6144 return _gdi_
.RendererNative_DrawItemSelectionRect(*args
, **kwargs
)
6146 def GetSplitterParams(*args
, **kwargs
):
6148 GetSplitterParams(self, Window win) -> SplitterRenderParams
6150 Get the splitter parameters, see `wx.SplitterRenderParams`.
6152 return _gdi_
.RendererNative_GetSplitterParams(*args
, **kwargs
)
6154 def Get(*args
, **kwargs
):
6156 Get() -> RendererNative
6158 Return the currently used renderer
6160 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
6162 Get
= staticmethod(Get
)
6163 def GetGeneric(*args
, **kwargs
):
6165 GetGeneric() -> RendererNative
6167 Return the generic implementation of the renderer. Under some
6168 platforms, this is the default renderer implementation, others have
6169 platform-specific default renderer which can be retrieved by calling
6170 `wx.RendererNative.GetDefault`.
6172 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
6174 GetGeneric
= staticmethod(GetGeneric
)
6175 def GetDefault(*args
, **kwargs
):
6177 GetDefault() -> RendererNative
6179 Return the default (native) implementation for this platform -- this
6180 is also the one used by default but this may be changed by calling
6181 `wx.RendererNative.Set` in which case the return value of this method
6182 may be different from the return value of `wx.RendererNative.Get`.
6184 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
6186 GetDefault
= staticmethod(GetDefault
)
6187 def Set(*args
, **kwargs
):
6189 Set(RendererNative renderer) -> RendererNative
6191 Set the renderer to use, passing None reverts to using the default
6192 renderer. Returns the previous renderer used with Set or None.
6194 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
6196 Set
= staticmethod(Set
)
6197 def GetVersion(*args
, **kwargs
):
6199 GetVersion(self) -> RendererVersion
6201 Returns the version of the renderer. Will be used for ensuring
6202 compatibility of dynamically loaded renderers.
6204 return _gdi_
.RendererNative_GetVersion(*args
, **kwargs
)
6206 SplitterParams
= property(GetSplitterParams
,doc
="See `GetSplitterParams`")
6207 Version
= property(GetVersion
,doc
="See `GetVersion`")
6208 _gdi_
.RendererNative_swigregister(RendererNative
)
6210 def RendererNative_Get(*args
):
6212 RendererNative_Get() -> RendererNative
6214 Return the currently used renderer
6216 return _gdi_
.RendererNative_Get(*args
)
6218 def RendererNative_GetGeneric(*args
):
6220 RendererNative_GetGeneric() -> RendererNative
6222 Return the generic implementation of the renderer. Under some
6223 platforms, this is the default renderer implementation, others have
6224 platform-specific default renderer which can be retrieved by calling
6225 `wx.RendererNative.GetDefault`.
6227 return _gdi_
.RendererNative_GetGeneric(*args
)
6229 def RendererNative_GetDefault(*args
):
6231 RendererNative_GetDefault() -> RendererNative
6233 Return the default (native) implementation for this platform -- this
6234 is also the one used by default but this may be changed by calling
6235 `wx.RendererNative.Set` in which case the return value of this method
6236 may be different from the return value of `wx.RendererNative.Get`.
6238 return _gdi_
.RendererNative_GetDefault(*args
)
6240 def RendererNative_Set(*args
, **kwargs
):
6242 RendererNative_Set(RendererNative renderer) -> RendererNative
6244 Set the renderer to use, passing None reverts to using the default
6245 renderer. Returns the previous renderer used with Set or None.
6247 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
6249 #---------------------------------------------------------------------------
6251 class PseudoDC(_core
.Object
):
6253 A PseudoDC is an object that can be used as if it were a `wx.DC`. All
6254 commands issued to the PseudoDC are stored in a list. You can then
6255 play these commands back to a real DC object using the DrawToDC
6256 method. Commands in the command list are indexed by ID. You can use
6257 this to clear the operations associated with a single ID and then
6258 re-draw the object associated with that ID.
6260 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6261 __repr__
= _swig_repr
6262 def __init__(self
, *args
, **kwargs
):
6264 __init__(self) -> PseudoDC
6266 Constructs a new Pseudo device context for recording dc operations
6268 _gdi_
.PseudoDC_swiginit(self
,_gdi_
.new_PseudoDC(*args
, **kwargs
))
6269 def BeginDrawing(*args
, **kwargs
):
6273 Allows for optimization of drawing code on platforms that need it. On
6274 other platforms this is just an empty function and is harmless. To
6275 take advantage of this postential optimization simply enclose each
6276 group of calls to the drawing primitives within calls to
6277 `BeginDrawing` and `EndDrawing`.
6279 return _gdi_
.PseudoDC_BeginDrawing(*args
, **kwargs
)
6281 def EndDrawing(*args
, **kwargs
):
6285 Ends the group of drawing primitives started with `BeginDrawing`, and
6286 invokes whatever optimization is available for this DC type on the
6289 return _gdi_
.PseudoDC_EndDrawing(*args
, **kwargs
)
6291 __swig_destroy__
= _gdi_
.delete_PseudoDC
6292 __del__
= lambda self
: None;
6293 def RemoveAll(*args
, **kwargs
):
6297 Removes all objects and operations from the recorded list.
6299 return _gdi_
.PseudoDC_RemoveAll(*args
, **kwargs
)
6301 def GetLen(*args
, **kwargs
):
6305 Returns the number of operations in the recorded list.
6307 return _gdi_
.PseudoDC_GetLen(*args
, **kwargs
)
6309 def SetId(*args
, **kwargs
):
6313 Sets the id to be associated with subsequent operations.
6315 return _gdi_
.PseudoDC_SetId(*args
, **kwargs
)
6317 def ClearId(*args
, **kwargs
):
6319 ClearId(self, int id)
6321 Removes all operations associated with id so the object can be redrawn.
6323 return _gdi_
.PseudoDC_ClearId(*args
, **kwargs
)
6325 def RemoveId(*args
, **kwargs
):
6327 RemoveId(self, int id)
6329 Remove the object node (and all operations) associated with an id.
6331 return _gdi_
.PseudoDC_RemoveId(*args
, **kwargs
)
6333 def TranslateId(*args
, **kwargs
):
6335 TranslateId(self, int id, int dx, int dy)
6337 Translate the operations of id by dx,dy.
6339 return _gdi_
.PseudoDC_TranslateId(*args
, **kwargs
)
6341 def SetIdGreyedOut(*args
, **kwargs
):
6343 SetIdGreyedOut(self, int id, bool greyout=True)
6345 Set whether an object is drawn greyed out or not.
6347 return _gdi_
.PseudoDC_SetIdGreyedOut(*args
, **kwargs
)
6349 def GetIdGreyedOut(*args
, **kwargs
):
6351 GetIdGreyedOut(self, int id) -> bool
6353 Get whether an object is drawn greyed out or not.
6355 return _gdi_
.PseudoDC_GetIdGreyedOut(*args
, **kwargs
)
6357 def FindObjects(*args
, **kwargs
):
6359 FindObjects(self, int x, int y, int radius=1, wxColor bg=*wxWHITE) -> PyObject
6361 Returns a list of all the id's that draw a pixel with color
6362 not equal to bg within radius of (x,y).
6363 Returns an empty list if nothing is found. The list is in
6364 reverse drawing order so list[0] is the top id.
6366 return _gdi_
.PseudoDC_FindObjects(*args
, **kwargs
)
6368 def FindObjectsByBBox(*args
, **kwargs
):
6370 FindObjectsByBBox(self, int x, int y) -> PyObject
6372 Returns a list of all the id's whose bounding boxes include (x,y).
6373 Returns an empty list if nothing is found. The list is in
6374 reverse drawing order so list[0] is the top id.
6376 return _gdi_
.PseudoDC_FindObjectsByBBox(*args
, **kwargs
)
6378 def DrawIdToDC(*args
, **kwargs
):
6380 DrawIdToDC(self, int id, DC dc)
6382 Draw recorded operations of id to dc.
6384 return _gdi_
.PseudoDC_DrawIdToDC(*args
, **kwargs
)
6386 def SetIdBounds(*args
, **kwargs
):
6388 SetIdBounds(self, int id, Rect rect)
6390 Set the bounding rect of a given object. This will create
6391 an object node if one doesn't exist.
6393 return _gdi_
.PseudoDC_SetIdBounds(*args
, **kwargs
)
6395 def GetIdBounds(*args
, **kwargs
):
6397 GetIdBounds(self, int id) -> Rect
6399 Returns the bounding rectangle previouly set with SetIdBounds. If
6400 no bounds have been set, it returns wx.Rect(0,0,0,0).
6402 return _gdi_
.PseudoDC_GetIdBounds(*args
, **kwargs
)
6404 def DrawToDCClipped(*args
, **kwargs
):
6406 DrawToDCClipped(self, DC dc, Rect rect)
6408 Draws the recorded operations to dc unless the operation is known to
6411 return _gdi_
.PseudoDC_DrawToDCClipped(*args
, **kwargs
)
6413 def DrawToDCClippedRgn(*args
, **kwargs
):
6415 DrawToDCClippedRgn(self, DC dc, Region region)
6417 Draws the recorded operations to dc unless the operation is known to
6420 return _gdi_
.PseudoDC_DrawToDCClippedRgn(*args
, **kwargs
)
6422 def DrawToDC(*args
, **kwargs
):
6424 DrawToDC(self, DC dc)
6426 Draws the recorded operations to dc.
6428 return _gdi_
.PseudoDC_DrawToDC(*args
, **kwargs
)
6430 def FloodFill(*args
, **kwargs
):
6432 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
6434 Flood fills the device context starting from the given point, using
6435 the current brush colour, and using a style:
6437 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
6438 the given colour is encountered.
6440 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
6443 Returns False if the operation failed.
6445 Note: The present implementation for non-Windows platforms may fail to
6446 find colour borders if the pixels do not match the colour
6447 exactly. However the function will still return true.
6449 return _gdi_
.PseudoDC_FloodFill(*args
, **kwargs
)
6451 def FloodFillPoint(*args
, **kwargs
):
6453 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
6455 Flood fills the device context starting from the given point, using
6456 the current brush colour, and using a style:
6458 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
6459 the given colour is encountered.
6461 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
6464 Returns False if the operation failed.
6466 Note: The present implementation for non-Windows platforms may fail to
6467 find colour borders if the pixels do not match the colour
6468 exactly. However the function will still return true.
6470 return _gdi_
.PseudoDC_FloodFillPoint(*args
, **kwargs
)
6472 def DrawLine(*args
, **kwargs
):
6474 DrawLine(self, int x1, int y1, int x2, int y2)
6476 Draws a line from the first point to the second. The current pen is
6477 used for drawing the line. Note that the second point is *not* part of
6478 the line and is not drawn by this function (this is consistent with
6479 the behaviour of many other toolkits).
6481 return _gdi_
.PseudoDC_DrawLine(*args
, **kwargs
)
6483 def DrawLinePoint(*args
, **kwargs
):
6485 DrawLinePoint(self, Point pt1, Point pt2)
6487 Draws a line from the first point to the second. The current pen is
6488 used for drawing the line. Note that the second point is *not* part of
6489 the line and is not drawn by this function (this is consistent with
6490 the behaviour of many other toolkits).
6492 return _gdi_
.PseudoDC_DrawLinePoint(*args
, **kwargs
)
6494 def CrossHair(*args
, **kwargs
):
6496 CrossHair(self, int x, int y)
6498 Displays a cross hair using the current pen. This is a vertical and
6499 horizontal line the height and width of the window, centred on the
6502 return _gdi_
.PseudoDC_CrossHair(*args
, **kwargs
)
6504 def CrossHairPoint(*args
, **kwargs
):
6506 CrossHairPoint(self, Point pt)
6508 Displays a cross hair using the current pen. This is a vertical and
6509 horizontal line the height and width of the window, centred on the
6512 return _gdi_
.PseudoDC_CrossHairPoint(*args
, **kwargs
)
6514 def DrawArc(*args
, **kwargs
):
6516 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
6518 Draws an arc of a circle, centred on the *center* point (xc, yc), from
6519 the first point to the second. The current pen is used for the outline
6520 and the current brush for filling the shape.
6522 The arc is drawn in an anticlockwise direction from the start point to
6525 return _gdi_
.PseudoDC_DrawArc(*args
, **kwargs
)
6527 def DrawArcPoint(*args
, **kwargs
):
6529 DrawArcPoint(self, Point pt1, Point pt2, Point center)
6531 Draws an arc of a circle, centred on the *center* point (xc, yc), from
6532 the first point to the second. The current pen is used for the outline
6533 and the current brush for filling the shape.
6535 The arc is drawn in an anticlockwise direction from the start point to
6538 return _gdi_
.PseudoDC_DrawArcPoint(*args
, **kwargs
)
6540 def DrawCheckMark(*args
, **kwargs
):
6542 DrawCheckMark(self, int x, int y, int width, int height)
6544 Draws a check mark inside the given rectangle.
6546 return _gdi_
.PseudoDC_DrawCheckMark(*args
, **kwargs
)
6548 def DrawCheckMarkRect(*args
, **kwargs
):
6550 DrawCheckMarkRect(self, Rect rect)
6552 Draws a check mark inside the given rectangle.
6554 return _gdi_
.PseudoDC_DrawCheckMarkRect(*args
, **kwargs
)
6556 def DrawEllipticArc(*args
, **kwargs
):
6558 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
6560 Draws an arc of an ellipse, with the given rectangle defining the
6561 bounds of the ellipse. The current pen is used for drawing the arc and
6562 the current brush is used for drawing the pie.
6564 The *start* and *end* parameters specify the start and end of the arc
6565 relative to the three-o'clock position from the center of the
6566 rectangle. Angles are specified in degrees (360 is a complete
6567 circle). Positive values mean counter-clockwise motion. If start is
6568 equal to end, a complete ellipse will be drawn.
6570 return _gdi_
.PseudoDC_DrawEllipticArc(*args
, **kwargs
)
6572 def DrawEllipticArcPointSize(*args
, **kwargs
):
6574 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
6576 Draws an arc of an ellipse, with the given rectangle defining the
6577 bounds of the ellipse. The current pen is used for drawing the arc and
6578 the current brush is used for drawing the pie.
6580 The *start* and *end* parameters specify the start and end of the arc
6581 relative to the three-o'clock position from the center of the
6582 rectangle. Angles are specified in degrees (360 is a complete
6583 circle). Positive values mean counter-clockwise motion. If start is
6584 equal to end, a complete ellipse will be drawn.
6586 return _gdi_
.PseudoDC_DrawEllipticArcPointSize(*args
, **kwargs
)
6588 def DrawPoint(*args
, **kwargs
):
6590 DrawPoint(self, int x, int y)
6592 Draws a point using the current pen.
6594 return _gdi_
.PseudoDC_DrawPoint(*args
, **kwargs
)
6596 def DrawPointPoint(*args
, **kwargs
):
6598 DrawPointPoint(self, Point pt)
6600 Draws a point using the current pen.
6602 return _gdi_
.PseudoDC_DrawPointPoint(*args
, **kwargs
)
6604 def DrawRectangle(*args
, **kwargs
):
6606 DrawRectangle(self, int x, int y, int width, int height)
6608 Draws a rectangle with the given top left corner, and with the given
6609 size. The current pen is used for the outline and the current brush
6610 for filling the shape.
6612 return _gdi_
.PseudoDC_DrawRectangle(*args
, **kwargs
)
6614 def DrawRectangleRect(*args
, **kwargs
):
6616 DrawRectangleRect(self, Rect rect)
6618 Draws a rectangle with the given top left corner, and with the given
6619 size. The current pen is used for the outline and the current brush
6620 for filling the shape.
6622 return _gdi_
.PseudoDC_DrawRectangleRect(*args
, **kwargs
)
6624 def DrawRectanglePointSize(*args
, **kwargs
):
6626 DrawRectanglePointSize(self, Point pt, Size sz)
6628 Draws a rectangle with the given top left corner, and with the given
6629 size. The current pen is used for the outline and the current brush
6630 for filling the shape.
6632 return _gdi_
.PseudoDC_DrawRectanglePointSize(*args
, **kwargs
)
6634 def DrawRoundedRectangle(*args
, **kwargs
):
6636 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
6638 Draws a rectangle with the given top left corner, and with the given
6639 size. The corners are quarter-circles using the given radius. The
6640 current pen is used for the outline and the current brush for filling
6643 If radius is positive, the value is assumed to be the radius of the
6644 rounded corner. If radius is negative, the absolute value is assumed
6645 to be the proportion of the smallest dimension of the rectangle. This
6646 means that the corner can be a sensible size relative to the size of
6647 the rectangle, and also avoids the strange effects X produces when the
6648 corners are too big for the rectangle.
6650 return _gdi_
.PseudoDC_DrawRoundedRectangle(*args
, **kwargs
)
6652 def DrawRoundedRectangleRect(*args
, **kwargs
):
6654 DrawRoundedRectangleRect(self, Rect r, double radius)
6656 Draws a rectangle with the given top left corner, and with the given
6657 size. The corners are quarter-circles using the given radius. The
6658 current pen is used for the outline and the current brush for filling
6661 If radius is positive, the value is assumed to be the radius of the
6662 rounded corner. If radius is negative, the absolute value is assumed
6663 to be the proportion of the smallest dimension of the rectangle. This
6664 means that the corner can be a sensible size relative to the size of
6665 the rectangle, and also avoids the strange effects X produces when the
6666 corners are too big for the rectangle.
6668 return _gdi_
.PseudoDC_DrawRoundedRectangleRect(*args
, **kwargs
)
6670 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
6672 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
6674 Draws a rectangle with the given top left corner, and with the given
6675 size. The corners are quarter-circles using the given radius. The
6676 current pen is used for the outline and the current brush for filling
6679 If radius is positive, the value is assumed to be the radius of the
6680 rounded corner. If radius is negative, the absolute value is assumed
6681 to be the proportion of the smallest dimension of the rectangle. This
6682 means that the corner can be a sensible size relative to the size of
6683 the rectangle, and also avoids the strange effects X produces when the
6684 corners are too big for the rectangle.
6686 return _gdi_
.PseudoDC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
6688 def DrawCircle(*args
, **kwargs
):
6690 DrawCircle(self, int x, int y, int radius)
6692 Draws a circle with the given center point and radius. The current
6693 pen is used for the outline and the current brush for filling the
6698 return _gdi_
.PseudoDC_DrawCircle(*args
, **kwargs
)
6700 def DrawCirclePoint(*args
, **kwargs
):
6702 DrawCirclePoint(self, Point pt, int radius)
6704 Draws a circle with the given center point and radius. The current
6705 pen is used for the outline and the current brush for filling the
6710 return _gdi_
.PseudoDC_DrawCirclePoint(*args
, **kwargs
)
6712 def DrawEllipse(*args
, **kwargs
):
6714 DrawEllipse(self, int x, int y, int width, int height)
6716 Draws an ellipse contained in the specified rectangle. The current pen
6717 is used for the outline and the current brush for filling the shape.
6721 return _gdi_
.PseudoDC_DrawEllipse(*args
, **kwargs
)
6723 def DrawEllipseRect(*args
, **kwargs
):
6725 DrawEllipseRect(self, Rect rect)
6727 Draws an ellipse contained in the specified rectangle. The current pen
6728 is used for the outline and the current brush for filling the shape.
6732 return _gdi_
.PseudoDC_DrawEllipseRect(*args
, **kwargs
)
6734 def DrawEllipsePointSize(*args
, **kwargs
):
6736 DrawEllipsePointSize(self, Point pt, Size sz)
6738 Draws an ellipse contained in the specified rectangle. The current pen
6739 is used for the outline and the current brush for filling the shape.
6743 return _gdi_
.PseudoDC_DrawEllipsePointSize(*args
, **kwargs
)
6745 def DrawIcon(*args
, **kwargs
):
6747 DrawIcon(self, Icon icon, int x, int y)
6749 Draw an icon on the display (does nothing if the device context is
6750 PostScript). This can be the simplest way of drawing bitmaps on a
6753 return _gdi_
.PseudoDC_DrawIcon(*args
, **kwargs
)
6755 def DrawIconPoint(*args
, **kwargs
):
6757 DrawIconPoint(self, Icon icon, Point pt)
6759 Draw an icon on the display (does nothing if the device context is
6760 PostScript). This can be the simplest way of drawing bitmaps on a
6763 return _gdi_
.PseudoDC_DrawIconPoint(*args
, **kwargs
)
6765 def DrawBitmap(*args
, **kwargs
):
6767 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
6769 Draw a bitmap on the device context at the specified point. If
6770 *transparent* is true and the bitmap has a transparency mask, (or
6771 alpha channel on the platforms that support it) then the bitmap will
6772 be drawn transparently.
6774 When drawing a mono-bitmap, the current text foreground colour will be
6775 used to draw the foreground of the bitmap (all bits set to 1), and the
6776 current text background colour to draw the background (all bits set to
6779 :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`
6781 return _gdi_
.PseudoDC_DrawBitmap(*args
, **kwargs
)
6783 def DrawBitmapPoint(*args
, **kwargs
):
6785 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
6787 Draw a bitmap on the device context at the specified point. If
6788 *transparent* is true and the bitmap has a transparency mask, (or
6789 alpha channel on the platforms that support it) then the bitmap will
6790 be drawn transparently.
6792 When drawing a mono-bitmap, the current text foreground colour will be
6793 used to draw the foreground of the bitmap (all bits set to 1), and the
6794 current text background colour to draw the background (all bits set to
6797 :see: `SetTextForeground`, `SetTextBackground` and `wx.MemoryDC`
6799 return _gdi_
.PseudoDC_DrawBitmapPoint(*args
, **kwargs
)
6801 def DrawText(*args
, **kwargs
):
6803 DrawText(self, String text, int x, int y)
6805 Draws a text string at the specified point, using the current text
6806 font, and the current text foreground and background colours.
6808 The coordinates refer to the top-left corner of the rectangle bounding
6809 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
6810 a text string, which can be used to position the text more precisely,
6811 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
6814 **NOTE**: under wxGTK the current logical function is used by this
6815 function but it is ignored by wxMSW. Thus, you should avoid using
6816 logical functions with this function in portable programs.
6818 :see: `DrawRotatedText`
6820 return _gdi_
.PseudoDC_DrawText(*args
, **kwargs
)
6822 def DrawTextPoint(*args
, **kwargs
):
6824 DrawTextPoint(self, String text, Point pt)
6826 Draws a text string at the specified point, using the current text
6827 font, and the current text foreground and background colours.
6829 The coordinates refer to the top-left corner of the rectangle bounding
6830 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
6831 a text string, which can be used to position the text more precisely,
6832 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
6835 **NOTE**: under wxGTK the current logical function is used by this
6836 function but it is ignored by wxMSW. Thus, you should avoid using
6837 logical functions with this function in portable programs.
6839 :see: `DrawRotatedText`
6841 return _gdi_
.PseudoDC_DrawTextPoint(*args
, **kwargs
)
6843 def DrawRotatedText(*args
, **kwargs
):
6845 DrawRotatedText(self, String text, int x, int y, double angle)
6847 Draws the text rotated by *angle* degrees, if supported by the platform.
6849 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6850 function. In particular, a font different from ``wx.NORMAL_FONT``
6851 should be used as the it is not normally a TrueType
6852 font. ``wx.SWISS_FONT`` is an example of a font which is.
6856 return _gdi_
.PseudoDC_DrawRotatedText(*args
, **kwargs
)
6858 def DrawRotatedTextPoint(*args
, **kwargs
):
6860 DrawRotatedTextPoint(self, String text, Point pt, double angle)
6862 Draws the text rotated by *angle* degrees, if supported by the platform.
6864 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6865 function. In particular, a font different from ``wx.NORMAL_FONT``
6866 should be used as the it is not normally a TrueType
6867 font. ``wx.SWISS_FONT`` is an example of a font which is.
6871 return _gdi_
.PseudoDC_DrawRotatedTextPoint(*args
, **kwargs
)
6873 def DrawLines(*args
, **kwargs
):
6875 DrawLines(self, List points, int xoffset=0, int yoffset=0)
6877 Draws lines using a sequence of `wx.Point` objects, adding the
6878 optional offset coordinate. The current pen is used for drawing the
6881 return _gdi_
.PseudoDC_DrawLines(*args
, **kwargs
)
6883 def DrawPolygon(*args
, **kwargs
):
6885 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
6886 int fillStyle=ODDEVEN_RULE)
6888 Draws a filled polygon using a sequence of `wx.Point` objects, adding
6889 the optional offset coordinate. The last argument specifies the fill
6890 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
6892 The current pen is used for drawing the outline, and the current brush
6893 for filling the shape. Using a transparent brush suppresses
6894 filling. Note that wxWidgets automatically closes the first and last
6897 return _gdi_
.PseudoDC_DrawPolygon(*args
, **kwargs
)
6899 def DrawLabel(*args
, **kwargs
):
6901 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6904 Draw *text* within the specified rectangle, abiding by the alignment
6905 flags. Will additionally emphasize the character at *indexAccel* if
6908 :see: `DrawImageLabel`
6910 return _gdi_
.PseudoDC_DrawLabel(*args
, **kwargs
)
6912 def DrawImageLabel(*args
, **kwargs
):
6914 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6917 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
6918 drawing it) within the specified rectangle, abiding by the alignment
6919 flags. Will additionally emphasize the character at *indexAccel* if
6922 return _gdi_
.PseudoDC_DrawImageLabel(*args
, **kwargs
)
6924 def DrawSpline(*args
, **kwargs
):
6926 DrawSpline(self, List points)
6928 Draws a spline between all given control points, (a list of `wx.Point`
6929 objects) using the current pen. The spline is drawn using a series of
6930 lines, using an algorithm taken from the X drawing program 'XFIG'.
6932 return _gdi_
.PseudoDC_DrawSpline(*args
, **kwargs
)
6934 def Clear(*args
, **kwargs
):
6938 Clears the device context using the current background brush.
6940 return _gdi_
.PseudoDC_Clear(*args
, **kwargs
)
6942 def SetFont(*args
, **kwargs
):
6944 SetFont(self, Font font)
6946 Sets the current font for the DC. It must be a valid font, in
6947 particular you should not pass ``wx.NullFont`` to this method.
6951 return _gdi_
.PseudoDC_SetFont(*args
, **kwargs
)
6953 def SetPen(*args
, **kwargs
):
6955 SetPen(self, Pen pen)
6957 Sets the current pen for the DC.
6959 If the argument is ``wx.NullPen``, the current pen is selected out of the
6960 device context, and the original pen restored.
6964 return _gdi_
.PseudoDC_SetPen(*args
, **kwargs
)
6966 def SetBrush(*args
, **kwargs
):
6968 SetBrush(self, Brush brush)
6970 Sets the current brush for the DC.
6972 If the argument is ``wx.NullBrush``, the current brush is selected out
6973 of the device context, and the original brush restored, allowing the
6974 current brush to be destroyed safely.
6978 return _gdi_
.PseudoDC_SetBrush(*args
, **kwargs
)
6980 def SetBackground(*args
, **kwargs
):
6982 SetBackground(self, Brush brush)
6984 Sets the current background brush for the DC.
6986 return _gdi_
.PseudoDC_SetBackground(*args
, **kwargs
)
6988 def SetBackgroundMode(*args
, **kwargs
):
6990 SetBackgroundMode(self, int mode)
6992 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
6993 determines whether text will be drawn with a background colour or
6996 return _gdi_
.PseudoDC_SetBackgroundMode(*args
, **kwargs
)
6998 def SetPalette(*args
, **kwargs
):
7000 SetPalette(self, Palette palette)
7002 If this is a window DC or memory DC, assigns the given palette to the
7003 window or bitmap associated with the DC. If the argument is
7004 ``wx.NullPalette``, the current palette is selected out of the device
7005 context, and the original palette restored.
7009 return _gdi_
.PseudoDC_SetPalette(*args
, **kwargs
)
7011 def SetTextForeground(*args
, **kwargs
):
7013 SetTextForeground(self, Colour colour)
7015 Sets the current text foreground colour for the DC.
7017 return _gdi_
.PseudoDC_SetTextForeground(*args
, **kwargs
)
7019 def SetTextBackground(*args
, **kwargs
):
7021 SetTextBackground(self, Colour colour)
7023 Sets the current text background colour for the DC.
7025 return _gdi_
.PseudoDC_SetTextBackground(*args
, **kwargs
)
7027 def SetLogicalFunction(*args
, **kwargs
):
7029 SetLogicalFunction(self, int function)
7031 Sets the current logical function for the device context. This
7032 determines how a source pixel (from a pen or brush colour, combines
7033 with a destination pixel in the current device context.
7035 The possible values and their meaning in terms of source and
7036 destination pixel values are as follows:
7038 ================ ==========================
7040 wx.AND_INVERT (NOT src) AND dst
7041 wx.AND_REVERSE src AND (NOT dst)
7044 wx.EQUIV (NOT src) XOR dst
7046 wx.NAND (NOT src) OR (NOT dst)
7047 wx.NOR (NOT src) AND (NOT dst)
7050 wx.OR_INVERT (NOT src) OR dst
7051 wx.OR_REVERSE src OR (NOT dst)
7053 wx.SRC_INVERT NOT src
7055 ================ ==========================
7057 The default is wx.COPY, which simply draws with the current
7058 colour. The others combine the current colour and the background using
7059 a logical operation. wx.INVERT is commonly used for drawing rubber
7060 bands or moving outlines, since drawing twice reverts to the original
7064 return _gdi_
.PseudoDC_SetLogicalFunction(*args
, **kwargs
)
7066 IdBounds
= property(GetIdBounds
,SetIdBounds
,doc
="See `GetIdBounds` and `SetIdBounds`")
7067 Len
= property(GetLen
,doc
="See `GetLen`")
7068 _gdi_
.PseudoDC_swigregister(PseudoDC
)