1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
6 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
8 if isinstance(value
, class_type
):
9 self
.__dict
__[name
] = value
.this
10 if hasattr(value
,"thisown"): self
.__dict
__["thisown"] = value
.thisown
13 method
= class_type
.__swig
_setmethods
__.get(name
,None)
14 if method
: return method(self
,value
)
15 if (not static
) or hasattr(self
,name
) or (name
== "thisown"):
16 self
.__dict
__[name
] = value
18 raise AttributeError("You cannot add attributes to %s" % self
)
20 def _swig_setattr(self
,class_type
,name
,value
):
21 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
23 def _swig_getattr(self
,class_type
,name
):
24 method
= class_type
.__swig
_getmethods
__.get(name
,None)
25 if method
: return method(self
)
26 raise AttributeError,name
30 _object
= types
.ObjectType
32 except AttributeError:
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self
,name
,value
):
40 if hasattr(self
,name
) or (name
in ("this", "thisown")):
43 raise AttributeError("You cannot add attributes to %s" % self
)
49 #---------------------------------------------------------------------------
51 class GDIObject(_core
.Object
):
52 """Proxy of C++ GDIObject class"""
54 return "<%s.%s; proxy of C++ wxGDIObject instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
55 def __init__(self
, *args
, **kwargs
):
56 """__init__(self) -> GDIObject"""
57 newobj
= _gdi_
.new_GDIObject(*args
, **kwargs
)
58 self
.this
= newobj
.this
61 def __del__(self
, destroy
=_gdi_
.delete_GDIObject
):
64 if self
.thisown
: destroy(self
)
67 def GetVisible(*args
, **kwargs
):
68 """GetVisible(self) -> bool"""
69 return _gdi_
.GDIObject_GetVisible(*args
, **kwargs
)
71 def SetVisible(*args
, **kwargs
):
72 """SetVisible(self, bool visible)"""
73 return _gdi_
.GDIObject_SetVisible(*args
, **kwargs
)
75 def IsNull(*args
, **kwargs
):
76 """IsNull(self) -> bool"""
77 return _gdi_
.GDIObject_IsNull(*args
, **kwargs
)
80 class GDIObjectPtr(GDIObject
):
81 def __init__(self
, this
):
83 if not hasattr(self
,"thisown"): self
.thisown
= 0
84 self
.__class
__ = GDIObject
85 _gdi_
.GDIObject_swigregister(GDIObjectPtr
)
87 #---------------------------------------------------------------------------
89 class Colour(_core
.Object
):
91 A colour is an object representing a combination of Red, Green, and
92 Blue (RGB) intensity values, and is used to determine drawing colours,
93 window colours, etc. Valid RGB values are in the range 0 to 255.
95 In wxPython there are typemaps that will automatically convert from a
96 colour name, or from a '#RRGGBB' colour hex value string to a
97 wx.Colour object when calling C++ methods that expect a wxColour.
98 This means that the following are all equivallent::
100 win.SetBackgroundColour(wxColour(0,0,255))
101 win.SetBackgroundColour('BLUE')
102 win.SetBackgroundColour('#0000FF')
104 Additional colour names and their coresponding values can be added
105 using `wx.ColourDatabase`. Various system colours (as set in the
106 user's system preferences) can be retrieved with
107 `wx.SystemSettings.GetColour`.
111 return "<%s.%s; proxy of C++ wxColour instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
112 def __init__(self
, *args
, **kwargs
):
114 __init__(self, byte red=0, byte green=0, byte blue=0) -> Colour
116 Constructs a colour from red, green and blue values.
118 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
121 newobj
= _gdi_
.new_Colour(*args
, **kwargs
)
122 self
.this
= newobj
.this
125 def __del__(self
, destroy
=_gdi_
.delete_Colour
):
128 if self
.thisown
: destroy(self
)
131 def Red(*args
, **kwargs
):
135 Returns the red intensity.
137 return _gdi_
.Colour_Red(*args
, **kwargs
)
139 def Green(*args
, **kwargs
):
143 Returns the green intensity.
145 return _gdi_
.Colour_Green(*args
, **kwargs
)
147 def Blue(*args
, **kwargs
):
151 Returns the blue intensity.
153 return _gdi_
.Colour_Blue(*args
, **kwargs
)
155 def Ok(*args
, **kwargs
):
159 Returns True if the colour object is valid (the colour has been
160 initialised with RGB values).
162 return _gdi_
.Colour_Ok(*args
, **kwargs
)
164 def Set(*args
, **kwargs
):
166 Set(self, byte red, byte green, byte blue)
168 Sets the RGB intensity values.
170 return _gdi_
.Colour_Set(*args
, **kwargs
)
172 def SetRGB(*args
, **kwargs
):
174 SetRGB(self, unsigned long colRGB)
176 Sets the RGB intensity values from a packed RGB value.
178 return _gdi_
.Colour_SetRGB(*args
, **kwargs
)
180 def SetFromName(*args
, **kwargs
):
182 SetFromName(self, String colourName)
184 Sets the RGB intensity values using a colour name listed in
185 ``wx.TheColourDatabase``.
187 return _gdi_
.Colour_SetFromName(*args
, **kwargs
)
189 def GetPixel(*args
, **kwargs
):
191 GetPixel(self) -> long
193 Returns a pixel value which is platform-dependent. On Windows, a
194 COLORREF is returned. On X, an allocated pixel value is returned. -1
195 is returned if the pixel is invalid (on X, unallocated).
197 return _gdi_
.Colour_GetPixel(*args
, **kwargs
)
199 def __eq__(*args
, **kwargs
):
201 __eq__(self, Colour colour) -> bool
203 Compare colours for equality
205 return _gdi_
.Colour___eq__(*args
, **kwargs
)
207 def __ne__(*args
, **kwargs
):
209 __ne__(self, Colour colour) -> bool
211 Compare colours for inequality
213 return _gdi_
.Colour___ne__(*args
, **kwargs
)
215 def Get(*args
, **kwargs
):
219 Returns the RGB intensity values as a tuple.
221 return _gdi_
.Colour_Get(*args
, **kwargs
)
223 def GetRGB(*args
, **kwargs
):
225 GetRGB(self) -> unsigned long
227 Return the colour as a packed RGB value
229 return _gdi_
.Colour_GetRGB(*args
, **kwargs
)
231 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
232 def __str__(self
): return str(self
.Get())
233 def __repr__(self
): return 'wx.Colour' + str(self
.Get())
234 def __nonzero__(self
): return self
.Ok()
235 __safe_for_unpickling__
= True
236 def __reduce__(self
): return (Colour
, self
.Get())
239 class ColourPtr(Colour
):
240 def __init__(self
, this
):
242 if not hasattr(self
,"thisown"): self
.thisown
= 0
243 self
.__class
__ = Colour
244 _gdi_
.Colour_swigregister(ColourPtr
)
246 def NamedColour(*args
, **kwargs
):
248 NamedColour(String colorName) -> Colour
250 Constructs a colour object using a colour name listed in
251 ``wx.TheColourDatabase``.
253 val
= _gdi_
.new_NamedColour(*args
, **kwargs
)
257 def ColourRGB(*args
, **kwargs
):
259 ColourRGB(unsigned long colRGB) -> Colour
261 Constructs a colour from a packed RGB value.
263 val
= _gdi_
.new_ColourRGB(*args
, **kwargs
)
268 NamedColor
= NamedColour
271 class Palette(GDIObject
):
272 """Proxy of C++ Palette class"""
274 return "<%s.%s; proxy of C++ wxPalette instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
275 def __init__(self
, *args
, **kwargs
):
276 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
277 newobj
= _gdi_
.new_Palette(*args
, **kwargs
)
278 self
.this
= newobj
.this
281 def __del__(self
, destroy
=_gdi_
.delete_Palette
):
284 if self
.thisown
: destroy(self
)
287 def GetPixel(*args
, **kwargs
):
288 """GetPixel(self, byte red, byte green, byte blue) -> int"""
289 return _gdi_
.Palette_GetPixel(*args
, **kwargs
)
291 def GetRGB(*args
, **kwargs
):
292 """GetRGB(self, int pixel) -> (R,G,B)"""
293 return _gdi_
.Palette_GetRGB(*args
, **kwargs
)
295 def GetColoursCount(*args
, **kwargs
):
296 """GetColoursCount(self) -> int"""
297 return _gdi_
.Palette_GetColoursCount(*args
, **kwargs
)
299 def Ok(*args
, **kwargs
):
300 """Ok(self) -> bool"""
301 return _gdi_
.Palette_Ok(*args
, **kwargs
)
303 def __nonzero__(self
): return self
.Ok()
305 class PalettePtr(Palette
):
306 def __init__(self
, this
):
308 if not hasattr(self
,"thisown"): self
.thisown
= 0
309 self
.__class
__ = Palette
310 _gdi_
.Palette_swigregister(PalettePtr
)
312 #---------------------------------------------------------------------------
314 class Pen(GDIObject
):
315 """Proxy of C++ Pen class"""
317 return "<%s.%s; proxy of C++ wxPen instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
318 def __init__(self
, *args
, **kwargs
):
319 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
320 newobj
= _gdi_
.new_Pen(*args
, **kwargs
)
321 self
.this
= newobj
.this
324 def __del__(self
, destroy
=_gdi_
.delete_Pen
):
327 if self
.thisown
: destroy(self
)
330 def GetCap(*args
, **kwargs
):
331 """GetCap(self) -> int"""
332 return _gdi_
.Pen_GetCap(*args
, **kwargs
)
334 def GetColour(*args
, **kwargs
):
335 """GetColour(self) -> Colour"""
336 return _gdi_
.Pen_GetColour(*args
, **kwargs
)
338 def GetJoin(*args
, **kwargs
):
339 """GetJoin(self) -> int"""
340 return _gdi_
.Pen_GetJoin(*args
, **kwargs
)
342 def GetStyle(*args
, **kwargs
):
343 """GetStyle(self) -> int"""
344 return _gdi_
.Pen_GetStyle(*args
, **kwargs
)
346 def GetWidth(*args
, **kwargs
):
347 """GetWidth(self) -> int"""
348 return _gdi_
.Pen_GetWidth(*args
, **kwargs
)
350 def Ok(*args
, **kwargs
):
351 """Ok(self) -> bool"""
352 return _gdi_
.Pen_Ok(*args
, **kwargs
)
354 def SetCap(*args
, **kwargs
):
355 """SetCap(self, int cap_style)"""
356 return _gdi_
.Pen_SetCap(*args
, **kwargs
)
358 def SetColour(*args
, **kwargs
):
359 """SetColour(self, Colour colour)"""
360 return _gdi_
.Pen_SetColour(*args
, **kwargs
)
362 def SetJoin(*args
, **kwargs
):
363 """SetJoin(self, int join_style)"""
364 return _gdi_
.Pen_SetJoin(*args
, **kwargs
)
366 def SetStyle(*args
, **kwargs
):
367 """SetStyle(self, int style)"""
368 return _gdi_
.Pen_SetStyle(*args
, **kwargs
)
370 def SetWidth(*args
, **kwargs
):
371 """SetWidth(self, int width)"""
372 return _gdi_
.Pen_SetWidth(*args
, **kwargs
)
374 def SetDashes(*args
, **kwargs
):
375 """SetDashes(self, int dashes)"""
376 return _gdi_
.Pen_SetDashes(*args
, **kwargs
)
378 def GetDashes(*args
, **kwargs
):
379 """GetDashes(self) -> PyObject"""
380 return _gdi_
.Pen_GetDashes(*args
, **kwargs
)
382 def _SetDashes(*args
, **kwargs
):
383 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
384 return _gdi_
.Pen__SetDashes(*args
, **kwargs
)
386 def SetDashes(self
, dashes
):
388 Associate a list of dash lengths with the Pen.
390 self
._SetDashes
(self
, dashes
)
392 def GetDashCount(*args
, **kwargs
):
393 """GetDashCount(self) -> int"""
394 return _gdi_
.Pen_GetDashCount(*args
, **kwargs
)
396 def GetStipple(*args
, **kwargs
):
397 """GetStipple(self) -> Bitmap"""
398 return _gdi_
.Pen_GetStipple(*args
, **kwargs
)
400 def SetStipple(*args
, **kwargs
):
401 """SetStipple(self, Bitmap stipple)"""
402 return _gdi_
.Pen_SetStipple(*args
, **kwargs
)
404 def __eq__(*args
, **kwargs
):
405 """__eq__(self, Pen other) -> bool"""
406 return _gdi_
.Pen___eq__(*args
, **kwargs
)
408 def __ne__(*args
, **kwargs
):
409 """__ne__(self, Pen other) -> bool"""
410 return _gdi_
.Pen___ne__(*args
, **kwargs
)
412 def __nonzero__(self
): return self
.Ok()
415 def __init__(self
, this
):
417 if not hasattr(self
,"thisown"): self
.thisown
= 0
419 _gdi_
.Pen_swigregister(PenPtr
)
421 #---------------------------------------------------------------------------
423 class Brush(GDIObject
):
425 A brush is a drawing tool for filling in areas. It is used for
426 painting the background of rectangles, ellipses, etc. when drawing on
427 a `wx.DC`. It has a colour and a style.
430 return "<%s.%s; proxy of C++ wxBrush instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
431 def __init__(self
, *args
, **kwargs
):
433 __init__(self, Colour colour, int style=SOLID) -> Brush
435 Constructs a brush from a `wx.Colour` object and a style.
437 newobj
= _gdi_
.new_Brush(*args
, **kwargs
)
438 self
.this
= newobj
.this
441 def __del__(self
, destroy
=_gdi_
.delete_Brush
):
444 if self
.thisown
: destroy(self
)
447 def SetColour(*args
, **kwargs
):
449 SetColour(self, Colour col)
451 Set the brush's `wx.Colour`.
453 return _gdi_
.Brush_SetColour(*args
, **kwargs
)
455 def SetStyle(*args
, **kwargs
):
457 SetStyle(self, int style)
459 Sets the style of the brush. See `__init__` for a listing of styles.
461 return _gdi_
.Brush_SetStyle(*args
, **kwargs
)
463 def SetStipple(*args
, **kwargs
):
465 SetStipple(self, Bitmap stipple)
467 Sets the stipple `wx.Bitmap`.
469 return _gdi_
.Brush_SetStipple(*args
, **kwargs
)
471 def GetColour(*args
, **kwargs
):
473 GetColour(self) -> Colour
475 Returns the `wx.Colour` of the brush.
477 return _gdi_
.Brush_GetColour(*args
, **kwargs
)
479 def GetStyle(*args
, **kwargs
):
481 GetStyle(self) -> int
483 Returns the style of the brush. See `__init__` for a listing of
486 return _gdi_
.Brush_GetStyle(*args
, **kwargs
)
488 def GetStipple(*args
, **kwargs
):
490 GetStipple(self) -> Bitmap
492 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
493 have a wx.STIPPLE style, then the return value may be non-None but an
494 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
496 return _gdi_
.Brush_GetStipple(*args
, **kwargs
)
498 def IsHatch(*args
, **kwargs
):
500 IsHatch(self) -> bool
502 Is the current style a hatch type?
504 return _gdi_
.Brush_IsHatch(*args
, **kwargs
)
506 def Ok(*args
, **kwargs
):
510 Returns True if the brush is initialised and valid.
512 return _gdi_
.Brush_Ok(*args
, **kwargs
)
514 def __nonzero__(self
): return self
.Ok()
516 class BrushPtr(Brush
):
517 def __init__(self
, this
):
519 if not hasattr(self
,"thisown"): self
.thisown
= 0
520 self
.__class
__ = Brush
521 _gdi_
.Brush_swigregister(BrushPtr
)
523 def BrushFromBitmap(*args
, **kwargs
):
525 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
527 Constructs a stippled brush using a bitmap.
529 val
= _gdi_
.new_BrushFromBitmap(*args
, **kwargs
)
533 class Bitmap(GDIObject
):
535 The wx.Bitmap class encapsulates the concept of a platform-dependent
536 bitmap. It can be either monochrome or colour, and either loaded from
537 a file or created dynamically. A bitmap can be selected into a memory
538 device context (instance of `wx.MemoryDC`). This enables the bitmap to
539 be copied to a window or memory device context using `wx.DC.Blit`, or
540 to be used as a drawing surface.
543 return "<%s.%s; proxy of C++ wxBitmap instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
544 def __init__(self
, *args
, **kwargs
):
546 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
548 Loads a bitmap from a file.
550 newobj
= _gdi_
.new_Bitmap(*args
, **kwargs
)
551 self
.this
= newobj
.this
554 def __del__(self
, destroy
=_gdi_
.delete_Bitmap
):
557 if self
.thisown
: destroy(self
)
560 def GetHandle(*args
, **kwargs
):
561 """GetHandle(self) -> long"""
562 return _gdi_
.Bitmap_GetHandle(*args
, **kwargs
)
564 def SetHandle(*args
, **kwargs
):
565 """SetHandle(self, long handle)"""
566 return _gdi_
.Bitmap_SetHandle(*args
, **kwargs
)
568 def Ok(*args
, **kwargs
):
569 """Ok(self) -> bool"""
570 return _gdi_
.Bitmap_Ok(*args
, **kwargs
)
572 def GetWidth(*args
, **kwargs
):
574 GetWidth(self) -> int
576 Gets the width of the bitmap in pixels.
578 return _gdi_
.Bitmap_GetWidth(*args
, **kwargs
)
580 def GetHeight(*args
, **kwargs
):
582 GetHeight(self) -> int
584 Gets the height of the bitmap in pixels.
586 return _gdi_
.Bitmap_GetHeight(*args
, **kwargs
)
588 def GetDepth(*args
, **kwargs
):
590 GetDepth(self) -> int
592 Gets the colour depth of the bitmap. A value of 1 indicates a
595 return _gdi_
.Bitmap_GetDepth(*args
, **kwargs
)
597 def GetSize(*args
, **kwargs
):
599 GetSize(self) -> Size
601 Get the size of the bitmap.
603 return _gdi_
.Bitmap_GetSize(*args
, **kwargs
)
605 def ConvertToImage(*args
, **kwargs
):
607 ConvertToImage(self) -> Image
609 Creates a platform-independent image from a platform-dependent
610 bitmap. This preserves mask information so that bitmaps and images can
611 be converted back and forth without loss in that respect.
613 return _gdi_
.Bitmap_ConvertToImage(*args
, **kwargs
)
615 def GetMask(*args
, **kwargs
):
617 GetMask(self) -> Mask
619 Gets the associated mask (if any) which may have been loaded from a
620 file or explpicitly set for the bitmap.
622 :see: `SetMask`, `wx.Mask`
625 return _gdi_
.Bitmap_GetMask(*args
, **kwargs
)
627 def SetMask(*args
, **kwargs
):
629 SetMask(self, Mask mask)
631 Sets the mask for this bitmap.
633 :see: `GetMask`, `wx.Mask`
636 return _gdi_
.Bitmap_SetMask(*args
, **kwargs
)
638 def SetMaskColour(*args
, **kwargs
):
640 SetMaskColour(self, Colour colour)
642 Create a Mask based on a specified colour in the Bitmap.
644 return _gdi_
.Bitmap_SetMaskColour(*args
, **kwargs
)
646 def GetSubBitmap(*args
, **kwargs
):
648 GetSubBitmap(self, Rect rect) -> Bitmap
650 Returns a sub-bitmap of the current one as long as the rect belongs
651 entirely to the bitmap. This function preserves bit depth and mask
654 return _gdi_
.Bitmap_GetSubBitmap(*args
, **kwargs
)
656 def SaveFile(*args
, **kwargs
):
658 SaveFile(self, String name, int type, Palette palette=None) -> bool
660 Saves a bitmap in the named file. See `__init__` for a description of
661 the ``type`` parameter.
663 return _gdi_
.Bitmap_SaveFile(*args
, **kwargs
)
665 def LoadFile(*args
, **kwargs
):
667 LoadFile(self, String name, int type) -> bool
669 Loads a bitmap from a file. See `__init__` for a description of the
672 return _gdi_
.Bitmap_LoadFile(*args
, **kwargs
)
674 def GetPalette(*args
, **kwargs
):
675 """GetPalette(self) -> Palette"""
676 return _gdi_
.Bitmap_GetPalette(*args
, **kwargs
)
678 def SetPalette(*args
, **kwargs
):
679 """SetPalette(self, Palette palette)"""
680 return _gdi_
.Bitmap_SetPalette(*args
, **kwargs
)
682 def CopyFromIcon(*args
, **kwargs
):
683 """CopyFromIcon(self, Icon icon) -> bool"""
684 return _gdi_
.Bitmap_CopyFromIcon(*args
, **kwargs
)
686 def SetHeight(*args
, **kwargs
):
688 SetHeight(self, int height)
690 Set the height property (does not affect the existing bitmap data).
692 return _gdi_
.Bitmap_SetHeight(*args
, **kwargs
)
694 def SetWidth(*args
, **kwargs
):
696 SetWidth(self, int width)
698 Set the width property (does not affect the existing bitmap data).
700 return _gdi_
.Bitmap_SetWidth(*args
, **kwargs
)
702 def SetDepth(*args
, **kwargs
):
704 SetDepth(self, int depth)
706 Set the depth property (does not affect the existing bitmap data).
708 return _gdi_
.Bitmap_SetDepth(*args
, **kwargs
)
710 def SetSize(*args
, **kwargs
):
712 SetSize(self, Size size)
714 Set the bitmap size (does not affect the existing bitmap data).
716 return _gdi_
.Bitmap_SetSize(*args
, **kwargs
)
718 def CopyFromCursor(*args
, **kwargs
):
719 """CopyFromCursor(self, Cursor cursor) -> bool"""
720 return _gdi_
.Bitmap_CopyFromCursor(*args
, **kwargs
)
722 def __nonzero__(self
): return self
.Ok()
723 def __eq__(*args
, **kwargs
):
724 """__eq__(self, Bitmap other) -> bool"""
725 return _gdi_
.Bitmap___eq__(*args
, **kwargs
)
727 def __ne__(*args
, **kwargs
):
728 """__ne__(self, Bitmap other) -> bool"""
729 return _gdi_
.Bitmap___ne__(*args
, **kwargs
)
732 class BitmapPtr(Bitmap
):
733 def __init__(self
, this
):
735 if not hasattr(self
,"thisown"): self
.thisown
= 0
736 self
.__class
__ = Bitmap
737 _gdi_
.Bitmap_swigregister(BitmapPtr
)
739 def EmptyBitmap(*args
, **kwargs
):
741 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
743 Creates a new bitmap of the given size. A depth of -1 indicates the
744 depth of the current screen or visual. Some platforms only support 1
745 for monochrome and -1 for the current colour setting.
747 val
= _gdi_
.new_EmptyBitmap(*args
, **kwargs
)
751 def BitmapFromIcon(*args
, **kwargs
):
753 BitmapFromIcon(Icon icon) -> Bitmap
755 Create a new bitmap from a `wx.Icon` object.
757 val
= _gdi_
.new_BitmapFromIcon(*args
, **kwargs
)
761 def BitmapFromImage(*args
, **kwargs
):
763 BitmapFromImage(Image image, int depth=-1) -> Bitmap
765 Creates bitmap object from a `wx.Image`. This has to be done to
766 actually display a `wx.Image` as you cannot draw an image directly on
767 a window. The resulting bitmap will use the provided colour depth (or
768 that of the current screen colour depth if depth is -1) which entails
769 that a colour reduction may have to take place.
771 val
= _gdi_
.new_BitmapFromImage(*args
, **kwargs
)
775 def BitmapFromXPMData(*args
, **kwargs
):
777 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
779 Construct a Bitmap from a list of strings formatted as XPM data.
781 val
= _gdi_
.new_BitmapFromXPMData(*args
, **kwargs
)
785 def BitmapFromBits(*args
, **kwargs
):
787 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
789 Creates a bitmap from an array of bits. You should only use this
790 function for monochrome bitmaps (depth 1) in portable programs: in
791 this case the bits parameter should contain an XBM image. For other
792 bit depths, the behaviour is platform dependent.
794 val
= _gdi_
.new_BitmapFromBits(*args
, **kwargs
)
798 class Mask(_core
.Object
):
800 This class encapsulates a monochrome mask bitmap, where the masked
801 area is black and the unmasked area is white. When associated with a
802 bitmap and drawn in a device context, the unmasked area of the bitmap
803 will be drawn, and the masked area will not be drawn.
805 A mask may be associated with a `wx.Bitmap`. It is used in
806 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
807 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
811 return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
812 def __init__(self
, *args
, **kwargs
):
814 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
816 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
817 that indicates the transparent portions of the mask. In other words,
818 the pixels in ``bitmap`` that match ``colour`` will be the transparent
819 portions of the mask. If no ``colour`` or an invalid ``colour`` is
820 passed then BLACK is used.
822 :see: `wx.Bitmap`, `wx.Colour`
824 newobj
= _gdi_
.new_Mask(*args
, **kwargs
)
825 self
.this
= newobj
.this
830 def __init__(self
, this
):
832 if not hasattr(self
,"thisown"): self
.thisown
= 0
833 self
.__class
__ = Mask
834 _gdi_
.Mask_swigregister(MaskPtr
)
836 MaskColour
= wx
._deprecated
(Mask
, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
837 class Icon(GDIObject
):
838 """Proxy of C++ Icon class"""
840 return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
841 def __init__(self
, *args
, **kwargs
):
842 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
843 newobj
= _gdi_
.new_Icon(*args
, **kwargs
)
844 self
.this
= newobj
.this
847 def __del__(self
, destroy
=_gdi_
.delete_Icon
):
850 if self
.thisown
: destroy(self
)
853 def LoadFile(*args
, **kwargs
):
854 """LoadFile(self, String name, int type) -> bool"""
855 return _gdi_
.Icon_LoadFile(*args
, **kwargs
)
857 def GetHandle(*args
, **kwargs
):
858 """GetHandle(self) -> long"""
859 return _gdi_
.Icon_GetHandle(*args
, **kwargs
)
861 def SetHandle(*args
, **kwargs
):
862 """SetHandle(self, long handle)"""
863 return _gdi_
.Icon_SetHandle(*args
, **kwargs
)
865 def Ok(*args
, **kwargs
):
866 """Ok(self) -> bool"""
867 return _gdi_
.Icon_Ok(*args
, **kwargs
)
869 def GetWidth(*args
, **kwargs
):
870 """GetWidth(self) -> int"""
871 return _gdi_
.Icon_GetWidth(*args
, **kwargs
)
873 def GetHeight(*args
, **kwargs
):
874 """GetHeight(self) -> int"""
875 return _gdi_
.Icon_GetHeight(*args
, **kwargs
)
877 def GetDepth(*args
, **kwargs
):
878 """GetDepth(self) -> int"""
879 return _gdi_
.Icon_GetDepth(*args
, **kwargs
)
881 def SetWidth(*args
, **kwargs
):
882 """SetWidth(self, int w)"""
883 return _gdi_
.Icon_SetWidth(*args
, **kwargs
)
885 def SetHeight(*args
, **kwargs
):
886 """SetHeight(self, int h)"""
887 return _gdi_
.Icon_SetHeight(*args
, **kwargs
)
889 def SetDepth(*args
, **kwargs
):
890 """SetDepth(self, int d)"""
891 return _gdi_
.Icon_SetDepth(*args
, **kwargs
)
893 def SetSize(*args
, **kwargs
):
894 """SetSize(self, Size size)"""
895 return _gdi_
.Icon_SetSize(*args
, **kwargs
)
897 def CopyFromBitmap(*args
, **kwargs
):
898 """CopyFromBitmap(self, Bitmap bmp)"""
899 return _gdi_
.Icon_CopyFromBitmap(*args
, **kwargs
)
901 def __nonzero__(self
): return self
.Ok()
904 def __init__(self
, this
):
906 if not hasattr(self
,"thisown"): self
.thisown
= 0
907 self
.__class
__ = Icon
908 _gdi_
.Icon_swigregister(IconPtr
)
910 def EmptyIcon(*args
, **kwargs
):
911 """EmptyIcon() -> Icon"""
912 val
= _gdi_
.new_EmptyIcon(*args
, **kwargs
)
916 def IconFromLocation(*args
, **kwargs
):
917 """IconFromLocation(IconLocation loc) -> Icon"""
918 val
= _gdi_
.new_IconFromLocation(*args
, **kwargs
)
922 def IconFromBitmap(*args
, **kwargs
):
923 """IconFromBitmap(Bitmap bmp) -> Icon"""
924 val
= _gdi_
.new_IconFromBitmap(*args
, **kwargs
)
928 def IconFromXPMData(*args
, **kwargs
):
929 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
930 val
= _gdi_
.new_IconFromXPMData(*args
, **kwargs
)
934 class IconLocation(object):
935 """Proxy of C++ IconLocation class"""
937 return "<%s.%s; proxy of C++ wxIconLocation instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
938 def __init__(self
, *args
, **kwargs
):
939 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
940 newobj
= _gdi_
.new_IconLocation(*args
, **kwargs
)
941 self
.this
= newobj
.this
944 def __del__(self
, destroy
=_gdi_
.delete_IconLocation
):
947 if self
.thisown
: destroy(self
)
950 def IsOk(*args
, **kwargs
):
951 """IsOk(self) -> bool"""
952 return _gdi_
.IconLocation_IsOk(*args
, **kwargs
)
954 def __nonzero__(self
): return self
.Ok()
955 def SetFileName(*args
, **kwargs
):
956 """SetFileName(self, String filename)"""
957 return _gdi_
.IconLocation_SetFileName(*args
, **kwargs
)
959 def GetFileName(*args
, **kwargs
):
960 """GetFileName(self) -> String"""
961 return _gdi_
.IconLocation_GetFileName(*args
, **kwargs
)
963 def SetIndex(*args
, **kwargs
):
964 """SetIndex(self, int num)"""
965 return _gdi_
.IconLocation_SetIndex(*args
, **kwargs
)
967 def GetIndex(*args
, **kwargs
):
968 """GetIndex(self) -> int"""
969 return _gdi_
.IconLocation_GetIndex(*args
, **kwargs
)
972 class IconLocationPtr(IconLocation
):
973 def __init__(self
, this
):
975 if not hasattr(self
,"thisown"): self
.thisown
= 0
976 self
.__class
__ = IconLocation
977 _gdi_
.IconLocation_swigregister(IconLocationPtr
)
979 class IconBundle(object):
980 """Proxy of C++ IconBundle class"""
982 return "<%s.%s; proxy of C++ wxIconBundle instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
983 def __init__(self
, *args
, **kwargs
):
984 """__init__(self) -> IconBundle"""
985 newobj
= _gdi_
.new_IconBundle(*args
, **kwargs
)
986 self
.this
= newobj
.this
989 def __del__(self
, destroy
=_gdi_
.delete_IconBundle
):
992 if self
.thisown
: destroy(self
)
995 def AddIcon(*args
, **kwargs
):
996 """AddIcon(self, Icon icon)"""
997 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
999 def AddIconFromFile(*args
, **kwargs
):
1000 """AddIconFromFile(self, String file, long type)"""
1001 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
1003 def GetIcon(*args
, **kwargs
):
1004 """GetIcon(self, Size size) -> Icon"""
1005 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
1008 class IconBundlePtr(IconBundle
):
1009 def __init__(self
, this
):
1011 if not hasattr(self
,"thisown"): self
.thisown
= 0
1012 self
.__class
__ = IconBundle
1013 _gdi_
.IconBundle_swigregister(IconBundlePtr
)
1015 def IconBundleFromFile(*args
, **kwargs
):
1016 """IconBundleFromFile(String file, long type) -> IconBundle"""
1017 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
1021 def IconBundleFromIcon(*args
, **kwargs
):
1022 """IconBundleFromIcon(Icon icon) -> IconBundle"""
1023 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
1027 class Cursor(GDIObject
):
1029 A cursor is a small bitmap usually used for denoting where the mouse
1030 pointer is, with a picture that might indicate the interpretation of a
1033 A single cursor object may be used in many windows (any subwindow
1034 type). The wxWindows convention is to set the cursor for a window, as
1035 in X, rather than to set it globally as in MS Windows, although a
1036 global `wx.SetCursor` function is also available for use on MS Windows.
1040 return "<%s.%s; proxy of C++ wxCursor instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1041 def __init__(self
, *args
, **kwargs
):
1043 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1045 Construct a Cursor from a file. Specify the type of file using
1046 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1049 newobj
= _gdi_
.new_Cursor(*args
, **kwargs
)
1050 self
.this
= newobj
.this
1053 def __del__(self
, destroy
=_gdi_
.delete_Cursor
):
1056 if self
.thisown
: destroy(self
)
1059 def GetHandle(*args
, **kwargs
):
1061 GetHandle(self) -> long
1063 Get the MS Windows handle for the cursor
1065 return _gdi_
.Cursor_GetHandle(*args
, **kwargs
)
1067 def SetHandle(*args
, **kwargs
):
1069 SetHandle(self, long handle)
1071 Set the MS Windows handle to use for the cursor
1073 return _gdi_
.Cursor_SetHandle(*args
, **kwargs
)
1075 def Ok(*args
, **kwargs
):
1076 """Ok(self) -> bool"""
1077 return _gdi_
.Cursor_Ok(*args
, **kwargs
)
1079 def __nonzero__(self
): return self
.Ok()
1080 def GetWidth(*args
, **kwargs
):
1081 """GetWidth(self) -> int"""
1082 return _gdi_
.Cursor_GetWidth(*args
, **kwargs
)
1084 def GetHeight(*args
, **kwargs
):
1085 """GetHeight(self) -> int"""
1086 return _gdi_
.Cursor_GetHeight(*args
, **kwargs
)
1088 def GetDepth(*args
, **kwargs
):
1089 """GetDepth(self) -> int"""
1090 return _gdi_
.Cursor_GetDepth(*args
, **kwargs
)
1092 def SetWidth(*args
, **kwargs
):
1093 """SetWidth(self, int w)"""
1094 return _gdi_
.Cursor_SetWidth(*args
, **kwargs
)
1096 def SetHeight(*args
, **kwargs
):
1097 """SetHeight(self, int h)"""
1098 return _gdi_
.Cursor_SetHeight(*args
, **kwargs
)
1100 def SetDepth(*args
, **kwargs
):
1101 """SetDepth(self, int d)"""
1102 return _gdi_
.Cursor_SetDepth(*args
, **kwargs
)
1104 def SetSize(*args
, **kwargs
):
1105 """SetSize(self, Size size)"""
1106 return _gdi_
.Cursor_SetSize(*args
, **kwargs
)
1109 class CursorPtr(Cursor
):
1110 def __init__(self
, this
):
1112 if not hasattr(self
,"thisown"): self
.thisown
= 0
1113 self
.__class
__ = Cursor
1114 _gdi_
.Cursor_swigregister(CursorPtr
)
1116 def StockCursor(*args
, **kwargs
):
1118 StockCursor(int id) -> Cursor
1120 Create a cursor using one of the stock cursors. Note that not all
1121 stock cursors are available on all platforms.
1123 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
1127 def CursorFromImage(*args
, **kwargs
):
1129 CursorFromImage(Image image) -> Cursor
1131 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1132 for setting the transparent portions of the cursor.
1134 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
1138 #---------------------------------------------------------------------------
1140 OutRegion
= _gdi_
.OutRegion
1141 PartRegion
= _gdi_
.PartRegion
1142 InRegion
= _gdi_
.InRegion
1143 class Region(GDIObject
):
1144 """Proxy of C++ Region class"""
1146 return "<%s.%s; proxy of C++ wxRegion instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1147 def __init__(self
, *args
, **kwargs
):
1148 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1149 newobj
= _gdi_
.new_Region(*args
, **kwargs
)
1150 self
.this
= newobj
.this
1153 def __del__(self
, destroy
=_gdi_
.delete_Region
):
1156 if self
.thisown
: destroy(self
)
1159 def Clear(*args
, **kwargs
):
1161 return _gdi_
.Region_Clear(*args
, **kwargs
)
1163 def Offset(*args
, **kwargs
):
1164 """Offset(self, int x, int y) -> bool"""
1165 return _gdi_
.Region_Offset(*args
, **kwargs
)
1167 def Contains(*args
, **kwargs
):
1168 """Contains(self, int x, int y) -> int"""
1169 return _gdi_
.Region_Contains(*args
, **kwargs
)
1171 def ContainsPoint(*args
, **kwargs
):
1172 """ContainsPoint(self, Point pt) -> int"""
1173 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
1175 def ContainsRect(*args
, **kwargs
):
1176 """ContainsRect(self, Rect rect) -> int"""
1177 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
1179 def ContainsRectDim(*args
, **kwargs
):
1180 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1181 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
1183 def GetBox(*args
, **kwargs
):
1184 """GetBox(self) -> Rect"""
1185 return _gdi_
.Region_GetBox(*args
, **kwargs
)
1187 def Intersect(*args
, **kwargs
):
1188 """Intersect(self, int x, int y, int width, int height) -> bool"""
1189 return _gdi_
.Region_Intersect(*args
, **kwargs
)
1191 def IntersectRect(*args
, **kwargs
):
1192 """IntersectRect(self, Rect rect) -> bool"""
1193 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
1195 def IntersectRegion(*args
, **kwargs
):
1196 """IntersectRegion(self, Region region) -> bool"""
1197 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
1199 def IsEmpty(*args
, **kwargs
):
1200 """IsEmpty(self) -> bool"""
1201 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
1203 def Union(*args
, **kwargs
):
1204 """Union(self, int x, int y, int width, int height) -> bool"""
1205 return _gdi_
.Region_Union(*args
, **kwargs
)
1207 def UnionRect(*args
, **kwargs
):
1208 """UnionRect(self, Rect rect) -> bool"""
1209 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1211 def UnionRegion(*args
, **kwargs
):
1212 """UnionRegion(self, Region region) -> bool"""
1213 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1215 def Subtract(*args
, **kwargs
):
1216 """Subtract(self, int x, int y, int width, int height) -> bool"""
1217 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1219 def SubtractRect(*args
, **kwargs
):
1220 """SubtractRect(self, Rect rect) -> bool"""
1221 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1223 def SubtractRegion(*args
, **kwargs
):
1224 """SubtractRegion(self, Region region) -> bool"""
1225 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1227 def Xor(*args
, **kwargs
):
1228 """Xor(self, int x, int y, int width, int height) -> bool"""
1229 return _gdi_
.Region_Xor(*args
, **kwargs
)
1231 def XorRect(*args
, **kwargs
):
1232 """XorRect(self, Rect rect) -> bool"""
1233 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1235 def XorRegion(*args
, **kwargs
):
1236 """XorRegion(self, Region region) -> bool"""
1237 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1239 def ConvertToBitmap(*args
, **kwargs
):
1240 """ConvertToBitmap(self) -> Bitmap"""
1241 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1243 def UnionBitmap(*args
, **kwargs
):
1244 """UnionBitmap(self, Bitmap bmp) -> bool"""
1245 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1247 def UnionBitmapColour(*args
, **kwargs
):
1248 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1249 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1252 class RegionPtr(Region
):
1253 def __init__(self
, this
):
1255 if not hasattr(self
,"thisown"): self
.thisown
= 0
1256 self
.__class
__ = Region
1257 _gdi_
.Region_swigregister(RegionPtr
)
1259 def RegionFromBitmap(*args
, **kwargs
):
1260 """RegionFromBitmap(Bitmap bmp) -> Region"""
1261 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1265 def RegionFromBitmapColour(*args
, **kwargs
):
1266 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1267 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1271 def RegionFromPoints(*args
, **kwargs
):
1272 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1273 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1277 class RegionIterator(_core
.Object
):
1278 """Proxy of C++ RegionIterator class"""
1280 return "<%s.%s; proxy of C++ wxRegionIterator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1281 def __init__(self
, *args
, **kwargs
):
1282 """__init__(self, Region region) -> RegionIterator"""
1283 newobj
= _gdi_
.new_RegionIterator(*args
, **kwargs
)
1284 self
.this
= newobj
.this
1287 def __del__(self
, destroy
=_gdi_
.delete_RegionIterator
):
1290 if self
.thisown
: destroy(self
)
1293 def GetX(*args
, **kwargs
):
1294 """GetX(self) -> int"""
1295 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1297 def GetY(*args
, **kwargs
):
1298 """GetY(self) -> int"""
1299 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1301 def GetW(*args
, **kwargs
):
1302 """GetW(self) -> int"""
1303 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1305 def GetWidth(*args
, **kwargs
):
1306 """GetWidth(self) -> int"""
1307 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1309 def GetH(*args
, **kwargs
):
1310 """GetH(self) -> int"""
1311 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1313 def GetHeight(*args
, **kwargs
):
1314 """GetHeight(self) -> int"""
1315 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1317 def GetRect(*args
, **kwargs
):
1318 """GetRect(self) -> Rect"""
1319 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1321 def HaveRects(*args
, **kwargs
):
1322 """HaveRects(self) -> bool"""
1323 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1325 def Reset(*args
, **kwargs
):
1327 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1329 def Next(*args
, **kwargs
):
1331 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1333 def __nonzero__(*args
, **kwargs
):
1334 """__nonzero__(self) -> bool"""
1335 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1338 class RegionIteratorPtr(RegionIterator
):
1339 def __init__(self
, this
):
1341 if not hasattr(self
,"thisown"): self
.thisown
= 0
1342 self
.__class
__ = RegionIterator
1343 _gdi_
.RegionIterator_swigregister(RegionIteratorPtr
)
1345 #---------------------------------------------------------------------------
1347 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1348 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1349 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1350 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1351 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1352 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1353 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1354 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1355 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1356 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1357 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1358 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1359 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1360 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1361 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1362 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1363 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1364 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1365 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1366 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1367 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1368 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1369 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1370 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1371 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1372 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1373 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1374 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1375 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1376 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1377 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1378 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1379 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1380 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1381 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1382 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1383 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1384 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1385 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1386 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1387 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1388 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1389 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1390 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1391 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1392 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1393 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1394 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1395 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1396 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1397 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1398 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1399 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1400 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1401 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1402 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1403 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1404 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1405 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1406 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1407 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1408 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1409 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1410 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1411 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1412 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1413 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1414 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1415 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1416 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1417 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1418 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1419 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1420 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1421 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1422 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1423 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1424 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1425 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1426 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1427 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1428 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1429 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1430 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1431 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1432 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1433 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1434 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1435 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1436 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1437 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1438 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1439 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1440 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1441 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1442 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1443 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1444 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1445 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1446 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1447 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1448 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1449 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1450 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1451 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1452 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1453 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1454 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1455 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1456 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1457 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1458 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1459 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1460 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1461 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1462 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1463 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1464 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1465 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1466 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1467 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1468 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1469 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1470 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1471 #---------------------------------------------------------------------------
1473 class NativeFontInfo(object):
1474 """Proxy of C++ NativeFontInfo class"""
1476 return "<%s.%s; proxy of C++ wxNativeFontInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1477 def __init__(self
, *args
, **kwargs
):
1478 """__init__(self) -> NativeFontInfo"""
1479 newobj
= _gdi_
.new_NativeFontInfo(*args
, **kwargs
)
1480 self
.this
= newobj
.this
1483 def __del__(self
, destroy
=_gdi_
.delete_NativeFontInfo
):
1486 if self
.thisown
: destroy(self
)
1489 def Init(*args
, **kwargs
):
1491 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1493 def InitFromFont(*args
, **kwargs
):
1494 """InitFromFont(self, Font font)"""
1495 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1497 def GetPointSize(*args
, **kwargs
):
1498 """GetPointSize(self) -> int"""
1499 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1501 def GetPixelSize(*args
, **kwargs
):
1502 """GetPixelSize(self) -> Size"""
1503 return _gdi_
.NativeFontInfo_GetPixelSize(*args
, **kwargs
)
1505 def GetStyle(*args
, **kwargs
):
1506 """GetStyle(self) -> int"""
1507 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1509 def GetWeight(*args
, **kwargs
):
1510 """GetWeight(self) -> int"""
1511 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1513 def GetUnderlined(*args
, **kwargs
):
1514 """GetUnderlined(self) -> bool"""
1515 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1517 def GetFaceName(*args
, **kwargs
):
1518 """GetFaceName(self) -> String"""
1519 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1521 def GetFamily(*args
, **kwargs
):
1522 """GetFamily(self) -> int"""
1523 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1525 def GetEncoding(*args
, **kwargs
):
1526 """GetEncoding(self) -> int"""
1527 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1529 def SetPointSize(*args
, **kwargs
):
1530 """SetPointSize(self, int pointsize)"""
1531 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1533 def SetPixelSize(*args
, **kwargs
):
1534 """SetPixelSize(self, Size pixelSize)"""
1535 return _gdi_
.NativeFontInfo_SetPixelSize(*args
, **kwargs
)
1537 def SetStyle(*args
, **kwargs
):
1538 """SetStyle(self, int style)"""
1539 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1541 def SetWeight(*args
, **kwargs
):
1542 """SetWeight(self, int weight)"""
1543 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1545 def SetUnderlined(*args
, **kwargs
):
1546 """SetUnderlined(self, bool underlined)"""
1547 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1549 def SetFaceName(*args
, **kwargs
):
1550 """SetFaceName(self, String facename)"""
1551 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1553 def SetFamily(*args
, **kwargs
):
1554 """SetFamily(self, int family)"""
1555 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1557 def SetEncoding(*args
, **kwargs
):
1558 """SetEncoding(self, int encoding)"""
1559 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1561 def FromString(*args
, **kwargs
):
1562 """FromString(self, String s) -> bool"""
1563 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1565 def ToString(*args
, **kwargs
):
1566 """ToString(self) -> String"""
1567 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1569 def __str__(*args
, **kwargs
):
1570 """__str__(self) -> String"""
1571 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1573 def FromUserString(*args
, **kwargs
):
1574 """FromUserString(self, String s) -> bool"""
1575 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1577 def ToUserString(*args
, **kwargs
):
1578 """ToUserString(self) -> String"""
1579 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1582 class NativeFontInfoPtr(NativeFontInfo
):
1583 def __init__(self
, this
):
1585 if not hasattr(self
,"thisown"): self
.thisown
= 0
1586 self
.__class
__ = NativeFontInfo
1587 _gdi_
.NativeFontInfo_swigregister(NativeFontInfoPtr
)
1589 class NativeEncodingInfo(object):
1590 """Proxy of C++ NativeEncodingInfo class"""
1592 return "<%s.%s; proxy of C++ wxNativeEncodingInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1593 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1594 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1595 def __init__(self
, *args
, **kwargs
):
1596 """__init__(self) -> NativeEncodingInfo"""
1597 newobj
= _gdi_
.new_NativeEncodingInfo(*args
, **kwargs
)
1598 self
.this
= newobj
.this
1601 def __del__(self
, destroy
=_gdi_
.delete_NativeEncodingInfo
):
1604 if self
.thisown
: destroy(self
)
1607 def FromString(*args
, **kwargs
):
1608 """FromString(self, String s) -> bool"""
1609 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1611 def ToString(*args
, **kwargs
):
1612 """ToString(self) -> String"""
1613 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1616 class NativeEncodingInfoPtr(NativeEncodingInfo
):
1617 def __init__(self
, this
):
1619 if not hasattr(self
,"thisown"): self
.thisown
= 0
1620 self
.__class
__ = NativeEncodingInfo
1621 _gdi_
.NativeEncodingInfo_swigregister(NativeEncodingInfoPtr
)
1624 def GetNativeFontEncoding(*args
, **kwargs
):
1625 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1626 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1628 def TestFontEncoding(*args
, **kwargs
):
1629 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1630 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1631 #---------------------------------------------------------------------------
1633 class FontMapper(object):
1634 """Proxy of C++ FontMapper class"""
1636 return "<%s.%s; proxy of C++ wxFontMapper instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1637 def __init__(self
, *args
, **kwargs
):
1638 """__init__(self) -> FontMapper"""
1639 newobj
= _gdi_
.new_FontMapper(*args
, **kwargs
)
1640 self
.this
= newobj
.this
1643 def __del__(self
, destroy
=_gdi_
.delete_FontMapper
):
1646 if self
.thisown
: destroy(self
)
1649 def Get(*args
, **kwargs
):
1650 """Get() -> FontMapper"""
1651 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1653 Get
= staticmethod(Get
)
1654 def Set(*args
, **kwargs
):
1655 """Set(FontMapper mapper) -> FontMapper"""
1656 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1658 Set
= staticmethod(Set
)
1659 def CharsetToEncoding(*args
, **kwargs
):
1660 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1661 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1663 def GetSupportedEncodingsCount(*args
, **kwargs
):
1664 """GetSupportedEncodingsCount() -> size_t"""
1665 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1667 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1668 def GetEncoding(*args
, **kwargs
):
1669 """GetEncoding(size_t n) -> int"""
1670 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1672 GetEncoding
= staticmethod(GetEncoding
)
1673 def GetEncodingName(*args
, **kwargs
):
1674 """GetEncodingName(int encoding) -> String"""
1675 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1677 GetEncodingName
= staticmethod(GetEncodingName
)
1678 def GetEncodingDescription(*args
, **kwargs
):
1679 """GetEncodingDescription(int encoding) -> String"""
1680 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1682 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1683 def GetEncodingFromName(*args
, **kwargs
):
1684 """GetEncodingFromName(String name) -> int"""
1685 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1687 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1688 def SetConfigPath(*args
, **kwargs
):
1689 """SetConfigPath(self, String prefix)"""
1690 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1692 def GetDefaultConfigPath(*args
, **kwargs
):
1693 """GetDefaultConfigPath() -> String"""
1694 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1696 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1697 def GetAltForEncoding(*args
, **kwargs
):
1698 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1699 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1701 def IsEncodingAvailable(*args
, **kwargs
):
1702 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1703 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1705 def SetDialogParent(*args
, **kwargs
):
1706 """SetDialogParent(self, Window parent)"""
1707 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1709 def SetDialogTitle(*args
, **kwargs
):
1710 """SetDialogTitle(self, String title)"""
1711 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1714 class FontMapperPtr(FontMapper
):
1715 def __init__(self
, this
):
1717 if not hasattr(self
,"thisown"): self
.thisown
= 0
1718 self
.__class
__ = FontMapper
1719 _gdi_
.FontMapper_swigregister(FontMapperPtr
)
1721 def FontMapper_Get(*args
, **kwargs
):
1722 """FontMapper_Get() -> FontMapper"""
1723 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1725 def FontMapper_Set(*args
, **kwargs
):
1726 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1727 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1729 def FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
):
1730 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1731 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1733 def FontMapper_GetEncoding(*args
, **kwargs
):
1734 """FontMapper_GetEncoding(size_t n) -> int"""
1735 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1737 def FontMapper_GetEncodingName(*args
, **kwargs
):
1738 """FontMapper_GetEncodingName(int encoding) -> String"""
1739 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1741 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1742 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1743 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1745 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1746 """FontMapper_GetEncodingFromName(String name) -> int"""
1747 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1749 def FontMapper_GetDefaultConfigPath(*args
, **kwargs
):
1750 """FontMapper_GetDefaultConfigPath() -> String"""
1751 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1753 #---------------------------------------------------------------------------
1755 class Font(GDIObject
):
1757 A font is an object which determines the appearance of text. Fonts are
1758 used for drawing text to a device context, and setting the appearance
1761 You can retrieve the current system font settings with `wx.SystemSettings`.
1764 return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1765 def __init__(self
, *args
, **kwargs
):
1767 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1768 String face=EmptyString,
1769 int encoding=FONTENCODING_DEFAULT) -> Font
1771 Creates a font object with the specified attributes.
1773 :param pointSize: The size of the font in points.
1775 :param family: Font family. A generic way of referring to fonts
1776 without specifying actual facename. It can be One of
1777 the ``wx.FONTFAMILY_xxx`` constants.
1779 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1781 :param weight: Font weight, sometimes also referred to as font
1782 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1784 :param underline: The value can be ``True`` or ``False`` and
1785 indicates whether the font will include an underline. This
1786 may not be supported on all platforms.
1788 :param face: An optional string specifying the actual typeface to
1789 be used. If it is an empty string, a default typeface will be
1790 chosen based on the family.
1792 :param encoding: An encoding which may be one of the
1793 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1794 available, no font is created.
1796 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1797 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1800 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1801 newobj
= _gdi_
.new_Font(*args
, **kwargs
)
1802 self
.this
= newobj
.this
1805 def __del__(self
, destroy
=_gdi_
.delete_Font
):
1808 if self
.thisown
: destroy(self
)
1811 def Ok(*args
, **kwargs
):
1815 Returns ``True`` if this font was successfully created.
1817 return _gdi_
.Font_Ok(*args
, **kwargs
)
1819 def __nonzero__(self
): return self
.Ok()
1820 def __eq__(*args
, **kwargs
):
1821 """__eq__(self, Font other) -> bool"""
1822 return _gdi_
.Font___eq__(*args
, **kwargs
)
1824 def __ne__(*args
, **kwargs
):
1825 """__ne__(self, Font other) -> bool"""
1826 return _gdi_
.Font___ne__(*args
, **kwargs
)
1828 def GetPointSize(*args
, **kwargs
):
1830 GetPointSize(self) -> int
1832 Gets the point size.
1834 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
1836 def GetPixelSize(*args
, **kwargs
):
1838 GetPixelSize(self) -> Size
1840 Returns the size in pixels if the font was constructed with a pixel
1843 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
1845 def IsUsingSizeInPixels(*args
, **kwargs
):
1847 IsUsingSizeInPixels(self) -> bool
1849 Returns ``True`` if the font is using a pixelSize.
1851 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
1853 def GetFamily(*args
, **kwargs
):
1855 GetFamily(self) -> int
1857 Gets the font family.
1859 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
1861 def GetStyle(*args
, **kwargs
):
1863 GetStyle(self) -> int
1865 Gets the font style.
1867 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
1869 def GetWeight(*args
, **kwargs
):
1871 GetWeight(self) -> int
1873 Gets the font weight.
1875 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
1877 def GetUnderlined(*args
, **kwargs
):
1879 GetUnderlined(self) -> bool
1881 Returns ``True`` if the font is underlined, ``False`` otherwise.
1883 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
1885 def GetFaceName(*args
, **kwargs
):
1887 GetFaceName(self) -> String
1889 Returns the typeface name associated with the font, or the empty
1890 string if there is no typeface information.
1892 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
1894 def GetEncoding(*args
, **kwargs
):
1896 GetEncoding(self) -> int
1898 Get the font's encoding.
1900 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
1902 def GetNativeFontInfo(*args
, **kwargs
):
1904 GetNativeFontInfo(self) -> NativeFontInfo
1906 Constructs a `wx.NativeFontInfo` object from this font.
1908 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
1910 def IsFixedWidth(*args
, **kwargs
):
1912 IsFixedWidth(self) -> bool
1914 Returns true if the font is a fixed width (or monospaced) font, false
1915 if it is a proportional one or font is invalid.
1917 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
1919 def GetNativeFontInfoDesc(*args
, **kwargs
):
1921 GetNativeFontInfoDesc(self) -> String
1923 Returns the platform-dependent string completely describing this font
1924 or an empty string if the font isn't valid.
1926 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
1928 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
1930 GetNativeFontInfoUserDesc(self) -> String
1932 Returns a human readable version of `GetNativeFontInfoDesc`.
1934 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
1936 def SetPointSize(*args
, **kwargs
):
1938 SetPointSize(self, int pointSize)
1940 Sets the point size.
1942 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
1944 def SetPixelSize(*args
, **kwargs
):
1946 SetPixelSize(self, Size pixelSize)
1948 Sets the size in pixels rather than points. If there is platform API
1949 support for this then it is used, otherwise a font with the closest
1950 size is found using a binary search.
1952 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
1954 def SetFamily(*args
, **kwargs
):
1956 SetFamily(self, int family)
1958 Sets the font family.
1960 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
1962 def SetStyle(*args
, **kwargs
):
1964 SetStyle(self, int style)
1966 Sets the font style.
1968 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
1970 def SetWeight(*args
, **kwargs
):
1972 SetWeight(self, int weight)
1974 Sets the font weight.
1976 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
1978 def SetFaceName(*args
, **kwargs
):
1980 SetFaceName(self, String faceName)
1982 Sets the facename for the font. The facename, which should be a valid
1983 font installed on the end-user's system.
1985 To avoid portability problems, don't rely on a specific face, but
1986 specify the font family instead or as well. A suitable font will be
1987 found on the end-user's system. If both the family and the facename
1988 are specified, wxWidgets will first search for the specific face, and
1989 then for a font belonging to the same family.
1991 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
1993 def SetUnderlined(*args
, **kwargs
):
1995 SetUnderlined(self, bool underlined)
1999 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
2001 def SetEncoding(*args
, **kwargs
):
2003 SetEncoding(self, int encoding)
2005 Set the font encoding.
2007 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
2009 def SetNativeFontInfo(*args
, **kwargs
):
2011 SetNativeFontInfo(self, NativeFontInfo info)
2013 Set the font's attributes from a `wx.NativeFontInfo` object.
2015 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
2017 def SetNativeFontInfoFromString(*args
, **kwargs
):
2019 SetNativeFontInfoFromString(self, String info)
2021 Set the font's attributes from string representation of a
2022 `wx.NativeFontInfo` object.
2024 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
2026 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
2028 SetNativeFontInfoUserDesc(self, String info)
2030 Set the font's attributes from a string formerly returned from
2031 `GetNativeFontInfoDesc`.
2033 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
2035 def GetFamilyString(*args
, **kwargs
):
2037 GetFamilyString(self) -> String
2039 Returns a string representation of the font family.
2041 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
2043 def GetStyleString(*args
, **kwargs
):
2045 GetStyleString(self) -> String
2047 Returns a string representation of the font style.
2049 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
2051 def GetWeightString(*args
, **kwargs
):
2053 GetWeightString(self) -> String
2055 Return a string representation of the font weight.
2057 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
2059 def SetNoAntiAliasing(*args
, **kwargs
):
2060 """SetNoAntiAliasing(self, bool no=True)"""
2061 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
2063 def GetNoAntiAliasing(*args
, **kwargs
):
2064 """GetNoAntiAliasing(self) -> bool"""
2065 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
2067 def GetDefaultEncoding(*args
, **kwargs
):
2069 GetDefaultEncoding() -> int
2071 Returns the encoding used for all fonts created with an encoding of
2072 ``wx.FONTENCODING_DEFAULT``.
2074 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
2076 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
2077 def SetDefaultEncoding(*args
, **kwargs
):
2079 SetDefaultEncoding(int encoding)
2081 Sets the default font encoding.
2083 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2085 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
2087 class FontPtr(Font
):
2088 def __init__(self
, this
):
2090 if not hasattr(self
,"thisown"): self
.thisown
= 0
2091 self
.__class
__ = Font
2092 _gdi_
.Font_swigregister(FontPtr
)
2094 def FontFromNativeInfo(*args
, **kwargs
):
2096 FontFromNativeInfo(NativeFontInfo info) -> Font
2098 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2100 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2101 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
2105 def FontFromNativeInfoString(*args
, **kwargs
):
2107 FontFromNativeInfoString(String info) -> Font
2109 Construct a `wx.Font` from the string representation of a
2110 `wx.NativeFontInfo` object.
2112 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2113 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
2117 def FFont(*args
, **kwargs
):
2119 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2120 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2122 A bit of a simpler way to create a `wx.Font` using flags instead of
2123 individual attribute settings. The value of flags can be a
2124 combination of the following:
2126 ============================ ==
2132 wx.FONTFLAG_ANTIALIASED
2133 wx.FONTFLAG_NOT_ANTIALIASED
2134 wx.FONTFLAG_UNDERLINED
2135 wx.FONTFLAG_STRIKETHROUGH
2136 ============================ ==
2138 :see: `wx.Font.__init__`
2140 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2141 val
= _gdi_
.new_FFont(*args
, **kwargs
)
2145 def FontFromPixelSize(*args
, **kwargs
):
2147 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2148 bool underlined=False, String face=wxEmptyString,
2149 int encoding=FONTENCODING_DEFAULT) -> Font
2151 Creates a font using a size in pixels rather than points. If there is
2152 platform API support for this then it is used, otherwise a font with
2153 the closest size is found using a binary search.
2155 :see: `wx.Font.__init__`
2157 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2158 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
2162 def FFontFromPixelSize(*args
, **kwargs
):
2164 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2165 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2167 Creates a font using a size in pixels rather than points. If there is
2168 platform API support for this then it is used, otherwise a font with
2169 the closest size is found using a binary search.
2171 :see: `wx.Font.__init__`, `wx.FFont`
2173 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2174 val
= _gdi_
.new_FFontFromPixelSize(*args
, **kwargs
)
2178 def Font_GetDefaultEncoding(*args
, **kwargs
):
2180 Font_GetDefaultEncoding() -> int
2182 Returns the encoding used for all fonts created with an encoding of
2183 ``wx.FONTENCODING_DEFAULT``.
2185 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
2187 def Font_SetDefaultEncoding(*args
, **kwargs
):
2189 Font_SetDefaultEncoding(int encoding)
2191 Sets the default font encoding.
2193 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2195 Font2
= wx
._deprecated
(FFont
, "Use `wx.FFont` instead.")
2196 #---------------------------------------------------------------------------
2198 class FontEnumerator(object):
2199 """Proxy of C++ FontEnumerator class"""
2201 return "<%s.%s; proxy of C++ wxPyFontEnumerator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2202 def __init__(self
, *args
, **kwargs
):
2203 """__init__(self) -> FontEnumerator"""
2204 newobj
= _gdi_
.new_FontEnumerator(*args
, **kwargs
)
2205 self
.this
= newobj
.this
2208 self
._setCallbackInfo
(self
, FontEnumerator
, 0)
2210 def __del__(self
, destroy
=_gdi_
.delete_FontEnumerator
):
2213 if self
.thisown
: destroy(self
)
2216 def _setCallbackInfo(*args
, **kwargs
):
2217 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
2218 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
2220 def EnumerateFacenames(*args
, **kwargs
):
2221 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2222 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
2224 def EnumerateEncodings(*args
, **kwargs
):
2225 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2226 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
2228 def GetEncodings(*args
, **kwargs
):
2229 """GetEncodings(self) -> PyObject"""
2230 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
2232 def GetFacenames(*args
, **kwargs
):
2233 """GetFacenames(self) -> PyObject"""
2234 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
2237 class FontEnumeratorPtr(FontEnumerator
):
2238 def __init__(self
, this
):
2240 if not hasattr(self
,"thisown"): self
.thisown
= 0
2241 self
.__class
__ = FontEnumerator
2242 _gdi_
.FontEnumerator_swigregister(FontEnumeratorPtr
)
2244 #---------------------------------------------------------------------------
2246 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
2247 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
2248 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
2249 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
2250 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
2251 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
2252 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
2253 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
2254 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
2255 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
2256 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
2257 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
2258 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
2259 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
2260 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
2261 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
2262 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
2263 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
2264 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
2265 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
2266 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
2267 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
2268 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
2269 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
2270 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
2271 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
2272 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
2273 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
2274 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
2275 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
2276 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
2277 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
2278 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
2279 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
2280 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
2281 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
2282 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
2283 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
2284 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
2285 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
2286 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
2287 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
2288 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
2289 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
2290 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
2291 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
2292 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
2293 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
2294 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
2295 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
2296 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
2297 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
2298 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
2299 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
2300 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
2301 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
2302 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
2303 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
2304 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
2305 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
2306 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
2307 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
2308 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
2309 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
2310 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
2311 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
2312 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
2313 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
2314 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
2315 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
2316 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
2317 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
2318 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
2319 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
2320 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
2321 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
2322 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
2323 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2324 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2325 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2326 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2327 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2328 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2329 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2330 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2331 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2332 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2333 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2334 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2335 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2336 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2337 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2338 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2339 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2340 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2341 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2342 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2343 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2344 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2345 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2346 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2347 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2348 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2349 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2350 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2351 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2352 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2353 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2354 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2355 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2356 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2357 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2358 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2359 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2360 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2361 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2362 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2363 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2364 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2365 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2366 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2367 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2368 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2369 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2370 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2371 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2372 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2373 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2374 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2375 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2376 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2377 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2378 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2379 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2380 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2381 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2382 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2383 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2384 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2385 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2386 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2387 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2388 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2389 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2390 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2391 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2392 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2393 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2394 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2395 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2396 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2397 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2398 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2399 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2400 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2401 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2402 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2403 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2404 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2405 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2406 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2407 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2408 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2409 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2410 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2411 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2412 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2413 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2414 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2415 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2416 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2417 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2418 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2419 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2420 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2421 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2422 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2423 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2424 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2425 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2426 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2427 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2428 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2429 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2430 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2431 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2432 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2433 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2434 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2435 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2436 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2437 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2438 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2439 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2440 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2441 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2442 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2443 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2444 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2445 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2446 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2447 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2448 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2449 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2450 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2451 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2452 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2453 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2454 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2455 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2456 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2457 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2458 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2459 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2460 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2461 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2462 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2463 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2464 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2465 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2466 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2467 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2468 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2469 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2470 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2471 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2472 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2473 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2474 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2475 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2476 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2477 class LanguageInfo(object):
2478 """Proxy of C++ LanguageInfo class"""
2479 def __init__(self
): raise RuntimeError, "No constructor defined"
2481 return "<%s.%s; proxy of C++ wxLanguageInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2482 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2483 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2484 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2486 class LanguageInfoPtr(LanguageInfo
):
2487 def __init__(self
, this
):
2489 if not hasattr(self
,"thisown"): self
.thisown
= 0
2490 self
.__class
__ = LanguageInfo
2491 _gdi_
.LanguageInfo_swigregister(LanguageInfoPtr
)
2493 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2494 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2495 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2496 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2497 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2498 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2499 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2500 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2501 class Locale(object):
2502 """Proxy of C++ Locale class"""
2504 return "<%s.%s; proxy of C++ wxLocale instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2505 def __init__(self
, *args
, **kwargs
):
2506 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2507 newobj
= _gdi_
.new_Locale(*args
, **kwargs
)
2508 self
.this
= newobj
.this
2511 def __del__(self
, destroy
=_gdi_
.delete_Locale
):
2514 if self
.thisown
: destroy(self
)
2517 def Init1(*args
, **kwargs
):
2519 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2520 bool bLoadDefault=True,
2521 bool bConvertEncoding=False) -> bool
2523 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2525 def Init2(*args
, **kwargs
):
2526 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2527 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2529 def Init(self
, *_args
, **_kwargs
):
2530 if type(_args
[0]) in [type(''), type(u
'')]:
2531 val
= self
.Init1(*_args
, **_kwargs
)
2533 val
= self
.Init2(*_args
, **_kwargs
)
2536 def GetSystemLanguage(*args
, **kwargs
):
2537 """GetSystemLanguage() -> int"""
2538 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2540 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2541 def GetSystemEncoding(*args
, **kwargs
):
2542 """GetSystemEncoding() -> int"""
2543 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2545 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2546 def GetSystemEncodingName(*args
, **kwargs
):
2547 """GetSystemEncodingName() -> String"""
2548 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2550 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2551 def IsOk(*args
, **kwargs
):
2552 """IsOk(self) -> bool"""
2553 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2555 def __nonzero__(self
): return self
.IsOk()
2556 def GetLocale(*args
, **kwargs
):
2557 """GetLocale(self) -> String"""
2558 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2560 def GetLanguage(*args
, **kwargs
):
2561 """GetLanguage(self) -> int"""
2562 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2564 def GetSysName(*args
, **kwargs
):
2565 """GetSysName(self) -> String"""
2566 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2568 def GetCanonicalName(*args
, **kwargs
):
2569 """GetCanonicalName(self) -> String"""
2570 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2572 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2573 """AddCatalogLookupPathPrefix(String prefix)"""
2574 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2576 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2577 def AddCatalog(*args
, **kwargs
):
2578 """AddCatalog(self, String szDomain) -> bool"""
2579 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2581 def IsLoaded(*args
, **kwargs
):
2582 """IsLoaded(self, String szDomain) -> bool"""
2583 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2585 def GetLanguageInfo(*args
, **kwargs
):
2586 """GetLanguageInfo(int lang) -> LanguageInfo"""
2587 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2589 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2590 def GetLanguageName(*args
, **kwargs
):
2591 """GetLanguageName(int lang) -> String"""
2592 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2594 GetLanguageName
= staticmethod(GetLanguageName
)
2595 def FindLanguageInfo(*args
, **kwargs
):
2596 """FindLanguageInfo(String locale) -> LanguageInfo"""
2597 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2599 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2600 def AddLanguage(*args
, **kwargs
):
2601 """AddLanguage(LanguageInfo info)"""
2602 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2604 AddLanguage
= staticmethod(AddLanguage
)
2605 def GetString(*args
, **kwargs
):
2606 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2607 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2609 def GetName(*args
, **kwargs
):
2610 """GetName(self) -> String"""
2611 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2614 class LocalePtr(Locale
):
2615 def __init__(self
, this
):
2617 if not hasattr(self
,"thisown"): self
.thisown
= 0
2618 self
.__class
__ = Locale
2619 _gdi_
.Locale_swigregister(LocalePtr
)
2621 def Locale_GetSystemLanguage(*args
, **kwargs
):
2622 """Locale_GetSystemLanguage() -> int"""
2623 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2625 def Locale_GetSystemEncoding(*args
, **kwargs
):
2626 """Locale_GetSystemEncoding() -> int"""
2627 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2629 def Locale_GetSystemEncodingName(*args
, **kwargs
):
2630 """Locale_GetSystemEncodingName() -> String"""
2631 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2633 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2634 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2635 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2637 def Locale_GetLanguageInfo(*args
, **kwargs
):
2638 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2639 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2641 def Locale_GetLanguageName(*args
, **kwargs
):
2642 """Locale_GetLanguageName(int lang) -> String"""
2643 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2645 def Locale_FindLanguageInfo(*args
, **kwargs
):
2646 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2647 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2649 def Locale_AddLanguage(*args
, **kwargs
):
2650 """Locale_AddLanguage(LanguageInfo info)"""
2651 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2654 def GetLocale(*args
, **kwargs
):
2655 """GetLocale() -> Locale"""
2656 return _gdi_
.GetLocale(*args
, **kwargs
)
2657 #---------------------------------------------------------------------------
2659 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2660 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2661 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2662 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2663 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2664 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2665 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2666 class EncodingConverter(_core
.Object
):
2667 """Proxy of C++ EncodingConverter class"""
2669 return "<%s.%s; proxy of C++ wxEncodingConverter instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2670 def __init__(self
, *args
, **kwargs
):
2671 """__init__(self) -> EncodingConverter"""
2672 newobj
= _gdi_
.new_EncodingConverter(*args
, **kwargs
)
2673 self
.this
= newobj
.this
2676 def __del__(self
, destroy
=_gdi_
.delete_EncodingConverter
):
2679 if self
.thisown
: destroy(self
)
2682 def Init(*args
, **kwargs
):
2683 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2684 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2686 def Convert(*args
, **kwargs
):
2687 """Convert(self, String input) -> String"""
2688 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2690 def GetPlatformEquivalents(*args
, **kwargs
):
2691 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2692 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2694 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
2695 def GetAllEquivalents(*args
, **kwargs
):
2696 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2697 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2699 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
2700 def CanConvert(*args
, **kwargs
):
2701 """CanConvert(int encIn, int encOut) -> bool"""
2702 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2704 CanConvert
= staticmethod(CanConvert
)
2705 def __nonzero__(self
): return self
.IsOk()
2707 class EncodingConverterPtr(EncodingConverter
):
2708 def __init__(self
, this
):
2710 if not hasattr(self
,"thisown"): self
.thisown
= 0
2711 self
.__class
__ = EncodingConverter
2712 _gdi_
.EncodingConverter_swigregister(EncodingConverterPtr
)
2714 def GetTranslation(*args
):
2716 GetTranslation(String str) -> String
2717 GetTranslation(String str, String strPlural, size_t n) -> String
2719 return _gdi_
.GetTranslation(*args
)
2721 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
2722 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2723 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2725 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
2726 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2727 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2729 def EncodingConverter_CanConvert(*args
, **kwargs
):
2730 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2731 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2733 #----------------------------------------------------------------------------
2734 # On MSW add the directory where the wxWidgets catalogs were installed
2735 # to the default catalog path.
2736 if wx
.Platform
== "__WXMSW__":
2738 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "locale")
2739 Locale
.AddCatalogLookupPathPrefix(_localedir
)
2742 #----------------------------------------------------------------------------
2744 #---------------------------------------------------------------------------
2746 class DC(_core
.Object
):
2748 A wx.DC is a device context onto which graphics and text can be
2749 drawn. It is intended to represent a number of output devices in a
2750 generic way, so a window can have a device context associated with it,
2751 and a printer also has a device context. In this way, the same piece
2752 of code may write to a number of different devices, if the device
2753 context is used as a parameter.
2755 Derived types of wxDC have documentation for specific features only,
2756 so refer to this section for most device context information.
2758 The wx.DC class is abstract and can not be instantiated, you must use
2759 one of the derived classes instead. Which one will depend on the
2760 situation in which it is used.
2762 def __init__(self
): raise RuntimeError, "No constructor defined"
2764 return "<%s.%s; proxy of C++ wxDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2765 def __del__(self
, destroy
=_gdi_
.delete_DC
):
2768 if self
.thisown
: destroy(self
)
2771 def BeginDrawing(*args
, **kwargs
):
2775 Allows for optimization of drawing code on platforms that need it. On
2776 other platforms this is just an empty function and is harmless. To
2777 take advantage of this postential optimization simply enclose each
2778 group of calls to the drawing primitives within calls to
2779 `BeginDrawing` and `EndDrawing`.
2781 return _gdi_
.DC_BeginDrawing(*args
, **kwargs
)
2783 def EndDrawing(*args
, **kwargs
):
2787 Ends the group of drawing primitives started with `BeginDrawing`, and
2788 invokes whatever optimization is available for this DC type on the
2791 return _gdi_
.DC_EndDrawing(*args
, **kwargs
)
2793 def FloodFill(*args
, **kwargs
):
2795 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2797 Flood fills the device context starting from the given point, using
2798 the current brush colour, and using a style:
2800 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2801 the given colour is encountered.
2803 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2806 Returns False if the operation failed.
2808 Note: The present implementation for non-Windows platforms may fail to
2809 find colour borders if the pixels do not match the colour
2810 exactly. However the function will still return true.
2812 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
2814 def FloodFillPoint(*args
, **kwargs
):
2816 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2818 Flood fills the device context starting from the given point, using
2819 the current brush colour, and using a style:
2821 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2822 the given colour is encountered.
2824 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2827 Returns False if the operation failed.
2829 Note: The present implementation for non-Windows platforms may fail to
2830 find colour borders if the pixels do not match the colour
2831 exactly. However the function will still return true.
2833 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
2835 def GetPixel(*args
, **kwargs
):
2837 GetPixel(self, int x, int y) -> Colour
2839 Gets the colour at the specified location on the DC.
2841 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
2843 def GetPixelPoint(*args
, **kwargs
):
2844 """GetPixelPoint(self, Point pt) -> Colour"""
2845 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
2847 def DrawLine(*args
, **kwargs
):
2849 DrawLine(self, int x1, int y1, int x2, int y2)
2851 Draws a line from the first point to the second. The current pen is
2852 used for drawing the line. Note that the second point is *not* part of
2853 the line and is not drawn by this function (this is consistent with
2854 the behaviour of many other toolkits).
2856 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
2858 def DrawLinePoint(*args
, **kwargs
):
2860 DrawLinePoint(self, Point pt1, Point pt2)
2862 Draws a line from the first point to the second. The current pen is
2863 used for drawing the line. Note that the second point is *not* part of
2864 the line and is not drawn by this function (this is consistent with
2865 the behaviour of many other toolkits).
2867 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
2869 def CrossHair(*args
, **kwargs
):
2871 CrossHair(self, int x, int y)
2873 Displays a cross hair using the current pen. This is a vertical and
2874 horizontal line the height and width of the window, centred on the
2877 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
2879 def CrossHairPoint(*args
, **kwargs
):
2881 CrossHairPoint(self, Point pt)
2883 Displays a cross hair using the current pen. This is a vertical and
2884 horizontal line the height and width of the window, centred on the
2887 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
2889 def DrawArc(*args
, **kwargs
):
2891 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2893 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2894 the first point to the second. The current pen is used for the outline
2895 and the current brush for filling the shape.
2897 The arc is drawn in an anticlockwise direction from the start point to
2900 return _gdi_
.DC_DrawArc(*args
, **kwargs
)
2902 def DrawArcPoint(*args
, **kwargs
):
2904 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2906 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2907 the first point to the second. The current pen is used for the outline
2908 and the current brush for filling the shape.
2910 The arc is drawn in an anticlockwise direction from the start point to
2913 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
2915 def DrawCheckMark(*args
, **kwargs
):
2917 DrawCheckMark(self, int x, int y, int width, int height)
2919 Draws a check mark inside the given rectangle.
2921 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
2923 def DrawCheckMarkRect(*args
, **kwargs
):
2925 DrawCheckMarkRect(self, Rect rect)
2927 Draws a check mark inside the given rectangle.
2929 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
2931 def DrawEllipticArc(*args
, **kwargs
):
2933 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
2935 Draws an arc of an ellipse, with the given rectangle defining the
2936 bounds of the ellipse. The current pen is used for drawing the arc and
2937 the current brush is used for drawing the pie.
2939 The *start* and *end* parameters specify the start and end of the arc
2940 relative to the three-o'clock position from the center of the
2941 rectangle. Angles are specified in degrees (360 is a complete
2942 circle). Positive values mean counter-clockwise motion. If start is
2943 equal to end, a complete ellipse will be drawn.
2945 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
2947 def DrawEllipticArcPointSize(*args
, **kwargs
):
2949 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
2951 Draws an arc of an ellipse, with the given rectangle defining the
2952 bounds of the ellipse. The current pen is used for drawing the arc and
2953 the current brush is used for drawing the pie.
2955 The *start* and *end* parameters specify the start and end of the arc
2956 relative to the three-o'clock position from the center of the
2957 rectangle. Angles are specified in degrees (360 is a complete
2958 circle). Positive values mean counter-clockwise motion. If start is
2959 equal to end, a complete ellipse will be drawn.
2961 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
2963 def DrawPoint(*args
, **kwargs
):
2965 DrawPoint(self, int x, int y)
2967 Draws a point using the current pen.
2969 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
2971 def DrawPointPoint(*args
, **kwargs
):
2973 DrawPointPoint(self, Point pt)
2975 Draws a point using the current pen.
2977 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
2979 def DrawRectangle(*args
, **kwargs
):
2981 DrawRectangle(self, int x, int y, int width, int height)
2983 Draws a rectangle with the given top left corner, and with the given
2984 size. The current pen is used for the outline and the current brush
2985 for filling the shape.
2987 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
2989 def DrawRectangleRect(*args
, **kwargs
):
2991 DrawRectangleRect(self, Rect rect)
2993 Draws a rectangle with the given top left corner, and with the given
2994 size. The current pen is used for the outline and the current brush
2995 for filling the shape.
2997 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
2999 def DrawRectanglePointSize(*args
, **kwargs
):
3001 DrawRectanglePointSize(self, Point pt, Size sz)
3003 Draws a rectangle with the given top left corner, and with the given
3004 size. The current pen is used for the outline and the current brush
3005 for filling the shape.
3007 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
3009 def DrawRoundedRectangle(*args
, **kwargs
):
3011 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3013 Draws a rectangle with the given top left corner, and with the given
3014 size. The corners are quarter-circles using the given radius. The
3015 current pen is used for the outline and the current brush for filling
3018 If radius is positive, the value is assumed to be the radius of the
3019 rounded corner. If radius is negative, the absolute value is assumed
3020 to be the proportion of the smallest dimension of the rectangle. This
3021 means that the corner can be a sensible size relative to the size of
3022 the rectangle, and also avoids the strange effects X produces when the
3023 corners are too big for the rectangle.
3025 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
3027 def DrawRoundedRectangleRect(*args
, **kwargs
):
3029 DrawRoundedRectangleRect(self, Rect r, double radius)
3031 Draws a rectangle with the given top left corner, and with the given
3032 size. The corners are quarter-circles using the given radius. The
3033 current pen is used for the outline and the current brush for filling
3036 If radius is positive, the value is assumed to be the radius of the
3037 rounded corner. If radius is negative, the absolute value is assumed
3038 to be the proportion of the smallest dimension of the rectangle. This
3039 means that the corner can be a sensible size relative to the size of
3040 the rectangle, and also avoids the strange effects X produces when the
3041 corners are too big for the rectangle.
3043 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
3045 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
3047 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3049 Draws a rectangle with the given top left corner, and with the given
3050 size. The corners are quarter-circles using the given radius. The
3051 current pen is used for the outline and the current brush for filling
3054 If radius is positive, the value is assumed to be the radius of the
3055 rounded corner. If radius is negative, the absolute value is assumed
3056 to be the proportion of the smallest dimension of the rectangle. This
3057 means that the corner can be a sensible size relative to the size of
3058 the rectangle, and also avoids the strange effects X produces when the
3059 corners are too big for the rectangle.
3061 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
3063 def DrawCircle(*args
, **kwargs
):
3065 DrawCircle(self, int x, int y, int radius)
3067 Draws a circle with the given center point and radius. The current
3068 pen is used for the outline and the current brush for filling the
3071 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
3073 def DrawCirclePoint(*args
, **kwargs
):
3075 DrawCirclePoint(self, Point pt, int radius)
3077 Draws a circle with the given center point and radius. The current
3078 pen is used for the outline and the current brush for filling the
3081 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
3083 def DrawEllipse(*args
, **kwargs
):
3085 DrawEllipse(self, int x, int y, int width, int height)
3087 Draws an ellipse contained in the specified rectangle. The current pen
3088 is used for the outline and the current brush for filling the shape.
3090 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
3092 def DrawEllipseRect(*args
, **kwargs
):
3094 DrawEllipseRect(self, Rect rect)
3096 Draws an ellipse contained in the specified rectangle. The current pen
3097 is used for the outline and the current brush for filling the shape.
3099 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
3101 def DrawEllipsePointSize(*args
, **kwargs
):
3103 DrawEllipsePointSize(self, Point pt, Size sz)
3105 Draws an ellipse contained in the specified rectangle. The current pen
3106 is used for the outline and the current brush for filling the shape.
3108 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
3110 def DrawIcon(*args
, **kwargs
):
3112 DrawIcon(self, Icon icon, int x, int y)
3114 Draw an icon on the display (does nothing if the device context is
3115 PostScript). This can be the simplest way of drawing bitmaps on a
3118 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
3120 def DrawIconPoint(*args
, **kwargs
):
3122 DrawIconPoint(self, Icon icon, Point pt)
3124 Draw an icon on the display (does nothing if the device context is
3125 PostScript). This can be the simplest way of drawing bitmaps on a
3128 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
3130 def DrawBitmap(*args
, **kwargs
):
3132 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3134 Draw a bitmap on the device context at the specified point. If
3135 *transparent* is true and the bitmap has a transparency mask, (or
3136 alpha channel on the platforms that support it) then the bitmap will
3137 be drawn transparently.
3139 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
3141 def DrawBitmapPoint(*args
, **kwargs
):
3143 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3145 Draw a bitmap on the device context at the specified point. If
3146 *transparent* is true and the bitmap has a transparency mask, (or
3147 alpha channel on the platforms that support it) then the bitmap will
3148 be drawn transparently.
3150 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
3152 def DrawText(*args
, **kwargs
):
3154 DrawText(self, String text, int x, int y)
3156 Draws a text string at the specified point, using the current text
3157 font, and the current text foreground and background colours.
3159 The coordinates refer to the top-left corner of the rectangle bounding
3160 the string. See `GetTextExtent` for how to get the dimensions of a
3161 text string, which can be used to position the text more precisely.
3163 **NOTE**: under wxGTK the current logical function is used by this
3164 function but it is ignored by wxMSW. Thus, you should avoid using
3165 logical functions with this function in portable programs.
3167 return _gdi_
.DC_DrawText(*args
, **kwargs
)
3169 def DrawTextPoint(*args
, **kwargs
):
3171 DrawTextPoint(self, String text, Point pt)
3173 Draws a text string at the specified point, using the current text
3174 font, and the current text foreground and background colours.
3176 The coordinates refer to the top-left corner of the rectangle bounding
3177 the string. See `GetTextExtent` for how to get the dimensions of a
3178 text string, which can be used to position the text more precisely.
3180 **NOTE**: under wxGTK the current logical function is used by this
3181 function but it is ignored by wxMSW. Thus, you should avoid using
3182 logical functions with this function in portable programs.
3184 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
3186 def DrawRotatedText(*args
, **kwargs
):
3188 DrawRotatedText(self, String text, int x, int y, double angle)
3190 Draws the text rotated by *angle* degrees, if supported by the platform.
3192 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3193 function. In particular, a font different from ``wx.NORMAL_FONT``
3194 should be used as the it is not normally a TrueType
3195 font. ``wx.SWISS_FONT`` is an example of a font which is.
3197 return _gdi_
.DC_DrawRotatedText(*args
, **kwargs
)
3199 def DrawRotatedTextPoint(*args
, **kwargs
):
3201 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3203 Draws the text rotated by *angle* degrees, if supported by the platform.
3205 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3206 function. In particular, a font different from ``wx.NORMAL_FONT``
3207 should be used as the it is not normally a TrueType
3208 font. ``wx.SWISS_FONT`` is an example of a font which is.
3210 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
3212 def Blit(*args
, **kwargs
):
3214 Blit(self, int xdest, int ydest, int width, int height, DC source,
3215 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3216 int xsrcMask=-1, int ysrcMask=-1) -> bool
3218 Copy from a source DC to this DC. Parameters specify the destination
3219 coordinates, size of area to copy, source DC, source coordinates,
3220 logical function, whether to use a bitmap mask, and mask source
3223 return _gdi_
.DC_Blit(*args
, **kwargs
)
3225 def BlitPointSize(*args
, **kwargs
):
3227 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3228 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3230 Copy from a source DC to this DC. Parameters specify the destination
3231 coordinates, size of area to copy, source DC, source coordinates,
3232 logical function, whether to use a bitmap mask, and mask source
3235 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
3237 def SetClippingRegion(*args
, **kwargs
):
3239 SetClippingRegion(self, int x, int y, int width, int height)
3241 Sets the clipping region for this device context to the intersection
3242 of the given region described by the parameters of this method and the
3243 previously set clipping region. You should call `DestroyClippingRegion`
3244 if you want to set the clipping region exactly to the region
3247 The clipping region is an area to which drawing is
3248 restricted. Possible uses for the clipping region are for clipping
3249 text or for speeding up window redraws when only a known area of the
3252 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
3254 def SetClippingRegionPointSize(*args
, **kwargs
):
3256 SetClippingRegionPointSize(self, Point pt, Size sz)
3258 Sets the clipping region for this device context to the intersection
3259 of the given region described by the parameters of this method and the
3260 previously set clipping region. You should call `DestroyClippingRegion`
3261 if you want to set the clipping region exactly to the region
3264 The clipping region is an area to which drawing is
3265 restricted. Possible uses for the clipping region are for clipping
3266 text or for speeding up window redraws when only a known area of the
3269 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
3271 def SetClippingRegionAsRegion(*args
, **kwargs
):
3273 SetClippingRegionAsRegion(self, Region region)
3275 Sets the clipping region for this device context to the intersection
3276 of the given region described by the parameters of this method and the
3277 previously set clipping region. You should call `DestroyClippingRegion`
3278 if you want to set the clipping region exactly to the region
3281 The clipping region is an area to which drawing is
3282 restricted. Possible uses for the clipping region are for clipping
3283 text or for speeding up window redraws when only a known area of the
3286 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
3288 def SetClippingRect(*args
, **kwargs
):
3290 SetClippingRect(self, Rect rect)
3292 Sets the clipping region for this device context to the intersection
3293 of the given region described by the parameters of this method and the
3294 previously set clipping region. You should call `DestroyClippingRegion`
3295 if you want to set the clipping region exactly to the region
3298 The clipping region is an area to which drawing is
3299 restricted. Possible uses for the clipping region are for clipping
3300 text or for speeding up window redraws when only a known area of the
3303 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
3305 def DrawLines(*args
, **kwargs
):
3307 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3309 Draws lines using a sequence of `wx.Point` objects, adding the
3310 optional offset coordinate. The current pen is used for drawing the
3313 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
3315 def DrawPolygon(*args
, **kwargs
):
3317 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3318 int fillStyle=ODDEVEN_RULE)
3320 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3321 the optional offset coordinate. The last argument specifies the fill
3322 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3324 The current pen is used for drawing the outline, and the current brush
3325 for filling the shape. Using a transparent brush suppresses
3326 filling. Note that wxWidgets automatically closes the first and last
3329 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3331 def DrawLabel(*args
, **kwargs
):
3333 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3336 Draw *text* within the specified rectangle, abiding by the alignment
3337 flags. Will additionally emphasize the character at *indexAccel* if
3340 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3342 def DrawImageLabel(*args
, **kwargs
):
3344 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3345 int indexAccel=-1) -> Rect
3347 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3348 drawing it) within the specified rectangle, abiding by the alignment
3349 flags. Will additionally emphasize the character at *indexAccel* if
3350 it is not -1. Returns the bounding rectangle.
3352 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3354 def DrawSpline(*args
, **kwargs
):
3356 DrawSpline(self, List points)
3358 Draws a spline between all given control points, (a list of `wx.Point`
3359 objects) using the current pen. The spline is drawn using a series of
3360 lines, using an algorithm taken from the X drawing program 'XFIG'.
3362 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3364 def Clear(*args
, **kwargs
):
3368 Clears the device context using the current background brush.
3370 return _gdi_
.DC_Clear(*args
, **kwargs
)
3372 def StartDoc(*args
, **kwargs
):
3374 StartDoc(self, String message) -> bool
3376 Starts a document (only relevant when outputting to a
3377 printer). *Message* is a message to show whilst printing.
3379 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3381 def EndDoc(*args
, **kwargs
):
3385 Ends a document (only relevant when outputting to a printer).
3387 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3389 def StartPage(*args
, **kwargs
):
3393 Starts a document page (only relevant when outputting to a printer).
3395 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3397 def EndPage(*args
, **kwargs
):
3401 Ends a document page (only relevant when outputting to a printer).
3403 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3405 def SetFont(*args
, **kwargs
):
3407 SetFont(self, Font font)
3409 Sets the current font for the DC. It must be a valid font, in
3410 particular you should not pass ``wx.NullFont`` to this method.
3412 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3414 def SetPen(*args
, **kwargs
):
3416 SetPen(self, Pen pen)
3418 Sets the current pen for the DC.
3420 If the argument is ``wx.NullPen``, the current pen is selected out of the
3421 device context, and the original pen restored.
3423 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3425 def SetBrush(*args
, **kwargs
):
3427 SetBrush(self, Brush brush)
3429 Sets the current brush for the DC.
3431 If the argument is ``wx.NullBrush``, the current brush is selected out
3432 of the device context, and the original brush restored, allowing the
3433 current brush to be destroyed safely.
3435 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3437 def SetBackground(*args
, **kwargs
):
3439 SetBackground(self, Brush brush)
3441 Sets the current background brush for the DC.
3443 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3445 def SetBackgroundMode(*args
, **kwargs
):
3447 SetBackgroundMode(self, int mode)
3449 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3450 determines whether text will be drawn with a background colour or
3453 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3455 def SetPalette(*args
, **kwargs
):
3457 SetPalette(self, Palette palette)
3459 If this is a window DC or memory DC, assigns the given palette to the
3460 window or bitmap associated with the DC. If the argument is
3461 ``wx.NullPalette``, the current palette is selected out of the device
3462 context, and the original palette restored.
3464 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3466 def DestroyClippingRegion(*args
, **kwargs
):
3468 DestroyClippingRegion(self)
3470 Destroys the current clipping region so that none of the DC is
3473 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3475 def GetClippingBox(*args
, **kwargs
):
3477 GetClippingBox() -> (x, y, width, height)
3479 Gets the rectangle surrounding the current clipping region.
3481 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3483 def GetClippingRect(*args
, **kwargs
):
3485 GetClippingRect(self) -> Rect
3487 Gets the rectangle surrounding the current clipping region.
3489 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3491 def GetCharHeight(*args
, **kwargs
):
3493 GetCharHeight(self) -> int
3495 Gets the character height of the currently set font.
3497 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3499 def GetCharWidth(*args
, **kwargs
):
3501 GetCharWidth(self) -> int
3503 Gets the average character width of the currently set font.
3505 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3507 def GetTextExtent(*args
, **kwargs
):
3509 GetTextExtent(wxString string) -> (width, height)
3511 Get the width and height of the text using the current font. Only
3512 works for single line strings.
3514 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3516 def GetFullTextExtent(*args
, **kwargs
):
3518 GetFullTextExtent(wxString string, Font font=None) ->
3519 (width, height, descent, externalLeading)
3521 Get the width, height, decent and leading of the text using the
3522 current or specified font. Only works for single line strings.
3524 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3526 def GetMultiLineTextExtent(*args
, **kwargs
):
3528 GetMultiLineTextExtent(wxString string, Font font=None) ->
3529 (width, height, descent, externalLeading)
3531 Get the width, height, decent and leading of the text using the
3532 current or specified font. Works for single as well as multi-line
3535 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3537 def GetPartialTextExtents(*args
, **kwargs
):
3539 GetPartialTextExtents(self, text) -> [widths]
3541 Returns a list of integers such that each value is the distance in
3542 pixels from the begining of text to the coresponding character of
3543 *text*. The generic version simply builds a running total of the widths
3544 of each character using GetTextExtent, however if the various
3545 platforms have a native API function that is faster or more accurate
3546 than the generic implementation then it will be used instead.
3548 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3550 def GetSize(*args
, **kwargs
):
3552 GetSize(self) -> Size
3554 This gets the horizontal and vertical resolution in device units. It
3555 can be used to scale graphics to fit the page. For example, if *maxX*
3556 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3557 used in your application, the following code will scale the graphic to
3558 fit on the printer page::
3561 scaleX = maxX*1.0 / w
3562 scaleY = maxY*1.0 / h
3563 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3566 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3568 def GetSizeTuple(*args
, **kwargs
):
3570 GetSizeTuple() -> (width, height)
3572 This gets the horizontal and vertical resolution in device units. It
3573 can be used to scale graphics to fit the page. For example, if *maxX*
3574 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3575 used in your application, the following code will scale the graphic to
3576 fit on the printer page::
3579 scaleX = maxX*1.0 / w
3580 scaleY = maxY*1.0 / h
3581 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3584 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3586 def GetSizeMM(*args
, **kwargs
):
3588 GetSizeMM(self) -> Size
3590 Get the DC size in milimeters.
3592 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3594 def GetSizeMMTuple(*args
, **kwargs
):
3596 GetSizeMMTuple() -> (width, height)
3598 Get the DC size in milimeters.
3600 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3602 def DeviceToLogicalX(*args
, **kwargs
):
3604 DeviceToLogicalX(self, int x) -> int
3606 Convert device X coordinate to logical coordinate, using the current
3609 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
3611 def DeviceToLogicalY(*args
, **kwargs
):
3613 DeviceToLogicalY(self, int y) -> int
3615 Converts device Y coordinate to logical coordinate, using the current
3618 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
3620 def DeviceToLogicalXRel(*args
, **kwargs
):
3622 DeviceToLogicalXRel(self, int x) -> int
3624 Convert device X coordinate to relative logical coordinate, using the
3625 current mapping mode but ignoring the x axis orientation. Use this
3626 function for converting a width, for example.
3628 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
3630 def DeviceToLogicalYRel(*args
, **kwargs
):
3632 DeviceToLogicalYRel(self, int y) -> int
3634 Convert device Y coordinate to relative logical coordinate, using the
3635 current mapping mode but ignoring the y axis orientation. Use this
3636 function for converting a height, for example.
3638 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
3640 def LogicalToDeviceX(*args
, **kwargs
):
3642 LogicalToDeviceX(self, int x) -> int
3644 Converts logical X coordinate to device coordinate, using the current
3647 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
3649 def LogicalToDeviceY(*args
, **kwargs
):
3651 LogicalToDeviceY(self, int y) -> int
3653 Converts logical Y coordinate to device coordinate, using the current
3656 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
3658 def LogicalToDeviceXRel(*args
, **kwargs
):
3660 LogicalToDeviceXRel(self, int x) -> int
3662 Converts logical X coordinate to relative device coordinate, using the
3663 current mapping mode but ignoring the x axis orientation. Use this for
3664 converting a width, for example.
3666 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
3668 def LogicalToDeviceYRel(*args
, **kwargs
):
3670 LogicalToDeviceYRel(self, int y) -> int
3672 Converts logical Y coordinate to relative device coordinate, using the
3673 current mapping mode but ignoring the y axis orientation. Use this for
3674 converting a height, for example.
3676 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
3678 def CanDrawBitmap(*args
, **kwargs
):
3679 """CanDrawBitmap(self) -> bool"""
3680 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
3682 def CanGetTextExtent(*args
, **kwargs
):
3683 """CanGetTextExtent(self) -> bool"""
3684 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
3686 def GetDepth(*args
, **kwargs
):
3688 GetDepth(self) -> int
3690 Returns the colour depth of the DC.
3692 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
3694 def GetPPI(*args
, **kwargs
):
3696 GetPPI(self) -> Size
3698 Resolution in Pixels per inch
3700 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
3702 def Ok(*args
, **kwargs
):
3706 Returns true if the DC is ok to use.
3708 return _gdi_
.DC_Ok(*args
, **kwargs
)
3710 def GetBackgroundMode(*args
, **kwargs
):
3712 GetBackgroundMode(self) -> int
3714 Returns the current background mode, either ``wx.SOLID`` or
3717 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
3719 def GetBackground(*args
, **kwargs
):
3721 GetBackground(self) -> Brush
3723 Gets the brush used for painting the background.
3725 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
3727 def GetBrush(*args
, **kwargs
):
3729 GetBrush(self) -> Brush
3731 Gets the current brush
3733 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
3735 def GetFont(*args
, **kwargs
):
3737 GetFont(self) -> Font
3739 Gets the current font
3741 return _gdi_
.DC_GetFont(*args
, **kwargs
)
3743 def GetPen(*args
, **kwargs
):
3747 Gets the current pen
3749 return _gdi_
.DC_GetPen(*args
, **kwargs
)
3751 def GetTextBackground(*args
, **kwargs
):
3753 GetTextBackground(self) -> Colour
3755 Gets the current text background colour
3757 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
3759 def GetTextForeground(*args
, **kwargs
):
3761 GetTextForeground(self) -> Colour
3763 Gets the current text foreground colour
3765 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
3767 def SetTextForeground(*args
, **kwargs
):
3769 SetTextForeground(self, Colour colour)
3771 Sets the current text foreground colour for the DC.
3773 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
3775 def SetTextBackground(*args
, **kwargs
):
3777 SetTextBackground(self, Colour colour)
3779 Sets the current text background colour for the DC.
3781 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
3783 def GetMapMode(*args
, **kwargs
):
3785 GetMapMode(self) -> int
3787 Gets the current *mapping mode* for the device context
3789 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
3791 def SetMapMode(*args
, **kwargs
):
3793 SetMapMode(self, int mode)
3795 The *mapping mode* of the device context defines the unit of
3796 measurement used to convert logical units to device units. The
3797 mapping mode can be one of the following:
3799 ================ =============================================
3800 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3802 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3803 wx.MM_METRIC Each logical unit is 1 mm.
3804 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3805 wx.MM_TEXT Each logical unit is 1 pixel.
3806 ================ =============================================
3809 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
3811 def GetUserScale(*args
, **kwargs
):
3813 GetUserScale(self) -> (xScale, yScale)
3815 Gets the current user scale factor (set by `SetUserScale`).
3817 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
3819 def SetUserScale(*args
, **kwargs
):
3821 SetUserScale(self, double x, double y)
3823 Sets the user scaling factor, useful for applications which require
3826 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
3828 def GetLogicalScale(*args
, **kwargs
):
3829 """GetLogicalScale() -> (xScale, yScale)"""
3830 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
3832 def SetLogicalScale(*args
, **kwargs
):
3833 """SetLogicalScale(self, double x, double y)"""
3834 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
3836 def GetLogicalOrigin(*args
, **kwargs
):
3837 """GetLogicalOrigin(self) -> Point"""
3838 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
3840 def GetLogicalOriginTuple(*args
, **kwargs
):
3841 """GetLogicalOriginTuple() -> (x,y)"""
3842 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
3844 def SetLogicalOrigin(*args
, **kwargs
):
3845 """SetLogicalOrigin(self, int x, int y)"""
3846 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
3848 def SetLogicalOriginPoint(*args
, **kwargs
):
3849 """SetLogicalOriginPoint(self, Point point)"""
3850 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
3852 def GetDeviceOrigin(*args
, **kwargs
):
3853 """GetDeviceOrigin(self) -> Point"""
3854 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
3856 def GetDeviceOriginTuple(*args
, **kwargs
):
3857 """GetDeviceOriginTuple() -> (x,y)"""
3858 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
3860 def SetDeviceOrigin(*args
, **kwargs
):
3861 """SetDeviceOrigin(self, int x, int y)"""
3862 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
3864 def SetDeviceOriginPoint(*args
, **kwargs
):
3865 """SetDeviceOriginPoint(self, Point point)"""
3866 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
3868 def SetAxisOrientation(*args
, **kwargs
):
3870 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3872 Sets the x and y axis orientation (i.e., the direction from lowest to
3873 highest values on the axis). The default orientation is the natural
3874 orientation, e.g. x axis from left to right and y axis from bottom up.
3876 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
3878 def GetLogicalFunction(*args
, **kwargs
):
3880 GetLogicalFunction(self) -> int
3882 Gets the current logical function (set by `SetLogicalFunction`).
3884 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
3886 def SetLogicalFunction(*args
, **kwargs
):
3888 SetLogicalFunction(self, int function)
3890 Sets the current logical function for the device context. This
3891 determines how a source pixel (from a pen or brush colour, or source
3892 device context if using `Blit`) combines with a destination pixel in
3893 the current device context.
3895 The possible values and their meaning in terms of source and
3896 destination pixel values are as follows:
3898 ================ ==========================
3900 wx.AND_INVERT (NOT src) AND dst
3901 wx.AND_REVERSE src AND (NOT dst)
3904 wx.EQUIV (NOT src) XOR dst
3906 wx.NAND (NOT src) OR (NOT dst)
3907 wx.NOR (NOT src) AND (NOT dst)
3910 wx.OR_INVERT (NOT src) OR dst
3911 wx.OR_REVERSE src OR (NOT dst)
3913 wx.SRC_INVERT NOT src
3915 ================ ==========================
3917 The default is wx.COPY, which simply draws with the current
3918 colour. The others combine the current colour and the background using
3919 a logical operation. wx.INVERT is commonly used for drawing rubber
3920 bands or moving outlines, since drawing twice reverts to the original
3924 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
3926 def ComputeScaleAndOrigin(*args
, **kwargs
):
3928 ComputeScaleAndOrigin(self)
3930 Performs all necessary computations for given platform and context
3931 type after each change of scale and origin parameters. Usually called
3932 automatically internally after such changes.
3935 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
3937 def SetOptimization(self
, optimize
):
3939 def GetOptimization(self
):
3942 SetOptimization
= wx
._deprecated
(SetOptimization
)
3943 GetOptimization
= wx
._deprecated
(GetOptimization
)
3945 def CalcBoundingBox(*args
, **kwargs
):
3947 CalcBoundingBox(self, int x, int y)
3949 Adds the specified point to the bounding box which can be retrieved
3950 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3952 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
3954 def CalcBoundingBoxPoint(*args
, **kwargs
):
3956 CalcBoundingBoxPoint(self, Point point)
3958 Adds the specified point to the bounding box which can be retrieved
3959 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3961 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
3963 def ResetBoundingBox(*args
, **kwargs
):
3965 ResetBoundingBox(self)
3967 Resets the bounding box: after a call to this function, the bounding
3968 box doesn't contain anything.
3970 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
3972 def MinX(*args
, **kwargs
):
3976 Gets the minimum horizontal extent used in drawing commands so far.
3978 return _gdi_
.DC_MinX(*args
, **kwargs
)
3980 def MaxX(*args
, **kwargs
):
3984 Gets the maximum horizontal extent used in drawing commands so far.
3986 return _gdi_
.DC_MaxX(*args
, **kwargs
)
3988 def MinY(*args
, **kwargs
):
3992 Gets the minimum vertical extent used in drawing commands so far.
3994 return _gdi_
.DC_MinY(*args
, **kwargs
)
3996 def MaxY(*args
, **kwargs
):
4000 Gets the maximum vertical extent used in drawing commands so far.
4002 return _gdi_
.DC_MaxY(*args
, **kwargs
)
4004 def GetBoundingBox(*args
, **kwargs
):
4006 GetBoundingBox() -> (x1,y1, x2,y2)
4008 Returns the min and max points used in drawing commands so far.
4010 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
4012 def __nonzero__(self
): return self
.Ok()
4013 def GetHDC(*args
, **kwargs
):
4014 """GetHDC(self) -> long"""
4015 return _gdi_
.DC_GetHDC(*args
, **kwargs
)
4017 def _DrawPointList(*args
, **kwargs
):
4018 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4019 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
4021 def _DrawLineList(*args
, **kwargs
):
4022 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4023 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
4025 def _DrawRectangleList(*args
, **kwargs
):
4026 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4027 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
4029 def _DrawEllipseList(*args
, **kwargs
):
4030 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4031 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
4033 def _DrawPolygonList(*args
, **kwargs
):
4034 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4035 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
4037 def _DrawTextList(*args
, **kwargs
):
4039 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4040 PyObject backgroundList) -> PyObject
4042 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
4044 def DrawPointList(self
, points
, pens
=None):
4046 Draw a list of points as quickly as possible.
4048 :param points: A sequence of 2-element sequences representing
4049 each point to draw, (x,y).
4050 :param pens: If None, then the current pen is used. If a
4051 single pen then it will be used for all points. If
4052 a list of pens then there should be one for each point
4057 elif isinstance(pens
, wx
.Pen
):
4059 elif len(pens
) != len(points
):
4060 raise ValueError('points and pens must have same length')
4061 return self
._DrawPointList
(points
, pens
, [])
4064 def DrawLineList(self
, lines
, pens
=None):
4066 Draw a list of lines as quickly as possible.
4068 :param lines: A sequence of 4-element sequences representing
4069 each line to draw, (x1,y1, x2,y2).
4070 :param pens: If None, then the current pen is used. If a
4071 single pen then it will be used for all lines. If
4072 a list of pens then there should be one for each line
4077 elif isinstance(pens
, wx
.Pen
):
4079 elif len(pens
) != len(lines
):
4080 raise ValueError('lines and pens must have same length')
4081 return self
._DrawLineList
(lines
, pens
, [])
4084 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
4086 Draw a list of rectangles as quickly as possible.
4088 :param rectangles: A sequence of 4-element sequences representing
4089 each rectangle to draw, (x,y, w,h).
4090 :param pens: If None, then the current pen is used. If a
4091 single pen then it will be used for all rectangles.
4092 If a list of pens then there should be one for each
4093 rectangle in rectangles.
4094 :param brushes: A brush or brushes to be used to fill the rectagles,
4095 with similar semantics as the pens parameter.
4099 elif isinstance(pens
, wx
.Pen
):
4101 elif len(pens
) != len(rectangles
):
4102 raise ValueError('rectangles and pens must have same length')
4105 elif isinstance(brushes
, wx
.Brush
):
4107 elif len(brushes
) != len(rectangles
):
4108 raise ValueError('rectangles and brushes must have same length')
4109 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
4112 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
4114 Draw a list of ellipses as quickly as possible.
4116 :param ellipses: A sequence of 4-element sequences representing
4117 each ellipse to draw, (x,y, w,h).
4118 :param pens: If None, then the current pen is used. If a
4119 single pen then it will be used for all ellipses.
4120 If a list of pens then there should be one for each
4121 ellipse in ellipses.
4122 :param brushes: A brush or brushes to be used to fill the ellipses,
4123 with similar semantics as the pens parameter.
4127 elif isinstance(pens
, wx
.Pen
):
4129 elif len(pens
) != len(ellipses
):
4130 raise ValueError('ellipses and pens must have same length')
4133 elif isinstance(brushes
, wx
.Brush
):
4135 elif len(brushes
) != len(ellipses
):
4136 raise ValueError('ellipses and brushes must have same length')
4137 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
4140 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
4142 Draw a list of polygons, each of which is a list of points.
4144 :param polygons: A sequence of sequences of sequences.
4145 [[(x1,y1),(x2,y2),(x3,y3)...],
4146 [(x1,y1),(x2,y2),(x3,y3)...]]
4148 :param pens: If None, then the current pen is used. If a
4149 single pen then it will be used for all polygons.
4150 If a list of pens then there should be one for each
4152 :param brushes: A brush or brushes to be used to fill the polygons,
4153 with similar semantics as the pens parameter.
4157 elif isinstance(pens
, wx
.Pen
):
4159 elif len(pens
) != len(polygons
):
4160 raise ValueError('polygons and pens must have same length')
4163 elif isinstance(brushes
, wx
.Brush
):
4165 elif len(brushes
) != len(polygons
):
4166 raise ValueError('polygons and brushes must have same length')
4167 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
4170 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
4172 Draw a list of strings using a list of coordinants for positioning each string.
4174 :param textList: A list of strings
4175 :param coords: A list of (x,y) positions
4176 :param foregrounds: A list of `wx.Colour` objects to use for the
4177 foregrounds of the strings.
4178 :param backgrounds: A list of `wx.Colour` objects to use for the
4179 backgrounds of the strings.
4181 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4182 If you want backgrounds to do anything.
4184 if type(textList
) == type(''):
4185 textList
= [textList
]
4186 elif len(textList
) != len(coords
):
4187 raise ValueError('textlist and coords must have same length')
4188 if foregrounds
is None:
4190 elif isinstance(foregrounds
, wx
.Colour
):
4191 foregrounds
= [foregrounds
]
4192 elif len(foregrounds
) != len(coords
):
4193 raise ValueError('foregrounds and coords must have same length')
4194 if backgrounds
is None:
4196 elif isinstance(backgrounds
, wx
.Colour
):
4197 backgrounds
= [backgrounds
]
4198 elif len(backgrounds
) != len(coords
):
4199 raise ValueError('backgrounds and coords must have same length')
4200 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
4204 def __init__(self
, this
):
4206 if not hasattr(self
,"thisown"): self
.thisown
= 0
4208 _gdi_
.DC_swigregister(DCPtr
)
4210 #---------------------------------------------------------------------------
4214 A memory device context provides a means to draw graphics onto a
4215 bitmap. A bitmap must be selected into the new memory DC before it may
4216 be used for anything. Typical usage is as follows::
4219 dc.SelectObject(bitmap)
4220 # draw on the dc usign any of the Draw methods
4221 dc.SelectObject(wx.NullBitmap)
4222 # the bitmap now contains wahtever was drawn upon it
4224 Note that the memory DC *must* be deleted (or the bitmap selected out
4225 of it) before a bitmap can be reselected into another memory DC.
4229 return "<%s.%s; proxy of C++ wxMemoryDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4230 def __init__(self
, *args
, **kwargs
):
4232 __init__(self) -> MemoryDC
4234 Constructs a new memory device context.
4236 Use the Ok member to test whether the constructor was successful in
4237 creating a usable device context. Don't forget to select a bitmap into
4238 the DC before drawing on it.
4240 newobj
= _gdi_
.new_MemoryDC(*args
, **kwargs
)
4241 self
.this
= newobj
.this
4244 def SelectObject(*args
, **kwargs
):
4246 SelectObject(self, Bitmap bitmap)
4248 Selects the bitmap into the device context, to use as the memory
4249 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4250 the DC, and therefore the bitmap, and also to use Blit to copy the
4253 If the argument is wx.NullBitmap (or some other uninitialised
4254 `wx.Bitmap`) the current bitmap is selected out of the device context,
4255 and the original bitmap restored, allowing the current bitmap to be
4258 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
4261 class MemoryDCPtr(MemoryDC
):
4262 def __init__(self
, this
):
4264 if not hasattr(self
,"thisown"): self
.thisown
= 0
4265 self
.__class
__ = MemoryDC
4266 _gdi_
.MemoryDC_swigregister(MemoryDCPtr
)
4268 def MemoryDCFromDC(*args
, **kwargs
):
4270 MemoryDCFromDC(DC oldDC) -> MemoryDC
4272 Creates a DC that is compatible with the oldDC.
4274 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
4278 #---------------------------------------------------------------------------
4280 BUFFER_VIRTUAL_AREA
= _gdi_
.BUFFER_VIRTUAL_AREA
4281 BUFFER_CLIENT_AREA
= _gdi_
.BUFFER_CLIENT_AREA
4282 class BufferedDC(MemoryDC
):
4284 This simple class provides a simple way to avoid flicker: when drawing
4285 on it, everything is in fact first drawn on an in-memory buffer (a
4286 `wx.Bitmap`) and then copied to the screen only once, when this object
4289 It can be used in the same way as any other device
4290 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
4291 want to use it in your EVT_PAINT handler, you should look at
4292 `wx.BufferedPaintDC`.
4296 return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4297 def __init__(self
, *args
):
4299 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4300 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4302 Constructs a buffered DC.
4304 newobj
= _gdi_
.new_BufferedDC(*args
)
4305 self
.this
= newobj
.this
4308 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
4310 def __del__(self
, destroy
=_gdi_
.delete_BufferedDC
):
4314 Copies everything drawn on the DC so far to the underlying DC
4315 associated with this object, if any.
4318 if self
.thisown
: destroy(self
)
4321 def UnMask(*args
, **kwargs
):
4325 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4326 can be effectively used once only). This is usually only called in
4329 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
4332 class BufferedDCPtr(BufferedDC
):
4333 def __init__(self
, this
):
4335 if not hasattr(self
,"thisown"): self
.thisown
= 0
4336 self
.__class
__ = BufferedDC
4337 _gdi_
.BufferedDC_swigregister(BufferedDCPtr
)
4339 class BufferedPaintDC(BufferedDC
):
4341 This is a subclass of `wx.BufferedDC` which can be used inside of an
4342 EVT_PAINT event handler. Just create an object of this class instead
4343 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4344 flicker. The only thing to watch out for is that if you are using this
4345 class together with `wx.ScrolledWindow`, you probably do **not** want
4346 to call `wx.Window.PrepareDC` on it as it already does this internally
4347 for the real underlying `wx.PaintDC`.
4349 If your window is already fully buffered in a `wx.Bitmap` then your
4350 EVT_PAINT handler can be as simple as just creating a
4351 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4352 automatically when it is destroyed. For example::
4354 def OnPaint(self, event):
4355 dc = wx.BufferedPaintDC(self, self.buffer)
4363 return "<%s.%s; proxy of C++ wxBufferedPaintDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4364 def __init__(self
, *args
, **kwargs
):
4366 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4368 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4369 provide the bitmap to be used for buffering or let this object create
4370 one internally (in the latter case, the size of the client part of the
4371 window is automatically used).
4375 newobj
= _gdi_
.new_BufferedPaintDC(*args
, **kwargs
)
4376 self
.this
= newobj
.this
4380 class BufferedPaintDCPtr(BufferedPaintDC
):
4381 def __init__(self
, this
):
4383 if not hasattr(self
,"thisown"): self
.thisown
= 0
4384 self
.__class
__ = BufferedPaintDC
4385 _gdi_
.BufferedPaintDC_swigregister(BufferedPaintDCPtr
)
4387 #---------------------------------------------------------------------------
4391 A wxScreenDC can be used to paint anywhere on the screen. This should
4392 normally be constructed as a temporary stack object; don't store a
4397 return "<%s.%s; proxy of C++ wxScreenDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4398 def __init__(self
, *args
, **kwargs
):
4400 __init__(self) -> ScreenDC
4402 A wxScreenDC can be used to paint anywhere on the screen. This should
4403 normally be constructed as a temporary stack object; don't store a
4407 newobj
= _gdi_
.new_ScreenDC(*args
, **kwargs
)
4408 self
.this
= newobj
.this
4411 def StartDrawingOnTopWin(*args
, **kwargs
):
4413 StartDrawingOnTopWin(self, Window window) -> bool
4415 Specify that the area of the screen to be drawn upon coincides with
4418 :see: `EndDrawingOnTop`
4420 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4422 def StartDrawingOnTop(*args
, **kwargs
):
4424 StartDrawingOnTop(self, Rect rect=None) -> bool
4426 Specify that the area is the given rectangle, or the whole screen if
4429 :see: `EndDrawingOnTop`
4431 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4433 def EndDrawingOnTop(*args
, **kwargs
):
4435 EndDrawingOnTop(self) -> bool
4437 Use this in conjunction with `StartDrawingOnTop` or
4438 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4439 top of existing windows. Without this, some window systems (such as X)
4440 only allow drawing to take place underneath other windows.
4442 You might use this pair of functions when implementing a drag feature,
4443 for example as in the `wx.SplitterWindow` implementation.
4445 These functions are probably obsolete since the X implementations
4446 allow drawing directly on the screen now. However, the fact that this
4447 function allows the screen to be refreshed afterwards may be useful
4448 to some applications.
4450 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4453 class ScreenDCPtr(ScreenDC
):
4454 def __init__(self
, this
):
4456 if not hasattr(self
,"thisown"): self
.thisown
= 0
4457 self
.__class
__ = ScreenDC
4458 _gdi_
.ScreenDC_swigregister(ScreenDCPtr
)
4460 #---------------------------------------------------------------------------
4464 A wx.ClientDC must be constructed if an application wishes to paint on
4465 the client area of a window from outside an EVT_PAINT event. This should
4466 normally be constructed as a temporary stack object; don't store a
4467 wx.ClientDC object long term.
4469 To draw on a window from within an EVT_PAINT handler, construct a
4470 `wx.PaintDC` object.
4472 To draw on the whole window including decorations, construct a
4473 `wx.WindowDC` object (Windows only).
4477 return "<%s.%s; proxy of C++ wxClientDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4478 def __init__(self
, *args
, **kwargs
):
4480 __init__(self, Window win) -> ClientDC
4482 Constructor. Pass the window on which you wish to paint.
4484 newobj
= _gdi_
.new_ClientDC(*args
, **kwargs
)
4485 self
.this
= newobj
.this
4489 class ClientDCPtr(ClientDC
):
4490 def __init__(self
, this
):
4492 if not hasattr(self
,"thisown"): self
.thisown
= 0
4493 self
.__class
__ = ClientDC
4494 _gdi_
.ClientDC_swigregister(ClientDCPtr
)
4496 #---------------------------------------------------------------------------
4500 A wx.PaintDC must be constructed if an application wishes to paint on
4501 the client area of a window from within an EVT_PAINT event
4502 handler. This should normally be constructed as a temporary stack
4503 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4504 handler, you **must** create a wx.PaintDC object within it even if you
4505 don't actually use it.
4507 Using wx.PaintDC within EVT_PAINT handlers is important because it
4508 automatically sets the clipping area to the damaged area of the
4509 window. Attempts to draw outside this area do not appear.
4511 To draw on a window from outside EVT_PAINT handlers, construct a
4512 `wx.ClientDC` object.
4516 return "<%s.%s; proxy of C++ wxPaintDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4517 def __init__(self
, *args
, **kwargs
):
4519 __init__(self, Window win) -> PaintDC
4521 Constructor. Pass the window on which you wish to paint.
4523 newobj
= _gdi_
.new_PaintDC(*args
, **kwargs
)
4524 self
.this
= newobj
.this
4528 class PaintDCPtr(PaintDC
):
4529 def __init__(self
, this
):
4531 if not hasattr(self
,"thisown"): self
.thisown
= 0
4532 self
.__class
__ = PaintDC
4533 _gdi_
.PaintDC_swigregister(PaintDCPtr
)
4535 #---------------------------------------------------------------------------
4539 A wx.WindowDC must be constructed if an application wishes to paint on
4540 the whole area of a window (client and decorations). This should
4541 normally be constructed as a temporary stack object; don't store a
4545 return "<%s.%s; proxy of C++ wxWindowDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4546 def __init__(self
, *args
, **kwargs
):
4548 __init__(self, Window win) -> WindowDC
4550 Constructor. Pass the window on which you wish to paint.
4552 newobj
= _gdi_
.new_WindowDC(*args
, **kwargs
)
4553 self
.this
= newobj
.this
4557 class WindowDCPtr(WindowDC
):
4558 def __init__(self
, this
):
4560 if not hasattr(self
,"thisown"): self
.thisown
= 0
4561 self
.__class
__ = WindowDC
4562 _gdi_
.WindowDC_swigregister(WindowDCPtr
)
4564 #---------------------------------------------------------------------------
4568 wx.MirrorDC is a simple wrapper class which is always associated with a
4569 real `wx.DC` object and either forwards all of its operations to it
4570 without changes (no mirroring takes place) or exchanges x and y
4571 coordinates which makes it possible to reuse the same code to draw a
4572 figure and its mirror -- i.e. reflection related to the diagonal line
4576 return "<%s.%s; proxy of C++ wxMirrorDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4577 def __init__(self
, *args
, **kwargs
):
4579 __init__(self, DC dc, bool mirror) -> MirrorDC
4581 Creates a mirrored DC associated with the real *dc*. Everything drawn
4582 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4585 newobj
= _gdi_
.new_MirrorDC(*args
, **kwargs
)
4586 self
.this
= newobj
.this
4590 class MirrorDCPtr(MirrorDC
):
4591 def __init__(self
, this
):
4593 if not hasattr(self
,"thisown"): self
.thisown
= 0
4594 self
.__class
__ = MirrorDC
4595 _gdi_
.MirrorDC_swigregister(MirrorDCPtr
)
4597 #---------------------------------------------------------------------------
4599 class PostScriptDC(DC
):
4600 """This is a `wx.DC` that can write to PostScript files on any platform."""
4602 return "<%s.%s; proxy of C++ wxPostScriptDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4603 def __init__(self
, *args
, **kwargs
):
4605 __init__(self, wxPrintData printData) -> PostScriptDC
4607 Constructs a PostScript printer device context from a `wx.PrintData`
4610 newobj
= _gdi_
.new_PostScriptDC(*args
, **kwargs
)
4611 self
.this
= newobj
.this
4614 def GetPrintData(*args
, **kwargs
):
4615 """GetPrintData(self) -> wxPrintData"""
4616 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
4618 def SetPrintData(*args
, **kwargs
):
4619 """SetPrintData(self, wxPrintData data)"""
4620 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
4622 def SetResolution(*args
, **kwargs
):
4624 SetResolution(int ppi)
4626 Set resolution (in pixels per inch) that will be used in PostScript
4627 output. Default is 720ppi.
4629 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4631 SetResolution
= staticmethod(SetResolution
)
4632 def GetResolution(*args
, **kwargs
):
4634 GetResolution() -> int
4636 Return resolution used in PostScript output.
4638 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4640 GetResolution
= staticmethod(GetResolution
)
4642 class PostScriptDCPtr(PostScriptDC
):
4643 def __init__(self
, this
):
4645 if not hasattr(self
,"thisown"): self
.thisown
= 0
4646 self
.__class
__ = PostScriptDC
4647 _gdi_
.PostScriptDC_swigregister(PostScriptDCPtr
)
4649 def PostScriptDC_SetResolution(*args
, **kwargs
):
4651 PostScriptDC_SetResolution(int ppi)
4653 Set resolution (in pixels per inch) that will be used in PostScript
4654 output. Default is 720ppi.
4656 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4658 def PostScriptDC_GetResolution(*args
, **kwargs
):
4660 PostScriptDC_GetResolution() -> int
4662 Return resolution used in PostScript output.
4664 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4666 #---------------------------------------------------------------------------
4668 class MetaFile(_core
.Object
):
4669 """Proxy of C++ MetaFile class"""
4671 return "<%s.%s; proxy of C++ wxMetaFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4672 def __init__(self
, *args
, **kwargs
):
4673 """__init__(self, String filename=EmptyString) -> MetaFile"""
4674 newobj
= _gdi_
.new_MetaFile(*args
, **kwargs
)
4675 self
.this
= newobj
.this
4678 def __del__(self
, destroy
=_gdi_
.delete_MetaFile
):
4681 if self
.thisown
: destroy(self
)
4684 def Ok(*args
, **kwargs
):
4685 """Ok(self) -> bool"""
4686 return _gdi_
.MetaFile_Ok(*args
, **kwargs
)
4688 def SetClipboard(*args
, **kwargs
):
4689 """SetClipboard(self, int width=0, int height=0) -> bool"""
4690 return _gdi_
.MetaFile_SetClipboard(*args
, **kwargs
)
4692 def GetSize(*args
, **kwargs
):
4693 """GetSize(self) -> Size"""
4694 return _gdi_
.MetaFile_GetSize(*args
, **kwargs
)
4696 def GetWidth(*args
, **kwargs
):
4697 """GetWidth(self) -> int"""
4698 return _gdi_
.MetaFile_GetWidth(*args
, **kwargs
)
4700 def GetHeight(*args
, **kwargs
):
4701 """GetHeight(self) -> int"""
4702 return _gdi_
.MetaFile_GetHeight(*args
, **kwargs
)
4704 def GetFileName(*args
, **kwargs
):
4705 """GetFileName(self) -> String"""
4706 return _gdi_
.MetaFile_GetFileName(*args
, **kwargs
)
4708 def __nonzero__(self
): return self
.Ok()
4710 class MetaFilePtr(MetaFile
):
4711 def __init__(self
, this
):
4713 if not hasattr(self
,"thisown"): self
.thisown
= 0
4714 self
.__class
__ = MetaFile
4715 _gdi_
.MetaFile_swigregister(MetaFilePtr
)
4717 class MetaFileDC(DC
):
4718 """Proxy of C++ MetaFileDC class"""
4720 return "<%s.%s; proxy of C++ wxMetaFileDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4721 def __init__(self
, *args
, **kwargs
):
4723 __init__(self, String filename=EmptyString, int width=0, int height=0,
4724 String description=EmptyString) -> MetaFileDC
4726 newobj
= _gdi_
.new_MetaFileDC(*args
, **kwargs
)
4727 self
.this
= newobj
.this
4730 def Close(*args
, **kwargs
):
4731 """Close(self) -> MetaFile"""
4732 return _gdi_
.MetaFileDC_Close(*args
, **kwargs
)
4735 class MetaFileDCPtr(MetaFileDC
):
4736 def __init__(self
, this
):
4738 if not hasattr(self
,"thisown"): self
.thisown
= 0
4739 self
.__class
__ = MetaFileDC
4740 _gdi_
.MetaFileDC_swigregister(MetaFileDCPtr
)
4742 class PrinterDC(DC
):
4743 """Proxy of C++ PrinterDC class"""
4745 return "<%s.%s; proxy of C++ wxPrinterDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4746 def __init__(self
, *args
, **kwargs
):
4747 """__init__(self, wxPrintData printData) -> PrinterDC"""
4748 newobj
= _gdi_
.new_PrinterDC(*args
, **kwargs
)
4749 self
.this
= newobj
.this
4753 class PrinterDCPtr(PrinterDC
):
4754 def __init__(self
, this
):
4756 if not hasattr(self
,"thisown"): self
.thisown
= 0
4757 self
.__class
__ = PrinterDC
4758 _gdi_
.PrinterDC_swigregister(PrinterDCPtr
)
4760 #---------------------------------------------------------------------------
4762 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
4763 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
4764 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
4765 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
4766 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
4767 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
4768 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
4769 class ImageList(_core
.Object
):
4770 """Proxy of C++ ImageList class"""
4772 return "<%s.%s; proxy of C++ wxImageList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4773 def __init__(self
, *args
, **kwargs
):
4774 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4775 newobj
= _gdi_
.new_ImageList(*args
, **kwargs
)
4776 self
.this
= newobj
.this
4779 def __del__(self
, destroy
=_gdi_
.delete_ImageList
):
4782 if self
.thisown
: destroy(self
)
4785 def Add(*args
, **kwargs
):
4786 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4787 return _gdi_
.ImageList_Add(*args
, **kwargs
)
4789 def AddWithColourMask(*args
, **kwargs
):
4790 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4791 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
4793 def AddIcon(*args
, **kwargs
):
4794 """AddIcon(self, Icon icon) -> int"""
4795 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
4797 def GetBitmap(*args
, **kwargs
):
4798 """GetBitmap(self, int index) -> Bitmap"""
4799 return _gdi_
.ImageList_GetBitmap(*args
, **kwargs
)
4801 def GetIcon(*args
, **kwargs
):
4802 """GetIcon(self, int index) -> Icon"""
4803 return _gdi_
.ImageList_GetIcon(*args
, **kwargs
)
4805 def Replace(*args
, **kwargs
):
4806 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
4807 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
4809 def Draw(*args
, **kwargs
):
4811 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4812 bool solidBackground=False) -> bool
4814 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
4816 def GetImageCount(*args
, **kwargs
):
4817 """GetImageCount(self) -> int"""
4818 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
4820 def Remove(*args
, **kwargs
):
4821 """Remove(self, int index) -> bool"""
4822 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
4824 def RemoveAll(*args
, **kwargs
):
4825 """RemoveAll(self) -> bool"""
4826 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
4828 def GetSize(*args
, **kwargs
):
4829 """GetSize() -> (width,height)"""
4830 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
4833 class ImageListPtr(ImageList
):
4834 def __init__(self
, this
):
4836 if not hasattr(self
,"thisown"): self
.thisown
= 0
4837 self
.__class
__ = ImageList
4838 _gdi_
.ImageList_swigregister(ImageListPtr
)
4840 #---------------------------------------------------------------------------
4842 class PenList(_core
.Object
):
4843 """Proxy of C++ PenList class"""
4844 def __init__(self
): raise RuntimeError, "No constructor defined"
4846 return "<%s.%s; proxy of C++ wxPenList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4847 def AddPen(*args
, **kwargs
):
4848 """AddPen(self, Pen pen)"""
4849 return _gdi_
.PenList_AddPen(*args
, **kwargs
)
4851 def FindOrCreatePen(*args
, **kwargs
):
4852 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
4853 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
4855 def RemovePen(*args
, **kwargs
):
4856 """RemovePen(self, Pen pen)"""
4857 return _gdi_
.PenList_RemovePen(*args
, **kwargs
)
4859 def GetCount(*args
, **kwargs
):
4860 """GetCount(self) -> int"""
4861 return _gdi_
.PenList_GetCount(*args
, **kwargs
)
4864 class PenListPtr(PenList
):
4865 def __init__(self
, this
):
4867 if not hasattr(self
,"thisown"): self
.thisown
= 0
4868 self
.__class
__ = PenList
4869 _gdi_
.PenList_swigregister(PenListPtr
)
4871 NORMAL_FONT
= cvar
.NORMAL_FONT
4872 SMALL_FONT
= cvar
.SMALL_FONT
4873 ITALIC_FONT
= cvar
.ITALIC_FONT
4874 SWISS_FONT
= cvar
.SWISS_FONT
4875 RED_PEN
= cvar
.RED_PEN
4876 CYAN_PEN
= cvar
.CYAN_PEN
4877 GREEN_PEN
= cvar
.GREEN_PEN
4878 BLACK_PEN
= cvar
.BLACK_PEN
4879 WHITE_PEN
= cvar
.WHITE_PEN
4880 TRANSPARENT_PEN
= cvar
.TRANSPARENT_PEN
4881 BLACK_DASHED_PEN
= cvar
.BLACK_DASHED_PEN
4882 GREY_PEN
= cvar
.GREY_PEN
4883 MEDIUM_GREY_PEN
= cvar
.MEDIUM_GREY_PEN
4884 LIGHT_GREY_PEN
= cvar
.LIGHT_GREY_PEN
4885 BLUE_BRUSH
= cvar
.BLUE_BRUSH
4886 GREEN_BRUSH
= cvar
.GREEN_BRUSH
4887 WHITE_BRUSH
= cvar
.WHITE_BRUSH
4888 BLACK_BRUSH
= cvar
.BLACK_BRUSH
4889 TRANSPARENT_BRUSH
= cvar
.TRANSPARENT_BRUSH
4890 CYAN_BRUSH
= cvar
.CYAN_BRUSH
4891 RED_BRUSH
= cvar
.RED_BRUSH
4892 GREY_BRUSH
= cvar
.GREY_BRUSH
4893 MEDIUM_GREY_BRUSH
= cvar
.MEDIUM_GREY_BRUSH
4894 LIGHT_GREY_BRUSH
= cvar
.LIGHT_GREY_BRUSH
4901 LIGHT_GREY
= cvar
.LIGHT_GREY
4902 STANDARD_CURSOR
= cvar
.STANDARD_CURSOR
4903 HOURGLASS_CURSOR
= cvar
.HOURGLASS_CURSOR
4904 CROSS_CURSOR
= cvar
.CROSS_CURSOR
4905 NullBitmap
= cvar
.NullBitmap
4906 NullIcon
= cvar
.NullIcon
4907 NullCursor
= cvar
.NullCursor
4908 NullPen
= cvar
.NullPen
4909 NullBrush
= cvar
.NullBrush
4910 NullPalette
= cvar
.NullPalette
4911 NullFont
= cvar
.NullFont
4912 NullColour
= cvar
.NullColour
4914 class BrushList(_core
.Object
):
4915 """Proxy of C++ BrushList class"""
4916 def __init__(self
): raise RuntimeError, "No constructor defined"
4918 return "<%s.%s; proxy of C++ wxBrushList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4919 def AddBrush(*args
, **kwargs
):
4920 """AddBrush(self, Brush brush)"""
4921 return _gdi_
.BrushList_AddBrush(*args
, **kwargs
)
4923 def FindOrCreateBrush(*args
, **kwargs
):
4924 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
4925 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
4927 def RemoveBrush(*args
, **kwargs
):
4928 """RemoveBrush(self, Brush brush)"""
4929 return _gdi_
.BrushList_RemoveBrush(*args
, **kwargs
)
4931 def GetCount(*args
, **kwargs
):
4932 """GetCount(self) -> int"""
4933 return _gdi_
.BrushList_GetCount(*args
, **kwargs
)
4936 class BrushListPtr(BrushList
):
4937 def __init__(self
, this
):
4939 if not hasattr(self
,"thisown"): self
.thisown
= 0
4940 self
.__class
__ = BrushList
4941 _gdi_
.BrushList_swigregister(BrushListPtr
)
4943 class ColourDatabase(_core
.Object
):
4944 """Proxy of C++ ColourDatabase class"""
4946 return "<%s.%s; proxy of C++ wxColourDatabase instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4947 def __init__(self
, *args
, **kwargs
):
4948 """__init__(self) -> ColourDatabase"""
4949 newobj
= _gdi_
.new_ColourDatabase(*args
, **kwargs
)
4950 self
.this
= newobj
.this
4953 def __del__(self
, destroy
=_gdi_
.delete_ColourDatabase
):
4956 if self
.thisown
: destroy(self
)
4959 def Find(*args
, **kwargs
):
4960 """Find(self, String name) -> Colour"""
4961 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
4963 def FindName(*args
, **kwargs
):
4964 """FindName(self, Colour colour) -> String"""
4965 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
4968 def AddColour(*args
, **kwargs
):
4969 """AddColour(self, String name, Colour colour)"""
4970 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
4972 def Append(*args
, **kwargs
):
4973 """Append(self, String name, int red, int green, int blue)"""
4974 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
4977 class ColourDatabasePtr(ColourDatabase
):
4978 def __init__(self
, this
):
4980 if not hasattr(self
,"thisown"): self
.thisown
= 0
4981 self
.__class
__ = ColourDatabase
4982 _gdi_
.ColourDatabase_swigregister(ColourDatabasePtr
)
4984 class FontList(_core
.Object
):
4985 """Proxy of C++ FontList class"""
4986 def __init__(self
): raise RuntimeError, "No constructor defined"
4988 return "<%s.%s; proxy of C++ wxFontList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4989 def AddFont(*args
, **kwargs
):
4990 """AddFont(self, Font font)"""
4991 return _gdi_
.FontList_AddFont(*args
, **kwargs
)
4993 def FindOrCreateFont(*args
, **kwargs
):
4995 FindOrCreateFont(self, int point_size, int family, int style, int weight,
4996 bool underline=False, String facename=EmptyString,
4997 int encoding=FONTENCODING_DEFAULT) -> Font
4999 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
5001 def RemoveFont(*args
, **kwargs
):
5002 """RemoveFont(self, Font font)"""
5003 return _gdi_
.FontList_RemoveFont(*args
, **kwargs
)
5005 def GetCount(*args
, **kwargs
):
5006 """GetCount(self) -> int"""
5007 return _gdi_
.FontList_GetCount(*args
, **kwargs
)
5010 class FontListPtr(FontList
):
5011 def __init__(self
, this
):
5013 if not hasattr(self
,"thisown"): self
.thisown
= 0
5014 self
.__class
__ = FontList
5015 _gdi_
.FontList_swigregister(FontListPtr
)
5017 #---------------------------------------------------------------------------
5019 NullColor
= NullColour
5020 #---------------------------------------------------------------------------
5022 class Effects(_core
.Object
):
5023 """Proxy of C++ Effects class"""
5025 return "<%s.%s; proxy of C++ wxEffects instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5026 def __init__(self
, *args
, **kwargs
):
5027 """__init__(self) -> Effects"""
5028 newobj
= _gdi_
.new_Effects(*args
, **kwargs
)
5029 self
.this
= newobj
.this
5032 def GetHighlightColour(*args
, **kwargs
):
5033 """GetHighlightColour(self) -> Colour"""
5034 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
5036 def GetLightShadow(*args
, **kwargs
):
5037 """GetLightShadow(self) -> Colour"""
5038 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
5040 def GetFaceColour(*args
, **kwargs
):
5041 """GetFaceColour(self) -> Colour"""
5042 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
5044 def GetMediumShadow(*args
, **kwargs
):
5045 """GetMediumShadow(self) -> Colour"""
5046 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
5048 def GetDarkShadow(*args
, **kwargs
):
5049 """GetDarkShadow(self) -> Colour"""
5050 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
5052 def SetHighlightColour(*args
, **kwargs
):
5053 """SetHighlightColour(self, Colour c)"""
5054 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
5056 def SetLightShadow(*args
, **kwargs
):
5057 """SetLightShadow(self, Colour c)"""
5058 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
5060 def SetFaceColour(*args
, **kwargs
):
5061 """SetFaceColour(self, Colour c)"""
5062 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
5064 def SetMediumShadow(*args
, **kwargs
):
5065 """SetMediumShadow(self, Colour c)"""
5066 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
5068 def SetDarkShadow(*args
, **kwargs
):
5069 """SetDarkShadow(self, Colour c)"""
5070 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
5072 def Set(*args
, **kwargs
):
5074 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
5075 Colour mediumShadow, Colour darkShadow)
5077 return _gdi_
.Effects_Set(*args
, **kwargs
)
5079 def DrawSunkenEdge(*args
, **kwargs
):
5080 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
5081 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
5083 def TileBitmap(*args
, **kwargs
):
5084 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
5085 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
5088 class EffectsPtr(Effects
):
5089 def __init__(self
, this
):
5091 if not hasattr(self
,"thisown"): self
.thisown
= 0
5092 self
.__class
__ = Effects
5093 _gdi_
.Effects_swigregister(EffectsPtr
)
5094 TheFontList
= cvar
.TheFontList
5095 ThePenList
= cvar
.ThePenList
5096 TheBrushList
= cvar
.TheBrushList
5097 TheColourDatabase
= cvar
.TheColourDatabase
5099 #---------------------------------------------------------------------------
5101 CONTROL_DISABLED
= _gdi_
.CONTROL_DISABLED
5102 CONTROL_FOCUSED
= _gdi_
.CONTROL_FOCUSED
5103 CONTROL_PRESSED
= _gdi_
.CONTROL_PRESSED
5104 CONTROL_ISDEFAULT
= _gdi_
.CONTROL_ISDEFAULT
5105 CONTROL_ISSUBMENU
= _gdi_
.CONTROL_ISSUBMENU
5106 CONTROL_EXPANDED
= _gdi_
.CONTROL_EXPANDED
5107 CONTROL_CURRENT
= _gdi_
.CONTROL_CURRENT
5108 CONTROL_SELECTED
= _gdi_
.CONTROL_SELECTED
5109 CONTROL_CHECKED
= _gdi_
.CONTROL_CHECKED
5110 CONTROL_CHECKABLE
= _gdi_
.CONTROL_CHECKABLE
5111 CONTROL_UNDETERMINED
= _gdi_
.CONTROL_UNDETERMINED
5112 CONTROL_FLAGS_MASK
= _gdi_
.CONTROL_FLAGS_MASK
5113 CONTROL_DIRTY
= _gdi_
.CONTROL_DIRTY
5114 class SplitterRenderParams(object):
5116 This is just a simple struct used as a return value of
5117 `wx.RendererNative.GetSplitterParams` and contains some platform
5118 specific metrics about splitters.
5120 * widthSash: the width of the splitter sash.
5121 * border: the width of the border of the splitter window.
5122 * isHotSensitive: ``True`` if the splitter changes its
5123 appearance when the mouse is over it.
5128 return "<%s.%s; proxy of C++ wxSplitterRenderParams instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5129 def __init__(self
, *args
, **kwargs
):
5131 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
5133 This is just a simple struct used as a return value of
5134 `wx.RendererNative.GetSplitterParams` and contains some platform
5135 specific metrics about splitters.
5137 * widthSash: the width of the splitter sash.
5138 * border: the width of the border of the splitter window.
5139 * isHotSensitive: ``True`` if the splitter changes its
5140 appearance when the mouse is over it.
5144 newobj
= _gdi_
.new_SplitterRenderParams(*args
, **kwargs
)
5145 self
.this
= newobj
.this
5148 def __del__(self
, destroy
=_gdi_
.delete_SplitterRenderParams
):
5151 if self
.thisown
: destroy(self
)
5154 widthSash
= property(_gdi_
.SplitterRenderParams_widthSash_get
)
5155 border
= property(_gdi_
.SplitterRenderParams_border_get
)
5156 isHotSensitive
= property(_gdi_
.SplitterRenderParams_isHotSensitive_get
)
5158 class SplitterRenderParamsPtr(SplitterRenderParams
):
5159 def __init__(self
, this
):
5161 if not hasattr(self
,"thisown"): self
.thisown
= 0
5162 self
.__class
__ = SplitterRenderParams
5163 _gdi_
.SplitterRenderParams_swigregister(SplitterRenderParamsPtr
)
5165 class RendererVersion(object):
5167 This simple struct represents the `wx.RendererNative` interface
5168 version and is only used as the return value of
5169 `wx.RendererNative.GetVersion`.
5172 return "<%s.%s; proxy of C++ wxRendererVersion instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5173 def __init__(self
, *args
, **kwargs
):
5175 __init__(self, int version_, int age_) -> RendererVersion
5177 This simple struct represents the `wx.RendererNative` interface
5178 version and is only used as the return value of
5179 `wx.RendererNative.GetVersion`.
5181 newobj
= _gdi_
.new_RendererVersion(*args
, **kwargs
)
5182 self
.this
= newobj
.this
5185 def __del__(self
, destroy
=_gdi_
.delete_RendererVersion
):
5188 if self
.thisown
: destroy(self
)
5191 Current_Version
= _gdi_
.RendererVersion_Current_Version
5192 Current_Age
= _gdi_
.RendererVersion_Current_Age
5193 def IsCompatible(*args
, **kwargs
):
5194 """IsCompatible(RendererVersion ver) -> bool"""
5195 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
5197 IsCompatible
= staticmethod(IsCompatible
)
5198 version
= property(_gdi_
.RendererVersion_version_get
)
5199 age
= property(_gdi_
.RendererVersion_age_get
)
5201 class RendererVersionPtr(RendererVersion
):
5202 def __init__(self
, this
):
5204 if not hasattr(self
,"thisown"): self
.thisown
= 0
5205 self
.__class
__ = RendererVersion
5206 _gdi_
.RendererVersion_swigregister(RendererVersionPtr
)
5208 def RendererVersion_IsCompatible(*args
, **kwargs
):
5209 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
5210 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
5212 class RendererNative(object):
5214 One of the design principles of wxWidgets is to use the native widgets
5215 on every platform in order to be as close to the native look and feel
5216 on every platform. However there are still cases when some generic
5217 widgets are needed for various reasons, but it can sometimes take a
5218 lot of messy work to make them conform to the native LnF.
5220 The wx.RendererNative class is a collection of functions that have
5221 platform-specific implementations for drawing certain parts of
5222 genereic controls in ways that are as close to the native look as
5226 def __init__(self
): raise RuntimeError, "No constructor defined"
5228 return "<%s.%s; proxy of C++ wxRendererNative instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5229 def DrawHeaderButton(*args
, **kwargs
):
5231 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0)
5233 Draw the header control button (such as whar is used by `wx.ListCtrl`
5236 return _gdi_
.RendererNative_DrawHeaderButton(*args
, **kwargs
)
5238 def DrawTreeItemButton(*args
, **kwargs
):
5240 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
5242 Draw the expanded/collapsed icon for a tree control item.
5244 return _gdi_
.RendererNative_DrawTreeItemButton(*args
, **kwargs
)
5246 def DrawSplitterBorder(*args
, **kwargs
):
5248 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
5250 Draw the border for a sash window: this border must be such that the
5251 sash drawn by `DrawSplitterSash` blends into it well.
5253 return _gdi_
.RendererNative_DrawSplitterBorder(*args
, **kwargs
)
5255 def DrawSplitterSash(*args
, **kwargs
):
5257 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
5260 Draw a sash. The orient parameter defines whether the sash should be
5261 vertical or horizontal and how the position should be interpreted.
5263 return _gdi_
.RendererNative_DrawSplitterSash(*args
, **kwargs
)
5265 def DrawComboBoxDropButton(*args
, **kwargs
):
5267 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
5269 Draw a button like the one used by `wx.ComboBox` to show a drop down
5270 window. The usual appearance is a downwards pointing arrow.
5272 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
5273 ``wx.CONTROL_CURRENT`` bits set.
5275 return _gdi_
.RendererNative_DrawComboBoxDropButton(*args
, **kwargs
)
5277 def DrawDropArrow(*args
, **kwargs
):
5279 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
5281 Draw a drop down arrow that is suitable for use outside a combo
5282 box. Arrow will have a transparent background.
5284 ``rect`` is not entirely filled by the arrow. Instead, you should use
5285 bounding rectangle of a drop down button which arrow matches the size
5286 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
5287 ``wx.CONTROL_CURRENT`` bit set.
5289 return _gdi_
.RendererNative_DrawDropArrow(*args
, **kwargs
)
5291 def GetSplitterParams(*args
, **kwargs
):
5293 GetSplitterParams(self, Window win) -> SplitterRenderParams
5295 Get the splitter parameters, see `wx.SplitterRenderParams`.
5297 return _gdi_
.RendererNative_GetSplitterParams(*args
, **kwargs
)
5299 def Get(*args
, **kwargs
):
5301 Get() -> RendererNative
5303 Return the currently used renderer
5305 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
5307 Get
= staticmethod(Get
)
5308 def GetGeneric(*args
, **kwargs
):
5310 GetGeneric() -> RendererNative
5312 Return the generic implementation of the renderer. Under some
5313 platforms, this is the default renderer implementation, others have
5314 platform-specific default renderer which can be retrieved by calling
5317 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
5319 GetGeneric
= staticmethod(GetGeneric
)
5320 def GetDefault(*args
, **kwargs
):
5322 GetDefault() -> RendererNative
5324 Return the default (native) implementation for this platform -- this
5325 is also the one used by default but this may be changed by calling `Set`
5326 in which case the return value of this method may be different from
5327 the return value of `Get`.
5329 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
5331 GetDefault
= staticmethod(GetDefault
)
5332 def Set(*args
, **kwargs
):
5334 Set(RendererNative renderer) -> RendererNative
5336 Set the renderer to use, passing None reverts to using the default
5337 renderer. Returns the previous renderer used with Set or None.
5339 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
5341 Set
= staticmethod(Set
)
5342 def GetVersion(*args
, **kwargs
):
5344 GetVersion(self) -> RendererVersion
5346 Returns the version of the renderer. Will be used for ensuring
5347 compatibility of dynamically loaded renderers.
5349 return _gdi_
.RendererNative_GetVersion(*args
, **kwargs
)
5352 class RendererNativePtr(RendererNative
):
5353 def __init__(self
, this
):
5355 if not hasattr(self
,"thisown"): self
.thisown
= 0
5356 self
.__class
__ = RendererNative
5357 _gdi_
.RendererNative_swigregister(RendererNativePtr
)
5359 def RendererNative_Get(*args
, **kwargs
):
5361 RendererNative_Get() -> RendererNative
5363 Return the currently used renderer
5365 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
5367 def RendererNative_GetGeneric(*args
, **kwargs
):
5369 RendererNative_GetGeneric() -> RendererNative
5371 Return the generic implementation of the renderer. Under some
5372 platforms, this is the default renderer implementation, others have
5373 platform-specific default renderer which can be retrieved by calling
5376 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
5378 def RendererNative_GetDefault(*args
, **kwargs
):
5380 RendererNative_GetDefault() -> RendererNative
5382 Return the default (native) implementation for this platform -- this
5383 is also the one used by default but this may be changed by calling `Set`
5384 in which case the return value of this method may be different from
5385 the return value of `Get`.
5387 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
5389 def RendererNative_Set(*args
, **kwargs
):
5391 RendererNative_Set(RendererNative renderer) -> RendererNative
5393 Set the renderer to use, passing None reverts to using the default
5394 renderer. Returns the previous renderer used with Set or None.
5396 return _gdi_
.RendererNative_Set(*args
, **kwargs
)