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 Ok(*args
, **kwargs
):
153 Returns True if the colour object is valid (the colour has been
154 initialised with RGB values).
156 return _gdi_
.Colour_Ok(*args
, **kwargs
)
158 def Set(*args
, **kwargs
):
160 Set(self, byte red, byte green, byte blue, byte alpha=ALPHA_OPAQUE)
162 Sets the RGB intensity values.
164 return _gdi_
.Colour_Set(*args
, **kwargs
)
166 def SetRGB(*args
, **kwargs
):
168 SetRGB(self, unsigned long colRGB)
170 Sets the RGB intensity values from a packed RGB value.
172 return _gdi_
.Colour_SetRGB(*args
, **kwargs
)
174 def SetFromName(*args
, **kwargs
):
176 SetFromName(self, String colourName)
178 Sets the RGB intensity values using a colour name listed in
179 ``wx.TheColourDatabase``.
181 return _gdi_
.Colour_SetFromName(*args
, **kwargs
)
183 def GetAsString(*args
, **kwargs
):
185 GetAsString(self, long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) -> String
187 Return the colour as a string. Acceptable flags are:
189 =================== ==================================
190 wx.C2S_NAME return colour name, when possible
191 wx.C2S_CSS_SYNTAX return colour in rgb(r,g,b) syntax
192 wx.C2S_HTML_SYNTAX return colour in #rrggbb syntax
193 =================== ==================================
195 return _gdi_
.Colour_GetAsString(*args
, **kwargs
)
197 def GetPixel(*args
, **kwargs
):
199 GetPixel(self) -> long
201 Returns a pixel value which is platform-dependent. On Windows, a
202 COLORREF is returned. On X, an allocated pixel value is returned. -1
203 is returned if the pixel is invalid (on X, unallocated).
205 return _gdi_
.Colour_GetPixel(*args
, **kwargs
)
207 def __eq__(*args
, **kwargs
):
209 __eq__(self, PyObject other) -> bool
211 Compare colours for equality.
213 return _gdi_
.Colour___eq__(*args
, **kwargs
)
215 def __ne__(*args
, **kwargs
):
217 __ne__(self, PyObject other) -> bool
219 Compare colours for inequality.
221 return _gdi_
.Colour___ne__(*args
, **kwargs
)
223 def Get(*args
, **kwargs
):
227 Returns the RGB intensity values as a tuple.
229 return _gdi_
.Colour_Get(*args
, **kwargs
)
231 def GetRGB(*args
, **kwargs
):
233 GetRGB(self) -> unsigned long
235 Return the colour as a packed RGB value
237 return _gdi_
.Colour_GetRGB(*args
, **kwargs
)
239 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
240 def __str__(self
): return str(self
.Get(True))
241 def __repr__(self
): return 'wx.Colour' + str(self
.Get(True))
242 def __nonzero__(self
): return self
.Ok()
243 __safe_for_unpickling__
= True
244 def __reduce__(self
): return (Colour
, self
.Get(True))
246 Pixel
= property(GetPixel
,doc
="See `GetPixel`")
247 RGB
= property(GetRGB
,SetRGB
,doc
="See `GetRGB` and `SetRGB`")
248 _gdi_
.Colour_swigregister(Colour
)
250 def NamedColour(*args
, **kwargs
):
252 NamedColour(String colorName) -> Colour
254 Constructs a colour object using a colour name listed in
255 ``wx.TheColourDatabase``.
257 val
= _gdi_
.new_NamedColour(*args
, **kwargs
)
260 def ColourRGB(*args
, **kwargs
):
262 ColourRGB(unsigned long colRGB) -> Colour
264 Constructs a colour from a packed RGB value.
266 val
= _gdi_
.new_ColourRGB(*args
, **kwargs
)
270 NamedColor
= NamedColour
273 class Palette(GDIObject
):
274 """Proxy of C++ Palette class"""
275 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
276 __repr__
= _swig_repr
277 def __init__(self
, *args
, **kwargs
):
278 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
279 _gdi_
.Palette_swiginit(self
,_gdi_
.new_Palette(*args
, **kwargs
))
280 __swig_destroy__
= _gdi_
.delete_Palette
281 __del__
= lambda self
: None;
282 def GetPixel(*args
, **kwargs
):
283 """GetPixel(self, byte red, byte green, byte blue) -> int"""
284 return _gdi_
.Palette_GetPixel(*args
, **kwargs
)
286 def GetRGB(*args
, **kwargs
):
287 """GetRGB(self, int pixel) -> (R,G,B)"""
288 return _gdi_
.Palette_GetRGB(*args
, **kwargs
)
290 def GetColoursCount(*args
, **kwargs
):
291 """GetColoursCount(self) -> int"""
292 return _gdi_
.Palette_GetColoursCount(*args
, **kwargs
)
294 def Ok(*args
, **kwargs
):
295 """Ok(self) -> bool"""
296 return _gdi_
.Palette_Ok(*args
, **kwargs
)
298 def __nonzero__(self
): return self
.Ok()
299 _gdi_
.Palette_swigregister(Palette
)
301 #---------------------------------------------------------------------------
303 class Pen(GDIObject
):
304 """Proxy of C++ Pen class"""
305 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
306 __repr__
= _swig_repr
307 def __init__(self
, *args
, **kwargs
):
308 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
309 _gdi_
.Pen_swiginit(self
,_gdi_
.new_Pen(*args
, **kwargs
))
310 __swig_destroy__
= _gdi_
.delete_Pen
311 __del__
= lambda self
: None;
312 def GetCap(*args
, **kwargs
):
313 """GetCap(self) -> int"""
314 return _gdi_
.Pen_GetCap(*args
, **kwargs
)
316 def GetColour(*args
, **kwargs
):
317 """GetColour(self) -> Colour"""
318 return _gdi_
.Pen_GetColour(*args
, **kwargs
)
320 def GetJoin(*args
, **kwargs
):
321 """GetJoin(self) -> int"""
322 return _gdi_
.Pen_GetJoin(*args
, **kwargs
)
324 def GetStyle(*args
, **kwargs
):
325 """GetStyle(self) -> int"""
326 return _gdi_
.Pen_GetStyle(*args
, **kwargs
)
328 def GetWidth(*args
, **kwargs
):
329 """GetWidth(self) -> int"""
330 return _gdi_
.Pen_GetWidth(*args
, **kwargs
)
332 def Ok(*args
, **kwargs
):
333 """Ok(self) -> bool"""
334 return _gdi_
.Pen_Ok(*args
, **kwargs
)
336 def SetCap(*args
, **kwargs
):
337 """SetCap(self, int cap_style)"""
338 return _gdi_
.Pen_SetCap(*args
, **kwargs
)
340 def SetColour(*args
, **kwargs
):
341 """SetColour(self, Colour colour)"""
342 return _gdi_
.Pen_SetColour(*args
, **kwargs
)
344 def SetJoin(*args
, **kwargs
):
345 """SetJoin(self, int join_style)"""
346 return _gdi_
.Pen_SetJoin(*args
, **kwargs
)
348 def SetStyle(*args
, **kwargs
):
349 """SetStyle(self, int style)"""
350 return _gdi_
.Pen_SetStyle(*args
, **kwargs
)
352 def SetWidth(*args
, **kwargs
):
353 """SetWidth(self, int width)"""
354 return _gdi_
.Pen_SetWidth(*args
, **kwargs
)
356 def SetDashes(*args
, **kwargs
):
357 """SetDashes(self, int dashes)"""
358 return _gdi_
.Pen_SetDashes(*args
, **kwargs
)
360 def GetDashes(*args
, **kwargs
):
361 """GetDashes(self) -> PyObject"""
362 return _gdi_
.Pen_GetDashes(*args
, **kwargs
)
364 def _SetDashes(*args
, **kwargs
):
365 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
366 return _gdi_
.Pen__SetDashes(*args
, **kwargs
)
368 def SetDashes(self
, dashes
):
370 Associate a list of dash lengths with the Pen.
372 self
._SetDashes
(self
, dashes
)
374 def __eq__(*args
, **kwargs
):
375 """__eq__(self, Pen other) -> bool"""
376 return _gdi_
.Pen___eq__(*args
, **kwargs
)
378 def __ne__(*args
, **kwargs
):
379 """__ne__(self, Pen other) -> bool"""
380 return _gdi_
.Pen___ne__(*args
, **kwargs
)
382 def __nonzero__(self
): return self
.Ok()
383 _gdi_
.Pen_swigregister(Pen
)
385 #---------------------------------------------------------------------------
387 class Brush(GDIObject
):
389 A brush is a drawing tool for filling in areas. It is used for
390 painting the background of rectangles, ellipses, etc. when drawing on
391 a `wx.DC`. It has a colour and a style.
393 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
394 __repr__
= _swig_repr
395 def __init__(self
, *args
, **kwargs
):
397 __init__(self, Colour colour, int style=SOLID) -> Brush
399 Constructs a brush from a `wx.Colour` object and a style.
401 _gdi_
.Brush_swiginit(self
,_gdi_
.new_Brush(*args
, **kwargs
))
402 __swig_destroy__
= _gdi_
.delete_Brush
403 __del__
= lambda self
: None;
404 def SetColour(*args
, **kwargs
):
406 SetColour(self, Colour col)
408 Set the brush's `wx.Colour`.
410 return _gdi_
.Brush_SetColour(*args
, **kwargs
)
412 def SetStyle(*args
, **kwargs
):
414 SetStyle(self, int style)
416 Sets the style of the brush. See `__init__` for a listing of styles.
418 return _gdi_
.Brush_SetStyle(*args
, **kwargs
)
420 def SetStipple(*args
, **kwargs
):
422 SetStipple(self, Bitmap stipple)
424 Sets the stipple `wx.Bitmap`.
426 return _gdi_
.Brush_SetStipple(*args
, **kwargs
)
428 def GetColour(*args
, **kwargs
):
430 GetColour(self) -> Colour
432 Returns the `wx.Colour` of the brush.
434 return _gdi_
.Brush_GetColour(*args
, **kwargs
)
436 def GetStyle(*args
, **kwargs
):
438 GetStyle(self) -> int
440 Returns the style of the brush. See `__init__` for a listing of
443 return _gdi_
.Brush_GetStyle(*args
, **kwargs
)
445 def GetStipple(*args
, **kwargs
):
447 GetStipple(self) -> Bitmap
449 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
450 have a wx.STIPPLE style, then the return value may be non-None but an
451 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
453 return _gdi_
.Brush_GetStipple(*args
, **kwargs
)
455 def IsHatch(*args
, **kwargs
):
457 IsHatch(self) -> bool
459 Is the current style a hatch type?
461 return _gdi_
.Brush_IsHatch(*args
, **kwargs
)
463 def Ok(*args
, **kwargs
):
467 Returns True if the brush is initialised and valid.
469 return _gdi_
.Brush_Ok(*args
, **kwargs
)
471 def MacGetTheme(*args
, **kwargs
):
472 """MacGetTheme(self) -> short"""
473 return _gdi_
.Brush_MacGetTheme(*args
, **kwargs
)
475 def MacSetTheme(*args
, **kwargs
):
476 """MacSetTheme(self, short macThemeBrush)"""
477 return _gdi_
.Brush_MacSetTheme(*args
, **kwargs
)
479 def __nonzero__(self
): return self
.Ok()
480 Colour
= property(GetColour
,SetColour
,doc
="See `GetColour` and `SetColour`")
481 Stipple
= property(GetStipple
,SetStipple
,doc
="See `GetStipple` and `SetStipple`")
482 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
483 _gdi_
.Brush_swigregister(Brush
)
485 def BrushFromBitmap(*args
, **kwargs
):
487 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
489 Constructs a stippled brush using a bitmap.
491 val
= _gdi_
.new_BrushFromBitmap(*args
, **kwargs
)
494 class Bitmap(GDIObject
):
496 The wx.Bitmap class encapsulates the concept of a platform-dependent
497 bitmap. It can be either monochrome or colour, and either loaded from
498 a file or created dynamically. A bitmap can be selected into a memory
499 device context (instance of `wx.MemoryDC`). This enables the bitmap to
500 be copied to a window or memory device context using `wx.DC.Blit`, or
501 to be used as a drawing surface.
503 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
504 __repr__
= _swig_repr
505 def __init__(self
, *args
, **kwargs
):
507 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
509 Loads a bitmap from a file.
511 _gdi_
.Bitmap_swiginit(self
,_gdi_
.new_Bitmap(*args
, **kwargs
))
512 __swig_destroy__
= _gdi_
.delete_Bitmap
513 __del__
= lambda self
: None;
514 def Ok(*args
, **kwargs
):
515 """Ok(self) -> bool"""
516 return _gdi_
.Bitmap_Ok(*args
, **kwargs
)
518 def GetWidth(*args
, **kwargs
):
520 GetWidth(self) -> int
522 Gets the width of the bitmap in pixels.
524 return _gdi_
.Bitmap_GetWidth(*args
, **kwargs
)
526 def GetHeight(*args
, **kwargs
):
528 GetHeight(self) -> int
530 Gets the height of the bitmap in pixels.
532 return _gdi_
.Bitmap_GetHeight(*args
, **kwargs
)
534 def GetDepth(*args
, **kwargs
):
536 GetDepth(self) -> int
538 Gets the colour depth of the bitmap. A value of 1 indicates a
541 return _gdi_
.Bitmap_GetDepth(*args
, **kwargs
)
543 def GetSize(*args
, **kwargs
):
545 GetSize(self) -> Size
547 Get the size of the bitmap.
549 return _gdi_
.Bitmap_GetSize(*args
, **kwargs
)
551 def ConvertToImage(*args
, **kwargs
):
553 ConvertToImage(self) -> Image
555 Creates a platform-independent image from a platform-dependent
556 bitmap. This preserves mask information so that bitmaps and images can
557 be converted back and forth without loss in that respect.
559 return _gdi_
.Bitmap_ConvertToImage(*args
, **kwargs
)
561 def GetMask(*args
, **kwargs
):
563 GetMask(self) -> Mask
565 Gets the associated mask (if any) which may have been loaded from a
566 file or explpicitly set for the bitmap.
568 :see: `SetMask`, `wx.Mask`
571 return _gdi_
.Bitmap_GetMask(*args
, **kwargs
)
573 def SetMask(*args
, **kwargs
):
575 SetMask(self, Mask mask)
577 Sets the mask for this bitmap.
579 :see: `GetMask`, `wx.Mask`
582 return _gdi_
.Bitmap_SetMask(*args
, **kwargs
)
584 def SetMaskColour(*args
, **kwargs
):
586 SetMaskColour(self, Colour colour)
588 Create a Mask based on a specified colour in the Bitmap.
590 return _gdi_
.Bitmap_SetMaskColour(*args
, **kwargs
)
592 def GetSubBitmap(*args
, **kwargs
):
594 GetSubBitmap(self, Rect rect) -> Bitmap
596 Returns a sub-bitmap of the current one as long as the rect belongs
597 entirely to the bitmap. This function preserves bit depth and mask
600 return _gdi_
.Bitmap_GetSubBitmap(*args
, **kwargs
)
602 def SaveFile(*args
, **kwargs
):
604 SaveFile(self, String name, int type, Palette palette=None) -> bool
606 Saves a bitmap in the named file. See `__init__` for a description of
607 the ``type`` parameter.
609 return _gdi_
.Bitmap_SaveFile(*args
, **kwargs
)
611 def LoadFile(*args
, **kwargs
):
613 LoadFile(self, String name, int type) -> bool
615 Loads a bitmap from a file. See `__init__` for a description of the
618 return _gdi_
.Bitmap_LoadFile(*args
, **kwargs
)
620 def GetPalette(*args
, **kwargs
):
621 """GetPalette(self) -> Palette"""
622 return _gdi_
.Bitmap_GetPalette(*args
, **kwargs
)
624 def CopyFromIcon(*args
, **kwargs
):
625 """CopyFromIcon(self, Icon icon) -> bool"""
626 return _gdi_
.Bitmap_CopyFromIcon(*args
, **kwargs
)
628 def SetHeight(*args
, **kwargs
):
630 SetHeight(self, int height)
632 Set the height property (does not affect the existing bitmap data).
634 return _gdi_
.Bitmap_SetHeight(*args
, **kwargs
)
636 def SetWidth(*args
, **kwargs
):
638 SetWidth(self, int width)
640 Set the width property (does not affect the existing bitmap data).
642 return _gdi_
.Bitmap_SetWidth(*args
, **kwargs
)
644 def SetDepth(*args
, **kwargs
):
646 SetDepth(self, int depth)
648 Set the depth property (does not affect the existing bitmap data).
650 return _gdi_
.Bitmap_SetDepth(*args
, **kwargs
)
652 def SetSize(*args
, **kwargs
):
654 SetSize(self, Size size)
656 Set the bitmap size (does not affect the existing bitmap data).
658 return _gdi_
.Bitmap_SetSize(*args
, **kwargs
)
660 def __nonzero__(self
): return self
.Ok()
661 def __eq__(*args
, **kwargs
):
662 """__eq__(self, Bitmap other) -> bool"""
663 return _gdi_
.Bitmap___eq__(*args
, **kwargs
)
665 def __ne__(*args
, **kwargs
):
666 """__ne__(self, Bitmap other) -> bool"""
667 return _gdi_
.Bitmap___ne__(*args
, **kwargs
)
669 Depth
= property(GetDepth
,SetDepth
,doc
="See `GetDepth` and `SetDepth`")
670 Height
= property(GetHeight
,SetHeight
,doc
="See `GetHeight` and `SetHeight`")
671 Mask
= property(GetMask
,SetMask
,doc
="See `GetMask` and `SetMask`")
672 Palette
= property(GetPalette
,doc
="See `GetPalette`")
673 Size
= property(GetSize
,SetSize
,doc
="See `GetSize` and `SetSize`")
674 SubBitmap
= property(GetSubBitmap
,doc
="See `GetSubBitmap`")
675 Width
= property(GetWidth
,SetWidth
,doc
="See `GetWidth` and `SetWidth`")
676 _gdi_
.Bitmap_swigregister(Bitmap
)
678 def EmptyBitmap(*args
, **kwargs
):
680 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
682 Creates a new bitmap of the given size. A depth of -1 indicates the
683 depth of the current screen or visual. Some platforms only support 1
684 for monochrome and -1 for the current display depth.
686 val
= _gdi_
.new_EmptyBitmap(*args
, **kwargs
)
689 def BitmapFromIcon(*args
, **kwargs
):
691 BitmapFromIcon(Icon icon) -> Bitmap
693 Create a new bitmap from a `wx.Icon` object.
695 val
= _gdi_
.new_BitmapFromIcon(*args
, **kwargs
)
698 def BitmapFromImage(*args
, **kwargs
):
700 BitmapFromImage(Image image, int depth=-1) -> Bitmap
702 Creates bitmap object from a `wx.Image`. This has to be done to
703 actually display a `wx.Image` as you cannot draw an image directly on
704 a window. The resulting bitmap will use the provided colour depth (or
705 that of the current screen colour depth if depth is -1) which entails
706 that a colour reduction may have to take place.
708 val
= _gdi_
.new_BitmapFromImage(*args
, **kwargs
)
711 def BitmapFromXPMData(*args
, **kwargs
):
713 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
715 Construct a Bitmap from a list of strings formatted as XPM data.
717 val
= _gdi_
.new_BitmapFromXPMData(*args
, **kwargs
)
720 def BitmapFromBits(*args
, **kwargs
):
722 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
724 Creates a bitmap from an array of bits. You should only use this
725 function for monochrome bitmaps (depth 1) in portable programs: in
726 this case the bits parameter should contain an XBM image. For other
727 bit depths, the behaviour is platform dependent.
729 val
= _gdi_
.new_BitmapFromBits(*args
, **kwargs
)
733 def _BitmapFromBufferAlpha(*args
, **kwargs
):
734 """_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
735 return _gdi_
._BitmapFromBufferAlpha
(*args
, **kwargs
)
737 def _BitmapFromBuffer(*args
, **kwargs
):
738 """_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
739 return _gdi_
._BitmapFromBuffer
(*args
, **kwargs
)
740 def BitmapFromBuffer(width
, height
, dataBuffer
, alphaBuffer
=None):
742 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
743 parameter must be a Python object that implements the buffer
744 interface, such as a string, array, etc. The dataBuffer object is
745 expected to contain a series of RGB bytes and be width*height*3
746 bytes long. A buffer object can optionally be supplied for the
747 image's alpha channel data, and it is expected to be width*height
748 bytes long. On Windows the RGB values are 'premultiplied' by the
749 alpha values. (The other platforms do the multiplication
752 Unlike `wx.ImageFromBuffer` the bitmap created with this function
753 does not share the memory buffer with the buffer object. This is
754 because the native pixel buffer format varies on different
755 platforms, and so instead an efficient as possible copy of the
756 data is made from the buffer objects to the bitmap's native pixel
757 buffer. For direct access to a bitmap's pixel buffer see
758 `wx.NativePixelData` and `wx.AlphaPixelData`.
760 :see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
761 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
763 if alphaBuffer
is not None:
764 return _gdi_
._BitmapFromBufferAlpha
(width
, height
, dataBuffer
, alphaBuffer
)
766 return _gdi_
._BitmapFromBuffer
(width
, height
, dataBuffer
)
769 def _BitmapFromBufferRGBA(*args
, **kwargs
):
770 """_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
771 return _gdi_
._BitmapFromBufferRGBA
(*args
, **kwargs
)
772 def BitmapFromBufferRGBA(width
, height
, dataBuffer
):
774 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
775 parameter must be a Python object that implements the buffer
776 interface, such as a string, array, etc. The dataBuffer object is
777 expected to contain a series of RGBA bytes (red, green, blue and
778 alpha) and be width*height*4 bytes long. On Windows the RGB
779 values are 'premultiplied' by the alpha values. (The other
780 platforms do the multiplication themselves.)
782 Unlike `wx.ImageFromBuffer` the bitmap created with this function
783 does not share the memory buffer with the buffer object. This is
784 because the native pixel buffer format varies on different
785 platforms, and so instead an efficient as possible copy of the
786 data is made from the buffer object to the bitmap's native pixel
787 buffer. For direct access to a bitmap's pixel buffer see
788 `wx.NativePixelData` and `wx.AlphaPixelData`.
790 :see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
791 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
793 return _gdi_
._BitmapFromBufferRGBA
(width
, height
, dataBuffer
)
795 class PixelDataBase(object):
796 """Proxy of C++ PixelDataBase class"""
797 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
798 def __init__(self
): raise AttributeError, "No constructor defined"
799 __repr__
= _swig_repr
800 def GetOrigin(*args
, **kwargs
):
801 """GetOrigin(self) -> Point"""
802 return _gdi_
.PixelDataBase_GetOrigin(*args
, **kwargs
)
804 def GetWidth(*args
, **kwargs
):
805 """GetWidth(self) -> int"""
806 return _gdi_
.PixelDataBase_GetWidth(*args
, **kwargs
)
808 def GetHeight(*args
, **kwargs
):
809 """GetHeight(self) -> int"""
810 return _gdi_
.PixelDataBase_GetHeight(*args
, **kwargs
)
812 def GetSize(*args
, **kwargs
):
813 """GetSize(self) -> Size"""
814 return _gdi_
.PixelDataBase_GetSize(*args
, **kwargs
)
816 def GetRowStride(*args
, **kwargs
):
817 """GetRowStride(self) -> int"""
818 return _gdi_
.PixelDataBase_GetRowStride(*args
, **kwargs
)
820 _gdi_
.PixelDataBase_swigregister(PixelDataBase
)
822 class NativePixelData(PixelDataBase
):
823 """Proxy of C++ NativePixelData class"""
824 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
825 __repr__
= _swig_repr
826 def __init__(self
, *args
):
828 __init__(self, Bitmap bmp) -> NativePixelData
829 __init__(self, Bitmap bmp, Rect rect) -> NativePixelData
830 __init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
832 _gdi_
.NativePixelData_swiginit(self
,_gdi_
.new_NativePixelData(*args
))
833 __swig_destroy__
= _gdi_
.delete_NativePixelData
834 __del__
= lambda self
: None;
835 def GetPixels(*args
, **kwargs
):
836 """GetPixels(self) -> NativePixelData_Accessor"""
837 return _gdi_
.NativePixelData_GetPixels(*args
, **kwargs
)
839 def UseAlpha(*args
, **kwargs
):
841 return _gdi_
.NativePixelData_UseAlpha(*args
, **kwargs
)
843 def __nonzero__(*args
, **kwargs
):
844 """__nonzero__(self) -> bool"""
845 return _gdi_
.NativePixelData___nonzero__(*args
, **kwargs
)
849 Create and return an iterator object for this pixel data
850 object. (It's really a generator but I won't tell if you
853 width
= self
.GetWidth()
854 height
= self
.GetHeight()
855 pixels
= self
.GetPixels()
860 class PixelFacade(object):
863 def Set(self
, *args
, **kw
):
864 return pixels
.Set(*args
, **kw
)
866 return str(self
.Get())
868 return 'pixel(%d,%d): %s' % (x
,y
,self
.Get())
869 X
= property(lambda self
: x
)
870 Y
= property(lambda self
: y
)
873 for y
in xrange(height
):
874 for x
in xrange(width
):
880 pixels
.MoveTo(self
, 0, y
)
882 Pixels
= property(GetPixels
,doc
="See `GetPixels`")
883 _gdi_
.NativePixelData_swigregister(NativePixelData
)
885 class NativePixelData_Accessor(object):
886 """Proxy of C++ NativePixelData_Accessor class"""
887 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
888 __repr__
= _swig_repr
889 def __init__(self
, *args
):
891 __init__(self, NativePixelData data) -> NativePixelData_Accessor
892 __init__(self, Bitmap bmp, NativePixelData data) -> NativePixelData_Accessor
893 __init__(self) -> NativePixelData_Accessor
895 _gdi_
.NativePixelData_Accessor_swiginit(self
,_gdi_
.new_NativePixelData_Accessor(*args
))
896 __swig_destroy__
= _gdi_
.delete_NativePixelData_Accessor
897 __del__
= lambda self
: None;
898 def Reset(*args
, **kwargs
):
899 """Reset(self, NativePixelData data)"""
900 return _gdi_
.NativePixelData_Accessor_Reset(*args
, **kwargs
)
902 def IsOk(*args
, **kwargs
):
903 """IsOk(self) -> bool"""
904 return _gdi_
.NativePixelData_Accessor_IsOk(*args
, **kwargs
)
906 def nextPixel(*args
, **kwargs
):
907 """nextPixel(self)"""
908 return _gdi_
.NativePixelData_Accessor_nextPixel(*args
, **kwargs
)
910 def Offset(*args
, **kwargs
):
911 """Offset(self, NativePixelData data, int x, int y)"""
912 return _gdi_
.NativePixelData_Accessor_Offset(*args
, **kwargs
)
914 def OffsetX(*args
, **kwargs
):
915 """OffsetX(self, NativePixelData data, int x)"""
916 return _gdi_
.NativePixelData_Accessor_OffsetX(*args
, **kwargs
)
918 def OffsetY(*args
, **kwargs
):
919 """OffsetY(self, NativePixelData data, int y)"""
920 return _gdi_
.NativePixelData_Accessor_OffsetY(*args
, **kwargs
)
922 def MoveTo(*args
, **kwargs
):
923 """MoveTo(self, NativePixelData data, int x, int y)"""
924 return _gdi_
.NativePixelData_Accessor_MoveTo(*args
, **kwargs
)
926 def Set(*args
, **kwargs
):
927 """Set(self, byte red, byte green, byte blue)"""
928 return _gdi_
.NativePixelData_Accessor_Set(*args
, **kwargs
)
930 def Get(*args
, **kwargs
):
931 """Get(self) -> PyObject"""
932 return _gdi_
.NativePixelData_Accessor_Get(*args
, **kwargs
)
934 _gdi_
.NativePixelData_Accessor_swigregister(NativePixelData_Accessor
)
936 class AlphaPixelData(PixelDataBase
):
937 """Proxy of C++ AlphaPixelData class"""
938 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
939 __repr__
= _swig_repr
940 def __init__(self
, *args
):
942 __init__(self, Bitmap bmp) -> AlphaPixelData
943 __init__(self, Bitmap bmp, Rect rect) -> AlphaPixelData
944 __init__(self, Bitmap bmp, Point pt, Size sz) -> AlphaPixelData
946 _gdi_
.AlphaPixelData_swiginit(self
,_gdi_
.new_AlphaPixelData(*args
))
949 __swig_destroy__
= _gdi_
.delete_AlphaPixelData
950 __del__
= lambda self
: None;
951 def GetPixels(*args
, **kwargs
):
952 """GetPixels(self) -> AlphaPixelData_Accessor"""
953 return _gdi_
.AlphaPixelData_GetPixels(*args
, **kwargs
)
955 def UseAlpha(*args
, **kwargs
):
957 return _gdi_
.AlphaPixelData_UseAlpha(*args
, **kwargs
)
959 def __nonzero__(*args
, **kwargs
):
960 """__nonzero__(self) -> bool"""
961 return _gdi_
.AlphaPixelData___nonzero__(*args
, **kwargs
)
965 Create and return an iterator object for this pixel data
966 object. (It's really a generator but I won't tell if you
969 width
= self
.GetWidth()
970 height
= self
.GetHeight()
971 pixels
= self
.GetPixels()
976 class PixelFacade(object):
979 def Set(self
, *args
, **kw
):
980 return pixels
.Set(*args
, **kw
)
982 return str(self
.Get())
984 return 'pixel(%d,%d): %s' % (x
,y
,self
.Get())
985 X
= property(lambda self
: x
)
986 Y
= property(lambda self
: y
)
989 for y
in xrange(height
):
990 for x
in xrange(width
):
996 pixels
.MoveTo(self
, 0, y
)
998 Pixels
= property(GetPixels
,doc
="See `GetPixels`")
999 _gdi_
.AlphaPixelData_swigregister(AlphaPixelData
)
1001 class AlphaPixelData_Accessor(object):
1002 """Proxy of C++ AlphaPixelData_Accessor class"""
1003 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1004 __repr__
= _swig_repr
1005 def __init__(self
, *args
):
1007 __init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
1008 __init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
1009 __init__(self) -> AlphaPixelData_Accessor
1011 _gdi_
.AlphaPixelData_Accessor_swiginit(self
,_gdi_
.new_AlphaPixelData_Accessor(*args
))
1012 __swig_destroy__
= _gdi_
.delete_AlphaPixelData_Accessor
1013 __del__
= lambda self
: None;
1014 def Reset(*args
, **kwargs
):
1015 """Reset(self, AlphaPixelData data)"""
1016 return _gdi_
.AlphaPixelData_Accessor_Reset(*args
, **kwargs
)
1018 def IsOk(*args
, **kwargs
):
1019 """IsOk(self) -> bool"""
1020 return _gdi_
.AlphaPixelData_Accessor_IsOk(*args
, **kwargs
)
1022 def nextPixel(*args
, **kwargs
):
1023 """nextPixel(self)"""
1024 return _gdi_
.AlphaPixelData_Accessor_nextPixel(*args
, **kwargs
)
1026 def Offset(*args
, **kwargs
):
1027 """Offset(self, AlphaPixelData data, int x, int y)"""
1028 return _gdi_
.AlphaPixelData_Accessor_Offset(*args
, **kwargs
)
1030 def OffsetX(*args
, **kwargs
):
1031 """OffsetX(self, AlphaPixelData data, int x)"""
1032 return _gdi_
.AlphaPixelData_Accessor_OffsetX(*args
, **kwargs
)
1034 def OffsetY(*args
, **kwargs
):
1035 """OffsetY(self, AlphaPixelData data, int y)"""
1036 return _gdi_
.AlphaPixelData_Accessor_OffsetY(*args
, **kwargs
)
1038 def MoveTo(*args
, **kwargs
):
1039 """MoveTo(self, AlphaPixelData data, int x, int y)"""
1040 return _gdi_
.AlphaPixelData_Accessor_MoveTo(*args
, **kwargs
)
1042 def Set(*args
, **kwargs
):
1043 """Set(self, byte red, byte green, byte blue, byte alpha)"""
1044 return _gdi_
.AlphaPixelData_Accessor_Set(*args
, **kwargs
)
1046 def Get(*args
, **kwargs
):
1047 """Get(self) -> PyObject"""
1048 return _gdi_
.AlphaPixelData_Accessor_Get(*args
, **kwargs
)
1050 _gdi_
.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor
)
1052 class Mask(_core
.Object
):
1054 This class encapsulates a monochrome mask bitmap, where the masked
1055 area is black and the unmasked area is white. When associated with a
1056 bitmap and drawn in a device context, the unmasked area of the bitmap
1057 will be drawn, and the masked area will not be drawn.
1059 A mask may be associated with a `wx.Bitmap`. It is used in
1060 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
1061 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
1064 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1065 __repr__
= _swig_repr
1066 def __init__(self
, *args
, **kwargs
):
1068 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
1070 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
1071 that indicates the transparent portions of the mask. In other words,
1072 the pixels in ``bitmap`` that match ``colour`` will be the transparent
1073 portions of the mask. If no ``colour`` or an invalid ``colour`` is
1074 passed then BLACK is used.
1076 :see: `wx.Bitmap`, `wx.Colour`
1078 _gdi_
.Mask_swiginit(self
,_gdi_
.new_Mask(*args
, **kwargs
))
1079 __swig_destroy__
= _gdi_
.delete_Mask
1080 __del__
= lambda self
: None;
1081 _gdi_
.Mask_swigregister(Mask
)
1083 MaskColour
= wx
._deprecated
(Mask
, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
1084 class Icon(GDIObject
):
1085 """Proxy of C++ Icon class"""
1086 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1087 __repr__
= _swig_repr
1088 def __init__(self
, *args
, **kwargs
):
1089 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
1090 _gdi_
.Icon_swiginit(self
,_gdi_
.new_Icon(*args
, **kwargs
))
1091 __swig_destroy__
= _gdi_
.delete_Icon
1092 __del__
= lambda self
: None;
1093 def Ok(*args
, **kwargs
):
1094 """Ok(self) -> bool"""
1095 return _gdi_
.Icon_Ok(*args
, **kwargs
)
1097 def GetWidth(*args
, **kwargs
):
1098 """GetWidth(self) -> int"""
1099 return _gdi_
.Icon_GetWidth(*args
, **kwargs
)
1101 def GetHeight(*args
, **kwargs
):
1102 """GetHeight(self) -> int"""
1103 return _gdi_
.Icon_GetHeight(*args
, **kwargs
)
1105 def GetDepth(*args
, **kwargs
):
1106 """GetDepth(self) -> int"""
1107 return _gdi_
.Icon_GetDepth(*args
, **kwargs
)
1109 def SetWidth(*args
, **kwargs
):
1110 """SetWidth(self, int w)"""
1111 return _gdi_
.Icon_SetWidth(*args
, **kwargs
)
1113 def SetHeight(*args
, **kwargs
):
1114 """SetHeight(self, int h)"""
1115 return _gdi_
.Icon_SetHeight(*args
, **kwargs
)
1117 def SetDepth(*args
, **kwargs
):
1118 """SetDepth(self, int d)"""
1119 return _gdi_
.Icon_SetDepth(*args
, **kwargs
)
1121 def CopyFromBitmap(*args
, **kwargs
):
1122 """CopyFromBitmap(self, Bitmap bmp)"""
1123 return _gdi_
.Icon_CopyFromBitmap(*args
, **kwargs
)
1125 def __nonzero__(self
): return self
.Ok()
1126 Depth
= property(GetDepth
,SetDepth
,doc
="See `GetDepth` and `SetDepth`")
1127 Height
= property(GetHeight
,SetHeight
,doc
="See `GetHeight` and `SetHeight`")
1128 Width
= property(GetWidth
,SetWidth
,doc
="See `GetWidth` and `SetWidth`")
1129 _gdi_
.Icon_swigregister(Icon
)
1131 def EmptyIcon(*args
, **kwargs
):
1132 """EmptyIcon() -> Icon"""
1133 val
= _gdi_
.new_EmptyIcon(*args
, **kwargs
)
1136 def IconFromLocation(*args
, **kwargs
):
1137 """IconFromLocation(IconLocation loc) -> Icon"""
1138 val
= _gdi_
.new_IconFromLocation(*args
, **kwargs
)
1141 def IconFromBitmap(*args
, **kwargs
):
1142 """IconFromBitmap(Bitmap bmp) -> Icon"""
1143 val
= _gdi_
.new_IconFromBitmap(*args
, **kwargs
)
1146 def IconFromXPMData(*args
, **kwargs
):
1147 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
1148 val
= _gdi_
.new_IconFromXPMData(*args
, **kwargs
)
1151 class IconLocation(object):
1152 """Proxy of C++ IconLocation class"""
1153 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1154 __repr__
= _swig_repr
1155 def __init__(self
, *args
, **kwargs
):
1156 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
1157 _gdi_
.IconLocation_swiginit(self
,_gdi_
.new_IconLocation(*args
, **kwargs
))
1158 __swig_destroy__
= _gdi_
.delete_IconLocation
1159 __del__
= lambda self
: None;
1160 def IsOk(*args
, **kwargs
):
1161 """IsOk(self) -> bool"""
1162 return _gdi_
.IconLocation_IsOk(*args
, **kwargs
)
1164 def __nonzero__(self
): return self
.Ok()
1165 def SetFileName(*args
, **kwargs
):
1166 """SetFileName(self, String filename)"""
1167 return _gdi_
.IconLocation_SetFileName(*args
, **kwargs
)
1169 def GetFileName(*args
, **kwargs
):
1170 """GetFileName(self) -> String"""
1171 return _gdi_
.IconLocation_GetFileName(*args
, **kwargs
)
1173 def SetIndex(*args
, **kwargs
):
1174 """SetIndex(self, int num)"""
1175 return _gdi_
.IconLocation_SetIndex(*args
, **kwargs
)
1177 def GetIndex(*args
, **kwargs
):
1178 """GetIndex(self) -> int"""
1179 return _gdi_
.IconLocation_GetIndex(*args
, **kwargs
)
1181 FileName
= property(GetFileName
,SetFileName
,doc
="See `GetFileName` and `SetFileName`")
1182 Index
= property(GetIndex
,SetIndex
,doc
="See `GetIndex` and `SetIndex`")
1183 _gdi_
.IconLocation_swigregister(IconLocation
)
1185 class IconBundle(object):
1186 """Proxy of C++ IconBundle class"""
1187 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1188 __repr__
= _swig_repr
1189 def __init__(self
, *args
, **kwargs
):
1190 """__init__(self) -> IconBundle"""
1191 _gdi_
.IconBundle_swiginit(self
,_gdi_
.new_IconBundle(*args
, **kwargs
))
1192 __swig_destroy__
= _gdi_
.delete_IconBundle
1193 __del__
= lambda self
: None;
1194 def AddIcon(*args
, **kwargs
):
1195 """AddIcon(self, Icon icon)"""
1196 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
1198 def AddIconFromFile(*args
, **kwargs
):
1199 """AddIconFromFile(self, String file, long type)"""
1200 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
1202 def GetIcon(*args
, **kwargs
):
1203 """GetIcon(self, Size size) -> Icon"""
1204 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
1206 Icon
= property(GetIcon
,doc
="See `GetIcon`")
1207 _gdi_
.IconBundle_swigregister(IconBundle
)
1209 def IconBundleFromFile(*args
, **kwargs
):
1210 """IconBundleFromFile(String file, long type) -> IconBundle"""
1211 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
1214 def IconBundleFromIcon(*args
, **kwargs
):
1215 """IconBundleFromIcon(Icon icon) -> IconBundle"""
1216 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
1219 class Cursor(GDIObject
):
1221 A cursor is a small bitmap usually used for denoting where the mouse
1222 pointer is, with a picture that might indicate the interpretation of a
1225 A single cursor object may be used in many windows (any subwindow
1226 type). The wxWindows convention is to set the cursor for a window, as
1227 in X, rather than to set it globally as in MS Windows, although a
1228 global `wx.SetCursor` function is also available for use on MS Windows.
1231 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1232 __repr__
= _swig_repr
1233 def __init__(self
, *args
, **kwargs
):
1235 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1237 Construct a Cursor from a file. Specify the type of file using
1238 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1241 _gdi_
.Cursor_swiginit(self
,_gdi_
.new_Cursor(*args
, **kwargs
))
1242 __swig_destroy__
= _gdi_
.delete_Cursor
1243 __del__
= lambda self
: None;
1244 def Ok(*args
, **kwargs
):
1245 """Ok(self) -> bool"""
1246 return _gdi_
.Cursor_Ok(*args
, **kwargs
)
1248 def __nonzero__(self
): return self
.Ok()
1249 _gdi_
.Cursor_swigregister(Cursor
)
1251 def StockCursor(*args
, **kwargs
):
1253 StockCursor(int id) -> Cursor
1255 Create a cursor using one of the stock cursors. Note that not all
1256 stock cursors are available on all platforms.
1258 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
1261 def CursorFromImage(*args
, **kwargs
):
1263 CursorFromImage(Image image) -> Cursor
1265 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1266 for setting the transparent portions of the cursor.
1268 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
1271 #---------------------------------------------------------------------------
1273 OutRegion
= _gdi_
.OutRegion
1274 PartRegion
= _gdi_
.PartRegion
1275 InRegion
= _gdi_
.InRegion
1276 class Region(GDIObject
):
1277 """Proxy of C++ Region class"""
1278 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1279 __repr__
= _swig_repr
1280 def __init__(self
, *args
, **kwargs
):
1281 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1282 _gdi_
.Region_swiginit(self
,_gdi_
.new_Region(*args
, **kwargs
))
1283 __swig_destroy__
= _gdi_
.delete_Region
1284 __del__
= lambda self
: None;
1285 def Clear(*args
, **kwargs
):
1287 return _gdi_
.Region_Clear(*args
, **kwargs
)
1289 def Offset(*args
, **kwargs
):
1290 """Offset(self, int x, int y) -> bool"""
1291 return _gdi_
.Region_Offset(*args
, **kwargs
)
1293 def Contains(*args
, **kwargs
):
1294 """Contains(self, int x, int y) -> int"""
1295 return _gdi_
.Region_Contains(*args
, **kwargs
)
1297 def ContainsPoint(*args
, **kwargs
):
1298 """ContainsPoint(self, Point pt) -> int"""
1299 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
1301 def ContainsRect(*args
, **kwargs
):
1302 """ContainsRect(self, Rect rect) -> int"""
1303 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
1305 def ContainsRectDim(*args
, **kwargs
):
1306 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1307 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
1309 def GetBox(*args
, **kwargs
):
1310 """GetBox(self) -> Rect"""
1311 return _gdi_
.Region_GetBox(*args
, **kwargs
)
1313 def Intersect(*args
, **kwargs
):
1314 """Intersect(self, int x, int y, int width, int height) -> bool"""
1315 return _gdi_
.Region_Intersect(*args
, **kwargs
)
1317 def IntersectRect(*args
, **kwargs
):
1318 """IntersectRect(self, Rect rect) -> bool"""
1319 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
1321 def IntersectRegion(*args
, **kwargs
):
1322 """IntersectRegion(self, Region region) -> bool"""
1323 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
1325 def IsEmpty(*args
, **kwargs
):
1326 """IsEmpty(self) -> bool"""
1327 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
1329 def Union(*args
, **kwargs
):
1330 """Union(self, int x, int y, int width, int height) -> bool"""
1331 return _gdi_
.Region_Union(*args
, **kwargs
)
1333 def UnionRect(*args
, **kwargs
):
1334 """UnionRect(self, Rect rect) -> bool"""
1335 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1337 def UnionRegion(*args
, **kwargs
):
1338 """UnionRegion(self, Region region) -> bool"""
1339 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1341 def Subtract(*args
, **kwargs
):
1342 """Subtract(self, int x, int y, int width, int height) -> bool"""
1343 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1345 def SubtractRect(*args
, **kwargs
):
1346 """SubtractRect(self, Rect rect) -> bool"""
1347 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1349 def SubtractRegion(*args
, **kwargs
):
1350 """SubtractRegion(self, Region region) -> bool"""
1351 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1353 def Xor(*args
, **kwargs
):
1354 """Xor(self, int x, int y, int width, int height) -> bool"""
1355 return _gdi_
.Region_Xor(*args
, **kwargs
)
1357 def XorRect(*args
, **kwargs
):
1358 """XorRect(self, Rect rect) -> bool"""
1359 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1361 def XorRegion(*args
, **kwargs
):
1362 """XorRegion(self, Region region) -> bool"""
1363 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1365 def ConvertToBitmap(*args
, **kwargs
):
1366 """ConvertToBitmap(self) -> Bitmap"""
1367 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1369 def UnionBitmap(*args
, **kwargs
):
1370 """UnionBitmap(self, Bitmap bmp) -> bool"""
1371 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1373 def UnionBitmapColour(*args
, **kwargs
):
1374 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1375 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1377 _gdi_
.Region_swigregister(Region
)
1379 def RegionFromBitmap(*args
, **kwargs
):
1380 """RegionFromBitmap(Bitmap bmp) -> Region"""
1381 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1384 def RegionFromBitmapColour(*args
, **kwargs
):
1385 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1386 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1389 def RegionFromPoints(*args
, **kwargs
):
1390 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1391 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1394 class RegionIterator(_core
.Object
):
1395 """Proxy of C++ RegionIterator class"""
1396 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1397 __repr__
= _swig_repr
1398 def __init__(self
, *args
, **kwargs
):
1399 """__init__(self, Region region) -> RegionIterator"""
1400 _gdi_
.RegionIterator_swiginit(self
,_gdi_
.new_RegionIterator(*args
, **kwargs
))
1401 __swig_destroy__
= _gdi_
.delete_RegionIterator
1402 __del__
= lambda self
: None;
1403 def GetX(*args
, **kwargs
):
1404 """GetX(self) -> int"""
1405 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1407 def GetY(*args
, **kwargs
):
1408 """GetY(self) -> int"""
1409 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1411 def GetW(*args
, **kwargs
):
1412 """GetW(self) -> int"""
1413 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1415 def GetWidth(*args
, **kwargs
):
1416 """GetWidth(self) -> int"""
1417 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1419 def GetH(*args
, **kwargs
):
1420 """GetH(self) -> int"""
1421 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1423 def GetHeight(*args
, **kwargs
):
1424 """GetHeight(self) -> int"""
1425 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1427 def GetRect(*args
, **kwargs
):
1428 """GetRect(self) -> Rect"""
1429 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1431 def HaveRects(*args
, **kwargs
):
1432 """HaveRects(self) -> bool"""
1433 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1435 def Reset(*args
, **kwargs
):
1437 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1439 def Next(*args
, **kwargs
):
1441 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1443 def __nonzero__(*args
, **kwargs
):
1444 """__nonzero__(self) -> bool"""
1445 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1447 _gdi_
.RegionIterator_swigregister(RegionIterator
)
1449 #---------------------------------------------------------------------------
1451 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1452 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1453 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1454 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1455 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1456 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1457 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1458 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1459 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1460 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1461 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1462 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1463 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1464 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1465 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1466 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1467 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1468 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1469 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1470 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1471 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1472 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1473 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1474 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1475 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1476 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1477 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1478 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1479 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1480 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1481 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1482 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1483 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1484 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1485 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1486 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1487 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1488 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1489 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1490 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1491 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1492 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1493 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1494 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1495 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1496 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1497 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1498 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1499 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1500 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1501 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1502 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1503 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1504 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1505 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1506 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1507 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1508 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1509 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1510 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1511 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1512 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1513 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1514 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1515 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1516 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1517 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1518 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1519 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1520 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1521 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1522 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1523 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1524 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1525 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1526 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1527 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1528 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1529 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1530 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1531 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1532 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1533 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1534 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1535 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1536 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1537 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1538 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1539 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1540 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1541 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1542 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1543 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1544 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1545 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1546 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1547 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1548 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1549 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1550 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1551 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1552 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1553 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1554 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1555 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1556 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1557 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1558 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1559 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1560 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1561 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1562 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1563 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1564 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1565 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1566 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1567 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1568 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1569 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1570 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1571 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1572 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1573 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1574 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1575 #---------------------------------------------------------------------------
1577 class NativeFontInfo(object):
1578 """Proxy of C++ NativeFontInfo class"""
1579 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1580 __repr__
= _swig_repr
1581 def __init__(self
, *args
, **kwargs
):
1582 """__init__(self) -> NativeFontInfo"""
1583 _gdi_
.NativeFontInfo_swiginit(self
,_gdi_
.new_NativeFontInfo(*args
, **kwargs
))
1584 __swig_destroy__
= _gdi_
.delete_NativeFontInfo
1585 __del__
= lambda self
: None;
1586 def Init(*args
, **kwargs
):
1588 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1590 def InitFromFont(*args
, **kwargs
):
1591 """InitFromFont(self, Font font)"""
1592 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1594 def GetPointSize(*args
, **kwargs
):
1595 """GetPointSize(self) -> int"""
1596 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1598 def GetStyle(*args
, **kwargs
):
1599 """GetStyle(self) -> int"""
1600 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1602 def GetWeight(*args
, **kwargs
):
1603 """GetWeight(self) -> int"""
1604 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1606 def GetUnderlined(*args
, **kwargs
):
1607 """GetUnderlined(self) -> bool"""
1608 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1610 def GetFaceName(*args
, **kwargs
):
1611 """GetFaceName(self) -> String"""
1612 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1614 def GetFamily(*args
, **kwargs
):
1615 """GetFamily(self) -> int"""
1616 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1618 def GetEncoding(*args
, **kwargs
):
1619 """GetEncoding(self) -> int"""
1620 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1622 def SetPointSize(*args
, **kwargs
):
1623 """SetPointSize(self, int pointsize)"""
1624 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1626 def SetStyle(*args
, **kwargs
):
1627 """SetStyle(self, int style)"""
1628 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1630 def SetWeight(*args
, **kwargs
):
1631 """SetWeight(self, int weight)"""
1632 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1634 def SetUnderlined(*args
, **kwargs
):
1635 """SetUnderlined(self, bool underlined)"""
1636 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1638 def SetFaceName(*args
, **kwargs
):
1639 """SetFaceName(self, String facename) -> bool"""
1640 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1642 def SetFamily(*args
, **kwargs
):
1643 """SetFamily(self, int family)"""
1644 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1646 def SetEncoding(*args
, **kwargs
):
1647 """SetEncoding(self, int encoding)"""
1648 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1650 def FromString(*args
, **kwargs
):
1651 """FromString(self, String s) -> bool"""
1652 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1654 def ToString(*args
, **kwargs
):
1655 """ToString(self) -> String"""
1656 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1658 def __str__(*args
, **kwargs
):
1659 """__str__(self) -> String"""
1660 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1662 def FromUserString(*args
, **kwargs
):
1663 """FromUserString(self, String s) -> bool"""
1664 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1666 def ToUserString(*args
, **kwargs
):
1667 """ToUserString(self) -> String"""
1668 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1670 Encoding
= property(GetEncoding
,SetEncoding
,doc
="See `GetEncoding` and `SetEncoding`")
1671 FaceName
= property(GetFaceName
,SetFaceName
,doc
="See `GetFaceName` and `SetFaceName`")
1672 Family
= property(GetFamily
,SetFamily
,doc
="See `GetFamily` and `SetFamily`")
1673 PointSize
= property(GetPointSize
,SetPointSize
,doc
="See `GetPointSize` and `SetPointSize`")
1674 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
1675 Underlined
= property(GetUnderlined
,SetUnderlined
,doc
="See `GetUnderlined` and `SetUnderlined`")
1676 Weight
= property(GetWeight
,SetWeight
,doc
="See `GetWeight` and `SetWeight`")
1677 _gdi_
.NativeFontInfo_swigregister(NativeFontInfo
)
1679 class NativeEncodingInfo(object):
1680 """Proxy of C++ NativeEncodingInfo class"""
1681 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1682 __repr__
= _swig_repr
1683 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1684 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1685 def __init__(self
, *args
, **kwargs
):
1686 """__init__(self) -> NativeEncodingInfo"""
1687 _gdi_
.NativeEncodingInfo_swiginit(self
,_gdi_
.new_NativeEncodingInfo(*args
, **kwargs
))
1688 __swig_destroy__
= _gdi_
.delete_NativeEncodingInfo
1689 __del__
= lambda self
: None;
1690 def FromString(*args
, **kwargs
):
1691 """FromString(self, String s) -> bool"""
1692 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1694 def ToString(*args
, **kwargs
):
1695 """ToString(self) -> String"""
1696 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1698 _gdi_
.NativeEncodingInfo_swigregister(NativeEncodingInfo
)
1701 def GetNativeFontEncoding(*args
, **kwargs
):
1702 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1703 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1705 def TestFontEncoding(*args
, **kwargs
):
1706 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1707 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1708 #---------------------------------------------------------------------------
1710 class FontMapper(object):
1711 """Proxy of C++ FontMapper class"""
1712 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1713 __repr__
= _swig_repr
1714 def __init__(self
, *args
, **kwargs
):
1715 """__init__(self) -> FontMapper"""
1716 _gdi_
.FontMapper_swiginit(self
,_gdi_
.new_FontMapper(*args
, **kwargs
))
1717 __swig_destroy__
= _gdi_
.delete_FontMapper
1718 __del__
= lambda self
: None;
1719 def Get(*args
, **kwargs
):
1720 """Get() -> FontMapper"""
1721 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1723 Get
= staticmethod(Get
)
1724 def Set(*args
, **kwargs
):
1725 """Set(FontMapper mapper) -> FontMapper"""
1726 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1728 Set
= staticmethod(Set
)
1729 def CharsetToEncoding(*args
, **kwargs
):
1730 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1731 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1733 def GetSupportedEncodingsCount(*args
, **kwargs
):
1734 """GetSupportedEncodingsCount() -> size_t"""
1735 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1737 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1738 def GetEncoding(*args
, **kwargs
):
1739 """GetEncoding(size_t n) -> int"""
1740 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1742 GetEncoding
= staticmethod(GetEncoding
)
1743 def GetEncodingName(*args
, **kwargs
):
1744 """GetEncodingName(int encoding) -> String"""
1745 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1747 GetEncodingName
= staticmethod(GetEncodingName
)
1748 def GetEncodingDescription(*args
, **kwargs
):
1749 """GetEncodingDescription(int encoding) -> String"""
1750 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1752 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1753 def GetEncodingFromName(*args
, **kwargs
):
1754 """GetEncodingFromName(String name) -> int"""
1755 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1757 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1758 def SetConfigPath(*args
, **kwargs
):
1759 """SetConfigPath(self, String prefix)"""
1760 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1762 def GetDefaultConfigPath(*args
, **kwargs
):
1763 """GetDefaultConfigPath() -> String"""
1764 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1766 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1767 def GetAltForEncoding(*args
, **kwargs
):
1768 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1769 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1771 def IsEncodingAvailable(*args
, **kwargs
):
1772 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1773 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1775 def SetDialogParent(*args
, **kwargs
):
1776 """SetDialogParent(self, Window parent)"""
1777 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1779 def SetDialogTitle(*args
, **kwargs
):
1780 """SetDialogTitle(self, String title)"""
1781 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1783 AltForEncoding
= property(GetAltForEncoding
,doc
="See `GetAltForEncoding`")
1784 _gdi_
.FontMapper_swigregister(FontMapper
)
1786 def FontMapper_Get(*args
):
1787 """FontMapper_Get() -> FontMapper"""
1788 return _gdi_
.FontMapper_Get(*args
)
1790 def FontMapper_Set(*args
, **kwargs
):
1791 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1792 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1794 def FontMapper_GetSupportedEncodingsCount(*args
):
1795 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1796 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
)
1798 def FontMapper_GetEncoding(*args
, **kwargs
):
1799 """FontMapper_GetEncoding(size_t n) -> int"""
1800 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1802 def FontMapper_GetEncodingName(*args
, **kwargs
):
1803 """FontMapper_GetEncodingName(int encoding) -> String"""
1804 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1806 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1807 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1808 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1810 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1811 """FontMapper_GetEncodingFromName(String name) -> int"""
1812 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1814 def FontMapper_GetDefaultConfigPath(*args
):
1815 """FontMapper_GetDefaultConfigPath() -> String"""
1816 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
)
1818 #---------------------------------------------------------------------------
1820 class Font(GDIObject
):
1822 A font is an object which determines the appearance of text. Fonts are
1823 used for drawing text to a device context, and setting the appearance
1826 You can retrieve the current system font settings with `wx.SystemSettings`.
1828 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1829 __repr__
= _swig_repr
1830 def __init__(self
, *args
, **kwargs
):
1832 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1833 String face=EmptyString,
1834 int encoding=FONTENCODING_DEFAULT) -> Font
1836 Creates a font object with the specified attributes.
1838 :param pointSize: The size of the font in points.
1840 :param family: Font family. A generic way of referring to fonts
1841 without specifying actual facename. It can be One of
1842 the ``wx.FONTFAMILY_xxx`` constants.
1844 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1846 :param weight: Font weight, sometimes also referred to as font
1847 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1849 :param underline: The value can be ``True`` or ``False`` and
1850 indicates whether the font will include an underline. This
1851 may not be supported on all platforms.
1853 :param face: An optional string specifying the actual typeface to
1854 be used. If it is an empty string, a default typeface will be
1855 chosen based on the family.
1857 :param encoding: An encoding which may be one of the
1858 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1859 available, no font is created.
1861 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1862 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1865 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1866 _gdi_
.Font_swiginit(self
,_gdi_
.new_Font(*args
, **kwargs
))
1867 __swig_destroy__
= _gdi_
.delete_Font
1868 __del__
= lambda self
: None;
1869 def Ok(*args
, **kwargs
):
1873 Returns ``True`` if this font was successfully created.
1875 return _gdi_
.Font_Ok(*args
, **kwargs
)
1877 def __nonzero__(self
): return self
.Ok()
1878 def __eq__(*args
, **kwargs
):
1879 """__eq__(self, Font other) -> bool"""
1880 return _gdi_
.Font___eq__(*args
, **kwargs
)
1882 def __ne__(*args
, **kwargs
):
1883 """__ne__(self, Font other) -> bool"""
1884 return _gdi_
.Font___ne__(*args
, **kwargs
)
1886 def GetPointSize(*args
, **kwargs
):
1888 GetPointSize(self) -> int
1890 Gets the point size.
1892 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
1894 def GetPixelSize(*args
, **kwargs
):
1896 GetPixelSize(self) -> Size
1898 Returns the size in pixels if the font was constructed with a pixel
1901 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
1903 def IsUsingSizeInPixels(*args
, **kwargs
):
1905 IsUsingSizeInPixels(self) -> bool
1907 Returns ``True`` if the font is using a pixelSize.
1909 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
1911 def GetFamily(*args
, **kwargs
):
1913 GetFamily(self) -> int
1915 Gets the font family.
1917 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
1919 def GetStyle(*args
, **kwargs
):
1921 GetStyle(self) -> int
1923 Gets the font style.
1925 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
1927 def GetWeight(*args
, **kwargs
):
1929 GetWeight(self) -> int
1931 Gets the font weight.
1933 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
1935 def GetUnderlined(*args
, **kwargs
):
1937 GetUnderlined(self) -> bool
1939 Returns ``True`` if the font is underlined, ``False`` otherwise.
1941 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
1943 def GetFaceName(*args
, **kwargs
):
1945 GetFaceName(self) -> String
1947 Returns the typeface name associated with the font, or the empty
1948 string if there is no typeface information.
1950 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
1952 def GetEncoding(*args
, **kwargs
):
1954 GetEncoding(self) -> int
1956 Get the font's encoding.
1958 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
1960 def GetNativeFontInfo(*args
, **kwargs
):
1962 GetNativeFontInfo(self) -> NativeFontInfo
1964 Constructs a `wx.NativeFontInfo` object from this font.
1966 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
1968 def IsFixedWidth(*args
, **kwargs
):
1970 IsFixedWidth(self) -> bool
1972 Returns true if the font is a fixed width (or monospaced) font, false
1973 if it is a proportional one or font is invalid.
1975 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
1977 def GetNativeFontInfoDesc(*args
, **kwargs
):
1979 GetNativeFontInfoDesc(self) -> String
1981 Returns the platform-dependent string completely describing this font
1982 or an empty string if the font isn't valid.
1984 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
1986 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
1988 GetNativeFontInfoUserDesc(self) -> String
1990 Returns a human readable version of `GetNativeFontInfoDesc`.
1992 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
1994 def SetPointSize(*args
, **kwargs
):
1996 SetPointSize(self, int pointSize)
1998 Sets the point size.
2000 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
2002 def SetPixelSize(*args
, **kwargs
):
2004 SetPixelSize(self, Size pixelSize)
2006 Sets the size in pixels rather than points. If there is platform API
2007 support for this then it is used, otherwise a font with the closest
2008 size is found using a binary search.
2010 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
2012 def SetFamily(*args
, **kwargs
):
2014 SetFamily(self, int family)
2016 Sets the font family.
2018 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
2020 def SetStyle(*args
, **kwargs
):
2022 SetStyle(self, int style)
2024 Sets the font style.
2026 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
2028 def SetWeight(*args
, **kwargs
):
2030 SetWeight(self, int weight)
2032 Sets the font weight.
2034 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
2036 def SetFaceName(*args
, **kwargs
):
2038 SetFaceName(self, String faceName) -> bool
2040 Sets the facename for the font. The facename, which should be a valid
2041 font installed on the end-user's system.
2043 To avoid portability problems, don't rely on a specific face, but
2044 specify the font family instead or as well. A suitable font will be
2045 found on the end-user's system. If both the family and the facename
2046 are specified, wxWidgets will first search for the specific face, and
2047 then for a font belonging to the same family.
2049 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
2051 def SetUnderlined(*args
, **kwargs
):
2053 SetUnderlined(self, bool underlined)
2057 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
2059 def SetEncoding(*args
, **kwargs
):
2061 SetEncoding(self, int encoding)
2063 Set the font encoding.
2065 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
2067 def SetNativeFontInfo(*args
, **kwargs
):
2069 SetNativeFontInfo(self, NativeFontInfo info)
2071 Set the font's attributes from a `wx.NativeFontInfo` object.
2073 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
2075 def SetNativeFontInfoFromString(*args
, **kwargs
):
2077 SetNativeFontInfoFromString(self, String info) -> bool
2079 Set the font's attributes from string representation of a
2080 `wx.NativeFontInfo` object.
2082 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
2084 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
2086 SetNativeFontInfoUserDesc(self, String info) -> bool
2088 Set the font's attributes from a string formerly returned from
2089 `GetNativeFontInfoDesc`.
2091 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
2093 def GetFamilyString(*args
, **kwargs
):
2095 GetFamilyString(self) -> String
2097 Returns a string representation of the font family.
2099 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
2101 def GetStyleString(*args
, **kwargs
):
2103 GetStyleString(self) -> String
2105 Returns a string representation of the font style.
2107 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
2109 def GetWeightString(*args
, **kwargs
):
2111 GetWeightString(self) -> String
2113 Return a string representation of the font weight.
2115 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
2117 def SetNoAntiAliasing(*args
, **kwargs
):
2118 """SetNoAntiAliasing(self, bool no=True)"""
2119 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
2121 def GetNoAntiAliasing(*args
, **kwargs
):
2122 """GetNoAntiAliasing(self) -> bool"""
2123 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
2125 def GetDefaultEncoding(*args
, **kwargs
):
2127 GetDefaultEncoding() -> int
2129 Returns the encoding used for all fonts created with an encoding of
2130 ``wx.FONTENCODING_DEFAULT``.
2132 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
2134 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
2135 def SetDefaultEncoding(*args
, **kwargs
):
2137 SetDefaultEncoding(int encoding)
2139 Sets the default font encoding.
2141 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2143 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
2144 Encoding
= property(GetEncoding
,SetEncoding
,doc
="See `GetEncoding` and `SetEncoding`")
2145 FaceName
= property(GetFaceName
,SetFaceName
,doc
="See `GetFaceName` and `SetFaceName`")
2146 Family
= property(GetFamily
,SetFamily
,doc
="See `GetFamily` and `SetFamily`")
2147 FamilyString
= property(GetFamilyString
,doc
="See `GetFamilyString`")
2148 NativeFontInfo
= property(GetNativeFontInfo
,SetNativeFontInfo
,doc
="See `GetNativeFontInfo` and `SetNativeFontInfo`")
2149 NativeFontInfoDesc
= property(GetNativeFontInfoDesc
,doc
="See `GetNativeFontInfoDesc`")
2150 NativeFontInfoUserDesc
= property(GetNativeFontInfoUserDesc
,SetNativeFontInfoUserDesc
,doc
="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`")
2151 NoAntiAliasing
= property(GetNoAntiAliasing
,SetNoAntiAliasing
,doc
="See `GetNoAntiAliasing` and `SetNoAntiAliasing`")
2152 PixelSize
= property(GetPixelSize
,SetPixelSize
,doc
="See `GetPixelSize` and `SetPixelSize`")
2153 PointSize
= property(GetPointSize
,SetPointSize
,doc
="See `GetPointSize` and `SetPointSize`")
2154 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
2155 StyleString
= property(GetStyleString
,doc
="See `GetStyleString`")
2156 Underlined
= property(GetUnderlined
,SetUnderlined
,doc
="See `GetUnderlined` and `SetUnderlined`")
2157 Weight
= property(GetWeight
,SetWeight
,doc
="See `GetWeight` and `SetWeight`")
2158 WeightString
= property(GetWeightString
,doc
="See `GetWeightString`")
2159 _gdi_
.Font_swigregister(Font
)
2161 def FontFromNativeInfo(*args
, **kwargs
):
2163 FontFromNativeInfo(NativeFontInfo info) -> Font
2165 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2167 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2168 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
2171 def FontFromNativeInfoString(*args
, **kwargs
):
2173 FontFromNativeInfoString(String info) -> Font
2175 Construct a `wx.Font` from the string representation of a
2176 `wx.NativeFontInfo` object.
2178 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2179 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
2182 def FFont(*args
, **kwargs
):
2184 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2185 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2187 A bit of a simpler way to create a `wx.Font` using flags instead of
2188 individual attribute settings. The value of flags can be a
2189 combination of the following:
2191 ============================ ==
2197 wx.FONTFLAG_ANTIALIASED
2198 wx.FONTFLAG_NOT_ANTIALIASED
2199 wx.FONTFLAG_UNDERLINED
2200 wx.FONTFLAG_STRIKETHROUGH
2201 ============================ ==
2203 :see: `wx.Font.__init__`
2205 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2206 val
= _gdi_
.new_FFont(*args
, **kwargs
)
2209 def FontFromPixelSize(*args
, **kwargs
):
2211 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2212 bool underlined=False, String face=wxEmptyString,
2213 int encoding=FONTENCODING_DEFAULT) -> Font
2215 Creates a font using a size in pixels rather than points. If there is
2216 platform API support for this then it is used, otherwise a font with
2217 the closest size is found using a binary search.
2219 :see: `wx.Font.__init__`
2221 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2222 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
2225 def FFontFromPixelSize(*args
, **kwargs
):
2227 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2228 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2230 Creates a font using a size in pixels rather than points. If there is
2231 platform API support for this then it is used, otherwise a font with
2232 the closest size is found using a binary search.
2234 :see: `wx.Font.__init__`, `wx.FFont`
2236 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2237 val
= _gdi_
.new_FFontFromPixelSize(*args
, **kwargs
)
2240 def Font_GetDefaultEncoding(*args
):
2242 Font_GetDefaultEncoding() -> int
2244 Returns the encoding used for all fonts created with an encoding of
2245 ``wx.FONTENCODING_DEFAULT``.
2247 return _gdi_
.Font_GetDefaultEncoding(*args
)
2249 def Font_SetDefaultEncoding(*args
, **kwargs
):
2251 Font_SetDefaultEncoding(int encoding)
2253 Sets the default font encoding.
2255 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2257 Font2
= wx
._deprecated
(FFont
, "Use `wx.FFont` instead.")
2258 #---------------------------------------------------------------------------
2260 class FontEnumerator(object):
2261 """Proxy of C++ FontEnumerator class"""
2262 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2263 __repr__
= _swig_repr
2264 def __init__(self
, *args
, **kwargs
):
2265 """__init__(self) -> FontEnumerator"""
2266 _gdi_
.FontEnumerator_swiginit(self
,_gdi_
.new_FontEnumerator(*args
, **kwargs
))
2267 self
._setCallbackInfo
(self
, FontEnumerator
, 0)
2269 __swig_destroy__
= _gdi_
.delete_FontEnumerator
2270 __del__
= lambda self
: None;
2271 def _setCallbackInfo(*args
, **kwargs
):
2272 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
2273 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
2275 def EnumerateFacenames(*args
, **kwargs
):
2276 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2277 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
2279 def EnumerateEncodings(*args
, **kwargs
):
2280 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2281 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
2283 def GetEncodings(*args
, **kwargs
):
2284 """GetEncodings() -> PyObject"""
2285 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
2287 GetEncodings
= staticmethod(GetEncodings
)
2288 def GetFacenames(*args
, **kwargs
):
2289 """GetFacenames() -> PyObject"""
2290 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
2292 GetFacenames
= staticmethod(GetFacenames
)
2293 def IsValidFacename(*args
, **kwargs
):
2295 IsValidFacename(String str) -> bool
2297 Convenience function that returns true if the given face name exist in
2300 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2302 IsValidFacename
= staticmethod(IsValidFacename
)
2303 _gdi_
.FontEnumerator_swigregister(FontEnumerator
)
2305 def FontEnumerator_GetEncodings(*args
):
2306 """FontEnumerator_GetEncodings() -> PyObject"""
2307 return _gdi_
.FontEnumerator_GetEncodings(*args
)
2309 def FontEnumerator_GetFacenames(*args
):
2310 """FontEnumerator_GetFacenames() -> PyObject"""
2311 return _gdi_
.FontEnumerator_GetFacenames(*args
)
2313 def FontEnumerator_IsValidFacename(*args
, **kwargs
):
2315 FontEnumerator_IsValidFacename(String str) -> bool
2317 Convenience function that returns true if the given face name exist in
2320 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2322 #---------------------------------------------------------------------------
2324 Layout_Default
= _gdi_
.Layout_Default
2325 Layout_LeftToRight
= _gdi_
.Layout_LeftToRight
2326 Layout_RightToLeft
= _gdi_
.Layout_RightToLeft
2327 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
2328 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
2329 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
2330 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
2331 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
2332 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
2333 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
2334 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
2335 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
2336 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
2337 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
2338 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
2339 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
2340 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
2341 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
2342 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
2343 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
2344 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
2345 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
2346 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
2347 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
2348 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
2349 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
2350 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
2351 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
2352 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
2353 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
2354 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
2355 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
2356 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
2357 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
2358 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
2359 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
2360 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
2361 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
2362 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
2363 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
2364 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
2365 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
2366 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
2367 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
2368 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
2369 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
2370 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
2371 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
2372 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
2373 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
2374 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
2375 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
2376 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
2377 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
2378 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
2379 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
2380 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
2381 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
2382 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
2383 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
2384 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
2385 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
2386 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
2387 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
2388 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
2389 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
2390 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
2391 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
2392 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
2393 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
2394 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
2395 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
2396 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
2397 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
2398 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
2399 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
2400 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
2401 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
2402 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
2403 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
2404 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2405 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2406 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2407 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2408 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2409 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2410 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2411 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2412 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2413 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2414 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2415 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2416 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2417 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2418 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2419 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2420 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2421 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2422 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2423 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2424 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2425 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2426 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2427 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2428 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2429 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2430 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2431 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2432 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2433 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2434 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2435 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2436 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2437 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2438 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2439 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2440 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2441 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2442 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2443 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2444 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2445 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2446 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2447 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2448 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2449 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2450 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2451 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2452 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2453 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2454 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2455 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2456 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2457 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2458 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2459 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2460 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2461 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2462 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2463 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2464 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2465 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2466 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2467 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2468 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2469 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2470 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2471 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2472 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2473 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2474 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2475 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2476 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2477 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2478 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2479 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2480 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2481 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2482 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2483 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2484 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2485 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2486 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2487 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2488 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2489 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2490 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2491 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2492 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2493 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2494 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2495 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2496 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2497 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2498 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2499 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2500 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2501 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2502 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2503 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2504 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2505 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2506 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2507 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2508 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2509 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2510 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2511 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2512 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2513 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2514 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2515 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2516 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2517 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2518 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2519 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2520 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2521 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2522 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2523 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2524 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2525 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2526 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2527 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2528 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2529 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2530 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2531 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2532 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2533 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2534 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2535 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2536 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2537 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2538 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2539 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2540 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2541 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2542 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2543 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2544 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2545 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2546 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2547 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2548 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2549 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2550 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2551 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2552 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2553 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2554 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2555 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2556 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2557 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2558 class LanguageInfo(object):
2559 """Proxy of C++ LanguageInfo class"""
2560 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2561 def __init__(self
): raise AttributeError, "No constructor defined"
2562 __repr__
= _swig_repr
2563 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2564 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2565 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2566 _gdi_
.LanguageInfo_swigregister(LanguageInfo
)
2568 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2569 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2570 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2571 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2572 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2573 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2574 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2575 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2576 class Locale(object):
2577 """Proxy of C++ Locale class"""
2578 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2579 __repr__
= _swig_repr
2580 def __init__(self
, *args
, **kwargs
):
2581 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2582 _gdi_
.Locale_swiginit(self
,_gdi_
.new_Locale(*args
, **kwargs
))
2583 __swig_destroy__
= _gdi_
.delete_Locale
2584 __del__
= lambda self
: None;
2585 def Init1(*args
, **kwargs
):
2587 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2588 bool bLoadDefault=True,
2589 bool bConvertEncoding=False) -> bool
2591 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2593 def Init2(*args
, **kwargs
):
2594 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2595 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2597 def Init(self
, *_args
, **_kwargs
):
2598 if type(_args
[0]) in [type(''), type(u
'')]:
2599 val
= self
.Init1(*_args
, **_kwargs
)
2601 val
= self
.Init2(*_args
, **_kwargs
)
2604 def GetSystemLanguage(*args
, **kwargs
):
2605 """GetSystemLanguage() -> int"""
2606 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2608 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2609 def GetSystemEncoding(*args
, **kwargs
):
2610 """GetSystemEncoding() -> int"""
2611 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2613 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2614 def GetSystemEncodingName(*args
, **kwargs
):
2615 """GetSystemEncodingName() -> String"""
2616 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2618 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2619 def IsOk(*args
, **kwargs
):
2620 """IsOk(self) -> bool"""
2621 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2623 def __nonzero__(self
): return self
.IsOk()
2624 def GetLocale(*args
, **kwargs
):
2625 """GetLocale(self) -> String"""
2626 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2628 def GetLanguage(*args
, **kwargs
):
2629 """GetLanguage(self) -> int"""
2630 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2632 def GetSysName(*args
, **kwargs
):
2633 """GetSysName(self) -> String"""
2634 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2636 def GetCanonicalName(*args
, **kwargs
):
2637 """GetCanonicalName(self) -> String"""
2638 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2640 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2641 """AddCatalogLookupPathPrefix(String prefix)"""
2642 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2644 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2645 def AddCatalog(*args
, **kwargs
):
2646 """AddCatalog(self, String szDomain) -> bool"""
2647 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2649 def IsLoaded(*args
, **kwargs
):
2650 """IsLoaded(self, String szDomain) -> bool"""
2651 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2653 def GetLanguageInfo(*args
, **kwargs
):
2654 """GetLanguageInfo(int lang) -> LanguageInfo"""
2655 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2657 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2658 def GetLanguageName(*args
, **kwargs
):
2659 """GetLanguageName(int lang) -> String"""
2660 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2662 GetLanguageName
= staticmethod(GetLanguageName
)
2663 def FindLanguageInfo(*args
, **kwargs
):
2664 """FindLanguageInfo(String locale) -> LanguageInfo"""
2665 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2667 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2668 def AddLanguage(*args
, **kwargs
):
2669 """AddLanguage(LanguageInfo info)"""
2670 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2672 AddLanguage
= staticmethod(AddLanguage
)
2673 def GetString(*args
, **kwargs
):
2674 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2675 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2677 def GetName(*args
, **kwargs
):
2678 """GetName(self) -> String"""
2679 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2681 CanonicalName
= property(GetCanonicalName
,doc
="See `GetCanonicalName`")
2682 Language
= property(GetLanguage
,doc
="See `GetLanguage`")
2683 Locale
= property(GetLocale
,doc
="See `GetLocale`")
2684 Name
= property(GetName
,doc
="See `GetName`")
2685 String
= property(GetString
,doc
="See `GetString`")
2686 SysName
= property(GetSysName
,doc
="See `GetSysName`")
2687 _gdi_
.Locale_swigregister(Locale
)
2689 def Locale_GetSystemLanguage(*args
):
2690 """Locale_GetSystemLanguage() -> int"""
2691 return _gdi_
.Locale_GetSystemLanguage(*args
)
2693 def Locale_GetSystemEncoding(*args
):
2694 """Locale_GetSystemEncoding() -> int"""
2695 return _gdi_
.Locale_GetSystemEncoding(*args
)
2697 def Locale_GetSystemEncodingName(*args
):
2698 """Locale_GetSystemEncodingName() -> String"""
2699 return _gdi_
.Locale_GetSystemEncodingName(*args
)
2701 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2702 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2703 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2705 def Locale_GetLanguageInfo(*args
, **kwargs
):
2706 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2707 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2709 def Locale_GetLanguageName(*args
, **kwargs
):
2710 """Locale_GetLanguageName(int lang) -> String"""
2711 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2713 def Locale_FindLanguageInfo(*args
, **kwargs
):
2714 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2715 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2717 def Locale_AddLanguage(*args
, **kwargs
):
2718 """Locale_AddLanguage(LanguageInfo info)"""
2719 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2721 class PyLocale(Locale
):
2722 """Proxy of C++ PyLocale class"""
2723 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2724 __repr__
= _swig_repr
2725 def __init__(self
, *args
, **kwargs
):
2726 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
2727 _gdi_
.PyLocale_swiginit(self
,_gdi_
.new_PyLocale(*args
, **kwargs
))
2728 self
._setCallbackInfo
(self
, PyLocale
)
2730 __swig_destroy__
= _gdi_
.delete_PyLocale
2731 __del__
= lambda self
: None;
2732 def _setCallbackInfo(*args
, **kwargs
):
2733 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
2734 return _gdi_
.PyLocale__setCallbackInfo(*args
, **kwargs
)
2736 def GetSingularString(*args
, **kwargs
):
2737 """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar"""
2738 return _gdi_
.PyLocale_GetSingularString(*args
, **kwargs
)
2740 def GetPluralString(*args
, **kwargs
):
2742 GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n,
2743 wxChar szDomain=None) -> wxChar
2745 return _gdi_
.PyLocale_GetPluralString(*args
, **kwargs
)
2747 _gdi_
.PyLocale_swigregister(PyLocale
)
2750 def GetLocale(*args
):
2751 """GetLocale() -> Locale"""
2752 return _gdi_
.GetLocale(*args
)
2753 #---------------------------------------------------------------------------
2755 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2756 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2757 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2758 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2759 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2760 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2761 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2762 class EncodingConverter(_core
.Object
):
2763 """Proxy of C++ EncodingConverter class"""
2764 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2765 __repr__
= _swig_repr
2766 def __init__(self
, *args
, **kwargs
):
2767 """__init__(self) -> EncodingConverter"""
2768 _gdi_
.EncodingConverter_swiginit(self
,_gdi_
.new_EncodingConverter(*args
, **kwargs
))
2769 __swig_destroy__
= _gdi_
.delete_EncodingConverter
2770 __del__
= lambda self
: None;
2771 def Init(*args
, **kwargs
):
2772 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2773 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2775 def Convert(*args
, **kwargs
):
2776 """Convert(self, String input) -> String"""
2777 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2779 def GetPlatformEquivalents(*args
, **kwargs
):
2780 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2781 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2783 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
2784 def GetAllEquivalents(*args
, **kwargs
):
2785 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2786 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2788 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
2789 def CanConvert(*args
, **kwargs
):
2790 """CanConvert(int encIn, int encOut) -> bool"""
2791 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2793 CanConvert
= staticmethod(CanConvert
)
2794 def __nonzero__(self
): return self
.IsOk()
2795 _gdi_
.EncodingConverter_swigregister(EncodingConverter
)
2797 def GetTranslation(*args
):
2799 GetTranslation(String str) -> String
2800 GetTranslation(String str, String domain) -> String
2801 GetTranslation(String str, String strPlural, size_t n) -> String
2802 GetTranslation(String str, String strPlural, size_t n, String domain) -> String
2804 return _gdi_
.GetTranslation(*args
)
2806 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
2807 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2808 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2810 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
2811 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2812 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2814 def EncodingConverter_CanConvert(*args
, **kwargs
):
2815 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2816 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2818 #----------------------------------------------------------------------------
2819 # On MSW add the directory where the wxWidgets catalogs were installed
2820 # to the default catalog path.
2821 if wx
.Platform
== "__WXMSW__":
2823 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "i18n")
2824 Locale
.AddCatalogLookupPathPrefix(_localedir
)
2827 #----------------------------------------------------------------------------
2829 #---------------------------------------------------------------------------
2831 class DC(_core
.Object
):
2833 A wx.DC is a device context onto which graphics and text can be
2834 drawn. It is intended to represent a number of output devices in a
2835 generic way, so a window can have a device context associated with it,
2836 and a printer also has a device context. In this way, the same piece
2837 of code may write to a number of different devices, if the device
2838 context is used as a parameter.
2840 Derived types of wxDC have documentation for specific features only,
2841 so refer to this section for most device context information.
2843 The wx.DC class is abstract and can not be instantiated, you must use
2844 one of the derived classes instead. Which one will depend on the
2845 situation in which it is used.
2847 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2848 def __init__(self
): raise AttributeError, "No constructor defined"
2849 __repr__
= _swig_repr
2850 __swig_destroy__
= _gdi_
.delete_DC
2851 __del__
= lambda self
: None;
2852 # These have been deprecated in wxWidgets. Since they never
2853 # really did anything to begin with, just make them be NOPs.
2854 def BeginDrawing(self
): pass
2855 def EndDrawing(self
): pass
2857 def FloodFill(*args
, **kwargs
):
2859 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2861 Flood fills the device context starting from the given point, using
2862 the current brush colour, and using a style:
2864 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2865 the given colour is encountered.
2867 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2870 Returns False if the operation failed.
2872 Note: The present implementation for non-Windows platforms may fail to
2873 find colour borders if the pixels do not match the colour
2874 exactly. However the function will still return true.
2876 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
2878 def FloodFillPoint(*args
, **kwargs
):
2880 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2882 Flood fills the device context starting from the given point, using
2883 the current brush colour, and using a style:
2885 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2886 the given colour is encountered.
2888 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2891 Returns False if the operation failed.
2893 Note: The present implementation for non-Windows platforms may fail to
2894 find colour borders if the pixels do not match the colour
2895 exactly. However the function will still return true.
2897 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
2899 def GradientFillConcentric(*args
, **kwargs
):
2901 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
2904 Fill the area specified by rect with a radial gradient, starting from
2905 initialColour in the center of the circle and fading to destColour on
2906 the outside of the circle. The circleCenter argument is the relative
2907 coordinants of the center of the circle in the specified rect.
2909 Note: Currently this function is very slow, don't use it for real-time
2912 return _gdi_
.DC_GradientFillConcentric(*args
, **kwargs
)
2914 def GradientFillLinear(*args
, **kwargs
):
2916 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
2917 int nDirection=EAST)
2919 Fill the area specified by rect with a linear gradient, starting from
2920 initialColour and eventually fading to destColour. The nDirection
2921 parameter specifies the direction of the colour change, default is to
2922 use initialColour on the left part of the rectangle and destColour on
2925 return _gdi_
.DC_GradientFillLinear(*args
, **kwargs
)
2927 def GetPixel(*args
, **kwargs
):
2929 GetPixel(self, int x, int y) -> Colour
2931 Gets the colour at the specified location on the DC.
2933 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
2935 def GetPixelPoint(*args
, **kwargs
):
2936 """GetPixelPoint(self, Point pt) -> Colour"""
2937 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
2939 def DrawLine(*args
, **kwargs
):
2941 DrawLine(self, int x1, int y1, int x2, int y2)
2943 Draws a line from the first point to the second. The current pen is
2944 used for drawing the line. Note that the second point is *not* part of
2945 the line and is not drawn by this function (this is consistent with
2946 the behaviour of many other toolkits).
2948 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
2950 def DrawLinePoint(*args
, **kwargs
):
2952 DrawLinePoint(self, Point pt1, Point pt2)
2954 Draws a line from the first point to the second. The current pen is
2955 used for drawing the line. Note that the second point is *not* part of
2956 the line and is not drawn by this function (this is consistent with
2957 the behaviour of many other toolkits).
2959 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
2961 def CrossHair(*args
, **kwargs
):
2963 CrossHair(self, int x, int y)
2965 Displays a cross hair using the current pen. This is a vertical and
2966 horizontal line the height and width of the window, centred on the
2969 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
2971 def CrossHairPoint(*args
, **kwargs
):
2973 CrossHairPoint(self, Point pt)
2975 Displays a cross hair using the current pen. This is a vertical and
2976 horizontal line the height and width of the window, centred on the
2979 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
2981 def DrawArc(*args
, **kwargs
):
2983 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2985 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2986 the first point to the second. The current pen is used for the outline
2987 and the current brush for filling the shape.
2989 The arc is drawn in an anticlockwise direction from the start point to
2992 return _gdi_
.DC_DrawArc(*args
, **kwargs
)
2994 def DrawArcPoint(*args
, **kwargs
):
2996 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2998 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2999 the first point to the second. The current pen is used for the outline
3000 and the current brush for filling the shape.
3002 The arc is drawn in an anticlockwise direction from the start point to
3005 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
3007 def DrawCheckMark(*args
, **kwargs
):
3009 DrawCheckMark(self, int x, int y, int width, int height)
3011 Draws a check mark inside the given rectangle.
3013 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
3015 def DrawCheckMarkRect(*args
, **kwargs
):
3017 DrawCheckMarkRect(self, Rect rect)
3019 Draws a check mark inside the given rectangle.
3021 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
3023 def DrawEllipticArc(*args
, **kwargs
):
3025 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3027 Draws an arc of an ellipse, with the given rectangle defining the
3028 bounds of the ellipse. The current pen is used for drawing the arc and
3029 the current brush is used for drawing the pie.
3031 The *start* and *end* parameters specify the start and end of the arc
3032 relative to the three-o'clock position from the center of the
3033 rectangle. Angles are specified in degrees (360 is a complete
3034 circle). Positive values mean counter-clockwise motion. If start is
3035 equal to end, a complete ellipse will be drawn.
3037 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
3039 def DrawEllipticArcPointSize(*args
, **kwargs
):
3041 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3043 Draws an arc of an ellipse, with the given rectangle defining the
3044 bounds of the ellipse. The current pen is used for drawing the arc and
3045 the current brush is used for drawing the pie.
3047 The *start* and *end* parameters specify the start and end of the arc
3048 relative to the three-o'clock position from the center of the
3049 rectangle. Angles are specified in degrees (360 is a complete
3050 circle). Positive values mean counter-clockwise motion. If start is
3051 equal to end, a complete ellipse will be drawn.
3053 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
3055 def DrawPoint(*args
, **kwargs
):
3057 DrawPoint(self, int x, int y)
3059 Draws a point using the current pen.
3061 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
3063 def DrawPointPoint(*args
, **kwargs
):
3065 DrawPointPoint(self, Point pt)
3067 Draws a point using the current pen.
3069 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
3071 def DrawRectangle(*args
, **kwargs
):
3073 DrawRectangle(self, int x, int y, int width, int height)
3075 Draws a rectangle with the given top left corner, and with the given
3076 size. The current pen is used for the outline and the current brush
3077 for filling the shape.
3079 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
3081 def DrawRectangleRect(*args
, **kwargs
):
3083 DrawRectangleRect(self, Rect rect)
3085 Draws a rectangle with the given top left corner, and with the given
3086 size. The current pen is used for the outline and the current brush
3087 for filling the shape.
3089 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
3091 def DrawRectanglePointSize(*args
, **kwargs
):
3093 DrawRectanglePointSize(self, Point pt, Size sz)
3095 Draws a rectangle with the given top left corner, and with the given
3096 size. The current pen is used for the outline and the current brush
3097 for filling the shape.
3099 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
3101 def DrawRoundedRectangle(*args
, **kwargs
):
3103 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3105 Draws a rectangle with the given top left corner, and with the given
3106 size. The corners are quarter-circles using the given radius. The
3107 current pen is used for the outline and the current brush for filling
3110 If radius is positive, the value is assumed to be the radius of the
3111 rounded corner. If radius is negative, the absolute value is assumed
3112 to be the proportion of the smallest dimension of the rectangle. This
3113 means that the corner can be a sensible size relative to the size of
3114 the rectangle, and also avoids the strange effects X produces when the
3115 corners are too big for the rectangle.
3117 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
3119 def DrawRoundedRectangleRect(*args
, **kwargs
):
3121 DrawRoundedRectangleRect(self, Rect r, double radius)
3123 Draws a rectangle with the given top left corner, and with the given
3124 size. The corners are quarter-circles using the given radius. The
3125 current pen is used for the outline and the current brush for filling
3128 If radius is positive, the value is assumed to be the radius of the
3129 rounded corner. If radius is negative, the absolute value is assumed
3130 to be the proportion of the smallest dimension of the rectangle. This
3131 means that the corner can be a sensible size relative to the size of
3132 the rectangle, and also avoids the strange effects X produces when the
3133 corners are too big for the rectangle.
3135 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
3137 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
3139 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3141 Draws a rectangle with the given top left corner, and with the given
3142 size. The corners are quarter-circles using the given radius. The
3143 current pen is used for the outline and the current brush for filling
3146 If radius is positive, the value is assumed to be the radius of the
3147 rounded corner. If radius is negative, the absolute value is assumed
3148 to be the proportion of the smallest dimension of the rectangle. This
3149 means that the corner can be a sensible size relative to the size of
3150 the rectangle, and also avoids the strange effects X produces when the
3151 corners are too big for the rectangle.
3153 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
3155 def DrawCircle(*args
, **kwargs
):
3157 DrawCircle(self, int x, int y, int radius)
3159 Draws a circle with the given center point and radius. The current
3160 pen is used for the outline and the current brush for filling the
3163 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
3165 def DrawCirclePoint(*args
, **kwargs
):
3167 DrawCirclePoint(self, Point pt, int radius)
3169 Draws a circle with the given center point and radius. The current
3170 pen is used for the outline and the current brush for filling the
3173 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
3175 def DrawEllipse(*args
, **kwargs
):
3177 DrawEllipse(self, int x, int y, int width, int height)
3179 Draws an ellipse contained in the specified rectangle. The current pen
3180 is used for the outline and the current brush for filling the shape.
3182 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
3184 def DrawEllipseRect(*args
, **kwargs
):
3186 DrawEllipseRect(self, Rect rect)
3188 Draws an ellipse contained in the specified rectangle. The current pen
3189 is used for the outline and the current brush for filling the shape.
3191 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
3193 def DrawEllipsePointSize(*args
, **kwargs
):
3195 DrawEllipsePointSize(self, Point pt, Size sz)
3197 Draws an ellipse contained in the specified rectangle. The current pen
3198 is used for the outline and the current brush for filling the shape.
3200 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
3202 def DrawIcon(*args
, **kwargs
):
3204 DrawIcon(self, Icon icon, int x, int y)
3206 Draw an icon on the display (does nothing if the device context is
3207 PostScript). This can be the simplest way of drawing bitmaps on a
3210 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
3212 def DrawIconPoint(*args
, **kwargs
):
3214 DrawIconPoint(self, Icon icon, Point pt)
3216 Draw an icon on the display (does nothing if the device context is
3217 PostScript). This can be the simplest way of drawing bitmaps on a
3220 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
3222 def DrawBitmap(*args
, **kwargs
):
3224 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3226 Draw a bitmap on the device context at the specified point. If
3227 *transparent* is true and the bitmap has a transparency mask, (or
3228 alpha channel on the platforms that support it) then the bitmap will
3229 be drawn transparently.
3231 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
3233 def DrawBitmapPoint(*args
, **kwargs
):
3235 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3237 Draw a bitmap on the device context at the specified point. If
3238 *transparent* is true and the bitmap has a transparency mask, (or
3239 alpha channel on the platforms that support it) then the bitmap will
3240 be drawn transparently.
3242 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
3244 def DrawText(*args
, **kwargs
):
3246 DrawText(self, String text, int x, int y)
3248 Draws a text string at the specified point, using the current text
3249 font, and the current text foreground and background colours.
3251 The coordinates refer to the top-left corner of the rectangle bounding
3252 the string. See `GetTextExtent` for how to get the dimensions of a
3253 text string, which can be used to position the text more precisely.
3255 **NOTE**: under wxGTK the current logical function is used by this
3256 function but it is ignored by wxMSW. Thus, you should avoid using
3257 logical functions with this function in portable programs.
3259 return _gdi_
.DC_DrawText(*args
, **kwargs
)
3261 def DrawTextPoint(*args
, **kwargs
):
3263 DrawTextPoint(self, String text, Point pt)
3265 Draws a text string at the specified point, using the current text
3266 font, and the current text foreground and background colours.
3268 The coordinates refer to the top-left corner of the rectangle bounding
3269 the string. See `GetTextExtent` for how to get the dimensions of a
3270 text string, which can be used to position the text more precisely.
3272 **NOTE**: under wxGTK the current logical function is used by this
3273 function but it is ignored by wxMSW. Thus, you should avoid using
3274 logical functions with this function in portable programs.
3276 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
3278 def DrawRotatedText(*args
, **kwargs
):
3280 DrawRotatedText(self, String text, int x, int y, double angle)
3282 Draws the text rotated by *angle* degrees, if supported by the platform.
3284 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3285 function. In particular, a font different from ``wx.NORMAL_FONT``
3286 should be used as the it is not normally a TrueType
3287 font. ``wx.SWISS_FONT`` is an example of a font which is.
3289 return _gdi_
.DC_DrawRotatedText(*args
, **kwargs
)
3291 def DrawRotatedTextPoint(*args
, **kwargs
):
3293 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3295 Draws the text rotated by *angle* degrees, if supported by the platform.
3297 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3298 function. In particular, a font different from ``wx.NORMAL_FONT``
3299 should be used as the it is not normally a TrueType
3300 font. ``wx.SWISS_FONT`` is an example of a font which is.
3302 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
3304 def Blit(*args
, **kwargs
):
3306 Blit(self, int xdest, int ydest, int width, int height, DC source,
3307 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3308 int xsrcMask=-1, int ysrcMask=-1) -> bool
3310 Copy from a source DC to this DC. Parameters specify the destination
3311 coordinates, size of area to copy, source DC, source coordinates,
3312 logical function, whether to use a bitmap mask, and mask source
3315 return _gdi_
.DC_Blit(*args
, **kwargs
)
3317 def BlitPointSize(*args
, **kwargs
):
3319 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3320 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3322 Copy from a source DC to this DC. Parameters specify the destination
3323 coordinates, size of area to copy, source DC, source coordinates,
3324 logical function, whether to use a bitmap mask, and mask source
3327 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
3329 def SetClippingRegion(*args
, **kwargs
):
3331 SetClippingRegion(self, int x, int y, int width, int height)
3333 Sets the clipping region for this device context to the intersection
3334 of the given region described by the parameters of this method and the
3335 previously set clipping region. You should call `DestroyClippingRegion`
3336 if you want to set the clipping region exactly to the region
3339 The clipping region is an area to which drawing is
3340 restricted. Possible uses for the clipping region are for clipping
3341 text or for speeding up window redraws when only a known area of the
3344 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
3346 def SetClippingRegionPointSize(*args
, **kwargs
):
3348 SetClippingRegionPointSize(self, Point pt, Size sz)
3350 Sets the clipping region for this device context to the intersection
3351 of the given region described by the parameters of this method and the
3352 previously set clipping region. You should call `DestroyClippingRegion`
3353 if you want to set the clipping region exactly to the region
3356 The clipping region is an area to which drawing is
3357 restricted. Possible uses for the clipping region are for clipping
3358 text or for speeding up window redraws when only a known area of the
3361 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
3363 def SetClippingRegionAsRegion(*args
, **kwargs
):
3365 SetClippingRegionAsRegion(self, Region region)
3367 Sets the clipping region for this device context to the intersection
3368 of the given region described by the parameters of this method and the
3369 previously set clipping region. You should call `DestroyClippingRegion`
3370 if you want to set the clipping region exactly to the region
3373 The clipping region is an area to which drawing is
3374 restricted. Possible uses for the clipping region are for clipping
3375 text or for speeding up window redraws when only a known area of the
3378 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
3380 def SetClippingRect(*args
, **kwargs
):
3382 SetClippingRect(self, Rect rect)
3384 Sets the clipping region for this device context to the intersection
3385 of the given region described by the parameters of this method and the
3386 previously set clipping region. You should call `DestroyClippingRegion`
3387 if you want to set the clipping region exactly to the region
3390 The clipping region is an area to which drawing is
3391 restricted. Possible uses for the clipping region are for clipping
3392 text or for speeding up window redraws when only a known area of the
3395 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
3397 def DrawLines(*args
, **kwargs
):
3399 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3401 Draws lines using a sequence of `wx.Point` objects, adding the
3402 optional offset coordinate. The current pen is used for drawing the
3405 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
3407 def DrawPolygon(*args
, **kwargs
):
3409 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3410 int fillStyle=ODDEVEN_RULE)
3412 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3413 the optional offset coordinate. The last argument specifies the fill
3414 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3416 The current pen is used for drawing the outline, and the current brush
3417 for filling the shape. Using a transparent brush suppresses
3418 filling. Note that wxWidgets automatically closes the first and last
3421 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3423 def DrawLabel(*args
, **kwargs
):
3425 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3428 Draw *text* within the specified rectangle, abiding by the alignment
3429 flags. Will additionally emphasize the character at *indexAccel* if
3432 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3434 def DrawImageLabel(*args
, **kwargs
):
3436 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3437 int indexAccel=-1) -> Rect
3439 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3440 drawing it) within the specified rectangle, abiding by the alignment
3441 flags. Will additionally emphasize the character at *indexAccel* if
3442 it is not -1. Returns the bounding rectangle.
3444 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3446 def DrawSpline(*args
, **kwargs
):
3448 DrawSpline(self, List points)
3450 Draws a spline between all given control points, (a list of `wx.Point`
3451 objects) using the current pen. The spline is drawn using a series of
3452 lines, using an algorithm taken from the X drawing program 'XFIG'.
3454 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3456 def Clear(*args
, **kwargs
):
3460 Clears the device context using the current background brush.
3462 return _gdi_
.DC_Clear(*args
, **kwargs
)
3464 def StartDoc(*args
, **kwargs
):
3466 StartDoc(self, String message) -> bool
3468 Starts a document (only relevant when outputting to a
3469 printer). *Message* is a message to show whilst printing.
3471 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3473 def EndDoc(*args
, **kwargs
):
3477 Ends a document (only relevant when outputting to a printer).
3479 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3481 def StartPage(*args
, **kwargs
):
3485 Starts a document page (only relevant when outputting to a printer).
3487 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3489 def EndPage(*args
, **kwargs
):
3493 Ends a document page (only relevant when outputting to a printer).
3495 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3497 def SetFont(*args
, **kwargs
):
3499 SetFont(self, Font font)
3501 Sets the current font for the DC. It must be a valid font, in
3502 particular you should not pass ``wx.NullFont`` to this method.
3504 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3506 def SetPen(*args
, **kwargs
):
3508 SetPen(self, Pen pen)
3510 Sets the current pen for the DC.
3512 If the argument is ``wx.NullPen``, the current pen is selected out of the
3513 device context, and the original pen restored.
3515 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3517 def SetBrush(*args
, **kwargs
):
3519 SetBrush(self, Brush brush)
3521 Sets the current brush for the DC.
3523 If the argument is ``wx.NullBrush``, the current brush is selected out
3524 of the device context, and the original brush restored, allowing the
3525 current brush to be destroyed safely.
3527 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3529 def SetBackground(*args
, **kwargs
):
3531 SetBackground(self, Brush brush)
3533 Sets the current background brush for the DC.
3535 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3537 def SetBackgroundMode(*args
, **kwargs
):
3539 SetBackgroundMode(self, int mode)
3541 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3542 determines whether text will be drawn with a background colour or
3545 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3547 def SetPalette(*args
, **kwargs
):
3549 SetPalette(self, Palette palette)
3551 If this is a window DC or memory DC, assigns the given palette to the
3552 window or bitmap associated with the DC. If the argument is
3553 ``wx.NullPalette``, the current palette is selected out of the device
3554 context, and the original palette restored.
3556 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3558 def DestroyClippingRegion(*args
, **kwargs
):
3560 DestroyClippingRegion(self)
3562 Destroys the current clipping region so that none of the DC is
3565 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3567 def GetClippingBox(*args
, **kwargs
):
3569 GetClippingBox() -> (x, y, width, height)
3571 Gets the rectangle surrounding the current clipping region.
3573 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3575 def GetClippingRect(*args
, **kwargs
):
3577 GetClippingRect(self) -> Rect
3579 Gets the rectangle surrounding the current clipping region.
3581 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3583 def GetCharHeight(*args
, **kwargs
):
3585 GetCharHeight(self) -> int
3587 Gets the character height of the currently set font.
3589 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3591 def GetCharWidth(*args
, **kwargs
):
3593 GetCharWidth(self) -> int
3595 Gets the average character width of the currently set font.
3597 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3599 def GetTextExtent(*args
, **kwargs
):
3601 GetTextExtent(wxString string) -> (width, height)
3603 Get the width and height of the text using the current font. Only
3604 works for single line strings.
3606 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3608 def GetFullTextExtent(*args
, **kwargs
):
3610 GetFullTextExtent(wxString string, Font font=None) ->
3611 (width, height, descent, externalLeading)
3613 Get the width, height, decent and leading of the text using the
3614 current or specified font. Only works for single line strings.
3616 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3618 def GetMultiLineTextExtent(*args
, **kwargs
):
3620 GetMultiLineTextExtent(wxString string, Font font=None) ->
3621 (width, height, lineHeight)
3623 Get the width, height, decent and leading of the text using the
3624 current or specified font. Works for single as well as multi-line
3627 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3629 def GetPartialTextExtents(*args
, **kwargs
):
3631 GetPartialTextExtents(self, text) -> [widths]
3633 Returns a list of integers such that each value is the distance in
3634 pixels from the begining of text to the coresponding character of
3635 *text*. The generic version simply builds a running total of the widths
3636 of each character using GetTextExtent, however if the various
3637 platforms have a native API function that is faster or more accurate
3638 than the generic implementation then it will be used instead.
3640 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3642 def GetSize(*args
, **kwargs
):
3644 GetSize(self) -> Size
3646 This gets the horizontal and vertical resolution in device units. It
3647 can be used to scale graphics to fit the page. For example, if *maxX*
3648 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3649 used in your application, the following code will scale the graphic to
3650 fit on the printer page::
3653 scaleX = maxX*1.0 / w
3654 scaleY = maxY*1.0 / h
3655 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3658 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3660 def GetSizeTuple(*args
, **kwargs
):
3662 GetSizeTuple() -> (width, height)
3664 This gets the horizontal and vertical resolution in device units. It
3665 can be used to scale graphics to fit the page. For example, if *maxX*
3666 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3667 used in your application, the following code will scale the graphic to
3668 fit on the printer page::
3671 scaleX = maxX*1.0 / w
3672 scaleY = maxY*1.0 / h
3673 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3676 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3678 def GetSizeMM(*args
, **kwargs
):
3680 GetSizeMM(self) -> Size
3682 Get the DC size in milimeters.
3684 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3686 def GetSizeMMTuple(*args
, **kwargs
):
3688 GetSizeMMTuple() -> (width, height)
3690 Get the DC size in milimeters.
3692 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3694 def DeviceToLogicalX(*args
, **kwargs
):
3696 DeviceToLogicalX(self, int x) -> int
3698 Convert device X coordinate to logical coordinate, using the current
3701 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
3703 def DeviceToLogicalY(*args
, **kwargs
):
3705 DeviceToLogicalY(self, int y) -> int
3707 Converts device Y coordinate to logical coordinate, using the current
3710 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
3712 def DeviceToLogicalXRel(*args
, **kwargs
):
3714 DeviceToLogicalXRel(self, int x) -> int
3716 Convert device X coordinate to relative logical coordinate, using the
3717 current mapping mode but ignoring the x axis orientation. Use this
3718 function for converting a width, for example.
3720 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
3722 def DeviceToLogicalYRel(*args
, **kwargs
):
3724 DeviceToLogicalYRel(self, int y) -> int
3726 Convert device Y coordinate to relative logical coordinate, using the
3727 current mapping mode but ignoring the y axis orientation. Use this
3728 function for converting a height, for example.
3730 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
3732 def LogicalToDeviceX(*args
, **kwargs
):
3734 LogicalToDeviceX(self, int x) -> int
3736 Converts logical X coordinate to device coordinate, using the current
3739 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
3741 def LogicalToDeviceY(*args
, **kwargs
):
3743 LogicalToDeviceY(self, int y) -> int
3745 Converts logical Y coordinate to device coordinate, using the current
3748 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
3750 def LogicalToDeviceXRel(*args
, **kwargs
):
3752 LogicalToDeviceXRel(self, int x) -> int
3754 Converts logical X coordinate to relative device coordinate, using the
3755 current mapping mode but ignoring the x axis orientation. Use this for
3756 converting a width, for example.
3758 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
3760 def LogicalToDeviceYRel(*args
, **kwargs
):
3762 LogicalToDeviceYRel(self, int y) -> int
3764 Converts logical Y coordinate to relative device coordinate, using the
3765 current mapping mode but ignoring the y axis orientation. Use this for
3766 converting a height, for example.
3768 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
3770 def CanDrawBitmap(*args
, **kwargs
):
3771 """CanDrawBitmap(self) -> bool"""
3772 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
3774 def CanGetTextExtent(*args
, **kwargs
):
3775 """CanGetTextExtent(self) -> bool"""
3776 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
3778 def GetDepth(*args
, **kwargs
):
3780 GetDepth(self) -> int
3782 Returns the colour depth of the DC.
3784 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
3786 def GetPPI(*args
, **kwargs
):
3788 GetPPI(self) -> Size
3790 Resolution in pixels per inch
3792 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
3794 def Ok(*args
, **kwargs
):
3798 Returns true if the DC is ok to use.
3800 return _gdi_
.DC_Ok(*args
, **kwargs
)
3802 def GetBackgroundMode(*args
, **kwargs
):
3804 GetBackgroundMode(self) -> int
3806 Returns the current background mode, either ``wx.SOLID`` or
3809 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
3811 def GetBackground(*args
, **kwargs
):
3813 GetBackground(self) -> Brush
3815 Gets the brush used for painting the background.
3817 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
3819 def GetBrush(*args
, **kwargs
):
3821 GetBrush(self) -> Brush
3823 Gets the current brush
3825 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
3827 def GetFont(*args
, **kwargs
):
3829 GetFont(self) -> Font
3831 Gets the current font
3833 return _gdi_
.DC_GetFont(*args
, **kwargs
)
3835 def GetPen(*args
, **kwargs
):
3839 Gets the current pen
3841 return _gdi_
.DC_GetPen(*args
, **kwargs
)
3843 def GetTextBackground(*args
, **kwargs
):
3845 GetTextBackground(self) -> Colour
3847 Gets the current text background colour
3849 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
3851 def GetTextForeground(*args
, **kwargs
):
3853 GetTextForeground(self) -> Colour
3855 Gets the current text foreground colour
3857 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
3859 def SetTextForeground(*args
, **kwargs
):
3861 SetTextForeground(self, Colour colour)
3863 Sets the current text foreground colour for the DC.
3865 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
3867 def SetTextBackground(*args
, **kwargs
):
3869 SetTextBackground(self, Colour colour)
3871 Sets the current text background colour for the DC.
3873 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
3875 def GetMapMode(*args
, **kwargs
):
3877 GetMapMode(self) -> int
3879 Gets the current *mapping mode* for the device context
3881 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
3883 def SetMapMode(*args
, **kwargs
):
3885 SetMapMode(self, int mode)
3887 The *mapping mode* of the device context defines the unit of
3888 measurement used to convert logical units to device units. The
3889 mapping mode can be one of the following:
3891 ================ =============================================
3892 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3894 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3895 wx.MM_METRIC Each logical unit is 1 mm.
3896 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3897 wx.MM_TEXT Each logical unit is 1 pixel.
3898 ================ =============================================
3901 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
3903 def GetUserScale(*args
, **kwargs
):
3905 GetUserScale(self) -> (xScale, yScale)
3907 Gets the current user scale factor (set by `SetUserScale`).
3909 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
3911 def SetUserScale(*args
, **kwargs
):
3913 SetUserScale(self, double x, double y)
3915 Sets the user scaling factor, useful for applications which require
3918 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
3920 def GetLogicalScale(*args
, **kwargs
):
3921 """GetLogicalScale() -> (xScale, yScale)"""
3922 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
3924 def SetLogicalScale(*args
, **kwargs
):
3925 """SetLogicalScale(self, double x, double y)"""
3926 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
3928 def GetLogicalOrigin(*args
, **kwargs
):
3929 """GetLogicalOrigin(self) -> Point"""
3930 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
3932 def GetLogicalOriginTuple(*args
, **kwargs
):
3933 """GetLogicalOriginTuple() -> (x,y)"""
3934 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
3936 def SetLogicalOrigin(*args
, **kwargs
):
3937 """SetLogicalOrigin(self, int x, int y)"""
3938 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
3940 def SetLogicalOriginPoint(*args
, **kwargs
):
3941 """SetLogicalOriginPoint(self, Point point)"""
3942 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
3944 def GetDeviceOrigin(*args
, **kwargs
):
3945 """GetDeviceOrigin(self) -> Point"""
3946 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
3948 def GetDeviceOriginTuple(*args
, **kwargs
):
3949 """GetDeviceOriginTuple() -> (x,y)"""
3950 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
3952 def SetDeviceOrigin(*args
, **kwargs
):
3953 """SetDeviceOrigin(self, int x, int y)"""
3954 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
3956 def SetDeviceOriginPoint(*args
, **kwargs
):
3957 """SetDeviceOriginPoint(self, Point point)"""
3958 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
3960 def SetAxisOrientation(*args
, **kwargs
):
3962 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3964 Sets the x and y axis orientation (i.e., the direction from lowest to
3965 highest values on the axis). The default orientation is the natural
3966 orientation, e.g. x axis from left to right and y axis from bottom up.
3968 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
3970 def GetLogicalFunction(*args
, **kwargs
):
3972 GetLogicalFunction(self) -> int
3974 Gets the current logical function (set by `SetLogicalFunction`).
3976 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
3978 def SetLogicalFunction(*args
, **kwargs
):
3980 SetLogicalFunction(self, int function)
3982 Sets the current logical function for the device context. This
3983 determines how a source pixel (from a pen or brush colour, or source
3984 device context if using `Blit`) combines with a destination pixel in
3985 the current device context.
3987 The possible values and their meaning in terms of source and
3988 destination pixel values are as follows:
3990 ================ ==========================
3992 wx.AND_INVERT (NOT src) AND dst
3993 wx.AND_REVERSE src AND (NOT dst)
3996 wx.EQUIV (NOT src) XOR dst
3998 wx.NAND (NOT src) OR (NOT dst)
3999 wx.NOR (NOT src) AND (NOT dst)
4002 wx.OR_INVERT (NOT src) OR dst
4003 wx.OR_REVERSE src OR (NOT dst)
4005 wx.SRC_INVERT NOT src
4007 ================ ==========================
4009 The default is wx.COPY, which simply draws with the current
4010 colour. The others combine the current colour and the background using
4011 a logical operation. wx.INVERT is commonly used for drawing rubber
4012 bands or moving outlines, since drawing twice reverts to the original
4016 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
4018 def ComputeScaleAndOrigin(*args
, **kwargs
):
4020 ComputeScaleAndOrigin(self)
4022 Performs all necessary computations for given platform and context
4023 type after each change of scale and origin parameters. Usually called
4024 automatically internally after such changes.
4027 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
4029 def SetOptimization(self
, optimize
):
4031 def GetOptimization(self
):
4034 SetOptimization
= wx
._deprecated
(SetOptimization
)
4035 GetOptimization
= wx
._deprecated
(GetOptimization
)
4037 def CalcBoundingBox(*args
, **kwargs
):
4039 CalcBoundingBox(self, int x, int y)
4041 Adds the specified point to the bounding box which can be retrieved
4042 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4044 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
4046 def CalcBoundingBoxPoint(*args
, **kwargs
):
4048 CalcBoundingBoxPoint(self, Point point)
4050 Adds the specified point to the bounding box which can be retrieved
4051 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4053 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
4055 def ResetBoundingBox(*args
, **kwargs
):
4057 ResetBoundingBox(self)
4059 Resets the bounding box: after a call to this function, the bounding
4060 box doesn't contain anything.
4062 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
4064 def MinX(*args
, **kwargs
):
4068 Gets the minimum horizontal extent used in drawing commands so far.
4070 return _gdi_
.DC_MinX(*args
, **kwargs
)
4072 def MaxX(*args
, **kwargs
):
4076 Gets the maximum horizontal extent used in drawing commands so far.
4078 return _gdi_
.DC_MaxX(*args
, **kwargs
)
4080 def MinY(*args
, **kwargs
):
4084 Gets the minimum vertical extent used in drawing commands so far.
4086 return _gdi_
.DC_MinY(*args
, **kwargs
)
4088 def MaxY(*args
, **kwargs
):
4092 Gets the maximum vertical extent used in drawing commands so far.
4094 return _gdi_
.DC_MaxY(*args
, **kwargs
)
4096 def GetBoundingBox(*args
, **kwargs
):
4098 GetBoundingBox() -> (x1,y1, x2,y2)
4100 Returns the min and max points used in drawing commands so far.
4102 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
4104 def __nonzero__(self
): return self
.Ok()
4105 def _DrawPointList(*args
, **kwargs
):
4106 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4107 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
4109 def _DrawLineList(*args
, **kwargs
):
4110 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4111 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
4113 def _DrawRectangleList(*args
, **kwargs
):
4114 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4115 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
4117 def _DrawEllipseList(*args
, **kwargs
):
4118 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4119 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
4121 def _DrawPolygonList(*args
, **kwargs
):
4122 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4123 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
4125 def _DrawTextList(*args
, **kwargs
):
4127 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4128 PyObject backgroundList) -> PyObject
4130 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
4132 def DrawPointList(self
, points
, pens
=None):
4134 Draw a list of points as quickly as possible.
4136 :param points: A sequence of 2-element sequences representing
4137 each point to draw, (x,y).
4138 :param pens: If None, then the current pen is used. If a
4139 single pen then it will be used for all points. If
4140 a list of pens then there should be one for each point
4145 elif isinstance(pens
, wx
.Pen
):
4147 elif len(pens
) != len(points
):
4148 raise ValueError('points and pens must have same length')
4149 return self
._DrawPointList
(points
, pens
, [])
4152 def DrawLineList(self
, lines
, pens
=None):
4154 Draw a list of lines as quickly as possible.
4156 :param lines: A sequence of 4-element sequences representing
4157 each line to draw, (x1,y1, x2,y2).
4158 :param pens: If None, then the current pen is used. If a
4159 single pen then it will be used for all lines. If
4160 a list of pens then there should be one for each line
4165 elif isinstance(pens
, wx
.Pen
):
4167 elif len(pens
) != len(lines
):
4168 raise ValueError('lines and pens must have same length')
4169 return self
._DrawLineList
(lines
, pens
, [])
4172 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
4174 Draw a list of rectangles as quickly as possible.
4176 :param rectangles: A sequence of 4-element sequences representing
4177 each rectangle to draw, (x,y, w,h).
4178 :param pens: If None, then the current pen is used. If a
4179 single pen then it will be used for all rectangles.
4180 If a list of pens then there should be one for each
4181 rectangle in rectangles.
4182 :param brushes: A brush or brushes to be used to fill the rectagles,
4183 with similar semantics as the pens parameter.
4187 elif isinstance(pens
, wx
.Pen
):
4189 elif len(pens
) != len(rectangles
):
4190 raise ValueError('rectangles and pens must have same length')
4193 elif isinstance(brushes
, wx
.Brush
):
4195 elif len(brushes
) != len(rectangles
):
4196 raise ValueError('rectangles and brushes must have same length')
4197 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
4200 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
4202 Draw a list of ellipses as quickly as possible.
4204 :param ellipses: A sequence of 4-element sequences representing
4205 each ellipse to draw, (x,y, w,h).
4206 :param pens: If None, then the current pen is used. If a
4207 single pen then it will be used for all ellipses.
4208 If a list of pens then there should be one for each
4209 ellipse in ellipses.
4210 :param brushes: A brush or brushes to be used to fill the ellipses,
4211 with similar semantics as the pens parameter.
4215 elif isinstance(pens
, wx
.Pen
):
4217 elif len(pens
) != len(ellipses
):
4218 raise ValueError('ellipses and pens must have same length')
4221 elif isinstance(brushes
, wx
.Brush
):
4223 elif len(brushes
) != len(ellipses
):
4224 raise ValueError('ellipses and brushes must have same length')
4225 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
4228 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
4230 Draw a list of polygons, each of which is a list of points.
4232 :param polygons: A sequence of sequences of sequences.
4233 [[(x1,y1),(x2,y2),(x3,y3)...],
4234 [(x1,y1),(x2,y2),(x3,y3)...]]
4236 :param pens: If None, then the current pen is used. If a
4237 single pen then it will be used for all polygons.
4238 If a list of pens then there should be one for each
4240 :param brushes: A brush or brushes to be used to fill the polygons,
4241 with similar semantics as the pens parameter.
4245 elif isinstance(pens
, wx
.Pen
):
4247 elif len(pens
) != len(polygons
):
4248 raise ValueError('polygons and pens must have same length')
4251 elif isinstance(brushes
, wx
.Brush
):
4253 elif len(brushes
) != len(polygons
):
4254 raise ValueError('polygons and brushes must have same length')
4255 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
4258 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
4260 Draw a list of strings using a list of coordinants for positioning each string.
4262 :param textList: A list of strings
4263 :param coords: A list of (x,y) positions
4264 :param foregrounds: A list of `wx.Colour` objects to use for the
4265 foregrounds of the strings.
4266 :param backgrounds: A list of `wx.Colour` objects to use for the
4267 backgrounds of the strings.
4269 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4270 If you want backgrounds to do anything.
4272 if type(textList
) == type(''):
4273 textList
= [textList
]
4274 elif len(textList
) != len(coords
):
4275 raise ValueError('textlist and coords must have same length')
4276 if foregrounds
is None:
4278 elif isinstance(foregrounds
, wx
.Colour
):
4279 foregrounds
= [foregrounds
]
4280 elif len(foregrounds
) != len(coords
):
4281 raise ValueError('foregrounds and coords must have same length')
4282 if backgrounds
is None:
4284 elif isinstance(backgrounds
, wx
.Colour
):
4285 backgrounds
= [backgrounds
]
4286 elif len(backgrounds
) != len(coords
):
4287 raise ValueError('backgrounds and coords must have same length')
4288 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
4290 Background
= property(GetBackground
,SetBackground
,doc
="See `GetBackground` and `SetBackground`")
4291 BackgroundMode
= property(GetBackgroundMode
,SetBackgroundMode
,doc
="See `GetBackgroundMode` and `SetBackgroundMode`")
4292 BoundingBox
= property(GetBoundingBox
,doc
="See `GetBoundingBox`")
4293 Brush
= property(GetBrush
,SetBrush
,doc
="See `GetBrush` and `SetBrush`")
4294 CharHeight
= property(GetCharHeight
,doc
="See `GetCharHeight`")
4295 CharWidth
= property(GetCharWidth
,doc
="See `GetCharWidth`")
4296 ClippingBox
= property(GetClippingBox
,doc
="See `GetClippingBox`")
4297 ClippingRect
= property(GetClippingRect
,SetClippingRect
,doc
="See `GetClippingRect` and `SetClippingRect`")
4298 Depth
= property(GetDepth
,doc
="See `GetDepth`")
4299 DeviceOrigin
= property(GetDeviceOrigin
,SetDeviceOrigin
,doc
="See `GetDeviceOrigin` and `SetDeviceOrigin`")
4300 Font
= property(GetFont
,SetFont
,doc
="See `GetFont` and `SetFont`")
4301 FullTextExtent
= property(GetFullTextExtent
,doc
="See `GetFullTextExtent`")
4302 LogicalFunction
= property(GetLogicalFunction
,SetLogicalFunction
,doc
="See `GetLogicalFunction` and `SetLogicalFunction`")
4303 LogicalOrigin
= property(GetLogicalOrigin
,SetLogicalOrigin
,doc
="See `GetLogicalOrigin` and `SetLogicalOrigin`")
4304 LogicalScale
= property(GetLogicalScale
,SetLogicalScale
,doc
="See `GetLogicalScale` and `SetLogicalScale`")
4305 MapMode
= property(GetMapMode
,SetMapMode
,doc
="See `GetMapMode` and `SetMapMode`")
4306 MultiLineTextExtent
= property(GetMultiLineTextExtent
,doc
="See `GetMultiLineTextExtent`")
4307 Optimization
= property(GetOptimization
,SetOptimization
,doc
="See `GetOptimization` and `SetOptimization`")
4308 PPI
= property(GetPPI
,doc
="See `GetPPI`")
4309 PartialTextExtents
= property(GetPartialTextExtents
,doc
="See `GetPartialTextExtents`")
4310 Pen
= property(GetPen
,SetPen
,doc
="See `GetPen` and `SetPen`")
4311 Pixel
= property(GetPixel
,doc
="See `GetPixel`")
4312 PixelPoint
= property(GetPixelPoint
,doc
="See `GetPixelPoint`")
4313 Size
= property(GetSize
,doc
="See `GetSize`")
4314 SizeMM
= property(GetSizeMM
,doc
="See `GetSizeMM`")
4315 TextBackground
= property(GetTextBackground
,SetTextBackground
,doc
="See `GetTextBackground` and `SetTextBackground`")
4316 TextExtent
= property(GetTextExtent
,doc
="See `GetTextExtent`")
4317 TextForeground
= property(GetTextForeground
,SetTextForeground
,doc
="See `GetTextForeground` and `SetTextForeground`")
4318 UserScale
= property(GetUserScale
,SetUserScale
,doc
="See `GetUserScale` and `SetUserScale`")
4319 _gdi_
.DC_swigregister(DC
)
4321 #---------------------------------------------------------------------------
4325 A memory device context provides a means to draw graphics onto a
4326 bitmap. A bitmap must be selected into the new memory DC before it may
4327 be used for anything. Typical usage is as follows::
4330 dc.SelectObject(bitmap)
4331 # draw on the dc usign any of the Draw methods
4332 dc.SelectObject(wx.NullBitmap)
4333 # the bitmap now contains wahtever was drawn upon it
4335 Note that the memory DC *must* be deleted (or the bitmap selected out
4336 of it) before a bitmap can be reselected into another memory DC.
4339 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4340 __repr__
= _swig_repr
4341 def __init__(self
, *args
, **kwargs
):
4343 __init__(self) -> MemoryDC
4345 Constructs a new memory device context.
4347 Use the Ok member to test whether the constructor was successful in
4348 creating a usable device context. Don't forget to select a bitmap into
4349 the DC before drawing on it.
4351 _gdi_
.MemoryDC_swiginit(self
,_gdi_
.new_MemoryDC(*args
, **kwargs
))
4352 def SelectObject(*args
, **kwargs
):
4354 SelectObject(self, Bitmap bitmap)
4356 Selects the bitmap into the device context, to use as the memory
4357 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4358 the DC, and therefore the bitmap, and also to use Blit to copy the
4361 If the argument is wx.NullBitmap (or some other uninitialised
4362 `wx.Bitmap`) the current bitmap is selected out of the device context,
4363 and the original bitmap restored, allowing the current bitmap to be
4366 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
4368 _gdi_
.MemoryDC_swigregister(MemoryDC
)
4370 def MemoryDCFromDC(*args
, **kwargs
):
4372 MemoryDCFromDC(DC oldDC) -> MemoryDC
4374 Creates a DC that is compatible with the oldDC.
4376 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
4379 #---------------------------------------------------------------------------
4381 BUFFER_VIRTUAL_AREA
= _gdi_
.BUFFER_VIRTUAL_AREA
4382 BUFFER_CLIENT_AREA
= _gdi_
.BUFFER_CLIENT_AREA
4383 class BufferedDC(MemoryDC
):
4385 This simple class provides a simple way to avoid flicker: when drawing
4386 on it, everything is in fact first drawn on an in-memory buffer (a
4387 `wx.Bitmap`) and then copied to the screen only once, when this object
4390 It can be used in the same way as any other device
4391 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
4392 want to use it in your EVT_PAINT handler, you should look at
4393 `wx.BufferedPaintDC`.
4396 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4397 __repr__
= _swig_repr
4398 def __init__(self
, *args
):
4400 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4401 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4403 Constructs a buffered DC.
4405 _gdi_
.BufferedDC_swiginit(self
,_gdi_
.new_BufferedDC(*args
))
4406 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
4408 __swig_destroy__
= _gdi_
.delete_BufferedDC
4409 __del__
= lambda self
: None;
4410 def UnMask(*args
, **kwargs
):
4414 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4415 can be effectively used once only). This is usually only called in
4418 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
4420 _gdi_
.BufferedDC_swigregister(BufferedDC
)
4422 class BufferedPaintDC(BufferedDC
):
4424 This is a subclass of `wx.BufferedDC` which can be used inside of an
4425 EVT_PAINT event handler. Just create an object of this class instead
4426 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4427 flicker. The only thing to watch out for is that if you are using this
4428 class together with `wx.ScrolledWindow`, you probably do **not** want
4429 to call `wx.Window.PrepareDC` on it as it already does this internally
4430 for the real underlying `wx.PaintDC`.
4432 If your window is already fully buffered in a `wx.Bitmap` then your
4433 EVT_PAINT handler can be as simple as just creating a
4434 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4435 automatically when it is destroyed. For example::
4437 def OnPaint(self, event):
4438 dc = wx.BufferedPaintDC(self, self.buffer)
4445 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4446 __repr__
= _swig_repr
4447 def __init__(self
, *args
, **kwargs
):
4449 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4451 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4452 provide the bitmap to be used for buffering or let this object create
4453 one internally (in the latter case, the size of the client part of the
4454 window is automatically used).
4458 _gdi_
.BufferedPaintDC_swiginit(self
,_gdi_
.new_BufferedPaintDC(*args
, **kwargs
))
4459 _gdi_
.BufferedPaintDC_swigregister(BufferedPaintDC
)
4461 #---------------------------------------------------------------------------
4465 A wxScreenDC can be used to paint anywhere on the screen. This should
4466 normally be constructed as a temporary stack object; don't store a
4470 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4471 __repr__
= _swig_repr
4472 def __init__(self
, *args
, **kwargs
):
4474 __init__(self) -> ScreenDC
4476 A wxScreenDC can be used to paint anywhere on the screen. This should
4477 normally be constructed as a temporary stack object; don't store a
4481 _gdi_
.ScreenDC_swiginit(self
,_gdi_
.new_ScreenDC(*args
, **kwargs
))
4482 def StartDrawingOnTopWin(*args
, **kwargs
):
4484 StartDrawingOnTopWin(self, Window window) -> bool
4486 Specify that the area of the screen to be drawn upon coincides with
4489 :see: `EndDrawingOnTop`
4491 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4493 def StartDrawingOnTop(*args
, **kwargs
):
4495 StartDrawingOnTop(self, Rect rect=None) -> bool
4497 Specify that the area is the given rectangle, or the whole screen if
4500 :see: `EndDrawingOnTop`
4502 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4504 def EndDrawingOnTop(*args
, **kwargs
):
4506 EndDrawingOnTop(self) -> bool
4508 Use this in conjunction with `StartDrawingOnTop` or
4509 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4510 top of existing windows. Without this, some window systems (such as X)
4511 only allow drawing to take place underneath other windows.
4513 You might use this pair of functions when implementing a drag feature,
4514 for example as in the `wx.SplitterWindow` implementation.
4516 These functions are probably obsolete since the X implementations
4517 allow drawing directly on the screen now. However, the fact that this
4518 function allows the screen to be refreshed afterwards may be useful
4519 to some applications.
4521 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4523 _gdi_
.ScreenDC_swigregister(ScreenDC
)
4525 #---------------------------------------------------------------------------
4529 A wx.ClientDC must be constructed if an application wishes to paint on
4530 the client area of a window from outside an EVT_PAINT event. This should
4531 normally be constructed as a temporary stack object; don't store a
4532 wx.ClientDC object long term.
4534 To draw on a window from within an EVT_PAINT handler, construct a
4535 `wx.PaintDC` object.
4537 To draw on the whole window including decorations, construct a
4538 `wx.WindowDC` object (Windows only).
4541 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4542 __repr__
= _swig_repr
4543 def __init__(self
, *args
, **kwargs
):
4545 __init__(self, Window win) -> ClientDC
4547 Constructor. Pass the window on which you wish to paint.
4549 _gdi_
.ClientDC_swiginit(self
,_gdi_
.new_ClientDC(*args
, **kwargs
))
4550 _gdi_
.ClientDC_swigregister(ClientDC
)
4552 #---------------------------------------------------------------------------
4556 A wx.PaintDC must be constructed if an application wishes to paint on
4557 the client area of a window from within an EVT_PAINT event
4558 handler. This should normally be constructed as a temporary stack
4559 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4560 handler, you **must** create a wx.PaintDC object within it even if you
4561 don't actually use it.
4563 Using wx.PaintDC within EVT_PAINT handlers is important because it
4564 automatically sets the clipping area to the damaged area of the
4565 window. Attempts to draw outside this area do not appear.
4567 To draw on a window from outside EVT_PAINT handlers, construct a
4568 `wx.ClientDC` object.
4571 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4572 __repr__
= _swig_repr
4573 def __init__(self
, *args
, **kwargs
):
4575 __init__(self, Window win) -> PaintDC
4577 Constructor. Pass the window on which you wish to paint.
4579 _gdi_
.PaintDC_swiginit(self
,_gdi_
.new_PaintDC(*args
, **kwargs
))
4580 _gdi_
.PaintDC_swigregister(PaintDC
)
4582 #---------------------------------------------------------------------------
4586 A wx.WindowDC must be constructed if an application wishes to paint on
4587 the whole area of a window (client and decorations). This should
4588 normally be constructed as a temporary stack object; don't store a
4591 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4592 __repr__
= _swig_repr
4593 def __init__(self
, *args
, **kwargs
):
4595 __init__(self, Window win) -> WindowDC
4597 Constructor. Pass the window on which you wish to paint.
4599 _gdi_
.WindowDC_swiginit(self
,_gdi_
.new_WindowDC(*args
, **kwargs
))
4600 _gdi_
.WindowDC_swigregister(WindowDC
)
4602 #---------------------------------------------------------------------------
4606 wx.MirrorDC is a simple wrapper class which is always associated with a
4607 real `wx.DC` object and either forwards all of its operations to it
4608 without changes (no mirroring takes place) or exchanges x and y
4609 coordinates which makes it possible to reuse the same code to draw a
4610 figure and its mirror -- i.e. reflection related to the diagonal line
4613 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4614 __repr__
= _swig_repr
4615 def __init__(self
, *args
, **kwargs
):
4617 __init__(self, DC dc, bool mirror) -> MirrorDC
4619 Creates a mirrored DC associated with the real *dc*. Everything drawn
4620 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4623 _gdi_
.MirrorDC_swiginit(self
,_gdi_
.new_MirrorDC(*args
, **kwargs
))
4624 _gdi_
.MirrorDC_swigregister(MirrorDC
)
4626 #---------------------------------------------------------------------------
4628 class PostScriptDC(DC
):
4629 """This is a `wx.DC` that can write to PostScript files on any platform."""
4630 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4631 __repr__
= _swig_repr
4632 def __init__(self
, *args
, **kwargs
):
4634 __init__(self, wxPrintData printData) -> PostScriptDC
4636 Constructs a PostScript printer device context from a `wx.PrintData`
4639 _gdi_
.PostScriptDC_swiginit(self
,_gdi_
.new_PostScriptDC(*args
, **kwargs
))
4640 def GetPrintData(*args
, **kwargs
):
4641 """GetPrintData(self) -> wxPrintData"""
4642 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
4644 def SetPrintData(*args
, **kwargs
):
4645 """SetPrintData(self, wxPrintData data)"""
4646 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
4648 def SetResolution(*args
, **kwargs
):
4650 SetResolution(int ppi)
4652 Set resolution (in pixels per inch) that will be used in PostScript
4653 output. Default is 720ppi.
4655 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4657 SetResolution
= staticmethod(SetResolution
)
4658 def GetResolution(*args
, **kwargs
):
4660 GetResolution() -> int
4662 Return resolution used in PostScript output.
4664 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4666 GetResolution
= staticmethod(GetResolution
)
4667 _gdi_
.PostScriptDC_swigregister(PostScriptDC
)
4669 def PostScriptDC_SetResolution(*args
, **kwargs
):
4671 PostScriptDC_SetResolution(int ppi)
4673 Set resolution (in pixels per inch) that will be used in PostScript
4674 output. Default is 720ppi.
4676 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4678 def PostScriptDC_GetResolution(*args
):
4680 PostScriptDC_GetResolution() -> int
4682 Return resolution used in PostScript output.
4684 return _gdi_
.PostScriptDC_GetResolution(*args
)
4686 #---------------------------------------------------------------------------
4688 class MetaFile(_core
.Object
):
4689 """Proxy of C++ MetaFile class"""
4690 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4691 __repr__
= _swig_repr
4692 def __init__(self
, *args
, **kwargs
):
4693 """__init__(self, String filename=EmptyString) -> MetaFile"""
4694 _gdi_
.MetaFile_swiginit(self
,_gdi_
.new_MetaFile(*args
, **kwargs
))
4695 __swig_destroy__
= _gdi_
.delete_MetaFile
4696 __del__
= lambda self
: None;
4697 def Ok(*args
, **kwargs
):
4698 """Ok(self) -> bool"""
4699 return _gdi_
.MetaFile_Ok(*args
, **kwargs
)
4701 def SetClipboard(*args
, **kwargs
):
4702 """SetClipboard(self, int width=0, int height=0) -> bool"""
4703 return _gdi_
.MetaFile_SetClipboard(*args
, **kwargs
)
4705 def GetSize(*args
, **kwargs
):
4706 """GetSize(self) -> Size"""
4707 return _gdi_
.MetaFile_GetSize(*args
, **kwargs
)
4709 def GetWidth(*args
, **kwargs
):
4710 """GetWidth(self) -> int"""
4711 return _gdi_
.MetaFile_GetWidth(*args
, **kwargs
)
4713 def GetHeight(*args
, **kwargs
):
4714 """GetHeight(self) -> int"""
4715 return _gdi_
.MetaFile_GetHeight(*args
, **kwargs
)
4717 def __nonzero__(self
): return self
.Ok()
4718 _gdi_
.MetaFile_swigregister(MetaFile
)
4720 class MetaFileDC(DC
):
4721 """Proxy of C++ MetaFileDC class"""
4722 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4723 __repr__
= _swig_repr
4724 def __init__(self
, *args
, **kwargs
):
4726 __init__(self, String filename=EmptyString, int width=0, int height=0,
4727 String description=EmptyString) -> MetaFileDC
4729 _gdi_
.MetaFileDC_swiginit(self
,_gdi_
.new_MetaFileDC(*args
, **kwargs
))
4730 def Close(*args
, **kwargs
):
4731 """Close(self) -> MetaFile"""
4732 return _gdi_
.MetaFileDC_Close(*args
, **kwargs
)
4734 _gdi_
.MetaFileDC_swigregister(MetaFileDC
)
4736 class PrinterDC(DC
):
4737 """Proxy of C++ PrinterDC class"""
4738 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4739 __repr__
= _swig_repr
4740 def __init__(self
, *args
, **kwargs
):
4741 """__init__(self, wxPrintData printData) -> PrinterDC"""
4742 _gdi_
.PrinterDC_swiginit(self
,_gdi_
.new_PrinterDC(*args
, **kwargs
))
4743 _gdi_
.PrinterDC_swigregister(PrinterDC
)
4745 #---------------------------------------------------------------------------
4747 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
4748 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
4749 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
4750 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
4751 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
4752 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
4753 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
4754 class ImageList(_core
.Object
):
4755 """Proxy of C++ ImageList class"""
4756 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4757 __repr__
= _swig_repr
4758 def __init__(self
, *args
, **kwargs
):
4759 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4760 _gdi_
.ImageList_swiginit(self
,_gdi_
.new_ImageList(*args
, **kwargs
))
4761 __swig_destroy__
= _gdi_
.delete_ImageList
4762 __del__
= lambda self
: None;
4763 def Add(*args
, **kwargs
):
4764 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4765 return _gdi_
.ImageList_Add(*args
, **kwargs
)
4767 def AddWithColourMask(*args
, **kwargs
):
4768 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4769 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
4771 def AddIcon(*args
, **kwargs
):
4772 """AddIcon(self, Icon icon) -> int"""
4773 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
4775 def GetBitmap(*args
, **kwargs
):
4776 """GetBitmap(self, int index) -> Bitmap"""
4777 return _gdi_
.ImageList_GetBitmap(*args
, **kwargs
)
4779 def GetIcon(*args
, **kwargs
):
4780 """GetIcon(self, int index) -> Icon"""
4781 return _gdi_
.ImageList_GetIcon(*args
, **kwargs
)
4783 def Replace(*args
, **kwargs
):
4784 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
4785 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
4787 def Draw(*args
, **kwargs
):
4789 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4790 bool solidBackground=False) -> bool
4792 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
4794 def GetImageCount(*args
, **kwargs
):
4795 """GetImageCount(self) -> int"""
4796 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
4798 def Remove(*args
, **kwargs
):
4799 """Remove(self, int index) -> bool"""
4800 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
4802 def RemoveAll(*args
, **kwargs
):
4803 """RemoveAll(self) -> bool"""
4804 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
4806 def GetSize(*args
, **kwargs
):
4807 """GetSize(index) -> (width,height)"""
4808 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
4810 ImageCount
= property(GetImageCount
,doc
="See `GetImageCount`")
4811 Size
= property(GetSize
,doc
="See `GetSize`")
4812 _gdi_
.ImageList_swigregister(ImageList
)
4814 #---------------------------------------------------------------------------
4816 class StockGDI(object):
4817 """Proxy of C++ StockGDI class"""
4818 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4819 __repr__
= _swig_repr
4820 BRUSH_BLACK
= _gdi_
.StockGDI_BRUSH_BLACK
4821 BRUSH_BLUE
= _gdi_
.StockGDI_BRUSH_BLUE
4822 BRUSH_CYAN
= _gdi_
.StockGDI_BRUSH_CYAN
4823 BRUSH_GREEN
= _gdi_
.StockGDI_BRUSH_GREEN
4824 BRUSH_GREY
= _gdi_
.StockGDI_BRUSH_GREY
4825 BRUSH_LIGHTGREY
= _gdi_
.StockGDI_BRUSH_LIGHTGREY
4826 BRUSH_MEDIUMGREY
= _gdi_
.StockGDI_BRUSH_MEDIUMGREY
4827 BRUSH_RED
= _gdi_
.StockGDI_BRUSH_RED
4828 BRUSH_TRANSPARENT
= _gdi_
.StockGDI_BRUSH_TRANSPARENT
4829 BRUSH_WHITE
= _gdi_
.StockGDI_BRUSH_WHITE
4830 COLOUR_BLACK
= _gdi_
.StockGDI_COLOUR_BLACK
4831 COLOUR_BLUE
= _gdi_
.StockGDI_COLOUR_BLUE
4832 COLOUR_CYAN
= _gdi_
.StockGDI_COLOUR_CYAN
4833 COLOUR_GREEN
= _gdi_
.StockGDI_COLOUR_GREEN
4834 COLOUR_LIGHTGREY
= _gdi_
.StockGDI_COLOUR_LIGHTGREY
4835 COLOUR_RED
= _gdi_
.StockGDI_COLOUR_RED
4836 COLOUR_WHITE
= _gdi_
.StockGDI_COLOUR_WHITE
4837 CURSOR_CROSS
= _gdi_
.StockGDI_CURSOR_CROSS
4838 CURSOR_HOURGLASS
= _gdi_
.StockGDI_CURSOR_HOURGLASS
4839 CURSOR_STANDARD
= _gdi_
.StockGDI_CURSOR_STANDARD
4840 FONT_ITALIC
= _gdi_
.StockGDI_FONT_ITALIC
4841 FONT_NORMAL
= _gdi_
.StockGDI_FONT_NORMAL
4842 FONT_SMALL
= _gdi_
.StockGDI_FONT_SMALL
4843 FONT_SWISS
= _gdi_
.StockGDI_FONT_SWISS
4844 PEN_BLACK
= _gdi_
.StockGDI_PEN_BLACK
4845 PEN_BLACKDASHED
= _gdi_
.StockGDI_PEN_BLACKDASHED
4846 PEN_CYAN
= _gdi_
.StockGDI_PEN_CYAN
4847 PEN_GREEN
= _gdi_
.StockGDI_PEN_GREEN
4848 PEN_GREY
= _gdi_
.StockGDI_PEN_GREY
4849 PEN_LIGHTGREY
= _gdi_
.StockGDI_PEN_LIGHTGREY
4850 PEN_MEDIUMGREY
= _gdi_
.StockGDI_PEN_MEDIUMGREY
4851 PEN_RED
= _gdi_
.StockGDI_PEN_RED
4852 PEN_TRANSPARENT
= _gdi_
.StockGDI_PEN_TRANSPARENT
4853 PEN_WHITE
= _gdi_
.StockGDI_PEN_WHITE
4854 ITEMCOUNT
= _gdi_
.StockGDI_ITEMCOUNT
4855 def __init__(self
, *args
, **kwargs
):
4856 """__init__(self) -> StockGDI"""
4857 _gdi_
.StockGDI_swiginit(self
,_gdi_
.new_StockGDI(*args
, **kwargs
))
4858 __swig_destroy__
= _gdi_
.delete_StockGDI
4859 __del__
= lambda self
: None;
4860 def DeleteAll(*args
, **kwargs
):
4862 return _gdi_
.StockGDI_DeleteAll(*args
, **kwargs
)
4864 DeleteAll
= staticmethod(DeleteAll
)
4865 def instance(*args
, **kwargs
):
4866 """instance() -> StockGDI"""
4867 return _gdi_
.StockGDI_instance(*args
, **kwargs
)
4869 instance
= staticmethod(instance
)
4870 def GetBrush(*args
, **kwargs
):
4871 """GetBrush(int item) -> Brush"""
4872 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
4874 GetBrush
= staticmethod(GetBrush
)
4875 def GetColour(*args
, **kwargs
):
4876 """GetColour(int item) -> Colour"""
4877 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
4879 GetColour
= staticmethod(GetColour
)
4880 def GetCursor(*args
, **kwargs
):
4881 """GetCursor(int item) -> Cursor"""
4882 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
4884 GetCursor
= staticmethod(GetCursor
)
4885 def GetPen(*args
, **kwargs
):
4886 """GetPen(int item) -> Pen"""
4887 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
4889 GetPen
= staticmethod(GetPen
)
4890 def GetFont(*args
, **kwargs
):
4891 """GetFont(self, int item) -> Font"""
4892 return _gdi_
.StockGDI_GetFont(*args
, **kwargs
)
4894 def _initStockObjects():
4896 wx
.ITALIC_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_ITALIC
).this
4897 wx
.NORMAL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_NORMAL
).this
4898 wx
.SMALL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SMALL
).this
4899 wx
.SWISS_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SWISS
).this
4901 wx
.BLACK_DASHED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACKDASHED
).this
4902 wx
.BLACK_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACK
).this
4903 wx
.CYAN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_CYAN
).this
4904 wx
.GREEN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREEN
).this
4905 wx
.GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREY
).this
4906 wx
.LIGHT_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_LIGHTGREY
).this
4907 wx
.MEDIUM_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_MEDIUMGREY
).this
4908 wx
.RED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_RED
).this
4909 wx
.TRANSPARENT_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_TRANSPARENT
).this
4910 wx
.WHITE_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_WHITE
).this
4912 wx
.BLACK_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLACK
).this
4913 wx
.BLUE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLUE
).this
4914 wx
.CYAN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_CYAN
).this
4915 wx
.GREEN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREEN
).this
4916 wx
.GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREY
).this
4917 wx
.LIGHT_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_LIGHTGREY
).this
4918 wx
.MEDIUM_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_MEDIUMGREY
).this
4919 wx
.RED_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_RED
).this
4920 wx
.TRANSPARENT_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_TRANSPARENT
).this
4921 wx
.WHITE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_WHITE
).this
4923 wx
.BLACK
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLACK
).this
4924 wx
.BLUE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLUE
).this
4925 wx
.CYAN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_CYAN
).this
4926 wx
.GREEN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_GREEN
).this
4927 wx
.LIGHT_GREY
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_LIGHTGREY
).this
4928 wx
.RED
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_RED
).this
4929 wx
.WHITE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_WHITE
).this
4931 wx
.CROSS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_CROSS
).this
4932 wx
.HOURGLASS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_HOURGLASS
).this
4933 wx
.STANDARD_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_STANDARD
).this
4935 wx
.TheFontList
.this
= _wxPyInitTheFontList().this
4936 wx
.ThePenList
.this
= _wxPyInitThePenList().this
4937 wx
.TheBrushList
.this
= _wxPyInitTheBrushList().this
4938 wx
.TheColourDatabase
.this
= _wxPyInitTheColourDatabase().this
4941 _initStockObjects
= staticmethod(_initStockObjects
)
4943 _gdi_
.StockGDI_swigregister(StockGDI
)
4945 def StockGDI_DeleteAll(*args
):
4946 """StockGDI_DeleteAll()"""
4947 return _gdi_
.StockGDI_DeleteAll(*args
)
4949 def StockGDI_instance(*args
):
4950 """StockGDI_instance() -> StockGDI"""
4951 return _gdi_
.StockGDI_instance(*args
)
4953 def StockGDI_GetBrush(*args
, **kwargs
):
4954 """StockGDI_GetBrush(int item) -> Brush"""
4955 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
4957 def StockGDI_GetColour(*args
, **kwargs
):
4958 """StockGDI_GetColour(int item) -> Colour"""
4959 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
4961 def StockGDI_GetCursor(*args
, **kwargs
):
4962 """StockGDI_GetCursor(int item) -> Cursor"""
4963 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
4965 def StockGDI_GetPen(*args
, **kwargs
):
4966 """StockGDI_GetPen(int item) -> Pen"""
4967 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
4969 # Create an uninitialized instance for the stock objects, they will
4970 # be initialized later when the wx.App object is created.
4971 ITALIC_FONT
= Font
.__new
__(Font
)
4972 NORMAL_FONT
= Font
.__new
__(Font
)
4973 SMALL_FONT
= Font
.__new
__(Font
)
4974 SWISS_FONT
= Font
.__new
__(Font
)
4976 BLACK_DASHED_PEN
= Pen
.__new
__(Pen
)
4977 BLACK_PEN
= Pen
.__new
__(Pen
)
4978 CYAN_PEN
= Pen
.__new
__(Pen
)
4979 GREEN_PEN
= Pen
.__new
__(Pen
)
4980 GREY_PEN
= Pen
.__new
__(Pen
)
4981 LIGHT_GREY_PEN
= Pen
.__new
__(Pen
)
4982 MEDIUM_GREY_PEN
= Pen
.__new
__(Pen
)
4983 RED_PEN
= Pen
.__new
__(Pen
)
4984 TRANSPARENT_PEN
= Pen
.__new
__(Pen
)
4985 WHITE_PEN
= Pen
.__new
__(Pen
)
4987 BLACK_BRUSH
= Brush
.__new
__(Brush
)
4988 BLUE_BRUSH
= Brush
.__new
__(Brush
)
4989 CYAN_BRUSH
= Brush
.__new
__(Brush
)
4990 GREEN_BRUSH
= Brush
.__new
__(Brush
)
4991 GREY_BRUSH
= Brush
.__new
__(Brush
)
4992 LIGHT_GREY_BRUSH
= Brush
.__new
__(Brush
)
4993 MEDIUM_GREY_BRUSH
= Brush
.__new
__(Brush
)
4994 RED_BRUSH
= Brush
.__new
__(Brush
)
4995 TRANSPARENT_BRUSH
= Brush
.__new
__(Brush
)
4996 WHITE_BRUSH
= Brush
.__new
__(Brush
)
4998 BLACK
= Colour
.__new
__(Colour
)
4999 BLUE
= Colour
.__new
__(Colour
)
5000 CYAN
= Colour
.__new
__(Colour
)
5001 GREEN
= Colour
.__new
__(Colour
)
5002 LIGHT_GREY
= Colour
.__new
__(Colour
)
5003 RED
= Colour
.__new
__(Colour
)
5004 WHITE
= Colour
.__new
__(Colour
)
5006 CROSS_CURSOR
= Cursor
.__new
__(Cursor
)
5007 HOURGLASS_CURSOR
= Cursor
.__new
__(Cursor
)
5008 STANDARD_CURSOR
= Cursor
.__new
__(Cursor
)
5010 class GDIObjListBase(object):
5011 """Proxy of C++ GDIObjListBase class"""
5012 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5013 __repr__
= _swig_repr
5014 def __init__(self
, *args
, **kwargs
):
5015 """__init__(self) -> GDIObjListBase"""
5016 _gdi_
.GDIObjListBase_swiginit(self
,_gdi_
.new_GDIObjListBase(*args
, **kwargs
))
5017 __swig_destroy__
= _gdi_
.delete_GDIObjListBase
5018 __del__
= lambda self
: None;
5019 _gdi_
.GDIObjListBase_swigregister(GDIObjListBase
)
5021 NullBitmap
= cvar
.NullBitmap
5022 NullIcon
= cvar
.NullIcon
5023 NullCursor
= cvar
.NullCursor
5024 NullPen
= cvar
.NullPen
5025 NullBrush
= cvar
.NullBrush
5026 NullPalette
= cvar
.NullPalette
5027 NullFont
= cvar
.NullFont
5028 NullColour
= cvar
.NullColour
5030 class PenList(GDIObjListBase
):
5031 """Proxy of C++ PenList class"""
5032 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5033 def __init__(self
): raise AttributeError, "No constructor defined"
5034 __repr__
= _swig_repr
5035 def FindOrCreatePen(*args
, **kwargs
):
5036 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
5037 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
5039 def AddPen(*args
, **kwargs
):
5040 """AddPen(self, Pen pen)"""
5041 return _gdi_
.PenList_AddPen(*args
, **kwargs
)
5043 def RemovePen(*args
, **kwargs
):
5044 """RemovePen(self, Pen pen)"""
5045 return _gdi_
.PenList_RemovePen(*args
, **kwargs
)
5047 AddPen
= wx
._deprecated
(AddPen
)
5048 RemovePen
= wx
._deprecated
(RemovePen
)
5050 _gdi_
.PenList_swigregister(PenList
)
5052 class BrushList(GDIObjListBase
):
5053 """Proxy of C++ BrushList class"""
5054 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5055 def __init__(self
): raise AttributeError, "No constructor defined"
5056 __repr__
= _swig_repr
5057 def FindOrCreateBrush(*args
, **kwargs
):
5058 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
5059 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
5061 def AddBrush(*args
, **kwargs
):
5062 """AddBrush(self, Brush brush)"""
5063 return _gdi_
.BrushList_AddBrush(*args
, **kwargs
)
5065 def RemoveBrush(*args
, **kwargs
):
5066 """RemoveBrush(self, Brush brush)"""
5067 return _gdi_
.BrushList_RemoveBrush(*args
, **kwargs
)
5069 AddBrush
= wx
._deprecated
(AddBrush
)
5070 RemoveBrush
= wx
._deprecated
(RemoveBrush
)
5072 _gdi_
.BrushList_swigregister(BrushList
)
5074 class FontList(GDIObjListBase
):
5075 """Proxy of C++ FontList class"""
5076 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5077 def __init__(self
): raise AttributeError, "No constructor defined"
5078 __repr__
= _swig_repr
5079 def FindOrCreateFont(*args
, **kwargs
):
5081 FindOrCreateFont(self, int point_size, int family, int style, int weight,
5082 bool underline=False, String facename=EmptyString,
5083 int encoding=FONTENCODING_DEFAULT) -> Font
5085 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
5087 def AddFont(*args
, **kwargs
):
5088 """AddFont(self, Font font)"""
5089 return _gdi_
.FontList_AddFont(*args
, **kwargs
)
5091 def RemoveFont(*args
, **kwargs
):
5092 """RemoveFont(self, Font font)"""
5093 return _gdi_
.FontList_RemoveFont(*args
, **kwargs
)
5095 AddFont
= wx
._deprecated
(AddFont
)
5096 RemoveFont
= wx
._deprecated
(RemoveFont
)
5098 _gdi_
.FontList_swigregister(FontList
)
5100 class ColourDatabase(object):
5101 """Proxy of C++ ColourDatabase class"""
5102 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5103 __repr__
= _swig_repr
5104 def __init__(self
, *args
, **kwargs
):
5105 """__init__(self) -> ColourDatabase"""
5106 _gdi_
.ColourDatabase_swiginit(self
,_gdi_
.new_ColourDatabase(*args
, **kwargs
))
5107 __swig_destroy__
= _gdi_
.delete_ColourDatabase
5108 __del__
= lambda self
: None;
5109 def Find(*args
, **kwargs
):
5110 """Find(self, String name) -> Colour"""
5111 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
5113 def FindName(*args
, **kwargs
):
5114 """FindName(self, Colour colour) -> String"""
5115 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
5118 def AddColour(*args
, **kwargs
):
5119 """AddColour(self, String name, Colour colour)"""
5120 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
5122 def Append(*args
, **kwargs
):
5123 """Append(self, String name, int red, int green, int blue)"""
5124 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
5126 _gdi_
.ColourDatabase_swigregister(ColourDatabase
)
5128 #---------------------------------------------------------------------------
5131 def _wxPyInitTheFontList(*args
):
5132 """_wxPyInitTheFontList() -> FontList"""
5133 return _gdi_
._wxPyInitTheFontList
(*args
)
5135 def _wxPyInitThePenList(*args
):
5136 """_wxPyInitThePenList() -> PenList"""
5137 return _gdi_
._wxPyInitThePenList
(*args
)
5139 def _wxPyInitTheBrushList(*args
):
5140 """_wxPyInitTheBrushList() -> BrushList"""
5141 return _gdi_
._wxPyInitTheBrushList
(*args
)
5143 def _wxPyInitTheColourDatabase(*args
):
5144 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
5145 return _gdi_
._wxPyInitTheColourDatabase
(*args
)
5146 # Create an uninitialized instance for the stock objects, they will
5147 # be initialized later when the wx.App object is created.
5148 TheFontList
= FontList
.__new
__(FontList
)
5149 ThePenList
= PenList
.__new
__(PenList
)
5150 TheBrushList
= BrushList
.__new
__(BrushList
)
5151 TheColourDatabase
= ColourDatabase
.__new
__(ColourDatabase
)
5153 NullColor
= NullColour
5154 #---------------------------------------------------------------------------
5156 class Effects(_core
.Object
):
5157 """Proxy of C++ Effects class"""
5158 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5159 __repr__
= _swig_repr
5160 def __init__(self
, *args
, **kwargs
):
5161 """__init__(self) -> Effects"""
5162 _gdi_
.Effects_swiginit(self
,_gdi_
.new_Effects(*args
, **kwargs
))
5163 def GetHighlightColour(*args
, **kwargs
):
5164 """GetHighlightColour(self) -> Colour"""
5165 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
5167 def GetLightShadow(*args
, **kwargs
):
5168 """GetLightShadow(self) -> Colour"""
5169 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
5171 def GetFaceColour(*args
, **kwargs
):
5172 """GetFaceColour(self) -> Colour"""
5173 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
5175 def GetMediumShadow(*args
, **kwargs
):
5176 """GetMediumShadow(self) -> Colour"""
5177 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
5179 def GetDarkShadow(*args
, **kwargs
):
5180 """GetDarkShadow(self) -> Colour"""
5181 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
5183 def SetHighlightColour(*args
, **kwargs
):
5184 """SetHighlightColour(self, Colour c)"""
5185 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
5187 def SetLightShadow(*args
, **kwargs
):
5188 """SetLightShadow(self, Colour c)"""
5189 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
5191 def SetFaceColour(*args
, **kwargs
):
5192 """SetFaceColour(self, Colour c)"""
5193 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
5195 def SetMediumShadow(*args
, **kwargs
):
5196 """SetMediumShadow(self, Colour c)"""
5197 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
5199 def SetDarkShadow(*args
, **kwargs
):
5200 """SetDarkShadow(self, Colour c)"""
5201 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
5203 def Set(*args
, **kwargs
):
5205 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
5206 Colour mediumShadow, Colour darkShadow)
5208 return _gdi_
.Effects_Set(*args
, **kwargs
)
5210 def DrawSunkenEdge(*args
, **kwargs
):
5211 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
5212 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
5214 def TileBitmap(*args
, **kwargs
):
5215 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
5216 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
5218 DarkShadow
= property(GetDarkShadow
,SetDarkShadow
,doc
="See `GetDarkShadow` and `SetDarkShadow`")
5219 FaceColour
= property(GetFaceColour
,SetFaceColour
,doc
="See `GetFaceColour` and `SetFaceColour`")
5220 HighlightColour
= property(GetHighlightColour
,SetHighlightColour
,doc
="See `GetHighlightColour` and `SetHighlightColour`")
5221 LightShadow
= property(GetLightShadow
,SetLightShadow
,doc
="See `GetLightShadow` and `SetLightShadow`")
5222 MediumShadow
= property(GetMediumShadow
,SetMediumShadow
,doc
="See `GetMediumShadow` and `SetMediumShadow`")
5223 _gdi_
.Effects_swigregister(Effects
)
5225 #---------------------------------------------------------------------------
5227 CONTROL_DISABLED
= _gdi_
.CONTROL_DISABLED
5228 CONTROL_FOCUSED
= _gdi_
.CONTROL_FOCUSED
5229 CONTROL_PRESSED
= _gdi_
.CONTROL_PRESSED
5230 CONTROL_ISDEFAULT
= _gdi_
.CONTROL_ISDEFAULT
5231 CONTROL_ISSUBMENU
= _gdi_
.CONTROL_ISSUBMENU
5232 CONTROL_EXPANDED
= _gdi_
.CONTROL_EXPANDED
5233 CONTROL_CURRENT
= _gdi_
.CONTROL_CURRENT
5234 CONTROL_SELECTED
= _gdi_
.CONTROL_SELECTED
5235 CONTROL_CHECKED
= _gdi_
.CONTROL_CHECKED
5236 CONTROL_CHECKABLE
= _gdi_
.CONTROL_CHECKABLE
5237 CONTROL_UNDETERMINED
= _gdi_
.CONTROL_UNDETERMINED
5238 CONTROL_FLAGS_MASK
= _gdi_
.CONTROL_FLAGS_MASK
5239 CONTROL_DIRTY
= _gdi_
.CONTROL_DIRTY
5240 class SplitterRenderParams(object):
5242 This is just a simple struct used as a return value of
5243 `wx.RendererNative.GetSplitterParams` and contains some platform
5244 specific metrics about splitters.
5246 * widthSash: the width of the splitter sash.
5247 * border: the width of the border of the splitter window.
5248 * isHotSensitive: ``True`` if the splitter changes its
5249 appearance when the mouse is over it.
5253 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5254 __repr__
= _swig_repr
5255 def __init__(self
, *args
, **kwargs
):
5257 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
5259 This is just a simple struct used as a return value of
5260 `wx.RendererNative.GetSplitterParams` and contains some platform
5261 specific metrics about splitters.
5263 * widthSash: the width of the splitter sash.
5264 * border: the width of the border of the splitter window.
5265 * isHotSensitive: ``True`` if the splitter changes its
5266 appearance when the mouse is over it.
5270 _gdi_
.SplitterRenderParams_swiginit(self
,_gdi_
.new_SplitterRenderParams(*args
, **kwargs
))
5271 __swig_destroy__
= _gdi_
.delete_SplitterRenderParams
5272 __del__
= lambda self
: None;
5273 widthSash
= property(_gdi_
.SplitterRenderParams_widthSash_get
)
5274 border
= property(_gdi_
.SplitterRenderParams_border_get
)
5275 isHotSensitive
= property(_gdi_
.SplitterRenderParams_isHotSensitive_get
)
5276 _gdi_
.SplitterRenderParams_swigregister(SplitterRenderParams
)
5278 class RendererVersion(object):
5280 This simple struct represents the `wx.RendererNative` interface
5281 version and is only used as the return value of
5282 `wx.RendererNative.GetVersion`.
5284 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5285 __repr__
= _swig_repr
5286 def __init__(self
, *args
, **kwargs
):
5288 __init__(self, int version_, int age_) -> RendererVersion
5290 This simple struct represents the `wx.RendererNative` interface
5291 version and is only used as the return value of
5292 `wx.RendererNative.GetVersion`.
5294 _gdi_
.RendererVersion_swiginit(self
,_gdi_
.new_RendererVersion(*args
, **kwargs
))
5295 __swig_destroy__
= _gdi_
.delete_RendererVersion
5296 __del__
= lambda self
: None;
5297 Current_Version
= _gdi_
.RendererVersion_Current_Version
5298 Current_Age
= _gdi_
.RendererVersion_Current_Age
5299 def IsCompatible(*args
, **kwargs
):
5300 """IsCompatible(RendererVersion ver) -> bool"""
5301 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
5303 IsCompatible
= staticmethod(IsCompatible
)
5304 version
= property(_gdi_
.RendererVersion_version_get
)
5305 age
= property(_gdi_
.RendererVersion_age_get
)
5306 _gdi_
.RendererVersion_swigregister(RendererVersion
)
5308 def RendererVersion_IsCompatible(*args
, **kwargs
):
5309 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
5310 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
5312 class RendererNative(object):
5314 One of the design principles of wxWidgets is to use the native widgets
5315 on every platform in order to be as close to the native look and feel
5316 on every platform. However there are still cases when some generic
5317 widgets are needed for various reasons, but it can sometimes take a
5318 lot of messy work to make them conform to the native LnF.
5320 The wx.RendererNative class is a collection of functions that have
5321 platform-specific implementations for drawing certain parts of
5322 genereic controls in ways that are as close to the native look as
5325 Note that each drawing function restores the `wx.DC` attributes if it
5326 changes them, so it is safe to assume that the same pen, brush and
5327 colours that were active before the call to this function are still in
5331 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5332 def __init__(self
): raise AttributeError, "No constructor defined"
5333 __repr__
= _swig_repr
5334 def DrawHeaderButton(*args
, **kwargs
):
5336 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0)
5338 Draw the header control button (such as what is used by `wx.ListCtrl`
5341 return _gdi_
.RendererNative_DrawHeaderButton(*args
, **kwargs
)
5343 def DrawTreeItemButton(*args
, **kwargs
):
5345 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
5347 Draw the expanded/collapsed icon for a tree control item.
5349 return _gdi_
.RendererNative_DrawTreeItemButton(*args
, **kwargs
)
5351 def DrawSplitterBorder(*args
, **kwargs
):
5353 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
5355 Draw the border for a sash window: this border must be such that the
5356 sash drawn by `DrawSplitterSash` blends into it well.
5358 return _gdi_
.RendererNative_DrawSplitterBorder(*args
, **kwargs
)
5360 def DrawSplitterSash(*args
, **kwargs
):
5362 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
5365 Draw a sash. The orient parameter defines whether the sash should be
5366 vertical or horizontal and how the position should be interpreted.
5368 return _gdi_
.RendererNative_DrawSplitterSash(*args
, **kwargs
)
5370 def DrawComboBoxDropButton(*args
, **kwargs
):
5372 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
5374 Draw a button like the one used by `wx.ComboBox` to show a drop down
5375 window. The usual appearance is a downwards pointing arrow.
5377 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
5378 ``wx.CONTROL_CURRENT`` bits set.
5380 return _gdi_
.RendererNative_DrawComboBoxDropButton(*args
, **kwargs
)
5382 def DrawDropArrow(*args
, **kwargs
):
5384 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
5386 Draw a drop down arrow that is suitable for use outside a combo
5387 box. Arrow will have a transparent background.
5389 ``rect`` is not entirely filled by the arrow. Instead, you should use
5390 bounding rectangle of a drop down button which arrow matches the size
5391 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
5392 ``wx.CONTROL_CURRENT`` bit set.
5394 return _gdi_
.RendererNative_DrawDropArrow(*args
, **kwargs
)
5396 def DrawCheckBox(*args
, **kwargs
):
5398 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
5400 Draw a check button. Flags may use wx.CONTROL_CHECKED,
5401 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
5403 return _gdi_
.RendererNative_DrawCheckBox(*args
, **kwargs
)
5405 def DrawPushButton(*args
, **kwargs
):
5407 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
5409 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
5410 wx.CONTROL_ISDEFAULT
5412 return _gdi_
.RendererNative_DrawPushButton(*args
, **kwargs
)
5414 def DrawItemSelectionRect(*args
, **kwargs
):
5416 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
5418 Draw rectangle indicating that an item in e.g. a list control has been
5421 The flags parameter may be:
5423 ==================== ============================================
5424 wx.CONTROL_SELECTED item is selected, e.g. draw background
5425 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
5426 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
5427 background vs. grey otherwise
5428 ==================== ============================================
5431 return _gdi_
.RendererNative_DrawItemSelectionRect(*args
, **kwargs
)
5433 def GetSplitterParams(*args
, **kwargs
):
5435 GetSplitterParams(self, Window win) -> SplitterRenderParams
5437 Get the splitter parameters, see `wx.SplitterRenderParams`.
5439 return _gdi_
.RendererNative_GetSplitterParams(*args
, **kwargs
)
5441 def Get(*args
, **kwargs
):
5443 Get() -> RendererNative
5445 Return the currently used renderer
5447 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
5449 Get
= staticmethod(Get
)
5450 def GetGeneric(*args
, **kwargs
):
5452 GetGeneric() -> RendererNative
5454 Return the generic implementation of the renderer. Under some
5455 platforms, this is the default renderer implementation, others have
5456 platform-specific default renderer which can be retrieved by calling
5457 `wx.RendererNative.GetDefault`.
5459 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
5461 GetGeneric
= staticmethod(GetGeneric
)
5462 def GetDefault(*args
, **kwargs
):
5464 GetDefault() -> RendererNative
5466 Return the default (native) implementation for this platform -- this
5467 is also the one used by default but this may be changed by calling
5468 `wx.RendererNative.Set` in which case the return value of this method
5469 may be different from the return value of `wx.RendererNative.Get`.
5471 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
5473 GetDefault
= staticmethod(GetDefault
)
5474 def Set(*args
, **kwargs
):
5476 Set(RendererNative renderer) -> RendererNative
5478 Set the renderer to use, passing None reverts to using the default
5479 renderer. Returns the previous renderer used with Set or None.
5481 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
5483 Set
= staticmethod(Set
)
5484 def GetVersion(*args
, **kwargs
):
5486 GetVersion(self) -> RendererVersion
5488 Returns the version of the renderer. Will be used for ensuring
5489 compatibility of dynamically loaded renderers.
5491 return _gdi_
.RendererNative_GetVersion(*args
, **kwargs
)
5493 _gdi_
.RendererNative_swigregister(RendererNative
)
5495 def RendererNative_Get(*args
):
5497 RendererNative_Get() -> RendererNative
5499 Return the currently used renderer
5501 return _gdi_
.RendererNative_Get(*args
)
5503 def RendererNative_GetGeneric(*args
):
5505 RendererNative_GetGeneric() -> RendererNative
5507 Return the generic implementation of the renderer. Under some
5508 platforms, this is the default renderer implementation, others have
5509 platform-specific default renderer which can be retrieved by calling
5510 `wx.RendererNative.GetDefault`.
5512 return _gdi_
.RendererNative_GetGeneric(*args
)
5514 def RendererNative_GetDefault(*args
):
5516 RendererNative_GetDefault() -> RendererNative
5518 Return the default (native) implementation for this platform -- this
5519 is also the one used by default but this may be changed by calling
5520 `wx.RendererNative.Set` in which case the return value of this method
5521 may be different from the return value of `wx.RendererNative.Get`.
5523 return _gdi_
.RendererNative_GetDefault(*args
)
5525 def RendererNative_Set(*args
, **kwargs
):
5527 RendererNative_Set(RendererNative renderer) -> RendererNative
5529 Set the renderer to use, passing None reverts to using the default
5530 renderer. Returns the previous renderer used with Set or None.
5532 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
5534 #---------------------------------------------------------------------------
5536 class PseudoDC(_core
.Object
):
5538 A PseudoDC is an object that can be used as if it were a `wx.DC`. All
5539 commands issued to the PseudoDC are stored in a list. You can then
5540 play these commands back to a real DC object using the DrawToDC
5541 method. Commands in the command list are indexed by ID. You can use
5542 this to clear the operations associated with a single ID and then
5543 re-draw the object associated with that ID.
5545 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5546 __repr__
= _swig_repr
5547 def __init__(self
, *args
, **kwargs
):
5549 __init__(self) -> PseudoDC
5551 Constructs a new Pseudo device context for recording dc operations
5553 _gdi_
.PseudoDC_swiginit(self
,_gdi_
.new_PseudoDC(*args
, **kwargs
))
5554 def BeginDrawing(*args
, **kwargs
):
5558 Allows for optimization of drawing code on platforms that need it. On
5559 other platforms this is just an empty function and is harmless. To
5560 take advantage of this postential optimization simply enclose each
5561 group of calls to the drawing primitives within calls to
5562 `BeginDrawing` and `EndDrawing`.
5564 return _gdi_
.PseudoDC_BeginDrawing(*args
, **kwargs
)
5566 def EndDrawing(*args
, **kwargs
):
5570 Ends the group of drawing primitives started with `BeginDrawing`, and
5571 invokes whatever optimization is available for this DC type on the
5574 return _gdi_
.PseudoDC_EndDrawing(*args
, **kwargs
)
5576 __swig_destroy__
= _gdi_
.delete_PseudoDC
5577 __del__
= lambda self
: None;
5578 def RemoveAll(*args
, **kwargs
):
5582 Removes all objects and operations from the recorded list.
5584 return _gdi_
.PseudoDC_RemoveAll(*args
, **kwargs
)
5586 def GetLen(*args
, **kwargs
):
5590 Returns the number of operations in the recorded list.
5592 return _gdi_
.PseudoDC_GetLen(*args
, **kwargs
)
5594 def SetId(*args
, **kwargs
):
5598 Sets the id to be associated with subsequent operations.
5600 return _gdi_
.PseudoDC_SetId(*args
, **kwargs
)
5602 def ClearId(*args
, **kwargs
):
5604 ClearId(self, int id)
5606 Removes all operations associated with id so the object can be redrawn.
5608 return _gdi_
.PseudoDC_ClearId(*args
, **kwargs
)
5610 def RemoveId(*args
, **kwargs
):
5612 RemoveId(self, int id)
5614 Remove the object node (and all operations) associated with an id.
5616 return _gdi_
.PseudoDC_RemoveId(*args
, **kwargs
)
5618 def TranslateId(*args
, **kwargs
):
5620 TranslateId(self, int id, int dx, int dy)
5622 Translate the operations of id by dx,dy.
5624 return _gdi_
.PseudoDC_TranslateId(*args
, **kwargs
)
5626 def DrawIdToDC(*args
, **kwargs
):
5628 DrawIdToDC(self, int id, DC dc)
5630 Draw recorded operations of id to dc.
5632 return _gdi_
.PseudoDC_DrawIdToDC(*args
, **kwargs
)
5634 def SetIdBounds(*args
, **kwargs
):
5636 SetIdBounds(self, int id, Rect rect)
5638 Set the bounding rect of a given object. This will create
5639 an object node if one doesn't exist.
5641 return _gdi_
.PseudoDC_SetIdBounds(*args
, **kwargs
)
5643 def GetIdBounds(*args
, **kwargs
):
5645 GetIdBounds(self, int id) -> Rect
5647 Returns the bounding rectangle previouly set with SetIdBounds. If
5648 no bounds have been set, it returns wx.Rect(0,0,0,0).
5650 return _gdi_
.PseudoDC_GetIdBounds(*args
, **kwargs
)
5652 def DrawToDCClipped(*args
, **kwargs
):
5654 DrawToDCClipped(self, DC dc, Rect rect)
5656 Draws the recorded operations to dc unless the operation is known to
5659 return _gdi_
.PseudoDC_DrawToDCClipped(*args
, **kwargs
)
5661 def DrawToDCClippedRgn(*args
, **kwargs
):
5663 DrawToDCClippedRgn(self, DC dc, Region region)
5665 Draws the recorded operations to dc unless the operation is known to
5668 return _gdi_
.PseudoDC_DrawToDCClippedRgn(*args
, **kwargs
)
5670 def DrawToDC(*args
, **kwargs
):
5672 DrawToDC(self, DC dc)
5674 Draws the recorded operations to dc.
5676 return _gdi_
.PseudoDC_DrawToDC(*args
, **kwargs
)
5678 def FloodFill(*args
, **kwargs
):
5680 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
5682 Flood fills the device context starting from the given point, using
5683 the current brush colour, and using a style:
5685 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
5686 the given colour is encountered.
5688 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
5691 Returns False if the operation failed.
5693 Note: The present implementation for non-Windows platforms may fail to
5694 find colour borders if the pixels do not match the colour
5695 exactly. However the function will still return true.
5697 return _gdi_
.PseudoDC_FloodFill(*args
, **kwargs
)
5699 def FloodFillPoint(*args
, **kwargs
):
5701 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
5703 Flood fills the device context starting from the given point, using
5704 the current brush colour, and using a style:
5706 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
5707 the given colour is encountered.
5709 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
5712 Returns False if the operation failed.
5714 Note: The present implementation for non-Windows platforms may fail to
5715 find colour borders if the pixels do not match the colour
5716 exactly. However the function will still return true.
5718 return _gdi_
.PseudoDC_FloodFillPoint(*args
, **kwargs
)
5720 def DrawLine(*args
, **kwargs
):
5722 DrawLine(self, int x1, int y1, int x2, int y2)
5724 Draws a line from the first point to the second. The current pen is
5725 used for drawing the line. Note that the second point is *not* part of
5726 the line and is not drawn by this function (this is consistent with
5727 the behaviour of many other toolkits).
5729 return _gdi_
.PseudoDC_DrawLine(*args
, **kwargs
)
5731 def DrawLinePoint(*args
, **kwargs
):
5733 DrawLinePoint(self, Point pt1, Point pt2)
5735 Draws a line from the first point to the second. The current pen is
5736 used for drawing the line. Note that the second point is *not* part of
5737 the line and is not drawn by this function (this is consistent with
5738 the behaviour of many other toolkits).
5740 return _gdi_
.PseudoDC_DrawLinePoint(*args
, **kwargs
)
5742 def CrossHair(*args
, **kwargs
):
5744 CrossHair(self, int x, int y)
5746 Displays a cross hair using the current pen. This is a vertical and
5747 horizontal line the height and width of the window, centred on the
5750 return _gdi_
.PseudoDC_CrossHair(*args
, **kwargs
)
5752 def CrossHairPoint(*args
, **kwargs
):
5754 CrossHairPoint(self, Point pt)
5756 Displays a cross hair using the current pen. This is a vertical and
5757 horizontal line the height and width of the window, centred on the
5760 return _gdi_
.PseudoDC_CrossHairPoint(*args
, **kwargs
)
5762 def DrawArc(*args
, **kwargs
):
5764 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
5766 Draws an arc of a circle, centred on the *center* point (xc, yc), from
5767 the first point to the second. The current pen is used for the outline
5768 and the current brush for filling the shape.
5770 The arc is drawn in an anticlockwise direction from the start point to
5773 return _gdi_
.PseudoDC_DrawArc(*args
, **kwargs
)
5775 def DrawArcPoint(*args
, **kwargs
):
5777 DrawArcPoint(self, Point pt1, Point pt2, Point center)
5779 Draws an arc of a circle, centred on the *center* point (xc, yc), from
5780 the first point to the second. The current pen is used for the outline
5781 and the current brush for filling the shape.
5783 The arc is drawn in an anticlockwise direction from the start point to
5786 return _gdi_
.PseudoDC_DrawArcPoint(*args
, **kwargs
)
5788 def DrawCheckMark(*args
, **kwargs
):
5790 DrawCheckMark(self, int x, int y, int width, int height)
5792 Draws a check mark inside the given rectangle.
5794 return _gdi_
.PseudoDC_DrawCheckMark(*args
, **kwargs
)
5796 def DrawCheckMarkRect(*args
, **kwargs
):
5798 DrawCheckMarkRect(self, Rect rect)
5800 Draws a check mark inside the given rectangle.
5802 return _gdi_
.PseudoDC_DrawCheckMarkRect(*args
, **kwargs
)
5804 def DrawEllipticArc(*args
, **kwargs
):
5806 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
5808 Draws an arc of an ellipse, with the given rectangle defining the
5809 bounds of the ellipse. The current pen is used for drawing the arc and
5810 the current brush is used for drawing the pie.
5812 The *start* and *end* parameters specify the start and end of the arc
5813 relative to the three-o'clock position from the center of the
5814 rectangle. Angles are specified in degrees (360 is a complete
5815 circle). Positive values mean counter-clockwise motion. If start is
5816 equal to end, a complete ellipse will be drawn.
5818 return _gdi_
.PseudoDC_DrawEllipticArc(*args
, **kwargs
)
5820 def DrawEllipticArcPointSize(*args
, **kwargs
):
5822 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
5824 Draws an arc of an ellipse, with the given rectangle defining the
5825 bounds of the ellipse. The current pen is used for drawing the arc and
5826 the current brush is used for drawing the pie.
5828 The *start* and *end* parameters specify the start and end of the arc
5829 relative to the three-o'clock position from the center of the
5830 rectangle. Angles are specified in degrees (360 is a complete
5831 circle). Positive values mean counter-clockwise motion. If start is
5832 equal to end, a complete ellipse will be drawn.
5834 return _gdi_
.PseudoDC_DrawEllipticArcPointSize(*args
, **kwargs
)
5836 def DrawPoint(*args
, **kwargs
):
5838 DrawPoint(self, int x, int y)
5840 Draws a point using the current pen.
5842 return _gdi_
.PseudoDC_DrawPoint(*args
, **kwargs
)
5844 def DrawPointPoint(*args
, **kwargs
):
5846 DrawPointPoint(self, Point pt)
5848 Draws a point using the current pen.
5850 return _gdi_
.PseudoDC_DrawPointPoint(*args
, **kwargs
)
5852 def DrawRectangle(*args
, **kwargs
):
5854 DrawRectangle(self, int x, int y, int width, int height)
5856 Draws a rectangle with the given top left corner, and with the given
5857 size. The current pen is used for the outline and the current brush
5858 for filling the shape.
5860 return _gdi_
.PseudoDC_DrawRectangle(*args
, **kwargs
)
5862 def DrawRectangleRect(*args
, **kwargs
):
5864 DrawRectangleRect(self, Rect rect)
5866 Draws a rectangle with the given top left corner, and with the given
5867 size. The current pen is used for the outline and the current brush
5868 for filling the shape.
5870 return _gdi_
.PseudoDC_DrawRectangleRect(*args
, **kwargs
)
5872 def DrawRectanglePointSize(*args
, **kwargs
):
5874 DrawRectanglePointSize(self, Point pt, Size sz)
5876 Draws a rectangle with the given top left corner, and with the given
5877 size. The current pen is used for the outline and the current brush
5878 for filling the shape.
5880 return _gdi_
.PseudoDC_DrawRectanglePointSize(*args
, **kwargs
)
5882 def DrawRoundedRectangle(*args
, **kwargs
):
5884 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
5886 Draws a rectangle with the given top left corner, and with the given
5887 size. The corners are quarter-circles using the given radius. The
5888 current pen is used for the outline and the current brush for filling
5891 If radius is positive, the value is assumed to be the radius of the
5892 rounded corner. If radius is negative, the absolute value is assumed
5893 to be the proportion of the smallest dimension of the rectangle. This
5894 means that the corner can be a sensible size relative to the size of
5895 the rectangle, and also avoids the strange effects X produces when the
5896 corners are too big for the rectangle.
5898 return _gdi_
.PseudoDC_DrawRoundedRectangle(*args
, **kwargs
)
5900 def DrawRoundedRectangleRect(*args
, **kwargs
):
5902 DrawRoundedRectangleRect(self, Rect r, double radius)
5904 Draws a rectangle with the given top left corner, and with the given
5905 size. The corners are quarter-circles using the given radius. The
5906 current pen is used for the outline and the current brush for filling
5909 If radius is positive, the value is assumed to be the radius of the
5910 rounded corner. If radius is negative, the absolute value is assumed
5911 to be the proportion of the smallest dimension of the rectangle. This
5912 means that the corner can be a sensible size relative to the size of
5913 the rectangle, and also avoids the strange effects X produces when the
5914 corners are too big for the rectangle.
5916 return _gdi_
.PseudoDC_DrawRoundedRectangleRect(*args
, **kwargs
)
5918 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
5920 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
5922 Draws a rectangle with the given top left corner, and with the given
5923 size. The corners are quarter-circles using the given radius. The
5924 current pen is used for the outline and the current brush for filling
5927 If radius is positive, the value is assumed to be the radius of the
5928 rounded corner. If radius is negative, the absolute value is assumed
5929 to be the proportion of the smallest dimension of the rectangle. This
5930 means that the corner can be a sensible size relative to the size of
5931 the rectangle, and also avoids the strange effects X produces when the
5932 corners are too big for the rectangle.
5934 return _gdi_
.PseudoDC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
5936 def DrawCircle(*args
, **kwargs
):
5938 DrawCircle(self, int x, int y, int radius)
5940 Draws a circle with the given center point and radius. The current
5941 pen is used for the outline and the current brush for filling the
5944 return _gdi_
.PseudoDC_DrawCircle(*args
, **kwargs
)
5946 def DrawCirclePoint(*args
, **kwargs
):
5948 DrawCirclePoint(self, Point pt, int radius)
5950 Draws a circle with the given center point and radius. The current
5951 pen is used for the outline and the current brush for filling the
5954 return _gdi_
.PseudoDC_DrawCirclePoint(*args
, **kwargs
)
5956 def DrawEllipse(*args
, **kwargs
):
5958 DrawEllipse(self, int x, int y, int width, int height)
5960 Draws an ellipse contained in the specified rectangle. The current pen
5961 is used for the outline and the current brush for filling the shape.
5963 return _gdi_
.PseudoDC_DrawEllipse(*args
, **kwargs
)
5965 def DrawEllipseRect(*args
, **kwargs
):
5967 DrawEllipseRect(self, Rect rect)
5969 Draws an ellipse contained in the specified rectangle. The current pen
5970 is used for the outline and the current brush for filling the shape.
5972 return _gdi_
.PseudoDC_DrawEllipseRect(*args
, **kwargs
)
5974 def DrawEllipsePointSize(*args
, **kwargs
):
5976 DrawEllipsePointSize(self, Point pt, Size sz)
5978 Draws an ellipse contained in the specified rectangle. The current pen
5979 is used for the outline and the current brush for filling the shape.
5981 return _gdi_
.PseudoDC_DrawEllipsePointSize(*args
, **kwargs
)
5983 def DrawIcon(*args
, **kwargs
):
5985 DrawIcon(self, Icon icon, int x, int y)
5987 Draw an icon on the display (does nothing if the device context is
5988 PostScript). This can be the simplest way of drawing bitmaps on a
5991 return _gdi_
.PseudoDC_DrawIcon(*args
, **kwargs
)
5993 def DrawIconPoint(*args
, **kwargs
):
5995 DrawIconPoint(self, Icon icon, Point pt)
5997 Draw an icon on the display (does nothing if the device context is
5998 PostScript). This can be the simplest way of drawing bitmaps on a
6001 return _gdi_
.PseudoDC_DrawIconPoint(*args
, **kwargs
)
6003 def DrawBitmap(*args
, **kwargs
):
6005 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
6007 Draw a bitmap on the device context at the specified point. If
6008 *transparent* is true and the bitmap has a transparency mask, (or
6009 alpha channel on the platforms that support it) then the bitmap will
6010 be drawn transparently.
6012 return _gdi_
.PseudoDC_DrawBitmap(*args
, **kwargs
)
6014 def DrawBitmapPoint(*args
, **kwargs
):
6016 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
6018 Draw a bitmap on the device context at the specified point. If
6019 *transparent* is true and the bitmap has a transparency mask, (or
6020 alpha channel on the platforms that support it) then the bitmap will
6021 be drawn transparently.
6023 return _gdi_
.PseudoDC_DrawBitmapPoint(*args
, **kwargs
)
6025 def DrawText(*args
, **kwargs
):
6027 DrawText(self, String text, int x, int y)
6029 Draws a text string at the specified point, using the current text
6030 font, and the current text foreground and background colours.
6032 The coordinates refer to the top-left corner of the rectangle bounding
6033 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
6034 a text string, which can be used to position the text more precisely,
6035 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
6038 **NOTE**: under wxGTK the current logical function is used by this
6039 function but it is ignored by wxMSW. Thus, you should avoid using
6040 logical functions with this function in portable programs.
6042 return _gdi_
.PseudoDC_DrawText(*args
, **kwargs
)
6044 def DrawTextPoint(*args
, **kwargs
):
6046 DrawTextPoint(self, String text, Point pt)
6048 Draws a text string at the specified point, using the current text
6049 font, and the current text foreground and background colours.
6051 The coordinates refer to the top-left corner of the rectangle bounding
6052 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
6053 a text string, which can be used to position the text more precisely,
6054 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
6057 **NOTE**: under wxGTK the current logical function is used by this
6058 function but it is ignored by wxMSW. Thus, you should avoid using
6059 logical functions with this function in portable programs.
6061 return _gdi_
.PseudoDC_DrawTextPoint(*args
, **kwargs
)
6063 def DrawRotatedText(*args
, **kwargs
):
6065 DrawRotatedText(self, String text, int x, int y, double angle)
6067 Draws the text rotated by *angle* degrees, if supported by the platform.
6069 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6070 function. In particular, a font different from ``wx.NORMAL_FONT``
6071 should be used as the it is not normally a TrueType
6072 font. ``wx.SWISS_FONT`` is an example of a font which is.
6074 return _gdi_
.PseudoDC_DrawRotatedText(*args
, **kwargs
)
6076 def DrawRotatedTextPoint(*args
, **kwargs
):
6078 DrawRotatedTextPoint(self, String text, Point pt, double angle)
6080 Draws the text rotated by *angle* degrees, if supported by the platform.
6082 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6083 function. In particular, a font different from ``wx.NORMAL_FONT``
6084 should be used as the it is not normally a TrueType
6085 font. ``wx.SWISS_FONT`` is an example of a font which is.
6087 return _gdi_
.PseudoDC_DrawRotatedTextPoint(*args
, **kwargs
)
6089 def DrawLines(*args
, **kwargs
):
6091 DrawLines(self, List points, int xoffset=0, int yoffset=0)
6093 Draws lines using a sequence of `wx.Point` objects, adding the
6094 optional offset coordinate. The current pen is used for drawing the
6097 return _gdi_
.PseudoDC_DrawLines(*args
, **kwargs
)
6099 def DrawPolygon(*args
, **kwargs
):
6101 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
6102 int fillStyle=ODDEVEN_RULE)
6104 Draws a filled polygon using a sequence of `wx.Point` objects, adding
6105 the optional offset coordinate. The last argument specifies the fill
6106 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
6108 The current pen is used for drawing the outline, and the current brush
6109 for filling the shape. Using a transparent brush suppresses
6110 filling. Note that wxWidgets automatically closes the first and last
6113 return _gdi_
.PseudoDC_DrawPolygon(*args
, **kwargs
)
6115 def DrawLabel(*args
, **kwargs
):
6117 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6120 Draw *text* within the specified rectangle, abiding by the alignment
6121 flags. Will additionally emphasize the character at *indexAccel* if
6124 return _gdi_
.PseudoDC_DrawLabel(*args
, **kwargs
)
6126 def DrawImageLabel(*args
, **kwargs
):
6128 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6131 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
6132 drawing it) within the specified rectangle, abiding by the alignment
6133 flags. Will additionally emphasize the character at *indexAccel* if
6136 return _gdi_
.PseudoDC_DrawImageLabel(*args
, **kwargs
)
6138 def DrawSpline(*args
, **kwargs
):
6140 DrawSpline(self, List points)
6142 Draws a spline between all given control points, (a list of `wx.Point`
6143 objects) using the current pen. The spline is drawn using a series of
6144 lines, using an algorithm taken from the X drawing program 'XFIG'.
6146 return _gdi_
.PseudoDC_DrawSpline(*args
, **kwargs
)
6148 def Clear(*args
, **kwargs
):
6152 Clears the device context using the current background brush.
6154 return _gdi_
.PseudoDC_Clear(*args
, **kwargs
)
6156 def SetFont(*args
, **kwargs
):
6158 SetFont(self, Font font)
6160 Sets the current font for the DC. It must be a valid font, in
6161 particular you should not pass ``wx.NullFont`` to this method.
6163 return _gdi_
.PseudoDC_SetFont(*args
, **kwargs
)
6165 def SetPen(*args
, **kwargs
):
6167 SetPen(self, Pen pen)
6169 Sets the current pen for the DC.
6171 If the argument is ``wx.NullPen``, the current pen is selected out of the
6172 device context, and the original pen restored.
6174 return _gdi_
.PseudoDC_SetPen(*args
, **kwargs
)
6176 def SetBrush(*args
, **kwargs
):
6178 SetBrush(self, Brush brush)
6180 Sets the current brush for the DC.
6182 If the argument is ``wx.NullBrush``, the current brush is selected out
6183 of the device context, and the original brush restored, allowing the
6184 current brush to be destroyed safely.
6186 return _gdi_
.PseudoDC_SetBrush(*args
, **kwargs
)
6188 def SetBackground(*args
, **kwargs
):
6190 SetBackground(self, Brush brush)
6192 Sets the current background brush for the DC.
6194 return _gdi_
.PseudoDC_SetBackground(*args
, **kwargs
)
6196 def SetBackgroundMode(*args
, **kwargs
):
6198 SetBackgroundMode(self, int mode)
6200 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
6201 determines whether text will be drawn with a background colour or
6204 return _gdi_
.PseudoDC_SetBackgroundMode(*args
, **kwargs
)
6206 def SetPalette(*args
, **kwargs
):
6208 SetPalette(self, Palette palette)
6210 If this is a window DC or memory DC, assigns the given palette to the
6211 window or bitmap associated with the DC. If the argument is
6212 ``wx.NullPalette``, the current palette is selected out of the device
6213 context, and the original palette restored.
6215 return _gdi_
.PseudoDC_SetPalette(*args
, **kwargs
)
6217 def SetTextForeground(*args
, **kwargs
):
6219 SetTextForeground(self, Colour colour)
6221 Sets the current text foreground colour for the DC.
6223 return _gdi_
.PseudoDC_SetTextForeground(*args
, **kwargs
)
6225 def SetTextBackground(*args
, **kwargs
):
6227 SetTextBackground(self, Colour colour)
6229 Sets the current text background colour for the DC.
6231 return _gdi_
.PseudoDC_SetTextBackground(*args
, **kwargs
)
6233 def SetLogicalFunction(*args
, **kwargs
):
6235 SetLogicalFunction(self, int function)
6237 Sets the current logical function for the device context. This
6238 determines how a source pixel (from a pen or brush colour, combines
6239 with a destination pixel in the current device context.
6241 The possible values and their meaning in terms of source and
6242 destination pixel values are as follows:
6244 ================ ==========================
6246 wx.AND_INVERT (NOT src) AND dst
6247 wx.AND_REVERSE src AND (NOT dst)
6250 wx.EQUIV (NOT src) XOR dst
6252 wx.NAND (NOT src) OR (NOT dst)
6253 wx.NOR (NOT src) AND (NOT dst)
6256 wx.OR_INVERT (NOT src) OR dst
6257 wx.OR_REVERSE src OR (NOT dst)
6259 wx.SRC_INVERT NOT src
6261 ================ ==========================
6263 The default is wx.COPY, which simply draws with the current
6264 colour. The others combine the current colour and the background using
6265 a logical operation. wx.INVERT is commonly used for drawing rubber
6266 bands or moving outlines, since drawing twice reverts to the original
6270 return _gdi_
.PseudoDC_SetLogicalFunction(*args
, **kwargs
)
6272 _gdi_
.PseudoDC_swigregister(PseudoDC
)