1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
6 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
8 if isinstance(value
, class_type
):
9 self
.__dict
__[name
] = value
.this
10 if hasattr(value
,"thisown"): self
.__dict
__["thisown"] = value
.thisown
13 method
= class_type
.__swig
_setmethods
__.get(name
,None)
14 if method
: return method(self
,value
)
15 if (not static
) or hasattr(self
,name
) or (name
== "thisown"):
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 method
= class_type
.__swig
_getmethods
__.get(name
,None)
25 if method
: return method(self
)
26 raise AttributeError,name
30 _object
= types
.ObjectType
32 except AttributeError:
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self
,name
,value
):
40 if hasattr(self
,name
) or (name
in ("this", "thisown")):
43 raise AttributeError("You cannot add attributes to %s" % self
)
49 #---------------------------------------------------------------------------
51 class GDIObject(_core
.Object
):
52 """Proxy of C++ GDIObject class"""
54 return "<%s.%s; proxy of C++ wxGDIObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
55 def __init__(self
, *args
, **kwargs
):
56 """__init__(self) -> GDIObject"""
57 newobj
= _gdi_
.new_GDIObject(*args
, **kwargs
)
58 self
.this
= newobj
.this
61 def __del__(self
, destroy
=_gdi_
.delete_GDIObject
):
64 if self
.thisown
: destroy(self
)
67 def GetVisible(*args
, **kwargs
):
68 """GetVisible(self) -> bool"""
69 return _gdi_
.GDIObject_GetVisible(*args
, **kwargs
)
71 def SetVisible(*args
, **kwargs
):
72 """SetVisible(self, bool visible)"""
73 return _gdi_
.GDIObject_SetVisible(*args
, **kwargs
)
75 def IsNull(*args
, **kwargs
):
76 """IsNull(self) -> bool"""
77 return _gdi_
.GDIObject_IsNull(*args
, **kwargs
)
80 class GDIObjectPtr(GDIObject
):
81 def __init__(self
, this
):
83 if not hasattr(self
,"thisown"): self
.thisown
= 0
84 self
.__class
__ = GDIObject
85 _gdi_
.GDIObject_swigregister(GDIObjectPtr
)
87 #---------------------------------------------------------------------------
89 class Colour(_core
.Object
):
91 A colour is an object representing a combination of Red, Green, and
92 Blue (RGB) intensity values, and is used to determine drawing colours,
93 window colours, etc. Valid RGB values are in the range 0 to 255.
95 In wxPython there are typemaps that will automatically convert from a
96 colour name, or from a '#RRGGBB' colour hex value string to a
97 wx.Colour object when calling C++ methods that expect a wxColour.
98 This means that the following are all equivallent::
100 win.SetBackgroundColour(wxColour(0,0,255))
101 win.SetBackgroundColour('BLUE')
102 win.SetBackgroundColour('#0000FF')
104 Additional colour names and their coresponding values can be added
105 using `wx.ColourDatabase`. Various system colours (as set in the
106 user's system preferences) can be retrieved with
107 `wx.SystemSettings.GetColour`.
111 return "<%s.%s; proxy of C++ wxColour instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
112 def __init__(self
, *args
, **kwargs
):
114 __init__(self, byte red=0, byte green=0, byte blue=0) -> Colour
116 Constructs a colour from red, green and blue values.
118 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
121 newobj
= _gdi_
.new_Colour(*args
, **kwargs
)
122 self
.this
= newobj
.this
125 def __del__(self
, destroy
=_gdi_
.delete_Colour
):
128 if self
.thisown
: destroy(self
)
131 def Red(*args
, **kwargs
):
135 Returns the red intensity.
137 return _gdi_
.Colour_Red(*args
, **kwargs
)
139 def Green(*args
, **kwargs
):
143 Returns the green intensity.
145 return _gdi_
.Colour_Green(*args
, **kwargs
)
147 def Blue(*args
, **kwargs
):
151 Returns the blue intensity.
153 return _gdi_
.Colour_Blue(*args
, **kwargs
)
155 def Ok(*args
, **kwargs
):
159 Returns True if the colour object is valid (the colour has been
160 initialised with RGB values).
162 return _gdi_
.Colour_Ok(*args
, **kwargs
)
164 def Set(*args
, **kwargs
):
166 Set(self, byte red, byte green, byte blue)
168 Sets the RGB intensity values.
170 return _gdi_
.Colour_Set(*args
, **kwargs
)
172 def SetRGB(*args
, **kwargs
):
174 SetRGB(self, unsigned long colRGB)
176 Sets the RGB intensity values from a packed RGB value.
178 return _gdi_
.Colour_SetRGB(*args
, **kwargs
)
180 def SetFromName(*args
, **kwargs
):
182 SetFromName(self, String colourName)
184 Sets the RGB intensity values using a colour name listed in
185 ``wx.TheColourDatabase``.
187 return _gdi_
.Colour_SetFromName(*args
, **kwargs
)
189 def GetPixel(*args
, **kwargs
):
191 GetPixel(self) -> long
193 Returns a pixel value which is platform-dependent. On Windows, a
194 COLORREF is returned. On X, an allocated pixel value is returned. -1
195 is returned if the pixel is invalid (on X, unallocated).
197 return _gdi_
.Colour_GetPixel(*args
, **kwargs
)
199 def __eq__(*args
, **kwargs
):
201 __eq__(self, Colour colour) -> bool
203 Compare colours for equality
205 return _gdi_
.Colour___eq__(*args
, **kwargs
)
207 def __ne__(*args
, **kwargs
):
209 __ne__(self, Colour colour) -> bool
211 Compare colours for inequality
213 return _gdi_
.Colour___ne__(*args
, **kwargs
)
215 def Get(*args
, **kwargs
):
219 Returns the RGB intensity values as a tuple.
221 return _gdi_
.Colour_Get(*args
, **kwargs
)
223 def GetRGB(*args
, **kwargs
):
225 GetRGB(self) -> unsigned long
227 Return the colour as a packed RGB value
229 return _gdi_
.Colour_GetRGB(*args
, **kwargs
)
231 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
232 def __str__(self
): return str(self
.Get())
233 def __repr__(self
): return 'wx.Colour' + str(self
.Get())
234 def __nonzero__(self
): return self
.Ok()
235 __safe_for_unpickling__
= True
236 def __reduce__(self
): return (Colour
, self
.Get())
239 class ColourPtr(Colour
):
240 def __init__(self
, this
):
242 if not hasattr(self
,"thisown"): self
.thisown
= 0
243 self
.__class
__ = Colour
244 _gdi_
.Colour_swigregister(ColourPtr
)
246 def NamedColour(*args
, **kwargs
):
248 NamedColour(String colorName) -> Colour
250 Constructs a colour object using a colour name listed in
251 ``wx.TheColourDatabase``.
253 val
= _gdi_
.new_NamedColour(*args
, **kwargs
)
257 def ColourRGB(*args
, **kwargs
):
259 ColourRGB(unsigned long colRGB) -> Colour
261 Constructs a colour from a packed RGB value.
263 val
= _gdi_
.new_ColourRGB(*args
, **kwargs
)
268 NamedColor
= NamedColour
271 class Palette(GDIObject
):
272 """Proxy of C++ Palette class"""
274 return "<%s.%s; proxy of C++ wxPalette instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
275 def __init__(self
, *args
, **kwargs
):
276 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
277 newobj
= _gdi_
.new_Palette(*args
, **kwargs
)
278 self
.this
= newobj
.this
281 def __del__(self
, destroy
=_gdi_
.delete_Palette
):
284 if self
.thisown
: destroy(self
)
287 def GetPixel(*args
, **kwargs
):
288 """GetPixel(self, byte red, byte green, byte blue) -> int"""
289 return _gdi_
.Palette_GetPixel(*args
, **kwargs
)
291 def GetRGB(*args
, **kwargs
):
292 """GetRGB(self, int pixel) -> (R,G,B)"""
293 return _gdi_
.Palette_GetRGB(*args
, **kwargs
)
295 def GetColoursCount(*args
, **kwargs
):
296 """GetColoursCount(self) -> int"""
297 return _gdi_
.Palette_GetColoursCount(*args
, **kwargs
)
299 def Ok(*args
, **kwargs
):
300 """Ok(self) -> bool"""
301 return _gdi_
.Palette_Ok(*args
, **kwargs
)
303 def __nonzero__(self
): return self
.Ok()
305 class PalettePtr(Palette
):
306 def __init__(self
, this
):
308 if not hasattr(self
,"thisown"): self
.thisown
= 0
309 self
.__class
__ = Palette
310 _gdi_
.Palette_swigregister(PalettePtr
)
312 #---------------------------------------------------------------------------
314 class Pen(GDIObject
):
315 """Proxy of C++ Pen class"""
317 return "<%s.%s; proxy of C++ wxPen instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
318 def __init__(self
, *args
, **kwargs
):
319 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
320 newobj
= _gdi_
.new_Pen(*args
, **kwargs
)
321 self
.this
= newobj
.this
324 def __del__(self
, destroy
=_gdi_
.delete_Pen
):
327 if self
.thisown
: destroy(self
)
330 def GetCap(*args
, **kwargs
):
331 """GetCap(self) -> int"""
332 return _gdi_
.Pen_GetCap(*args
, **kwargs
)
334 def GetColour(*args
, **kwargs
):
335 """GetColour(self) -> Colour"""
336 return _gdi_
.Pen_GetColour(*args
, **kwargs
)
338 def GetJoin(*args
, **kwargs
):
339 """GetJoin(self) -> int"""
340 return _gdi_
.Pen_GetJoin(*args
, **kwargs
)
342 def GetStyle(*args
, **kwargs
):
343 """GetStyle(self) -> int"""
344 return _gdi_
.Pen_GetStyle(*args
, **kwargs
)
346 def GetWidth(*args
, **kwargs
):
347 """GetWidth(self) -> int"""
348 return _gdi_
.Pen_GetWidth(*args
, **kwargs
)
350 def Ok(*args
, **kwargs
):
351 """Ok(self) -> bool"""
352 return _gdi_
.Pen_Ok(*args
, **kwargs
)
354 def SetCap(*args
, **kwargs
):
355 """SetCap(self, int cap_style)"""
356 return _gdi_
.Pen_SetCap(*args
, **kwargs
)
358 def SetColour(*args
, **kwargs
):
359 """SetColour(self, Colour colour)"""
360 return _gdi_
.Pen_SetColour(*args
, **kwargs
)
362 def SetJoin(*args
, **kwargs
):
363 """SetJoin(self, int join_style)"""
364 return _gdi_
.Pen_SetJoin(*args
, **kwargs
)
366 def SetStyle(*args
, **kwargs
):
367 """SetStyle(self, int style)"""
368 return _gdi_
.Pen_SetStyle(*args
, **kwargs
)
370 def SetWidth(*args
, **kwargs
):
371 """SetWidth(self, int width)"""
372 return _gdi_
.Pen_SetWidth(*args
, **kwargs
)
374 def SetDashes(*args
, **kwargs
):
375 """SetDashes(self, int dashes)"""
376 return _gdi_
.Pen_SetDashes(*args
, **kwargs
)
378 def GetDashes(*args
, **kwargs
):
379 """GetDashes(self) -> PyObject"""
380 return _gdi_
.Pen_GetDashes(*args
, **kwargs
)
382 def _SetDashes(*args
, **kwargs
):
383 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
384 return _gdi_
.Pen__SetDashes(*args
, **kwargs
)
386 def SetDashes(self
, dashes
):
388 Associate a list of dash lengths with the Pen.
390 self
._SetDashes
(self
, dashes
)
392 def GetDashCount(*args
, **kwargs
):
393 """GetDashCount(self) -> int"""
394 return _gdi_
.Pen_GetDashCount(*args
, **kwargs
)
396 def __eq__(*args
, **kwargs
):
397 """__eq__(self, Pen other) -> bool"""
398 return _gdi_
.Pen___eq__(*args
, **kwargs
)
400 def __ne__(*args
, **kwargs
):
401 """__ne__(self, Pen other) -> bool"""
402 return _gdi_
.Pen___ne__(*args
, **kwargs
)
404 def __nonzero__(self
): return self
.Ok()
407 def __init__(self
, this
):
409 if not hasattr(self
,"thisown"): self
.thisown
= 0
411 _gdi_
.Pen_swigregister(PenPtr
)
413 #---------------------------------------------------------------------------
415 class Brush(GDIObject
):
417 A brush is a drawing tool for filling in areas. It is used for
418 painting the background of rectangles, ellipses, etc. when drawing on
419 a `wx.DC`. It has a colour and a style.
422 return "<%s.%s; proxy of C++ wxBrush instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
423 def __init__(self
, *args
, **kwargs
):
425 __init__(self, Colour colour, int style=SOLID) -> Brush
427 Constructs a brush from a `wx.Colour` object and a style.
429 newobj
= _gdi_
.new_Brush(*args
, **kwargs
)
430 self
.this
= newobj
.this
433 def __del__(self
, destroy
=_gdi_
.delete_Brush
):
436 if self
.thisown
: destroy(self
)
439 def SetColour(*args
, **kwargs
):
441 SetColour(self, Colour col)
443 Set the brush's `wx.Colour`.
445 return _gdi_
.Brush_SetColour(*args
, **kwargs
)
447 def SetStyle(*args
, **kwargs
):
449 SetStyle(self, int style)
451 Sets the style of the brush. See `__init__` for a listing of styles.
453 return _gdi_
.Brush_SetStyle(*args
, **kwargs
)
455 def SetStipple(*args
, **kwargs
):
457 SetStipple(self, Bitmap stipple)
459 Sets the stipple `wx.Bitmap`.
461 return _gdi_
.Brush_SetStipple(*args
, **kwargs
)
463 def GetColour(*args
, **kwargs
):
465 GetColour(self) -> Colour
467 Returns the `wx.Colour` of the brush.
469 return _gdi_
.Brush_GetColour(*args
, **kwargs
)
471 def GetStyle(*args
, **kwargs
):
473 GetStyle(self) -> int
475 Returns the style of the brush. See `__init__` for a listing of
478 return _gdi_
.Brush_GetStyle(*args
, **kwargs
)
480 def GetStipple(*args
, **kwargs
):
482 GetStipple(self) -> Bitmap
484 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
485 have a wx.STIPPLE style, then the return value may be non-None but an
486 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
488 return _gdi_
.Brush_GetStipple(*args
, **kwargs
)
490 def IsHatch(*args
, **kwargs
):
492 IsHatch(self) -> bool
494 Is the current style a hatch type?
496 return _gdi_
.Brush_IsHatch(*args
, **kwargs
)
498 def Ok(*args
, **kwargs
):
502 Returns True if the brush is initialised and valid.
504 return _gdi_
.Brush_Ok(*args
, **kwargs
)
506 def __nonzero__(self
): return self
.Ok()
508 class BrushPtr(Brush
):
509 def __init__(self
, this
):
511 if not hasattr(self
,"thisown"): self
.thisown
= 0
512 self
.__class
__ = Brush
513 _gdi_
.Brush_swigregister(BrushPtr
)
515 class Bitmap(GDIObject
):
517 The wx.Bitmap class encapsulates the concept of a platform-dependent
518 bitmap. It can be either monochrome or colour, and either loaded from
519 a file or created dynamically. A bitmap can be selected into a memory
520 device context (instance of `wx.MemoryDC`). This enables the bitmap to
521 be copied to a window or memory device context using `wx.DC.Blit`, or
522 to be used as a drawing surface.
525 return "<%s.%s; proxy of C++ wxBitmap instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
526 def __init__(self
, *args
, **kwargs
):
528 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
530 Loads a bitmap from a file.
532 newobj
= _gdi_
.new_Bitmap(*args
, **kwargs
)
533 self
.this
= newobj
.this
536 def __del__(self
, destroy
=_gdi_
.delete_Bitmap
):
539 if self
.thisown
: destroy(self
)
542 def Ok(*args
, **kwargs
):
543 """Ok(self) -> bool"""
544 return _gdi_
.Bitmap_Ok(*args
, **kwargs
)
546 def GetWidth(*args
, **kwargs
):
548 GetWidth(self) -> int
550 Gets the width of the bitmap in pixels.
552 return _gdi_
.Bitmap_GetWidth(*args
, **kwargs
)
554 def GetHeight(*args
, **kwargs
):
556 GetHeight(self) -> int
558 Gets the height of the bitmap in pixels.
560 return _gdi_
.Bitmap_GetHeight(*args
, **kwargs
)
562 def GetDepth(*args
, **kwargs
):
564 GetDepth(self) -> int
566 Gets the colour depth of the bitmap. A value of 1 indicates a
569 return _gdi_
.Bitmap_GetDepth(*args
, **kwargs
)
571 def GetSize(*args
, **kwargs
):
573 GetSize(self) -> Size
575 Get the size of the bitmap.
577 return _gdi_
.Bitmap_GetSize(*args
, **kwargs
)
579 def ConvertToImage(*args
, **kwargs
):
581 ConvertToImage(self) -> Image
583 Creates a platform-independent image from a platform-dependent
584 bitmap. This preserves mask information so that bitmaps and images can
585 be converted back and forth without loss in that respect.
587 return _gdi_
.Bitmap_ConvertToImage(*args
, **kwargs
)
589 def GetMask(*args
, **kwargs
):
591 GetMask(self) -> Mask
593 Gets the associated mask (if any) which may have been loaded from a
594 file or explpicitly set for the bitmap.
596 :see: `SetMask`, `wx.Mask`
599 return _gdi_
.Bitmap_GetMask(*args
, **kwargs
)
601 def SetMask(*args
, **kwargs
):
603 SetMask(self, Mask mask)
605 Sets the mask for this bitmap.
607 :see: `GetMask`, `wx.Mask`
610 return _gdi_
.Bitmap_SetMask(*args
, **kwargs
)
612 def SetMaskColour(*args
, **kwargs
):
614 SetMaskColour(self, Colour colour)
616 Create a Mask based on a specified colour in the Bitmap.
618 return _gdi_
.Bitmap_SetMaskColour(*args
, **kwargs
)
620 def GetSubBitmap(*args
, **kwargs
):
622 GetSubBitmap(self, Rect rect) -> Bitmap
624 Returns a sub-bitmap of the current one as long as the rect belongs
625 entirely to the bitmap. This function preserves bit depth and mask
628 return _gdi_
.Bitmap_GetSubBitmap(*args
, **kwargs
)
630 def SaveFile(*args
, **kwargs
):
632 SaveFile(self, String name, int type, Palette palette=None) -> bool
634 Saves a bitmap in the named file. See `__init__` for a description of
635 the ``type`` parameter.
637 return _gdi_
.Bitmap_SaveFile(*args
, **kwargs
)
639 def LoadFile(*args
, **kwargs
):
641 LoadFile(self, String name, int type) -> bool
643 Loads a bitmap from a file. See `__init__` for a description of the
646 return _gdi_
.Bitmap_LoadFile(*args
, **kwargs
)
648 def GetPalette(*args
, **kwargs
):
649 """GetPalette(self) -> Palette"""
650 return _gdi_
.Bitmap_GetPalette(*args
, **kwargs
)
652 def CopyFromIcon(*args
, **kwargs
):
653 """CopyFromIcon(self, Icon icon) -> bool"""
654 return _gdi_
.Bitmap_CopyFromIcon(*args
, **kwargs
)
656 def SetHeight(*args
, **kwargs
):
658 SetHeight(self, int height)
660 Set the height property (does not affect the existing bitmap data).
662 return _gdi_
.Bitmap_SetHeight(*args
, **kwargs
)
664 def SetWidth(*args
, **kwargs
):
666 SetWidth(self, int width)
668 Set the width property (does not affect the existing bitmap data).
670 return _gdi_
.Bitmap_SetWidth(*args
, **kwargs
)
672 def SetDepth(*args
, **kwargs
):
674 SetDepth(self, int depth)
676 Set the depth property (does not affect the existing bitmap data).
678 return _gdi_
.Bitmap_SetDepth(*args
, **kwargs
)
680 def SetSize(*args
, **kwargs
):
682 SetSize(self, Size size)
684 Set the bitmap size (does not affect the existing bitmap data).
686 return _gdi_
.Bitmap_SetSize(*args
, **kwargs
)
688 def __nonzero__(self
): return self
.Ok()
689 def __eq__(*args
, **kwargs
):
690 """__eq__(self, Bitmap other) -> bool"""
691 return _gdi_
.Bitmap___eq__(*args
, **kwargs
)
693 def __ne__(*args
, **kwargs
):
694 """__ne__(self, Bitmap other) -> bool"""
695 return _gdi_
.Bitmap___ne__(*args
, **kwargs
)
698 class BitmapPtr(Bitmap
):
699 def __init__(self
, this
):
701 if not hasattr(self
,"thisown"): self
.thisown
= 0
702 self
.__class
__ = Bitmap
703 _gdi_
.Bitmap_swigregister(BitmapPtr
)
705 def EmptyBitmap(*args
, **kwargs
):
707 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
709 Creates a new bitmap of the given size. A depth of -1 indicates the
710 depth of the current screen or visual. Some platforms only support 1
711 for monochrome and -1 for the current colour setting.
713 val
= _gdi_
.new_EmptyBitmap(*args
, **kwargs
)
717 def BitmapFromIcon(*args
, **kwargs
):
719 BitmapFromIcon(Icon icon) -> Bitmap
721 Create a new bitmap from a `wx.Icon` object.
723 val
= _gdi_
.new_BitmapFromIcon(*args
, **kwargs
)
727 def BitmapFromImage(*args
, **kwargs
):
729 BitmapFromImage(Image image, int depth=-1) -> Bitmap
731 Creates bitmap object from a `wx.Image`. This has to be done to
732 actually display a `wx.Image` as you cannot draw an image directly on
733 a window. The resulting bitmap will use the provided colour depth (or
734 that of the current screen colour depth if depth is -1) which entails
735 that a colour reduction may have to take place.
737 val
= _gdi_
.new_BitmapFromImage(*args
, **kwargs
)
741 def BitmapFromXPMData(*args
, **kwargs
):
743 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
745 Construct a Bitmap from a list of strings formatted as XPM data.
747 val
= _gdi_
.new_BitmapFromXPMData(*args
, **kwargs
)
751 def BitmapFromBits(*args
, **kwargs
):
753 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
755 Creates a bitmap from an array of bits. You should only use this
756 function for monochrome bitmaps (depth 1) in portable programs: in
757 this case the bits parameter should contain an XBM image. For other
758 bit depths, the behaviour is platform dependent.
760 val
= _gdi_
.new_BitmapFromBits(*args
, **kwargs
)
764 class Mask(_core
.Object
):
766 This class encapsulates a monochrome mask bitmap, where the masked
767 area is black and the unmasked area is white. When associated with a
768 bitmap and drawn in a device context, the unmasked area of the bitmap
769 will be drawn, and the masked area will not be drawn.
771 A mask may be associated with a `wx.Bitmap`. It is used in
772 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
773 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
777 return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
778 def __init__(self
, *args
, **kwargs
):
780 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
782 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
783 that indicates the transparent portions of the mask. In other words,
784 the pixels in ``bitmap`` that match ``colour`` will be the transparent
785 portions of the mask. If no ``colour`` or an invalid ``colour`` is
786 passed then BLACK is used.
788 :see: `wx.Bitmap`, `wx.Colour`
790 newobj
= _gdi_
.new_Mask(*args
, **kwargs
)
791 self
.this
= newobj
.this
796 def __init__(self
, this
):
798 if not hasattr(self
,"thisown"): self
.thisown
= 0
799 self
.__class
__ = Mask
800 _gdi_
.Mask_swigregister(MaskPtr
)
802 MaskColour
= wx
._deprecated
(Mask
, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
803 class Icon(GDIObject
):
804 """Proxy of C++ Icon class"""
806 return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
807 def __init__(self
, *args
, **kwargs
):
808 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
809 newobj
= _gdi_
.new_Icon(*args
, **kwargs
)
810 self
.this
= newobj
.this
813 def __del__(self
, destroy
=_gdi_
.delete_Icon
):
816 if self
.thisown
: destroy(self
)
819 def LoadFile(*args
, **kwargs
):
820 """LoadFile(self, String name, int type) -> bool"""
821 return _gdi_
.Icon_LoadFile(*args
, **kwargs
)
823 def Ok(*args
, **kwargs
):
824 """Ok(self) -> bool"""
825 return _gdi_
.Icon_Ok(*args
, **kwargs
)
827 def GetWidth(*args
, **kwargs
):
828 """GetWidth(self) -> int"""
829 return _gdi_
.Icon_GetWidth(*args
, **kwargs
)
831 def GetHeight(*args
, **kwargs
):
832 """GetHeight(self) -> int"""
833 return _gdi_
.Icon_GetHeight(*args
, **kwargs
)
835 def GetDepth(*args
, **kwargs
):
836 """GetDepth(self) -> int"""
837 return _gdi_
.Icon_GetDepth(*args
, **kwargs
)
839 def SetWidth(*args
, **kwargs
):
840 """SetWidth(self, int w)"""
841 return _gdi_
.Icon_SetWidth(*args
, **kwargs
)
843 def SetHeight(*args
, **kwargs
):
844 """SetHeight(self, int h)"""
845 return _gdi_
.Icon_SetHeight(*args
, **kwargs
)
847 def SetDepth(*args
, **kwargs
):
848 """SetDepth(self, int d)"""
849 return _gdi_
.Icon_SetDepth(*args
, **kwargs
)
851 def CopyFromBitmap(*args
, **kwargs
):
852 """CopyFromBitmap(self, Bitmap bmp)"""
853 return _gdi_
.Icon_CopyFromBitmap(*args
, **kwargs
)
855 def __nonzero__(self
): return self
.Ok()
858 def __init__(self
, this
):
860 if not hasattr(self
,"thisown"): self
.thisown
= 0
861 self
.__class
__ = Icon
862 _gdi_
.Icon_swigregister(IconPtr
)
864 def EmptyIcon(*args
, **kwargs
):
865 """EmptyIcon() -> Icon"""
866 val
= _gdi_
.new_EmptyIcon(*args
, **kwargs
)
870 def IconFromLocation(*args
, **kwargs
):
871 """IconFromLocation(IconLocation loc) -> Icon"""
872 val
= _gdi_
.new_IconFromLocation(*args
, **kwargs
)
876 def IconFromBitmap(*args
, **kwargs
):
877 """IconFromBitmap(Bitmap bmp) -> Icon"""
878 val
= _gdi_
.new_IconFromBitmap(*args
, **kwargs
)
882 def IconFromXPMData(*args
, **kwargs
):
883 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
884 val
= _gdi_
.new_IconFromXPMData(*args
, **kwargs
)
888 class IconLocation(object):
889 """Proxy of C++ IconLocation class"""
891 return "<%s.%s; proxy of C++ wxIconLocation instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
892 def __init__(self
, *args
, **kwargs
):
893 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
894 newobj
= _gdi_
.new_IconLocation(*args
, **kwargs
)
895 self
.this
= newobj
.this
898 def __del__(self
, destroy
=_gdi_
.delete_IconLocation
):
901 if self
.thisown
: destroy(self
)
904 def IsOk(*args
, **kwargs
):
905 """IsOk(self) -> bool"""
906 return _gdi_
.IconLocation_IsOk(*args
, **kwargs
)
908 def __nonzero__(self
): return self
.Ok()
909 def SetFileName(*args
, **kwargs
):
910 """SetFileName(self, String filename)"""
911 return _gdi_
.IconLocation_SetFileName(*args
, **kwargs
)
913 def GetFileName(*args
, **kwargs
):
914 """GetFileName(self) -> String"""
915 return _gdi_
.IconLocation_GetFileName(*args
, **kwargs
)
917 def SetIndex(*args
, **kwargs
):
918 """SetIndex(self, int num)"""
919 return _gdi_
.IconLocation_SetIndex(*args
, **kwargs
)
921 def GetIndex(*args
, **kwargs
):
922 """GetIndex(self) -> int"""
923 return _gdi_
.IconLocation_GetIndex(*args
, **kwargs
)
926 class IconLocationPtr(IconLocation
):
927 def __init__(self
, this
):
929 if not hasattr(self
,"thisown"): self
.thisown
= 0
930 self
.__class
__ = IconLocation
931 _gdi_
.IconLocation_swigregister(IconLocationPtr
)
933 class IconBundle(object):
934 """Proxy of C++ IconBundle class"""
936 return "<%s.%s; proxy of C++ wxIconBundle instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
937 def __init__(self
, *args
, **kwargs
):
938 """__init__(self) -> IconBundle"""
939 newobj
= _gdi_
.new_IconBundle(*args
, **kwargs
)
940 self
.this
= newobj
.this
943 def __del__(self
, destroy
=_gdi_
.delete_IconBundle
):
946 if self
.thisown
: destroy(self
)
949 def AddIcon(*args
, **kwargs
):
950 """AddIcon(self, Icon icon)"""
951 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
953 def AddIconFromFile(*args
, **kwargs
):
954 """AddIconFromFile(self, String file, long type)"""
955 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
957 def GetIcon(*args
, **kwargs
):
958 """GetIcon(self, Size size) -> Icon"""
959 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
962 class IconBundlePtr(IconBundle
):
963 def __init__(self
, this
):
965 if not hasattr(self
,"thisown"): self
.thisown
= 0
966 self
.__class
__ = IconBundle
967 _gdi_
.IconBundle_swigregister(IconBundlePtr
)
969 def IconBundleFromFile(*args
, **kwargs
):
970 """IconBundleFromFile(String file, long type) -> IconBundle"""
971 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
975 def IconBundleFromIcon(*args
, **kwargs
):
976 """IconBundleFromIcon(Icon icon) -> IconBundle"""
977 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
981 class Cursor(GDIObject
):
983 A cursor is a small bitmap usually used for denoting where the mouse
984 pointer is, with a picture that might indicate the interpretation of a
987 A single cursor object may be used in many windows (any subwindow
988 type). The wxWindows convention is to set the cursor for a window, as
989 in X, rather than to set it globally as in MS Windows, although a
990 global `wx.SetCursor` function is also available for use on MS Windows.
994 return "<%s.%s; proxy of C++ wxCursor instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
995 def __init__(self
, *args
, **kwargs
):
997 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
999 Construct a Cursor from a file. Specify the type of file using
1000 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1003 newobj
= _gdi_
.new_Cursor(*args
, **kwargs
)
1004 self
.this
= newobj
.this
1007 def __del__(self
, destroy
=_gdi_
.delete_Cursor
):
1010 if self
.thisown
: destroy(self
)
1013 def Ok(*args
, **kwargs
):
1014 """Ok(self) -> bool"""
1015 return _gdi_
.Cursor_Ok(*args
, **kwargs
)
1017 def __nonzero__(self
): return self
.Ok()
1019 class CursorPtr(Cursor
):
1020 def __init__(self
, this
):
1022 if not hasattr(self
,"thisown"): self
.thisown
= 0
1023 self
.__class
__ = Cursor
1024 _gdi_
.Cursor_swigregister(CursorPtr
)
1026 def StockCursor(*args
, **kwargs
):
1028 StockCursor(int id) -> Cursor
1030 Create a cursor using one of the stock cursors. Note that not all
1031 stock cursors are available on all platforms.
1033 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
1037 def CursorFromImage(*args
, **kwargs
):
1039 CursorFromImage(Image image) -> Cursor
1041 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1042 for setting the transparent portions of the cursor.
1044 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
1048 #---------------------------------------------------------------------------
1050 OutRegion
= _gdi_
.OutRegion
1051 PartRegion
= _gdi_
.PartRegion
1052 InRegion
= _gdi_
.InRegion
1053 class Region(GDIObject
):
1054 """Proxy of C++ Region class"""
1056 return "<%s.%s; proxy of C++ wxRegion instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1057 def __init__(self
, *args
, **kwargs
):
1058 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1059 newobj
= _gdi_
.new_Region(*args
, **kwargs
)
1060 self
.this
= newobj
.this
1063 def __del__(self
, destroy
=_gdi_
.delete_Region
):
1066 if self
.thisown
: destroy(self
)
1069 def Clear(*args
, **kwargs
):
1071 return _gdi_
.Region_Clear(*args
, **kwargs
)
1073 def Offset(*args
, **kwargs
):
1074 """Offset(self, int x, int y) -> bool"""
1075 return _gdi_
.Region_Offset(*args
, **kwargs
)
1077 def Contains(*args
, **kwargs
):
1078 """Contains(self, int x, int y) -> int"""
1079 return _gdi_
.Region_Contains(*args
, **kwargs
)
1081 def ContainsPoint(*args
, **kwargs
):
1082 """ContainsPoint(self, Point pt) -> int"""
1083 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
1085 def ContainsRect(*args
, **kwargs
):
1086 """ContainsRect(self, Rect rect) -> int"""
1087 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
1089 def ContainsRectDim(*args
, **kwargs
):
1090 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1091 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
1093 def GetBox(*args
, **kwargs
):
1094 """GetBox(self) -> Rect"""
1095 return _gdi_
.Region_GetBox(*args
, **kwargs
)
1097 def Intersect(*args
, **kwargs
):
1098 """Intersect(self, int x, int y, int width, int height) -> bool"""
1099 return _gdi_
.Region_Intersect(*args
, **kwargs
)
1101 def IntersectRect(*args
, **kwargs
):
1102 """IntersectRect(self, Rect rect) -> bool"""
1103 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
1105 def IntersectRegion(*args
, **kwargs
):
1106 """IntersectRegion(self, Region region) -> bool"""
1107 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
1109 def IsEmpty(*args
, **kwargs
):
1110 """IsEmpty(self) -> bool"""
1111 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
1113 def Union(*args
, **kwargs
):
1114 """Union(self, int x, int y, int width, int height) -> bool"""
1115 return _gdi_
.Region_Union(*args
, **kwargs
)
1117 def UnionRect(*args
, **kwargs
):
1118 """UnionRect(self, Rect rect) -> bool"""
1119 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1121 def UnionRegion(*args
, **kwargs
):
1122 """UnionRegion(self, Region region) -> bool"""
1123 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1125 def Subtract(*args
, **kwargs
):
1126 """Subtract(self, int x, int y, int width, int height) -> bool"""
1127 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1129 def SubtractRect(*args
, **kwargs
):
1130 """SubtractRect(self, Rect rect) -> bool"""
1131 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1133 def SubtractRegion(*args
, **kwargs
):
1134 """SubtractRegion(self, Region region) -> bool"""
1135 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1137 def Xor(*args
, **kwargs
):
1138 """Xor(self, int x, int y, int width, int height) -> bool"""
1139 return _gdi_
.Region_Xor(*args
, **kwargs
)
1141 def XorRect(*args
, **kwargs
):
1142 """XorRect(self, Rect rect) -> bool"""
1143 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1145 def XorRegion(*args
, **kwargs
):
1146 """XorRegion(self, Region region) -> bool"""
1147 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1149 def ConvertToBitmap(*args
, **kwargs
):
1150 """ConvertToBitmap(self) -> Bitmap"""
1151 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1153 def UnionBitmap(*args
, **kwargs
):
1154 """UnionBitmap(self, Bitmap bmp) -> bool"""
1155 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1157 def UnionBitmapColour(*args
, **kwargs
):
1158 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1159 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1162 class RegionPtr(Region
):
1163 def __init__(self
, this
):
1165 if not hasattr(self
,"thisown"): self
.thisown
= 0
1166 self
.__class
__ = Region
1167 _gdi_
.Region_swigregister(RegionPtr
)
1169 def RegionFromBitmap(*args
, **kwargs
):
1170 """RegionFromBitmap(Bitmap bmp) -> Region"""
1171 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1175 def RegionFromBitmapColour(*args
, **kwargs
):
1176 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1177 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1181 def RegionFromPoints(*args
, **kwargs
):
1182 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1183 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1187 class RegionIterator(_core
.Object
):
1188 """Proxy of C++ RegionIterator class"""
1190 return "<%s.%s; proxy of C++ wxRegionIterator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1191 def __init__(self
, *args
, **kwargs
):
1192 """__init__(self, Region region) -> RegionIterator"""
1193 newobj
= _gdi_
.new_RegionIterator(*args
, **kwargs
)
1194 self
.this
= newobj
.this
1197 def __del__(self
, destroy
=_gdi_
.delete_RegionIterator
):
1200 if self
.thisown
: destroy(self
)
1203 def GetX(*args
, **kwargs
):
1204 """GetX(self) -> int"""
1205 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1207 def GetY(*args
, **kwargs
):
1208 """GetY(self) -> int"""
1209 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1211 def GetW(*args
, **kwargs
):
1212 """GetW(self) -> int"""
1213 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1215 def GetWidth(*args
, **kwargs
):
1216 """GetWidth(self) -> int"""
1217 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1219 def GetH(*args
, **kwargs
):
1220 """GetH(self) -> int"""
1221 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1223 def GetHeight(*args
, **kwargs
):
1224 """GetHeight(self) -> int"""
1225 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1227 def GetRect(*args
, **kwargs
):
1228 """GetRect(self) -> Rect"""
1229 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1231 def HaveRects(*args
, **kwargs
):
1232 """HaveRects(self) -> bool"""
1233 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1235 def Reset(*args
, **kwargs
):
1237 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1239 def Next(*args
, **kwargs
):
1241 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1243 def __nonzero__(*args
, **kwargs
):
1244 """__nonzero__(self) -> bool"""
1245 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1248 class RegionIteratorPtr(RegionIterator
):
1249 def __init__(self
, this
):
1251 if not hasattr(self
,"thisown"): self
.thisown
= 0
1252 self
.__class
__ = RegionIterator
1253 _gdi_
.RegionIterator_swigregister(RegionIteratorPtr
)
1255 #---------------------------------------------------------------------------
1257 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1258 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1259 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1260 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1261 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1262 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1263 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1264 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1265 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1266 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1267 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1268 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1269 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1270 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1271 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1272 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1273 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1274 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1275 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1276 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1277 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1278 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1279 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1280 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1281 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1282 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1283 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1284 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1285 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1286 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1287 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1288 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1289 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1290 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1291 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1292 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1293 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1294 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1295 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1296 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1297 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1298 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1299 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1300 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1301 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1302 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1303 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1304 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1305 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1306 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1307 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1308 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1309 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1310 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1311 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1312 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1313 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1314 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1315 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1316 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1317 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1318 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1319 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1320 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1321 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1322 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1323 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1324 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1325 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1326 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1327 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1328 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1329 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1330 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1331 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1332 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1333 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1334 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1335 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1336 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1337 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1338 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1339 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1340 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1341 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1342 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1343 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1344 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1345 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1346 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1347 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1348 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1349 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1350 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1351 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1352 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1353 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1354 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1355 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1356 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1357 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1358 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1359 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1360 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1361 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1362 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1363 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1364 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1365 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1366 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1367 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1368 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1369 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1370 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1371 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1372 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1373 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1374 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1375 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1376 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1377 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1378 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1379 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1380 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1381 #---------------------------------------------------------------------------
1383 class NativeFontInfo(object):
1384 """Proxy of C++ NativeFontInfo class"""
1386 return "<%s.%s; proxy of C++ wxNativeFontInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1387 def __init__(self
, *args
, **kwargs
):
1388 """__init__(self) -> NativeFontInfo"""
1389 newobj
= _gdi_
.new_NativeFontInfo(*args
, **kwargs
)
1390 self
.this
= newobj
.this
1393 def __del__(self
, destroy
=_gdi_
.delete_NativeFontInfo
):
1396 if self
.thisown
: destroy(self
)
1399 def Init(*args
, **kwargs
):
1401 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1403 def InitFromFont(*args
, **kwargs
):
1404 """InitFromFont(self, Font font)"""
1405 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1407 def GetPointSize(*args
, **kwargs
):
1408 """GetPointSize(self) -> int"""
1409 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1411 def GetStyle(*args
, **kwargs
):
1412 """GetStyle(self) -> int"""
1413 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1415 def GetWeight(*args
, **kwargs
):
1416 """GetWeight(self) -> int"""
1417 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1419 def GetUnderlined(*args
, **kwargs
):
1420 """GetUnderlined(self) -> bool"""
1421 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1423 def GetFaceName(*args
, **kwargs
):
1424 """GetFaceName(self) -> String"""
1425 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1427 def GetFamily(*args
, **kwargs
):
1428 """GetFamily(self) -> int"""
1429 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1431 def GetEncoding(*args
, **kwargs
):
1432 """GetEncoding(self) -> int"""
1433 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1435 def SetPointSize(*args
, **kwargs
):
1436 """SetPointSize(self, int pointsize)"""
1437 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1439 def SetStyle(*args
, **kwargs
):
1440 """SetStyle(self, int style)"""
1441 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1443 def SetWeight(*args
, **kwargs
):
1444 """SetWeight(self, int weight)"""
1445 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1447 def SetUnderlined(*args
, **kwargs
):
1448 """SetUnderlined(self, bool underlined)"""
1449 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1451 def SetFaceName(*args
, **kwargs
):
1452 """SetFaceName(self, String facename)"""
1453 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1455 def SetFamily(*args
, **kwargs
):
1456 """SetFamily(self, int family)"""
1457 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1459 def SetEncoding(*args
, **kwargs
):
1460 """SetEncoding(self, int encoding)"""
1461 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1463 def FromString(*args
, **kwargs
):
1464 """FromString(self, String s) -> bool"""
1465 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1467 def ToString(*args
, **kwargs
):
1468 """ToString(self) -> String"""
1469 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1471 def __str__(*args
, **kwargs
):
1472 """__str__(self) -> String"""
1473 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1475 def FromUserString(*args
, **kwargs
):
1476 """FromUserString(self, String s) -> bool"""
1477 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1479 def ToUserString(*args
, **kwargs
):
1480 """ToUserString(self) -> String"""
1481 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1484 class NativeFontInfoPtr(NativeFontInfo
):
1485 def __init__(self
, this
):
1487 if not hasattr(self
,"thisown"): self
.thisown
= 0
1488 self
.__class
__ = NativeFontInfo
1489 _gdi_
.NativeFontInfo_swigregister(NativeFontInfoPtr
)
1491 class NativeEncodingInfo(object):
1492 """Proxy of C++ NativeEncodingInfo class"""
1494 return "<%s.%s; proxy of C++ wxNativeEncodingInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1495 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1496 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1497 def __init__(self
, *args
, **kwargs
):
1498 """__init__(self) -> NativeEncodingInfo"""
1499 newobj
= _gdi_
.new_NativeEncodingInfo(*args
, **kwargs
)
1500 self
.this
= newobj
.this
1503 def __del__(self
, destroy
=_gdi_
.delete_NativeEncodingInfo
):
1506 if self
.thisown
: destroy(self
)
1509 def FromString(*args
, **kwargs
):
1510 """FromString(self, String s) -> bool"""
1511 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1513 def ToString(*args
, **kwargs
):
1514 """ToString(self) -> String"""
1515 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1518 class NativeEncodingInfoPtr(NativeEncodingInfo
):
1519 def __init__(self
, this
):
1521 if not hasattr(self
,"thisown"): self
.thisown
= 0
1522 self
.__class
__ = NativeEncodingInfo
1523 _gdi_
.NativeEncodingInfo_swigregister(NativeEncodingInfoPtr
)
1526 def GetNativeFontEncoding(*args
, **kwargs
):
1527 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1528 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1530 def TestFontEncoding(*args
, **kwargs
):
1531 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1532 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1533 #---------------------------------------------------------------------------
1535 class FontMapper(object):
1536 """Proxy of C++ FontMapper class"""
1538 return "<%s.%s; proxy of C++ wxFontMapper instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1539 def __init__(self
, *args
, **kwargs
):
1540 """__init__(self) -> FontMapper"""
1541 newobj
= _gdi_
.new_FontMapper(*args
, **kwargs
)
1542 self
.this
= newobj
.this
1545 def __del__(self
, destroy
=_gdi_
.delete_FontMapper
):
1548 if self
.thisown
: destroy(self
)
1551 def Get(*args
, **kwargs
):
1552 """Get() -> FontMapper"""
1553 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1555 Get
= staticmethod(Get
)
1556 def Set(*args
, **kwargs
):
1557 """Set(FontMapper mapper) -> FontMapper"""
1558 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1560 Set
= staticmethod(Set
)
1561 def CharsetToEncoding(*args
, **kwargs
):
1562 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1563 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1565 def GetSupportedEncodingsCount(*args
, **kwargs
):
1566 """GetSupportedEncodingsCount() -> size_t"""
1567 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1569 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1570 def GetEncoding(*args
, **kwargs
):
1571 """GetEncoding(size_t n) -> int"""
1572 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1574 GetEncoding
= staticmethod(GetEncoding
)
1575 def GetEncodingName(*args
, **kwargs
):
1576 """GetEncodingName(int encoding) -> String"""
1577 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1579 GetEncodingName
= staticmethod(GetEncodingName
)
1580 def GetEncodingDescription(*args
, **kwargs
):
1581 """GetEncodingDescription(int encoding) -> String"""
1582 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1584 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1585 def GetEncodingFromName(*args
, **kwargs
):
1586 """GetEncodingFromName(String name) -> int"""
1587 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1589 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1590 def SetConfig(*args
, **kwargs
):
1591 """SetConfig(self, ConfigBase config)"""
1592 return _gdi_
.FontMapper_SetConfig(*args
, **kwargs
)
1594 def SetConfigPath(*args
, **kwargs
):
1595 """SetConfigPath(self, String prefix)"""
1596 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1598 def GetDefaultConfigPath(*args
, **kwargs
):
1599 """GetDefaultConfigPath() -> String"""
1600 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1602 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1603 def GetAltForEncoding(*args
, **kwargs
):
1604 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1605 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1607 def IsEncodingAvailable(*args
, **kwargs
):
1608 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1609 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1611 def SetDialogParent(*args
, **kwargs
):
1612 """SetDialogParent(self, Window parent)"""
1613 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1615 def SetDialogTitle(*args
, **kwargs
):
1616 """SetDialogTitle(self, String title)"""
1617 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1620 class FontMapperPtr(FontMapper
):
1621 def __init__(self
, this
):
1623 if not hasattr(self
,"thisown"): self
.thisown
= 0
1624 self
.__class
__ = FontMapper
1625 _gdi_
.FontMapper_swigregister(FontMapperPtr
)
1627 def FontMapper_Get(*args
, **kwargs
):
1628 """FontMapper_Get() -> FontMapper"""
1629 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1631 def FontMapper_Set(*args
, **kwargs
):
1632 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1633 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1635 def FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
):
1636 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1637 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1639 def FontMapper_GetEncoding(*args
, **kwargs
):
1640 """FontMapper_GetEncoding(size_t n) -> int"""
1641 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1643 def FontMapper_GetEncodingName(*args
, **kwargs
):
1644 """FontMapper_GetEncodingName(int encoding) -> String"""
1645 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1647 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1648 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1649 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1651 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1652 """FontMapper_GetEncodingFromName(String name) -> int"""
1653 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1655 def FontMapper_GetDefaultConfigPath(*args
, **kwargs
):
1656 """FontMapper_GetDefaultConfigPath() -> String"""
1657 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1659 #---------------------------------------------------------------------------
1661 class Font(GDIObject
):
1662 """Proxy of C++ Font class"""
1664 return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1665 def __init__(self
, *args
, **kwargs
):
1667 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1668 String face=EmptyString,
1669 int encoding=FONTENCODING_DEFAULT) -> Font
1671 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1672 newobj
= _gdi_
.new_Font(*args
, **kwargs
)
1673 self
.this
= newobj
.this
1676 def __del__(self
, destroy
=_gdi_
.delete_Font
):
1679 if self
.thisown
: destroy(self
)
1682 def Ok(*args
, **kwargs
):
1683 """Ok(self) -> bool"""
1684 return _gdi_
.Font_Ok(*args
, **kwargs
)
1686 def __nonzero__(self
): return self
.Ok()
1687 def __eq__(*args
, **kwargs
):
1688 """__eq__(self, Font other) -> bool"""
1689 return _gdi_
.Font___eq__(*args
, **kwargs
)
1691 def __ne__(*args
, **kwargs
):
1692 """__ne__(self, Font other) -> bool"""
1693 return _gdi_
.Font___ne__(*args
, **kwargs
)
1695 def GetPointSize(*args
, **kwargs
):
1696 """GetPointSize(self) -> int"""
1697 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
1699 def GetPixelSize(*args
, **kwargs
):
1700 """GetPixelSize(self) -> Size"""
1701 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
1703 def IsUsingSizeInPixels(*args
, **kwargs
):
1704 """IsUsingSizeInPixels(self) -> bool"""
1705 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
1707 def GetFamily(*args
, **kwargs
):
1708 """GetFamily(self) -> int"""
1709 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
1711 def GetStyle(*args
, **kwargs
):
1712 """GetStyle(self) -> int"""
1713 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
1715 def GetWeight(*args
, **kwargs
):
1716 """GetWeight(self) -> int"""
1717 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
1719 def GetUnderlined(*args
, **kwargs
):
1720 """GetUnderlined(self) -> bool"""
1721 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
1723 def GetFaceName(*args
, **kwargs
):
1724 """GetFaceName(self) -> String"""
1725 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
1727 def GetEncoding(*args
, **kwargs
):
1728 """GetEncoding(self) -> int"""
1729 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
1731 def GetNativeFontInfo(*args
, **kwargs
):
1732 """GetNativeFontInfo(self) -> NativeFontInfo"""
1733 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
1735 def IsFixedWidth(*args
, **kwargs
):
1736 """IsFixedWidth(self) -> bool"""
1737 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
1739 def GetNativeFontInfoDesc(*args
, **kwargs
):
1740 """GetNativeFontInfoDesc(self) -> String"""
1741 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
1743 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
1744 """GetNativeFontInfoUserDesc(self) -> String"""
1745 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
1747 def SetPointSize(*args
, **kwargs
):
1748 """SetPointSize(self, int pointSize)"""
1749 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
1751 def SetPixelSize(*args
, **kwargs
):
1752 """SetPixelSize(self, Size pixelSize)"""
1753 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
1755 def SetFamily(*args
, **kwargs
):
1756 """SetFamily(self, int family)"""
1757 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
1759 def SetStyle(*args
, **kwargs
):
1760 """SetStyle(self, int style)"""
1761 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
1763 def SetWeight(*args
, **kwargs
):
1764 """SetWeight(self, int weight)"""
1765 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
1767 def SetFaceName(*args
, **kwargs
):
1768 """SetFaceName(self, String faceName)"""
1769 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
1771 def SetUnderlined(*args
, **kwargs
):
1772 """SetUnderlined(self, bool underlined)"""
1773 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
1775 def SetEncoding(*args
, **kwargs
):
1776 """SetEncoding(self, int encoding)"""
1777 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
1779 def SetNativeFontInfo(*args
, **kwargs
):
1780 """SetNativeFontInfo(self, NativeFontInfo info)"""
1781 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
1783 def SetNativeFontInfoFromString(*args
, **kwargs
):
1784 """SetNativeFontInfoFromString(self, String info)"""
1785 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
1787 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
1788 """SetNativeFontInfoUserDesc(self, String info)"""
1789 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
1791 def GetFamilyString(*args
, **kwargs
):
1792 """GetFamilyString(self) -> String"""
1793 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
1795 def GetStyleString(*args
, **kwargs
):
1796 """GetStyleString(self) -> String"""
1797 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
1799 def GetWeightString(*args
, **kwargs
):
1800 """GetWeightString(self) -> String"""
1801 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
1803 def SetNoAntiAliasing(*args
, **kwargs
):
1804 """SetNoAntiAliasing(self, bool no=True)"""
1805 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
1807 def GetNoAntiAliasing(*args
, **kwargs
):
1808 """GetNoAntiAliasing(self) -> bool"""
1809 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
1811 def GetDefaultEncoding(*args
, **kwargs
):
1812 """GetDefaultEncoding() -> int"""
1813 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
1815 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
1816 def SetDefaultEncoding(*args
, **kwargs
):
1817 """SetDefaultEncoding(int encoding)"""
1818 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
1820 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
1822 class FontPtr(Font
):
1823 def __init__(self
, this
):
1825 if not hasattr(self
,"thisown"): self
.thisown
= 0
1826 self
.__class
__ = Font
1827 _gdi_
.Font_swigregister(FontPtr
)
1829 def FontFromNativeInfo(*args
, **kwargs
):
1830 """FontFromNativeInfo(NativeFontInfo info) -> Font"""
1831 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1832 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
1836 def FontFromNativeInfoString(*args
, **kwargs
):
1837 """FontFromNativeInfoString(String info) -> Font"""
1838 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1839 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
1843 def Font2(*args
, **kwargs
):
1845 Font2(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
1846 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
1848 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1849 val
= _gdi_
.new_Font2(*args
, **kwargs
)
1853 def FontFromPixelSize(*args
, **kwargs
):
1855 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
1856 bool underlined=False, String face=wxEmptyString,
1857 int encoding=FONTENCODING_DEFAULT) -> Font
1859 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1860 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
1864 def Font_GetDefaultEncoding(*args
, **kwargs
):
1865 """Font_GetDefaultEncoding() -> int"""
1866 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
1868 def Font_SetDefaultEncoding(*args
, **kwargs
):
1869 """Font_SetDefaultEncoding(int encoding)"""
1870 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
1872 #---------------------------------------------------------------------------
1874 class FontEnumerator(object):
1875 """Proxy of C++ FontEnumerator class"""
1877 return "<%s.%s; proxy of C++ wxPyFontEnumerator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1878 def __init__(self
, *args
, **kwargs
):
1879 """__init__(self) -> FontEnumerator"""
1880 newobj
= _gdi_
.new_FontEnumerator(*args
, **kwargs
)
1881 self
.this
= newobj
.this
1884 self
._setCallbackInfo
(self
, FontEnumerator
, 0)
1886 def __del__(self
, destroy
=_gdi_
.delete_FontEnumerator
):
1889 if self
.thisown
: destroy(self
)
1892 def _setCallbackInfo(*args
, **kwargs
):
1893 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
1894 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
1896 def EnumerateFacenames(*args
, **kwargs
):
1897 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
1898 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
1900 def EnumerateEncodings(*args
, **kwargs
):
1901 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
1902 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
1904 def GetEncodings(*args
, **kwargs
):
1905 """GetEncodings(self) -> PyObject"""
1906 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
1908 def GetFacenames(*args
, **kwargs
):
1909 """GetFacenames(self) -> PyObject"""
1910 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
1913 class FontEnumeratorPtr(FontEnumerator
):
1914 def __init__(self
, this
):
1916 if not hasattr(self
,"thisown"): self
.thisown
= 0
1917 self
.__class
__ = FontEnumerator
1918 _gdi_
.FontEnumerator_swigregister(FontEnumeratorPtr
)
1920 #---------------------------------------------------------------------------
1922 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
1923 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
1924 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
1925 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
1926 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
1927 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
1928 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
1929 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
1930 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
1931 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
1932 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
1933 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
1934 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
1935 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
1936 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
1937 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
1938 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
1939 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
1940 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
1941 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
1942 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
1943 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
1944 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
1945 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
1946 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
1947 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
1948 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
1949 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
1950 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
1951 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
1952 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
1953 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
1954 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
1955 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
1956 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
1957 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
1958 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
1959 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
1960 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
1961 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
1962 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
1963 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
1964 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
1965 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
1966 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
1967 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
1968 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
1969 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
1970 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
1971 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
1972 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
1973 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
1974 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
1975 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
1976 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
1977 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
1978 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
1979 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
1980 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
1981 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
1982 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
1983 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
1984 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
1985 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
1986 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
1987 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
1988 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
1989 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
1990 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
1991 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
1992 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
1993 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
1994 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
1995 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
1996 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
1997 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
1998 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
1999 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2000 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2001 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2002 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2003 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2004 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2005 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2006 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2007 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2008 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2009 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2010 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2011 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2012 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2013 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2014 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2015 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2016 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2017 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2018 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2019 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2020 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2021 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2022 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2023 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2024 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2025 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2026 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2027 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2028 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2029 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2030 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2031 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2032 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2033 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2034 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2035 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2036 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2037 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2038 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2039 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2040 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2041 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2042 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2043 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2044 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2045 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2046 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2047 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2048 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2049 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2050 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2051 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2052 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2053 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2054 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2055 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2056 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2057 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2058 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2059 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2060 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2061 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2062 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2063 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2064 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2065 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2066 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2067 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2068 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2069 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2070 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2071 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2072 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2073 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2074 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2075 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2076 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2077 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2078 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2079 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2080 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2081 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2082 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2083 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2084 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2085 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2086 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2087 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2088 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2089 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2090 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2091 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2092 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2093 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2094 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2095 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2096 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2097 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2098 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2099 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2100 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2101 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2102 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2103 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2104 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2105 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2106 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2107 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2108 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2109 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2110 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2111 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2112 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2113 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2114 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2115 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2116 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2117 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2118 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2119 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2120 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2121 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2122 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2123 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2124 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2125 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2126 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2127 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2128 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2129 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2130 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2131 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2132 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2133 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2134 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2135 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2136 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2137 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2138 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2139 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2140 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2141 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2142 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2143 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2144 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2145 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2146 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2147 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2148 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2149 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2150 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2151 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2152 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2153 class LanguageInfo(object):
2154 """Proxy of C++ LanguageInfo class"""
2155 def __init__(self
): raise RuntimeError, "No constructor defined"
2157 return "<%s.%s; proxy of C++ wxLanguageInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2158 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2159 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2160 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2162 class LanguageInfoPtr(LanguageInfo
):
2163 def __init__(self
, this
):
2165 if not hasattr(self
,"thisown"): self
.thisown
= 0
2166 self
.__class
__ = LanguageInfo
2167 _gdi_
.LanguageInfo_swigregister(LanguageInfoPtr
)
2169 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2170 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2171 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2172 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2173 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2174 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2175 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2176 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2177 class Locale(object):
2178 """Proxy of C++ Locale class"""
2180 return "<%s.%s; proxy of C++ wxLocale instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2181 def __init__(self
, *args
, **kwargs
):
2182 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2183 newobj
= _gdi_
.new_Locale(*args
, **kwargs
)
2184 self
.this
= newobj
.this
2187 def __del__(self
, destroy
=_gdi_
.delete_Locale
):
2190 if self
.thisown
: destroy(self
)
2193 def Init1(*args
, **kwargs
):
2195 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2196 bool bLoadDefault=True,
2197 bool bConvertEncoding=False) -> bool
2199 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2201 def Init2(*args
, **kwargs
):
2202 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2203 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2205 def Init(self
, *_args
, **_kwargs
):
2206 if type(_args
[0]) in [type(''), type(u
'')]:
2207 val
= self
.Init1(*_args
, **_kwargs
)
2209 val
= self
.Init2(*_args
, **_kwargs
)
2212 def GetSystemLanguage(*args
, **kwargs
):
2213 """GetSystemLanguage() -> int"""
2214 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2216 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2217 def GetSystemEncoding(*args
, **kwargs
):
2218 """GetSystemEncoding() -> int"""
2219 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2221 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2222 def GetSystemEncodingName(*args
, **kwargs
):
2223 """GetSystemEncodingName() -> String"""
2224 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2226 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2227 def IsOk(*args
, **kwargs
):
2228 """IsOk(self) -> bool"""
2229 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2231 def __nonzero__(self
): return self
.IsOk()
2232 def GetLocale(*args
, **kwargs
):
2233 """GetLocale(self) -> String"""
2234 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2236 def GetLanguage(*args
, **kwargs
):
2237 """GetLanguage(self) -> int"""
2238 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2240 def GetSysName(*args
, **kwargs
):
2241 """GetSysName(self) -> String"""
2242 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2244 def GetCanonicalName(*args
, **kwargs
):
2245 """GetCanonicalName(self) -> String"""
2246 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2248 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2249 """AddCatalogLookupPathPrefix(String prefix)"""
2250 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2252 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2253 def AddCatalog(*args
, **kwargs
):
2254 """AddCatalog(self, String szDomain) -> bool"""
2255 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2257 def IsLoaded(*args
, **kwargs
):
2258 """IsLoaded(self, String szDomain) -> bool"""
2259 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2261 def GetLanguageInfo(*args
, **kwargs
):
2262 """GetLanguageInfo(int lang) -> LanguageInfo"""
2263 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2265 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2266 def GetLanguageName(*args
, **kwargs
):
2267 """GetLanguageName(int lang) -> String"""
2268 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2270 GetLanguageName
= staticmethod(GetLanguageName
)
2271 def FindLanguageInfo(*args
, **kwargs
):
2272 """FindLanguageInfo(String locale) -> LanguageInfo"""
2273 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2275 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2276 def AddLanguage(*args
, **kwargs
):
2277 """AddLanguage(LanguageInfo info)"""
2278 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2280 AddLanguage
= staticmethod(AddLanguage
)
2281 def GetString(*args
, **kwargs
):
2282 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2283 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2285 def GetName(*args
, **kwargs
):
2286 """GetName(self) -> String"""
2287 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2290 class LocalePtr(Locale
):
2291 def __init__(self
, this
):
2293 if not hasattr(self
,"thisown"): self
.thisown
= 0
2294 self
.__class
__ = Locale
2295 _gdi_
.Locale_swigregister(LocalePtr
)
2297 def Locale_GetSystemLanguage(*args
, **kwargs
):
2298 """Locale_GetSystemLanguage() -> int"""
2299 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2301 def Locale_GetSystemEncoding(*args
, **kwargs
):
2302 """Locale_GetSystemEncoding() -> int"""
2303 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2305 def Locale_GetSystemEncodingName(*args
, **kwargs
):
2306 """Locale_GetSystemEncodingName() -> String"""
2307 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2309 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2310 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2311 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2313 def Locale_GetLanguageInfo(*args
, **kwargs
):
2314 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2315 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2317 def Locale_GetLanguageName(*args
, **kwargs
):
2318 """Locale_GetLanguageName(int lang) -> String"""
2319 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2321 def Locale_FindLanguageInfo(*args
, **kwargs
):
2322 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2323 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2325 def Locale_AddLanguage(*args
, **kwargs
):
2326 """Locale_AddLanguage(LanguageInfo info)"""
2327 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2330 def GetLocale(*args
, **kwargs
):
2331 """GetLocale() -> Locale"""
2332 return _gdi_
.GetLocale(*args
, **kwargs
)
2333 #---------------------------------------------------------------------------
2335 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2336 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2337 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2338 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2339 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2340 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2341 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2342 class EncodingConverter(_core
.Object
):
2343 """Proxy of C++ EncodingConverter class"""
2345 return "<%s.%s; proxy of C++ wxEncodingConverter instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2346 def __init__(self
, *args
, **kwargs
):
2347 """__init__(self) -> EncodingConverter"""
2348 newobj
= _gdi_
.new_EncodingConverter(*args
, **kwargs
)
2349 self
.this
= newobj
.this
2352 def __del__(self
, destroy
=_gdi_
.delete_EncodingConverter
):
2355 if self
.thisown
: destroy(self
)
2358 def Init(*args
, **kwargs
):
2359 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2360 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2362 def Convert(*args
, **kwargs
):
2363 """Convert(self, String input) -> String"""
2364 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2366 def GetPlatformEquivalents(*args
, **kwargs
):
2367 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2368 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2370 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
2371 def GetAllEquivalents(*args
, **kwargs
):
2372 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2373 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2375 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
2376 def CanConvert(*args
, **kwargs
):
2377 """CanConvert(int encIn, int encOut) -> bool"""
2378 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2380 CanConvert
= staticmethod(CanConvert
)
2381 def __nonzero__(self
): return self
.IsOk()
2383 class EncodingConverterPtr(EncodingConverter
):
2384 def __init__(self
, this
):
2386 if not hasattr(self
,"thisown"): self
.thisown
= 0
2387 self
.__class
__ = EncodingConverter
2388 _gdi_
.EncodingConverter_swigregister(EncodingConverterPtr
)
2390 def GetTranslation(*args
):
2392 GetTranslation(String str) -> String
2393 GetTranslation(String str, String strPlural, size_t n) -> String
2395 return _gdi_
.GetTranslation(*args
)
2397 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
2398 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2399 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2401 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
2402 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2403 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2405 def EncodingConverter_CanConvert(*args
, **kwargs
):
2406 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2407 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2409 #----------------------------------------------------------------------------
2410 # On MSW add the directory where the wxWidgets catalogs were installed
2411 # to the default catalog path.
2412 if wx
.Platform
== "__WXMSW__":
2414 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "locale")
2415 Locale
.AddCatalogLookupPathPrefix(_localedir
)
2418 #----------------------------------------------------------------------------
2420 #---------------------------------------------------------------------------
2422 class DC(_core
.Object
):
2424 A wx.DC is a device context onto which graphics and text can be
2425 drawn. It is intended to represent a number of output devices in a
2426 generic way, so a window can have a device context associated with it,
2427 and a printer also has a device context. In this way, the same piece
2428 of code may write to a number of different devices, if the device
2429 context is used as a parameter.
2431 Derived types of wxDC have documentation for specific features only,
2432 so refer to this section for most device context information.
2434 The wx.DC class is abstract and can not be instantiated, you must use
2435 one of the derived classes instead. Which one will depend on the
2436 situation in which it is used.
2438 def __init__(self
): raise RuntimeError, "No constructor defined"
2440 return "<%s.%s; proxy of C++ wxDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2441 def __del__(self
, destroy
=_gdi_
.delete_DC
):
2444 if self
.thisown
: destroy(self
)
2447 def BeginDrawing(*args
, **kwargs
):
2451 Allows for optimization of drawing code on platforms that need it. On
2452 other platforms this is just an empty function and is harmless. To
2453 take advantage of this postential optimization simply enclose each
2454 group of calls to the drawing primitives within calls to
2455 `BeginDrawing` and `EndDrawing`.
2457 return _gdi_
.DC_BeginDrawing(*args
, **kwargs
)
2459 def EndDrawing(*args
, **kwargs
):
2463 Ends the group of drawing primitives started with `BeginDrawing`, and
2464 invokes whatever optimization is available for this DC type on the
2467 return _gdi_
.DC_EndDrawing(*args
, **kwargs
)
2469 def FloodFill(*args
, **kwargs
):
2471 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2473 Flood fills the device context starting from the given point, using
2474 the current brush colour, and using a style:
2476 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2477 the given colour is encountered.
2479 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2482 Returns False if the operation failed.
2484 Note: The present implementation for non-Windows platforms may fail to
2485 find colour borders if the pixels do not match the colour
2486 exactly. However the function will still return true.
2488 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
2490 def FloodFillPoint(*args
, **kwargs
):
2492 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2494 Flood fills the device context starting from the given point, using
2495 the current brush colour, and using a style:
2497 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2498 the given colour is encountered.
2500 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2503 Returns False if the operation failed.
2505 Note: The present implementation for non-Windows platforms may fail to
2506 find colour borders if the pixels do not match the colour
2507 exactly. However the function will still return true.
2509 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
2511 def GetPixel(*args
, **kwargs
):
2513 GetPixel(self, int x, int y) -> Colour
2515 Gets the colour at the specified location on the DC.
2517 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
2519 def GetPixelPoint(*args
, **kwargs
):
2520 """GetPixelPoint(self, Point pt) -> Colour"""
2521 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
2523 def DrawLine(*args
, **kwargs
):
2525 DrawLine(self, int x1, int y1, int x2, int y2)
2527 Draws a line from the first point to the second. The current pen is
2528 used for drawing the line. Note that the second point is *not* part of
2529 the line and is not drawn by this function (this is consistent with
2530 the behaviour of many other toolkits).
2532 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
2534 def DrawLinePoint(*args
, **kwargs
):
2536 DrawLinePoint(self, Point pt1, Point pt2)
2538 Draws a line from the first point to the second. The current pen is
2539 used for drawing the line. Note that the second point is *not* part of
2540 the line and is not drawn by this function (this is consistent with
2541 the behaviour of many other toolkits).
2543 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
2545 def CrossHair(*args
, **kwargs
):
2547 CrossHair(self, int x, int y)
2549 Displays a cross hair using the current pen. This is a vertical and
2550 horizontal line the height and width of the window, centred on the
2553 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
2555 def CrossHairPoint(*args
, **kwargs
):
2557 CrossHairPoint(self, Point pt)
2559 Displays a cross hair using the current pen. This is a vertical and
2560 horizontal line the height and width of the window, centred on the
2563 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
2565 def DrawArc(*args
, **kwargs
):
2567 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2569 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2570 the first point to the second. The current pen is used for the outline
2571 and the current brush for filling the shape.
2573 The arc is drawn in an anticlockwise direction from the start point to
2576 return _gdi_
.DC_DrawArc(*args
, **kwargs
)
2578 def DrawArcPoint(*args
, **kwargs
):
2580 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2582 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2583 the first point to the second. The current pen is used for the outline
2584 and the current brush for filling the shape.
2586 The arc is drawn in an anticlockwise direction from the start point to
2589 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
2591 def DrawCheckMark(*args
, **kwargs
):
2593 DrawCheckMark(self, int x, int y, int width, int height)
2595 Draws a check mark inside the given rectangle.
2597 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
2599 def DrawCheckMarkRect(*args
, **kwargs
):
2601 DrawCheckMarkRect(self, Rect rect)
2603 Draws a check mark inside the given rectangle.
2605 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
2607 def DrawEllipticArc(*args
, **kwargs
):
2609 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
2611 Draws an arc of an ellipse, with the given rectangle defining the
2612 bounds of the ellipse. The current pen is used for drawing the arc and
2613 the current brush is used for drawing the pie.
2615 The *start* and *end* parameters specify the start and end of the arc
2616 relative to the three-o'clock position from the center of the
2617 rectangle. Angles are specified in degrees (360 is a complete
2618 circle). Positive values mean counter-clockwise motion. If start is
2619 equal to end, a complete ellipse will be drawn.
2621 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
2623 def DrawEllipticArcPointSize(*args
, **kwargs
):
2625 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
2627 Draws an arc of an ellipse, with the given rectangle defining the
2628 bounds of the ellipse. The current pen is used for drawing the arc and
2629 the current brush is used for drawing the pie.
2631 The *start* and *end* parameters specify the start and end of the arc
2632 relative to the three-o'clock position from the center of the
2633 rectangle. Angles are specified in degrees (360 is a complete
2634 circle). Positive values mean counter-clockwise motion. If start is
2635 equal to end, a complete ellipse will be drawn.
2637 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
2639 def DrawPoint(*args
, **kwargs
):
2641 DrawPoint(self, int x, int y)
2643 Draws a point using the current pen.
2645 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
2647 def DrawPointPoint(*args
, **kwargs
):
2649 DrawPointPoint(self, Point pt)
2651 Draws a point using the current pen.
2653 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
2655 def DrawRectangle(*args
, **kwargs
):
2657 DrawRectangle(self, int x, int y, int width, int height)
2659 Draws a rectangle with the given top left corner, and with the given
2660 size. The current pen is used for the outline and the current brush
2661 for filling the shape.
2663 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
2665 def DrawRectangleRect(*args
, **kwargs
):
2667 DrawRectangleRect(self, Rect rect)
2669 Draws a rectangle with the given top left corner, and with the given
2670 size. The current pen is used for the outline and the current brush
2671 for filling the shape.
2673 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
2675 def DrawRectanglePointSize(*args
, **kwargs
):
2677 DrawRectanglePointSize(self, Point pt, Size sz)
2679 Draws a rectangle with the given top left corner, and with the given
2680 size. The current pen is used for the outline and the current brush
2681 for filling the shape.
2683 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
2685 def DrawRoundedRectangle(*args
, **kwargs
):
2687 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
2689 Draws a rectangle with the given top left corner, and with the given
2690 size. The corners are quarter-circles using the given radius. The
2691 current pen is used for the outline and the current brush for filling
2694 If radius is positive, the value is assumed to be the radius of the
2695 rounded corner. If radius is negative, the absolute value is assumed
2696 to be the proportion of the smallest dimension of the rectangle. This
2697 means that the corner can be a sensible size relative to the size of
2698 the rectangle, and also avoids the strange effects X produces when the
2699 corners are too big for the rectangle.
2701 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
2703 def DrawRoundedRectangleRect(*args
, **kwargs
):
2705 DrawRoundedRectangleRect(self, Rect r, double radius)
2707 Draws a rectangle with the given top left corner, and with the given
2708 size. The corners are quarter-circles using the given radius. The
2709 current pen is used for the outline and the current brush for filling
2712 If radius is positive, the value is assumed to be the radius of the
2713 rounded corner. If radius is negative, the absolute value is assumed
2714 to be the proportion of the smallest dimension of the rectangle. This
2715 means that the corner can be a sensible size relative to the size of
2716 the rectangle, and also avoids the strange effects X produces when the
2717 corners are too big for the rectangle.
2719 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
2721 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
2723 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
2725 Draws a rectangle with the given top left corner, and with the given
2726 size. The corners are quarter-circles using the given radius. The
2727 current pen is used for the outline and the current brush for filling
2730 If radius is positive, the value is assumed to be the radius of the
2731 rounded corner. If radius is negative, the absolute value is assumed
2732 to be the proportion of the smallest dimension of the rectangle. This
2733 means that the corner can be a sensible size relative to the size of
2734 the rectangle, and also avoids the strange effects X produces when the
2735 corners are too big for the rectangle.
2737 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
2739 def DrawCircle(*args
, **kwargs
):
2741 DrawCircle(self, int x, int y, int radius)
2743 Draws a circle with the given center point and radius. The current
2744 pen is used for the outline and the current brush for filling the
2747 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
2749 def DrawCirclePoint(*args
, **kwargs
):
2751 DrawCirclePoint(self, Point pt, int radius)
2753 Draws a circle with the given center point and radius. The current
2754 pen is used for the outline and the current brush for filling the
2757 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
2759 def DrawEllipse(*args
, **kwargs
):
2761 DrawEllipse(self, int x, int y, int width, int height)
2763 Draws an ellipse contained in the specified rectangle. The current pen
2764 is used for the outline and the current brush for filling the shape.
2766 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
2768 def DrawEllipseRect(*args
, **kwargs
):
2770 DrawEllipseRect(self, Rect rect)
2772 Draws an ellipse contained in the specified rectangle. The current pen
2773 is used for the outline and the current brush for filling the shape.
2775 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
2777 def DrawEllipsePointSize(*args
, **kwargs
):
2779 DrawEllipsePointSize(self, Point pt, Size sz)
2781 Draws an ellipse contained in the specified rectangle. The current pen
2782 is used for the outline and the current brush for filling the shape.
2784 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
2786 def DrawIcon(*args
, **kwargs
):
2788 DrawIcon(self, Icon icon, int x, int y)
2790 Draw an icon on the display (does nothing if the device context is
2791 PostScript). This can be the simplest way of drawing bitmaps on a
2794 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
2796 def DrawIconPoint(*args
, **kwargs
):
2798 DrawIconPoint(self, Icon icon, Point pt)
2800 Draw an icon on the display (does nothing if the device context is
2801 PostScript). This can be the simplest way of drawing bitmaps on a
2804 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
2806 def DrawBitmap(*args
, **kwargs
):
2808 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
2810 Draw a bitmap on the device context at the specified point. If
2811 *transparent* is true and the bitmap has a transparency mask, (or
2812 alpha channel on the platforms that support it) then the bitmap will
2813 be drawn transparently.
2815 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
2817 def DrawBitmapPoint(*args
, **kwargs
):
2819 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
2821 Draw a bitmap on the device context at the specified point. If
2822 *transparent* is true and the bitmap has a transparency mask, (or
2823 alpha channel on the platforms that support it) then the bitmap will
2824 be drawn transparently.
2826 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
2828 def DrawText(*args
, **kwargs
):
2830 DrawText(self, String text, int x, int y)
2832 Draws a text string at the specified point, using the current text
2833 font, and the current text foreground and background colours.
2835 The coordinates refer to the top-left corner of the rectangle bounding
2836 the string. See `GetTextExtent` for how to get the dimensions of a
2837 text string, which can be used to position the text more precisely.
2839 **NOTE**: under wxGTK the current logical function is used by this
2840 function but it is ignored by wxMSW. Thus, you should avoid using
2841 logical functions with this function in portable programs.
2843 return _gdi_
.DC_DrawText(*args
, **kwargs
)
2845 def DrawTextPoint(*args
, **kwargs
):
2847 DrawTextPoint(self, String text, Point pt)
2849 Draws a text string at the specified point, using the current text
2850 font, and the current text foreground and background colours.
2852 The coordinates refer to the top-left corner of the rectangle bounding
2853 the string. See `GetTextExtent` for how to get the dimensions of a
2854 text string, which can be used to position the text more precisely.
2856 **NOTE**: under wxGTK the current logical function is used by this
2857 function but it is ignored by wxMSW. Thus, you should avoid using
2858 logical functions with this function in portable programs.
2860 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
2862 def DrawRotatedText(*args
, **kwargs
):
2864 DrawRotatedText(self, String text, int x, int y, double angle)
2866 Draws the text rotated by *angle* degrees, if supported by the platform.
2868 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
2869 function. In particular, a font different from ``wx.NORMAL_FONT``
2870 should be used as the it is not normally a TrueType
2871 font. ``wx.SWISS_FONT`` is an example of a font which is.
2873 return _gdi_
.DC_DrawRotatedText(*args
, **kwargs
)
2875 def DrawRotatedTextPoint(*args
, **kwargs
):
2877 DrawRotatedTextPoint(self, String text, Point pt, double angle)
2879 Draws the text rotated by *angle* degrees, if supported by the platform.
2881 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
2882 function. In particular, a font different from ``wx.NORMAL_FONT``
2883 should be used as the it is not normally a TrueType
2884 font. ``wx.SWISS_FONT`` is an example of a font which is.
2886 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
2888 def Blit(*args
, **kwargs
):
2890 Blit(self, int xdest, int ydest, int width, int height, DC source,
2891 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
2892 int xsrcMask=-1, int ysrcMask=-1) -> bool
2894 Copy from a source DC to this DC. Parameters specify the destination
2895 coordinates, size of area to copy, source DC, source coordinates,
2896 logical function, whether to use a bitmap mask, and mask source
2899 return _gdi_
.DC_Blit(*args
, **kwargs
)
2901 def BlitPointSize(*args
, **kwargs
):
2903 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
2904 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
2906 Copy from a source DC to this DC. Parameters specify the destination
2907 coordinates, size of area to copy, source DC, source coordinates,
2908 logical function, whether to use a bitmap mask, and mask source
2911 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
2913 def SetClippingRegion(*args
, **kwargs
):
2915 SetClippingRegion(self, int x, int y, int width, int height)
2917 Sets the clipping region for this device context to the intersection
2918 of the given region described by the parameters of this method and the
2919 previously set clipping region. You should call `DestroyClippingRegion`
2920 if you want to set the clipping region exactly to the region
2923 The clipping region is an area to which drawing is
2924 restricted. Possible uses for the clipping region are for clipping
2925 text or for speeding up window redraws when only a known area of the
2928 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
2930 def SetClippingRegionPointSize(*args
, **kwargs
):
2932 SetClippingRegionPointSize(self, Point pt, Size sz)
2934 Sets the clipping region for this device context to the intersection
2935 of the given region described by the parameters of this method and the
2936 previously set clipping region. You should call `DestroyClippingRegion`
2937 if you want to set the clipping region exactly to the region
2940 The clipping region is an area to which drawing is
2941 restricted. Possible uses for the clipping region are for clipping
2942 text or for speeding up window redraws when only a known area of the
2945 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
2947 def SetClippingRegionAsRegion(*args
, **kwargs
):
2949 SetClippingRegionAsRegion(self, Region region)
2951 Sets the clipping region for this device context to the intersection
2952 of the given region described by the parameters of this method and the
2953 previously set clipping region. You should call `DestroyClippingRegion`
2954 if you want to set the clipping region exactly to the region
2957 The clipping region is an area to which drawing is
2958 restricted. Possible uses for the clipping region are for clipping
2959 text or for speeding up window redraws when only a known area of the
2962 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
2964 def SetClippingRect(*args
, **kwargs
):
2966 SetClippingRect(self, Rect rect)
2968 Sets the clipping region for this device context to the intersection
2969 of the given region described by the parameters of this method and the
2970 previously set clipping region. You should call `DestroyClippingRegion`
2971 if you want to set the clipping region exactly to the region
2974 The clipping region is an area to which drawing is
2975 restricted. Possible uses for the clipping region are for clipping
2976 text or for speeding up window redraws when only a known area of the
2979 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
2981 def DrawLines(*args
, **kwargs
):
2983 DrawLines(self, List points, int xoffset=0, int yoffset=0)
2985 Draws lines using a sequence of `wx.Point` objects, adding the
2986 optional offset coordinate. The current pen is used for drawing the
2989 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
2991 def DrawPolygon(*args
, **kwargs
):
2993 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
2994 int fillStyle=ODDEVEN_RULE)
2996 Draws a filled polygon using a sequence of `wx.Point` objects, adding
2997 the optional offset coordinate. The last argument specifies the fill
2998 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3000 The current pen is used for drawing the outline, and the current brush
3001 for filling the shape. Using a transparent brush suppresses
3002 filling. Note that wxWidgets automatically closes the first and last
3005 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3007 def DrawLabel(*args
, **kwargs
):
3009 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3012 Draw *text* within the specified rectangle, abiding by the alignment
3013 flags. Will additionally emphasize the character at *indexAccel* if
3016 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3018 def DrawImageLabel(*args
, **kwargs
):
3020 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3021 int indexAccel=-1) -> Rect
3023 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3024 drawing it) within the specified rectangle, abiding by the alignment
3025 flags. Will additionally emphasize the character at *indexAccel* if
3026 it is not -1. Returns the bounding rectangle.
3028 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3030 def DrawSpline(*args
, **kwargs
):
3032 DrawSpline(self, List points)
3034 Draws a spline between all given control points, (a list of `wx.Point`
3035 objects) using the current pen. The spline is drawn using a series of
3036 lines, using an algorithm taken from the X drawing program 'XFIG'.
3038 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3040 def Clear(*args
, **kwargs
):
3044 Clears the device context using the current background brush.
3046 return _gdi_
.DC_Clear(*args
, **kwargs
)
3048 def StartDoc(*args
, **kwargs
):
3050 StartDoc(self, String message) -> bool
3052 Starts a document (only relevant when outputting to a
3053 printer). *Message* is a message to show whilst printing.
3055 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3057 def EndDoc(*args
, **kwargs
):
3061 Ends a document (only relevant when outputting to a printer).
3063 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3065 def StartPage(*args
, **kwargs
):
3069 Starts a document page (only relevant when outputting to a printer).
3071 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3073 def EndPage(*args
, **kwargs
):
3077 Ends a document page (only relevant when outputting to a printer).
3079 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3081 def SetFont(*args
, **kwargs
):
3083 SetFont(self, Font font)
3085 Sets the current font for the DC. It must be a valid font, in
3086 particular you should not pass ``wx.NullFont`` to this method.
3088 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3090 def SetPen(*args
, **kwargs
):
3092 SetPen(self, Pen pen)
3094 Sets the current pen for the DC.
3096 If the argument is ``wx.NullPen``, the current pen is selected out of the
3097 device context, and the original pen restored.
3099 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3101 def SetBrush(*args
, **kwargs
):
3103 SetBrush(self, Brush brush)
3105 Sets the current brush for the DC.
3107 If the argument is ``wx.NullBrush``, the current brush is selected out
3108 of the device context, and the original brush restored, allowing the
3109 current brush to be destroyed safely.
3111 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3113 def SetBackground(*args
, **kwargs
):
3115 SetBackground(self, Brush brush)
3117 Sets the current background brush for the DC.
3119 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3121 def SetBackgroundMode(*args
, **kwargs
):
3123 SetBackgroundMode(self, int mode)
3125 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3126 determines whether text will be drawn with a background colour or
3129 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3131 def SetPalette(*args
, **kwargs
):
3133 SetPalette(self, Palette palette)
3135 If this is a window DC or memory DC, assigns the given palette to the
3136 window or bitmap associated with the DC. If the argument is
3137 ``wx.NullPalette``, the current palette is selected out of the device
3138 context, and the original palette restored.
3140 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3142 def DestroyClippingRegion(*args
, **kwargs
):
3144 DestroyClippingRegion(self)
3146 Destroys the current clipping region so that none of the DC is
3149 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3151 def GetClippingBox(*args
, **kwargs
):
3153 GetClippingBox() -> (x, y, width, height)
3155 Gets the rectangle surrounding the current clipping region.
3157 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3159 def GetClippingRect(*args
, **kwargs
):
3161 GetClippingRect(self) -> Rect
3163 Gets the rectangle surrounding the current clipping region.
3165 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3167 def GetCharHeight(*args
, **kwargs
):
3169 GetCharHeight(self) -> int
3171 Gets the character height of the currently set font.
3173 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3175 def GetCharWidth(*args
, **kwargs
):
3177 GetCharWidth(self) -> int
3179 Gets the average character width of the currently set font.
3181 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3183 def GetTextExtent(*args
, **kwargs
):
3185 GetTextExtent(wxString string) -> (width, height)
3187 Get the width and height of the text using the current font. Only
3188 works for single line strings.
3190 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3192 def GetFullTextExtent(*args
, **kwargs
):
3194 GetFullTextExtent(wxString string, Font font=None) ->
3195 (width, height, descent, externalLeading)
3197 Get the width, height, decent and leading of the text using the
3198 current or specified font. Only works for single line strings.
3200 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3202 def GetMultiLineTextExtent(*args
, **kwargs
):
3204 GetMultiLineTextExtent(wxString string, Font font=None) ->
3205 (width, height, descent, externalLeading)
3207 Get the width, height, decent and leading of the text using the
3208 current or specified font. Works for single as well as multi-line
3211 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3213 def GetPartialTextExtents(*args
, **kwargs
):
3215 GetPartialTextExtents(self, text) -> [widths]
3217 Returns a list of integers such that each value is the distance in
3218 pixels from the begining of text to the coresponding character of
3219 *text*. The generic version simply builds a running total of the widths
3220 of each character using GetTextExtent, however if the various
3221 platforms have a native API function that is faster or more accurate
3222 than the generic implementaiton then it will be used instead.
3224 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3226 def GetSize(*args
, **kwargs
):
3228 GetSize(self) -> Size
3230 This gets the horizontal and vertical resolution in device units. It
3231 can be used to scale graphics to fit the page. For example, if *maxX*
3232 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3233 used in your application, the following code will scale the graphic to
3234 fit on the printer page::
3237 scaleX = maxX*1.0 / w
3238 scaleY = maxY*1.0 / h
3239 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3242 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3244 def GetSizeTuple(*args
, **kwargs
):
3246 GetSizeTuple() -> (width, height)
3248 This gets the horizontal and vertical resolution in device units. It
3249 can be used to scale graphics to fit the page. For example, if *maxX*
3250 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3251 used in your application, the following code will scale the graphic to
3252 fit on the printer page::
3255 scaleX = maxX*1.0 / w
3256 scaleY = maxY*1.0 / h
3257 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3260 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3262 def GetSizeMM(*args
, **kwargs
):
3264 GetSizeMM(self) -> Size
3266 Get the DC size in milimeters.
3268 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3270 def GetSizeMMTuple(*args
, **kwargs
):
3272 GetSizeMMTuple() -> (width, height)
3274 Get the DC size in milimeters.
3276 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3278 def DeviceToLogicalX(*args
, **kwargs
):
3280 DeviceToLogicalX(self, int x) -> int
3282 Convert device X coordinate to logical coordinate, using the current
3285 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
3287 def DeviceToLogicalY(*args
, **kwargs
):
3289 DeviceToLogicalY(self, int y) -> int
3291 Converts device Y coordinate to logical coordinate, using the current
3294 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
3296 def DeviceToLogicalXRel(*args
, **kwargs
):
3298 DeviceToLogicalXRel(self, int x) -> int
3300 Convert device X coordinate to relative logical coordinate, using the
3301 current mapping mode but ignoring the x axis orientation. Use this
3302 function for converting a width, for example.
3304 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
3306 def DeviceToLogicalYRel(*args
, **kwargs
):
3308 DeviceToLogicalYRel(self, int y) -> int
3310 Convert device Y coordinate to relative logical coordinate, using the
3311 current mapping mode but ignoring the y axis orientation. Use this
3312 function for converting a height, for example.
3314 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
3316 def LogicalToDeviceX(*args
, **kwargs
):
3318 LogicalToDeviceX(self, int x) -> int
3320 Converts logical X coordinate to device coordinate, using the current
3323 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
3325 def LogicalToDeviceY(*args
, **kwargs
):
3327 LogicalToDeviceY(self, int y) -> int
3329 Converts logical Y coordinate to device coordinate, using the current
3332 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
3334 def LogicalToDeviceXRel(*args
, **kwargs
):
3336 LogicalToDeviceXRel(self, int x) -> int
3338 Converts logical X coordinate to relative device coordinate, using the
3339 current mapping mode but ignoring the x axis orientation. Use this for
3340 converting a width, for example.
3342 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
3344 def LogicalToDeviceYRel(*args
, **kwargs
):
3346 LogicalToDeviceYRel(self, int y) -> int
3348 Converts logical Y coordinate to relative device coordinate, using the
3349 current mapping mode but ignoring the y axis orientation. Use this for
3350 converting a height, for example.
3352 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
3354 def CanDrawBitmap(*args
, **kwargs
):
3355 """CanDrawBitmap(self) -> bool"""
3356 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
3358 def CanGetTextExtent(*args
, **kwargs
):
3359 """CanGetTextExtent(self) -> bool"""
3360 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
3362 def GetDepth(*args
, **kwargs
):
3364 GetDepth(self) -> int
3366 Returns the colour depth of the DC.
3368 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
3370 def GetPPI(*args
, **kwargs
):
3372 GetPPI(self) -> Size
3374 Resolution in Pixels per inch
3376 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
3378 def Ok(*args
, **kwargs
):
3382 Returns true if the DC is ok to use.
3384 return _gdi_
.DC_Ok(*args
, **kwargs
)
3386 def GetBackgroundMode(*args
, **kwargs
):
3388 GetBackgroundMode(self) -> int
3390 Returns the current background mode, either ``wx.SOLID`` or
3393 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
3395 def GetBackground(*args
, **kwargs
):
3397 GetBackground(self) -> Brush
3399 Gets the brush used for painting the background.
3401 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
3403 def GetBrush(*args
, **kwargs
):
3405 GetBrush(self) -> Brush
3407 Gets the current brush
3409 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
3411 def GetFont(*args
, **kwargs
):
3413 GetFont(self) -> Font
3415 Gets the current font
3417 return _gdi_
.DC_GetFont(*args
, **kwargs
)
3419 def GetPen(*args
, **kwargs
):
3423 Gets the current pen
3425 return _gdi_
.DC_GetPen(*args
, **kwargs
)
3427 def GetTextBackground(*args
, **kwargs
):
3429 GetTextBackground(self) -> Colour
3431 Gets the current text background colour
3433 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
3435 def GetTextForeground(*args
, **kwargs
):
3437 GetTextForeground(self) -> Colour
3439 Gets the current text foreground colour
3441 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
3443 def SetTextForeground(*args
, **kwargs
):
3445 SetTextForeground(self, Colour colour)
3447 Sets the current text foreground colour for the DC.
3449 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
3451 def SetTextBackground(*args
, **kwargs
):
3453 SetTextBackground(self, Colour colour)
3455 Sets the current text background colour for the DC.
3457 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
3459 def GetMapMode(*args
, **kwargs
):
3461 GetMapMode(self) -> int
3463 Gets the current *mapping mode* for the device context
3465 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
3467 def SetMapMode(*args
, **kwargs
):
3469 SetMapMode(self, int mode)
3471 The *mapping mode* of the device context defines the unit of
3472 measurement used to convert logical units to device units. The
3473 mapping mode can be one of the following:
3475 ================ =============================================
3476 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3478 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3479 wx.MM_METRIC Each logical unit is 1 mm.
3480 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3481 wx.MM_TEXT Each logical unit is 1 pixel.
3482 ================ =============================================
3485 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
3487 def GetUserScale(*args
, **kwargs
):
3489 GetUserScale(self) -> (xScale, yScale)
3491 Gets the current user scale factor (set by `SetUserScale`).
3493 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
3495 def SetUserScale(*args
, **kwargs
):
3497 SetUserScale(self, double x, double y)
3499 Sets the user scaling factor, useful for applications which require
3502 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
3504 def GetLogicalScale(*args
, **kwargs
):
3505 """GetLogicalScale() -> (xScale, yScale)"""
3506 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
3508 def SetLogicalScale(*args
, **kwargs
):
3509 """SetLogicalScale(self, double x, double y)"""
3510 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
3512 def GetLogicalOrigin(*args
, **kwargs
):
3513 """GetLogicalOrigin(self) -> Point"""
3514 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
3516 def GetLogicalOriginTuple(*args
, **kwargs
):
3517 """GetLogicalOriginTuple() -> (x,y)"""
3518 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
3520 def SetLogicalOrigin(*args
, **kwargs
):
3521 """SetLogicalOrigin(self, int x, int y)"""
3522 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
3524 def SetLogicalOriginPoint(*args
, **kwargs
):
3525 """SetLogicalOriginPoint(self, Point point)"""
3526 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
3528 def GetDeviceOrigin(*args
, **kwargs
):
3529 """GetDeviceOrigin(self) -> Point"""
3530 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
3532 def GetDeviceOriginTuple(*args
, **kwargs
):
3533 """GetDeviceOriginTuple() -> (x,y)"""
3534 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
3536 def SetDeviceOrigin(*args
, **kwargs
):
3537 """SetDeviceOrigin(self, int x, int y)"""
3538 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
3540 def SetDeviceOriginPoint(*args
, **kwargs
):
3541 """SetDeviceOriginPoint(self, Point point)"""
3542 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
3544 def SetAxisOrientation(*args
, **kwargs
):
3546 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3548 Sets the x and y axis orientation (i.e., the direction from lowest to
3549 highest values on the axis). The default orientation is the natural
3550 orientation, e.g. x axis from left to right and y axis from bottom up.
3552 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
3554 def GetLogicalFunction(*args
, **kwargs
):
3556 GetLogicalFunction(self) -> int
3558 Gets the current logical function (set by `SetLogicalFunction`).
3560 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
3562 def SetLogicalFunction(*args
, **kwargs
):
3564 SetLogicalFunction(self, int function)
3566 Sets the current logical function for the device context. This
3567 determines how a source pixel (from a pen or brush colour, or source
3568 device context if using `Blit`) combines with a destination pixel in
3569 the current device context.
3571 The possible values and their meaning in terms of source and
3572 destination pixel values are as follows:
3574 ================ ==========================
3576 wx.AND_INVERT (NOT src) AND dst
3577 wx.AND_REVERSE src AND (NOT dst)
3580 wx.EQUIV (NOT src) XOR dst
3582 wx.NAND (NOT src) OR (NOT dst)
3583 wx.NOR (NOT src) AND (NOT dst)
3586 wx.OR_INVERT (NOT src) OR dst
3587 wx.OR_REVERSE src OR (NOT dst)
3589 wx.SRC_INVERT NOT src
3591 ================ ==========================
3593 The default is wx.COPY, which simply draws with the current
3594 colour. The others combine the current colour and the background using
3595 a logical operation. wx.INVERT is commonly used for drawing rubber
3596 bands or moving outlines, since drawing twice reverts to the original
3600 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
3602 def ComputeScaleAndOrigin(*args
, **kwargs
):
3604 ComputeScaleAndOrigin(self)
3606 Performs all necessary computations for given platform and context
3607 type after each change of scale and origin parameters. Usually called
3608 automatically internally after such changes.
3611 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
3613 def SetOptimization(self
, optimize
):
3615 def GetOptimization(self
):
3618 SetOptimization
= wx
._deprecated
(SetOptimization
)
3619 GetOptimization
= wx
._deprecated
(GetOptimization
)
3621 def CalcBoundingBox(*args
, **kwargs
):
3623 CalcBoundingBox(self, int x, int y)
3625 Adds the specified point to the bounding box which can be retrieved
3626 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3628 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
3630 def CalcBoundingBoxPoint(*args
, **kwargs
):
3632 CalcBoundingBoxPoint(self, Point point)
3634 Adds the specified point to the bounding box which can be retrieved
3635 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3637 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
3639 def ResetBoundingBox(*args
, **kwargs
):
3641 ResetBoundingBox(self)
3643 Resets the bounding box: after a call to this function, the bounding
3644 box doesn't contain anything.
3646 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
3648 def MinX(*args
, **kwargs
):
3652 Gets the minimum horizontal extent used in drawing commands so far.
3654 return _gdi_
.DC_MinX(*args
, **kwargs
)
3656 def MaxX(*args
, **kwargs
):
3660 Gets the maximum horizontal extent used in drawing commands so far.
3662 return _gdi_
.DC_MaxX(*args
, **kwargs
)
3664 def MinY(*args
, **kwargs
):
3668 Gets the minimum vertical extent used in drawing commands so far.
3670 return _gdi_
.DC_MinY(*args
, **kwargs
)
3672 def MaxY(*args
, **kwargs
):
3676 Gets the maximum vertical extent used in drawing commands so far.
3678 return _gdi_
.DC_MaxY(*args
, **kwargs
)
3680 def GetBoundingBox(*args
, **kwargs
):
3682 GetBoundingBox() -> (x1,y1, x2,y2)
3684 Returns the min and max points used in drawing commands so far.
3686 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
3688 def __nonzero__(self
): return self
.Ok()
3689 def _DrawPointList(*args
, **kwargs
):
3690 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3691 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
3693 def _DrawLineList(*args
, **kwargs
):
3694 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3695 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
3697 def _DrawRectangleList(*args
, **kwargs
):
3698 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3699 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
3701 def _DrawEllipseList(*args
, **kwargs
):
3702 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3703 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
3705 def _DrawPolygonList(*args
, **kwargs
):
3706 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3707 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
3709 def _DrawTextList(*args
, **kwargs
):
3711 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
3712 PyObject backgroundList) -> PyObject
3714 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
3716 def DrawPointList(self
, points
, pens
=None):
3718 Draw a list of points as quickly as possible.
3720 :param points: A sequence of 2-element sequences representing
3721 each point to draw, (x,y).
3722 :param pens: If None, then the current pen is used. If a
3723 single pen then it will be used for all points. If
3724 a list of pens then there should be one for each point
3729 elif isinstance(pens
, wx
.Pen
):
3731 elif len(pens
) != len(points
):
3732 raise ValueError('points and pens must have same length')
3733 return self
._DrawPointList
(points
, pens
, [])
3736 def DrawLineList(self
, lines
, pens
=None):
3738 Draw a list of lines as quickly as possible.
3740 :param lines: A sequence of 4-element sequences representing
3741 each line to draw, (x1,y1, x2,y2).
3742 :param pens: If None, then the current pen is used. If a
3743 single pen then it will be used for all lines. If
3744 a list of pens then there should be one for each line
3749 elif isinstance(pens
, wx
.Pen
):
3751 elif len(pens
) != len(lines
):
3752 raise ValueError('lines and pens must have same length')
3753 return self
._DrawLineList
(lines
, pens
, [])
3756 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
3758 Draw a list of rectangles as quickly as possible.
3760 :param rectangles: A sequence of 4-element sequences representing
3761 each rectangle to draw, (x,y, w,h).
3762 :param pens: If None, then the current pen is used. If a
3763 single pen then it will be used for all rectangles.
3764 If a list of pens then there should be one for each
3765 rectangle in rectangles.
3766 :param brushes: A brush or brushes to be used to fill the rectagles,
3767 with similar semantics as the pens parameter.
3771 elif isinstance(pens
, wx
.Pen
):
3773 elif len(pens
) != len(rectangles
):
3774 raise ValueError('rectangles and pens must have same length')
3777 elif isinstance(brushes
, wx
.Brush
):
3779 elif len(brushes
) != len(rectangles
):
3780 raise ValueError('rectangles and brushes must have same length')
3781 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
3784 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
3786 Draw a list of ellipses as quickly as possible.
3788 :param ellipses: A sequence of 4-element sequences representing
3789 each ellipse to draw, (x,y, w,h).
3790 :param pens: If None, then the current pen is used. If a
3791 single pen then it will be used for all ellipses.
3792 If a list of pens then there should be one for each
3793 ellipse in ellipses.
3794 :param brushes: A brush or brushes to be used to fill the ellipses,
3795 with similar semantics as the pens parameter.
3799 elif isinstance(pens
, wx
.Pen
):
3801 elif len(pens
) != len(ellipses
):
3802 raise ValueError('ellipses and pens must have same length')
3805 elif isinstance(brushes
, wx
.Brush
):
3807 elif len(brushes
) != len(ellipses
):
3808 raise ValueError('ellipses and brushes must have same length')
3809 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
3812 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
3814 Draw a list of polygons, each of which is a list of points.
3816 :param polygons: A sequence of sequences of sequences.
3817 [[(x1,y1),(x2,y2),(x3,y3)...],
3818 [(x1,y1),(x2,y2),(x3,y3)...]]
3820 :param pens: If None, then the current pen is used. If a
3821 single pen then it will be used for all polygons.
3822 If a list of pens then there should be one for each
3824 :param brushes: A brush or brushes to be used to fill the polygons,
3825 with similar semantics as the pens parameter.
3829 elif isinstance(pens
, wx
.Pen
):
3831 elif len(pens
) != len(polygons
):
3832 raise ValueError('polygons and pens must have same length')
3835 elif isinstance(brushes
, wx
.Brush
):
3837 elif len(brushes
) != len(polygons
):
3838 raise ValueError('polygons and brushes must have same length')
3839 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
3842 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
3844 Draw a list of strings using a list of coordinants for positioning each string.
3846 :param textList: A list of strings
3847 :param coords: A list of (x,y) positions
3848 :param foregrounds: A list of `wx.Colour` objects to use for the
3849 foregrounds of the strings.
3850 :param backgrounds: A list of `wx.Colour` objects to use for the
3851 backgrounds of the strings.
3853 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
3854 If you want backgrounds to do anything.
3856 if type(textList
) == type(''):
3857 textList
= [textList
]
3858 elif len(textList
) != len(coords
):
3859 raise ValueError('textlist and coords must have same length')
3860 if foregrounds
is None:
3862 elif isinstance(foregrounds
, wx
.Colour
):
3863 foregrounds
= [foregrounds
]
3864 elif len(foregrounds
) != len(coords
):
3865 raise ValueError('foregrounds and coords must have same length')
3866 if backgrounds
is None:
3868 elif isinstance(backgrounds
, wx
.Colour
):
3869 backgrounds
= [backgrounds
]
3870 elif len(backgrounds
) != len(coords
):
3871 raise ValueError('backgrounds and coords must have same length')
3872 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
3876 def __init__(self
, this
):
3878 if not hasattr(self
,"thisown"): self
.thisown
= 0
3880 _gdi_
.DC_swigregister(DCPtr
)
3882 #---------------------------------------------------------------------------
3886 A memory device context provides a means to draw graphics onto a
3887 bitmap. A bitmap must be selected into the new memory DC before it may
3888 be used for anything. Typical usage is as follows::
3891 dc.SelectObject(bitmap)
3892 # draw on the dc usign any of the Draw methods
3893 dc.SelectObject(wx.NullBitmap)
3894 # the bitmap now contains wahtever was drawn upon it
3896 Note that the memory DC *must* be deleted (or the bitmap selected out
3897 of it) before a bitmap can be reselected into another memory DC.
3901 return "<%s.%s; proxy of C++ wxMemoryDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3902 def __init__(self
, *args
, **kwargs
):
3904 __init__(self) -> MemoryDC
3906 Constructs a new memory device context.
3908 Use the Ok member to test whether the constructor was successful in
3909 creating a usable device context. Don't forget to select a bitmap into
3910 the DC before drawing on it.
3912 newobj
= _gdi_
.new_MemoryDC(*args
, **kwargs
)
3913 self
.this
= newobj
.this
3916 def SelectObject(*args
, **kwargs
):
3918 SelectObject(self, Bitmap bitmap)
3920 Selects the bitmap into the device context, to use as the memory
3921 bitmap. Selecting the bitmap into a memory DC allows you to draw into
3922 the DC, and therefore the bitmap, and also to use Blit to copy the
3925 If the argument is wx.NullBitmap (or some other uninitialised
3926 `wx.Bitmap`) the current bitmap is selected out of the device context,
3927 and the original bitmap restored, allowing the current bitmap to be
3930 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
3933 class MemoryDCPtr(MemoryDC
):
3934 def __init__(self
, this
):
3936 if not hasattr(self
,"thisown"): self
.thisown
= 0
3937 self
.__class
__ = MemoryDC
3938 _gdi_
.MemoryDC_swigregister(MemoryDCPtr
)
3940 def MemoryDCFromDC(*args
, **kwargs
):
3942 MemoryDCFromDC(DC oldDC) -> MemoryDC
3944 Creates a DC that is compatible with the oldDC.
3946 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
3950 #---------------------------------------------------------------------------
3952 class BufferedDC(MemoryDC
):
3954 This simple class provides a simple way to avoid flicker: when drawing
3955 on it, everything is in fact first drawn on an in-memory buffer (a
3956 `wx.Bitmap`) and then copied to the screen only once, when this object
3959 It can be used in the same way as any other device
3960 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
3961 want to use it in your EVT_PAINT handler, you should look at
3962 `wx.BufferedPaintDC`.
3966 return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3967 def __init__(self
, *args
):
3969 __init__(self, DC dc, Bitmap buffer) -> BufferedDC
3970 __init__(self, DC dc, Size area) -> BufferedDC
3972 Constructs a buffered DC.
3974 newobj
= _gdi_
.new_BufferedDC(*args
)
3975 self
.this
= newobj
.this
3978 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
3980 def __del__(self
, destroy
=_gdi_
.delete_BufferedDC
):
3984 Copies everything drawn on the DC so far to the underlying DC
3985 associated with this object, if any.
3988 if self
.thisown
: destroy(self
)
3991 def UnMask(*args
, **kwargs
):
3995 Blits the buffer to the dc, and detaches the dc from the buffer (so it
3996 can be effectively used once only). This is usually only called in
3999 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
4002 class BufferedDCPtr(BufferedDC
):
4003 def __init__(self
, this
):
4005 if not hasattr(self
,"thisown"): self
.thisown
= 0
4006 self
.__class
__ = BufferedDC
4007 _gdi_
.BufferedDC_swigregister(BufferedDCPtr
)
4009 class BufferedPaintDC(BufferedDC
):
4011 This is a subclass of `wx.BufferedDC` which can be used inside of an
4012 EVT_PAINT event handler. Just create an object of this class instead
4013 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4014 flicker. The only thing to watch out for is that if you are using this
4015 class together with `wx.ScrolledWindow`, you probably do **not** want
4016 to call `wx.Window.PrepareDC` on it as it already does this internally
4017 for the real underlying `wx.PaintDC`.
4019 If your window is already fully buffered in a `wx.Bitmap` then your
4020 EVT_PAINT handler can be as simple as just creating a
4021 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4022 automatically when it is destroyed. For example::
4024 def OnPaint(self, event):
4025 dc = wx.BufferedPaintDC(self, self.buffer)
4031 return "<%s.%s; proxy of C++ wxBufferedPaintDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4032 def __init__(self
, *args
, **kwargs
):
4034 __init__(self, Window window, Bitmap buffer=NullBitmap) -> BufferedPaintDC
4036 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4037 provide the bitmap to be used for buffering or let this object create
4038 one internally (in the latter case, the size of the client part of the
4039 window is automatically used).
4043 newobj
= _gdi_
.new_BufferedPaintDC(*args
, **kwargs
)
4044 self
.this
= newobj
.this
4048 class BufferedPaintDCPtr(BufferedPaintDC
):
4049 def __init__(self
, this
):
4051 if not hasattr(self
,"thisown"): self
.thisown
= 0
4052 self
.__class
__ = BufferedPaintDC
4053 _gdi_
.BufferedPaintDC_swigregister(BufferedPaintDCPtr
)
4055 #---------------------------------------------------------------------------
4059 A wxScreenDC can be used to paint anywhere on the screen. This should
4060 normally be constructed as a temporary stack object; don't store a
4065 return "<%s.%s; proxy of C++ wxScreenDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4066 def __init__(self
, *args
, **kwargs
):
4068 __init__(self) -> ScreenDC
4070 A wxScreenDC can be used to paint anywhere on the screen. This should
4071 normally be constructed as a temporary stack object; don't store a
4075 newobj
= _gdi_
.new_ScreenDC(*args
, **kwargs
)
4076 self
.this
= newobj
.this
4079 def StartDrawingOnTopWin(*args
, **kwargs
):
4081 StartDrawingOnTopWin(self, Window window) -> bool
4083 Specify that the area of the screen to be drawn upon coincides with
4086 :see: `EndDrawingOnTop`
4088 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4090 def StartDrawingOnTop(*args
, **kwargs
):
4092 StartDrawingOnTop(self, Rect rect=None) -> bool
4094 Specify that the area is the given rectangle, or the whole screen if
4097 :see: `EndDrawingOnTop`
4099 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4101 def EndDrawingOnTop(*args
, **kwargs
):
4103 EndDrawingOnTop(self) -> bool
4105 Use this in conjunction with `StartDrawingOnTop` or
4106 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4107 top of existing windows. Without this, some window systems (such as X)
4108 only allow drawing to take place underneath other windows.
4110 You might use this pair of functions when implementing a drag feature,
4111 for example as in the `wx.SplitterWindow` implementation.
4113 These functions are probably obsolete since the X implementations
4114 allow drawing directly on the screen now. However, the fact that this
4115 function allows the screen to be refreshed afterwards may be useful
4116 to some applications.
4118 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4121 class ScreenDCPtr(ScreenDC
):
4122 def __init__(self
, this
):
4124 if not hasattr(self
,"thisown"): self
.thisown
= 0
4125 self
.__class
__ = ScreenDC
4126 _gdi_
.ScreenDC_swigregister(ScreenDCPtr
)
4128 #---------------------------------------------------------------------------
4132 A wx.ClientDC must be constructed if an application wishes to paint on
4133 the client area of a window from outside an EVT_PAINT event. This should
4134 normally be constructed as a temporary stack object; don't store a
4135 wx.ClientDC object long term.
4137 To draw on a window from within an EVT_PAINT handler, construct a
4138 `wx.PaintDC` object.
4140 To draw on the whole window including decorations, construct a
4141 `wx.WindowDC` object (Windows only).
4145 return "<%s.%s; proxy of C++ wxClientDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4146 def __init__(self
, *args
, **kwargs
):
4148 __init__(self, Window win) -> ClientDC
4150 Constructor. Pass the window on which you wish to paint.
4152 newobj
= _gdi_
.new_ClientDC(*args
, **kwargs
)
4153 self
.this
= newobj
.this
4157 class ClientDCPtr(ClientDC
):
4158 def __init__(self
, this
):
4160 if not hasattr(self
,"thisown"): self
.thisown
= 0
4161 self
.__class
__ = ClientDC
4162 _gdi_
.ClientDC_swigregister(ClientDCPtr
)
4164 #---------------------------------------------------------------------------
4168 A wx.PaintDC must be constructed if an application wishes to paint on
4169 the client area of a window from within an EVT_PAINT event
4170 handler. This should normally be constructed as a temporary stack
4171 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4172 handler, you **must** create a wx.PaintDC object within it even if you
4173 don't actually use it.
4175 Using wx.PaintDC within EVT_PAINT handlers is important because it
4176 automatically sets the clipping area to the damaged area of the
4177 window. Attempts to draw outside this area do not appear.
4179 To draw on a window from outside EVT_PAINT handlers, construct a
4180 `wx.ClientDC` object.
4184 return "<%s.%s; proxy of C++ wxPaintDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4185 def __init__(self
, *args
, **kwargs
):
4187 __init__(self, Window win) -> PaintDC
4189 Constructor. Pass the window on which you wish to paint.
4191 newobj
= _gdi_
.new_PaintDC(*args
, **kwargs
)
4192 self
.this
= newobj
.this
4196 class PaintDCPtr(PaintDC
):
4197 def __init__(self
, this
):
4199 if not hasattr(self
,"thisown"): self
.thisown
= 0
4200 self
.__class
__ = PaintDC
4201 _gdi_
.PaintDC_swigregister(PaintDCPtr
)
4203 #---------------------------------------------------------------------------
4207 A wx.WindowDC must be constructed if an application wishes to paint on
4208 the whole area of a window (client and decorations). This should
4209 normally be constructed as a temporary stack object; don't store a
4213 return "<%s.%s; proxy of C++ wxWindowDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4214 def __init__(self
, *args
, **kwargs
):
4216 __init__(self, Window win) -> WindowDC
4218 Constructor. Pass the window on which you wish to paint.
4220 newobj
= _gdi_
.new_WindowDC(*args
, **kwargs
)
4221 self
.this
= newobj
.this
4225 class WindowDCPtr(WindowDC
):
4226 def __init__(self
, this
):
4228 if not hasattr(self
,"thisown"): self
.thisown
= 0
4229 self
.__class
__ = WindowDC
4230 _gdi_
.WindowDC_swigregister(WindowDCPtr
)
4232 #---------------------------------------------------------------------------
4236 wx.MirrorDC is a simple wrapper class which is always associated with a
4237 real `wx.DC` object and either forwards all of its operations to it
4238 without changes (no mirroring takes place) or exchanges x and y
4239 coordinates which makes it possible to reuse the same code to draw a
4240 figure and its mirror -- i.e. reflection related to the diagonal line
4244 return "<%s.%s; proxy of C++ wxMirrorDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4245 def __init__(self
, *args
, **kwargs
):
4247 __init__(self, DC dc, bool mirror) -> MirrorDC
4249 Creates a mirrored DC associated with the real *dc*. Everything drawn
4250 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4253 newobj
= _gdi_
.new_MirrorDC(*args
, **kwargs
)
4254 self
.this
= newobj
.this
4258 class MirrorDCPtr(MirrorDC
):
4259 def __init__(self
, this
):
4261 if not hasattr(self
,"thisown"): self
.thisown
= 0
4262 self
.__class
__ = MirrorDC
4263 _gdi_
.MirrorDC_swigregister(MirrorDCPtr
)
4265 #---------------------------------------------------------------------------
4267 class PostScriptDC(DC
):
4268 """This is a `wx.DC` that can write to PostScript files on any platform."""
4270 return "<%s.%s; proxy of C++ wxPostScriptDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4271 def __init__(self
, *args
, **kwargs
):
4273 __init__(self, wxPrintData printData) -> PostScriptDC
4275 Constructs a PostScript printer device context from a `wx.PrintData`
4278 newobj
= _gdi_
.new_PostScriptDC(*args
, **kwargs
)
4279 self
.this
= newobj
.this
4282 def GetPrintData(*args
, **kwargs
):
4283 """GetPrintData(self) -> wxPrintData"""
4284 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
4286 def SetPrintData(*args
, **kwargs
):
4287 """SetPrintData(self, wxPrintData data)"""
4288 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
4290 def SetResolution(*args
, **kwargs
):
4292 SetResolution(int ppi)
4294 Set resolution (in pixels per inch) that will be used in PostScript
4295 output. Default is 720ppi.
4297 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4299 SetResolution
= staticmethod(SetResolution
)
4300 def GetResolution(*args
, **kwargs
):
4302 GetResolution() -> int
4304 Return resolution used in PostScript output.
4306 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4308 GetResolution
= staticmethod(GetResolution
)
4310 class PostScriptDCPtr(PostScriptDC
):
4311 def __init__(self
, this
):
4313 if not hasattr(self
,"thisown"): self
.thisown
= 0
4314 self
.__class
__ = PostScriptDC
4315 _gdi_
.PostScriptDC_swigregister(PostScriptDCPtr
)
4317 def PostScriptDC_SetResolution(*args
, **kwargs
):
4319 PostScriptDC_SetResolution(int ppi)
4321 Set resolution (in pixels per inch) that will be used in PostScript
4322 output. Default is 720ppi.
4324 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4326 def PostScriptDC_GetResolution(*args
, **kwargs
):
4328 PostScriptDC_GetResolution() -> int
4330 Return resolution used in PostScript output.
4332 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4334 #---------------------------------------------------------------------------
4336 class MetaFile(_core
.Object
):
4337 """Proxy of C++ MetaFile class"""
4339 return "<%s.%s; proxy of C++ wxMetaFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4340 def __init__(self
, *args
, **kwargs
):
4341 """__init__(self, String filename=EmptyString) -> MetaFile"""
4342 newobj
= _gdi_
.new_MetaFile(*args
, **kwargs
)
4343 self
.this
= newobj
.this
4347 class MetaFilePtr(MetaFile
):
4348 def __init__(self
, this
):
4350 if not hasattr(self
,"thisown"): self
.thisown
= 0
4351 self
.__class
__ = MetaFile
4352 _gdi_
.MetaFile_swigregister(MetaFilePtr
)
4354 class MetaFileDC(DC
):
4355 """Proxy of C++ MetaFileDC class"""
4357 return "<%s.%s; proxy of C++ wxMetaFileDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4358 def __init__(self
, *args
, **kwargs
):
4360 __init__(self, String filename=EmptyString, int width=0, int height=0,
4361 String description=EmptyString) -> MetaFileDC
4363 newobj
= _gdi_
.new_MetaFileDC(*args
, **kwargs
)
4364 self
.this
= newobj
.this
4368 class MetaFileDCPtr(MetaFileDC
):
4369 def __init__(self
, this
):
4371 if not hasattr(self
,"thisown"): self
.thisown
= 0
4372 self
.__class
__ = MetaFileDC
4373 _gdi_
.MetaFileDC_swigregister(MetaFileDCPtr
)
4375 class PrinterDC(DC
):
4376 """Proxy of C++ PrinterDC class"""
4378 return "<%s.%s; proxy of C++ wxPrinterDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4379 def __init__(self
, *args
, **kwargs
):
4380 """__init__(self, wxPrintData printData) -> PrinterDC"""
4381 newobj
= _gdi_
.new_PrinterDC(*args
, **kwargs
)
4382 self
.this
= newobj
.this
4386 class PrinterDCPtr(PrinterDC
):
4387 def __init__(self
, this
):
4389 if not hasattr(self
,"thisown"): self
.thisown
= 0
4390 self
.__class
__ = PrinterDC
4391 _gdi_
.PrinterDC_swigregister(PrinterDCPtr
)
4393 #---------------------------------------------------------------------------
4395 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
4396 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
4397 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
4398 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
4399 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
4400 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
4401 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
4402 class ImageList(_core
.Object
):
4403 """Proxy of C++ ImageList class"""
4405 return "<%s.%s; proxy of C++ wxImageList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4406 def __init__(self
, *args
, **kwargs
):
4407 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4408 newobj
= _gdi_
.new_ImageList(*args
, **kwargs
)
4409 self
.this
= newobj
.this
4412 def __del__(self
, destroy
=_gdi_
.delete_ImageList
):
4415 if self
.thisown
: destroy(self
)
4418 def Add(*args
, **kwargs
):
4419 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4420 return _gdi_
.ImageList_Add(*args
, **kwargs
)
4422 def AddWithColourMask(*args
, **kwargs
):
4423 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4424 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
4426 def AddIcon(*args
, **kwargs
):
4427 """AddIcon(self, Icon icon) -> int"""
4428 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
4430 def Replace(*args
, **kwargs
):
4431 """Replace(self, int index, Bitmap bitmap) -> bool"""
4432 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
4434 def Draw(*args
, **kwargs
):
4436 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4437 bool solidBackground=False) -> bool
4439 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
4441 def GetImageCount(*args
, **kwargs
):
4442 """GetImageCount(self) -> int"""
4443 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
4445 def Remove(*args
, **kwargs
):
4446 """Remove(self, int index) -> bool"""
4447 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
4449 def RemoveAll(*args
, **kwargs
):
4450 """RemoveAll(self) -> bool"""
4451 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
4453 def GetSize(*args
, **kwargs
):
4454 """GetSize() -> (width,height)"""
4455 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
4458 class ImageListPtr(ImageList
):
4459 def __init__(self
, this
):
4461 if not hasattr(self
,"thisown"): self
.thisown
= 0
4462 self
.__class
__ = ImageList
4463 _gdi_
.ImageList_swigregister(ImageListPtr
)
4465 #---------------------------------------------------------------------------
4467 class PenList(_core
.Object
):
4468 """Proxy of C++ PenList class"""
4469 def __init__(self
): raise RuntimeError, "No constructor defined"
4471 return "<%s.%s; proxy of C++ wxPenList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4472 def AddPen(*args
, **kwargs
):
4473 """AddPen(self, Pen pen)"""
4474 return _gdi_
.PenList_AddPen(*args
, **kwargs
)
4476 def FindOrCreatePen(*args
, **kwargs
):
4477 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
4478 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
4480 def RemovePen(*args
, **kwargs
):
4481 """RemovePen(self, Pen pen)"""
4482 return _gdi_
.PenList_RemovePen(*args
, **kwargs
)
4484 def GetCount(*args
, **kwargs
):
4485 """GetCount(self) -> int"""
4486 return _gdi_
.PenList_GetCount(*args
, **kwargs
)
4489 class PenListPtr(PenList
):
4490 def __init__(self
, this
):
4492 if not hasattr(self
,"thisown"): self
.thisown
= 0
4493 self
.__class
__ = PenList
4494 _gdi_
.PenList_swigregister(PenListPtr
)
4496 NORMAL_FONT
= cvar
.NORMAL_FONT
4497 SMALL_FONT
= cvar
.SMALL_FONT
4498 ITALIC_FONT
= cvar
.ITALIC_FONT
4499 SWISS_FONT
= cvar
.SWISS_FONT
4500 RED_PEN
= cvar
.RED_PEN
4501 CYAN_PEN
= cvar
.CYAN_PEN
4502 GREEN_PEN
= cvar
.GREEN_PEN
4503 BLACK_PEN
= cvar
.BLACK_PEN
4504 WHITE_PEN
= cvar
.WHITE_PEN
4505 TRANSPARENT_PEN
= cvar
.TRANSPARENT_PEN
4506 BLACK_DASHED_PEN
= cvar
.BLACK_DASHED_PEN
4507 GREY_PEN
= cvar
.GREY_PEN
4508 MEDIUM_GREY_PEN
= cvar
.MEDIUM_GREY_PEN
4509 LIGHT_GREY_PEN
= cvar
.LIGHT_GREY_PEN
4510 BLUE_BRUSH
= cvar
.BLUE_BRUSH
4511 GREEN_BRUSH
= cvar
.GREEN_BRUSH
4512 WHITE_BRUSH
= cvar
.WHITE_BRUSH
4513 BLACK_BRUSH
= cvar
.BLACK_BRUSH
4514 TRANSPARENT_BRUSH
= cvar
.TRANSPARENT_BRUSH
4515 CYAN_BRUSH
= cvar
.CYAN_BRUSH
4516 RED_BRUSH
= cvar
.RED_BRUSH
4517 GREY_BRUSH
= cvar
.GREY_BRUSH
4518 MEDIUM_GREY_BRUSH
= cvar
.MEDIUM_GREY_BRUSH
4519 LIGHT_GREY_BRUSH
= cvar
.LIGHT_GREY_BRUSH
4526 LIGHT_GREY
= cvar
.LIGHT_GREY
4527 STANDARD_CURSOR
= cvar
.STANDARD_CURSOR
4528 HOURGLASS_CURSOR
= cvar
.HOURGLASS_CURSOR
4529 CROSS_CURSOR
= cvar
.CROSS_CURSOR
4530 NullBitmap
= cvar
.NullBitmap
4531 NullIcon
= cvar
.NullIcon
4532 NullCursor
= cvar
.NullCursor
4533 NullPen
= cvar
.NullPen
4534 NullBrush
= cvar
.NullBrush
4535 NullPalette
= cvar
.NullPalette
4536 NullFont
= cvar
.NullFont
4537 NullColour
= cvar
.NullColour
4539 class BrushList(_core
.Object
):
4540 """Proxy of C++ BrushList class"""
4541 def __init__(self
): raise RuntimeError, "No constructor defined"
4543 return "<%s.%s; proxy of C++ wxBrushList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4544 def AddBrush(*args
, **kwargs
):
4545 """AddBrush(self, Brush brush)"""
4546 return _gdi_
.BrushList_AddBrush(*args
, **kwargs
)
4548 def FindOrCreateBrush(*args
, **kwargs
):
4549 """FindOrCreateBrush(self, Colour colour, int style) -> Brush"""
4550 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
4552 def RemoveBrush(*args
, **kwargs
):
4553 """RemoveBrush(self, Brush brush)"""
4554 return _gdi_
.BrushList_RemoveBrush(*args
, **kwargs
)
4556 def GetCount(*args
, **kwargs
):
4557 """GetCount(self) -> int"""
4558 return _gdi_
.BrushList_GetCount(*args
, **kwargs
)
4561 class BrushListPtr(BrushList
):
4562 def __init__(self
, this
):
4564 if not hasattr(self
,"thisown"): self
.thisown
= 0
4565 self
.__class
__ = BrushList
4566 _gdi_
.BrushList_swigregister(BrushListPtr
)
4568 class ColourDatabase(_core
.Object
):
4569 """Proxy of C++ ColourDatabase class"""
4571 return "<%s.%s; proxy of C++ wxColourDatabase instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4572 def __init__(self
, *args
, **kwargs
):
4573 """__init__(self) -> ColourDatabase"""
4574 newobj
= _gdi_
.new_ColourDatabase(*args
, **kwargs
)
4575 self
.this
= newobj
.this
4578 def __del__(self
, destroy
=_gdi_
.delete_ColourDatabase
):
4581 if self
.thisown
: destroy(self
)
4584 def Find(*args
, **kwargs
):
4585 """Find(self, String name) -> Colour"""
4586 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
4588 def FindName(*args
, **kwargs
):
4589 """FindName(self, Colour colour) -> String"""
4590 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
4593 def AddColour(*args
, **kwargs
):
4594 """AddColour(self, String name, Colour colour)"""
4595 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
4597 def Append(*args
, **kwargs
):
4598 """Append(self, String name, int red, int green, int blue)"""
4599 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
4602 class ColourDatabasePtr(ColourDatabase
):
4603 def __init__(self
, this
):
4605 if not hasattr(self
,"thisown"): self
.thisown
= 0
4606 self
.__class
__ = ColourDatabase
4607 _gdi_
.ColourDatabase_swigregister(ColourDatabasePtr
)
4609 class FontList(_core
.Object
):
4610 """Proxy of C++ FontList class"""
4611 def __init__(self
): raise RuntimeError, "No constructor defined"
4613 return "<%s.%s; proxy of C++ wxFontList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4614 def AddFont(*args
, **kwargs
):
4615 """AddFont(self, Font font)"""
4616 return _gdi_
.FontList_AddFont(*args
, **kwargs
)
4618 def FindOrCreateFont(*args
, **kwargs
):
4620 FindOrCreateFont(self, int point_size, int family, int style, int weight,
4621 bool underline=False, String facename=EmptyString,
4622 int encoding=FONTENCODING_DEFAULT) -> Font
4624 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
4626 def RemoveFont(*args
, **kwargs
):
4627 """RemoveFont(self, Font font)"""
4628 return _gdi_
.FontList_RemoveFont(*args
, **kwargs
)
4630 def GetCount(*args
, **kwargs
):
4631 """GetCount(self) -> int"""
4632 return _gdi_
.FontList_GetCount(*args
, **kwargs
)
4635 class FontListPtr(FontList
):
4636 def __init__(self
, this
):
4638 if not hasattr(self
,"thisown"): self
.thisown
= 0
4639 self
.__class
__ = FontList
4640 _gdi_
.FontList_swigregister(FontListPtr
)
4642 #---------------------------------------------------------------------------
4644 NullColor
= NullColour
4645 #---------------------------------------------------------------------------
4647 class Effects(_core
.Object
):
4648 """Proxy of C++ Effects class"""
4650 return "<%s.%s; proxy of C++ wxEffects instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4651 def __init__(self
, *args
, **kwargs
):
4652 """__init__(self) -> Effects"""
4653 newobj
= _gdi_
.new_Effects(*args
, **kwargs
)
4654 self
.this
= newobj
.this
4657 def GetHighlightColour(*args
, **kwargs
):
4658 """GetHighlightColour(self) -> Colour"""
4659 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
4661 def GetLightShadow(*args
, **kwargs
):
4662 """GetLightShadow(self) -> Colour"""
4663 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
4665 def GetFaceColour(*args
, **kwargs
):
4666 """GetFaceColour(self) -> Colour"""
4667 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
4669 def GetMediumShadow(*args
, **kwargs
):
4670 """GetMediumShadow(self) -> Colour"""
4671 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
4673 def GetDarkShadow(*args
, **kwargs
):
4674 """GetDarkShadow(self) -> Colour"""
4675 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
4677 def SetHighlightColour(*args
, **kwargs
):
4678 """SetHighlightColour(self, Colour c)"""
4679 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
4681 def SetLightShadow(*args
, **kwargs
):
4682 """SetLightShadow(self, Colour c)"""
4683 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
4685 def SetFaceColour(*args
, **kwargs
):
4686 """SetFaceColour(self, Colour c)"""
4687 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
4689 def SetMediumShadow(*args
, **kwargs
):
4690 """SetMediumShadow(self, Colour c)"""
4691 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
4693 def SetDarkShadow(*args
, **kwargs
):
4694 """SetDarkShadow(self, Colour c)"""
4695 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
4697 def Set(*args
, **kwargs
):
4699 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
4700 Colour mediumShadow, Colour darkShadow)
4702 return _gdi_
.Effects_Set(*args
, **kwargs
)
4704 def DrawSunkenEdge(*args
, **kwargs
):
4705 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
4706 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
4708 def TileBitmap(*args
, **kwargs
):
4709 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
4710 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
4713 class EffectsPtr(Effects
):
4714 def __init__(self
, this
):
4716 if not hasattr(self
,"thisown"): self
.thisown
= 0
4717 self
.__class
__ = Effects
4718 _gdi_
.Effects_swigregister(EffectsPtr
)
4719 TheFontList
= cvar
.TheFontList
4720 ThePenList
= cvar
.ThePenList
4721 TheBrushList
= cvar
.TheBrushList
4722 TheColourDatabase
= cvar
.TheColourDatabase