1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
8 #---------------------------------------------------------------------------
10 class GDIObject(_core
.Object
):
12 return "<%s.%s; proxy of C++ wxGDIObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
13 def __init__(self
, *args
, **kwargs
):
14 """__init__(self) -> GDIObject"""
15 newobj
= _gdi_
.new_GDIObject(*args
, **kwargs
)
16 self
.this
= newobj
.this
19 def __del__(self
, destroy
=_gdi_
.delete_GDIObject
):
22 if self
.thisown
: destroy(self
)
25 def GetVisible(*args
, **kwargs
):
26 """GetVisible(self) -> bool"""
27 return _gdi_
.GDIObject_GetVisible(*args
, **kwargs
)
29 def SetVisible(*args
, **kwargs
):
30 """SetVisible(self, bool visible)"""
31 return _gdi_
.GDIObject_SetVisible(*args
, **kwargs
)
33 def IsNull(*args
, **kwargs
):
34 """IsNull(self) -> bool"""
35 return _gdi_
.GDIObject_IsNull(*args
, **kwargs
)
38 class GDIObjectPtr(GDIObject
):
39 def __init__(self
, this
):
41 if not hasattr(self
,"thisown"): self
.thisown
= 0
42 self
.__class
__ = GDIObject
43 _gdi_
.GDIObject_swigregister(GDIObjectPtr
)
45 #---------------------------------------------------------------------------
47 class Colour(_core
.Object
):
49 A colour is an object representing a combination of Red, Green, and
50 Blue (RGB) intensity values, and is used to determine drawing colours,
51 window colours, etc. Valid RGB values are in the range 0 to 255.
53 In wxPython there are typemaps that will automatically convert from a
54 colour name, or from a '#RRGGBB' colour hex value string to a
55 wx.Colour object when calling C++ methods that expect a wxColour.
56 This means that the following are all equivallent::
58 win.SetBackgroundColour(wxColour(0,0,255))
59 win.SetBackgroundColour('BLUE')
60 win.SetBackgroundColour('#0000FF')
62 Additional colour names and their coresponding values can be added
63 using `wx.ColourDatabase`. Various system colours (as set in the
64 user's system preferences) can be retrieved with
65 `wx.SystemSettings.GetColour`.
69 return "<%s.%s; proxy of C++ wxColour instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
70 def __init__(self
, *args
, **kwargs
):
72 __init__(self, byte red=0, byte green=0, byte blue=0) -> Colour
74 Constructs a colour from red, green and blue values.
76 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
79 newobj
= _gdi_
.new_Colour(*args
, **kwargs
)
80 self
.this
= newobj
.this
83 def __del__(self
, destroy
=_gdi_
.delete_Colour
):
86 if self
.thisown
: destroy(self
)
89 def Red(*args
, **kwargs
):
93 Returns the red intensity.
95 return _gdi_
.Colour_Red(*args
, **kwargs
)
97 def Green(*args
, **kwargs
):
101 Returns the green intensity.
103 return _gdi_
.Colour_Green(*args
, **kwargs
)
105 def Blue(*args
, **kwargs
):
109 Returns the blue intensity.
111 return _gdi_
.Colour_Blue(*args
, **kwargs
)
113 def Ok(*args
, **kwargs
):
117 Returns True if the colour object is valid (the colour has been
118 initialised with RGB values).
120 return _gdi_
.Colour_Ok(*args
, **kwargs
)
122 def Set(*args
, **kwargs
):
124 Set(self, byte red, byte green, byte blue)
126 Sets the RGB intensity values.
128 return _gdi_
.Colour_Set(*args
, **kwargs
)
130 def SetRGB(*args
, **kwargs
):
132 SetRGB(self, unsigned long colRGB)
134 Sets the RGB intensity values from a packed RGB value.
136 return _gdi_
.Colour_SetRGB(*args
, **kwargs
)
138 def SetFromName(*args
, **kwargs
):
140 SetFromName(self, String colourName)
142 Sets the RGB intensity values using a colour name listed in
143 ``wx.TheColourDatabase``.
145 return _gdi_
.Colour_SetFromName(*args
, **kwargs
)
147 def GetPixel(*args
, **kwargs
):
149 GetPixel(self) -> long
151 Returns a pixel value which is platform-dependent. On Windows, a
152 COLORREF is returned. On X, an allocated pixel value is returned. -1
153 is returned if the pixel is invalid (on X, unallocated).
155 return _gdi_
.Colour_GetPixel(*args
, **kwargs
)
157 def __eq__(*args
, **kwargs
):
159 __eq__(self, Colour colour) -> bool
161 Compare colours for equality
163 return _gdi_
.Colour___eq__(*args
, **kwargs
)
165 def __ne__(*args
, **kwargs
):
167 __ne__(self, Colour colour) -> bool
169 Compare colours for inequality
171 return _gdi_
.Colour___ne__(*args
, **kwargs
)
173 def Get(*args
, **kwargs
):
177 Returns the RGB intensity values as a tuple.
179 return _gdi_
.Colour_Get(*args
, **kwargs
)
181 def GetRGB(*args
, **kwargs
):
183 GetRGB(self) -> unsigned long
185 Return the colour as a packed RGB value
187 return _gdi_
.Colour_GetRGB(*args
, **kwargs
)
189 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
190 def __str__(self
): return str(self
.Get())
191 def __repr__(self
): return 'wx.Colour' + str(self
.Get())
192 def __nonzero__(self
): return self
.Ok()
193 __safe_for_unpickling__
= True
194 def __reduce__(self
): return (Colour
, self
.Get())
197 class ColourPtr(Colour
):
198 def __init__(self
, this
):
200 if not hasattr(self
,"thisown"): self
.thisown
= 0
201 self
.__class
__ = Colour
202 _gdi_
.Colour_swigregister(ColourPtr
)
204 def NamedColour(*args
, **kwargs
):
206 NamedColour(String colorName) -> Colour
208 Constructs a colour object using a colour name listed in
209 ``wx.TheColourDatabase``.
211 val
= _gdi_
.new_NamedColour(*args
, **kwargs
)
215 def ColourRGB(*args
, **kwargs
):
217 ColourRGB(unsigned long colRGB) -> Colour
219 Constructs a colour from a packed RGB value.
221 val
= _gdi_
.new_ColourRGB(*args
, **kwargs
)
226 NamedColor
= NamedColour
229 class Palette(GDIObject
):
231 return "<%s.%s; proxy of C++ wxPalette instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
232 def __init__(self
, *args
, **kwargs
):
233 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
234 newobj
= _gdi_
.new_Palette(*args
, **kwargs
)
235 self
.this
= newobj
.this
238 def __del__(self
, destroy
=_gdi_
.delete_Palette
):
241 if self
.thisown
: destroy(self
)
244 def GetPixel(*args
, **kwargs
):
245 """GetPixel(self, byte red, byte green, byte blue) -> int"""
246 return _gdi_
.Palette_GetPixel(*args
, **kwargs
)
248 def GetRGB(*args
, **kwargs
):
249 """GetRGB(self, int pixel) -> (R,G,B)"""
250 return _gdi_
.Palette_GetRGB(*args
, **kwargs
)
252 def GetColoursCount(*args
, **kwargs
):
253 """GetColoursCount(self) -> int"""
254 return _gdi_
.Palette_GetColoursCount(*args
, **kwargs
)
256 def Ok(*args
, **kwargs
):
257 """Ok(self) -> bool"""
258 return _gdi_
.Palette_Ok(*args
, **kwargs
)
260 def __nonzero__(self
): return self
.Ok()
262 class PalettePtr(Palette
):
263 def __init__(self
, this
):
265 if not hasattr(self
,"thisown"): self
.thisown
= 0
266 self
.__class
__ = Palette
267 _gdi_
.Palette_swigregister(PalettePtr
)
269 #---------------------------------------------------------------------------
271 class Pen(GDIObject
):
273 return "<%s.%s; proxy of C++ wxPen instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
274 def __init__(self
, *args
, **kwargs
):
275 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
276 newobj
= _gdi_
.new_Pen(*args
, **kwargs
)
277 self
.this
= newobj
.this
280 def __del__(self
, destroy
=_gdi_
.delete_Pen
):
283 if self
.thisown
: destroy(self
)
286 def GetCap(*args
, **kwargs
):
287 """GetCap(self) -> int"""
288 return _gdi_
.Pen_GetCap(*args
, **kwargs
)
290 def GetColour(*args
, **kwargs
):
291 """GetColour(self) -> Colour"""
292 return _gdi_
.Pen_GetColour(*args
, **kwargs
)
294 def GetJoin(*args
, **kwargs
):
295 """GetJoin(self) -> int"""
296 return _gdi_
.Pen_GetJoin(*args
, **kwargs
)
298 def GetStyle(*args
, **kwargs
):
299 """GetStyle(self) -> int"""
300 return _gdi_
.Pen_GetStyle(*args
, **kwargs
)
302 def GetWidth(*args
, **kwargs
):
303 """GetWidth(self) -> int"""
304 return _gdi_
.Pen_GetWidth(*args
, **kwargs
)
306 def Ok(*args
, **kwargs
):
307 """Ok(self) -> bool"""
308 return _gdi_
.Pen_Ok(*args
, **kwargs
)
310 def SetCap(*args
, **kwargs
):
311 """SetCap(self, int cap_style)"""
312 return _gdi_
.Pen_SetCap(*args
, **kwargs
)
314 def SetColour(*args
, **kwargs
):
315 """SetColour(self, Colour colour)"""
316 return _gdi_
.Pen_SetColour(*args
, **kwargs
)
318 def SetJoin(*args
, **kwargs
):
319 """SetJoin(self, int join_style)"""
320 return _gdi_
.Pen_SetJoin(*args
, **kwargs
)
322 def SetStyle(*args
, **kwargs
):
323 """SetStyle(self, int style)"""
324 return _gdi_
.Pen_SetStyle(*args
, **kwargs
)
326 def SetWidth(*args
, **kwargs
):
327 """SetWidth(self, int width)"""
328 return _gdi_
.Pen_SetWidth(*args
, **kwargs
)
330 def SetDashes(*args
, **kwargs
):
331 """SetDashes(self, int dashes, wxDash dashes_array)"""
332 return _gdi_
.Pen_SetDashes(*args
, **kwargs
)
334 def GetDashes(*args
, **kwargs
):
335 """GetDashes(self) -> PyObject"""
336 return _gdi_
.Pen_GetDashes(*args
, **kwargs
)
338 def _SetDashes(*args
, **kwargs
):
339 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
340 return _gdi_
.Pen__SetDashes(*args
, **kwargs
)
342 def SetDashes(self
, dashes
):
344 Associate a list of dash lengths with the Pen.
346 self
._SetDashes
(self
, dashes
)
348 def GetDashCount(*args
, **kwargs
):
349 """GetDashCount(self) -> int"""
350 return _gdi_
.Pen_GetDashCount(*args
, **kwargs
)
352 def GetStipple(*args
, **kwargs
):
353 """GetStipple(self) -> Bitmap"""
354 return _gdi_
.Pen_GetStipple(*args
, **kwargs
)
356 def SetStipple(*args
, **kwargs
):
357 """SetStipple(self, Bitmap stipple)"""
358 return _gdi_
.Pen_SetStipple(*args
, **kwargs
)
360 def __eq__(*args
, **kwargs
):
361 """__eq__(self, Pen other) -> bool"""
362 return _gdi_
.Pen___eq__(*args
, **kwargs
)
364 def __ne__(*args
, **kwargs
):
365 """__ne__(self, Pen other) -> bool"""
366 return _gdi_
.Pen___ne__(*args
, **kwargs
)
368 def __nonzero__(self
): return self
.Ok()
371 def __init__(self
, this
):
373 if not hasattr(self
,"thisown"): self
.thisown
= 0
375 _gdi_
.Pen_swigregister(PenPtr
)
377 #---------------------------------------------------------------------------
379 class Brush(GDIObject
):
381 A brush is a drawing tool for filling in areas. It is used for
382 painting the background of rectangles, ellipses, etc. when drawing on
383 a `wx.DC`. It has a colour and a style.
386 return "<%s.%s; proxy of C++ wxBrush instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
387 def __init__(self
, *args
, **kwargs
):
389 __init__(self, Colour colour, int style=SOLID) -> Brush
391 Constructs a brush from a `wx.Colour` object and a style.
393 newobj
= _gdi_
.new_Brush(*args
, **kwargs
)
394 self
.this
= newobj
.this
397 def __del__(self
, destroy
=_gdi_
.delete_Brush
):
400 if self
.thisown
: destroy(self
)
403 def SetColour(*args
, **kwargs
):
405 SetColour(self, Colour col)
407 Set the brush's `wx.Colour`.
409 return _gdi_
.Brush_SetColour(*args
, **kwargs
)
411 def SetStyle(*args
, **kwargs
):
413 SetStyle(self, int style)
415 Sets the style of the brush. See `__init__` for a listing of styles.
417 return _gdi_
.Brush_SetStyle(*args
, **kwargs
)
419 def SetStipple(*args
, **kwargs
):
421 SetStipple(self, Bitmap stipple)
423 Sets the stipple `wx.Bitmap`.
425 return _gdi_
.Brush_SetStipple(*args
, **kwargs
)
427 def GetColour(*args
, **kwargs
):
429 GetColour(self) -> Colour
431 Returns the `wx.Colour` of the brush.
433 return _gdi_
.Brush_GetColour(*args
, **kwargs
)
435 def GetStyle(*args
, **kwargs
):
437 GetStyle(self) -> int
439 Returns the style of the brush. See `__init__` for a listing of
442 return _gdi_
.Brush_GetStyle(*args
, **kwargs
)
444 def GetStipple(*args
, **kwargs
):
446 GetStipple(self) -> Bitmap
448 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
449 have a wx.STIPPLE style, then the return value may be non-None but an
450 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
452 return _gdi_
.Brush_GetStipple(*args
, **kwargs
)
454 def IsHatch(*args
, **kwargs
):
456 IsHatch(self) -> bool
458 Is the current style a hatch type?
460 return _gdi_
.Brush_IsHatch(*args
, **kwargs
)
462 def Ok(*args
, **kwargs
):
466 Returns True if the brush is initialised and valid.
468 return _gdi_
.Brush_Ok(*args
, **kwargs
)
470 def __nonzero__(self
): return self
.Ok()
472 class BrushPtr(Brush
):
473 def __init__(self
, this
):
475 if not hasattr(self
,"thisown"): self
.thisown
= 0
476 self
.__class
__ = Brush
477 _gdi_
.Brush_swigregister(BrushPtr
)
479 class Bitmap(GDIObject
):
481 The wx.Bitmap class encapsulates the concept of a platform-dependent
482 bitmap. It can be either monochrome or colour, and either loaded from
483 a file or created dynamically. A bitmap can be selected into a memory
484 device context (instance of `wx.MemoryDC`). This enables the bitmap to
485 be copied to a window or memory device context using `wx.DC.Blit`, or
486 to be used as a drawing surface.
489 return "<%s.%s; proxy of C++ wxBitmap instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
490 def __init__(self
, *args
, **kwargs
):
492 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
494 Loads a bitmap from a file.
496 newobj
= _gdi_
.new_Bitmap(*args
, **kwargs
)
497 self
.this
= newobj
.this
500 def __del__(self
, destroy
=_gdi_
.delete_Bitmap
):
503 if self
.thisown
: destroy(self
)
506 def GetHandle(*args
, **kwargs
):
507 """GetHandle(self) -> long"""
508 return _gdi_
.Bitmap_GetHandle(*args
, **kwargs
)
510 def SetHandle(*args
, **kwargs
):
511 """SetHandle(self, long handle)"""
512 return _gdi_
.Bitmap_SetHandle(*args
, **kwargs
)
514 def Ok(*args
, **kwargs
):
515 """Ok(self) -> bool"""
516 return _gdi_
.Bitmap_Ok(*args
, **kwargs
)
518 def GetWidth(*args
, **kwargs
):
520 GetWidth(self) -> int
522 Gets the width of the bitmap in pixels.
524 return _gdi_
.Bitmap_GetWidth(*args
, **kwargs
)
526 def GetHeight(*args
, **kwargs
):
528 GetHeight(self) -> int
530 Gets the height of the bitmap in pixels.
532 return _gdi_
.Bitmap_GetHeight(*args
, **kwargs
)
534 def GetDepth(*args
, **kwargs
):
536 GetDepth(self) -> int
538 Gets the colour depth of the bitmap. A value of 1 indicates a
541 return _gdi_
.Bitmap_GetDepth(*args
, **kwargs
)
543 def GetSize(*args
, **kwargs
):
545 GetSize(self) -> Size
547 Get the size of the bitmap.
549 return _gdi_
.Bitmap_GetSize(*args
, **kwargs
)
551 def ConvertToImage(*args
, **kwargs
):
553 ConvertToImage(self) -> Image
555 Creates a platform-independent image from a platform-dependent
556 bitmap. This preserves mask information so that bitmaps and images can
557 be converted back and forth without loss in that respect.
559 return _gdi_
.Bitmap_ConvertToImage(*args
, **kwargs
)
561 def GetMask(*args
, **kwargs
):
563 GetMask(self) -> Mask
565 Gets the associated mask (if any) which may have been loaded from a
566 file or explpicitly set for the bitmap.
568 :see: `SetMask`, `wx.Mask`
571 return _gdi_
.Bitmap_GetMask(*args
, **kwargs
)
573 def SetMask(*args
, **kwargs
):
575 SetMask(self, Mask mask)
577 Sets the mask for this bitmap.
579 :see: `GetMask`, `wx.Mask`
582 return _gdi_
.Bitmap_SetMask(*args
, **kwargs
)
584 def SetMaskColour(*args
, **kwargs
):
586 SetMaskColour(self, Colour colour)
588 Create a Mask based on a specified colour in the Bitmap.
590 return _gdi_
.Bitmap_SetMaskColour(*args
, **kwargs
)
592 def GetSubBitmap(*args
, **kwargs
):
594 GetSubBitmap(self, Rect rect) -> Bitmap
596 Returns a sub-bitmap of the current one as long as the rect belongs
597 entirely to the bitmap. This function preserves bit depth and mask
600 return _gdi_
.Bitmap_GetSubBitmap(*args
, **kwargs
)
602 def SaveFile(*args
, **kwargs
):
604 SaveFile(self, String name, int type, Palette palette=None) -> bool
606 Saves a bitmap in the named file. See `__init__` for a description of
607 the ``type`` parameter.
609 return _gdi_
.Bitmap_SaveFile(*args
, **kwargs
)
611 def LoadFile(*args
, **kwargs
):
613 LoadFile(self, String name, int type) -> bool
615 Loads a bitmap from a file. See `__init__` for a description of the
618 return _gdi_
.Bitmap_LoadFile(*args
, **kwargs
)
620 def GetPalette(*args
, **kwargs
):
621 """GetPalette(self) -> Palette"""
622 return _gdi_
.Bitmap_GetPalette(*args
, **kwargs
)
624 def SetPalette(*args
, **kwargs
):
625 """SetPalette(self, Palette palette)"""
626 return _gdi_
.Bitmap_SetPalette(*args
, **kwargs
)
628 def CopyFromIcon(*args
, **kwargs
):
629 """CopyFromIcon(self, Icon icon) -> bool"""
630 return _gdi_
.Bitmap_CopyFromIcon(*args
, **kwargs
)
632 def SetHeight(*args
, **kwargs
):
634 SetHeight(self, int height)
636 Set the height property (does not affect the existing bitmap data).
638 return _gdi_
.Bitmap_SetHeight(*args
, **kwargs
)
640 def SetWidth(*args
, **kwargs
):
642 SetWidth(self, int width)
644 Set the width property (does not affect the existing bitmap data).
646 return _gdi_
.Bitmap_SetWidth(*args
, **kwargs
)
648 def SetDepth(*args
, **kwargs
):
650 SetDepth(self, int depth)
652 Set the depth property (does not affect the existing bitmap data).
654 return _gdi_
.Bitmap_SetDepth(*args
, **kwargs
)
656 def SetSize(*args
, **kwargs
):
658 SetSize(self, Size size)
660 Set the bitmap size (does not affect the existing bitmap data).
662 return _gdi_
.Bitmap_SetSize(*args
, **kwargs
)
664 def CopyFromCursor(*args
, **kwargs
):
665 """CopyFromCursor(self, Cursor cursor) -> bool"""
666 return _gdi_
.Bitmap_CopyFromCursor(*args
, **kwargs
)
668 def GetQuality(*args
, **kwargs
):
669 """GetQuality(self) -> int"""
670 return _gdi_
.Bitmap_GetQuality(*args
, **kwargs
)
672 def SetQuality(*args
, **kwargs
):
673 """SetQuality(self, int q)"""
674 return _gdi_
.Bitmap_SetQuality(*args
, **kwargs
)
676 def __nonzero__(self
): return self
.Ok()
677 def __eq__(*args
, **kwargs
):
678 """__eq__(self, Bitmap other) -> bool"""
679 return _gdi_
.Bitmap___eq__(*args
, **kwargs
)
681 def __ne__(*args
, **kwargs
):
682 """__ne__(self, Bitmap other) -> bool"""
683 return _gdi_
.Bitmap___ne__(*args
, **kwargs
)
686 class BitmapPtr(Bitmap
):
687 def __init__(self
, this
):
689 if not hasattr(self
,"thisown"): self
.thisown
= 0
690 self
.__class
__ = Bitmap
691 _gdi_
.Bitmap_swigregister(BitmapPtr
)
693 def EmptyBitmap(*args
, **kwargs
):
695 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
697 Creates a new bitmap of the given size. A depth of -1 indicates the
698 depth of the current screen or visual. Some platforms only support 1
699 for monochrome and -1 for the current colour setting.
701 val
= _gdi_
.new_EmptyBitmap(*args
, **kwargs
)
705 def BitmapFromIcon(*args
, **kwargs
):
707 BitmapFromIcon(Icon icon) -> Bitmap
709 Create a new bitmap from a `wx.Icon` object.
711 val
= _gdi_
.new_BitmapFromIcon(*args
, **kwargs
)
715 def BitmapFromImage(*args
, **kwargs
):
717 BitmapFromImage(Image image, int depth=-1) -> Bitmap
719 Creates bitmap object from a `wx.Image`. This has to be done to
720 actually display a `wx.Image` as you cannot draw an image directly on
721 a window. The resulting bitmap will use the provided colour depth (or
722 that of the current screen colour depth if depth is -1) which entails
723 that a colour reduction may have to take place.
725 val
= _gdi_
.new_BitmapFromImage(*args
, **kwargs
)
729 def BitmapFromXPMData(*args
, **kwargs
):
731 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
733 Construct a Bitmap from a list of strings formatted as XPM data.
735 val
= _gdi_
.new_BitmapFromXPMData(*args
, **kwargs
)
739 def BitmapFromBits(*args
, **kwargs
):
741 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
743 Creates a bitmap from an array of bits. You should only use this
744 function for monochrome bitmaps (depth 1) in portable programs: in
745 this case the bits parameter should contain an XBM image. For other
746 bit depths, the behaviour is platform dependent.
748 val
= _gdi_
.new_BitmapFromBits(*args
, **kwargs
)
752 class Mask(_core
.Object
):
754 This class encapsulates a monochrome mask bitmap, where the masked
755 area is black and the unmasked area is white. When associated with a
756 bitmap and drawn in a device context, the unmasked area of the bitmap
757 will be drawn, and the masked area will not be drawn.
759 A mask may be associated with a `wx.Bitmap`. It is used in
760 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
761 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
765 return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
766 def __init__(self
, *args
, **kwargs
):
768 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
770 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
771 that indicates the transparent portions of the mask. In other words,
772 the pixels in ``bitmap`` that match ``colour`` will be the transparent
773 portions of the mask. If no ``colour`` or an invalid ``colour`` is
774 passed then BLACK is used.
776 :see: `wx.Bitmap`, `wx.Colour`
778 newobj
= _gdi_
.new_Mask(*args
, **kwargs
)
779 self
.this
= newobj
.this
784 def __init__(self
, this
):
786 if not hasattr(self
,"thisown"): self
.thisown
= 0
787 self
.__class
__ = Mask
788 _gdi_
.Mask_swigregister(MaskPtr
)
790 MaskColour
= wx
._deprecated
(Mask
, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
791 class Icon(GDIObject
):
793 return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
794 def __init__(self
, *args
, **kwargs
):
795 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
796 newobj
= _gdi_
.new_Icon(*args
, **kwargs
)
797 self
.this
= newobj
.this
800 def __del__(self
, destroy
=_gdi_
.delete_Icon
):
803 if self
.thisown
: destroy(self
)
806 def LoadFile(*args
, **kwargs
):
807 """LoadFile(self, String name, int type) -> bool"""
808 return _gdi_
.Icon_LoadFile(*args
, **kwargs
)
810 def GetHandle(*args
, **kwargs
):
811 """GetHandle(self) -> long"""
812 return _gdi_
.Icon_GetHandle(*args
, **kwargs
)
814 def SetHandle(*args
, **kwargs
):
815 """SetHandle(self, long handle)"""
816 return _gdi_
.Icon_SetHandle(*args
, **kwargs
)
818 def Ok(*args
, **kwargs
):
819 """Ok(self) -> bool"""
820 return _gdi_
.Icon_Ok(*args
, **kwargs
)
822 def GetWidth(*args
, **kwargs
):
823 """GetWidth(self) -> int"""
824 return _gdi_
.Icon_GetWidth(*args
, **kwargs
)
826 def GetHeight(*args
, **kwargs
):
827 """GetHeight(self) -> int"""
828 return _gdi_
.Icon_GetHeight(*args
, **kwargs
)
830 def GetDepth(*args
, **kwargs
):
831 """GetDepth(self) -> int"""
832 return _gdi_
.Icon_GetDepth(*args
, **kwargs
)
834 def SetWidth(*args
, **kwargs
):
835 """SetWidth(self, int w)"""
836 return _gdi_
.Icon_SetWidth(*args
, **kwargs
)
838 def SetHeight(*args
, **kwargs
):
839 """SetHeight(self, int h)"""
840 return _gdi_
.Icon_SetHeight(*args
, **kwargs
)
842 def SetDepth(*args
, **kwargs
):
843 """SetDepth(self, int d)"""
844 return _gdi_
.Icon_SetDepth(*args
, **kwargs
)
846 def SetSize(*args
, **kwargs
):
847 """SetSize(self, Size size)"""
848 return _gdi_
.Icon_SetSize(*args
, **kwargs
)
850 def CopyFromBitmap(*args
, **kwargs
):
851 """CopyFromBitmap(self, Bitmap bmp)"""
852 return _gdi_
.Icon_CopyFromBitmap(*args
, **kwargs
)
854 def __nonzero__(self
): return self
.Ok()
857 def __init__(self
, this
):
859 if not hasattr(self
,"thisown"): self
.thisown
= 0
860 self
.__class
__ = Icon
861 _gdi_
.Icon_swigregister(IconPtr
)
863 def EmptyIcon(*args
, **kwargs
):
864 """EmptyIcon() -> Icon"""
865 val
= _gdi_
.new_EmptyIcon(*args
, **kwargs
)
869 def IconFromLocation(*args
, **kwargs
):
870 """IconFromLocation(IconLocation loc) -> Icon"""
871 val
= _gdi_
.new_IconFromLocation(*args
, **kwargs
)
875 def IconFromBitmap(*args
, **kwargs
):
876 """IconFromBitmap(Bitmap bmp) -> Icon"""
877 val
= _gdi_
.new_IconFromBitmap(*args
, **kwargs
)
881 def IconFromXPMData(*args
, **kwargs
):
882 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
883 val
= _gdi_
.new_IconFromXPMData(*args
, **kwargs
)
887 class IconLocation(object):
889 return "<%s.%s; proxy of C++ wxIconLocation instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
890 def __init__(self
, *args
, **kwargs
):
891 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
892 newobj
= _gdi_
.new_IconLocation(*args
, **kwargs
)
893 self
.this
= newobj
.this
896 def __del__(self
, destroy
=_gdi_
.delete_IconLocation
):
899 if self
.thisown
: destroy(self
)
902 def IsOk(*args
, **kwargs
):
903 """IsOk(self) -> bool"""
904 return _gdi_
.IconLocation_IsOk(*args
, **kwargs
)
906 def __nonzero__(self
): return self
.Ok()
907 def SetFileName(*args
, **kwargs
):
908 """SetFileName(self, String filename)"""
909 return _gdi_
.IconLocation_SetFileName(*args
, **kwargs
)
911 def GetFileName(*args
, **kwargs
):
912 """GetFileName(self) -> String"""
913 return _gdi_
.IconLocation_GetFileName(*args
, **kwargs
)
915 def SetIndex(*args
, **kwargs
):
916 """SetIndex(self, int num)"""
917 return _gdi_
.IconLocation_SetIndex(*args
, **kwargs
)
919 def GetIndex(*args
, **kwargs
):
920 """GetIndex(self) -> int"""
921 return _gdi_
.IconLocation_GetIndex(*args
, **kwargs
)
924 class IconLocationPtr(IconLocation
):
925 def __init__(self
, this
):
927 if not hasattr(self
,"thisown"): self
.thisown
= 0
928 self
.__class
__ = IconLocation
929 _gdi_
.IconLocation_swigregister(IconLocationPtr
)
931 class IconBundle(object):
933 return "<%s.%s; proxy of C++ wxIconBundle instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
934 def __init__(self
, *args
, **kwargs
):
935 """__init__(self) -> IconBundle"""
936 newobj
= _gdi_
.new_IconBundle(*args
, **kwargs
)
937 self
.this
= newobj
.this
940 def __del__(self
, destroy
=_gdi_
.delete_IconBundle
):
943 if self
.thisown
: destroy(self
)
946 def AddIcon(*args
, **kwargs
):
947 """AddIcon(self, Icon icon)"""
948 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
950 def AddIconFromFile(*args
, **kwargs
):
951 """AddIconFromFile(self, String file, long type)"""
952 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
954 def GetIcon(*args
, **kwargs
):
955 """GetIcon(self, Size size) -> Icon"""
956 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
959 class IconBundlePtr(IconBundle
):
960 def __init__(self
, this
):
962 if not hasattr(self
,"thisown"): self
.thisown
= 0
963 self
.__class
__ = IconBundle
964 _gdi_
.IconBundle_swigregister(IconBundlePtr
)
966 def IconBundleFromFile(*args
, **kwargs
):
967 """IconBundleFromFile(String file, long type) -> IconBundle"""
968 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
972 def IconBundleFromIcon(*args
, **kwargs
):
973 """IconBundleFromIcon(Icon icon) -> IconBundle"""
974 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
978 class Cursor(GDIObject
):
980 A cursor is a small bitmap usually used for denoting where the mouse
981 pointer is, with a picture that might indicate the interpretation of a
984 A single cursor object may be used in many windows (any subwindow
985 type). The wxWindows convention is to set the cursor for a window, as
986 in X, rather than to set it globally as in MS Windows, although a
987 global `wx.SetCursor` function is also available for use on MS Windows.
991 return "<%s.%s; proxy of C++ wxCursor instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
992 def __init__(self
, *args
, **kwargs
):
994 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
996 Construct a Cursor from a file. Specify the type of file using
997 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a cur
1000 This constructor is not available on wxGTK, use ``wx.StockCursor``,
1001 ``wx.CursorFromImage``, or ``wx.CursorFromBits`` instead.
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 GetHandle(*args
, **kwargs
):
1015 GetHandle(self) -> long
1017 Get the MS Windows handle for the cursor
1019 return _gdi_
.Cursor_GetHandle(*args
, **kwargs
)
1021 def SetHandle(*args
, **kwargs
):
1023 SetHandle(self, long handle)
1025 Set the MS Windows handle to use for the cursor
1027 return _gdi_
.Cursor_SetHandle(*args
, **kwargs
)
1029 def Ok(*args
, **kwargs
):
1030 """Ok(self) -> bool"""
1031 return _gdi_
.Cursor_Ok(*args
, **kwargs
)
1033 def __nonzero__(self
): return self
.Ok()
1034 def GetWidth(*args
, **kwargs
):
1035 """GetWidth(self) -> int"""
1036 return _gdi_
.Cursor_GetWidth(*args
, **kwargs
)
1038 def GetHeight(*args
, **kwargs
):
1039 """GetHeight(self) -> int"""
1040 return _gdi_
.Cursor_GetHeight(*args
, **kwargs
)
1042 def GetDepth(*args
, **kwargs
):
1043 """GetDepth(self) -> int"""
1044 return _gdi_
.Cursor_GetDepth(*args
, **kwargs
)
1046 def SetWidth(*args
, **kwargs
):
1047 """SetWidth(self, int w)"""
1048 return _gdi_
.Cursor_SetWidth(*args
, **kwargs
)
1050 def SetHeight(*args
, **kwargs
):
1051 """SetHeight(self, int h)"""
1052 return _gdi_
.Cursor_SetHeight(*args
, **kwargs
)
1054 def SetDepth(*args
, **kwargs
):
1055 """SetDepth(self, int d)"""
1056 return _gdi_
.Cursor_SetDepth(*args
, **kwargs
)
1058 def SetSize(*args
, **kwargs
):
1059 """SetSize(self, Size size)"""
1060 return _gdi_
.Cursor_SetSize(*args
, **kwargs
)
1063 class CursorPtr(Cursor
):
1064 def __init__(self
, this
):
1066 if not hasattr(self
,"thisown"): self
.thisown
= 0
1067 self
.__class
__ = Cursor
1068 _gdi_
.Cursor_swigregister(CursorPtr
)
1070 def StockCursor(*args
, **kwargs
):
1072 StockCursor(int id) -> Cursor
1074 Create a cursor using one of the stock cursors. Note that not all
1075 cursors are available on all platforms.
1077 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
1081 def CursorFromImage(*args
, **kwargs
):
1083 CursorFromImage(Image image) -> Cursor
1085 Constructs a cursor from a wxImage. The cursor is monochrome, colors
1086 with the RGB elements all greater than 127 will be foreground, colors
1087 less than this background. The mask (if any) will be used as
1090 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
1094 #---------------------------------------------------------------------------
1096 OutRegion
= _gdi_
.OutRegion
1097 PartRegion
= _gdi_
.PartRegion
1098 InRegion
= _gdi_
.InRegion
1099 class Region(GDIObject
):
1101 return "<%s.%s; proxy of C++ wxRegion instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1102 def __init__(self
, *args
, **kwargs
):
1103 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1104 newobj
= _gdi_
.new_Region(*args
, **kwargs
)
1105 self
.this
= newobj
.this
1108 def __del__(self
, destroy
=_gdi_
.delete_Region
):
1111 if self
.thisown
: destroy(self
)
1114 def Clear(*args
, **kwargs
):
1116 return _gdi_
.Region_Clear(*args
, **kwargs
)
1118 def Offset(*args
, **kwargs
):
1119 """Offset(self, int x, int y) -> bool"""
1120 return _gdi_
.Region_Offset(*args
, **kwargs
)
1122 def Contains(*args
, **kwargs
):
1123 """Contains(self, int x, int y) -> int"""
1124 return _gdi_
.Region_Contains(*args
, **kwargs
)
1126 def ContainsPoint(*args
, **kwargs
):
1127 """ContainsPoint(self, Point pt) -> int"""
1128 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
1130 def ContainsRect(*args
, **kwargs
):
1131 """ContainsRect(self, Rect rect) -> int"""
1132 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
1134 def ContainsRectDim(*args
, **kwargs
):
1135 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1136 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
1138 def GetBox(*args
, **kwargs
):
1139 """GetBox(self) -> Rect"""
1140 return _gdi_
.Region_GetBox(*args
, **kwargs
)
1142 def Intersect(*args
, **kwargs
):
1143 """Intersect(self, int x, int y, int width, int height) -> bool"""
1144 return _gdi_
.Region_Intersect(*args
, **kwargs
)
1146 def IntersectRect(*args
, **kwargs
):
1147 """IntersectRect(self, Rect rect) -> bool"""
1148 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
1150 def IntersectRegion(*args
, **kwargs
):
1151 """IntersectRegion(self, Region region) -> bool"""
1152 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
1154 def IsEmpty(*args
, **kwargs
):
1155 """IsEmpty(self) -> bool"""
1156 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
1158 def Union(*args
, **kwargs
):
1159 """Union(self, int x, int y, int width, int height) -> bool"""
1160 return _gdi_
.Region_Union(*args
, **kwargs
)
1162 def UnionRect(*args
, **kwargs
):
1163 """UnionRect(self, Rect rect) -> bool"""
1164 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1166 def UnionRegion(*args
, **kwargs
):
1167 """UnionRegion(self, Region region) -> bool"""
1168 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1170 def Subtract(*args
, **kwargs
):
1171 """Subtract(self, int x, int y, int width, int height) -> bool"""
1172 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1174 def SubtractRect(*args
, **kwargs
):
1175 """SubtractRect(self, Rect rect) -> bool"""
1176 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1178 def SubtractRegion(*args
, **kwargs
):
1179 """SubtractRegion(self, Region region) -> bool"""
1180 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1182 def Xor(*args
, **kwargs
):
1183 """Xor(self, int x, int y, int width, int height) -> bool"""
1184 return _gdi_
.Region_Xor(*args
, **kwargs
)
1186 def XorRect(*args
, **kwargs
):
1187 """XorRect(self, Rect rect) -> bool"""
1188 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1190 def XorRegion(*args
, **kwargs
):
1191 """XorRegion(self, Region region) -> bool"""
1192 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1194 def ConvertToBitmap(*args
, **kwargs
):
1195 """ConvertToBitmap(self) -> Bitmap"""
1196 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1198 def UnionBitmap(*args
, **kwargs
):
1199 """UnionBitmap(self, Bitmap bmp) -> bool"""
1200 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1202 def UnionBitmapColour(*args
, **kwargs
):
1203 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1204 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1207 class RegionPtr(Region
):
1208 def __init__(self
, this
):
1210 if not hasattr(self
,"thisown"): self
.thisown
= 0
1211 self
.__class
__ = Region
1212 _gdi_
.Region_swigregister(RegionPtr
)
1214 def RegionFromBitmap(*args
, **kwargs
):
1215 """RegionFromBitmap(Bitmap bmp) -> Region"""
1216 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1220 def RegionFromBitmapColour(*args
, **kwargs
):
1221 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1222 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1226 def RegionFromPoints(*args
, **kwargs
):
1227 """RegionFromPoints(int points, Point points_array, int fillStyle=WINDING_RULE) -> Region"""
1228 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1232 class RegionIterator(_core
.Object
):
1234 return "<%s.%s; proxy of C++ wxRegionIterator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1235 def __init__(self
, *args
, **kwargs
):
1236 """__init__(self, Region region) -> RegionIterator"""
1237 newobj
= _gdi_
.new_RegionIterator(*args
, **kwargs
)
1238 self
.this
= newobj
.this
1241 def __del__(self
, destroy
=_gdi_
.delete_RegionIterator
):
1244 if self
.thisown
: destroy(self
)
1247 def GetX(*args
, **kwargs
):
1248 """GetX(self) -> int"""
1249 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1251 def GetY(*args
, **kwargs
):
1252 """GetY(self) -> int"""
1253 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1255 def GetW(*args
, **kwargs
):
1256 """GetW(self) -> int"""
1257 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1259 def GetWidth(*args
, **kwargs
):
1260 """GetWidth(self) -> int"""
1261 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1263 def GetH(*args
, **kwargs
):
1264 """GetH(self) -> int"""
1265 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1267 def GetHeight(*args
, **kwargs
):
1268 """GetHeight(self) -> int"""
1269 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1271 def GetRect(*args
, **kwargs
):
1272 """GetRect(self) -> Rect"""
1273 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1275 def HaveRects(*args
, **kwargs
):
1276 """HaveRects(self) -> bool"""
1277 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1279 def Reset(*args
, **kwargs
):
1281 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1283 def Next(*args
, **kwargs
):
1285 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1287 def __nonzero__(*args
, **kwargs
):
1288 """__nonzero__(self) -> bool"""
1289 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1292 class RegionIteratorPtr(RegionIterator
):
1293 def __init__(self
, this
):
1295 if not hasattr(self
,"thisown"): self
.thisown
= 0
1296 self
.__class
__ = RegionIterator
1297 _gdi_
.RegionIterator_swigregister(RegionIteratorPtr
)
1299 #---------------------------------------------------------------------------
1301 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1302 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1303 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1304 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1305 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1306 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1307 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1308 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1309 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1310 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1311 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1312 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1313 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1314 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1315 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1316 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1317 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1318 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1319 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1320 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1321 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1322 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1323 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1324 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1325 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1326 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1327 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1328 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1329 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1330 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1331 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1332 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1333 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1334 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1335 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1336 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1337 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1338 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1339 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1340 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1341 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1342 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1343 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1344 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1345 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1346 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1347 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1348 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1349 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1350 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1351 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1352 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1353 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1354 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1355 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1356 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1357 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1358 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1359 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1360 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1361 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1362 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1363 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1364 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1365 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1366 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1367 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1368 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1369 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1370 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1371 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1372 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1373 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1374 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1375 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1376 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1377 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1378 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1379 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1380 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1381 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1382 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1383 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1384 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1385 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1386 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1387 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1388 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1389 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1390 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1391 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1392 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1393 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1394 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1395 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1396 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1397 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1398 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1399 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1400 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1401 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1402 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1403 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1404 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1405 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1406 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1407 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1408 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1409 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1410 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1411 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1412 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1413 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1414 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1415 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1416 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1417 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1418 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1419 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1420 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1421 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1422 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1423 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1424 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1425 #---------------------------------------------------------------------------
1427 class NativeFontInfo(object):
1429 return "<%s.%s; proxy of C++ wxNativeFontInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1430 def __init__(self
, *args
, **kwargs
):
1431 """__init__(self) -> NativeFontInfo"""
1432 newobj
= _gdi_
.new_NativeFontInfo(*args
, **kwargs
)
1433 self
.this
= newobj
.this
1436 def __del__(self
, destroy
=_gdi_
.delete_NativeFontInfo
):
1439 if self
.thisown
: destroy(self
)
1442 def Init(*args
, **kwargs
):
1444 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1446 def InitFromFont(*args
, **kwargs
):
1447 """InitFromFont(self, Font font)"""
1448 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1450 def GetPointSize(*args
, **kwargs
):
1451 """GetPointSize(self) -> int"""
1452 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1454 def GetPixelSize(*args
, **kwargs
):
1455 """GetPixelSize(self) -> Size"""
1456 return _gdi_
.NativeFontInfo_GetPixelSize(*args
, **kwargs
)
1458 def GetStyle(*args
, **kwargs
):
1459 """GetStyle(self) -> int"""
1460 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1462 def GetWeight(*args
, **kwargs
):
1463 """GetWeight(self) -> int"""
1464 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1466 def GetUnderlined(*args
, **kwargs
):
1467 """GetUnderlined(self) -> bool"""
1468 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1470 def GetFaceName(*args
, **kwargs
):
1471 """GetFaceName(self) -> String"""
1472 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1474 def GetFamily(*args
, **kwargs
):
1475 """GetFamily(self) -> int"""
1476 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1478 def GetEncoding(*args
, **kwargs
):
1479 """GetEncoding(self) -> int"""
1480 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1482 def SetPointSize(*args
, **kwargs
):
1483 """SetPointSize(self, int pointsize)"""
1484 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1486 def SetPixelSize(*args
, **kwargs
):
1487 """SetPixelSize(self, Size pixelSize)"""
1488 return _gdi_
.NativeFontInfo_SetPixelSize(*args
, **kwargs
)
1490 def SetStyle(*args
, **kwargs
):
1491 """SetStyle(self, int style)"""
1492 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1494 def SetWeight(*args
, **kwargs
):
1495 """SetWeight(self, int weight)"""
1496 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1498 def SetUnderlined(*args
, **kwargs
):
1499 """SetUnderlined(self, bool underlined)"""
1500 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1502 def SetFaceName(*args
, **kwargs
):
1503 """SetFaceName(self, String facename)"""
1504 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1506 def SetFamily(*args
, **kwargs
):
1507 """SetFamily(self, int family)"""
1508 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1510 def SetEncoding(*args
, **kwargs
):
1511 """SetEncoding(self, int encoding)"""
1512 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1514 def FromString(*args
, **kwargs
):
1515 """FromString(self, String s) -> bool"""
1516 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1518 def ToString(*args
, **kwargs
):
1519 """ToString(self) -> String"""
1520 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1522 def __str__(*args
, **kwargs
):
1523 """__str__(self) -> String"""
1524 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1526 def FromUserString(*args
, **kwargs
):
1527 """FromUserString(self, String s) -> bool"""
1528 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1530 def ToUserString(*args
, **kwargs
):
1531 """ToUserString(self) -> String"""
1532 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1535 class NativeFontInfoPtr(NativeFontInfo
):
1536 def __init__(self
, this
):
1538 if not hasattr(self
,"thisown"): self
.thisown
= 0
1539 self
.__class
__ = NativeFontInfo
1540 _gdi_
.NativeFontInfo_swigregister(NativeFontInfoPtr
)
1542 class NativeEncodingInfo(object):
1544 return "<%s.%s; proxy of C++ wxNativeEncodingInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1545 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1546 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1547 def __init__(self
, *args
, **kwargs
):
1548 """__init__(self) -> NativeEncodingInfo"""
1549 newobj
= _gdi_
.new_NativeEncodingInfo(*args
, **kwargs
)
1550 self
.this
= newobj
.this
1553 def __del__(self
, destroy
=_gdi_
.delete_NativeEncodingInfo
):
1556 if self
.thisown
: destroy(self
)
1559 def FromString(*args
, **kwargs
):
1560 """FromString(self, String s) -> bool"""
1561 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1563 def ToString(*args
, **kwargs
):
1564 """ToString(self) -> String"""
1565 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1568 class NativeEncodingInfoPtr(NativeEncodingInfo
):
1569 def __init__(self
, this
):
1571 if not hasattr(self
,"thisown"): self
.thisown
= 0
1572 self
.__class
__ = NativeEncodingInfo
1573 _gdi_
.NativeEncodingInfo_swigregister(NativeEncodingInfoPtr
)
1576 def GetNativeFontEncoding(*args
, **kwargs
):
1577 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1578 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1580 def TestFontEncoding(*args
, **kwargs
):
1581 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1582 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1583 #---------------------------------------------------------------------------
1585 class FontMapper(object):
1587 return "<%s.%s; proxy of C++ wxFontMapper instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1588 def __init__(self
, *args
, **kwargs
):
1589 """__init__(self) -> FontMapper"""
1590 newobj
= _gdi_
.new_FontMapper(*args
, **kwargs
)
1591 self
.this
= newobj
.this
1594 def __del__(self
, destroy
=_gdi_
.delete_FontMapper
):
1597 if self
.thisown
: destroy(self
)
1600 def Get(*args
, **kwargs
):
1601 """Get() -> FontMapper"""
1602 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1604 Get
= staticmethod(Get
)
1605 def Set(*args
, **kwargs
):
1606 """Set(FontMapper mapper) -> FontMapper"""
1607 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1609 Set
= staticmethod(Set
)
1610 def CharsetToEncoding(*args
, **kwargs
):
1611 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1612 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1614 def GetSupportedEncodingsCount(*args
, **kwargs
):
1615 """GetSupportedEncodingsCount() -> size_t"""
1616 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1618 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1619 def GetEncoding(*args
, **kwargs
):
1620 """GetEncoding(size_t n) -> int"""
1621 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1623 GetEncoding
= staticmethod(GetEncoding
)
1624 def GetEncodingName(*args
, **kwargs
):
1625 """GetEncodingName(int encoding) -> String"""
1626 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1628 GetEncodingName
= staticmethod(GetEncodingName
)
1629 def GetEncodingDescription(*args
, **kwargs
):
1630 """GetEncodingDescription(int encoding) -> String"""
1631 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1633 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1634 def GetEncodingFromName(*args
, **kwargs
):
1635 """GetEncodingFromName(String name) -> int"""
1636 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1638 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1639 def SetConfig(*args
, **kwargs
):
1640 """SetConfig(self, ConfigBase config)"""
1641 return _gdi_
.FontMapper_SetConfig(*args
, **kwargs
)
1643 def SetConfigPath(*args
, **kwargs
):
1644 """SetConfigPath(self, String prefix)"""
1645 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1647 def GetDefaultConfigPath(*args
, **kwargs
):
1648 """GetDefaultConfigPath() -> String"""
1649 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1651 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1652 def GetAltForEncoding(*args
, **kwargs
):
1653 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1654 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1656 def IsEncodingAvailable(*args
, **kwargs
):
1657 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1658 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1660 def SetDialogParent(*args
, **kwargs
):
1661 """SetDialogParent(self, Window parent)"""
1662 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1664 def SetDialogTitle(*args
, **kwargs
):
1665 """SetDialogTitle(self, String title)"""
1666 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1669 class FontMapperPtr(FontMapper
):
1670 def __init__(self
, this
):
1672 if not hasattr(self
,"thisown"): self
.thisown
= 0
1673 self
.__class
__ = FontMapper
1674 _gdi_
.FontMapper_swigregister(FontMapperPtr
)
1676 def FontMapper_Get(*args
, **kwargs
):
1677 """FontMapper_Get() -> FontMapper"""
1678 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1680 def FontMapper_Set(*args
, **kwargs
):
1681 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1682 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1684 def FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
):
1685 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1686 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1688 def FontMapper_GetEncoding(*args
, **kwargs
):
1689 """FontMapper_GetEncoding(size_t n) -> int"""
1690 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1692 def FontMapper_GetEncodingName(*args
, **kwargs
):
1693 """FontMapper_GetEncodingName(int encoding) -> String"""
1694 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1696 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1697 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1698 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1700 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1701 """FontMapper_GetEncodingFromName(String name) -> int"""
1702 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1704 def FontMapper_GetDefaultConfigPath(*args
, **kwargs
):
1705 """FontMapper_GetDefaultConfigPath() -> String"""
1706 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1708 #---------------------------------------------------------------------------
1710 class Font(GDIObject
):
1712 return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1713 def __init__(self
, *args
, **kwargs
):
1715 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1716 String face=EmptyString,
1717 int encoding=FONTENCODING_DEFAULT) -> Font
1719 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1720 newobj
= _gdi_
.new_Font(*args
, **kwargs
)
1721 self
.this
= newobj
.this
1724 def __del__(self
, destroy
=_gdi_
.delete_Font
):
1727 if self
.thisown
: destroy(self
)
1730 def Ok(*args
, **kwargs
):
1731 """Ok(self) -> bool"""
1732 return _gdi_
.Font_Ok(*args
, **kwargs
)
1734 def __nonzero__(self
): return self
.Ok()
1735 def __eq__(*args
, **kwargs
):
1736 """__eq__(self, Font other) -> bool"""
1737 return _gdi_
.Font___eq__(*args
, **kwargs
)
1739 def __ne__(*args
, **kwargs
):
1740 """__ne__(self, Font other) -> bool"""
1741 return _gdi_
.Font___ne__(*args
, **kwargs
)
1743 def GetPointSize(*args
, **kwargs
):
1744 """GetPointSize(self) -> int"""
1745 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
1747 def GetPixelSize(*args
, **kwargs
):
1748 """GetPixelSize(self) -> Size"""
1749 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
1751 def IsUsingSizeInPixels(*args
, **kwargs
):
1752 """IsUsingSizeInPixels(self) -> bool"""
1753 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
1755 def GetFamily(*args
, **kwargs
):
1756 """GetFamily(self) -> int"""
1757 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
1759 def GetStyle(*args
, **kwargs
):
1760 """GetStyle(self) -> int"""
1761 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
1763 def GetWeight(*args
, **kwargs
):
1764 """GetWeight(self) -> int"""
1765 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
1767 def GetUnderlined(*args
, **kwargs
):
1768 """GetUnderlined(self) -> bool"""
1769 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
1771 def GetFaceName(*args
, **kwargs
):
1772 """GetFaceName(self) -> String"""
1773 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
1775 def GetEncoding(*args
, **kwargs
):
1776 """GetEncoding(self) -> int"""
1777 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
1779 def GetNativeFontInfo(*args
, **kwargs
):
1780 """GetNativeFontInfo(self) -> NativeFontInfo"""
1781 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
1783 def IsFixedWidth(*args
, **kwargs
):
1784 """IsFixedWidth(self) -> bool"""
1785 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
1787 def GetNativeFontInfoDesc(*args
, **kwargs
):
1788 """GetNativeFontInfoDesc(self) -> String"""
1789 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
1791 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
1792 """GetNativeFontInfoUserDesc(self) -> String"""
1793 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
1795 def SetPointSize(*args
, **kwargs
):
1796 """SetPointSize(self, int pointSize)"""
1797 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
1799 def SetPixelSize(*args
, **kwargs
):
1800 """SetPixelSize(self, Size pixelSize)"""
1801 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
1803 def SetFamily(*args
, **kwargs
):
1804 """SetFamily(self, int family)"""
1805 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
1807 def SetStyle(*args
, **kwargs
):
1808 """SetStyle(self, int style)"""
1809 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
1811 def SetWeight(*args
, **kwargs
):
1812 """SetWeight(self, int weight)"""
1813 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
1815 def SetFaceName(*args
, **kwargs
):
1816 """SetFaceName(self, String faceName)"""
1817 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
1819 def SetUnderlined(*args
, **kwargs
):
1820 """SetUnderlined(self, bool underlined)"""
1821 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
1823 def SetEncoding(*args
, **kwargs
):
1824 """SetEncoding(self, int encoding)"""
1825 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
1827 def SetNativeFontInfo(*args
, **kwargs
):
1828 """SetNativeFontInfo(self, NativeFontInfo info)"""
1829 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
1831 def SetNativeFontInfoFromString(*args
, **kwargs
):
1832 """SetNativeFontInfoFromString(self, String info)"""
1833 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
1835 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
1836 """SetNativeFontInfoUserDesc(self, String info)"""
1837 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
1839 def GetFamilyString(*args
, **kwargs
):
1840 """GetFamilyString(self) -> String"""
1841 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
1843 def GetStyleString(*args
, **kwargs
):
1844 """GetStyleString(self) -> String"""
1845 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
1847 def GetWeightString(*args
, **kwargs
):
1848 """GetWeightString(self) -> String"""
1849 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
1851 def SetNoAntiAliasing(*args
, **kwargs
):
1852 """SetNoAntiAliasing(self, bool no=True)"""
1853 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
1855 def GetNoAntiAliasing(*args
, **kwargs
):
1856 """GetNoAntiAliasing(self) -> bool"""
1857 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
1859 def GetDefaultEncoding(*args
, **kwargs
):
1860 """GetDefaultEncoding() -> int"""
1861 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
1863 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
1864 def SetDefaultEncoding(*args
, **kwargs
):
1865 """SetDefaultEncoding(int encoding)"""
1866 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
1868 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
1870 class FontPtr(Font
):
1871 def __init__(self
, this
):
1873 if not hasattr(self
,"thisown"): self
.thisown
= 0
1874 self
.__class
__ = Font
1875 _gdi_
.Font_swigregister(FontPtr
)
1877 def FontFromNativeInfo(*args
, **kwargs
):
1878 """FontFromNativeInfo(NativeFontInfo info) -> Font"""
1879 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1880 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
1884 def FontFromNativeInfoString(*args
, **kwargs
):
1885 """FontFromNativeInfoString(String info) -> Font"""
1886 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1887 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
1891 def Font2(*args
, **kwargs
):
1893 Font2(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
1894 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
1896 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1897 val
= _gdi_
.new_Font2(*args
, **kwargs
)
1901 def FontFromPixelSize(*args
, **kwargs
):
1903 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
1904 bool underlined=False, String face=wxEmptyString,
1905 int encoding=FONTENCODING_DEFAULT) -> Font
1907 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1908 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
1912 def Font_GetDefaultEncoding(*args
, **kwargs
):
1913 """Font_GetDefaultEncoding() -> int"""
1914 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
1916 def Font_SetDefaultEncoding(*args
, **kwargs
):
1917 """Font_SetDefaultEncoding(int encoding)"""
1918 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
1920 #---------------------------------------------------------------------------
1922 class FontEnumerator(object):
1924 return "<%s.%s; proxy of C++ wxPyFontEnumerator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1925 def __init__(self
, *args
, **kwargs
):
1926 """__init__(self) -> FontEnumerator"""
1927 newobj
= _gdi_
.new_FontEnumerator(*args
, **kwargs
)
1928 self
.this
= newobj
.this
1931 self
._setCallbackInfo
(self
, FontEnumerator
, 0)
1933 def __del__(self
, destroy
=_gdi_
.delete_FontEnumerator
):
1936 if self
.thisown
: destroy(self
)
1939 def _setCallbackInfo(*args
, **kwargs
):
1940 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
1941 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
1943 def EnumerateFacenames(*args
, **kwargs
):
1944 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
1945 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
1947 def EnumerateEncodings(*args
, **kwargs
):
1948 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
1949 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
1951 def GetEncodings(*args
, **kwargs
):
1952 """GetEncodings(self) -> PyObject"""
1953 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
1955 def GetFacenames(*args
, **kwargs
):
1956 """GetFacenames(self) -> PyObject"""
1957 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
1960 class FontEnumeratorPtr(FontEnumerator
):
1961 def __init__(self
, this
):
1963 if not hasattr(self
,"thisown"): self
.thisown
= 0
1964 self
.__class
__ = FontEnumerator
1965 _gdi_
.FontEnumerator_swigregister(FontEnumeratorPtr
)
1967 #---------------------------------------------------------------------------
1969 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
1970 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
1971 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
1972 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
1973 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
1974 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
1975 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
1976 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
1977 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
1978 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
1979 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
1980 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
1981 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
1982 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
1983 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
1984 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
1985 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
1986 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
1987 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
1988 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
1989 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
1990 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
1991 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
1992 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
1993 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
1994 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
1995 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
1996 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
1997 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
1998 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
1999 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
2000 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
2001 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
2002 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
2003 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
2004 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
2005 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
2006 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
2007 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
2008 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
2009 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
2010 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
2011 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
2012 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
2013 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
2014 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
2015 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
2016 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
2017 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
2018 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
2019 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
2020 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
2021 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
2022 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
2023 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
2024 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
2025 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
2026 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
2027 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
2028 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
2029 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
2030 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
2031 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
2032 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
2033 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
2034 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
2035 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
2036 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
2037 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
2038 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
2039 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
2040 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
2041 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
2042 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
2043 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
2044 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
2045 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
2046 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2047 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2048 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2049 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2050 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2051 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2052 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2053 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2054 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2055 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2056 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2057 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2058 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2059 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2060 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2061 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2062 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2063 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2064 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2065 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2066 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2067 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2068 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2069 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2070 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2071 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2072 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2073 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2074 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2075 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2076 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2077 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2078 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2079 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2080 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2081 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2082 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2083 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2084 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2085 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2086 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2087 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2088 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2089 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2090 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2091 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2092 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2093 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2094 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2095 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2096 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2097 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2098 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2099 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2100 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2101 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2102 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2103 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2104 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2105 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2106 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2107 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2108 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2109 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2110 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2111 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2112 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2113 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2114 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2115 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2116 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2117 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2118 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2119 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2120 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2121 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2122 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2123 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2124 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2125 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2126 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2127 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2128 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2129 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2130 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2131 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2132 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2133 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2134 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2135 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2136 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2137 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2138 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2139 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2140 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2141 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2142 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2143 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2144 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2145 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2146 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2147 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2148 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2149 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2150 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2151 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2152 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2153 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2154 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2155 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2156 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2157 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2158 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2159 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2160 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2161 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2162 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2163 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2164 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2165 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2166 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2167 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2168 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2169 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2170 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2171 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2172 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2173 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2174 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2175 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2176 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2177 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2178 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2179 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2180 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2181 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2182 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2183 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2184 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2185 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2186 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2187 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2188 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2189 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2190 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2191 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2192 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2193 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2194 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2195 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2196 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2197 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2198 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2199 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2200 class LanguageInfo(object):
2201 def __init__(self
): raise RuntimeError, "No constructor defined"
2203 return "<%s.%s; proxy of C++ wxLanguageInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2204 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2205 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2206 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2208 class LanguageInfoPtr(LanguageInfo
):
2209 def __init__(self
, this
):
2211 if not hasattr(self
,"thisown"): self
.thisown
= 0
2212 self
.__class
__ = LanguageInfo
2213 _gdi_
.LanguageInfo_swigregister(LanguageInfoPtr
)
2215 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2216 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2217 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2218 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2219 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2220 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2221 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2222 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2223 class Locale(object):
2225 return "<%s.%s; proxy of C++ wxLocale instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2226 def __init__(self
, *args
, **kwargs
):
2227 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2228 newobj
= _gdi_
.new_Locale(*args
, **kwargs
)
2229 self
.this
= newobj
.this
2232 def __del__(self
, destroy
=_gdi_
.delete_Locale
):
2235 if self
.thisown
: destroy(self
)
2238 def Init1(*args
, **kwargs
):
2240 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2241 bool bLoadDefault=True,
2242 bool bConvertEncoding=False) -> bool
2244 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2246 def Init2(*args
, **kwargs
):
2247 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2248 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2250 def Init(self
, *_args
, **_kwargs
):
2251 if type(_args
[0]) in [type(''), type(u
'')]:
2252 val
= self
.Init1(*_args
, **_kwargs
)
2254 val
= self
.Init2(*_args
, **_kwargs
)
2257 def GetSystemLanguage(*args
, **kwargs
):
2258 """GetSystemLanguage() -> int"""
2259 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2261 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2262 def GetSystemEncoding(*args
, **kwargs
):
2263 """GetSystemEncoding() -> int"""
2264 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2266 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2267 def GetSystemEncodingName(*args
, **kwargs
):
2268 """GetSystemEncodingName() -> String"""
2269 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2271 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2272 def IsOk(*args
, **kwargs
):
2273 """IsOk(self) -> bool"""
2274 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2276 def __nonzero__(self
): return self
.IsOk()
2277 def GetLocale(*args
, **kwargs
):
2278 """GetLocale(self) -> String"""
2279 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2281 def GetLanguage(*args
, **kwargs
):
2282 """GetLanguage(self) -> int"""
2283 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2285 def GetSysName(*args
, **kwargs
):
2286 """GetSysName(self) -> String"""
2287 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2289 def GetCanonicalName(*args
, **kwargs
):
2290 """GetCanonicalName(self) -> String"""
2291 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2293 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2294 """AddCatalogLookupPathPrefix(String prefix)"""
2295 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2297 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2298 def AddCatalog(*args
, **kwargs
):
2299 """AddCatalog(self, String szDomain) -> bool"""
2300 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2302 def IsLoaded(*args
, **kwargs
):
2303 """IsLoaded(self, String szDomain) -> bool"""
2304 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2306 def GetLanguageInfo(*args
, **kwargs
):
2307 """GetLanguageInfo(int lang) -> LanguageInfo"""
2308 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2310 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2311 def GetLanguageName(*args
, **kwargs
):
2312 """GetLanguageName(int lang) -> String"""
2313 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2315 GetLanguageName
= staticmethod(GetLanguageName
)
2316 def FindLanguageInfo(*args
, **kwargs
):
2317 """FindLanguageInfo(String locale) -> LanguageInfo"""
2318 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2320 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2321 def AddLanguage(*args
, **kwargs
):
2322 """AddLanguage(LanguageInfo info)"""
2323 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2325 AddLanguage
= staticmethod(AddLanguage
)
2326 def GetString(*args
, **kwargs
):
2327 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2328 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2330 def GetName(*args
, **kwargs
):
2331 """GetName(self) -> String"""
2332 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2335 class LocalePtr(Locale
):
2336 def __init__(self
, this
):
2338 if not hasattr(self
,"thisown"): self
.thisown
= 0
2339 self
.__class
__ = Locale
2340 _gdi_
.Locale_swigregister(LocalePtr
)
2342 def Locale_GetSystemLanguage(*args
, **kwargs
):
2343 """Locale_GetSystemLanguage() -> int"""
2344 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2346 def Locale_GetSystemEncoding(*args
, **kwargs
):
2347 """Locale_GetSystemEncoding() -> int"""
2348 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2350 def Locale_GetSystemEncodingName(*args
, **kwargs
):
2351 """Locale_GetSystemEncodingName() -> String"""
2352 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2354 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2355 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2356 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2358 def Locale_GetLanguageInfo(*args
, **kwargs
):
2359 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2360 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2362 def Locale_GetLanguageName(*args
, **kwargs
):
2363 """Locale_GetLanguageName(int lang) -> String"""
2364 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2366 def Locale_FindLanguageInfo(*args
, **kwargs
):
2367 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2368 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2370 def Locale_AddLanguage(*args
, **kwargs
):
2371 """Locale_AddLanguage(LanguageInfo info)"""
2372 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2375 def GetLocale(*args
, **kwargs
):
2376 """GetLocale() -> Locale"""
2377 return _gdi_
.GetLocale(*args
, **kwargs
)
2378 #---------------------------------------------------------------------------
2380 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2381 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2382 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2383 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2384 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2385 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2386 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2387 class EncodingConverter(_core
.Object
):
2389 return "<%s.%s; proxy of C++ wxEncodingConverter instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2390 def __init__(self
, *args
, **kwargs
):
2391 """__init__(self) -> EncodingConverter"""
2392 newobj
= _gdi_
.new_EncodingConverter(*args
, **kwargs
)
2393 self
.this
= newobj
.this
2396 def __del__(self
, destroy
=_gdi_
.delete_EncodingConverter
):
2399 if self
.thisown
: destroy(self
)
2402 def Init(*args
, **kwargs
):
2403 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2404 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2406 def Convert(*args
, **kwargs
):
2407 """Convert(self, String input) -> String"""
2408 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2410 def GetPlatformEquivalents(*args
, **kwargs
):
2411 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2412 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2414 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
2415 def GetAllEquivalents(*args
, **kwargs
):
2416 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2417 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2419 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
2420 def CanConvert(*args
, **kwargs
):
2421 """CanConvert(int encIn, int encOut) -> bool"""
2422 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2424 CanConvert
= staticmethod(CanConvert
)
2425 def __nonzero__(self
): return self
.IsOk()
2427 class EncodingConverterPtr(EncodingConverter
):
2428 def __init__(self
, this
):
2430 if not hasattr(self
,"thisown"): self
.thisown
= 0
2431 self
.__class
__ = EncodingConverter
2432 _gdi_
.EncodingConverter_swigregister(EncodingConverterPtr
)
2434 def GetTranslation(*args
):
2436 GetTranslation(String str) -> String
2437 GetTranslation(String str, String strPlural, size_t n) -> String
2439 return _gdi_
.GetTranslation(*args
)
2441 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
2442 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2443 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2445 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
2446 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2447 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2449 def EncodingConverter_CanConvert(*args
, **kwargs
):
2450 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2451 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2453 #----------------------------------------------------------------------------
2454 # On MSW add the directory where the wxWidgets catalogs were installed
2455 # to the default catalog path.
2456 if wx
.Platform
== "__WXMSW__":
2458 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "locale")
2459 Locale
.AddCatalogLookupPathPrefix(_localedir
)
2462 #----------------------------------------------------------------------------
2464 #---------------------------------------------------------------------------
2466 class DC(_core
.Object
):
2468 A wx.DC is a device context onto which graphics and text can be
2469 drawn. It is intended to represent a number of output devices in a
2470 generic way, so a window can have a device context associated with it,
2471 and a printer also has a device context. In this way, the same piece
2472 of code may write to a number of different devices, if the device
2473 context is used as a parameter.
2475 Derived types of wxDC have documentation for specific features only,
2476 so refer to this section for most device context information.
2478 The wx.DC class is abstract and can not be instantiated, you must use
2479 one of the derived classes instead. Which one will depend on the
2480 situation in which it is used.
2482 def __init__(self
): raise RuntimeError, "No constructor defined"
2484 return "<%s.%s; proxy of C++ wxDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2485 def __del__(self
, destroy
=_gdi_
.delete_DC
):
2488 if self
.thisown
: destroy(self
)
2491 def BeginDrawing(*args
, **kwargs
):
2495 Allows for optimization of drawing code on platforms that need it. On
2496 other platforms this is just an empty function and is harmless. To
2497 take advantage of this postential optimization simply enclose each
2498 group of calls to the drawing primitives within calls to
2499 `BeginDrawing` and `EndDrawing`.
2501 return _gdi_
.DC_BeginDrawing(*args
, **kwargs
)
2503 def EndDrawing(*args
, **kwargs
):
2507 Ends the group of drawing primitives started with `BeginDrawing`, and
2508 invokes whatever optimization is available for this DC type on the
2511 return _gdi_
.DC_EndDrawing(*args
, **kwargs
)
2513 def FloodFill(*args
, **kwargs
):
2515 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2517 Flood fills the device context starting from the given point, using
2518 the current brush colour, and using a style:
2520 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2521 the given colour is encountered.
2523 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2526 Returns False if the operation failed.
2528 Note: The present implementation for non-Windows platforms may fail to
2529 find colour borders if the pixels do not match the colour
2530 exactly. However the function will still return true.
2532 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
2534 def FloodFillPoint(*args
, **kwargs
):
2536 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2538 Flood fills the device context starting from the given point, using
2539 the current brush colour, and using a style:
2541 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2542 the given colour is encountered.
2544 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2547 Returns False if the operation failed.
2549 Note: The present implementation for non-Windows platforms may fail to
2550 find colour borders if the pixels do not match the colour
2551 exactly. However the function will still return true.
2553 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
2555 def GetPixel(*args
, **kwargs
):
2557 GetPixel(self, int x, int y) -> Colour
2559 Gets the colour at the specified location on the DC.
2561 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
2563 def GetPixelPoint(*args
, **kwargs
):
2564 """GetPixelPoint(self, Point pt) -> Colour"""
2565 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
2567 def DrawLine(*args
, **kwargs
):
2569 DrawLine(self, int x1, int y1, int x2, int y2)
2571 Draws a line from the first point to the second. The current pen is
2572 used for drawing the line. Note that the second point is *not* part of
2573 the line and is not drawn by this function (this is consistent with
2574 the behaviour of many other toolkits).
2576 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
2578 def DrawLinePoint(*args
, **kwargs
):
2580 DrawLinePoint(self, Point pt1, Point pt2)
2582 Draws a line from the first point to the second. The current pen is
2583 used for drawing the line. Note that the second point is *not* part of
2584 the line and is not drawn by this function (this is consistent with
2585 the behaviour of many other toolkits).
2587 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
2589 def CrossHair(*args
, **kwargs
):
2591 CrossHair(self, int x, int y)
2593 Displays a cross hair using the current pen. This is a vertical and
2594 horizontal line the height and width of the window, centred on the
2597 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
2599 def CrossHairPoint(*args
, **kwargs
):
2601 CrossHairPoint(self, Point pt)
2603 Displays a cross hair using the current pen. This is a vertical and
2604 horizontal line the height and width of the window, centred on the
2607 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
2609 def DrawArc(*args
, **kwargs
):
2611 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2613 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2614 the first point to the second. The current pen is used for the outline
2615 and the current brush for filling the shape.
2617 The arc is drawn in an anticlockwise direction from the start point to
2620 return _gdi_
.DC_DrawArc(*args
, **kwargs
)
2622 def DrawArcPoint(*args
, **kwargs
):
2624 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2626 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2627 the first point to the second. The current pen is used for the outline
2628 and the current brush for filling the shape.
2630 The arc is drawn in an anticlockwise direction from the start point to
2633 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
2635 def DrawCheckMark(*args
, **kwargs
):
2637 DrawCheckMark(self, int x, int y, int width, int height)
2639 Draws a check mark inside the given rectangle.
2641 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
2643 def DrawCheckMarkRect(*args
, **kwargs
):
2645 DrawCheckMarkRect(self, Rect rect)
2647 Draws a check mark inside the given rectangle.
2649 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
2651 def DrawEllipticArc(*args
, **kwargs
):
2653 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
2655 Draws an arc of an ellipse, with the given rectangle defining the
2656 bounds of the ellipse. The current pen is used for drawing the arc and
2657 the current brush is used for drawing the pie.
2659 The *start* and *end* parameters specify the start and end of the arc
2660 relative to the three-o'clock position from the center of the
2661 rectangle. Angles are specified in degrees (360 is a complete
2662 circle). Positive values mean counter-clockwise motion. If start is
2663 equal to end, a complete ellipse will be drawn.
2665 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
2667 def DrawEllipticArcPointSize(*args
, **kwargs
):
2669 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
2671 Draws an arc of an ellipse, with the given rectangle defining the
2672 bounds of the ellipse. The current pen is used for drawing the arc and
2673 the current brush is used for drawing the pie.
2675 The *start* and *end* parameters specify the start and end of the arc
2676 relative to the three-o'clock position from the center of the
2677 rectangle. Angles are specified in degrees (360 is a complete
2678 circle). Positive values mean counter-clockwise motion. If start is
2679 equal to end, a complete ellipse will be drawn.
2681 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
2683 def DrawPoint(*args
, **kwargs
):
2685 DrawPoint(self, int x, int y)
2687 Draws a point using the current pen.
2689 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
2691 def DrawPointPoint(*args
, **kwargs
):
2693 DrawPointPoint(self, Point pt)
2695 Draws a point using the current pen.
2697 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
2699 def DrawRectangle(*args
, **kwargs
):
2701 DrawRectangle(self, int x, int y, int width, int height)
2703 Draws a rectangle with the given top left corner, and with the given
2704 size. The current pen is used for the outline and the current brush
2705 for filling the shape.
2707 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
2709 def DrawRectangleRect(*args
, **kwargs
):
2711 DrawRectangleRect(self, Rect rect)
2713 Draws a rectangle with the given top left corner, and with the given
2714 size. The current pen is used for the outline and the current brush
2715 for filling the shape.
2717 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
2719 def DrawRectanglePointSize(*args
, **kwargs
):
2721 DrawRectanglePointSize(self, Point pt, Size sz)
2723 Draws a rectangle with the given top left corner, and with the given
2724 size. The current pen is used for the outline and the current brush
2725 for filling the shape.
2727 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
2729 def DrawRoundedRectangle(*args
, **kwargs
):
2731 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
2733 Draws a rectangle with the given top left corner, and with the given
2734 size. The corners are quarter-circles using the given radius. The
2735 current pen is used for the outline and the current brush for filling
2738 If radius is positive, the value is assumed to be the radius of the
2739 rounded corner. If radius is negative, the absolute value is assumed
2740 to be the proportion of the smallest dimension of the rectangle. This
2741 means that the corner can be a sensible size relative to the size of
2742 the rectangle, and also avoids the strange effects X produces when the
2743 corners are too big for the rectangle.
2745 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
2747 def DrawRoundedRectangleRect(*args
, **kwargs
):
2749 DrawRoundedRectangleRect(self, Rect r, double radius)
2751 Draws a rectangle with the given top left corner, and with the given
2752 size. The corners are quarter-circles using the given radius. The
2753 current pen is used for the outline and the current brush for filling
2756 If radius is positive, the value is assumed to be the radius of the
2757 rounded corner. If radius is negative, the absolute value is assumed
2758 to be the proportion of the smallest dimension of the rectangle. This
2759 means that the corner can be a sensible size relative to the size of
2760 the rectangle, and also avoids the strange effects X produces when the
2761 corners are too big for the rectangle.
2763 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
2765 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
2767 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
2769 Draws a rectangle with the given top left corner, and with the given
2770 size. The corners are quarter-circles using the given radius. The
2771 current pen is used for the outline and the current brush for filling
2774 If radius is positive, the value is assumed to be the radius of the
2775 rounded corner. If radius is negative, the absolute value is assumed
2776 to be the proportion of the smallest dimension of the rectangle. This
2777 means that the corner can be a sensible size relative to the size of
2778 the rectangle, and also avoids the strange effects X produces when the
2779 corners are too big for the rectangle.
2781 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
2783 def DrawCircle(*args
, **kwargs
):
2785 DrawCircle(self, int x, int y, int radius)
2787 Draws a circle with the given center point and radius. The current
2788 pen is used for the outline and the current brush for filling the
2791 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
2793 def DrawCirclePoint(*args
, **kwargs
):
2795 DrawCirclePoint(self, Point pt, int radius)
2797 Draws a circle with the given center point and radius. The current
2798 pen is used for the outline and the current brush for filling the
2801 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
2803 def DrawEllipse(*args
, **kwargs
):
2805 DrawEllipse(self, int x, int y, int width, int height)
2807 Draws an ellipse contained in the specified rectangle. The current pen
2808 is used for the outline and the current brush for filling the shape.
2810 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
2812 def DrawEllipseRect(*args
, **kwargs
):
2814 DrawEllipseRect(self, Rect rect)
2816 Draws an ellipse contained in the specified rectangle. The current pen
2817 is used for the outline and the current brush for filling the shape.
2819 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
2821 def DrawEllipsePointSize(*args
, **kwargs
):
2823 DrawEllipsePointSize(self, Point pt, Size sz)
2825 Draws an ellipse contained in the specified rectangle. The current pen
2826 is used for the outline and the current brush for filling the shape.
2828 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
2830 def DrawIcon(*args
, **kwargs
):
2832 DrawIcon(self, Icon icon, int x, int y)
2834 Draw an icon on the display (does nothing if the device context is
2835 PostScript). This can be the simplest way of drawing bitmaps on a
2838 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
2840 def DrawIconPoint(*args
, **kwargs
):
2842 DrawIconPoint(self, Icon icon, Point pt)
2844 Draw an icon on the display (does nothing if the device context is
2845 PostScript). This can be the simplest way of drawing bitmaps on a
2848 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
2850 def DrawBitmap(*args
, **kwargs
):
2852 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
2854 Draw a bitmap on the device context at the specified point. If
2855 *transparent* is true and the bitmap has a transparency mask, (or
2856 alpha channel on the platforms that support it) then the bitmap will
2857 be drawn transparently.
2859 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
2861 def DrawBitmapPoint(*args
, **kwargs
):
2863 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
2865 Draw a bitmap on the device context at the specified point. If
2866 *transparent* is true and the bitmap has a transparency mask, (or
2867 alpha channel on the platforms that support it) then the bitmap will
2868 be drawn transparently.
2870 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
2872 def DrawText(*args
, **kwargs
):
2874 DrawText(self, String text, int x, int y)
2876 Draws a text string at the specified point, using the current text
2877 font, and the current text foreground and background colours.
2879 The coordinates refer to the top-left corner of the rectangle bounding
2880 the string. See `GetTextExtent` for how to get the dimensions of a
2881 text string, which can be used to position the text more precisely.
2883 **NOTE**: under wxGTK the current logical function is used by this
2884 function but it is ignored by wxMSW. Thus, you should avoid using
2885 logical functions with this function in portable programs.
2887 return _gdi_
.DC_DrawText(*args
, **kwargs
)
2889 def DrawTextPoint(*args
, **kwargs
):
2891 DrawTextPoint(self, String text, Point pt)
2893 Draws a text string at the specified point, using the current text
2894 font, and the current text foreground and background colours.
2896 The coordinates refer to the top-left corner of the rectangle bounding
2897 the string. See `GetTextExtent` for how to get the dimensions of a
2898 text string, which can be used to position the text more precisely.
2900 **NOTE**: under wxGTK the current logical function is used by this
2901 function but it is ignored by wxMSW. Thus, you should avoid using
2902 logical functions with this function in portable programs.
2904 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
2906 def DrawRotatedText(*args
, **kwargs
):
2908 DrawRotatedText(self, String text, int x, int y, double angle)
2910 Draws the text rotated by *angle* degrees, if supported by the platform.
2912 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
2913 function. In particular, a font different from ``wx.NORMAL_FONT``
2914 should be used as the it is not normally a TrueType
2915 font. ``wx.SWISS_FONT`` is an example of a font which is.
2917 return _gdi_
.DC_DrawRotatedText(*args
, **kwargs
)
2919 def DrawRotatedTextPoint(*args
, **kwargs
):
2921 DrawRotatedTextPoint(self, String text, Point pt, double angle)
2923 Draws the text rotated by *angle* degrees, if supported by the platform.
2925 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
2926 function. In particular, a font different from ``wx.NORMAL_FONT``
2927 should be used as the it is not normally a TrueType
2928 font. ``wx.SWISS_FONT`` is an example of a font which is.
2930 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
2932 def Blit(*args
, **kwargs
):
2934 Blit(self, int xdest, int ydest, int width, int height, DC source,
2935 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
2936 int xsrcMask=-1, int ysrcMask=-1) -> bool
2938 Copy from a source DC to this DC. Parameters specify the destination
2939 coordinates, size of area to copy, source DC, source coordinates,
2940 logical function, whether to use a bitmap mask, and mask source
2943 return _gdi_
.DC_Blit(*args
, **kwargs
)
2945 def BlitPointSize(*args
, **kwargs
):
2947 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
2948 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
2950 Copy from a source DC to this DC. Parameters specify the destination
2951 coordinates, size of area to copy, source DC, source coordinates,
2952 logical function, whether to use a bitmap mask, and mask source
2955 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
2957 def SetClippingRegion(*args
, **kwargs
):
2959 SetClippingRegion(self, int x, int y, int width, int height)
2961 Sets the clipping region for this device context to the intersection
2962 of the given region described by the parameters of this method and the
2963 previously set clipping region. You should call `DestroyClippingRegion`
2964 if you want to set the clipping region exactly to the region
2967 The clipping region is an area to which drawing is
2968 restricted. Possible uses for the clipping region are for clipping
2969 text or for speeding up window redraws when only a known area of the
2972 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
2974 def SetClippingRegionPointSize(*args
, **kwargs
):
2976 SetClippingRegionPointSize(self, Point pt, Size sz)
2978 Sets the clipping region for this device context to the intersection
2979 of the given region described by the parameters of this method and the
2980 previously set clipping region. You should call `DestroyClippingRegion`
2981 if you want to set the clipping region exactly to the region
2984 The clipping region is an area to which drawing is
2985 restricted. Possible uses for the clipping region are for clipping
2986 text or for speeding up window redraws when only a known area of the
2989 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
2991 def SetClippingRegionAsRegion(*args
, **kwargs
):
2993 SetClippingRegionAsRegion(self, Region region)
2995 Sets the clipping region for this device context to the intersection
2996 of the given region described by the parameters of this method and the
2997 previously set clipping region. You should call `DestroyClippingRegion`
2998 if you want to set the clipping region exactly to the region
3001 The clipping region is an area to which drawing is
3002 restricted. Possible uses for the clipping region are for clipping
3003 text or for speeding up window redraws when only a known area of the
3006 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
3008 def SetClippingRect(*args
, **kwargs
):
3010 SetClippingRect(self, Rect rect)
3012 Sets the clipping region for this device context to the intersection
3013 of the given region described by the parameters of this method and the
3014 previously set clipping region. You should call `DestroyClippingRegion`
3015 if you want to set the clipping region exactly to the region
3018 The clipping region is an area to which drawing is
3019 restricted. Possible uses for the clipping region are for clipping
3020 text or for speeding up window redraws when only a known area of the
3023 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
3025 def DrawLines(*args
, **kwargs
):
3027 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3029 Draws lines using a sequence of `wx.Point` objects, adding the
3030 optional offset coordinate. The current pen is used for drawing the
3033 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
3035 def DrawPolygon(*args
, **kwargs
):
3037 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3038 int fillStyle=ODDEVEN_RULE)
3040 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3041 the optional offset coordinate. The last argument specifies the fill
3042 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3044 The current pen is used for drawing the outline, and the current brush
3045 for filling the shape. Using a transparent brush suppresses
3046 filling. Note that wxWidgets automatically closes the first and last
3049 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3051 def DrawLabel(*args
, **kwargs
):
3053 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3056 Draw *text* within the specified rectangle, abiding by the alignment
3057 flags. Will additionally emphasize the character at *indexAccel* if
3060 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3062 def DrawImageLabel(*args
, **kwargs
):
3064 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3065 int indexAccel=-1) -> Rect
3067 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3068 drawing it) within the specified rectangle, abiding by the alignment
3069 flags. Will additionally emphasize the character at *indexAccel* if
3070 it is not -1. Returns the bounding rectangle.
3072 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3074 def DrawSpline(*args
, **kwargs
):
3076 DrawSpline(self, List points)
3078 Draws a spline between all given control points, (a list of `wx.Point`
3079 objects) using the current pen. The spline is drawn using a series of
3080 lines, using an algorithm taken from the X drawing program 'XFIG'.
3082 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3084 def Clear(*args
, **kwargs
):
3088 Clears the device context using the current background brush.
3090 return _gdi_
.DC_Clear(*args
, **kwargs
)
3092 def StartDoc(*args
, **kwargs
):
3094 StartDoc(self, String message) -> bool
3096 Starts a document (only relevant when outputting to a
3097 printer). *Message* is a message to show whilst printing.
3099 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3101 def EndDoc(*args
, **kwargs
):
3105 Ends a document (only relevant when outputting to a printer).
3107 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3109 def StartPage(*args
, **kwargs
):
3113 Starts a document page (only relevant when outputting to a printer).
3115 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3117 def EndPage(*args
, **kwargs
):
3121 Ends a document page (only relevant when outputting to a printer).
3123 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3125 def SetFont(*args
, **kwargs
):
3127 SetFont(self, Font font)
3129 Sets the current font for the DC. It must be a valid font, in
3130 particular you should not pass ``wx.NullFont`` to this method.
3132 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3134 def SetPen(*args
, **kwargs
):
3136 SetPen(self, Pen pen)
3138 Sets the current pen for the DC.
3140 If the argument is ``wx.NullPen``, the current pen is selected out of the
3141 device context, and the original pen restored.
3143 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3145 def SetBrush(*args
, **kwargs
):
3147 SetBrush(self, Brush brush)
3149 Sets the current brush for the DC.
3151 If the argument is ``wx.NullBrush``, the current brush is selected out
3152 of the device context, and the original brush restored, allowing the
3153 current brush to be destroyed safely.
3155 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3157 def SetBackground(*args
, **kwargs
):
3159 SetBackground(self, Brush brush)
3161 Sets the current background brush for the DC.
3163 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3165 def SetBackgroundMode(*args
, **kwargs
):
3167 SetBackgroundMode(self, int mode)
3169 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3170 determines whether text will be drawn with a background colour or
3173 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3175 def SetPalette(*args
, **kwargs
):
3177 SetPalette(self, Palette palette)
3179 If this is a window DC or memory DC, assigns the given palette to the
3180 window or bitmap associated with the DC. If the argument is
3181 ``wx.NullPalette``, the current palette is selected out of the device
3182 context, and the original palette restored.
3184 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3186 def DestroyClippingRegion(*args
, **kwargs
):
3188 DestroyClippingRegion(self)
3190 Destroys the current clipping region so that none of the DC is
3193 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3195 def GetClippingBox(*args
, **kwargs
):
3197 GetClippingBox() -> (x, y, width, height)
3199 Gets the rectangle surrounding the current clipping region.
3201 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3203 def GetClippingRect(*args
, **kwargs
):
3205 GetClippingRect(self) -> Rect
3207 Gets the rectangle surrounding the current clipping region.
3209 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3211 def GetCharHeight(*args
, **kwargs
):
3213 GetCharHeight(self) -> int
3215 Gets the character height of the currently set font.
3217 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3219 def GetCharWidth(*args
, **kwargs
):
3221 GetCharWidth(self) -> int
3223 Gets the average character width of the currently set font.
3225 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3227 def GetTextExtent(*args
, **kwargs
):
3229 GetTextExtent(wxString string) -> (width, height)
3231 Get the width and height of the text using the current font. Only
3232 works for single line strings.
3234 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3236 def GetFullTextExtent(*args
, **kwargs
):
3238 GetFullTextExtent(wxString string, Font font=None) ->
3239 (width, height, descent, externalLeading)
3241 Get the width, height, decent and leading of the text using the
3242 current or specified font. Only works for single line strings.
3244 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3246 def GetMultiLineTextExtent(*args
, **kwargs
):
3248 GetMultiLineTextExtent(wxString string, Font font=None) ->
3249 (width, height, descent, externalLeading)
3251 Get the width, height, decent and leading of the text using the
3252 current or specified font. Works for single as well as multi-line
3255 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3257 def GetPartialTextExtents(*args
, **kwargs
):
3259 GetPartialTextExtents(self, text) -> [widths]
3261 Returns a list of integers such that each value is the distance in
3262 pixels from the begining of text to the coresponding character of
3263 *text*. The generic version simply builds a running total of the widths
3264 of each character using GetTextExtent, however if the various
3265 platforms have a native API function that is faster or more accurate
3266 than the generic implementaiton then it will be used instead.
3268 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3270 def GetSize(*args
, **kwargs
):
3272 GetSize(self) -> Size
3274 This gets the horizontal and vertical resolution in device units. It
3275 can be used to scale graphics to fit the page. For example, if *maxX*
3276 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3277 used in your application, the following code will scale the graphic to
3278 fit on the printer page::
3281 scaleX = maxX*1.0 / w
3282 scaleY = maxY*1.0 / h
3283 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3286 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3288 def GetSizeTuple(*args
, **kwargs
):
3290 GetSizeTuple() -> (width, height)
3292 This gets the horizontal and vertical resolution in device units. It
3293 can be used to scale graphics to fit the page. For example, if *maxX*
3294 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3295 used in your application, the following code will scale the graphic to
3296 fit on the printer page::
3299 scaleX = maxX*1.0 / w
3300 scaleY = maxY*1.0 / h
3301 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3304 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3306 def GetSizeMM(*args
, **kwargs
):
3308 GetSizeMM(self) -> Size
3310 Get the DC size in milimeters.
3312 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3314 def GetSizeMMTuple(*args
, **kwargs
):
3316 GetSizeMMTuple() -> (width, height)
3318 Get the DC size in milimeters.
3320 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3322 def DeviceToLogicalX(*args
, **kwargs
):
3324 DeviceToLogicalX(self, int x) -> int
3326 Convert device X coordinate to logical coordinate, using the current
3329 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
3331 def DeviceToLogicalY(*args
, **kwargs
):
3333 DeviceToLogicalY(self, int y) -> int
3335 Converts device Y coordinate to logical coordinate, using the current
3338 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
3340 def DeviceToLogicalXRel(*args
, **kwargs
):
3342 DeviceToLogicalXRel(self, int x) -> int
3344 Convert device X coordinate to relative logical coordinate, using the
3345 current mapping mode but ignoring the x axis orientation. Use this
3346 function for converting a width, for example.
3348 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
3350 def DeviceToLogicalYRel(*args
, **kwargs
):
3352 DeviceToLogicalYRel(self, int y) -> int
3354 Convert device Y coordinate to relative logical coordinate, using the
3355 current mapping mode but ignoring the y axis orientation. Use this
3356 function for converting a height, for example.
3358 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
3360 def LogicalToDeviceX(*args
, **kwargs
):
3362 LogicalToDeviceX(self, int x) -> int
3364 Converts logical X coordinate to device coordinate, using the current
3367 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
3369 def LogicalToDeviceY(*args
, **kwargs
):
3371 LogicalToDeviceY(self, int y) -> int
3373 Converts logical Y coordinate to device coordinate, using the current
3376 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
3378 def LogicalToDeviceXRel(*args
, **kwargs
):
3380 LogicalToDeviceXRel(self, int x) -> int
3382 Converts logical X coordinate to relative device coordinate, using the
3383 current mapping mode but ignoring the x axis orientation. Use this for
3384 converting a width, for example.
3386 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
3388 def LogicalToDeviceYRel(*args
, **kwargs
):
3390 LogicalToDeviceYRel(self, int y) -> int
3392 Converts logical Y coordinate to relative device coordinate, using the
3393 current mapping mode but ignoring the y axis orientation. Use this for
3394 converting a height, for example.
3396 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
3398 def CanDrawBitmap(*args
, **kwargs
):
3399 """CanDrawBitmap(self) -> bool"""
3400 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
3402 def CanGetTextExtent(*args
, **kwargs
):
3403 """CanGetTextExtent(self) -> bool"""
3404 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
3406 def GetDepth(*args
, **kwargs
):
3408 GetDepth(self) -> int
3410 Returns the colour depth of the DC.
3412 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
3414 def GetPPI(*args
, **kwargs
):
3416 GetPPI(self) -> Size
3418 Resolution in Pixels per inch
3420 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
3422 def Ok(*args
, **kwargs
):
3426 Returns true if the DC is ok to use.
3428 return _gdi_
.DC_Ok(*args
, **kwargs
)
3430 def GetBackgroundMode(*args
, **kwargs
):
3432 GetBackgroundMode(self) -> int
3434 Returns the current background mode, either ``wx.SOLID`` or
3437 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
3439 def GetBackground(*args
, **kwargs
):
3441 GetBackground(self) -> Brush
3443 Gets the brush used for painting the background.
3445 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
3447 def GetBrush(*args
, **kwargs
):
3449 GetBrush(self) -> Brush
3451 Gets the current brush
3453 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
3455 def GetFont(*args
, **kwargs
):
3457 GetFont(self) -> Font
3459 Gets the current font
3461 return _gdi_
.DC_GetFont(*args
, **kwargs
)
3463 def GetPen(*args
, **kwargs
):
3467 Gets the current pen
3469 return _gdi_
.DC_GetPen(*args
, **kwargs
)
3471 def GetTextBackground(*args
, **kwargs
):
3473 GetTextBackground(self) -> Colour
3475 Gets the current text background colour
3477 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
3479 def GetTextForeground(*args
, **kwargs
):
3481 GetTextForeground(self) -> Colour
3483 Gets the current text foreground colour
3485 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
3487 def SetTextForeground(*args
, **kwargs
):
3489 SetTextForeground(self, Colour colour)
3491 Sets the current text foreground colour for the DC.
3493 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
3495 def SetTextBackground(*args
, **kwargs
):
3497 SetTextBackground(self, Colour colour)
3499 Sets the current text background colour for the DC.
3501 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
3503 def GetMapMode(*args
, **kwargs
):
3505 GetMapMode(self) -> int
3507 Gets the current *mapping mode* for the device context
3509 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
3511 def SetMapMode(*args
, **kwargs
):
3513 SetMapMode(self, int mode)
3515 The *mapping mode* of the device context defines the unit of
3516 measurement used to convert logical units to device units. The
3517 mapping mode can be one of the following:
3519 ================ =============================================
3520 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3522 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3523 wx.MM_METRIC Each logical unit is 1 mm.
3524 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3525 wx.MM_TEXT Each logical unit is 1 pixel.
3526 ================ =============================================
3529 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
3531 def GetUserScale(*args
, **kwargs
):
3533 GetUserScale(self) -> (xScale, yScale)
3535 Gets the current user scale factor (set by `SetUserScale`).
3537 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
3539 def SetUserScale(*args
, **kwargs
):
3541 SetUserScale(self, double x, double y)
3543 Sets the user scaling factor, useful for applications which require
3546 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
3548 def GetLogicalScale(*args
, **kwargs
):
3549 """GetLogicalScale() -> (xScale, yScale)"""
3550 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
3552 def SetLogicalScale(*args
, **kwargs
):
3553 """SetLogicalScale(self, double x, double y)"""
3554 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
3556 def GetLogicalOrigin(*args
, **kwargs
):
3557 """GetLogicalOrigin(self) -> Point"""
3558 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
3560 def GetLogicalOriginTuple(*args
, **kwargs
):
3561 """GetLogicalOriginTuple() -> (x,y)"""
3562 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
3564 def SetLogicalOrigin(*args
, **kwargs
):
3565 """SetLogicalOrigin(self, int x, int y)"""
3566 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
3568 def SetLogicalOriginPoint(*args
, **kwargs
):
3569 """SetLogicalOriginPoint(self, Point point)"""
3570 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
3572 def GetDeviceOrigin(*args
, **kwargs
):
3573 """GetDeviceOrigin(self) -> Point"""
3574 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
3576 def GetDeviceOriginTuple(*args
, **kwargs
):
3577 """GetDeviceOriginTuple() -> (x,y)"""
3578 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
3580 def SetDeviceOrigin(*args
, **kwargs
):
3581 """SetDeviceOrigin(self, int x, int y)"""
3582 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
3584 def SetDeviceOriginPoint(*args
, **kwargs
):
3585 """SetDeviceOriginPoint(self, Point point)"""
3586 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
3588 def SetAxisOrientation(*args
, **kwargs
):
3590 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3592 Sets the x and y axis orientation (i.e., the direction from lowest to
3593 highest values on the axis). The default orientation is the natural
3594 orientation, e.g. x axis from left to right and y axis from bottom up.
3596 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
3598 def GetLogicalFunction(*args
, **kwargs
):
3600 GetLogicalFunction(self) -> int
3602 Gets the current logical function (set by `SetLogicalFunction`).
3604 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
3606 def SetLogicalFunction(*args
, **kwargs
):
3608 SetLogicalFunction(self, int function)
3610 Sets the current logical function for the device context. This
3611 determines how a source pixel (from a pen or brush colour, or source
3612 device context if using `Blit`) combines with a destination pixel in
3613 the current device context.
3615 The possible values and their meaning in terms of source and
3616 destination pixel values are as follows:
3618 ================ ==========================
3620 wx.AND_INVERT (NOT src) AND dst
3621 wx.AND_REVERSE src AND (NOT dst)
3624 wx.EQUIV (NOT src) XOR dst
3626 wx.NAND (NOT src) OR (NOT dst)
3627 wx.NOR (NOT src) AND (NOT dst)
3630 wx.OR_INVERT (NOT src) OR dst
3631 wx.OR_REVERSE src OR (NOT dst)
3633 wx.SRC_INVERT NOT src
3635 ================ ==========================
3637 The default is wx.COPY, which simply draws with the current
3638 colour. The others combine the current colour and the background using
3639 a logical operation. wx.INVERT is commonly used for drawing rubber
3640 bands or moving outlines, since drawing twice reverts to the original
3644 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
3646 def ComputeScaleAndOrigin(*args
, **kwargs
):
3648 ComputeScaleAndOrigin(self)
3650 Performs all necessary computations for given platform and context
3651 type after each change of scale and origin parameters. Usually called
3652 automatically internally after such changes.
3655 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
3657 def SetOptimization(self
, optimize
):
3659 def GetOptimization(self
):
3662 SetOptimization
= wx
._deprecated
(SetOptimization
)
3663 GetOptimization
= wx
._deprecated
(GetOptimization
)
3665 def CalcBoundingBox(*args
, **kwargs
):
3667 CalcBoundingBox(self, int x, int y)
3669 Adds the specified point to the bounding box which can be retrieved
3670 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3672 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
3674 def CalcBoundingBoxPoint(*args
, **kwargs
):
3676 CalcBoundingBoxPoint(self, Point point)
3678 Adds the specified point to the bounding box which can be retrieved
3679 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3681 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
3683 def ResetBoundingBox(*args
, **kwargs
):
3685 ResetBoundingBox(self)
3687 Resets the bounding box: after a call to this function, the bounding
3688 box doesn't contain anything.
3690 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
3692 def MinX(*args
, **kwargs
):
3696 Gets the minimum horizontal extent used in drawing commands so far.
3698 return _gdi_
.DC_MinX(*args
, **kwargs
)
3700 def MaxX(*args
, **kwargs
):
3704 Gets the maximum horizontal extent used in drawing commands so far.
3706 return _gdi_
.DC_MaxX(*args
, **kwargs
)
3708 def MinY(*args
, **kwargs
):
3712 Gets the minimum vertical extent used in drawing commands so far.
3714 return _gdi_
.DC_MinY(*args
, **kwargs
)
3716 def MaxY(*args
, **kwargs
):
3720 Gets the maximum vertical extent used in drawing commands so far.
3722 return _gdi_
.DC_MaxY(*args
, **kwargs
)
3724 def GetBoundingBox(*args
, **kwargs
):
3726 GetBoundingBox() -> (x1,y1, x2,y2)
3728 Returns the min and max points used in drawing commands so far.
3730 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
3732 def __nonzero__(self
): return self
.Ok()
3733 def GetHDC(*args
, **kwargs
):
3734 """GetHDC(self) -> long"""
3735 return _gdi_
.DC_GetHDC(*args
, **kwargs
)
3737 def _DrawPointList(*args
, **kwargs
):
3738 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3739 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
3741 def _DrawLineList(*args
, **kwargs
):
3742 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3743 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
3745 def _DrawRectangleList(*args
, **kwargs
):
3746 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3747 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
3749 def _DrawEllipseList(*args
, **kwargs
):
3750 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3751 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
3753 def _DrawPolygonList(*args
, **kwargs
):
3754 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3755 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
3757 def _DrawTextList(*args
, **kwargs
):
3759 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
3760 PyObject backgroundList) -> PyObject
3762 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
3764 def DrawPointList(self
, points
, pens
=None):
3766 Draw a list of points as quickly as possible.
3768 :param points: A sequence of 2-element sequences representing
3769 each point to draw, (x,y).
3770 :param pens: If None, then the current pen is used. If a
3771 single pen then it will be used for all points. If
3772 a list of pens then there should be one for each point
3777 elif isinstance(pens
, wx
.Pen
):
3779 elif len(pens
) != len(points
):
3780 raise ValueError('points and pens must have same length')
3781 return self
._DrawPointList
(points
, pens
, [])
3784 def DrawLineList(self
, lines
, pens
=None):
3786 Draw a list of lines as quickly as possible.
3788 :param lines: A sequence of 4-element sequences representing
3789 each line to draw, (x1,y1, x2,y2).
3790 :param pens: If None, then the current pen is used. If a
3791 single pen then it will be used for all lines. If
3792 a list of pens then there should be one for each line
3797 elif isinstance(pens
, wx
.Pen
):
3799 elif len(pens
) != len(lines
):
3800 raise ValueError('lines and pens must have same length')
3801 return self
._DrawLineList
(lines
, pens
, [])
3804 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
3806 Draw a list of rectangles as quickly as possible.
3808 :param rectangles: A sequence of 4-element sequences representing
3809 each rectangle to draw, (x,y, w,h).
3810 :param pens: If None, then the current pen is used. If a
3811 single pen then it will be used for all rectangles.
3812 If a list of pens then there should be one for each
3813 rectangle in rectangles.
3814 :param brushes: A brush or brushes to be used to fill the rectagles,
3815 with similar semantics as the pens parameter.
3819 elif isinstance(pens
, wx
.Pen
):
3821 elif len(pens
) != len(rectangles
):
3822 raise ValueError('rectangles and pens must have same length')
3825 elif isinstance(brushes
, wx
.Brush
):
3827 elif len(brushes
) != len(rectangles
):
3828 raise ValueError('rectangles and brushes must have same length')
3829 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
3832 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
3834 Draw a list of ellipses as quickly as possible.
3836 :param ellipses: A sequence of 4-element sequences representing
3837 each ellipse to draw, (x,y, w,h).
3838 :param pens: If None, then the current pen is used. If a
3839 single pen then it will be used for all ellipses.
3840 If a list of pens then there should be one for each
3841 ellipse in ellipses.
3842 :param brushes: A brush or brushes to be used to fill the ellipses,
3843 with similar semantics as the pens parameter.
3847 elif isinstance(pens
, wx
.Pen
):
3849 elif len(pens
) != len(ellipses
):
3850 raise ValueError('ellipses and pens must have same length')
3853 elif isinstance(brushes
, wx
.Brush
):
3855 elif len(brushes
) != len(ellipses
):
3856 raise ValueError('ellipses and brushes must have same length')
3857 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
3860 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
3862 Draw a list of polygons, each of which is a list of points.
3864 :param polygons: A sequence of sequences of sequences.
3865 [[(x1,y1),(x2,y2),(x3,y3)...],
3866 [(x1,y1),(x2,y2),(x3,y3)...]]
3868 :param pens: If None, then the current pen is used. If a
3869 single pen then it will be used for all polygons.
3870 If a list of pens then there should be one for each
3872 :param brushes: A brush or brushes to be used to fill the polygons,
3873 with similar semantics as the pens parameter.
3877 elif isinstance(pens
, wx
.Pen
):
3879 elif len(pens
) != len(polygons
):
3880 raise ValueError('polygons and pens must have same length')
3883 elif isinstance(brushes
, wx
.Brush
):
3885 elif len(brushes
) != len(polygons
):
3886 raise ValueError('polygons and brushes must have same length')
3887 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
3890 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
3892 Draw a list of strings using a list of coordinants for positioning each string.
3894 :param textList: A list of strings
3895 :param coords: A list of (x,y) positions
3896 :param foregrounds: A list of `wx.Colour` objects to use for the
3897 foregrounds of the strings.
3898 :param backgrounds: A list of `wx.Colour` objects to use for the
3899 backgrounds of the strings.
3901 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
3902 If you want backgrounds to do anything.
3904 if type(textList
) == type(''):
3905 textList
= [textList
]
3906 elif len(textList
) != len(coords
):
3907 raise ValueError('textlist and coords must have same length')
3908 if foregrounds
is None:
3910 elif isinstance(foregrounds
, wx
.Colour
):
3911 foregrounds
= [foregrounds
]
3912 elif len(foregrounds
) != len(coords
):
3913 raise ValueError('foregrounds and coords must have same length')
3914 if backgrounds
is None:
3916 elif isinstance(backgrounds
, wx
.Colour
):
3917 backgrounds
= [backgrounds
]
3918 elif len(backgrounds
) != len(coords
):
3919 raise ValueError('backgrounds and coords must have same length')
3920 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
3924 def __init__(self
, this
):
3926 if not hasattr(self
,"thisown"): self
.thisown
= 0
3928 _gdi_
.DC_swigregister(DCPtr
)
3930 #---------------------------------------------------------------------------
3934 A memory device context provides a means to draw graphics onto a
3935 bitmap. A bitmap must be selected into the new memory DC before it may
3936 be used for anything. Typical usage is as follows::
3939 dc.SelectObject(bitmap)
3940 # draw on the dc usign any of the Draw methods
3941 dc.SelectObject(wx.NullBitmap)
3942 # the bitmap now contains wahtever was drawn upon it
3944 Note that the memory DC *must* be deleted (or the bitmap selected out
3945 of it) before a bitmap can be reselected into another memory DC.
3949 return "<%s.%s; proxy of C++ wxMemoryDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
3950 def __init__(self
, *args
, **kwargs
):
3952 __init__(self) -> MemoryDC
3954 Constructs a new memory device context.
3956 Use the Ok member to test whether the constructor was successful in
3957 creating a usable device context. Don't forget to select a bitmap into
3958 the DC before drawing on it.
3960 newobj
= _gdi_
.new_MemoryDC(*args
, **kwargs
)
3961 self
.this
= newobj
.this
3964 def SelectObject(*args
, **kwargs
):
3966 SelectObject(self, Bitmap bitmap)
3968 Selects the bitmap into the device context, to use as the memory
3969 bitmap. Selecting the bitmap into a memory DC allows you to draw into
3970 the DC, and therefore the bitmap, and also to use Blit to copy the
3973 If the argument is wx.NullBitmap (or some other uninitialised
3974 `wx.Bitmap`) the current bitmap is selected out of the device context,
3975 and the original bitmap restored, allowing the current bitmap to be
3978 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
3981 class MemoryDCPtr(MemoryDC
):
3982 def __init__(self
, this
):
3984 if not hasattr(self
,"thisown"): self
.thisown
= 0
3985 self
.__class
__ = MemoryDC
3986 _gdi_
.MemoryDC_swigregister(MemoryDCPtr
)
3988 def MemoryDCFromDC(*args
, **kwargs
):
3990 MemoryDCFromDC(DC oldDC) -> MemoryDC
3992 Creates a DC that is compatible with the oldDC.
3994 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
3998 #---------------------------------------------------------------------------
4000 class BufferedDC(MemoryDC
):
4002 This simple class provides a simple way to avoid flicker: when drawing
4003 on it, everything is in fact first drawn on an in-memory buffer (a
4004 `wx.Bitmap`) and then copied to the screen only once, when this object
4007 It can be used in the same way as any other device
4008 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
4009 want to use it in your EVT_PAINT handler, you should look at
4010 `wx.BufferedPaintDC`.
4014 return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4015 def __init__(self
, *args
):
4017 __init__(self, DC dc, Bitmap buffer) -> BufferedDC
4018 __init__(self, DC dc, Size area) -> BufferedDC
4020 Constructs a buffered DC.
4022 newobj
= _gdi_
.new_BufferedDC(*args
)
4023 self
.this
= newobj
.this
4026 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
4028 def __del__(self
, destroy
=_gdi_
.delete_BufferedDC
):
4032 Copies everything drawn on the DC so far to the underlying DC
4033 associated with this object, if any.
4036 if self
.thisown
: destroy(self
)
4039 def UnMask(*args
, **kwargs
):
4043 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4044 can be effectively used once only). This is usually only called in
4047 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
4050 class BufferedDCPtr(BufferedDC
):
4051 def __init__(self
, this
):
4053 if not hasattr(self
,"thisown"): self
.thisown
= 0
4054 self
.__class
__ = BufferedDC
4055 _gdi_
.BufferedDC_swigregister(BufferedDCPtr
)
4057 class BufferedPaintDC(BufferedDC
):
4059 This is a subclass of `wx.BufferedDC` which can be used inside of an
4060 EVT_PAINT event handler. Just create an object of this class instead
4061 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4062 flicker. The only thing to watch out for is that if you are using this
4063 class together with `wx.ScrolledWindow`, you probably do **not** want
4064 to call `wx.Window.PrepareDC` on it as it already does this internally
4065 for the real underlying `wx.PaintDC`.
4067 If your window is already fully buffered in a `wx.Bitmap` then your
4068 EVT_PAINT handler can be as simple as just creating a
4069 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4070 automatically when it is destroyed. For example::
4072 def OnPaint(self, event):
4073 dc = wx.BufferedPaintDC(self, self.buffer)
4079 return "<%s.%s; proxy of C++ wxBufferedPaintDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4080 def __init__(self
, *args
, **kwargs
):
4082 __init__(self, Window window, Bitmap buffer=NullBitmap) -> BufferedPaintDC
4084 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4085 provide the bitmap to be used for buffering or let this object create
4086 one internally (in the latter case, the size of the client part of the
4087 window is automatically used).
4091 newobj
= _gdi_
.new_BufferedPaintDC(*args
, **kwargs
)
4092 self
.this
= newobj
.this
4096 class BufferedPaintDCPtr(BufferedPaintDC
):
4097 def __init__(self
, this
):
4099 if not hasattr(self
,"thisown"): self
.thisown
= 0
4100 self
.__class
__ = BufferedPaintDC
4101 _gdi_
.BufferedPaintDC_swigregister(BufferedPaintDCPtr
)
4103 #---------------------------------------------------------------------------
4107 A wxScreenDC can be used to paint anywhere on the screen. This should
4108 normally be constructed as a temporary stack object; don't store a
4113 return "<%s.%s; proxy of C++ wxScreenDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4114 def __init__(self
, *args
, **kwargs
):
4116 __init__(self) -> ScreenDC
4118 A wxScreenDC can be used to paint anywhere on the screen. This should
4119 normally be constructed as a temporary stack object; don't store a
4123 newobj
= _gdi_
.new_ScreenDC(*args
, **kwargs
)
4124 self
.this
= newobj
.this
4127 def StartDrawingOnTopWin(*args
, **kwargs
):
4129 StartDrawingOnTopWin(self, Window window) -> bool
4131 Specify that the area of the screen to be drawn upon coincides with
4134 :see: `EndDrawingOnTop`
4136 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4138 def StartDrawingOnTop(*args
, **kwargs
):
4140 StartDrawingOnTop(self, Rect rect=None) -> bool
4142 Specify that the area is the given rectangle, or the whole screen if
4145 :see: `EndDrawingOnTop`
4147 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4149 def EndDrawingOnTop(*args
, **kwargs
):
4151 EndDrawingOnTop(self) -> bool
4153 Use this in conjunction with `StartDrawingOnTop` or
4154 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4155 top of existing windows. Without this, some window systems (such as X)
4156 only allow drawing to take place underneath other windows.
4158 You might use this pair of functions when implementing a drag feature,
4159 for example as in the `wx.SplitterWindow` implementation.
4161 These functions are probably obsolete since the X implementations
4162 allow drawing directly on the screen now. However, the fact that this
4163 function allows the screen to be refreshed afterwards may be useful
4164 to some applications.
4166 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4169 class ScreenDCPtr(ScreenDC
):
4170 def __init__(self
, this
):
4172 if not hasattr(self
,"thisown"): self
.thisown
= 0
4173 self
.__class
__ = ScreenDC
4174 _gdi_
.ScreenDC_swigregister(ScreenDCPtr
)
4176 #---------------------------------------------------------------------------
4180 A wx.ClientDC must be constructed if an application wishes to paint on
4181 the client area of a window from outside an EVT_PAINT event. This should
4182 normally be constructed as a temporary stack object; don't store a
4183 wx.ClientDC object long term.
4185 To draw on a window from within an EVT_PAINT handler, construct a
4186 `wx.PaintDC` object.
4188 To draw on the whole window including decorations, construct a
4189 `wx.WindowDC` object (Windows only).
4193 return "<%s.%s; proxy of C++ wxClientDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4194 def __init__(self
, *args
, **kwargs
):
4196 __init__(self, Window win) -> ClientDC
4198 Constructor. Pass the window on which you wish to paint.
4200 newobj
= _gdi_
.new_ClientDC(*args
, **kwargs
)
4201 self
.this
= newobj
.this
4205 class ClientDCPtr(ClientDC
):
4206 def __init__(self
, this
):
4208 if not hasattr(self
,"thisown"): self
.thisown
= 0
4209 self
.__class
__ = ClientDC
4210 _gdi_
.ClientDC_swigregister(ClientDCPtr
)
4212 #---------------------------------------------------------------------------
4216 A wx.PaintDC must be constructed if an application wishes to paint on
4217 the client area of a window from within an EVT_PAINT event
4218 handler. This should normally be constructed as a temporary stack
4219 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4220 handler, you **must** create a wx.PaintDC object within it even if you
4221 don't actually use it.
4223 Using wx.PaintDC within EVT_PAINT handlers is important because it
4224 automatically sets the clipping area to the damaged area of the
4225 window. Attempts to draw outside this area do not appear.
4227 To draw on a window from outside EVT_PAINT handlers, construct a
4228 `wx.ClientDC` object.
4232 return "<%s.%s; proxy of C++ wxPaintDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4233 def __init__(self
, *args
, **kwargs
):
4235 __init__(self, Window win) -> PaintDC
4237 Constructor. Pass the window on which you wish to paint.
4239 newobj
= _gdi_
.new_PaintDC(*args
, **kwargs
)
4240 self
.this
= newobj
.this
4244 class PaintDCPtr(PaintDC
):
4245 def __init__(self
, this
):
4247 if not hasattr(self
,"thisown"): self
.thisown
= 0
4248 self
.__class
__ = PaintDC
4249 _gdi_
.PaintDC_swigregister(PaintDCPtr
)
4251 #---------------------------------------------------------------------------
4255 A wx.WindowDC must be constructed if an application wishes to paint on
4256 the whole area of a window (client and decorations). This should
4257 normally be constructed as a temporary stack object; don't store a
4261 return "<%s.%s; proxy of C++ wxWindowDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4262 def __init__(self
, *args
, **kwargs
):
4264 __init__(self, Window win) -> WindowDC
4266 Constructor. Pass the window on which you wish to paint.
4268 newobj
= _gdi_
.new_WindowDC(*args
, **kwargs
)
4269 self
.this
= newobj
.this
4273 class WindowDCPtr(WindowDC
):
4274 def __init__(self
, this
):
4276 if not hasattr(self
,"thisown"): self
.thisown
= 0
4277 self
.__class
__ = WindowDC
4278 _gdi_
.WindowDC_swigregister(WindowDCPtr
)
4280 #---------------------------------------------------------------------------
4284 wx.MirrorDC is a simple wrapper class which is always associated with a
4285 real `wx.DC` object and either forwards all of its operations to it
4286 without changes (no mirroring takes place) or exchanges x and y
4287 coordinates which makes it possible to reuse the same code to draw a
4288 figure and its mirror -- i.e. reflection related to the diagonal line
4292 return "<%s.%s; proxy of C++ wxMirrorDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4293 def __init__(self
, *args
, **kwargs
):
4295 __init__(self, DC dc, bool mirror) -> MirrorDC
4297 Creates a mirrored DC associated with the real *dc*. Everything drawn
4298 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4301 newobj
= _gdi_
.new_MirrorDC(*args
, **kwargs
)
4302 self
.this
= newobj
.this
4306 class MirrorDCPtr(MirrorDC
):
4307 def __init__(self
, this
):
4309 if not hasattr(self
,"thisown"): self
.thisown
= 0
4310 self
.__class
__ = MirrorDC
4311 _gdi_
.MirrorDC_swigregister(MirrorDCPtr
)
4313 #---------------------------------------------------------------------------
4315 class PostScriptDC(DC
):
4316 """This is a `wx.DC` that can write to PostScript files on any platform."""
4318 return "<%s.%s; proxy of C++ wxPostScriptDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4319 def __init__(self
, *args
, **kwargs
):
4321 __init__(self, wxPrintData printData) -> PostScriptDC
4323 Constructs a PostScript printer device context from a `wx.PrintData`
4326 newobj
= _gdi_
.new_PostScriptDC(*args
, **kwargs
)
4327 self
.this
= newobj
.this
4330 def GetPrintData(*args
, **kwargs
):
4331 """GetPrintData(self) -> wxPrintData"""
4332 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
4334 def SetPrintData(*args
, **kwargs
):
4335 """SetPrintData(self, wxPrintData data)"""
4336 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
4338 def SetResolution(*args
, **kwargs
):
4340 SetResolution(int ppi)
4342 Set resolution (in pixels per inch) that will be used in PostScript
4343 output. Default is 720ppi.
4345 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4347 SetResolution
= staticmethod(SetResolution
)
4348 def GetResolution(*args
, **kwargs
):
4350 GetResolution() -> int
4352 Return resolution used in PostScript output.
4354 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4356 GetResolution
= staticmethod(GetResolution
)
4358 class PostScriptDCPtr(PostScriptDC
):
4359 def __init__(self
, this
):
4361 if not hasattr(self
,"thisown"): self
.thisown
= 0
4362 self
.__class
__ = PostScriptDC
4363 _gdi_
.PostScriptDC_swigregister(PostScriptDCPtr
)
4365 def PostScriptDC_SetResolution(*args
, **kwargs
):
4367 PostScriptDC_SetResolution(int ppi)
4369 Set resolution (in pixels per inch) that will be used in PostScript
4370 output. Default is 720ppi.
4372 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4374 def PostScriptDC_GetResolution(*args
, **kwargs
):
4376 PostScriptDC_GetResolution() -> int
4378 Return resolution used in PostScript output.
4380 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4382 #---------------------------------------------------------------------------
4384 class MetaFile(_core
.Object
):
4386 return "<%s.%s; proxy of C++ wxMetaFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4387 def __init__(self
, *args
, **kwargs
):
4388 """__init__(self, String filename=EmptyString) -> MetaFile"""
4389 newobj
= _gdi_
.new_MetaFile(*args
, **kwargs
)
4390 self
.this
= newobj
.this
4393 def __del__(self
, destroy
=_gdi_
.delete_MetaFile
):
4396 if self
.thisown
: destroy(self
)
4399 def Ok(*args
, **kwargs
):
4400 """Ok(self) -> bool"""
4401 return _gdi_
.MetaFile_Ok(*args
, **kwargs
)
4403 def SetClipboard(*args
, **kwargs
):
4404 """SetClipboard(self, int width=0, int height=0) -> bool"""
4405 return _gdi_
.MetaFile_SetClipboard(*args
, **kwargs
)
4407 def GetSize(*args
, **kwargs
):
4408 """GetSize(self) -> Size"""
4409 return _gdi_
.MetaFile_GetSize(*args
, **kwargs
)
4411 def GetWidth(*args
, **kwargs
):
4412 """GetWidth(self) -> int"""
4413 return _gdi_
.MetaFile_GetWidth(*args
, **kwargs
)
4415 def GetHeight(*args
, **kwargs
):
4416 """GetHeight(self) -> int"""
4417 return _gdi_
.MetaFile_GetHeight(*args
, **kwargs
)
4419 def GetFileName(*args
, **kwargs
):
4420 """GetFileName(self) -> String"""
4421 return _gdi_
.MetaFile_GetFileName(*args
, **kwargs
)
4423 def __nonzero__(self
): return self
.Ok()
4425 class MetaFilePtr(MetaFile
):
4426 def __init__(self
, this
):
4428 if not hasattr(self
,"thisown"): self
.thisown
= 0
4429 self
.__class
__ = MetaFile
4430 _gdi_
.MetaFile_swigregister(MetaFilePtr
)
4432 class MetaFileDC(DC
):
4434 return "<%s.%s; proxy of C++ wxMetaFileDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4435 def __init__(self
, *args
, **kwargs
):
4437 __init__(self, String filename=EmptyString, int width=0, int height=0,
4438 String description=EmptyString) -> MetaFileDC
4440 newobj
= _gdi_
.new_MetaFileDC(*args
, **kwargs
)
4441 self
.this
= newobj
.this
4444 def Close(*args
, **kwargs
):
4445 """Close(self) -> MetaFile"""
4446 return _gdi_
.MetaFileDC_Close(*args
, **kwargs
)
4449 class MetaFileDCPtr(MetaFileDC
):
4450 def __init__(self
, this
):
4452 if not hasattr(self
,"thisown"): self
.thisown
= 0
4453 self
.__class
__ = MetaFileDC
4454 _gdi_
.MetaFileDC_swigregister(MetaFileDCPtr
)
4456 class PrinterDC(DC
):
4458 return "<%s.%s; proxy of C++ wxPrinterDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4459 def __init__(self
, *args
, **kwargs
):
4460 """__init__(self, wxPrintData printData) -> PrinterDC"""
4461 newobj
= _gdi_
.new_PrinterDC(*args
, **kwargs
)
4462 self
.this
= newobj
.this
4466 class PrinterDCPtr(PrinterDC
):
4467 def __init__(self
, this
):
4469 if not hasattr(self
,"thisown"): self
.thisown
= 0
4470 self
.__class
__ = PrinterDC
4471 _gdi_
.PrinterDC_swigregister(PrinterDCPtr
)
4473 #---------------------------------------------------------------------------
4475 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
4476 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
4477 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
4478 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
4479 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
4480 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
4481 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
4482 class ImageList(_core
.Object
):
4484 return "<%s.%s; proxy of C++ wxImageList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4485 def __init__(self
, *args
, **kwargs
):
4486 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4487 newobj
= _gdi_
.new_ImageList(*args
, **kwargs
)
4488 self
.this
= newobj
.this
4491 def __del__(self
, destroy
=_gdi_
.delete_ImageList
):
4494 if self
.thisown
: destroy(self
)
4497 def Add(*args
, **kwargs
):
4498 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4499 return _gdi_
.ImageList_Add(*args
, **kwargs
)
4501 def AddWithColourMask(*args
, **kwargs
):
4502 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4503 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
4505 def AddIcon(*args
, **kwargs
):
4506 """AddIcon(self, Icon icon) -> int"""
4507 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
4509 def Replace(*args
, **kwargs
):
4510 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
4511 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
4513 def Draw(*args
, **kwargs
):
4515 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4516 bool solidBackground=False) -> bool
4518 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
4520 def GetImageCount(*args
, **kwargs
):
4521 """GetImageCount(self) -> int"""
4522 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
4524 def Remove(*args
, **kwargs
):
4525 """Remove(self, int index) -> bool"""
4526 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
4528 def RemoveAll(*args
, **kwargs
):
4529 """RemoveAll(self) -> bool"""
4530 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
4532 def GetSize(*args
, **kwargs
):
4533 """GetSize() -> (width,height)"""
4534 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
4537 class ImageListPtr(ImageList
):
4538 def __init__(self
, this
):
4540 if not hasattr(self
,"thisown"): self
.thisown
= 0
4541 self
.__class
__ = ImageList
4542 _gdi_
.ImageList_swigregister(ImageListPtr
)
4544 #---------------------------------------------------------------------------
4546 class PenList(_core
.Object
):
4547 def __init__(self
): raise RuntimeError, "No constructor defined"
4549 return "<%s.%s; proxy of C++ wxPenList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4550 def AddPen(*args
, **kwargs
):
4551 """AddPen(self, Pen pen)"""
4552 return _gdi_
.PenList_AddPen(*args
, **kwargs
)
4554 def FindOrCreatePen(*args
, **kwargs
):
4555 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
4556 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
4558 def RemovePen(*args
, **kwargs
):
4559 """RemovePen(self, Pen pen)"""
4560 return _gdi_
.PenList_RemovePen(*args
, **kwargs
)
4562 def GetCount(*args
, **kwargs
):
4563 """GetCount(self) -> int"""
4564 return _gdi_
.PenList_GetCount(*args
, **kwargs
)
4567 class PenListPtr(PenList
):
4568 def __init__(self
, this
):
4570 if not hasattr(self
,"thisown"): self
.thisown
= 0
4571 self
.__class
__ = PenList
4572 _gdi_
.PenList_swigregister(PenListPtr
)
4574 NORMAL_FONT
= cvar
.NORMAL_FONT
4575 SMALL_FONT
= cvar
.SMALL_FONT
4576 ITALIC_FONT
= cvar
.ITALIC_FONT
4577 SWISS_FONT
= cvar
.SWISS_FONT
4578 RED_PEN
= cvar
.RED_PEN
4579 CYAN_PEN
= cvar
.CYAN_PEN
4580 GREEN_PEN
= cvar
.GREEN_PEN
4581 BLACK_PEN
= cvar
.BLACK_PEN
4582 WHITE_PEN
= cvar
.WHITE_PEN
4583 TRANSPARENT_PEN
= cvar
.TRANSPARENT_PEN
4584 BLACK_DASHED_PEN
= cvar
.BLACK_DASHED_PEN
4585 GREY_PEN
= cvar
.GREY_PEN
4586 MEDIUM_GREY_PEN
= cvar
.MEDIUM_GREY_PEN
4587 LIGHT_GREY_PEN
= cvar
.LIGHT_GREY_PEN
4588 BLUE_BRUSH
= cvar
.BLUE_BRUSH
4589 GREEN_BRUSH
= cvar
.GREEN_BRUSH
4590 WHITE_BRUSH
= cvar
.WHITE_BRUSH
4591 BLACK_BRUSH
= cvar
.BLACK_BRUSH
4592 TRANSPARENT_BRUSH
= cvar
.TRANSPARENT_BRUSH
4593 CYAN_BRUSH
= cvar
.CYAN_BRUSH
4594 RED_BRUSH
= cvar
.RED_BRUSH
4595 GREY_BRUSH
= cvar
.GREY_BRUSH
4596 MEDIUM_GREY_BRUSH
= cvar
.MEDIUM_GREY_BRUSH
4597 LIGHT_GREY_BRUSH
= cvar
.LIGHT_GREY_BRUSH
4604 LIGHT_GREY
= cvar
.LIGHT_GREY
4605 STANDARD_CURSOR
= cvar
.STANDARD_CURSOR
4606 HOURGLASS_CURSOR
= cvar
.HOURGLASS_CURSOR
4607 CROSS_CURSOR
= cvar
.CROSS_CURSOR
4608 NullBitmap
= cvar
.NullBitmap
4609 NullIcon
= cvar
.NullIcon
4610 NullCursor
= cvar
.NullCursor
4611 NullPen
= cvar
.NullPen
4612 NullBrush
= cvar
.NullBrush
4613 NullPalette
= cvar
.NullPalette
4614 NullFont
= cvar
.NullFont
4615 NullColour
= cvar
.NullColour
4617 class BrushList(_core
.Object
):
4618 def __init__(self
): raise RuntimeError, "No constructor defined"
4620 return "<%s.%s; proxy of C++ wxBrushList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4621 def AddBrush(*args
, **kwargs
):
4622 """AddBrush(self, Brush brush)"""
4623 return _gdi_
.BrushList_AddBrush(*args
, **kwargs
)
4625 def FindOrCreateBrush(*args
, **kwargs
):
4626 """FindOrCreateBrush(self, Colour colour, int style) -> Brush"""
4627 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
4629 def RemoveBrush(*args
, **kwargs
):
4630 """RemoveBrush(self, Brush brush)"""
4631 return _gdi_
.BrushList_RemoveBrush(*args
, **kwargs
)
4633 def GetCount(*args
, **kwargs
):
4634 """GetCount(self) -> int"""
4635 return _gdi_
.BrushList_GetCount(*args
, **kwargs
)
4638 class BrushListPtr(BrushList
):
4639 def __init__(self
, this
):
4641 if not hasattr(self
,"thisown"): self
.thisown
= 0
4642 self
.__class
__ = BrushList
4643 _gdi_
.BrushList_swigregister(BrushListPtr
)
4645 class ColourDatabase(_core
.Object
):
4647 return "<%s.%s; proxy of C++ wxColourDatabase instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4648 def __init__(self
, *args
, **kwargs
):
4649 """__init__(self) -> ColourDatabase"""
4650 newobj
= _gdi_
.new_ColourDatabase(*args
, **kwargs
)
4651 self
.this
= newobj
.this
4654 def __del__(self
, destroy
=_gdi_
.delete_ColourDatabase
):
4657 if self
.thisown
: destroy(self
)
4660 def Find(*args
, **kwargs
):
4661 """Find(self, String name) -> Colour"""
4662 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
4664 def FindName(*args
, **kwargs
):
4665 """FindName(self, Colour colour) -> String"""
4666 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
4669 def AddColour(*args
, **kwargs
):
4670 """AddColour(self, String name, Colour colour)"""
4671 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
4673 def Append(*args
, **kwargs
):
4674 """Append(self, String name, int red, int green, int blue)"""
4675 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
4678 class ColourDatabasePtr(ColourDatabase
):
4679 def __init__(self
, this
):
4681 if not hasattr(self
,"thisown"): self
.thisown
= 0
4682 self
.__class
__ = ColourDatabase
4683 _gdi_
.ColourDatabase_swigregister(ColourDatabasePtr
)
4685 class FontList(_core
.Object
):
4686 def __init__(self
): raise RuntimeError, "No constructor defined"
4688 return "<%s.%s; proxy of C++ wxFontList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4689 def AddFont(*args
, **kwargs
):
4690 """AddFont(self, Font font)"""
4691 return _gdi_
.FontList_AddFont(*args
, **kwargs
)
4693 def FindOrCreateFont(*args
, **kwargs
):
4695 FindOrCreateFont(self, int point_size, int family, int style, int weight,
4696 bool underline=False, String facename=EmptyString,
4697 int encoding=FONTENCODING_DEFAULT) -> Font
4699 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
4701 def RemoveFont(*args
, **kwargs
):
4702 """RemoveFont(self, Font font)"""
4703 return _gdi_
.FontList_RemoveFont(*args
, **kwargs
)
4705 def GetCount(*args
, **kwargs
):
4706 """GetCount(self) -> int"""
4707 return _gdi_
.FontList_GetCount(*args
, **kwargs
)
4710 class FontListPtr(FontList
):
4711 def __init__(self
, this
):
4713 if not hasattr(self
,"thisown"): self
.thisown
= 0
4714 self
.__class
__ = FontList
4715 _gdi_
.FontList_swigregister(FontListPtr
)
4717 #---------------------------------------------------------------------------
4719 NullColor
= NullColour
4720 #---------------------------------------------------------------------------
4722 class Effects(_core
.Object
):
4724 return "<%s.%s; proxy of C++ wxEffects instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4725 def __init__(self
, *args
, **kwargs
):
4726 """__init__(self) -> Effects"""
4727 newobj
= _gdi_
.new_Effects(*args
, **kwargs
)
4728 self
.this
= newobj
.this
4731 def GetHighlightColour(*args
, **kwargs
):
4732 """GetHighlightColour(self) -> Colour"""
4733 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
4735 def GetLightShadow(*args
, **kwargs
):
4736 """GetLightShadow(self) -> Colour"""
4737 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
4739 def GetFaceColour(*args
, **kwargs
):
4740 """GetFaceColour(self) -> Colour"""
4741 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
4743 def GetMediumShadow(*args
, **kwargs
):
4744 """GetMediumShadow(self) -> Colour"""
4745 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
4747 def GetDarkShadow(*args
, **kwargs
):
4748 """GetDarkShadow(self) -> Colour"""
4749 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
4751 def SetHighlightColour(*args
, **kwargs
):
4752 """SetHighlightColour(self, Colour c)"""
4753 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
4755 def SetLightShadow(*args
, **kwargs
):
4756 """SetLightShadow(self, Colour c)"""
4757 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
4759 def SetFaceColour(*args
, **kwargs
):
4760 """SetFaceColour(self, Colour c)"""
4761 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
4763 def SetMediumShadow(*args
, **kwargs
):
4764 """SetMediumShadow(self, Colour c)"""
4765 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
4767 def SetDarkShadow(*args
, **kwargs
):
4768 """SetDarkShadow(self, Colour c)"""
4769 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
4771 def Set(*args
, **kwargs
):
4773 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
4774 Colour mediumShadow, Colour darkShadow)
4776 return _gdi_
.Effects_Set(*args
, **kwargs
)
4778 def DrawSunkenEdge(*args
, **kwargs
):
4779 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
4780 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
4782 def TileBitmap(*args
, **kwargs
):
4783 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
4784 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
4787 class EffectsPtr(Effects
):
4788 def __init__(self
, this
):
4790 if not hasattr(self
,"thisown"): self
.thisown
= 0
4791 self
.__class
__ = Effects
4792 _gdi_
.Effects_swigregister(EffectsPtr
)
4793 TheFontList
= cvar
.TheFontList
4794 ThePenList
= cvar
.ThePenList
4795 TheBrushList
= cvar
.TheBrushList
4796 TheColourDatabase
= cvar
.TheColourDatabase