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 _gdi_
.Colour_swigregister(Colour
)
248 def NamedColour(*args
, **kwargs
):
250 NamedColour(String colorName) -> Colour
252 Constructs a colour object using a colour name listed in
253 ``wx.TheColourDatabase``.
255 val
= _gdi_
.new_NamedColour(*args
, **kwargs
)
258 def ColourRGB(*args
, **kwargs
):
260 ColourRGB(unsigned long colRGB) -> Colour
262 Constructs a colour from a packed RGB value.
264 val
= _gdi_
.new_ColourRGB(*args
, **kwargs
)
268 NamedColor
= NamedColour
271 class Palette(GDIObject
):
272 """Proxy of C++ Palette class"""
273 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
274 __repr__
= _swig_repr
275 def __init__(self
, *args
, **kwargs
):
276 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
277 _gdi_
.Palette_swiginit(self
,_gdi_
.new_Palette(*args
, **kwargs
))
278 __swig_destroy__
= _gdi_
.delete_Palette
279 __del__
= lambda self
: None;
280 def GetPixel(*args
, **kwargs
):
281 """GetPixel(self, byte red, byte green, byte blue) -> int"""
282 return _gdi_
.Palette_GetPixel(*args
, **kwargs
)
284 def GetRGB(*args
, **kwargs
):
285 """GetRGB(self, int pixel) -> (R,G,B)"""
286 return _gdi_
.Palette_GetRGB(*args
, **kwargs
)
288 def GetColoursCount(*args
, **kwargs
):
289 """GetColoursCount(self) -> int"""
290 return _gdi_
.Palette_GetColoursCount(*args
, **kwargs
)
292 def Ok(*args
, **kwargs
):
293 """Ok(self) -> bool"""
294 return _gdi_
.Palette_Ok(*args
, **kwargs
)
296 def __nonzero__(self
): return self
.Ok()
297 _gdi_
.Palette_swigregister(Palette
)
299 #---------------------------------------------------------------------------
301 class Pen(GDIObject
):
302 """Proxy of C++ Pen class"""
303 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
304 __repr__
= _swig_repr
305 def __init__(self
, *args
, **kwargs
):
306 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
307 _gdi_
.Pen_swiginit(self
,_gdi_
.new_Pen(*args
, **kwargs
))
308 __swig_destroy__
= _gdi_
.delete_Pen
309 __del__
= lambda self
: None;
310 def GetCap(*args
, **kwargs
):
311 """GetCap(self) -> int"""
312 return _gdi_
.Pen_GetCap(*args
, **kwargs
)
314 def GetColour(*args
, **kwargs
):
315 """GetColour(self) -> Colour"""
316 return _gdi_
.Pen_GetColour(*args
, **kwargs
)
318 def GetJoin(*args
, **kwargs
):
319 """GetJoin(self) -> int"""
320 return _gdi_
.Pen_GetJoin(*args
, **kwargs
)
322 def GetStyle(*args
, **kwargs
):
323 """GetStyle(self) -> int"""
324 return _gdi_
.Pen_GetStyle(*args
, **kwargs
)
326 def GetWidth(*args
, **kwargs
):
327 """GetWidth(self) -> int"""
328 return _gdi_
.Pen_GetWidth(*args
, **kwargs
)
330 def Ok(*args
, **kwargs
):
331 """Ok(self) -> bool"""
332 return _gdi_
.Pen_Ok(*args
, **kwargs
)
334 def SetCap(*args
, **kwargs
):
335 """SetCap(self, int cap_style)"""
336 return _gdi_
.Pen_SetCap(*args
, **kwargs
)
338 def SetColour(*args
, **kwargs
):
339 """SetColour(self, Colour colour)"""
340 return _gdi_
.Pen_SetColour(*args
, **kwargs
)
342 def SetJoin(*args
, **kwargs
):
343 """SetJoin(self, int join_style)"""
344 return _gdi_
.Pen_SetJoin(*args
, **kwargs
)
346 def SetStyle(*args
, **kwargs
):
347 """SetStyle(self, int style)"""
348 return _gdi_
.Pen_SetStyle(*args
, **kwargs
)
350 def SetWidth(*args
, **kwargs
):
351 """SetWidth(self, int width)"""
352 return _gdi_
.Pen_SetWidth(*args
, **kwargs
)
354 def SetDashes(*args
, **kwargs
):
355 """SetDashes(self, int dashes)"""
356 return _gdi_
.Pen_SetDashes(*args
, **kwargs
)
358 def GetDashes(*args
, **kwargs
):
359 """GetDashes(self) -> PyObject"""
360 return _gdi_
.Pen_GetDashes(*args
, **kwargs
)
362 def _SetDashes(*args
, **kwargs
):
363 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
364 return _gdi_
.Pen__SetDashes(*args
, **kwargs
)
366 def SetDashes(self
, dashes
):
368 Associate a list of dash lengths with the Pen.
370 self
._SetDashes
(self
, dashes
)
372 def __eq__(*args
, **kwargs
):
373 """__eq__(self, Pen other) -> bool"""
374 return _gdi_
.Pen___eq__(*args
, **kwargs
)
376 def __ne__(*args
, **kwargs
):
377 """__ne__(self, Pen other) -> bool"""
378 return _gdi_
.Pen___ne__(*args
, **kwargs
)
380 def __nonzero__(self
): return self
.Ok()
381 _gdi_
.Pen_swigregister(Pen
)
383 #---------------------------------------------------------------------------
385 class Brush(GDIObject
):
387 A brush is a drawing tool for filling in areas. It is used for
388 painting the background of rectangles, ellipses, etc. when drawing on
389 a `wx.DC`. It has a colour and a style.
391 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
392 __repr__
= _swig_repr
393 def __init__(self
, *args
, **kwargs
):
395 __init__(self, Colour colour, int style=SOLID) -> Brush
397 Constructs a brush from a `wx.Colour` object and a style.
399 _gdi_
.Brush_swiginit(self
,_gdi_
.new_Brush(*args
, **kwargs
))
400 __swig_destroy__
= _gdi_
.delete_Brush
401 __del__
= lambda self
: None;
402 def SetColour(*args
, **kwargs
):
404 SetColour(self, Colour col)
406 Set the brush's `wx.Colour`.
408 return _gdi_
.Brush_SetColour(*args
, **kwargs
)
410 def SetStyle(*args
, **kwargs
):
412 SetStyle(self, int style)
414 Sets the style of the brush. See `__init__` for a listing of styles.
416 return _gdi_
.Brush_SetStyle(*args
, **kwargs
)
418 def SetStipple(*args
, **kwargs
):
420 SetStipple(self, Bitmap stipple)
422 Sets the stipple `wx.Bitmap`.
424 return _gdi_
.Brush_SetStipple(*args
, **kwargs
)
426 def GetColour(*args
, **kwargs
):
428 GetColour(self) -> Colour
430 Returns the `wx.Colour` of the brush.
432 return _gdi_
.Brush_GetColour(*args
, **kwargs
)
434 def GetStyle(*args
, **kwargs
):
436 GetStyle(self) -> int
438 Returns the style of the brush. See `__init__` for a listing of
441 return _gdi_
.Brush_GetStyle(*args
, **kwargs
)
443 def GetStipple(*args
, **kwargs
):
445 GetStipple(self) -> Bitmap
447 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
448 have a wx.STIPPLE style, then the return value may be non-None but an
449 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
451 return _gdi_
.Brush_GetStipple(*args
, **kwargs
)
453 def IsHatch(*args
, **kwargs
):
455 IsHatch(self) -> bool
457 Is the current style a hatch type?
459 return _gdi_
.Brush_IsHatch(*args
, **kwargs
)
461 def Ok(*args
, **kwargs
):
465 Returns True if the brush is initialised and valid.
467 return _gdi_
.Brush_Ok(*args
, **kwargs
)
469 def MacGetTheme(*args
, **kwargs
):
470 """MacGetTheme(self) -> short"""
471 return _gdi_
.Brush_MacGetTheme(*args
, **kwargs
)
473 def MacSetTheme(*args
, **kwargs
):
474 """MacSetTheme(self, short macThemeBrush)"""
475 return _gdi_
.Brush_MacSetTheme(*args
, **kwargs
)
477 def __nonzero__(self
): return self
.Ok()
478 _gdi_
.Brush_swigregister(Brush
)
480 def BrushFromBitmap(*args
, **kwargs
):
482 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
484 Constructs a stippled brush using a bitmap.
486 val
= _gdi_
.new_BrushFromBitmap(*args
, **kwargs
)
489 class Bitmap(GDIObject
):
491 The wx.Bitmap class encapsulates the concept of a platform-dependent
492 bitmap. It can be either monochrome or colour, and either loaded from
493 a file or created dynamically. A bitmap can be selected into a memory
494 device context (instance of `wx.MemoryDC`). This enables the bitmap to
495 be copied to a window or memory device context using `wx.DC.Blit`, or
496 to be used as a drawing surface.
498 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
499 __repr__
= _swig_repr
500 def __init__(self
, *args
, **kwargs
):
502 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
504 Loads a bitmap from a file.
506 _gdi_
.Bitmap_swiginit(self
,_gdi_
.new_Bitmap(*args
, **kwargs
))
507 __swig_destroy__
= _gdi_
.delete_Bitmap
508 __del__
= lambda self
: None;
509 def Ok(*args
, **kwargs
):
510 """Ok(self) -> bool"""
511 return _gdi_
.Bitmap_Ok(*args
, **kwargs
)
513 def GetWidth(*args
, **kwargs
):
515 GetWidth(self) -> int
517 Gets the width of the bitmap in pixels.
519 return _gdi_
.Bitmap_GetWidth(*args
, **kwargs
)
521 def GetHeight(*args
, **kwargs
):
523 GetHeight(self) -> int
525 Gets the height of the bitmap in pixels.
527 return _gdi_
.Bitmap_GetHeight(*args
, **kwargs
)
529 def GetDepth(*args
, **kwargs
):
531 GetDepth(self) -> int
533 Gets the colour depth of the bitmap. A value of 1 indicates a
536 return _gdi_
.Bitmap_GetDepth(*args
, **kwargs
)
538 def GetSize(*args
, **kwargs
):
540 GetSize(self) -> Size
542 Get the size of the bitmap.
544 return _gdi_
.Bitmap_GetSize(*args
, **kwargs
)
546 def ConvertToImage(*args
, **kwargs
):
548 ConvertToImage(self) -> Image
550 Creates a platform-independent image from a platform-dependent
551 bitmap. This preserves mask information so that bitmaps and images can
552 be converted back and forth without loss in that respect.
554 return _gdi_
.Bitmap_ConvertToImage(*args
, **kwargs
)
556 def GetMask(*args
, **kwargs
):
558 GetMask(self) -> Mask
560 Gets the associated mask (if any) which may have been loaded from a
561 file or explpicitly set for the bitmap.
563 :see: `SetMask`, `wx.Mask`
566 return _gdi_
.Bitmap_GetMask(*args
, **kwargs
)
568 def SetMask(*args
, **kwargs
):
570 SetMask(self, Mask mask)
572 Sets the mask for this bitmap.
574 :see: `GetMask`, `wx.Mask`
577 return _gdi_
.Bitmap_SetMask(*args
, **kwargs
)
579 def SetMaskColour(*args
, **kwargs
):
581 SetMaskColour(self, Colour colour)
583 Create a Mask based on a specified colour in the Bitmap.
585 return _gdi_
.Bitmap_SetMaskColour(*args
, **kwargs
)
587 def GetSubBitmap(*args
, **kwargs
):
589 GetSubBitmap(self, Rect rect) -> Bitmap
591 Returns a sub-bitmap of the current one as long as the rect belongs
592 entirely to the bitmap. This function preserves bit depth and mask
595 return _gdi_
.Bitmap_GetSubBitmap(*args
, **kwargs
)
597 def SaveFile(*args
, **kwargs
):
599 SaveFile(self, String name, int type, Palette palette=None) -> bool
601 Saves a bitmap in the named file. See `__init__` for a description of
602 the ``type`` parameter.
604 return _gdi_
.Bitmap_SaveFile(*args
, **kwargs
)
606 def LoadFile(*args
, **kwargs
):
608 LoadFile(self, String name, int type) -> bool
610 Loads a bitmap from a file. See `__init__` for a description of the
613 return _gdi_
.Bitmap_LoadFile(*args
, **kwargs
)
615 def GetPalette(*args
, **kwargs
):
616 """GetPalette(self) -> Palette"""
617 return _gdi_
.Bitmap_GetPalette(*args
, **kwargs
)
619 def CopyFromIcon(*args
, **kwargs
):
620 """CopyFromIcon(self, Icon icon) -> bool"""
621 return _gdi_
.Bitmap_CopyFromIcon(*args
, **kwargs
)
623 def SetHeight(*args
, **kwargs
):
625 SetHeight(self, int height)
627 Set the height property (does not affect the existing bitmap data).
629 return _gdi_
.Bitmap_SetHeight(*args
, **kwargs
)
631 def SetWidth(*args
, **kwargs
):
633 SetWidth(self, int width)
635 Set the width property (does not affect the existing bitmap data).
637 return _gdi_
.Bitmap_SetWidth(*args
, **kwargs
)
639 def SetDepth(*args
, **kwargs
):
641 SetDepth(self, int depth)
643 Set the depth property (does not affect the existing bitmap data).
645 return _gdi_
.Bitmap_SetDepth(*args
, **kwargs
)
647 def SetSize(*args
, **kwargs
):
649 SetSize(self, Size size)
651 Set the bitmap size (does not affect the existing bitmap data).
653 return _gdi_
.Bitmap_SetSize(*args
, **kwargs
)
655 def __nonzero__(self
): return self
.Ok()
656 def __eq__(*args
, **kwargs
):
657 """__eq__(self, Bitmap other) -> bool"""
658 return _gdi_
.Bitmap___eq__(*args
, **kwargs
)
660 def __ne__(*args
, **kwargs
):
661 """__ne__(self, Bitmap other) -> bool"""
662 return _gdi_
.Bitmap___ne__(*args
, **kwargs
)
664 _gdi_
.Bitmap_swigregister(Bitmap
)
666 def EmptyBitmap(*args
, **kwargs
):
668 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
670 Creates a new bitmap of the given size. A depth of -1 indicates the
671 depth of the current screen or visual. Some platforms only support 1
672 for monochrome and -1 for the current display depth.
674 val
= _gdi_
.new_EmptyBitmap(*args
, **kwargs
)
677 def BitmapFromIcon(*args
, **kwargs
):
679 BitmapFromIcon(Icon icon) -> Bitmap
681 Create a new bitmap from a `wx.Icon` object.
683 val
= _gdi_
.new_BitmapFromIcon(*args
, **kwargs
)
686 def BitmapFromImage(*args
, **kwargs
):
688 BitmapFromImage(Image image, int depth=-1) -> Bitmap
690 Creates bitmap object from a `wx.Image`. This has to be done to
691 actually display a `wx.Image` as you cannot draw an image directly on
692 a window. The resulting bitmap will use the provided colour depth (or
693 that of the current screen colour depth if depth is -1) which entails
694 that a colour reduction may have to take place.
696 val
= _gdi_
.new_BitmapFromImage(*args
, **kwargs
)
699 def BitmapFromXPMData(*args
, **kwargs
):
701 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
703 Construct a Bitmap from a list of strings formatted as XPM data.
705 val
= _gdi_
.new_BitmapFromXPMData(*args
, **kwargs
)
708 def BitmapFromBits(*args
, **kwargs
):
710 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
712 Creates a bitmap from an array of bits. You should only use this
713 function for monochrome bitmaps (depth 1) in portable programs: in
714 this case the bits parameter should contain an XBM image. For other
715 bit depths, the behaviour is platform dependent.
717 val
= _gdi_
.new_BitmapFromBits(*args
, **kwargs
)
721 def _BitmapFromBufferAlpha(*args
, **kwargs
):
722 """_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
723 return _gdi_
._BitmapFromBufferAlpha
(*args
, **kwargs
)
725 def _BitmapFromBuffer(*args
, **kwargs
):
726 """_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
727 return _gdi_
._BitmapFromBuffer
(*args
, **kwargs
)
728 def BitmapFromBuffer(width
, height
, dataBuffer
, alphaBuffer
=None):
730 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
731 parameter must be a Python object that implements the buffer
732 interface, such as a string, array, etc. The dataBuffer object is
733 expected to contain a series of RGB bytes and be width*height*3
734 bytes long. A buffer object can optionally be supplied for the
735 image's alpha channel data, and it is expected to be width*height
736 bytes long. On Windows the RGB values are 'premultiplied' by the
737 alpha values. (The other platforms do the multiplication
740 Unlike `wx.ImageFromBuffer` the bitmap created with this function
741 does not share the memory buffer with the buffer object. This is
742 because the native pixel buffer format varies on different
743 platforms, and so instead an efficient as possible copy of the
744 data is made from the buffer objects to the bitmap's native pixel
745 buffer. For direct access to a bitmap's pixel buffer see
746 `wx.NativePixelData` and `wx.AlphaPixelData`.
748 :see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
749 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
751 if alphaBuffer
is not None:
752 return _gdi_
._BitmapFromBufferAlpha
(width
, height
, dataBuffer
, alphaBuffer
)
754 return _gdi_
._BitmapFromBuffer
(width
, height
, dataBuffer
)
757 def _BitmapFromBufferRGBA(*args
, **kwargs
):
758 """_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
759 return _gdi_
._BitmapFromBufferRGBA
(*args
, **kwargs
)
760 def BitmapFromBufferRGBA(width
, height
, dataBuffer
):
762 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
763 parameter must be a Python object that implements the buffer
764 interface, such as a string, array, etc. The dataBuffer object is
765 expected to contain a series of RGBA bytes (red, green, blue and
766 alpha) and be width*height*4 bytes long. On Windows the RGB
767 values are 'premultiplied' by the alpha values. (The other
768 platforms do the multiplication themselves.)
770 Unlike `wx.ImageFromBuffer` the bitmap created with this function
771 does not share the memory buffer with the buffer object. This is
772 because the native pixel buffer format varies on different
773 platforms, and so instead an efficient as possible copy of the
774 data is made from the buffer object to the bitmap's native pixel
775 buffer. For direct access to a bitmap's pixel buffer see
776 `wx.NativePixelData` and `wx.AlphaPixelData`.
778 :see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
779 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
781 return _gdi_
._BitmapFromBufferRGBA
(width
, height
, dataBuffer
)
783 class PixelDataBase(object):
784 """Proxy of C++ PixelDataBase class"""
785 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
786 def __init__(self
): raise AttributeError, "No constructor defined"
787 __repr__
= _swig_repr
788 def GetOrigin(*args
, **kwargs
):
789 """GetOrigin(self) -> Point"""
790 return _gdi_
.PixelDataBase_GetOrigin(*args
, **kwargs
)
792 def GetWidth(*args
, **kwargs
):
793 """GetWidth(self) -> int"""
794 return _gdi_
.PixelDataBase_GetWidth(*args
, **kwargs
)
796 def GetHeight(*args
, **kwargs
):
797 """GetHeight(self) -> int"""
798 return _gdi_
.PixelDataBase_GetHeight(*args
, **kwargs
)
800 def GetSize(*args
, **kwargs
):
801 """GetSize(self) -> Size"""
802 return _gdi_
.PixelDataBase_GetSize(*args
, **kwargs
)
804 def GetRowStride(*args
, **kwargs
):
805 """GetRowStride(self) -> int"""
806 return _gdi_
.PixelDataBase_GetRowStride(*args
, **kwargs
)
808 _gdi_
.PixelDataBase_swigregister(PixelDataBase
)
810 class NativePixelData(PixelDataBase
):
811 """Proxy of C++ NativePixelData class"""
812 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
813 __repr__
= _swig_repr
814 def __init__(self
, *args
):
816 __init__(self, Bitmap bmp) -> NativePixelData
817 __init__(self, Bitmap bmp, Rect rect) -> NativePixelData
818 __init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
820 _gdi_
.NativePixelData_swiginit(self
,_gdi_
.new_NativePixelData(*args
))
821 __swig_destroy__
= _gdi_
.delete_NativePixelData
822 __del__
= lambda self
: None;
823 def GetPixels(*args
, **kwargs
):
824 """GetPixels(self) -> NativePixelData_Accessor"""
825 return _gdi_
.NativePixelData_GetPixels(*args
, **kwargs
)
827 def UseAlpha(*args
, **kwargs
):
829 return _gdi_
.NativePixelData_UseAlpha(*args
, **kwargs
)
831 def __nonzero__(*args
, **kwargs
):
832 """__nonzero__(self) -> bool"""
833 return _gdi_
.NativePixelData___nonzero__(*args
, **kwargs
)
836 """Create and return an iterator object for this pixel data object."""
837 return self
.PixelIterator(self
)
839 class PixelIterator(object):
841 Sequential iterator which returns pixel accessor objects starting at the
842 the top-left corner, and going row-by-row until the bottom-right
846 class PixelAccessor(object):
848 This class is what is returned by the iterator and allows the pixel
851 def __init__(self
, data
, pixels
, x
, y
):
856 def Set(self
, *args
, **kw
):
857 self
.pixels
.MoveTo(self
.data
, self
.x
, self
.y
)
858 return self
.pixels
.Set(*args
, **kw
)
860 self
.pixels
.MoveTo(self
.data
, self
.x
, self
.y
)
861 return self
.pixels
.Get()
863 def __init__(self
, pixelData
):
865 self
.w
= pixelData
.GetWidth()
866 self
.h
= pixelData
.GetHeight()
867 self
.data
= pixelData
868 self
.pixels
= pixelData
.GetPixels()
876 p
= self
.PixelAccessor(self
.data
, self
.pixels
, self
.x
, self
.y
)
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
)
964 """Create and return an iterator object for this pixel data object."""
965 return self
.PixelIterator(self
)
967 class PixelIterator(object):
969 Sequential iterator which returns pixel accessor objects starting at the
970 the top-left corner, and going row-by-row until the bottom-right
974 class PixelAccessor(object):
976 This class is what is returned by the iterator and allows the pixel
979 def __init__(self
, data
, pixels
, x
, y
):
984 def Set(self
, *args
, **kw
):
985 self
.pixels
.MoveTo(self
.data
, self
.x
, self
.y
)
986 return self
.pixels
.Set(*args
, **kw
)
988 self
.pixels
.MoveTo(self
.data
, self
.x
, self
.y
)
989 return self
.pixels
.Get()
991 def __init__(self
, pixelData
):
993 self
.w
= pixelData
.GetWidth()
994 self
.h
= pixelData
.GetHeight()
995 self
.data
= pixelData
996 self
.pixels
= pixelData
.GetPixels()
1002 if self
.y
>= self
.h
:
1004 p
= self
.PixelAccessor(self
.data
, self
.pixels
, self
.x
, self
.y
)
1006 if self
.x
>= self
.w
:
1011 _gdi_
.AlphaPixelData_swigregister(AlphaPixelData
)
1013 class AlphaPixelData_Accessor(object):
1014 """Proxy of C++ AlphaPixelData_Accessor class"""
1015 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1016 __repr__
= _swig_repr
1017 def __init__(self
, *args
):
1019 __init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
1020 __init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
1021 __init__(self) -> AlphaPixelData_Accessor
1023 _gdi_
.AlphaPixelData_Accessor_swiginit(self
,_gdi_
.new_AlphaPixelData_Accessor(*args
))
1024 __swig_destroy__
= _gdi_
.delete_AlphaPixelData_Accessor
1025 __del__
= lambda self
: None;
1026 def Reset(*args
, **kwargs
):
1027 """Reset(self, AlphaPixelData data)"""
1028 return _gdi_
.AlphaPixelData_Accessor_Reset(*args
, **kwargs
)
1030 def IsOk(*args
, **kwargs
):
1031 """IsOk(self) -> bool"""
1032 return _gdi_
.AlphaPixelData_Accessor_IsOk(*args
, **kwargs
)
1034 def nextPixel(*args
, **kwargs
):
1035 """nextPixel(self)"""
1036 return _gdi_
.AlphaPixelData_Accessor_nextPixel(*args
, **kwargs
)
1038 def Offset(*args
, **kwargs
):
1039 """Offset(self, AlphaPixelData data, int x, int y)"""
1040 return _gdi_
.AlphaPixelData_Accessor_Offset(*args
, **kwargs
)
1042 def OffsetX(*args
, **kwargs
):
1043 """OffsetX(self, AlphaPixelData data, int x)"""
1044 return _gdi_
.AlphaPixelData_Accessor_OffsetX(*args
, **kwargs
)
1046 def OffsetY(*args
, **kwargs
):
1047 """OffsetY(self, AlphaPixelData data, int y)"""
1048 return _gdi_
.AlphaPixelData_Accessor_OffsetY(*args
, **kwargs
)
1050 def MoveTo(*args
, **kwargs
):
1051 """MoveTo(self, AlphaPixelData data, int x, int y)"""
1052 return _gdi_
.AlphaPixelData_Accessor_MoveTo(*args
, **kwargs
)
1054 def Set(*args
, **kwargs
):
1055 """Set(self, byte red, byte green, byte blue, byte alpha)"""
1056 return _gdi_
.AlphaPixelData_Accessor_Set(*args
, **kwargs
)
1058 def Get(*args
, **kwargs
):
1059 """Get(self) -> PyObject"""
1060 return _gdi_
.AlphaPixelData_Accessor_Get(*args
, **kwargs
)
1062 _gdi_
.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor
)
1064 class Mask(_core
.Object
):
1066 This class encapsulates a monochrome mask bitmap, where the masked
1067 area is black and the unmasked area is white. When associated with a
1068 bitmap and drawn in a device context, the unmasked area of the bitmap
1069 will be drawn, and the masked area will not be drawn.
1071 A mask may be associated with a `wx.Bitmap`. It is used in
1072 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
1073 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
1076 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1077 __repr__
= _swig_repr
1078 def __init__(self
, *args
, **kwargs
):
1080 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
1082 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
1083 that indicates the transparent portions of the mask. In other words,
1084 the pixels in ``bitmap`` that match ``colour`` will be the transparent
1085 portions of the mask. If no ``colour`` or an invalid ``colour`` is
1086 passed then BLACK is used.
1088 :see: `wx.Bitmap`, `wx.Colour`
1090 _gdi_
.Mask_swiginit(self
,_gdi_
.new_Mask(*args
, **kwargs
))
1091 __swig_destroy__
= _gdi_
.delete_Mask
1092 __del__
= lambda self
: None;
1093 _gdi_
.Mask_swigregister(Mask
)
1095 MaskColour
= wx
._deprecated
(Mask
, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
1096 class Icon(GDIObject
):
1097 """Proxy of C++ Icon class"""
1098 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1099 __repr__
= _swig_repr
1100 def __init__(self
, *args
, **kwargs
):
1101 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
1102 _gdi_
.Icon_swiginit(self
,_gdi_
.new_Icon(*args
, **kwargs
))
1103 __swig_destroy__
= _gdi_
.delete_Icon
1104 __del__
= lambda self
: None;
1105 def Ok(*args
, **kwargs
):
1106 """Ok(self) -> bool"""
1107 return _gdi_
.Icon_Ok(*args
, **kwargs
)
1109 def GetWidth(*args
, **kwargs
):
1110 """GetWidth(self) -> int"""
1111 return _gdi_
.Icon_GetWidth(*args
, **kwargs
)
1113 def GetHeight(*args
, **kwargs
):
1114 """GetHeight(self) -> int"""
1115 return _gdi_
.Icon_GetHeight(*args
, **kwargs
)
1117 def GetDepth(*args
, **kwargs
):
1118 """GetDepth(self) -> int"""
1119 return _gdi_
.Icon_GetDepth(*args
, **kwargs
)
1121 def SetWidth(*args
, **kwargs
):
1122 """SetWidth(self, int w)"""
1123 return _gdi_
.Icon_SetWidth(*args
, **kwargs
)
1125 def SetHeight(*args
, **kwargs
):
1126 """SetHeight(self, int h)"""
1127 return _gdi_
.Icon_SetHeight(*args
, **kwargs
)
1129 def SetDepth(*args
, **kwargs
):
1130 """SetDepth(self, int d)"""
1131 return _gdi_
.Icon_SetDepth(*args
, **kwargs
)
1133 def CopyFromBitmap(*args
, **kwargs
):
1134 """CopyFromBitmap(self, Bitmap bmp)"""
1135 return _gdi_
.Icon_CopyFromBitmap(*args
, **kwargs
)
1137 def __nonzero__(self
): return self
.Ok()
1138 _gdi_
.Icon_swigregister(Icon
)
1140 def EmptyIcon(*args
, **kwargs
):
1141 """EmptyIcon() -> Icon"""
1142 val
= _gdi_
.new_EmptyIcon(*args
, **kwargs
)
1145 def IconFromLocation(*args
, **kwargs
):
1146 """IconFromLocation(IconLocation loc) -> Icon"""
1147 val
= _gdi_
.new_IconFromLocation(*args
, **kwargs
)
1150 def IconFromBitmap(*args
, **kwargs
):
1151 """IconFromBitmap(Bitmap bmp) -> Icon"""
1152 val
= _gdi_
.new_IconFromBitmap(*args
, **kwargs
)
1155 def IconFromXPMData(*args
, **kwargs
):
1156 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
1157 val
= _gdi_
.new_IconFromXPMData(*args
, **kwargs
)
1160 class IconLocation(object):
1161 """Proxy of C++ IconLocation class"""
1162 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1163 __repr__
= _swig_repr
1164 def __init__(self
, *args
, **kwargs
):
1165 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
1166 _gdi_
.IconLocation_swiginit(self
,_gdi_
.new_IconLocation(*args
, **kwargs
))
1167 __swig_destroy__
= _gdi_
.delete_IconLocation
1168 __del__
= lambda self
: None;
1169 def IsOk(*args
, **kwargs
):
1170 """IsOk(self) -> bool"""
1171 return _gdi_
.IconLocation_IsOk(*args
, **kwargs
)
1173 def __nonzero__(self
): return self
.Ok()
1174 def SetFileName(*args
, **kwargs
):
1175 """SetFileName(self, String filename)"""
1176 return _gdi_
.IconLocation_SetFileName(*args
, **kwargs
)
1178 def GetFileName(*args
, **kwargs
):
1179 """GetFileName(self) -> String"""
1180 return _gdi_
.IconLocation_GetFileName(*args
, **kwargs
)
1182 def SetIndex(*args
, **kwargs
):
1183 """SetIndex(self, int num)"""
1184 return _gdi_
.IconLocation_SetIndex(*args
, **kwargs
)
1186 def GetIndex(*args
, **kwargs
):
1187 """GetIndex(self) -> int"""
1188 return _gdi_
.IconLocation_GetIndex(*args
, **kwargs
)
1190 _gdi_
.IconLocation_swigregister(IconLocation
)
1192 class IconBundle(object):
1193 """Proxy of C++ IconBundle class"""
1194 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1195 __repr__
= _swig_repr
1196 def __init__(self
, *args
, **kwargs
):
1197 """__init__(self) -> IconBundle"""
1198 _gdi_
.IconBundle_swiginit(self
,_gdi_
.new_IconBundle(*args
, **kwargs
))
1199 __swig_destroy__
= _gdi_
.delete_IconBundle
1200 __del__
= lambda self
: None;
1201 def AddIcon(*args
, **kwargs
):
1202 """AddIcon(self, Icon icon)"""
1203 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
1205 def AddIconFromFile(*args
, **kwargs
):
1206 """AddIconFromFile(self, String file, long type)"""
1207 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
1209 def GetIcon(*args
, **kwargs
):
1210 """GetIcon(self, Size size) -> Icon"""
1211 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
1213 _gdi_
.IconBundle_swigregister(IconBundle
)
1215 def IconBundleFromFile(*args
, **kwargs
):
1216 """IconBundleFromFile(String file, long type) -> IconBundle"""
1217 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
1220 def IconBundleFromIcon(*args
, **kwargs
):
1221 """IconBundleFromIcon(Icon icon) -> IconBundle"""
1222 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
1225 class Cursor(GDIObject
):
1227 A cursor is a small bitmap usually used for denoting where the mouse
1228 pointer is, with a picture that might indicate the interpretation of a
1231 A single cursor object may be used in many windows (any subwindow
1232 type). The wxWindows convention is to set the cursor for a window, as
1233 in X, rather than to set it globally as in MS Windows, although a
1234 global `wx.SetCursor` function is also available for use on MS Windows.
1237 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1238 __repr__
= _swig_repr
1239 def __init__(self
, *args
, **kwargs
):
1241 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1243 Construct a Cursor from a file. Specify the type of file using
1244 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1247 _gdi_
.Cursor_swiginit(self
,_gdi_
.new_Cursor(*args
, **kwargs
))
1248 __swig_destroy__
= _gdi_
.delete_Cursor
1249 __del__
= lambda self
: None;
1250 def Ok(*args
, **kwargs
):
1251 """Ok(self) -> bool"""
1252 return _gdi_
.Cursor_Ok(*args
, **kwargs
)
1254 def __nonzero__(self
): return self
.Ok()
1255 _gdi_
.Cursor_swigregister(Cursor
)
1257 def StockCursor(*args
, **kwargs
):
1259 StockCursor(int id) -> Cursor
1261 Create a cursor using one of the stock cursors. Note that not all
1262 stock cursors are available on all platforms.
1264 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
1267 def CursorFromImage(*args
, **kwargs
):
1269 CursorFromImage(Image image) -> Cursor
1271 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1272 for setting the transparent portions of the cursor.
1274 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
1277 #---------------------------------------------------------------------------
1279 OutRegion
= _gdi_
.OutRegion
1280 PartRegion
= _gdi_
.PartRegion
1281 InRegion
= _gdi_
.InRegion
1282 class Region(GDIObject
):
1283 """Proxy of C++ Region class"""
1284 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1285 __repr__
= _swig_repr
1286 def __init__(self
, *args
, **kwargs
):
1287 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1288 _gdi_
.Region_swiginit(self
,_gdi_
.new_Region(*args
, **kwargs
))
1289 __swig_destroy__
= _gdi_
.delete_Region
1290 __del__
= lambda self
: None;
1291 def Clear(*args
, **kwargs
):
1293 return _gdi_
.Region_Clear(*args
, **kwargs
)
1295 def Offset(*args
, **kwargs
):
1296 """Offset(self, int x, int y) -> bool"""
1297 return _gdi_
.Region_Offset(*args
, **kwargs
)
1299 def Contains(*args
, **kwargs
):
1300 """Contains(self, int x, int y) -> int"""
1301 return _gdi_
.Region_Contains(*args
, **kwargs
)
1303 def ContainsPoint(*args
, **kwargs
):
1304 """ContainsPoint(self, Point pt) -> int"""
1305 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
1307 def ContainsRect(*args
, **kwargs
):
1308 """ContainsRect(self, Rect rect) -> int"""
1309 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
1311 def ContainsRectDim(*args
, **kwargs
):
1312 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1313 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
1315 def GetBox(*args
, **kwargs
):
1316 """GetBox(self) -> Rect"""
1317 return _gdi_
.Region_GetBox(*args
, **kwargs
)
1319 def Intersect(*args
, **kwargs
):
1320 """Intersect(self, int x, int y, int width, int height) -> bool"""
1321 return _gdi_
.Region_Intersect(*args
, **kwargs
)
1323 def IntersectRect(*args
, **kwargs
):
1324 """IntersectRect(self, Rect rect) -> bool"""
1325 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
1327 def IntersectRegion(*args
, **kwargs
):
1328 """IntersectRegion(self, Region region) -> bool"""
1329 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
1331 def IsEmpty(*args
, **kwargs
):
1332 """IsEmpty(self) -> bool"""
1333 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
1335 def Union(*args
, **kwargs
):
1336 """Union(self, int x, int y, int width, int height) -> bool"""
1337 return _gdi_
.Region_Union(*args
, **kwargs
)
1339 def UnionRect(*args
, **kwargs
):
1340 """UnionRect(self, Rect rect) -> bool"""
1341 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1343 def UnionRegion(*args
, **kwargs
):
1344 """UnionRegion(self, Region region) -> bool"""
1345 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1347 def Subtract(*args
, **kwargs
):
1348 """Subtract(self, int x, int y, int width, int height) -> bool"""
1349 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1351 def SubtractRect(*args
, **kwargs
):
1352 """SubtractRect(self, Rect rect) -> bool"""
1353 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1355 def SubtractRegion(*args
, **kwargs
):
1356 """SubtractRegion(self, Region region) -> bool"""
1357 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1359 def Xor(*args
, **kwargs
):
1360 """Xor(self, int x, int y, int width, int height) -> bool"""
1361 return _gdi_
.Region_Xor(*args
, **kwargs
)
1363 def XorRect(*args
, **kwargs
):
1364 """XorRect(self, Rect rect) -> bool"""
1365 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1367 def XorRegion(*args
, **kwargs
):
1368 """XorRegion(self, Region region) -> bool"""
1369 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1371 def ConvertToBitmap(*args
, **kwargs
):
1372 """ConvertToBitmap(self) -> Bitmap"""
1373 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1375 def UnionBitmap(*args
, **kwargs
):
1376 """UnionBitmap(self, Bitmap bmp) -> bool"""
1377 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1379 def UnionBitmapColour(*args
, **kwargs
):
1380 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1381 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1383 _gdi_
.Region_swigregister(Region
)
1385 def RegionFromBitmap(*args
, **kwargs
):
1386 """RegionFromBitmap(Bitmap bmp) -> Region"""
1387 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1390 def RegionFromBitmapColour(*args
, **kwargs
):
1391 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1392 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1395 def RegionFromPoints(*args
, **kwargs
):
1396 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1397 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1400 class RegionIterator(_core
.Object
):
1401 """Proxy of C++ RegionIterator class"""
1402 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1403 __repr__
= _swig_repr
1404 def __init__(self
, *args
, **kwargs
):
1405 """__init__(self, Region region) -> RegionIterator"""
1406 _gdi_
.RegionIterator_swiginit(self
,_gdi_
.new_RegionIterator(*args
, **kwargs
))
1407 __swig_destroy__
= _gdi_
.delete_RegionIterator
1408 __del__
= lambda self
: None;
1409 def GetX(*args
, **kwargs
):
1410 """GetX(self) -> int"""
1411 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1413 def GetY(*args
, **kwargs
):
1414 """GetY(self) -> int"""
1415 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1417 def GetW(*args
, **kwargs
):
1418 """GetW(self) -> int"""
1419 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1421 def GetWidth(*args
, **kwargs
):
1422 """GetWidth(self) -> int"""
1423 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1425 def GetH(*args
, **kwargs
):
1426 """GetH(self) -> int"""
1427 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1429 def GetHeight(*args
, **kwargs
):
1430 """GetHeight(self) -> int"""
1431 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1433 def GetRect(*args
, **kwargs
):
1434 """GetRect(self) -> Rect"""
1435 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1437 def HaveRects(*args
, **kwargs
):
1438 """HaveRects(self) -> bool"""
1439 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1441 def Reset(*args
, **kwargs
):
1443 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1445 def Next(*args
, **kwargs
):
1447 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1449 def __nonzero__(*args
, **kwargs
):
1450 """__nonzero__(self) -> bool"""
1451 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1453 _gdi_
.RegionIterator_swigregister(RegionIterator
)
1455 #---------------------------------------------------------------------------
1457 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1458 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1459 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1460 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1461 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1462 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1463 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1464 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1465 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1466 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1467 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1468 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1469 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1470 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1471 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1472 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1473 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1474 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1475 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1476 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1477 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1478 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1479 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1480 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1481 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1482 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1483 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1484 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1485 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1486 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1487 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1488 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1489 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1490 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1491 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1492 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1493 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1494 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1495 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1496 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1497 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1498 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1499 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1500 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1501 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1502 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1503 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1504 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1505 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1506 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1507 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1508 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1509 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1510 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1511 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1512 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1513 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1514 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1515 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1516 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1517 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1518 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1519 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1520 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1521 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1522 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1523 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1524 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1525 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1526 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1527 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1528 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1529 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1530 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1531 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1532 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1533 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1534 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1535 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1536 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1537 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1538 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1539 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1540 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1541 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1542 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1543 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1544 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1545 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1546 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1547 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1548 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1549 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1550 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1551 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1552 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1553 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1554 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1555 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1556 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1557 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1558 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1559 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1560 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1561 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1562 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1563 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1564 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1565 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1566 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1567 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1568 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1569 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1570 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1571 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1572 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1573 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1574 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1575 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1576 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1577 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1578 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1579 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1580 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1581 #---------------------------------------------------------------------------
1583 class NativeFontInfo(object):
1584 """Proxy of C++ NativeFontInfo class"""
1585 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1586 __repr__
= _swig_repr
1587 def __init__(self
, *args
, **kwargs
):
1588 """__init__(self) -> NativeFontInfo"""
1589 _gdi_
.NativeFontInfo_swiginit(self
,_gdi_
.new_NativeFontInfo(*args
, **kwargs
))
1590 __swig_destroy__
= _gdi_
.delete_NativeFontInfo
1591 __del__
= lambda self
: None;
1592 def Init(*args
, **kwargs
):
1594 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1596 def InitFromFont(*args
, **kwargs
):
1597 """InitFromFont(self, Font font)"""
1598 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1600 def GetPointSize(*args
, **kwargs
):
1601 """GetPointSize(self) -> int"""
1602 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1604 def GetStyle(*args
, **kwargs
):
1605 """GetStyle(self) -> int"""
1606 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1608 def GetWeight(*args
, **kwargs
):
1609 """GetWeight(self) -> int"""
1610 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1612 def GetUnderlined(*args
, **kwargs
):
1613 """GetUnderlined(self) -> bool"""
1614 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1616 def GetFaceName(*args
, **kwargs
):
1617 """GetFaceName(self) -> String"""
1618 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1620 def GetFamily(*args
, **kwargs
):
1621 """GetFamily(self) -> int"""
1622 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1624 def GetEncoding(*args
, **kwargs
):
1625 """GetEncoding(self) -> int"""
1626 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1628 def SetPointSize(*args
, **kwargs
):
1629 """SetPointSize(self, int pointsize)"""
1630 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1632 def SetStyle(*args
, **kwargs
):
1633 """SetStyle(self, int style)"""
1634 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1636 def SetWeight(*args
, **kwargs
):
1637 """SetWeight(self, int weight)"""
1638 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1640 def SetUnderlined(*args
, **kwargs
):
1641 """SetUnderlined(self, bool underlined)"""
1642 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1644 def SetFaceName(*args
, **kwargs
):
1645 """SetFaceName(self, String facename) -> bool"""
1646 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1648 def SetFamily(*args
, **kwargs
):
1649 """SetFamily(self, int family)"""
1650 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1652 def SetEncoding(*args
, **kwargs
):
1653 """SetEncoding(self, int encoding)"""
1654 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1656 def FromString(*args
, **kwargs
):
1657 """FromString(self, String s) -> bool"""
1658 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1660 def ToString(*args
, **kwargs
):
1661 """ToString(self) -> String"""
1662 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1664 def __str__(*args
, **kwargs
):
1665 """__str__(self) -> String"""
1666 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1668 def FromUserString(*args
, **kwargs
):
1669 """FromUserString(self, String s) -> bool"""
1670 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1672 def ToUserString(*args
, **kwargs
):
1673 """ToUserString(self) -> String"""
1674 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1676 _gdi_
.NativeFontInfo_swigregister(NativeFontInfo
)
1678 class NativeEncodingInfo(object):
1679 """Proxy of C++ NativeEncodingInfo class"""
1680 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1681 __repr__
= _swig_repr
1682 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1683 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1684 def __init__(self
, *args
, **kwargs
):
1685 """__init__(self) -> NativeEncodingInfo"""
1686 _gdi_
.NativeEncodingInfo_swiginit(self
,_gdi_
.new_NativeEncodingInfo(*args
, **kwargs
))
1687 __swig_destroy__
= _gdi_
.delete_NativeEncodingInfo
1688 __del__
= lambda self
: None;
1689 def FromString(*args
, **kwargs
):
1690 """FromString(self, String s) -> bool"""
1691 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1693 def ToString(*args
, **kwargs
):
1694 """ToString(self) -> String"""
1695 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1697 _gdi_
.NativeEncodingInfo_swigregister(NativeEncodingInfo
)
1700 def GetNativeFontEncoding(*args
, **kwargs
):
1701 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1702 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1704 def TestFontEncoding(*args
, **kwargs
):
1705 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1706 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1707 #---------------------------------------------------------------------------
1709 class FontMapper(object):
1710 """Proxy of C++ FontMapper class"""
1711 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1712 __repr__
= _swig_repr
1713 def __init__(self
, *args
, **kwargs
):
1714 """__init__(self) -> FontMapper"""
1715 _gdi_
.FontMapper_swiginit(self
,_gdi_
.new_FontMapper(*args
, **kwargs
))
1716 __swig_destroy__
= _gdi_
.delete_FontMapper
1717 __del__
= lambda self
: None;
1718 def Get(*args
, **kwargs
):
1719 """Get() -> FontMapper"""
1720 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1722 Get
= staticmethod(Get
)
1723 def Set(*args
, **kwargs
):
1724 """Set(FontMapper mapper) -> FontMapper"""
1725 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1727 Set
= staticmethod(Set
)
1728 def CharsetToEncoding(*args
, **kwargs
):
1729 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1730 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1732 def GetSupportedEncodingsCount(*args
, **kwargs
):
1733 """GetSupportedEncodingsCount() -> size_t"""
1734 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1736 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1737 def GetEncoding(*args
, **kwargs
):
1738 """GetEncoding(size_t n) -> int"""
1739 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1741 GetEncoding
= staticmethod(GetEncoding
)
1742 def GetEncodingName(*args
, **kwargs
):
1743 """GetEncodingName(int encoding) -> String"""
1744 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1746 GetEncodingName
= staticmethod(GetEncodingName
)
1747 def GetEncodingDescription(*args
, **kwargs
):
1748 """GetEncodingDescription(int encoding) -> String"""
1749 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1751 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1752 def GetEncodingFromName(*args
, **kwargs
):
1753 """GetEncodingFromName(String name) -> int"""
1754 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1756 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1757 def SetConfigPath(*args
, **kwargs
):
1758 """SetConfigPath(self, String prefix)"""
1759 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1761 def GetDefaultConfigPath(*args
, **kwargs
):
1762 """GetDefaultConfigPath() -> String"""
1763 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1765 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1766 def GetAltForEncoding(*args
, **kwargs
):
1767 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1768 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1770 def IsEncodingAvailable(*args
, **kwargs
):
1771 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1772 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1774 def SetDialogParent(*args
, **kwargs
):
1775 """SetDialogParent(self, Window parent)"""
1776 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1778 def SetDialogTitle(*args
, **kwargs
):
1779 """SetDialogTitle(self, String title)"""
1780 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1782 _gdi_
.FontMapper_swigregister(FontMapper
)
1784 def FontMapper_Get(*args
):
1785 """FontMapper_Get() -> FontMapper"""
1786 return _gdi_
.FontMapper_Get(*args
)
1788 def FontMapper_Set(*args
, **kwargs
):
1789 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1790 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1792 def FontMapper_GetSupportedEncodingsCount(*args
):
1793 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1794 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
)
1796 def FontMapper_GetEncoding(*args
, **kwargs
):
1797 """FontMapper_GetEncoding(size_t n) -> int"""
1798 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1800 def FontMapper_GetEncodingName(*args
, **kwargs
):
1801 """FontMapper_GetEncodingName(int encoding) -> String"""
1802 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1804 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1805 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1806 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1808 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1809 """FontMapper_GetEncodingFromName(String name) -> int"""
1810 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1812 def FontMapper_GetDefaultConfigPath(*args
):
1813 """FontMapper_GetDefaultConfigPath() -> String"""
1814 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
)
1816 #---------------------------------------------------------------------------
1818 class Font(GDIObject
):
1820 A font is an object which determines the appearance of text. Fonts are
1821 used for drawing text to a device context, and setting the appearance
1824 You can retrieve the current system font settings with `wx.SystemSettings`.
1826 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1827 __repr__
= _swig_repr
1828 def __init__(self
, *args
, **kwargs
):
1830 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1831 String face=EmptyString,
1832 int encoding=FONTENCODING_DEFAULT) -> Font
1834 Creates a font object with the specified attributes.
1836 :param pointSize: The size of the font in points.
1838 :param family: Font family. A generic way of referring to fonts
1839 without specifying actual facename. It can be One of
1840 the ``wx.FONTFAMILY_xxx`` constants.
1842 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1844 :param weight: Font weight, sometimes also referred to as font
1845 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1847 :param underline: The value can be ``True`` or ``False`` and
1848 indicates whether the font will include an underline. This
1849 may not be supported on all platforms.
1851 :param face: An optional string specifying the actual typeface to
1852 be used. If it is an empty string, a default typeface will be
1853 chosen based on the family.
1855 :param encoding: An encoding which may be one of the
1856 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1857 available, no font is created.
1859 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1860 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1863 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1864 _gdi_
.Font_swiginit(self
,_gdi_
.new_Font(*args
, **kwargs
))
1865 __swig_destroy__
= _gdi_
.delete_Font
1866 __del__
= lambda self
: None;
1867 def Ok(*args
, **kwargs
):
1871 Returns ``True`` if this font was successfully created.
1873 return _gdi_
.Font_Ok(*args
, **kwargs
)
1875 def __nonzero__(self
): return self
.Ok()
1876 def __eq__(*args
, **kwargs
):
1877 """__eq__(self, Font other) -> bool"""
1878 return _gdi_
.Font___eq__(*args
, **kwargs
)
1880 def __ne__(*args
, **kwargs
):
1881 """__ne__(self, Font other) -> bool"""
1882 return _gdi_
.Font___ne__(*args
, **kwargs
)
1884 def GetPointSize(*args
, **kwargs
):
1886 GetPointSize(self) -> int
1888 Gets the point size.
1890 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
1892 def GetPixelSize(*args
, **kwargs
):
1894 GetPixelSize(self) -> Size
1896 Returns the size in pixels if the font was constructed with a pixel
1899 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
1901 def IsUsingSizeInPixels(*args
, **kwargs
):
1903 IsUsingSizeInPixels(self) -> bool
1905 Returns ``True`` if the font is using a pixelSize.
1907 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
1909 def GetFamily(*args
, **kwargs
):
1911 GetFamily(self) -> int
1913 Gets the font family.
1915 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
1917 def GetStyle(*args
, **kwargs
):
1919 GetStyle(self) -> int
1921 Gets the font style.
1923 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
1925 def GetWeight(*args
, **kwargs
):
1927 GetWeight(self) -> int
1929 Gets the font weight.
1931 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
1933 def GetUnderlined(*args
, **kwargs
):
1935 GetUnderlined(self) -> bool
1937 Returns ``True`` if the font is underlined, ``False`` otherwise.
1939 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
1941 def GetFaceName(*args
, **kwargs
):
1943 GetFaceName(self) -> String
1945 Returns the typeface name associated with the font, or the empty
1946 string if there is no typeface information.
1948 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
1950 def GetEncoding(*args
, **kwargs
):
1952 GetEncoding(self) -> int
1954 Get the font's encoding.
1956 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
1958 def GetNativeFontInfo(*args
, **kwargs
):
1960 GetNativeFontInfo(self) -> NativeFontInfo
1962 Constructs a `wx.NativeFontInfo` object from this font.
1964 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
1966 def IsFixedWidth(*args
, **kwargs
):
1968 IsFixedWidth(self) -> bool
1970 Returns true if the font is a fixed width (or monospaced) font, false
1971 if it is a proportional one or font is invalid.
1973 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
1975 def GetNativeFontInfoDesc(*args
, **kwargs
):
1977 GetNativeFontInfoDesc(self) -> String
1979 Returns the platform-dependent string completely describing this font
1980 or an empty string if the font isn't valid.
1982 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
1984 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
1986 GetNativeFontInfoUserDesc(self) -> String
1988 Returns a human readable version of `GetNativeFontInfoDesc`.
1990 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
1992 def SetPointSize(*args
, **kwargs
):
1994 SetPointSize(self, int pointSize)
1996 Sets the point size.
1998 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
2000 def SetPixelSize(*args
, **kwargs
):
2002 SetPixelSize(self, Size pixelSize)
2004 Sets the size in pixels rather than points. If there is platform API
2005 support for this then it is used, otherwise a font with the closest
2006 size is found using a binary search.
2008 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
2010 def SetFamily(*args
, **kwargs
):
2012 SetFamily(self, int family)
2014 Sets the font family.
2016 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
2018 def SetStyle(*args
, **kwargs
):
2020 SetStyle(self, int style)
2022 Sets the font style.
2024 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
2026 def SetWeight(*args
, **kwargs
):
2028 SetWeight(self, int weight)
2030 Sets the font weight.
2032 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
2034 def SetFaceName(*args
, **kwargs
):
2036 SetFaceName(self, String faceName) -> bool
2038 Sets the facename for the font. The facename, which should be a valid
2039 font installed on the end-user's system.
2041 To avoid portability problems, don't rely on a specific face, but
2042 specify the font family instead or as well. A suitable font will be
2043 found on the end-user's system. If both the family and the facename
2044 are specified, wxWidgets will first search for the specific face, and
2045 then for a font belonging to the same family.
2047 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
2049 def SetUnderlined(*args
, **kwargs
):
2051 SetUnderlined(self, bool underlined)
2055 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
2057 def SetEncoding(*args
, **kwargs
):
2059 SetEncoding(self, int encoding)
2061 Set the font encoding.
2063 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
2065 def SetNativeFontInfo(*args
, **kwargs
):
2067 SetNativeFontInfo(self, NativeFontInfo info)
2069 Set the font's attributes from a `wx.NativeFontInfo` object.
2071 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
2073 def SetNativeFontInfoFromString(*args
, **kwargs
):
2075 SetNativeFontInfoFromString(self, String info) -> bool
2077 Set the font's attributes from string representation of a
2078 `wx.NativeFontInfo` object.
2080 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
2082 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
2084 SetNativeFontInfoUserDesc(self, String info) -> bool
2086 Set the font's attributes from a string formerly returned from
2087 `GetNativeFontInfoDesc`.
2089 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
2091 def GetFamilyString(*args
, **kwargs
):
2093 GetFamilyString(self) -> String
2095 Returns a string representation of the font family.
2097 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
2099 def GetStyleString(*args
, **kwargs
):
2101 GetStyleString(self) -> String
2103 Returns a string representation of the font style.
2105 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
2107 def GetWeightString(*args
, **kwargs
):
2109 GetWeightString(self) -> String
2111 Return a string representation of the font weight.
2113 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
2115 def SetNoAntiAliasing(*args
, **kwargs
):
2116 """SetNoAntiAliasing(self, bool no=True)"""
2117 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
2119 def GetNoAntiAliasing(*args
, **kwargs
):
2120 """GetNoAntiAliasing(self) -> bool"""
2121 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
2123 def GetDefaultEncoding(*args
, **kwargs
):
2125 GetDefaultEncoding() -> int
2127 Returns the encoding used for all fonts created with an encoding of
2128 ``wx.FONTENCODING_DEFAULT``.
2130 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
2132 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
2133 def SetDefaultEncoding(*args
, **kwargs
):
2135 SetDefaultEncoding(int encoding)
2137 Sets the default font encoding.
2139 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2141 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
2142 _gdi_
.Font_swigregister(Font
)
2144 def FontFromNativeInfo(*args
, **kwargs
):
2146 FontFromNativeInfo(NativeFontInfo info) -> Font
2148 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2150 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2151 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
2154 def FontFromNativeInfoString(*args
, **kwargs
):
2156 FontFromNativeInfoString(String info) -> Font
2158 Construct a `wx.Font` from the string representation of a
2159 `wx.NativeFontInfo` object.
2161 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2162 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
2165 def FFont(*args
, **kwargs
):
2167 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2168 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2170 A bit of a simpler way to create a `wx.Font` using flags instead of
2171 individual attribute settings. The value of flags can be a
2172 combination of the following:
2174 ============================ ==
2180 wx.FONTFLAG_ANTIALIASED
2181 wx.FONTFLAG_NOT_ANTIALIASED
2182 wx.FONTFLAG_UNDERLINED
2183 wx.FONTFLAG_STRIKETHROUGH
2184 ============================ ==
2186 :see: `wx.Font.__init__`
2188 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2189 val
= _gdi_
.new_FFont(*args
, **kwargs
)
2192 def FontFromPixelSize(*args
, **kwargs
):
2194 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2195 bool underlined=False, String face=wxEmptyString,
2196 int encoding=FONTENCODING_DEFAULT) -> Font
2198 Creates a font using a size in pixels rather than points. If there is
2199 platform API support for this then it is used, otherwise a font with
2200 the closest size is found using a binary search.
2202 :see: `wx.Font.__init__`
2204 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2205 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
2208 def FFontFromPixelSize(*args
, **kwargs
):
2210 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2211 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2213 Creates a font using a size in pixels rather than points. If there is
2214 platform API support for this then it is used, otherwise a font with
2215 the closest size is found using a binary search.
2217 :see: `wx.Font.__init__`, `wx.FFont`
2219 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2220 val
= _gdi_
.new_FFontFromPixelSize(*args
, **kwargs
)
2223 def Font_GetDefaultEncoding(*args
):
2225 Font_GetDefaultEncoding() -> int
2227 Returns the encoding used for all fonts created with an encoding of
2228 ``wx.FONTENCODING_DEFAULT``.
2230 return _gdi_
.Font_GetDefaultEncoding(*args
)
2232 def Font_SetDefaultEncoding(*args
, **kwargs
):
2234 Font_SetDefaultEncoding(int encoding)
2236 Sets the default font encoding.
2238 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2240 Font2
= wx
._deprecated
(FFont
, "Use `wx.FFont` instead.")
2241 #---------------------------------------------------------------------------
2243 class FontEnumerator(object):
2244 """Proxy of C++ FontEnumerator class"""
2245 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2246 __repr__
= _swig_repr
2247 def __init__(self
, *args
, **kwargs
):
2248 """__init__(self) -> FontEnumerator"""
2249 _gdi_
.FontEnumerator_swiginit(self
,_gdi_
.new_FontEnumerator(*args
, **kwargs
))
2250 self
._setCallbackInfo
(self
, FontEnumerator
, 0)
2252 __swig_destroy__
= _gdi_
.delete_FontEnumerator
2253 __del__
= lambda self
: None;
2254 def _setCallbackInfo(*args
, **kwargs
):
2255 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
2256 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
2258 def EnumerateFacenames(*args
, **kwargs
):
2259 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2260 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
2262 def EnumerateEncodings(*args
, **kwargs
):
2263 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2264 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
2266 def GetEncodings(*args
, **kwargs
):
2267 """GetEncodings() -> PyObject"""
2268 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
2270 GetEncodings
= staticmethod(GetEncodings
)
2271 def GetFacenames(*args
, **kwargs
):
2272 """GetFacenames() -> PyObject"""
2273 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
2275 GetFacenames
= staticmethod(GetFacenames
)
2276 def IsValidFacename(*args
, **kwargs
):
2278 IsValidFacename(String str) -> bool
2280 Convenience function that returns true if the given face name exist in
2283 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2285 IsValidFacename
= staticmethod(IsValidFacename
)
2286 _gdi_
.FontEnumerator_swigregister(FontEnumerator
)
2288 def FontEnumerator_GetEncodings(*args
):
2289 """FontEnumerator_GetEncodings() -> PyObject"""
2290 return _gdi_
.FontEnumerator_GetEncodings(*args
)
2292 def FontEnumerator_GetFacenames(*args
):
2293 """FontEnumerator_GetFacenames() -> PyObject"""
2294 return _gdi_
.FontEnumerator_GetFacenames(*args
)
2296 def FontEnumerator_IsValidFacename(*args
, **kwargs
):
2298 FontEnumerator_IsValidFacename(String str) -> bool
2300 Convenience function that returns true if the given face name exist in
2303 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2305 #---------------------------------------------------------------------------
2307 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
2308 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
2309 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
2310 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
2311 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
2312 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
2313 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
2314 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
2315 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
2316 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
2317 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
2318 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
2319 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
2320 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
2321 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
2322 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
2323 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
2324 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
2325 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
2326 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
2327 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
2328 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
2329 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
2330 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
2331 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
2332 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
2333 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
2334 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
2335 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
2336 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
2337 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
2338 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
2339 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
2340 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
2341 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
2342 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
2343 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
2344 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
2345 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
2346 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
2347 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
2348 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
2349 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
2350 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
2351 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
2352 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
2353 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
2354 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
2355 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
2356 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
2357 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
2358 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
2359 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
2360 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
2361 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
2362 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
2363 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
2364 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
2365 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
2366 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
2367 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
2368 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
2369 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
2370 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
2371 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
2372 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
2373 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
2374 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
2375 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
2376 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
2377 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
2378 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
2379 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
2380 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
2381 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
2382 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
2383 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
2384 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2385 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2386 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2387 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2388 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2389 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2390 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2391 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2392 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2393 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2394 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2395 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2396 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2397 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2398 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2399 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2400 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2401 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2402 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2403 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2404 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2405 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2406 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2407 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2408 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2409 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2410 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2411 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2412 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2413 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2414 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2415 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2416 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2417 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2418 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2419 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2420 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2421 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2422 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2423 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2424 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2425 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2426 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2427 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2428 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2429 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2430 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2431 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2432 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2433 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2434 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2435 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2436 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2437 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2438 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2439 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2440 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2441 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2442 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2443 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2444 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2445 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2446 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2447 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2448 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2449 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2450 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2451 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2452 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2453 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2454 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2455 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2456 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2457 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2458 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2459 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2460 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2461 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2462 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2463 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2464 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2465 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2466 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2467 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2468 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2469 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2470 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2471 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2472 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2473 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2474 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2475 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2476 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2477 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2478 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2479 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2480 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2481 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2482 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2483 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2484 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2485 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2486 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2487 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2488 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2489 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2490 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2491 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2492 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2493 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2494 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2495 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2496 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2497 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2498 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2499 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2500 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2501 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2502 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2503 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2504 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2505 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2506 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2507 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2508 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2509 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2510 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2511 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2512 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2513 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2514 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2515 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2516 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2517 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2518 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2519 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2520 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2521 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2522 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2523 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2524 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2525 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2526 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2527 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2528 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2529 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2530 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2531 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2532 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2533 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2534 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2535 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2536 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2537 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2538 class LanguageInfo(object):
2539 """Proxy of C++ LanguageInfo class"""
2540 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2541 def __init__(self
): raise AttributeError, "No constructor defined"
2542 __repr__
= _swig_repr
2543 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2544 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2545 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2546 _gdi_
.LanguageInfo_swigregister(LanguageInfo
)
2548 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2549 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2550 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2551 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2552 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2553 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2554 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2555 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2556 class Locale(object):
2557 """Proxy of C++ Locale class"""
2558 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2559 __repr__
= _swig_repr
2560 def __init__(self
, *args
, **kwargs
):
2561 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2562 _gdi_
.Locale_swiginit(self
,_gdi_
.new_Locale(*args
, **kwargs
))
2563 __swig_destroy__
= _gdi_
.delete_Locale
2564 __del__
= lambda self
: None;
2565 def Init1(*args
, **kwargs
):
2567 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2568 bool bLoadDefault=True,
2569 bool bConvertEncoding=False) -> bool
2571 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2573 def Init2(*args
, **kwargs
):
2574 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2575 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2577 def Init(self
, *_args
, **_kwargs
):
2578 if type(_args
[0]) in [type(''), type(u
'')]:
2579 val
= self
.Init1(*_args
, **_kwargs
)
2581 val
= self
.Init2(*_args
, **_kwargs
)
2584 def GetSystemLanguage(*args
, **kwargs
):
2585 """GetSystemLanguage() -> int"""
2586 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2588 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2589 def GetSystemEncoding(*args
, **kwargs
):
2590 """GetSystemEncoding() -> int"""
2591 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2593 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2594 def GetSystemEncodingName(*args
, **kwargs
):
2595 """GetSystemEncodingName() -> String"""
2596 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2598 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2599 def IsOk(*args
, **kwargs
):
2600 """IsOk(self) -> bool"""
2601 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2603 def __nonzero__(self
): return self
.IsOk()
2604 def GetLocale(*args
, **kwargs
):
2605 """GetLocale(self) -> String"""
2606 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2608 def GetLanguage(*args
, **kwargs
):
2609 """GetLanguage(self) -> int"""
2610 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2612 def GetSysName(*args
, **kwargs
):
2613 """GetSysName(self) -> String"""
2614 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2616 def GetCanonicalName(*args
, **kwargs
):
2617 """GetCanonicalName(self) -> String"""
2618 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2620 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2621 """AddCatalogLookupPathPrefix(String prefix)"""
2622 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2624 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2625 def AddCatalog(*args
, **kwargs
):
2626 """AddCatalog(self, String szDomain) -> bool"""
2627 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2629 def IsLoaded(*args
, **kwargs
):
2630 """IsLoaded(self, String szDomain) -> bool"""
2631 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2633 def GetLanguageInfo(*args
, **kwargs
):
2634 """GetLanguageInfo(int lang) -> LanguageInfo"""
2635 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2637 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2638 def GetLanguageName(*args
, **kwargs
):
2639 """GetLanguageName(int lang) -> String"""
2640 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2642 GetLanguageName
= staticmethod(GetLanguageName
)
2643 def FindLanguageInfo(*args
, **kwargs
):
2644 """FindLanguageInfo(String locale) -> LanguageInfo"""
2645 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2647 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2648 def AddLanguage(*args
, **kwargs
):
2649 """AddLanguage(LanguageInfo info)"""
2650 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2652 AddLanguage
= staticmethod(AddLanguage
)
2653 def GetString(*args
, **kwargs
):
2654 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2655 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2657 def GetName(*args
, **kwargs
):
2658 """GetName(self) -> String"""
2659 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2661 _gdi_
.Locale_swigregister(Locale
)
2663 def Locale_GetSystemLanguage(*args
):
2664 """Locale_GetSystemLanguage() -> int"""
2665 return _gdi_
.Locale_GetSystemLanguage(*args
)
2667 def Locale_GetSystemEncoding(*args
):
2668 """Locale_GetSystemEncoding() -> int"""
2669 return _gdi_
.Locale_GetSystemEncoding(*args
)
2671 def Locale_GetSystemEncodingName(*args
):
2672 """Locale_GetSystemEncodingName() -> String"""
2673 return _gdi_
.Locale_GetSystemEncodingName(*args
)
2675 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2676 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2677 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2679 def Locale_GetLanguageInfo(*args
, **kwargs
):
2680 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2681 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2683 def Locale_GetLanguageName(*args
, **kwargs
):
2684 """Locale_GetLanguageName(int lang) -> String"""
2685 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2687 def Locale_FindLanguageInfo(*args
, **kwargs
):
2688 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2689 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2691 def Locale_AddLanguage(*args
, **kwargs
):
2692 """Locale_AddLanguage(LanguageInfo info)"""
2693 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2695 class PyLocale(Locale
):
2696 """Proxy of C++ PyLocale class"""
2697 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2698 __repr__
= _swig_repr
2699 def __init__(self
, *args
, **kwargs
):
2700 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
2701 _gdi_
.PyLocale_swiginit(self
,_gdi_
.new_PyLocale(*args
, **kwargs
))
2702 self
._setCallbackInfo
(self
, PyLocale
)
2704 __swig_destroy__
= _gdi_
.delete_PyLocale
2705 __del__
= lambda self
: None;
2706 def _setCallbackInfo(*args
, **kwargs
):
2707 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
2708 return _gdi_
.PyLocale__setCallbackInfo(*args
, **kwargs
)
2710 def GetSingularString(*args
, **kwargs
):
2711 """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar"""
2712 return _gdi_
.PyLocale_GetSingularString(*args
, **kwargs
)
2714 def GetPluralString(*args
, **kwargs
):
2716 GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n,
2717 wxChar szDomain=None) -> wxChar
2719 return _gdi_
.PyLocale_GetPluralString(*args
, **kwargs
)
2721 _gdi_
.PyLocale_swigregister(PyLocale
)
2724 def GetLocale(*args
):
2725 """GetLocale() -> Locale"""
2726 return _gdi_
.GetLocale(*args
)
2727 #---------------------------------------------------------------------------
2729 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2730 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2731 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2732 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2733 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2734 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2735 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2736 class EncodingConverter(_core
.Object
):
2737 """Proxy of C++ EncodingConverter class"""
2738 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2739 __repr__
= _swig_repr
2740 def __init__(self
, *args
, **kwargs
):
2741 """__init__(self) -> EncodingConverter"""
2742 _gdi_
.EncodingConverter_swiginit(self
,_gdi_
.new_EncodingConverter(*args
, **kwargs
))
2743 __swig_destroy__
= _gdi_
.delete_EncodingConverter
2744 __del__
= lambda self
: None;
2745 def Init(*args
, **kwargs
):
2746 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2747 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2749 def Convert(*args
, **kwargs
):
2750 """Convert(self, String input) -> String"""
2751 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2753 def GetPlatformEquivalents(*args
, **kwargs
):
2754 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2755 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2757 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
2758 def GetAllEquivalents(*args
, **kwargs
):
2759 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2760 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2762 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
2763 def CanConvert(*args
, **kwargs
):
2764 """CanConvert(int encIn, int encOut) -> bool"""
2765 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2767 CanConvert
= staticmethod(CanConvert
)
2768 def __nonzero__(self
): return self
.IsOk()
2769 _gdi_
.EncodingConverter_swigregister(EncodingConverter
)
2771 def GetTranslation(*args
):
2773 GetTranslation(String str) -> String
2774 GetTranslation(String str, String domain) -> String
2775 GetTranslation(String str, String strPlural, size_t n) -> String
2776 GetTranslation(String str, String strPlural, size_t n, String domain) -> String
2778 return _gdi_
.GetTranslation(*args
)
2780 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
2781 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2782 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2784 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
2785 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2786 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2788 def EncodingConverter_CanConvert(*args
, **kwargs
):
2789 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2790 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2792 #----------------------------------------------------------------------------
2793 # On MSW add the directory where the wxWidgets catalogs were installed
2794 # to the default catalog path.
2795 if wx
.Platform
== "__WXMSW__":
2797 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "locale")
2798 Locale
.AddCatalogLookupPathPrefix(_localedir
)
2801 #----------------------------------------------------------------------------
2803 #---------------------------------------------------------------------------
2805 class DC(_core
.Object
):
2807 A wx.DC is a device context onto which graphics and text can be
2808 drawn. It is intended to represent a number of output devices in a
2809 generic way, so a window can have a device context associated with it,
2810 and a printer also has a device context. In this way, the same piece
2811 of code may write to a number of different devices, if the device
2812 context is used as a parameter.
2814 Derived types of wxDC have documentation for specific features only,
2815 so refer to this section for most device context information.
2817 The wx.DC class is abstract and can not be instantiated, you must use
2818 one of the derived classes instead. Which one will depend on the
2819 situation in which it is used.
2821 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2822 def __init__(self
): raise AttributeError, "No constructor defined"
2823 __repr__
= _swig_repr
2824 __swig_destroy__
= _gdi_
.delete_DC
2825 __del__
= lambda self
: None;
2826 # These have been deprecated in wxWidgets. Since they never
2827 # really did anything to begin with, just make them be NOPs.
2828 def BeginDrawing(self
): pass
2829 def EndDrawing(self
): pass
2831 def FloodFill(*args
, **kwargs
):
2833 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2835 Flood fills the device context starting from the given point, using
2836 the current brush colour, and using a style:
2838 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2839 the given colour is encountered.
2841 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2844 Returns False if the operation failed.
2846 Note: The present implementation for non-Windows platforms may fail to
2847 find colour borders if the pixels do not match the colour
2848 exactly. However the function will still return true.
2850 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
2852 def FloodFillPoint(*args
, **kwargs
):
2854 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2856 Flood fills the device context starting from the given point, using
2857 the current brush colour, and using a style:
2859 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2860 the given colour is encountered.
2862 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2865 Returns False if the operation failed.
2867 Note: The present implementation for non-Windows platforms may fail to
2868 find colour borders if the pixels do not match the colour
2869 exactly. However the function will still return true.
2871 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
2873 def GradientFillConcentric(*args
, **kwargs
):
2875 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
2878 Fill the area specified by rect with a radial gradient, starting from
2879 initialColour in the center of the circle and fading to destColour on
2880 the outside of the circle. The circleCenter argument is the relative
2881 coordinants of the center of the circle in the specified rect.
2883 Note: Currently this function is very slow, don't use it for real-time
2886 return _gdi_
.DC_GradientFillConcentric(*args
, **kwargs
)
2888 def GradientFillLinear(*args
, **kwargs
):
2890 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
2891 int nDirection=EAST)
2893 Fill the area specified by rect with a linear gradient, starting from
2894 initialColour and eventually fading to destColour. The nDirection
2895 parameter specifies the direction of the colour change, default is to
2896 use initialColour on the left part of the rectangle and destColour on
2899 return _gdi_
.DC_GradientFillLinear(*args
, **kwargs
)
2901 def GetPixel(*args
, **kwargs
):
2903 GetPixel(self, int x, int y) -> Colour
2905 Gets the colour at the specified location on the DC.
2907 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
2909 def GetPixelPoint(*args
, **kwargs
):
2910 """GetPixelPoint(self, Point pt) -> Colour"""
2911 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
2913 def DrawLine(*args
, **kwargs
):
2915 DrawLine(self, int x1, int y1, int x2, int y2)
2917 Draws a line from the first point to the second. The current pen is
2918 used for drawing the line. Note that the second point is *not* part of
2919 the line and is not drawn by this function (this is consistent with
2920 the behaviour of many other toolkits).
2922 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
2924 def DrawLinePoint(*args
, **kwargs
):
2926 DrawLinePoint(self, Point pt1, Point pt2)
2928 Draws a line from the first point to the second. The current pen is
2929 used for drawing the line. Note that the second point is *not* part of
2930 the line and is not drawn by this function (this is consistent with
2931 the behaviour of many other toolkits).
2933 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
2935 def CrossHair(*args
, **kwargs
):
2937 CrossHair(self, int x, int y)
2939 Displays a cross hair using the current pen. This is a vertical and
2940 horizontal line the height and width of the window, centred on the
2943 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
2945 def CrossHairPoint(*args
, **kwargs
):
2947 CrossHairPoint(self, Point pt)
2949 Displays a cross hair using the current pen. This is a vertical and
2950 horizontal line the height and width of the window, centred on the
2953 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
2955 def DrawArc(*args
, **kwargs
):
2957 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2959 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2960 the first point to the second. The current pen is used for the outline
2961 and the current brush for filling the shape.
2963 The arc is drawn in an anticlockwise direction from the start point to
2966 return _gdi_
.DC_DrawArc(*args
, **kwargs
)
2968 def DrawArcPoint(*args
, **kwargs
):
2970 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2972 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2973 the first point to the second. The current pen is used for the outline
2974 and the current brush for filling the shape.
2976 The arc is drawn in an anticlockwise direction from the start point to
2979 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
2981 def DrawCheckMark(*args
, **kwargs
):
2983 DrawCheckMark(self, int x, int y, int width, int height)
2985 Draws a check mark inside the given rectangle.
2987 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
2989 def DrawCheckMarkRect(*args
, **kwargs
):
2991 DrawCheckMarkRect(self, Rect rect)
2993 Draws a check mark inside the given rectangle.
2995 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
2997 def DrawEllipticArc(*args
, **kwargs
):
2999 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3001 Draws an arc of an ellipse, with the given rectangle defining the
3002 bounds of the ellipse. The current pen is used for drawing the arc and
3003 the current brush is used for drawing the pie.
3005 The *start* and *end* parameters specify the start and end of the arc
3006 relative to the three-o'clock position from the center of the
3007 rectangle. Angles are specified in degrees (360 is a complete
3008 circle). Positive values mean counter-clockwise motion. If start is
3009 equal to end, a complete ellipse will be drawn.
3011 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
3013 def DrawEllipticArcPointSize(*args
, **kwargs
):
3015 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3017 Draws an arc of an ellipse, with the given rectangle defining the
3018 bounds of the ellipse. The current pen is used for drawing the arc and
3019 the current brush is used for drawing the pie.
3021 The *start* and *end* parameters specify the start and end of the arc
3022 relative to the three-o'clock position from the center of the
3023 rectangle. Angles are specified in degrees (360 is a complete
3024 circle). Positive values mean counter-clockwise motion. If start is
3025 equal to end, a complete ellipse will be drawn.
3027 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
3029 def DrawPoint(*args
, **kwargs
):
3031 DrawPoint(self, int x, int y)
3033 Draws a point using the current pen.
3035 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
3037 def DrawPointPoint(*args
, **kwargs
):
3039 DrawPointPoint(self, Point pt)
3041 Draws a point using the current pen.
3043 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
3045 def DrawRectangle(*args
, **kwargs
):
3047 DrawRectangle(self, int x, int y, int width, int height)
3049 Draws a rectangle with the given top left corner, and with the given
3050 size. The current pen is used for the outline and the current brush
3051 for filling the shape.
3053 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
3055 def DrawRectangleRect(*args
, **kwargs
):
3057 DrawRectangleRect(self, Rect rect)
3059 Draws a rectangle with the given top left corner, and with the given
3060 size. The current pen is used for the outline and the current brush
3061 for filling the shape.
3063 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
3065 def DrawRectanglePointSize(*args
, **kwargs
):
3067 DrawRectanglePointSize(self, Point pt, Size sz)
3069 Draws a rectangle with the given top left corner, and with the given
3070 size. The current pen is used for the outline and the current brush
3071 for filling the shape.
3073 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
3075 def DrawRoundedRectangle(*args
, **kwargs
):
3077 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3079 Draws a rectangle with the given top left corner, and with the given
3080 size. The corners are quarter-circles using the given radius. The
3081 current pen is used for the outline and the current brush for filling
3084 If radius is positive, the value is assumed to be the radius of the
3085 rounded corner. If radius is negative, the absolute value is assumed
3086 to be the proportion of the smallest dimension of the rectangle. This
3087 means that the corner can be a sensible size relative to the size of
3088 the rectangle, and also avoids the strange effects X produces when the
3089 corners are too big for the rectangle.
3091 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
3093 def DrawRoundedRectangleRect(*args
, **kwargs
):
3095 DrawRoundedRectangleRect(self, Rect r, double radius)
3097 Draws a rectangle with the given top left corner, and with the given
3098 size. The corners are quarter-circles using the given radius. The
3099 current pen is used for the outline and the current brush for filling
3102 If radius is positive, the value is assumed to be the radius of the
3103 rounded corner. If radius is negative, the absolute value is assumed
3104 to be the proportion of the smallest dimension of the rectangle. This
3105 means that the corner can be a sensible size relative to the size of
3106 the rectangle, and also avoids the strange effects X produces when the
3107 corners are too big for the rectangle.
3109 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
3111 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
3113 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3115 Draws a rectangle with the given top left corner, and with the given
3116 size. The corners are quarter-circles using the given radius. The
3117 current pen is used for the outline and the current brush for filling
3120 If radius is positive, the value is assumed to be the radius of the
3121 rounded corner. If radius is negative, the absolute value is assumed
3122 to be the proportion of the smallest dimension of the rectangle. This
3123 means that the corner can be a sensible size relative to the size of
3124 the rectangle, and also avoids the strange effects X produces when the
3125 corners are too big for the rectangle.
3127 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
3129 def DrawCircle(*args
, **kwargs
):
3131 DrawCircle(self, int x, int y, int radius)
3133 Draws a circle with the given center point and radius. The current
3134 pen is used for the outline and the current brush for filling the
3137 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
3139 def DrawCirclePoint(*args
, **kwargs
):
3141 DrawCirclePoint(self, Point pt, int radius)
3143 Draws a circle with the given center point and radius. The current
3144 pen is used for the outline and the current brush for filling the
3147 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
3149 def DrawEllipse(*args
, **kwargs
):
3151 DrawEllipse(self, int x, int y, int width, int height)
3153 Draws an ellipse contained in the specified rectangle. The current pen
3154 is used for the outline and the current brush for filling the shape.
3156 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
3158 def DrawEllipseRect(*args
, **kwargs
):
3160 DrawEllipseRect(self, Rect rect)
3162 Draws an ellipse contained in the specified rectangle. The current pen
3163 is used for the outline and the current brush for filling the shape.
3165 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
3167 def DrawEllipsePointSize(*args
, **kwargs
):
3169 DrawEllipsePointSize(self, Point pt, Size sz)
3171 Draws an ellipse contained in the specified rectangle. The current pen
3172 is used for the outline and the current brush for filling the shape.
3174 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
3176 def DrawIcon(*args
, **kwargs
):
3178 DrawIcon(self, Icon icon, int x, int y)
3180 Draw an icon on the display (does nothing if the device context is
3181 PostScript). This can be the simplest way of drawing bitmaps on a
3184 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
3186 def DrawIconPoint(*args
, **kwargs
):
3188 DrawIconPoint(self, Icon icon, Point pt)
3190 Draw an icon on the display (does nothing if the device context is
3191 PostScript). This can be the simplest way of drawing bitmaps on a
3194 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
3196 def DrawBitmap(*args
, **kwargs
):
3198 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3200 Draw a bitmap on the device context at the specified point. If
3201 *transparent* is true and the bitmap has a transparency mask, (or
3202 alpha channel on the platforms that support it) then the bitmap will
3203 be drawn transparently.
3205 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
3207 def DrawBitmapPoint(*args
, **kwargs
):
3209 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3211 Draw a bitmap on the device context at the specified point. If
3212 *transparent* is true and the bitmap has a transparency mask, (or
3213 alpha channel on the platforms that support it) then the bitmap will
3214 be drawn transparently.
3216 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
3218 def DrawText(*args
, **kwargs
):
3220 DrawText(self, String text, int x, int y)
3222 Draws a text string at the specified point, using the current text
3223 font, and the current text foreground and background colours.
3225 The coordinates refer to the top-left corner of the rectangle bounding
3226 the string. See `GetTextExtent` for how to get the dimensions of a
3227 text string, which can be used to position the text more precisely.
3229 **NOTE**: under wxGTK the current logical function is used by this
3230 function but it is ignored by wxMSW. Thus, you should avoid using
3231 logical functions with this function in portable programs.
3233 return _gdi_
.DC_DrawText(*args
, **kwargs
)
3235 def DrawTextPoint(*args
, **kwargs
):
3237 DrawTextPoint(self, String text, Point pt)
3239 Draws a text string at the specified point, using the current text
3240 font, and the current text foreground and background colours.
3242 The coordinates refer to the top-left corner of the rectangle bounding
3243 the string. See `GetTextExtent` for how to get the dimensions of a
3244 text string, which can be used to position the text more precisely.
3246 **NOTE**: under wxGTK the current logical function is used by this
3247 function but it is ignored by wxMSW. Thus, you should avoid using
3248 logical functions with this function in portable programs.
3250 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
3252 def DrawRotatedText(*args
, **kwargs
):
3254 DrawRotatedText(self, String text, int x, int y, double angle)
3256 Draws the text rotated by *angle* degrees, if supported by the platform.
3258 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3259 function. In particular, a font different from ``wx.NORMAL_FONT``
3260 should be used as the it is not normally a TrueType
3261 font. ``wx.SWISS_FONT`` is an example of a font which is.
3263 return _gdi_
.DC_DrawRotatedText(*args
, **kwargs
)
3265 def DrawRotatedTextPoint(*args
, **kwargs
):
3267 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3269 Draws the text rotated by *angle* degrees, if supported by the platform.
3271 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3272 function. In particular, a font different from ``wx.NORMAL_FONT``
3273 should be used as the it is not normally a TrueType
3274 font. ``wx.SWISS_FONT`` is an example of a font which is.
3276 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
3278 def Blit(*args
, **kwargs
):
3280 Blit(self, int xdest, int ydest, int width, int height, DC source,
3281 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3282 int xsrcMask=-1, int ysrcMask=-1) -> bool
3284 Copy from a source DC to this DC. Parameters specify the destination
3285 coordinates, size of area to copy, source DC, source coordinates,
3286 logical function, whether to use a bitmap mask, and mask source
3289 return _gdi_
.DC_Blit(*args
, **kwargs
)
3291 def BlitPointSize(*args
, **kwargs
):
3293 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3294 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3296 Copy from a source DC to this DC. Parameters specify the destination
3297 coordinates, size of area to copy, source DC, source coordinates,
3298 logical function, whether to use a bitmap mask, and mask source
3301 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
3303 def SetClippingRegion(*args
, **kwargs
):
3305 SetClippingRegion(self, int x, int y, int width, int height)
3307 Sets the clipping region for this device context to the intersection
3308 of the given region described by the parameters of this method and the
3309 previously set clipping region. You should call `DestroyClippingRegion`
3310 if you want to set the clipping region exactly to the region
3313 The clipping region is an area to which drawing is
3314 restricted. Possible uses for the clipping region are for clipping
3315 text or for speeding up window redraws when only a known area of the
3318 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
3320 def SetClippingRegionPointSize(*args
, **kwargs
):
3322 SetClippingRegionPointSize(self, Point pt, Size sz)
3324 Sets the clipping region for this device context to the intersection
3325 of the given region described by the parameters of this method and the
3326 previously set clipping region. You should call `DestroyClippingRegion`
3327 if you want to set the clipping region exactly to the region
3330 The clipping region is an area to which drawing is
3331 restricted. Possible uses for the clipping region are for clipping
3332 text or for speeding up window redraws when only a known area of the
3335 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
3337 def SetClippingRegionAsRegion(*args
, **kwargs
):
3339 SetClippingRegionAsRegion(self, Region region)
3341 Sets the clipping region for this device context to the intersection
3342 of the given region described by the parameters of this method and the
3343 previously set clipping region. You should call `DestroyClippingRegion`
3344 if you want to set the clipping region exactly to the region
3347 The clipping region is an area to which drawing is
3348 restricted. Possible uses for the clipping region are for clipping
3349 text or for speeding up window redraws when only a known area of the
3352 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
3354 def SetClippingRect(*args
, **kwargs
):
3356 SetClippingRect(self, Rect rect)
3358 Sets the clipping region for this device context to the intersection
3359 of the given region described by the parameters of this method and the
3360 previously set clipping region. You should call `DestroyClippingRegion`
3361 if you want to set the clipping region exactly to the region
3364 The clipping region is an area to which drawing is
3365 restricted. Possible uses for the clipping region are for clipping
3366 text or for speeding up window redraws when only a known area of the
3369 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
3371 def DrawLines(*args
, **kwargs
):
3373 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3375 Draws lines using a sequence of `wx.Point` objects, adding the
3376 optional offset coordinate. The current pen is used for drawing the
3379 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
3381 def DrawPolygon(*args
, **kwargs
):
3383 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3384 int fillStyle=ODDEVEN_RULE)
3386 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3387 the optional offset coordinate. The last argument specifies the fill
3388 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3390 The current pen is used for drawing the outline, and the current brush
3391 for filling the shape. Using a transparent brush suppresses
3392 filling. Note that wxWidgets automatically closes the first and last
3395 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3397 def DrawLabel(*args
, **kwargs
):
3399 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3402 Draw *text* within the specified rectangle, abiding by the alignment
3403 flags. Will additionally emphasize the character at *indexAccel* if
3406 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3408 def DrawImageLabel(*args
, **kwargs
):
3410 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3411 int indexAccel=-1) -> Rect
3413 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3414 drawing it) within the specified rectangle, abiding by the alignment
3415 flags. Will additionally emphasize the character at *indexAccel* if
3416 it is not -1. Returns the bounding rectangle.
3418 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3420 def DrawSpline(*args
, **kwargs
):
3422 DrawSpline(self, List points)
3424 Draws a spline between all given control points, (a list of `wx.Point`
3425 objects) using the current pen. The spline is drawn using a series of
3426 lines, using an algorithm taken from the X drawing program 'XFIG'.
3428 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3430 def Clear(*args
, **kwargs
):
3434 Clears the device context using the current background brush.
3436 return _gdi_
.DC_Clear(*args
, **kwargs
)
3438 def StartDoc(*args
, **kwargs
):
3440 StartDoc(self, String message) -> bool
3442 Starts a document (only relevant when outputting to a
3443 printer). *Message* is a message to show whilst printing.
3445 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3447 def EndDoc(*args
, **kwargs
):
3451 Ends a document (only relevant when outputting to a printer).
3453 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3455 def StartPage(*args
, **kwargs
):
3459 Starts a document page (only relevant when outputting to a printer).
3461 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3463 def EndPage(*args
, **kwargs
):
3467 Ends a document page (only relevant when outputting to a printer).
3469 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3471 def SetFont(*args
, **kwargs
):
3473 SetFont(self, Font font)
3475 Sets the current font for the DC. It must be a valid font, in
3476 particular you should not pass ``wx.NullFont`` to this method.
3478 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3480 def SetPen(*args
, **kwargs
):
3482 SetPen(self, Pen pen)
3484 Sets the current pen for the DC.
3486 If the argument is ``wx.NullPen``, the current pen is selected out of the
3487 device context, and the original pen restored.
3489 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3491 def SetBrush(*args
, **kwargs
):
3493 SetBrush(self, Brush brush)
3495 Sets the current brush for the DC.
3497 If the argument is ``wx.NullBrush``, the current brush is selected out
3498 of the device context, and the original brush restored, allowing the
3499 current brush to be destroyed safely.
3501 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3503 def SetBackground(*args
, **kwargs
):
3505 SetBackground(self, Brush brush)
3507 Sets the current background brush for the DC.
3509 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3511 def SetBackgroundMode(*args
, **kwargs
):
3513 SetBackgroundMode(self, int mode)
3515 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3516 determines whether text will be drawn with a background colour or
3519 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3521 def SetPalette(*args
, **kwargs
):
3523 SetPalette(self, Palette palette)
3525 If this is a window DC or memory DC, assigns the given palette to the
3526 window or bitmap associated with the DC. If the argument is
3527 ``wx.NullPalette``, the current palette is selected out of the device
3528 context, and the original palette restored.
3530 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3532 def DestroyClippingRegion(*args
, **kwargs
):
3534 DestroyClippingRegion(self)
3536 Destroys the current clipping region so that none of the DC is
3539 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3541 def GetClippingBox(*args
, **kwargs
):
3543 GetClippingBox() -> (x, y, width, height)
3545 Gets the rectangle surrounding the current clipping region.
3547 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3549 def GetClippingRect(*args
, **kwargs
):
3551 GetClippingRect(self) -> Rect
3553 Gets the rectangle surrounding the current clipping region.
3555 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3557 def GetCharHeight(*args
, **kwargs
):
3559 GetCharHeight(self) -> int
3561 Gets the character height of the currently set font.
3563 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3565 def GetCharWidth(*args
, **kwargs
):
3567 GetCharWidth(self) -> int
3569 Gets the average character width of the currently set font.
3571 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3573 def GetTextExtent(*args
, **kwargs
):
3575 GetTextExtent(wxString string) -> (width, height)
3577 Get the width and height of the text using the current font. Only
3578 works for single line strings.
3580 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3582 def GetFullTextExtent(*args
, **kwargs
):
3584 GetFullTextExtent(wxString string, Font font=None) ->
3585 (width, height, descent, externalLeading)
3587 Get the width, height, decent and leading of the text using the
3588 current or specified font. Only works for single line strings.
3590 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3592 def GetMultiLineTextExtent(*args
, **kwargs
):
3594 GetMultiLineTextExtent(wxString string, Font font=None) ->
3595 (width, height, lineHeight)
3597 Get the width, height, decent and leading of the text using the
3598 current or specified font. Works for single as well as multi-line
3601 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3603 def GetPartialTextExtents(*args
, **kwargs
):
3605 GetPartialTextExtents(self, text) -> [widths]
3607 Returns a list of integers such that each value is the distance in
3608 pixels from the begining of text to the coresponding character of
3609 *text*. The generic version simply builds a running total of the widths
3610 of each character using GetTextExtent, however if the various
3611 platforms have a native API function that is faster or more accurate
3612 than the generic implementation then it will be used instead.
3614 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3616 def GetSize(*args
, **kwargs
):
3618 GetSize(self) -> Size
3620 This gets the horizontal and vertical resolution in device units. It
3621 can be used to scale graphics to fit the page. For example, if *maxX*
3622 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3623 used in your application, the following code will scale the graphic to
3624 fit on the printer page::
3627 scaleX = maxX*1.0 / w
3628 scaleY = maxY*1.0 / h
3629 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3632 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3634 def GetSizeTuple(*args
, **kwargs
):
3636 GetSizeTuple() -> (width, height)
3638 This gets the horizontal and vertical resolution in device units. It
3639 can be used to scale graphics to fit the page. For example, if *maxX*
3640 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3641 used in your application, the following code will scale the graphic to
3642 fit on the printer page::
3645 scaleX = maxX*1.0 / w
3646 scaleY = maxY*1.0 / h
3647 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3650 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3652 def GetSizeMM(*args
, **kwargs
):
3654 GetSizeMM(self) -> Size
3656 Get the DC size in milimeters.
3658 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3660 def GetSizeMMTuple(*args
, **kwargs
):
3662 GetSizeMMTuple() -> (width, height)
3664 Get the DC size in milimeters.
3666 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3668 def DeviceToLogicalX(*args
, **kwargs
):
3670 DeviceToLogicalX(self, int x) -> int
3672 Convert device X coordinate to logical coordinate, using the current
3675 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
3677 def DeviceToLogicalY(*args
, **kwargs
):
3679 DeviceToLogicalY(self, int y) -> int
3681 Converts device Y coordinate to logical coordinate, using the current
3684 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
3686 def DeviceToLogicalXRel(*args
, **kwargs
):
3688 DeviceToLogicalXRel(self, int x) -> int
3690 Convert device X coordinate to relative logical coordinate, using the
3691 current mapping mode but ignoring the x axis orientation. Use this
3692 function for converting a width, for example.
3694 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
3696 def DeviceToLogicalYRel(*args
, **kwargs
):
3698 DeviceToLogicalYRel(self, int y) -> int
3700 Convert device Y coordinate to relative logical coordinate, using the
3701 current mapping mode but ignoring the y axis orientation. Use this
3702 function for converting a height, for example.
3704 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
3706 def LogicalToDeviceX(*args
, **kwargs
):
3708 LogicalToDeviceX(self, int x) -> int
3710 Converts logical X coordinate to device coordinate, using the current
3713 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
3715 def LogicalToDeviceY(*args
, **kwargs
):
3717 LogicalToDeviceY(self, int y) -> int
3719 Converts logical Y coordinate to device coordinate, using the current
3722 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
3724 def LogicalToDeviceXRel(*args
, **kwargs
):
3726 LogicalToDeviceXRel(self, int x) -> int
3728 Converts logical X coordinate to relative device coordinate, using the
3729 current mapping mode but ignoring the x axis orientation. Use this for
3730 converting a width, for example.
3732 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
3734 def LogicalToDeviceYRel(*args
, **kwargs
):
3736 LogicalToDeviceYRel(self, int y) -> int
3738 Converts logical Y coordinate to relative device coordinate, using the
3739 current mapping mode but ignoring the y axis orientation. Use this for
3740 converting a height, for example.
3742 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
3744 def CanDrawBitmap(*args
, **kwargs
):
3745 """CanDrawBitmap(self) -> bool"""
3746 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
3748 def CanGetTextExtent(*args
, **kwargs
):
3749 """CanGetTextExtent(self) -> bool"""
3750 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
3752 def GetDepth(*args
, **kwargs
):
3754 GetDepth(self) -> int
3756 Returns the colour depth of the DC.
3758 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
3760 def GetPPI(*args
, **kwargs
):
3762 GetPPI(self) -> Size
3764 Resolution in pixels per inch
3766 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
3768 def Ok(*args
, **kwargs
):
3772 Returns true if the DC is ok to use.
3774 return _gdi_
.DC_Ok(*args
, **kwargs
)
3776 def GetBackgroundMode(*args
, **kwargs
):
3778 GetBackgroundMode(self) -> int
3780 Returns the current background mode, either ``wx.SOLID`` or
3783 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
3785 def GetBackground(*args
, **kwargs
):
3787 GetBackground(self) -> Brush
3789 Gets the brush used for painting the background.
3791 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
3793 def GetBrush(*args
, **kwargs
):
3795 GetBrush(self) -> Brush
3797 Gets the current brush
3799 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
3801 def GetFont(*args
, **kwargs
):
3803 GetFont(self) -> Font
3805 Gets the current font
3807 return _gdi_
.DC_GetFont(*args
, **kwargs
)
3809 def GetPen(*args
, **kwargs
):
3813 Gets the current pen
3815 return _gdi_
.DC_GetPen(*args
, **kwargs
)
3817 def GetTextBackground(*args
, **kwargs
):
3819 GetTextBackground(self) -> Colour
3821 Gets the current text background colour
3823 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
3825 def GetTextForeground(*args
, **kwargs
):
3827 GetTextForeground(self) -> Colour
3829 Gets the current text foreground colour
3831 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
3833 def SetTextForeground(*args
, **kwargs
):
3835 SetTextForeground(self, Colour colour)
3837 Sets the current text foreground colour for the DC.
3839 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
3841 def SetTextBackground(*args
, **kwargs
):
3843 SetTextBackground(self, Colour colour)
3845 Sets the current text background colour for the DC.
3847 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
3849 def GetMapMode(*args
, **kwargs
):
3851 GetMapMode(self) -> int
3853 Gets the current *mapping mode* for the device context
3855 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
3857 def SetMapMode(*args
, **kwargs
):
3859 SetMapMode(self, int mode)
3861 The *mapping mode* of the device context defines the unit of
3862 measurement used to convert logical units to device units. The
3863 mapping mode can be one of the following:
3865 ================ =============================================
3866 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3868 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3869 wx.MM_METRIC Each logical unit is 1 mm.
3870 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3871 wx.MM_TEXT Each logical unit is 1 pixel.
3872 ================ =============================================
3875 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
3877 def GetUserScale(*args
, **kwargs
):
3879 GetUserScale(self) -> (xScale, yScale)
3881 Gets the current user scale factor (set by `SetUserScale`).
3883 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
3885 def SetUserScale(*args
, **kwargs
):
3887 SetUserScale(self, double x, double y)
3889 Sets the user scaling factor, useful for applications which require
3892 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
3894 def GetLogicalScale(*args
, **kwargs
):
3895 """GetLogicalScale() -> (xScale, yScale)"""
3896 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
3898 def SetLogicalScale(*args
, **kwargs
):
3899 """SetLogicalScale(self, double x, double y)"""
3900 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
3902 def GetLogicalOrigin(*args
, **kwargs
):
3903 """GetLogicalOrigin(self) -> Point"""
3904 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
3906 def GetLogicalOriginTuple(*args
, **kwargs
):
3907 """GetLogicalOriginTuple() -> (x,y)"""
3908 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
3910 def SetLogicalOrigin(*args
, **kwargs
):
3911 """SetLogicalOrigin(self, int x, int y)"""
3912 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
3914 def SetLogicalOriginPoint(*args
, **kwargs
):
3915 """SetLogicalOriginPoint(self, Point point)"""
3916 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
3918 def GetDeviceOrigin(*args
, **kwargs
):
3919 """GetDeviceOrigin(self) -> Point"""
3920 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
3922 def GetDeviceOriginTuple(*args
, **kwargs
):
3923 """GetDeviceOriginTuple() -> (x,y)"""
3924 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
3926 def SetDeviceOrigin(*args
, **kwargs
):
3927 """SetDeviceOrigin(self, int x, int y)"""
3928 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
3930 def SetDeviceOriginPoint(*args
, **kwargs
):
3931 """SetDeviceOriginPoint(self, Point point)"""
3932 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
3934 def SetAxisOrientation(*args
, **kwargs
):
3936 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3938 Sets the x and y axis orientation (i.e., the direction from lowest to
3939 highest values on the axis). The default orientation is the natural
3940 orientation, e.g. x axis from left to right and y axis from bottom up.
3942 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
3944 def GetLogicalFunction(*args
, **kwargs
):
3946 GetLogicalFunction(self) -> int
3948 Gets the current logical function (set by `SetLogicalFunction`).
3950 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
3952 def SetLogicalFunction(*args
, **kwargs
):
3954 SetLogicalFunction(self, int function)
3956 Sets the current logical function for the device context. This
3957 determines how a source pixel (from a pen or brush colour, or source
3958 device context if using `Blit`) combines with a destination pixel in
3959 the current device context.
3961 The possible values and their meaning in terms of source and
3962 destination pixel values are as follows:
3964 ================ ==========================
3966 wx.AND_INVERT (NOT src) AND dst
3967 wx.AND_REVERSE src AND (NOT dst)
3970 wx.EQUIV (NOT src) XOR dst
3972 wx.NAND (NOT src) OR (NOT dst)
3973 wx.NOR (NOT src) AND (NOT dst)
3976 wx.OR_INVERT (NOT src) OR dst
3977 wx.OR_REVERSE src OR (NOT dst)
3979 wx.SRC_INVERT NOT src
3981 ================ ==========================
3983 The default is wx.COPY, which simply draws with the current
3984 colour. The others combine the current colour and the background using
3985 a logical operation. wx.INVERT is commonly used for drawing rubber
3986 bands or moving outlines, since drawing twice reverts to the original
3990 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
3992 def ComputeScaleAndOrigin(*args
, **kwargs
):
3994 ComputeScaleAndOrigin(self)
3996 Performs all necessary computations for given platform and context
3997 type after each change of scale and origin parameters. Usually called
3998 automatically internally after such changes.
4001 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
4003 def SetOptimization(self
, optimize
):
4005 def GetOptimization(self
):
4008 SetOptimization
= wx
._deprecated
(SetOptimization
)
4009 GetOptimization
= wx
._deprecated
(GetOptimization
)
4011 def CalcBoundingBox(*args
, **kwargs
):
4013 CalcBoundingBox(self, int x, int y)
4015 Adds the specified point to the bounding box which can be retrieved
4016 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4018 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
4020 def CalcBoundingBoxPoint(*args
, **kwargs
):
4022 CalcBoundingBoxPoint(self, Point point)
4024 Adds the specified point to the bounding box which can be retrieved
4025 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4027 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
4029 def ResetBoundingBox(*args
, **kwargs
):
4031 ResetBoundingBox(self)
4033 Resets the bounding box: after a call to this function, the bounding
4034 box doesn't contain anything.
4036 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
4038 def MinX(*args
, **kwargs
):
4042 Gets the minimum horizontal extent used in drawing commands so far.
4044 return _gdi_
.DC_MinX(*args
, **kwargs
)
4046 def MaxX(*args
, **kwargs
):
4050 Gets the maximum horizontal extent used in drawing commands so far.
4052 return _gdi_
.DC_MaxX(*args
, **kwargs
)
4054 def MinY(*args
, **kwargs
):
4058 Gets the minimum vertical extent used in drawing commands so far.
4060 return _gdi_
.DC_MinY(*args
, **kwargs
)
4062 def MaxY(*args
, **kwargs
):
4066 Gets the maximum vertical extent used in drawing commands so far.
4068 return _gdi_
.DC_MaxY(*args
, **kwargs
)
4070 def GetBoundingBox(*args
, **kwargs
):
4072 GetBoundingBox() -> (x1,y1, x2,y2)
4074 Returns the min and max points used in drawing commands so far.
4076 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
4078 def __nonzero__(self
): return self
.Ok()
4079 def _DrawPointList(*args
, **kwargs
):
4080 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4081 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
4083 def _DrawLineList(*args
, **kwargs
):
4084 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4085 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
4087 def _DrawRectangleList(*args
, **kwargs
):
4088 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4089 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
4091 def _DrawEllipseList(*args
, **kwargs
):
4092 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4093 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
4095 def _DrawPolygonList(*args
, **kwargs
):
4096 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4097 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
4099 def _DrawTextList(*args
, **kwargs
):
4101 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4102 PyObject backgroundList) -> PyObject
4104 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
4106 def DrawPointList(self
, points
, pens
=None):
4108 Draw a list of points as quickly as possible.
4110 :param points: A sequence of 2-element sequences representing
4111 each point to draw, (x,y).
4112 :param pens: If None, then the current pen is used. If a
4113 single pen then it will be used for all points. If
4114 a list of pens then there should be one for each point
4119 elif isinstance(pens
, wx
.Pen
):
4121 elif len(pens
) != len(points
):
4122 raise ValueError('points and pens must have same length')
4123 return self
._DrawPointList
(points
, pens
, [])
4126 def DrawLineList(self
, lines
, pens
=None):
4128 Draw a list of lines as quickly as possible.
4130 :param lines: A sequence of 4-element sequences representing
4131 each line to draw, (x1,y1, x2,y2).
4132 :param pens: If None, then the current pen is used. If a
4133 single pen then it will be used for all lines. If
4134 a list of pens then there should be one for each line
4139 elif isinstance(pens
, wx
.Pen
):
4141 elif len(pens
) != len(lines
):
4142 raise ValueError('lines and pens must have same length')
4143 return self
._DrawLineList
(lines
, pens
, [])
4146 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
4148 Draw a list of rectangles as quickly as possible.
4150 :param rectangles: A sequence of 4-element sequences representing
4151 each rectangle to draw, (x,y, w,h).
4152 :param pens: If None, then the current pen is used. If a
4153 single pen then it will be used for all rectangles.
4154 If a list of pens then there should be one for each
4155 rectangle in rectangles.
4156 :param brushes: A brush or brushes to be used to fill the rectagles,
4157 with similar semantics as the pens parameter.
4161 elif isinstance(pens
, wx
.Pen
):
4163 elif len(pens
) != len(rectangles
):
4164 raise ValueError('rectangles and pens must have same length')
4167 elif isinstance(brushes
, wx
.Brush
):
4169 elif len(brushes
) != len(rectangles
):
4170 raise ValueError('rectangles and brushes must have same length')
4171 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
4174 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
4176 Draw a list of ellipses as quickly as possible.
4178 :param ellipses: A sequence of 4-element sequences representing
4179 each ellipse to draw, (x,y, w,h).
4180 :param pens: If None, then the current pen is used. If a
4181 single pen then it will be used for all ellipses.
4182 If a list of pens then there should be one for each
4183 ellipse in ellipses.
4184 :param brushes: A brush or brushes to be used to fill the ellipses,
4185 with similar semantics as the pens parameter.
4189 elif isinstance(pens
, wx
.Pen
):
4191 elif len(pens
) != len(ellipses
):
4192 raise ValueError('ellipses and pens must have same length')
4195 elif isinstance(brushes
, wx
.Brush
):
4197 elif len(brushes
) != len(ellipses
):
4198 raise ValueError('ellipses and brushes must have same length')
4199 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
4202 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
4204 Draw a list of polygons, each of which is a list of points.
4206 :param polygons: A sequence of sequences of sequences.
4207 [[(x1,y1),(x2,y2),(x3,y3)...],
4208 [(x1,y1),(x2,y2),(x3,y3)...]]
4210 :param pens: If None, then the current pen is used. If a
4211 single pen then it will be used for all polygons.
4212 If a list of pens then there should be one for each
4214 :param brushes: A brush or brushes to be used to fill the polygons,
4215 with similar semantics as the pens parameter.
4219 elif isinstance(pens
, wx
.Pen
):
4221 elif len(pens
) != len(polygons
):
4222 raise ValueError('polygons and pens must have same length')
4225 elif isinstance(brushes
, wx
.Brush
):
4227 elif len(brushes
) != len(polygons
):
4228 raise ValueError('polygons and brushes must have same length')
4229 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
4232 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
4234 Draw a list of strings using a list of coordinants for positioning each string.
4236 :param textList: A list of strings
4237 :param coords: A list of (x,y) positions
4238 :param foregrounds: A list of `wx.Colour` objects to use for the
4239 foregrounds of the strings.
4240 :param backgrounds: A list of `wx.Colour` objects to use for the
4241 backgrounds of the strings.
4243 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4244 If you want backgrounds to do anything.
4246 if type(textList
) == type(''):
4247 textList
= [textList
]
4248 elif len(textList
) != len(coords
):
4249 raise ValueError('textlist and coords must have same length')
4250 if foregrounds
is None:
4252 elif isinstance(foregrounds
, wx
.Colour
):
4253 foregrounds
= [foregrounds
]
4254 elif len(foregrounds
) != len(coords
):
4255 raise ValueError('foregrounds and coords must have same length')
4256 if backgrounds
is None:
4258 elif isinstance(backgrounds
, wx
.Colour
):
4259 backgrounds
= [backgrounds
]
4260 elif len(backgrounds
) != len(coords
):
4261 raise ValueError('backgrounds and coords must have same length')
4262 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
4264 _gdi_
.DC_swigregister(DC
)
4266 #---------------------------------------------------------------------------
4270 A memory device context provides a means to draw graphics onto a
4271 bitmap. A bitmap must be selected into the new memory DC before it may
4272 be used for anything. Typical usage is as follows::
4275 dc.SelectObject(bitmap)
4276 # draw on the dc usign any of the Draw methods
4277 dc.SelectObject(wx.NullBitmap)
4278 # the bitmap now contains wahtever was drawn upon it
4280 Note that the memory DC *must* be deleted (or the bitmap selected out
4281 of it) before a bitmap can be reselected into another memory DC.
4284 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4285 __repr__
= _swig_repr
4286 def __init__(self
, *args
, **kwargs
):
4288 __init__(self) -> MemoryDC
4290 Constructs a new memory device context.
4292 Use the Ok member to test whether the constructor was successful in
4293 creating a usable device context. Don't forget to select a bitmap into
4294 the DC before drawing on it.
4296 _gdi_
.MemoryDC_swiginit(self
,_gdi_
.new_MemoryDC(*args
, **kwargs
))
4297 def SelectObject(*args
, **kwargs
):
4299 SelectObject(self, Bitmap bitmap)
4301 Selects the bitmap into the device context, to use as the memory
4302 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4303 the DC, and therefore the bitmap, and also to use Blit to copy the
4306 If the argument is wx.NullBitmap (or some other uninitialised
4307 `wx.Bitmap`) the current bitmap is selected out of the device context,
4308 and the original bitmap restored, allowing the current bitmap to be
4311 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
4313 _gdi_
.MemoryDC_swigregister(MemoryDC
)
4315 def MemoryDCFromDC(*args
, **kwargs
):
4317 MemoryDCFromDC(DC oldDC) -> MemoryDC
4319 Creates a DC that is compatible with the oldDC.
4321 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
4324 #---------------------------------------------------------------------------
4326 BUFFER_VIRTUAL_AREA
= _gdi_
.BUFFER_VIRTUAL_AREA
4327 BUFFER_CLIENT_AREA
= _gdi_
.BUFFER_CLIENT_AREA
4328 class BufferedDC(MemoryDC
):
4330 This simple class provides a simple way to avoid flicker: when drawing
4331 on it, everything is in fact first drawn on an in-memory buffer (a
4332 `wx.Bitmap`) and then copied to the screen only once, when this object
4335 It can be used in the same way as any other device
4336 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
4337 want to use it in your EVT_PAINT handler, you should look at
4338 `wx.BufferedPaintDC`.
4341 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4342 __repr__
= _swig_repr
4343 def __init__(self
, *args
):
4345 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4346 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4348 Constructs a buffered DC.
4350 _gdi_
.BufferedDC_swiginit(self
,_gdi_
.new_BufferedDC(*args
))
4351 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
4353 __swig_destroy__
= _gdi_
.delete_BufferedDC
4354 __del__
= lambda self
: None;
4355 def UnMask(*args
, **kwargs
):
4359 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4360 can be effectively used once only). This is usually only called in
4363 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
4365 _gdi_
.BufferedDC_swigregister(BufferedDC
)
4367 class BufferedPaintDC(BufferedDC
):
4369 This is a subclass of `wx.BufferedDC` which can be used inside of an
4370 EVT_PAINT event handler. Just create an object of this class instead
4371 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4372 flicker. The only thing to watch out for is that if you are using this
4373 class together with `wx.ScrolledWindow`, you probably do **not** want
4374 to call `wx.Window.PrepareDC` on it as it already does this internally
4375 for the real underlying `wx.PaintDC`.
4377 If your window is already fully buffered in a `wx.Bitmap` then your
4378 EVT_PAINT handler can be as simple as just creating a
4379 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4380 automatically when it is destroyed. For example::
4382 def OnPaint(self, event):
4383 dc = wx.BufferedPaintDC(self, self.buffer)
4390 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4391 __repr__
= _swig_repr
4392 def __init__(self
, *args
, **kwargs
):
4394 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4396 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4397 provide the bitmap to be used for buffering or let this object create
4398 one internally (in the latter case, the size of the client part of the
4399 window is automatically used).
4403 _gdi_
.BufferedPaintDC_swiginit(self
,_gdi_
.new_BufferedPaintDC(*args
, **kwargs
))
4404 _gdi_
.BufferedPaintDC_swigregister(BufferedPaintDC
)
4406 #---------------------------------------------------------------------------
4410 A wxScreenDC can be used to paint anywhere on the screen. This should
4411 normally be constructed as a temporary stack object; don't store a
4415 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4416 __repr__
= _swig_repr
4417 def __init__(self
, *args
, **kwargs
):
4419 __init__(self) -> ScreenDC
4421 A wxScreenDC can be used to paint anywhere on the screen. This should
4422 normally be constructed as a temporary stack object; don't store a
4426 _gdi_
.ScreenDC_swiginit(self
,_gdi_
.new_ScreenDC(*args
, **kwargs
))
4427 def StartDrawingOnTopWin(*args
, **kwargs
):
4429 StartDrawingOnTopWin(self, Window window) -> bool
4431 Specify that the area of the screen to be drawn upon coincides with
4434 :see: `EndDrawingOnTop`
4436 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4438 def StartDrawingOnTop(*args
, **kwargs
):
4440 StartDrawingOnTop(self, Rect rect=None) -> bool
4442 Specify that the area is the given rectangle, or the whole screen if
4445 :see: `EndDrawingOnTop`
4447 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4449 def EndDrawingOnTop(*args
, **kwargs
):
4451 EndDrawingOnTop(self) -> bool
4453 Use this in conjunction with `StartDrawingOnTop` or
4454 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4455 top of existing windows. Without this, some window systems (such as X)
4456 only allow drawing to take place underneath other windows.
4458 You might use this pair of functions when implementing a drag feature,
4459 for example as in the `wx.SplitterWindow` implementation.
4461 These functions are probably obsolete since the X implementations
4462 allow drawing directly on the screen now. However, the fact that this
4463 function allows the screen to be refreshed afterwards may be useful
4464 to some applications.
4466 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4468 _gdi_
.ScreenDC_swigregister(ScreenDC
)
4470 #---------------------------------------------------------------------------
4474 A wx.ClientDC must be constructed if an application wishes to paint on
4475 the client area of a window from outside an EVT_PAINT event. This should
4476 normally be constructed as a temporary stack object; don't store a
4477 wx.ClientDC object long term.
4479 To draw on a window from within an EVT_PAINT handler, construct a
4480 `wx.PaintDC` object.
4482 To draw on the whole window including decorations, construct a
4483 `wx.WindowDC` object (Windows only).
4486 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4487 __repr__
= _swig_repr
4488 def __init__(self
, *args
, **kwargs
):
4490 __init__(self, Window win) -> ClientDC
4492 Constructor. Pass the window on which you wish to paint.
4494 _gdi_
.ClientDC_swiginit(self
,_gdi_
.new_ClientDC(*args
, **kwargs
))
4495 _gdi_
.ClientDC_swigregister(ClientDC
)
4497 #---------------------------------------------------------------------------
4501 A wx.PaintDC must be constructed if an application wishes to paint on
4502 the client area of a window from within an EVT_PAINT event
4503 handler. This should normally be constructed as a temporary stack
4504 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4505 handler, you **must** create a wx.PaintDC object within it even if you
4506 don't actually use it.
4508 Using wx.PaintDC within EVT_PAINT handlers is important because it
4509 automatically sets the clipping area to the damaged area of the
4510 window. Attempts to draw outside this area do not appear.
4512 To draw on a window from outside EVT_PAINT handlers, construct a
4513 `wx.ClientDC` object.
4516 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4517 __repr__
= _swig_repr
4518 def __init__(self
, *args
, **kwargs
):
4520 __init__(self, Window win) -> PaintDC
4522 Constructor. Pass the window on which you wish to paint.
4524 _gdi_
.PaintDC_swiginit(self
,_gdi_
.new_PaintDC(*args
, **kwargs
))
4525 _gdi_
.PaintDC_swigregister(PaintDC
)
4527 #---------------------------------------------------------------------------
4531 A wx.WindowDC must be constructed if an application wishes to paint on
4532 the whole area of a window (client and decorations). This should
4533 normally be constructed as a temporary stack object; don't store a
4536 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4537 __repr__
= _swig_repr
4538 def __init__(self
, *args
, **kwargs
):
4540 __init__(self, Window win) -> WindowDC
4542 Constructor. Pass the window on which you wish to paint.
4544 _gdi_
.WindowDC_swiginit(self
,_gdi_
.new_WindowDC(*args
, **kwargs
))
4545 _gdi_
.WindowDC_swigregister(WindowDC
)
4547 #---------------------------------------------------------------------------
4551 wx.MirrorDC is a simple wrapper class which is always associated with a
4552 real `wx.DC` object and either forwards all of its operations to it
4553 without changes (no mirroring takes place) or exchanges x and y
4554 coordinates which makes it possible to reuse the same code to draw a
4555 figure and its mirror -- i.e. reflection related to the diagonal line
4558 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4559 __repr__
= _swig_repr
4560 def __init__(self
, *args
, **kwargs
):
4562 __init__(self, DC dc, bool mirror) -> MirrorDC
4564 Creates a mirrored DC associated with the real *dc*. Everything drawn
4565 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4568 _gdi_
.MirrorDC_swiginit(self
,_gdi_
.new_MirrorDC(*args
, **kwargs
))
4569 _gdi_
.MirrorDC_swigregister(MirrorDC
)
4571 #---------------------------------------------------------------------------
4573 class PostScriptDC(DC
):
4574 """This is a `wx.DC` that can write to PostScript files on any platform."""
4575 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4576 __repr__
= _swig_repr
4577 def __init__(self
, *args
, **kwargs
):
4579 __init__(self, wxPrintData printData) -> PostScriptDC
4581 Constructs a PostScript printer device context from a `wx.PrintData`
4584 _gdi_
.PostScriptDC_swiginit(self
,_gdi_
.new_PostScriptDC(*args
, **kwargs
))
4585 def GetPrintData(*args
, **kwargs
):
4586 """GetPrintData(self) -> wxPrintData"""
4587 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
4589 def SetPrintData(*args
, **kwargs
):
4590 """SetPrintData(self, wxPrintData data)"""
4591 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
4593 def SetResolution(*args
, **kwargs
):
4595 SetResolution(int ppi)
4597 Set resolution (in pixels per inch) that will be used in PostScript
4598 output. Default is 720ppi.
4600 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4602 SetResolution
= staticmethod(SetResolution
)
4603 def GetResolution(*args
, **kwargs
):
4605 GetResolution() -> int
4607 Return resolution used in PostScript output.
4609 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4611 GetResolution
= staticmethod(GetResolution
)
4612 _gdi_
.PostScriptDC_swigregister(PostScriptDC
)
4614 def PostScriptDC_SetResolution(*args
, **kwargs
):
4616 PostScriptDC_SetResolution(int ppi)
4618 Set resolution (in pixels per inch) that will be used in PostScript
4619 output. Default is 720ppi.
4621 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4623 def PostScriptDC_GetResolution(*args
):
4625 PostScriptDC_GetResolution() -> int
4627 Return resolution used in PostScript output.
4629 return _gdi_
.PostScriptDC_GetResolution(*args
)
4631 #---------------------------------------------------------------------------
4633 class MetaFile(_core
.Object
):
4634 """Proxy of C++ MetaFile class"""
4635 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4636 __repr__
= _swig_repr
4637 def __init__(self
, *args
, **kwargs
):
4638 """__init__(self, String filename=EmptyString) -> MetaFile"""
4639 _gdi_
.MetaFile_swiginit(self
,_gdi_
.new_MetaFile(*args
, **kwargs
))
4640 __swig_destroy__
= _gdi_
.delete_MetaFile
4641 __del__
= lambda self
: None;
4642 def Ok(*args
, **kwargs
):
4643 """Ok(self) -> bool"""
4644 return _gdi_
.MetaFile_Ok(*args
, **kwargs
)
4646 def SetClipboard(*args
, **kwargs
):
4647 """SetClipboard(self, int width=0, int height=0) -> bool"""
4648 return _gdi_
.MetaFile_SetClipboard(*args
, **kwargs
)
4650 def GetSize(*args
, **kwargs
):
4651 """GetSize(self) -> Size"""
4652 return _gdi_
.MetaFile_GetSize(*args
, **kwargs
)
4654 def GetWidth(*args
, **kwargs
):
4655 """GetWidth(self) -> int"""
4656 return _gdi_
.MetaFile_GetWidth(*args
, **kwargs
)
4658 def GetHeight(*args
, **kwargs
):
4659 """GetHeight(self) -> int"""
4660 return _gdi_
.MetaFile_GetHeight(*args
, **kwargs
)
4662 def __nonzero__(self
): return self
.Ok()
4663 _gdi_
.MetaFile_swigregister(MetaFile
)
4665 class MetaFileDC(DC
):
4666 """Proxy of C++ MetaFileDC class"""
4667 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4668 __repr__
= _swig_repr
4669 def __init__(self
, *args
, **kwargs
):
4671 __init__(self, String filename=EmptyString, int width=0, int height=0,
4672 String description=EmptyString) -> MetaFileDC
4674 _gdi_
.MetaFileDC_swiginit(self
,_gdi_
.new_MetaFileDC(*args
, **kwargs
))
4675 def Close(*args
, **kwargs
):
4676 """Close(self) -> MetaFile"""
4677 return _gdi_
.MetaFileDC_Close(*args
, **kwargs
)
4679 _gdi_
.MetaFileDC_swigregister(MetaFileDC
)
4681 class PrinterDC(DC
):
4682 """Proxy of C++ PrinterDC class"""
4683 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4684 __repr__
= _swig_repr
4685 def __init__(self
, *args
, **kwargs
):
4686 """__init__(self, wxPrintData printData) -> PrinterDC"""
4687 _gdi_
.PrinterDC_swiginit(self
,_gdi_
.new_PrinterDC(*args
, **kwargs
))
4688 _gdi_
.PrinterDC_swigregister(PrinterDC
)
4690 #---------------------------------------------------------------------------
4692 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
4693 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
4694 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
4695 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
4696 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
4697 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
4698 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
4699 class ImageList(_core
.Object
):
4700 """Proxy of C++ ImageList class"""
4701 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4702 __repr__
= _swig_repr
4703 def __init__(self
, *args
, **kwargs
):
4704 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4705 _gdi_
.ImageList_swiginit(self
,_gdi_
.new_ImageList(*args
, **kwargs
))
4706 __swig_destroy__
= _gdi_
.delete_ImageList
4707 __del__
= lambda self
: None;
4708 def Add(*args
, **kwargs
):
4709 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4710 return _gdi_
.ImageList_Add(*args
, **kwargs
)
4712 def AddWithColourMask(*args
, **kwargs
):
4713 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4714 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
4716 def AddIcon(*args
, **kwargs
):
4717 """AddIcon(self, Icon icon) -> int"""
4718 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
4720 def GetBitmap(*args
, **kwargs
):
4721 """GetBitmap(self, int index) -> Bitmap"""
4722 return _gdi_
.ImageList_GetBitmap(*args
, **kwargs
)
4724 def GetIcon(*args
, **kwargs
):
4725 """GetIcon(self, int index) -> Icon"""
4726 return _gdi_
.ImageList_GetIcon(*args
, **kwargs
)
4728 def Replace(*args
, **kwargs
):
4729 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
4730 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
4732 def Draw(*args
, **kwargs
):
4734 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4735 bool solidBackground=False) -> bool
4737 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
4739 def GetImageCount(*args
, **kwargs
):
4740 """GetImageCount(self) -> int"""
4741 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
4743 def Remove(*args
, **kwargs
):
4744 """Remove(self, int index) -> bool"""
4745 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
4747 def RemoveAll(*args
, **kwargs
):
4748 """RemoveAll(self) -> bool"""
4749 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
4751 def GetSize(*args
, **kwargs
):
4752 """GetSize(index) -> (width,height)"""
4753 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
4755 _gdi_
.ImageList_swigregister(ImageList
)
4757 #---------------------------------------------------------------------------
4759 class StockGDI(object):
4760 """Proxy of C++ StockGDI class"""
4761 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4762 __repr__
= _swig_repr
4763 BRUSH_BLACK
= _gdi_
.StockGDI_BRUSH_BLACK
4764 BRUSH_BLUE
= _gdi_
.StockGDI_BRUSH_BLUE
4765 BRUSH_CYAN
= _gdi_
.StockGDI_BRUSH_CYAN
4766 BRUSH_GREEN
= _gdi_
.StockGDI_BRUSH_GREEN
4767 BRUSH_GREY
= _gdi_
.StockGDI_BRUSH_GREY
4768 BRUSH_LIGHTGREY
= _gdi_
.StockGDI_BRUSH_LIGHTGREY
4769 BRUSH_MEDIUMGREY
= _gdi_
.StockGDI_BRUSH_MEDIUMGREY
4770 BRUSH_RED
= _gdi_
.StockGDI_BRUSH_RED
4771 BRUSH_TRANSPARENT
= _gdi_
.StockGDI_BRUSH_TRANSPARENT
4772 BRUSH_WHITE
= _gdi_
.StockGDI_BRUSH_WHITE
4773 COLOUR_BLACK
= _gdi_
.StockGDI_COLOUR_BLACK
4774 COLOUR_BLUE
= _gdi_
.StockGDI_COLOUR_BLUE
4775 COLOUR_CYAN
= _gdi_
.StockGDI_COLOUR_CYAN
4776 COLOUR_GREEN
= _gdi_
.StockGDI_COLOUR_GREEN
4777 COLOUR_LIGHTGREY
= _gdi_
.StockGDI_COLOUR_LIGHTGREY
4778 COLOUR_RED
= _gdi_
.StockGDI_COLOUR_RED
4779 COLOUR_WHITE
= _gdi_
.StockGDI_COLOUR_WHITE
4780 CURSOR_CROSS
= _gdi_
.StockGDI_CURSOR_CROSS
4781 CURSOR_HOURGLASS
= _gdi_
.StockGDI_CURSOR_HOURGLASS
4782 CURSOR_STANDARD
= _gdi_
.StockGDI_CURSOR_STANDARD
4783 FONT_ITALIC
= _gdi_
.StockGDI_FONT_ITALIC
4784 FONT_NORMAL
= _gdi_
.StockGDI_FONT_NORMAL
4785 FONT_SMALL
= _gdi_
.StockGDI_FONT_SMALL
4786 FONT_SWISS
= _gdi_
.StockGDI_FONT_SWISS
4787 PEN_BLACK
= _gdi_
.StockGDI_PEN_BLACK
4788 PEN_BLACKDASHED
= _gdi_
.StockGDI_PEN_BLACKDASHED
4789 PEN_CYAN
= _gdi_
.StockGDI_PEN_CYAN
4790 PEN_GREEN
= _gdi_
.StockGDI_PEN_GREEN
4791 PEN_GREY
= _gdi_
.StockGDI_PEN_GREY
4792 PEN_LIGHTGREY
= _gdi_
.StockGDI_PEN_LIGHTGREY
4793 PEN_MEDIUMGREY
= _gdi_
.StockGDI_PEN_MEDIUMGREY
4794 PEN_RED
= _gdi_
.StockGDI_PEN_RED
4795 PEN_TRANSPARENT
= _gdi_
.StockGDI_PEN_TRANSPARENT
4796 PEN_WHITE
= _gdi_
.StockGDI_PEN_WHITE
4797 ITEMCOUNT
= _gdi_
.StockGDI_ITEMCOUNT
4798 def __init__(self
, *args
, **kwargs
):
4799 """__init__(self) -> StockGDI"""
4800 _gdi_
.StockGDI_swiginit(self
,_gdi_
.new_StockGDI(*args
, **kwargs
))
4801 __swig_destroy__
= _gdi_
.delete_StockGDI
4802 __del__
= lambda self
: None;
4803 def DeleteAll(*args
, **kwargs
):
4805 return _gdi_
.StockGDI_DeleteAll(*args
, **kwargs
)
4807 DeleteAll
= staticmethod(DeleteAll
)
4808 def instance(*args
, **kwargs
):
4809 """instance() -> StockGDI"""
4810 return _gdi_
.StockGDI_instance(*args
, **kwargs
)
4812 instance
= staticmethod(instance
)
4813 def GetBrush(*args
, **kwargs
):
4814 """GetBrush(int item) -> Brush"""
4815 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
4817 GetBrush
= staticmethod(GetBrush
)
4818 def GetColour(*args
, **kwargs
):
4819 """GetColour(int item) -> Colour"""
4820 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
4822 GetColour
= staticmethod(GetColour
)
4823 def GetCursor(*args
, **kwargs
):
4824 """GetCursor(int item) -> Cursor"""
4825 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
4827 GetCursor
= staticmethod(GetCursor
)
4828 def GetPen(*args
, **kwargs
):
4829 """GetPen(int item) -> Pen"""
4830 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
4832 GetPen
= staticmethod(GetPen
)
4833 def GetFont(*args
, **kwargs
):
4834 """GetFont(self, int item) -> Font"""
4835 return _gdi_
.StockGDI_GetFont(*args
, **kwargs
)
4837 def _initStockObjects():
4839 wx
.ITALIC_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_ITALIC
).this
4840 wx
.NORMAL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_NORMAL
).this
4841 wx
.SMALL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SMALL
).this
4842 wx
.SWISS_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SWISS
).this
4844 wx
.BLACK_DASHED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACKDASHED
).this
4845 wx
.BLACK_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACK
).this
4846 wx
.CYAN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_CYAN
).this
4847 wx
.GREEN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREEN
).this
4848 wx
.GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREY
).this
4849 wx
.LIGHT_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_LIGHTGREY
).this
4850 wx
.MEDIUM_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_MEDIUMGREY
).this
4851 wx
.RED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_RED
).this
4852 wx
.TRANSPARENT_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_TRANSPARENT
).this
4853 wx
.WHITE_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_WHITE
).this
4855 wx
.BLACK_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLACK
).this
4856 wx
.BLUE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLUE
).this
4857 wx
.CYAN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_CYAN
).this
4858 wx
.GREEN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREEN
).this
4859 wx
.GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREY
).this
4860 wx
.LIGHT_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_LIGHTGREY
).this
4861 wx
.MEDIUM_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_MEDIUMGREY
).this
4862 wx
.RED_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_RED
).this
4863 wx
.TRANSPARENT_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_TRANSPARENT
).this
4864 wx
.WHITE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_WHITE
).this
4866 wx
.BLACK
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLACK
).this
4867 wx
.BLUE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLUE
).this
4868 wx
.CYAN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_CYAN
).this
4869 wx
.GREEN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_GREEN
).this
4870 wx
.LIGHT_GREY
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_LIGHTGREY
).this
4871 wx
.RED
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_RED
).this
4872 wx
.WHITE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_WHITE
).this
4874 wx
.CROSS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_CROSS
).this
4875 wx
.HOURGLASS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_HOURGLASS
).this
4876 wx
.STANDARD_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_STANDARD
).this
4878 wx
.TheFontList
.this
= _wxPyInitTheFontList().this
4879 wx
.ThePenList
.this
= _wxPyInitThePenList().this
4880 wx
.TheBrushList
.this
= _wxPyInitTheBrushList().this
4881 wx
.TheColourDatabase
.this
= _wxPyInitTheColourDatabase().this
4884 _initStockObjects
= staticmethod(_initStockObjects
)
4886 _gdi_
.StockGDI_swigregister(StockGDI
)
4888 def StockGDI_DeleteAll(*args
):
4889 """StockGDI_DeleteAll()"""
4890 return _gdi_
.StockGDI_DeleteAll(*args
)
4892 def StockGDI_instance(*args
):
4893 """StockGDI_instance() -> StockGDI"""
4894 return _gdi_
.StockGDI_instance(*args
)
4896 def StockGDI_GetBrush(*args
, **kwargs
):
4897 """StockGDI_GetBrush(int item) -> Brush"""
4898 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
4900 def StockGDI_GetColour(*args
, **kwargs
):
4901 """StockGDI_GetColour(int item) -> Colour"""
4902 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
4904 def StockGDI_GetCursor(*args
, **kwargs
):
4905 """StockGDI_GetCursor(int item) -> Cursor"""
4906 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
4908 def StockGDI_GetPen(*args
, **kwargs
):
4909 """StockGDI_GetPen(int item) -> Pen"""
4910 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
4912 # Create an uninitialized instance for the stock objects, they will
4913 # be initialized later when the wx.App object is created.
4914 ITALIC_FONT
= Font
.__new
__(Font
)
4915 NORMAL_FONT
= Font
.__new
__(Font
)
4916 SMALL_FONT
= Font
.__new
__(Font
)
4917 SWISS_FONT
= Font
.__new
__(Font
)
4919 BLACK_DASHED_PEN
= Pen
.__new
__(Pen
)
4920 BLACK_PEN
= Pen
.__new
__(Pen
)
4921 CYAN_PEN
= Pen
.__new
__(Pen
)
4922 GREEN_PEN
= Pen
.__new
__(Pen
)
4923 GREY_PEN
= Pen
.__new
__(Pen
)
4924 LIGHT_GREY_PEN
= Pen
.__new
__(Pen
)
4925 MEDIUM_GREY_PEN
= Pen
.__new
__(Pen
)
4926 RED_PEN
= Pen
.__new
__(Pen
)
4927 TRANSPARENT_PEN
= Pen
.__new
__(Pen
)
4928 WHITE_PEN
= Pen
.__new
__(Pen
)
4930 BLACK_BRUSH
= Brush
.__new
__(Brush
)
4931 BLUE_BRUSH
= Brush
.__new
__(Brush
)
4932 CYAN_BRUSH
= Brush
.__new
__(Brush
)
4933 GREEN_BRUSH
= Brush
.__new
__(Brush
)
4934 GREY_BRUSH
= Brush
.__new
__(Brush
)
4935 LIGHT_GREY_BRUSH
= Brush
.__new
__(Brush
)
4936 MEDIUM_GREY_BRUSH
= Brush
.__new
__(Brush
)
4937 RED_BRUSH
= Brush
.__new
__(Brush
)
4938 TRANSPARENT_BRUSH
= Brush
.__new
__(Brush
)
4939 WHITE_BRUSH
= Brush
.__new
__(Brush
)
4941 BLACK
= Colour
.__new
__(Colour
)
4942 BLUE
= Colour
.__new
__(Colour
)
4943 CYAN
= Colour
.__new
__(Colour
)
4944 GREEN
= Colour
.__new
__(Colour
)
4945 LIGHT_GREY
= Colour
.__new
__(Colour
)
4946 RED
= Colour
.__new
__(Colour
)
4947 WHITE
= Colour
.__new
__(Colour
)
4949 CROSS_CURSOR
= Cursor
.__new
__(Cursor
)
4950 HOURGLASS_CURSOR
= Cursor
.__new
__(Cursor
)
4951 STANDARD_CURSOR
= Cursor
.__new
__(Cursor
)
4953 class GDIObjListBase(object):
4954 """Proxy of C++ GDIObjListBase class"""
4955 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4956 __repr__
= _swig_repr
4957 def __init__(self
, *args
, **kwargs
):
4958 """__init__(self) -> GDIObjListBase"""
4959 _gdi_
.GDIObjListBase_swiginit(self
,_gdi_
.new_GDIObjListBase(*args
, **kwargs
))
4960 __swig_destroy__
= _gdi_
.delete_GDIObjListBase
4961 __del__
= lambda self
: None;
4962 _gdi_
.GDIObjListBase_swigregister(GDIObjListBase
)
4964 NullBitmap
= cvar
.NullBitmap
4965 NullIcon
= cvar
.NullIcon
4966 NullCursor
= cvar
.NullCursor
4967 NullPen
= cvar
.NullPen
4968 NullBrush
= cvar
.NullBrush
4969 NullPalette
= cvar
.NullPalette
4970 NullFont
= cvar
.NullFont
4971 NullColour
= cvar
.NullColour
4973 class PenList(GDIObjListBase
):
4974 """Proxy of C++ PenList class"""
4975 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4976 def __init__(self
): raise AttributeError, "No constructor defined"
4977 __repr__
= _swig_repr
4978 def FindOrCreatePen(*args
, **kwargs
):
4979 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
4980 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
4982 def AddPen(*args
, **kwargs
):
4983 """AddPen(self, Pen pen)"""
4984 return _gdi_
.PenList_AddPen(*args
, **kwargs
)
4986 def RemovePen(*args
, **kwargs
):
4987 """RemovePen(self, Pen pen)"""
4988 return _gdi_
.PenList_RemovePen(*args
, **kwargs
)
4990 AddPen
= wx
._deprecated
(AddPen
)
4991 RemovePen
= wx
._deprecated
(RemovePen
)
4993 _gdi_
.PenList_swigregister(PenList
)
4995 class BrushList(GDIObjListBase
):
4996 """Proxy of C++ BrushList class"""
4997 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4998 def __init__(self
): raise AttributeError, "No constructor defined"
4999 __repr__
= _swig_repr
5000 def FindOrCreateBrush(*args
, **kwargs
):
5001 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
5002 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
5004 def AddBrush(*args
, **kwargs
):
5005 """AddBrush(self, Brush brush)"""
5006 return _gdi_
.BrushList_AddBrush(*args
, **kwargs
)
5008 def RemoveBrush(*args
, **kwargs
):
5009 """RemoveBrush(self, Brush brush)"""
5010 return _gdi_
.BrushList_RemoveBrush(*args
, **kwargs
)
5012 AddBrush
= wx
._deprecated
(AddBrush
)
5013 RemoveBrush
= wx
._deprecated
(RemoveBrush
)
5015 _gdi_
.BrushList_swigregister(BrushList
)
5017 class FontList(GDIObjListBase
):
5018 """Proxy of C++ FontList class"""
5019 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5020 def __init__(self
): raise AttributeError, "No constructor defined"
5021 __repr__
= _swig_repr
5022 def FindOrCreateFont(*args
, **kwargs
):
5024 FindOrCreateFont(self, int point_size, int family, int style, int weight,
5025 bool underline=False, String facename=EmptyString,
5026 int encoding=FONTENCODING_DEFAULT) -> Font
5028 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
5030 def AddFont(*args
, **kwargs
):
5031 """AddFont(self, Font font)"""
5032 return _gdi_
.FontList_AddFont(*args
, **kwargs
)
5034 def RemoveFont(*args
, **kwargs
):
5035 """RemoveFont(self, Font font)"""
5036 return _gdi_
.FontList_RemoveFont(*args
, **kwargs
)
5038 AddFont
= wx
._deprecated
(AddFont
)
5039 RemoveFont
= wx
._deprecated
(RemoveFont
)
5041 _gdi_
.FontList_swigregister(FontList
)
5043 class ColourDatabase(object):
5044 """Proxy of C++ ColourDatabase class"""
5045 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5046 __repr__
= _swig_repr
5047 def __init__(self
, *args
, **kwargs
):
5048 """__init__(self) -> ColourDatabase"""
5049 _gdi_
.ColourDatabase_swiginit(self
,_gdi_
.new_ColourDatabase(*args
, **kwargs
))
5050 __swig_destroy__
= _gdi_
.delete_ColourDatabase
5051 __del__
= lambda self
: None;
5052 def Find(*args
, **kwargs
):
5053 """Find(self, String name) -> Colour"""
5054 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
5056 def FindName(*args
, **kwargs
):
5057 """FindName(self, Colour colour) -> String"""
5058 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
5061 def AddColour(*args
, **kwargs
):
5062 """AddColour(self, String name, Colour colour)"""
5063 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
5065 def Append(*args
, **kwargs
):
5066 """Append(self, String name, int red, int green, int blue)"""
5067 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
5069 _gdi_
.ColourDatabase_swigregister(ColourDatabase
)
5071 #---------------------------------------------------------------------------
5074 def _wxPyInitTheFontList(*args
):
5075 """_wxPyInitTheFontList() -> FontList"""
5076 return _gdi_
._wxPyInitTheFontList
(*args
)
5078 def _wxPyInitThePenList(*args
):
5079 """_wxPyInitThePenList() -> PenList"""
5080 return _gdi_
._wxPyInitThePenList
(*args
)
5082 def _wxPyInitTheBrushList(*args
):
5083 """_wxPyInitTheBrushList() -> BrushList"""
5084 return _gdi_
._wxPyInitTheBrushList
(*args
)
5086 def _wxPyInitTheColourDatabase(*args
):
5087 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
5088 return _gdi_
._wxPyInitTheColourDatabase
(*args
)
5089 # Create an uninitialized instance for the stock objects, they will
5090 # be initialized later when the wx.App object is created.
5091 TheFontList
= FontList
.__new
__(FontList
)
5092 ThePenList
= PenList
.__new
__(PenList
)
5093 TheBrushList
= BrushList
.__new
__(BrushList
)
5094 TheColourDatabase
= ColourDatabase
.__new
__(ColourDatabase
)
5096 NullColor
= NullColour
5097 #---------------------------------------------------------------------------
5099 class Effects(_core
.Object
):
5100 """Proxy of C++ Effects class"""
5101 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5102 __repr__
= _swig_repr
5103 def __init__(self
, *args
, **kwargs
):
5104 """__init__(self) -> Effects"""
5105 _gdi_
.Effects_swiginit(self
,_gdi_
.new_Effects(*args
, **kwargs
))
5106 def GetHighlightColour(*args
, **kwargs
):
5107 """GetHighlightColour(self) -> Colour"""
5108 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
5110 def GetLightShadow(*args
, **kwargs
):
5111 """GetLightShadow(self) -> Colour"""
5112 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
5114 def GetFaceColour(*args
, **kwargs
):
5115 """GetFaceColour(self) -> Colour"""
5116 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
5118 def GetMediumShadow(*args
, **kwargs
):
5119 """GetMediumShadow(self) -> Colour"""
5120 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
5122 def GetDarkShadow(*args
, **kwargs
):
5123 """GetDarkShadow(self) -> Colour"""
5124 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
5126 def SetHighlightColour(*args
, **kwargs
):
5127 """SetHighlightColour(self, Colour c)"""
5128 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
5130 def SetLightShadow(*args
, **kwargs
):
5131 """SetLightShadow(self, Colour c)"""
5132 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
5134 def SetFaceColour(*args
, **kwargs
):
5135 """SetFaceColour(self, Colour c)"""
5136 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
5138 def SetMediumShadow(*args
, **kwargs
):
5139 """SetMediumShadow(self, Colour c)"""
5140 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
5142 def SetDarkShadow(*args
, **kwargs
):
5143 """SetDarkShadow(self, Colour c)"""
5144 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
5146 def Set(*args
, **kwargs
):
5148 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
5149 Colour mediumShadow, Colour darkShadow)
5151 return _gdi_
.Effects_Set(*args
, **kwargs
)
5153 def DrawSunkenEdge(*args
, **kwargs
):
5154 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
5155 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
5157 def TileBitmap(*args
, **kwargs
):
5158 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
5159 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
5161 _gdi_
.Effects_swigregister(Effects
)
5163 #---------------------------------------------------------------------------
5165 CONTROL_DISABLED
= _gdi_
.CONTROL_DISABLED
5166 CONTROL_FOCUSED
= _gdi_
.CONTROL_FOCUSED
5167 CONTROL_PRESSED
= _gdi_
.CONTROL_PRESSED
5168 CONTROL_ISDEFAULT
= _gdi_
.CONTROL_ISDEFAULT
5169 CONTROL_ISSUBMENU
= _gdi_
.CONTROL_ISSUBMENU
5170 CONTROL_EXPANDED
= _gdi_
.CONTROL_EXPANDED
5171 CONTROL_CURRENT
= _gdi_
.CONTROL_CURRENT
5172 CONTROL_SELECTED
= _gdi_
.CONTROL_SELECTED
5173 CONTROL_CHECKED
= _gdi_
.CONTROL_CHECKED
5174 CONTROL_CHECKABLE
= _gdi_
.CONTROL_CHECKABLE
5175 CONTROL_UNDETERMINED
= _gdi_
.CONTROL_UNDETERMINED
5176 CONTROL_FLAGS_MASK
= _gdi_
.CONTROL_FLAGS_MASK
5177 CONTROL_DIRTY
= _gdi_
.CONTROL_DIRTY
5178 class SplitterRenderParams(object):
5180 This is just a simple struct used as a return value of
5181 `wx.RendererNative.GetSplitterParams` and contains some platform
5182 specific metrics about splitters.
5184 * widthSash: the width of the splitter sash.
5185 * border: the width of the border of the splitter window.
5186 * isHotSensitive: ``True`` if the splitter changes its
5187 appearance when the mouse is over it.
5191 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5192 __repr__
= _swig_repr
5193 def __init__(self
, *args
, **kwargs
):
5195 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
5197 This is just a simple struct used as a return value of
5198 `wx.RendererNative.GetSplitterParams` and contains some platform
5199 specific metrics about splitters.
5201 * widthSash: the width of the splitter sash.
5202 * border: the width of the border of the splitter window.
5203 * isHotSensitive: ``True`` if the splitter changes its
5204 appearance when the mouse is over it.
5208 _gdi_
.SplitterRenderParams_swiginit(self
,_gdi_
.new_SplitterRenderParams(*args
, **kwargs
))
5209 __swig_destroy__
= _gdi_
.delete_SplitterRenderParams
5210 __del__
= lambda self
: None;
5211 widthSash
= property(_gdi_
.SplitterRenderParams_widthSash_get
)
5212 border
= property(_gdi_
.SplitterRenderParams_border_get
)
5213 isHotSensitive
= property(_gdi_
.SplitterRenderParams_isHotSensitive_get
)
5214 _gdi_
.SplitterRenderParams_swigregister(SplitterRenderParams
)
5216 class RendererVersion(object):
5218 This simple struct represents the `wx.RendererNative` interface
5219 version and is only used as the return value of
5220 `wx.RendererNative.GetVersion`.
5222 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5223 __repr__
= _swig_repr
5224 def __init__(self
, *args
, **kwargs
):
5226 __init__(self, int version_, int age_) -> RendererVersion
5228 This simple struct represents the `wx.RendererNative` interface
5229 version and is only used as the return value of
5230 `wx.RendererNative.GetVersion`.
5232 _gdi_
.RendererVersion_swiginit(self
,_gdi_
.new_RendererVersion(*args
, **kwargs
))
5233 __swig_destroy__
= _gdi_
.delete_RendererVersion
5234 __del__
= lambda self
: None;
5235 Current_Version
= _gdi_
.RendererVersion_Current_Version
5236 Current_Age
= _gdi_
.RendererVersion_Current_Age
5237 def IsCompatible(*args
, **kwargs
):
5238 """IsCompatible(RendererVersion ver) -> bool"""
5239 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
5241 IsCompatible
= staticmethod(IsCompatible
)
5242 version
= property(_gdi_
.RendererVersion_version_get
)
5243 age
= property(_gdi_
.RendererVersion_age_get
)
5244 _gdi_
.RendererVersion_swigregister(RendererVersion
)
5246 def RendererVersion_IsCompatible(*args
, **kwargs
):
5247 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
5248 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
5250 class RendererNative(object):
5252 One of the design principles of wxWidgets is to use the native widgets
5253 on every platform in order to be as close to the native look and feel
5254 on every platform. However there are still cases when some generic
5255 widgets are needed for various reasons, but it can sometimes take a
5256 lot of messy work to make them conform to the native LnF.
5258 The wx.RendererNative class is a collection of functions that have
5259 platform-specific implementations for drawing certain parts of
5260 genereic controls in ways that are as close to the native look as
5263 Note that each drawing function restores the `wx.DC` attributes if it
5264 changes them, so it is safe to assume that the same pen, brush and
5265 colours that were active before the call to this function are still in
5269 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5270 def __init__(self
): raise AttributeError, "No constructor defined"
5271 __repr__
= _swig_repr
5272 def DrawHeaderButton(*args
, **kwargs
):
5274 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0)
5276 Draw the header control button (such as what is used by `wx.ListCtrl`
5279 return _gdi_
.RendererNative_DrawHeaderButton(*args
, **kwargs
)
5281 def DrawTreeItemButton(*args
, **kwargs
):
5283 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
5285 Draw the expanded/collapsed icon for a tree control item.
5287 return _gdi_
.RendererNative_DrawTreeItemButton(*args
, **kwargs
)
5289 def DrawSplitterBorder(*args
, **kwargs
):
5291 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
5293 Draw the border for a sash window: this border must be such that the
5294 sash drawn by `DrawSplitterSash` blends into it well.
5296 return _gdi_
.RendererNative_DrawSplitterBorder(*args
, **kwargs
)
5298 def DrawSplitterSash(*args
, **kwargs
):
5300 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
5303 Draw a sash. The orient parameter defines whether the sash should be
5304 vertical or horizontal and how the position should be interpreted.
5306 return _gdi_
.RendererNative_DrawSplitterSash(*args
, **kwargs
)
5308 def DrawComboBoxDropButton(*args
, **kwargs
):
5310 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
5312 Draw a button like the one used by `wx.ComboBox` to show a drop down
5313 window. The usual appearance is a downwards pointing arrow.
5315 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
5316 ``wx.CONTROL_CURRENT`` bits set.
5318 return _gdi_
.RendererNative_DrawComboBoxDropButton(*args
, **kwargs
)
5320 def DrawDropArrow(*args
, **kwargs
):
5322 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
5324 Draw a drop down arrow that is suitable for use outside a combo
5325 box. Arrow will have a transparent background.
5327 ``rect`` is not entirely filled by the arrow. Instead, you should use
5328 bounding rectangle of a drop down button which arrow matches the size
5329 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
5330 ``wx.CONTROL_CURRENT`` bit set.
5332 return _gdi_
.RendererNative_DrawDropArrow(*args
, **kwargs
)
5334 def DrawCheckBox(*args
, **kwargs
):
5336 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
5338 Draw a check button. Flags may use wx.CONTROL_CHECKED,
5339 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
5341 return _gdi_
.RendererNative_DrawCheckBox(*args
, **kwargs
)
5343 def DrawPushButton(*args
, **kwargs
):
5345 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
5347 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
5348 wx.CONTROL_ISDEFAULT
5350 return _gdi_
.RendererNative_DrawPushButton(*args
, **kwargs
)
5352 def DrawItemSelectionRect(*args
, **kwargs
):
5354 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
5356 Draw rectangle indicating that an item in e.g. a list control has been
5359 The flags parameter may be:
5361 ==================== ============================================
5362 wx.CONTROL_SELECTED item is selected, e.g. draw background
5363 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
5364 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
5365 background vs. grey otherwise
5366 ==================== ============================================
5369 return _gdi_
.RendererNative_DrawItemSelectionRect(*args
, **kwargs
)
5371 def GetSplitterParams(*args
, **kwargs
):
5373 GetSplitterParams(self, Window win) -> SplitterRenderParams
5375 Get the splitter parameters, see `wx.SplitterRenderParams`.
5377 return _gdi_
.RendererNative_GetSplitterParams(*args
, **kwargs
)
5379 def Get(*args
, **kwargs
):
5381 Get() -> RendererNative
5383 Return the currently used renderer
5385 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
5387 Get
= staticmethod(Get
)
5388 def GetGeneric(*args
, **kwargs
):
5390 GetGeneric() -> RendererNative
5392 Return the generic implementation of the renderer. Under some
5393 platforms, this is the default renderer implementation, others have
5394 platform-specific default renderer which can be retrieved by calling
5395 `wx.RendererNative.GetDefault`.
5397 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
5399 GetGeneric
= staticmethod(GetGeneric
)
5400 def GetDefault(*args
, **kwargs
):
5402 GetDefault() -> RendererNative
5404 Return the default (native) implementation for this platform -- this
5405 is also the one used by default but this may be changed by calling
5406 `wx.RendererNative.Set` in which case the return value of this method
5407 may be different from the return value of `wx.RendererNative.Get`.
5409 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
5411 GetDefault
= staticmethod(GetDefault
)
5412 def Set(*args
, **kwargs
):
5414 Set(RendererNative renderer) -> RendererNative
5416 Set the renderer to use, passing None reverts to using the default
5417 renderer. Returns the previous renderer used with Set or None.
5419 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
5421 Set
= staticmethod(Set
)
5422 def GetVersion(*args
, **kwargs
):
5424 GetVersion(self) -> RendererVersion
5426 Returns the version of the renderer. Will be used for ensuring
5427 compatibility of dynamically loaded renderers.
5429 return _gdi_
.RendererNative_GetVersion(*args
, **kwargs
)
5431 _gdi_
.RendererNative_swigregister(RendererNative
)
5433 def RendererNative_Get(*args
):
5435 RendererNative_Get() -> RendererNative
5437 Return the currently used renderer
5439 return _gdi_
.RendererNative_Get(*args
)
5441 def RendererNative_GetGeneric(*args
):
5443 RendererNative_GetGeneric() -> RendererNative
5445 Return the generic implementation of the renderer. Under some
5446 platforms, this is the default renderer implementation, others have
5447 platform-specific default renderer which can be retrieved by calling
5448 `wx.RendererNative.GetDefault`.
5450 return _gdi_
.RendererNative_GetGeneric(*args
)
5452 def RendererNative_GetDefault(*args
):
5454 RendererNative_GetDefault() -> RendererNative
5456 Return the default (native) implementation for this platform -- this
5457 is also the one used by default but this may be changed by calling
5458 `wx.RendererNative.Set` in which case the return value of this method
5459 may be different from the return value of `wx.RendererNative.Get`.
5461 return _gdi_
.RendererNative_GetDefault(*args
)
5463 def RendererNative_Set(*args
, **kwargs
):
5465 RendererNative_Set(RendererNative renderer) -> RendererNative
5467 Set the renderer to use, passing None reverts to using the default
5468 renderer. Returns the previous renderer used with Set or None.
5470 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
5472 #---------------------------------------------------------------------------
5474 class PseudoDC(_core
.Object
):
5476 A PseudoDC is an object that can be used as if it were a `wx.DC`. All
5477 commands issued to the PseudoDC are stored in a list. You can then
5478 play these commands back to a real DC object using the DrawToDC
5479 method. Commands in the command list are indexed by ID. You can use
5480 this to clear the operations associated with a single ID and then
5481 re-draw the object associated with that ID.
5483 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5484 __repr__
= _swig_repr
5485 def __init__(self
, *args
, **kwargs
):
5487 __init__(self) -> PseudoDC
5489 Constructs a new Pseudo device context for recording dc operations
5491 _gdi_
.PseudoDC_swiginit(self
,_gdi_
.new_PseudoDC(*args
, **kwargs
))
5492 def BeginDrawing(*args
, **kwargs
):
5496 Allows for optimization of drawing code on platforms that need it. On
5497 other platforms this is just an empty function and is harmless. To
5498 take advantage of this postential optimization simply enclose each
5499 group of calls to the drawing primitives within calls to
5500 `BeginDrawing` and `EndDrawing`.
5502 return _gdi_
.PseudoDC_BeginDrawing(*args
, **kwargs
)
5504 def EndDrawing(*args
, **kwargs
):
5508 Ends the group of drawing primitives started with `BeginDrawing`, and
5509 invokes whatever optimization is available for this DC type on the
5512 return _gdi_
.PseudoDC_EndDrawing(*args
, **kwargs
)
5514 __swig_destroy__
= _gdi_
.delete_PseudoDC
5515 __del__
= lambda self
: None;
5516 def RemoveAll(*args
, **kwargs
):
5520 Removes all objects and operations from the recorded list.
5522 return _gdi_
.PseudoDC_RemoveAll(*args
, **kwargs
)
5524 def GetLen(*args
, **kwargs
):
5528 Returns the number of operations in the recorded list.
5530 return _gdi_
.PseudoDC_GetLen(*args
, **kwargs
)
5532 def SetId(*args
, **kwargs
):
5536 Sets the id to be associated with subsequent operations.
5538 return _gdi_
.PseudoDC_SetId(*args
, **kwargs
)
5540 def ClearId(*args
, **kwargs
):
5542 ClearId(self, int id)
5544 Removes all operations associated with id so the object can be redrawn.
5546 return _gdi_
.PseudoDC_ClearId(*args
, **kwargs
)
5548 def RemoveId(*args
, **kwargs
):
5550 RemoveId(self, int id)
5552 Remove the object node (and all operations) associated with an id.
5554 return _gdi_
.PseudoDC_RemoveId(*args
, **kwargs
)
5556 def TranslateId(*args
, **kwargs
):
5558 TranslateId(self, int id, int dx, int dy)
5560 Translate the operations of id by dx,dy.
5562 return _gdi_
.PseudoDC_TranslateId(*args
, **kwargs
)
5564 def DrawIdToDC(*args
, **kwargs
):
5566 DrawIdToDC(self, int id, DC dc)
5568 Draw recorded operations of id to dc.
5570 return _gdi_
.PseudoDC_DrawIdToDC(*args
, **kwargs
)
5572 def SetIdBounds(*args
, **kwargs
):
5574 SetIdBounds(self, int id, Rect rect)
5576 Set the bounding rect of a given object. This will create
5577 an object node if one doesn't exist.
5579 return _gdi_
.PseudoDC_SetIdBounds(*args
, **kwargs
)
5581 def GetIdBounds(*args
, **kwargs
):
5583 GetIdBounds(self, int id) -> Rect
5585 Returns the bounding rectangle previouly set with SetIdBounds. If
5586 no bounds have been set, it returns wx.Rect(0,0,0,0).
5588 return _gdi_
.PseudoDC_GetIdBounds(*args
, **kwargs
)
5590 def DrawToDCClipped(*args
, **kwargs
):
5592 DrawToDCClipped(self, DC dc, Rect rect)
5594 Draws the recorded operations to dc unless the operation is known to
5597 return _gdi_
.PseudoDC_DrawToDCClipped(*args
, **kwargs
)
5599 def DrawToDCClippedRgn(*args
, **kwargs
):
5601 DrawToDCClippedRgn(self, DC dc, Region region)
5603 Draws the recorded operations to dc unless the operation is known to
5606 return _gdi_
.PseudoDC_DrawToDCClippedRgn(*args
, **kwargs
)
5608 def DrawToDC(*args
, **kwargs
):
5610 DrawToDC(self, DC dc)
5612 Draws the recorded operations to dc.
5614 return _gdi_
.PseudoDC_DrawToDC(*args
, **kwargs
)
5616 def FloodFill(*args
, **kwargs
):
5618 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
5620 Flood fills the device context starting from the given point, using
5621 the current brush colour, and using a style:
5623 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
5624 the given colour is encountered.
5626 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
5629 Returns False if the operation failed.
5631 Note: The present implementation for non-Windows platforms may fail to
5632 find colour borders if the pixels do not match the colour
5633 exactly. However the function will still return true.
5635 return _gdi_
.PseudoDC_FloodFill(*args
, **kwargs
)
5637 def FloodFillPoint(*args
, **kwargs
):
5639 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
5641 Flood fills the device context starting from the given point, using
5642 the current brush colour, and using a style:
5644 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
5645 the given colour is encountered.
5647 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
5650 Returns False if the operation failed.
5652 Note: The present implementation for non-Windows platforms may fail to
5653 find colour borders if the pixels do not match the colour
5654 exactly. However the function will still return true.
5656 return _gdi_
.PseudoDC_FloodFillPoint(*args
, **kwargs
)
5658 def DrawLine(*args
, **kwargs
):
5660 DrawLine(self, int x1, int y1, int x2, int y2)
5662 Draws a line from the first point to the second. The current pen is
5663 used for drawing the line. Note that the second point is *not* part of
5664 the line and is not drawn by this function (this is consistent with
5665 the behaviour of many other toolkits).
5667 return _gdi_
.PseudoDC_DrawLine(*args
, **kwargs
)
5669 def DrawLinePoint(*args
, **kwargs
):
5671 DrawLinePoint(self, Point pt1, Point pt2)
5673 Draws a line from the first point to the second. The current pen is
5674 used for drawing the line. Note that the second point is *not* part of
5675 the line and is not drawn by this function (this is consistent with
5676 the behaviour of many other toolkits).
5678 return _gdi_
.PseudoDC_DrawLinePoint(*args
, **kwargs
)
5680 def CrossHair(*args
, **kwargs
):
5682 CrossHair(self, int x, int y)
5684 Displays a cross hair using the current pen. This is a vertical and
5685 horizontal line the height and width of the window, centred on the
5688 return _gdi_
.PseudoDC_CrossHair(*args
, **kwargs
)
5690 def CrossHairPoint(*args
, **kwargs
):
5692 CrossHairPoint(self, Point pt)
5694 Displays a cross hair using the current pen. This is a vertical and
5695 horizontal line the height and width of the window, centred on the
5698 return _gdi_
.PseudoDC_CrossHairPoint(*args
, **kwargs
)
5700 def DrawArc(*args
, **kwargs
):
5702 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
5704 Draws an arc of a circle, centred on the *center* point (xc, yc), from
5705 the first point to the second. The current pen is used for the outline
5706 and the current brush for filling the shape.
5708 The arc is drawn in an anticlockwise direction from the start point to
5711 return _gdi_
.PseudoDC_DrawArc(*args
, **kwargs
)
5713 def DrawArcPoint(*args
, **kwargs
):
5715 DrawArcPoint(self, Point pt1, Point pt2, Point center)
5717 Draws an arc of a circle, centred on the *center* point (xc, yc), from
5718 the first point to the second. The current pen is used for the outline
5719 and the current brush for filling the shape.
5721 The arc is drawn in an anticlockwise direction from the start point to
5724 return _gdi_
.PseudoDC_DrawArcPoint(*args
, **kwargs
)
5726 def DrawCheckMark(*args
, **kwargs
):
5728 DrawCheckMark(self, int x, int y, int width, int height)
5730 Draws a check mark inside the given rectangle.
5732 return _gdi_
.PseudoDC_DrawCheckMark(*args
, **kwargs
)
5734 def DrawCheckMarkRect(*args
, **kwargs
):
5736 DrawCheckMarkRect(self, Rect rect)
5738 Draws a check mark inside the given rectangle.
5740 return _gdi_
.PseudoDC_DrawCheckMarkRect(*args
, **kwargs
)
5742 def DrawEllipticArc(*args
, **kwargs
):
5744 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
5746 Draws an arc of an ellipse, with the given rectangle defining the
5747 bounds of the ellipse. The current pen is used for drawing the arc and
5748 the current brush is used for drawing the pie.
5750 The *start* and *end* parameters specify the start and end of the arc
5751 relative to the three-o'clock position from the center of the
5752 rectangle. Angles are specified in degrees (360 is a complete
5753 circle). Positive values mean counter-clockwise motion. If start is
5754 equal to end, a complete ellipse will be drawn.
5756 return _gdi_
.PseudoDC_DrawEllipticArc(*args
, **kwargs
)
5758 def DrawEllipticArcPointSize(*args
, **kwargs
):
5760 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
5762 Draws an arc of an ellipse, with the given rectangle defining the
5763 bounds of the ellipse. The current pen is used for drawing the arc and
5764 the current brush is used for drawing the pie.
5766 The *start* and *end* parameters specify the start and end of the arc
5767 relative to the three-o'clock position from the center of the
5768 rectangle. Angles are specified in degrees (360 is a complete
5769 circle). Positive values mean counter-clockwise motion. If start is
5770 equal to end, a complete ellipse will be drawn.
5772 return _gdi_
.PseudoDC_DrawEllipticArcPointSize(*args
, **kwargs
)
5774 def DrawPoint(*args
, **kwargs
):
5776 DrawPoint(self, int x, int y)
5778 Draws a point using the current pen.
5780 return _gdi_
.PseudoDC_DrawPoint(*args
, **kwargs
)
5782 def DrawPointPoint(*args
, **kwargs
):
5784 DrawPointPoint(self, Point pt)
5786 Draws a point using the current pen.
5788 return _gdi_
.PseudoDC_DrawPointPoint(*args
, **kwargs
)
5790 def DrawRectangle(*args
, **kwargs
):
5792 DrawRectangle(self, int x, int y, int width, int height)
5794 Draws a rectangle with the given top left corner, and with the given
5795 size. The current pen is used for the outline and the current brush
5796 for filling the shape.
5798 return _gdi_
.PseudoDC_DrawRectangle(*args
, **kwargs
)
5800 def DrawRectangleRect(*args
, **kwargs
):
5802 DrawRectangleRect(self, Rect rect)
5804 Draws a rectangle with the given top left corner, and with the given
5805 size. The current pen is used for the outline and the current brush
5806 for filling the shape.
5808 return _gdi_
.PseudoDC_DrawRectangleRect(*args
, **kwargs
)
5810 def DrawRectanglePointSize(*args
, **kwargs
):
5812 DrawRectanglePointSize(self, Point pt, Size sz)
5814 Draws a rectangle with the given top left corner, and with the given
5815 size. The current pen is used for the outline and the current brush
5816 for filling the shape.
5818 return _gdi_
.PseudoDC_DrawRectanglePointSize(*args
, **kwargs
)
5820 def DrawRoundedRectangle(*args
, **kwargs
):
5822 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
5824 Draws a rectangle with the given top left corner, and with the given
5825 size. The corners are quarter-circles using the given radius. The
5826 current pen is used for the outline and the current brush for filling
5829 If radius is positive, the value is assumed to be the radius of the
5830 rounded corner. If radius is negative, the absolute value is assumed
5831 to be the proportion of the smallest dimension of the rectangle. This
5832 means that the corner can be a sensible size relative to the size of
5833 the rectangle, and also avoids the strange effects X produces when the
5834 corners are too big for the rectangle.
5836 return _gdi_
.PseudoDC_DrawRoundedRectangle(*args
, **kwargs
)
5838 def DrawRoundedRectangleRect(*args
, **kwargs
):
5840 DrawRoundedRectangleRect(self, Rect r, double radius)
5842 Draws a rectangle with the given top left corner, and with the given
5843 size. The corners are quarter-circles using the given radius. The
5844 current pen is used for the outline and the current brush for filling
5847 If radius is positive, the value is assumed to be the radius of the
5848 rounded corner. If radius is negative, the absolute value is assumed
5849 to be the proportion of the smallest dimension of the rectangle. This
5850 means that the corner can be a sensible size relative to the size of
5851 the rectangle, and also avoids the strange effects X produces when the
5852 corners are too big for the rectangle.
5854 return _gdi_
.PseudoDC_DrawRoundedRectangleRect(*args
, **kwargs
)
5856 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
5858 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
5860 Draws a rectangle with the given top left corner, and with the given
5861 size. The corners are quarter-circles using the given radius. The
5862 current pen is used for the outline and the current brush for filling
5865 If radius is positive, the value is assumed to be the radius of the
5866 rounded corner. If radius is negative, the absolute value is assumed
5867 to be the proportion of the smallest dimension of the rectangle. This
5868 means that the corner can be a sensible size relative to the size of
5869 the rectangle, and also avoids the strange effects X produces when the
5870 corners are too big for the rectangle.
5872 return _gdi_
.PseudoDC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
5874 def DrawCircle(*args
, **kwargs
):
5876 DrawCircle(self, int x, int y, int radius)
5878 Draws a circle with the given center point and radius. The current
5879 pen is used for the outline and the current brush for filling the
5882 return _gdi_
.PseudoDC_DrawCircle(*args
, **kwargs
)
5884 def DrawCirclePoint(*args
, **kwargs
):
5886 DrawCirclePoint(self, Point pt, int radius)
5888 Draws a circle with the given center point and radius. The current
5889 pen is used for the outline and the current brush for filling the
5892 return _gdi_
.PseudoDC_DrawCirclePoint(*args
, **kwargs
)
5894 def DrawEllipse(*args
, **kwargs
):
5896 DrawEllipse(self, int x, int y, int width, int height)
5898 Draws an ellipse contained in the specified rectangle. The current pen
5899 is used for the outline and the current brush for filling the shape.
5901 return _gdi_
.PseudoDC_DrawEllipse(*args
, **kwargs
)
5903 def DrawEllipseRect(*args
, **kwargs
):
5905 DrawEllipseRect(self, Rect rect)
5907 Draws an ellipse contained in the specified rectangle. The current pen
5908 is used for the outline and the current brush for filling the shape.
5910 return _gdi_
.PseudoDC_DrawEllipseRect(*args
, **kwargs
)
5912 def DrawEllipsePointSize(*args
, **kwargs
):
5914 DrawEllipsePointSize(self, Point pt, Size sz)
5916 Draws an ellipse contained in the specified rectangle. The current pen
5917 is used for the outline and the current brush for filling the shape.
5919 return _gdi_
.PseudoDC_DrawEllipsePointSize(*args
, **kwargs
)
5921 def DrawIcon(*args
, **kwargs
):
5923 DrawIcon(self, Icon icon, int x, int y)
5925 Draw an icon on the display (does nothing if the device context is
5926 PostScript). This can be the simplest way of drawing bitmaps on a
5929 return _gdi_
.PseudoDC_DrawIcon(*args
, **kwargs
)
5931 def DrawIconPoint(*args
, **kwargs
):
5933 DrawIconPoint(self, Icon icon, Point pt)
5935 Draw an icon on the display (does nothing if the device context is
5936 PostScript). This can be the simplest way of drawing bitmaps on a
5939 return _gdi_
.PseudoDC_DrawIconPoint(*args
, **kwargs
)
5941 def DrawBitmap(*args
, **kwargs
):
5943 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
5945 Draw a bitmap on the device context at the specified point. If
5946 *transparent* is true and the bitmap has a transparency mask, (or
5947 alpha channel on the platforms that support it) then the bitmap will
5948 be drawn transparently.
5950 return _gdi_
.PseudoDC_DrawBitmap(*args
, **kwargs
)
5952 def DrawBitmapPoint(*args
, **kwargs
):
5954 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
5956 Draw a bitmap on the device context at the specified point. If
5957 *transparent* is true and the bitmap has a transparency mask, (or
5958 alpha channel on the platforms that support it) then the bitmap will
5959 be drawn transparently.
5961 return _gdi_
.PseudoDC_DrawBitmapPoint(*args
, **kwargs
)
5963 def DrawText(*args
, **kwargs
):
5965 DrawText(self, String text, int x, int y)
5967 Draws a text string at the specified point, using the current text
5968 font, and the current text foreground and background colours.
5970 The coordinates refer to the top-left corner of the rectangle bounding
5971 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
5972 a text string, which can be used to position the text more precisely,
5973 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
5976 **NOTE**: under wxGTK the current logical function is used by this
5977 function but it is ignored by wxMSW. Thus, you should avoid using
5978 logical functions with this function in portable programs.
5980 return _gdi_
.PseudoDC_DrawText(*args
, **kwargs
)
5982 def DrawTextPoint(*args
, **kwargs
):
5984 DrawTextPoint(self, String text, Point pt)
5986 Draws a text string at the specified point, using the current text
5987 font, and the current text foreground and background colours.
5989 The coordinates refer to the top-left corner of the rectangle bounding
5990 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
5991 a text string, which can be used to position the text more precisely,
5992 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
5995 **NOTE**: under wxGTK the current logical function is used by this
5996 function but it is ignored by wxMSW. Thus, you should avoid using
5997 logical functions with this function in portable programs.
5999 return _gdi_
.PseudoDC_DrawTextPoint(*args
, **kwargs
)
6001 def DrawRotatedText(*args
, **kwargs
):
6003 DrawRotatedText(self, String text, int x, int y, double angle)
6005 Draws the text rotated by *angle* degrees, if supported by the platform.
6007 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6008 function. In particular, a font different from ``wx.NORMAL_FONT``
6009 should be used as the it is not normally a TrueType
6010 font. ``wx.SWISS_FONT`` is an example of a font which is.
6012 return _gdi_
.PseudoDC_DrawRotatedText(*args
, **kwargs
)
6014 def DrawRotatedTextPoint(*args
, **kwargs
):
6016 DrawRotatedTextPoint(self, String text, Point pt, double angle)
6018 Draws the text rotated by *angle* degrees, if supported by the platform.
6020 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6021 function. In particular, a font different from ``wx.NORMAL_FONT``
6022 should be used as the it is not normally a TrueType
6023 font. ``wx.SWISS_FONT`` is an example of a font which is.
6025 return _gdi_
.PseudoDC_DrawRotatedTextPoint(*args
, **kwargs
)
6027 def DrawLines(*args
, **kwargs
):
6029 DrawLines(self, List points, int xoffset=0, int yoffset=0)
6031 Draws lines using a sequence of `wx.Point` objects, adding the
6032 optional offset coordinate. The current pen is used for drawing the
6035 return _gdi_
.PseudoDC_DrawLines(*args
, **kwargs
)
6037 def DrawPolygon(*args
, **kwargs
):
6039 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
6040 int fillStyle=ODDEVEN_RULE)
6042 Draws a filled polygon using a sequence of `wx.Point` objects, adding
6043 the optional offset coordinate. The last argument specifies the fill
6044 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
6046 The current pen is used for drawing the outline, and the current brush
6047 for filling the shape. Using a transparent brush suppresses
6048 filling. Note that wxWidgets automatically closes the first and last
6051 return _gdi_
.PseudoDC_DrawPolygon(*args
, **kwargs
)
6053 def DrawLabel(*args
, **kwargs
):
6055 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6058 Draw *text* within the specified rectangle, abiding by the alignment
6059 flags. Will additionally emphasize the character at *indexAccel* if
6062 return _gdi_
.PseudoDC_DrawLabel(*args
, **kwargs
)
6064 def DrawImageLabel(*args
, **kwargs
):
6066 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6069 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
6070 drawing it) within the specified rectangle, abiding by the alignment
6071 flags. Will additionally emphasize the character at *indexAccel* if
6074 return _gdi_
.PseudoDC_DrawImageLabel(*args
, **kwargs
)
6076 def DrawSpline(*args
, **kwargs
):
6078 DrawSpline(self, List points)
6080 Draws a spline between all given control points, (a list of `wx.Point`
6081 objects) using the current pen. The spline is drawn using a series of
6082 lines, using an algorithm taken from the X drawing program 'XFIG'.
6084 return _gdi_
.PseudoDC_DrawSpline(*args
, **kwargs
)
6086 def Clear(*args
, **kwargs
):
6090 Clears the device context using the current background brush.
6092 return _gdi_
.PseudoDC_Clear(*args
, **kwargs
)
6094 def SetFont(*args
, **kwargs
):
6096 SetFont(self, Font font)
6098 Sets the current font for the DC. It must be a valid font, in
6099 particular you should not pass ``wx.NullFont`` to this method.
6101 return _gdi_
.PseudoDC_SetFont(*args
, **kwargs
)
6103 def SetPen(*args
, **kwargs
):
6105 SetPen(self, Pen pen)
6107 Sets the current pen for the DC.
6109 If the argument is ``wx.NullPen``, the current pen is selected out of the
6110 device context, and the original pen restored.
6112 return _gdi_
.PseudoDC_SetPen(*args
, **kwargs
)
6114 def SetBrush(*args
, **kwargs
):
6116 SetBrush(self, Brush brush)
6118 Sets the current brush for the DC.
6120 If the argument is ``wx.NullBrush``, the current brush is selected out
6121 of the device context, and the original brush restored, allowing the
6122 current brush to be destroyed safely.
6124 return _gdi_
.PseudoDC_SetBrush(*args
, **kwargs
)
6126 def SetBackground(*args
, **kwargs
):
6128 SetBackground(self, Brush brush)
6130 Sets the current background brush for the DC.
6132 return _gdi_
.PseudoDC_SetBackground(*args
, **kwargs
)
6134 def SetBackgroundMode(*args
, **kwargs
):
6136 SetBackgroundMode(self, int mode)
6138 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
6139 determines whether text will be drawn with a background colour or
6142 return _gdi_
.PseudoDC_SetBackgroundMode(*args
, **kwargs
)
6144 def SetPalette(*args
, **kwargs
):
6146 SetPalette(self, Palette palette)
6148 If this is a window DC or memory DC, assigns the given palette to the
6149 window or bitmap associated with the DC. If the argument is
6150 ``wx.NullPalette``, the current palette is selected out of the device
6151 context, and the original palette restored.
6153 return _gdi_
.PseudoDC_SetPalette(*args
, **kwargs
)
6155 def SetTextForeground(*args
, **kwargs
):
6157 SetTextForeground(self, Colour colour)
6159 Sets the current text foreground colour for the DC.
6161 return _gdi_
.PseudoDC_SetTextForeground(*args
, **kwargs
)
6163 def SetTextBackground(*args
, **kwargs
):
6165 SetTextBackground(self, Colour colour)
6167 Sets the current text background colour for the DC.
6169 return _gdi_
.PseudoDC_SetTextBackground(*args
, **kwargs
)
6171 def SetLogicalFunction(*args
, **kwargs
):
6173 SetLogicalFunction(self, int function)
6175 Sets the current logical function for the device context. This
6176 determines how a source pixel (from a pen or brush colour, combines
6177 with a destination pixel in the current device context.
6179 The possible values and their meaning in terms of source and
6180 destination pixel values are as follows:
6182 ================ ==========================
6184 wx.AND_INVERT (NOT src) AND dst
6185 wx.AND_REVERSE src AND (NOT dst)
6188 wx.EQUIV (NOT src) XOR dst
6190 wx.NAND (NOT src) OR (NOT dst)
6191 wx.NOR (NOT src) AND (NOT dst)
6194 wx.OR_INVERT (NOT src) OR dst
6195 wx.OR_REVERSE src OR (NOT dst)
6197 wx.SRC_INVERT NOT src
6199 ================ ==========================
6201 The default is wx.COPY, which simply draws with the current
6202 colour. The others combine the current colour and the background using
6203 a logical operation. wx.INVERT is commonly used for drawing rubber
6204 bands or moving outlines, since drawing twice reverts to the original
6208 return _gdi_
.PseudoDC_SetLogicalFunction(*args
, **kwargs
)
6210 _gdi_
.PseudoDC_swigregister(PseudoDC
)