1 # This file was created automatically by SWIG 1.3.27.
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, from a '#RRGGBB' colour hex value string, or from a 3
97 integer tuple to a wx.Colour object when calling C++ methods that
98 expect a wxColour. This means that the following are all
101 win.SetBackgroundColour(wxColour(0,0,255))
102 win.SetBackgroundColour('BLUE')
103 win.SetBackgroundColour('#0000FF')
104 win.SetBackgroundColour((0,0,255))
106 Additional colour names and their coresponding values can be added
107 using `wx.ColourDatabase`. Various system colours (as set in the
108 user's system preferences) can be retrieved with
109 `wx.SystemSettings.GetColour`.
113 return "<%s.%s; proxy of C++ wxColour instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
114 def __init__(self
, *args
, **kwargs
):
116 __init__(self, byte red=0, byte green=0, byte blue=0) -> Colour
118 Constructs a colour from red, green and blue values.
120 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
123 newobj
= _gdi_
.new_Colour(*args
, **kwargs
)
124 self
.this
= newobj
.this
127 def __del__(self
, destroy
=_gdi_
.delete_Colour
):
130 if self
.thisown
: destroy(self
)
133 def Red(*args
, **kwargs
):
137 Returns the red intensity.
139 return _gdi_
.Colour_Red(*args
, **kwargs
)
141 def Green(*args
, **kwargs
):
145 Returns the green intensity.
147 return _gdi_
.Colour_Green(*args
, **kwargs
)
149 def Blue(*args
, **kwargs
):
153 Returns the blue intensity.
155 return _gdi_
.Colour_Blue(*args
, **kwargs
)
157 def Ok(*args
, **kwargs
):
161 Returns True if the colour object is valid (the colour has been
162 initialised with RGB values).
164 return _gdi_
.Colour_Ok(*args
, **kwargs
)
166 def Set(*args
, **kwargs
):
168 Set(self, byte red, byte green, byte blue)
170 Sets the RGB intensity values.
172 return _gdi_
.Colour_Set(*args
, **kwargs
)
174 def SetRGB(*args
, **kwargs
):
176 SetRGB(self, unsigned long colRGB)
178 Sets the RGB intensity values from a packed RGB value.
180 return _gdi_
.Colour_SetRGB(*args
, **kwargs
)
182 def SetFromName(*args
, **kwargs
):
184 SetFromName(self, String colourName)
186 Sets the RGB intensity values using a colour name listed in
187 ``wx.TheColourDatabase``.
189 return _gdi_
.Colour_SetFromName(*args
, **kwargs
)
191 def GetPixel(*args
, **kwargs
):
193 GetPixel(self) -> long
195 Returns a pixel value which is platform-dependent. On Windows, a
196 COLORREF is returned. On X, an allocated pixel value is returned. -1
197 is returned if the pixel is invalid (on X, unallocated).
199 return _gdi_
.Colour_GetPixel(*args
, **kwargs
)
201 def __eq__(*args
, **kwargs
):
203 __eq__(self, Colour colour) -> bool
205 Compare colours for equality
207 return _gdi_
.Colour___eq__(*args
, **kwargs
)
209 def __ne__(*args
, **kwargs
):
211 __ne__(self, Colour colour) -> bool
213 Compare colours for inequality
215 return _gdi_
.Colour___ne__(*args
, **kwargs
)
217 def Get(*args
, **kwargs
):
221 Returns the RGB intensity values as a tuple.
223 return _gdi_
.Colour_Get(*args
, **kwargs
)
225 def GetRGB(*args
, **kwargs
):
227 GetRGB(self) -> unsigned long
229 Return the colour as a packed RGB value
231 return _gdi_
.Colour_GetRGB(*args
, **kwargs
)
233 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
234 def __str__(self
): return str(self
.Get())
235 def __repr__(self
): return 'wx.Colour' + str(self
.Get())
236 def __nonzero__(self
): return self
.Ok()
237 __safe_for_unpickling__
= True
238 def __reduce__(self
): return (Colour
, self
.Get())
241 class ColourPtr(Colour
):
242 def __init__(self
, this
):
244 if not hasattr(self
,"thisown"): self
.thisown
= 0
245 self
.__class
__ = Colour
246 _gdi_
.Colour_swigregister(ColourPtr
)
248 def NamedColour(*args
, **kwargs
):
250 NamedColour(String colorName) -> Colour
252 Constructs a colour object using a colour name listed in
253 ``wx.TheColourDatabase``.
255 val
= _gdi_
.new_NamedColour(*args
, **kwargs
)
259 def ColourRGB(*args
, **kwargs
):
261 ColourRGB(unsigned long colRGB) -> Colour
263 Constructs a colour from a packed RGB value.
265 val
= _gdi_
.new_ColourRGB(*args
, **kwargs
)
270 NamedColor
= NamedColour
273 class Palette(GDIObject
):
274 """Proxy of C++ Palette class"""
276 return "<%s.%s; proxy of C++ wxPalette instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
277 def __init__(self
, *args
, **kwargs
):
278 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
279 newobj
= _gdi_
.new_Palette(*args
, **kwargs
)
280 self
.this
= newobj
.this
283 def __del__(self
, destroy
=_gdi_
.delete_Palette
):
286 if self
.thisown
: destroy(self
)
289 def GetPixel(*args
, **kwargs
):
290 """GetPixel(self, byte red, byte green, byte blue) -> int"""
291 return _gdi_
.Palette_GetPixel(*args
, **kwargs
)
293 def GetRGB(*args
, **kwargs
):
294 """GetRGB(self, int pixel) -> (R,G,B)"""
295 return _gdi_
.Palette_GetRGB(*args
, **kwargs
)
297 def GetColoursCount(*args
, **kwargs
):
298 """GetColoursCount(self) -> int"""
299 return _gdi_
.Palette_GetColoursCount(*args
, **kwargs
)
301 def Ok(*args
, **kwargs
):
302 """Ok(self) -> bool"""
303 return _gdi_
.Palette_Ok(*args
, **kwargs
)
305 def __nonzero__(self
): return self
.Ok()
307 class PalettePtr(Palette
):
308 def __init__(self
, this
):
310 if not hasattr(self
,"thisown"): self
.thisown
= 0
311 self
.__class
__ = Palette
312 _gdi_
.Palette_swigregister(PalettePtr
)
314 #---------------------------------------------------------------------------
316 class Pen(GDIObject
):
317 """Proxy of C++ Pen class"""
319 return "<%s.%s; proxy of C++ wxPen instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
320 def __init__(self
, *args
, **kwargs
):
321 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
322 newobj
= _gdi_
.new_Pen(*args
, **kwargs
)
323 self
.this
= newobj
.this
326 def __del__(self
, destroy
=_gdi_
.delete_Pen
):
329 if self
.thisown
: destroy(self
)
332 def GetCap(*args
, **kwargs
):
333 """GetCap(self) -> int"""
334 return _gdi_
.Pen_GetCap(*args
, **kwargs
)
336 def GetColour(*args
, **kwargs
):
337 """GetColour(self) -> Colour"""
338 return _gdi_
.Pen_GetColour(*args
, **kwargs
)
340 def GetJoin(*args
, **kwargs
):
341 """GetJoin(self) -> int"""
342 return _gdi_
.Pen_GetJoin(*args
, **kwargs
)
344 def GetStyle(*args
, **kwargs
):
345 """GetStyle(self) -> int"""
346 return _gdi_
.Pen_GetStyle(*args
, **kwargs
)
348 def GetWidth(*args
, **kwargs
):
349 """GetWidth(self) -> int"""
350 return _gdi_
.Pen_GetWidth(*args
, **kwargs
)
352 def Ok(*args
, **kwargs
):
353 """Ok(self) -> bool"""
354 return _gdi_
.Pen_Ok(*args
, **kwargs
)
356 def SetCap(*args
, **kwargs
):
357 """SetCap(self, int cap_style)"""
358 return _gdi_
.Pen_SetCap(*args
, **kwargs
)
360 def SetColour(*args
, **kwargs
):
361 """SetColour(self, Colour colour)"""
362 return _gdi_
.Pen_SetColour(*args
, **kwargs
)
364 def SetJoin(*args
, **kwargs
):
365 """SetJoin(self, int join_style)"""
366 return _gdi_
.Pen_SetJoin(*args
, **kwargs
)
368 def SetStyle(*args
, **kwargs
):
369 """SetStyle(self, int style)"""
370 return _gdi_
.Pen_SetStyle(*args
, **kwargs
)
372 def SetWidth(*args
, **kwargs
):
373 """SetWidth(self, int width)"""
374 return _gdi_
.Pen_SetWidth(*args
, **kwargs
)
376 def SetDashes(*args
, **kwargs
):
377 """SetDashes(self, int dashes)"""
378 return _gdi_
.Pen_SetDashes(*args
, **kwargs
)
380 def GetDashes(*args
, **kwargs
):
381 """GetDashes(self) -> PyObject"""
382 return _gdi_
.Pen_GetDashes(*args
, **kwargs
)
384 def _SetDashes(*args
, **kwargs
):
385 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
386 return _gdi_
.Pen__SetDashes(*args
, **kwargs
)
388 def SetDashes(self
, dashes
):
390 Associate a list of dash lengths with the Pen.
392 self
._SetDashes
(self
, dashes
)
394 def GetDashCount(*args
, **kwargs
):
395 """GetDashCount(self) -> int"""
396 return _gdi_
.Pen_GetDashCount(*args
, **kwargs
)
398 def GetStipple(*args
, **kwargs
):
399 """GetStipple(self) -> Bitmap"""
400 return _gdi_
.Pen_GetStipple(*args
, **kwargs
)
402 def SetStipple(*args
, **kwargs
):
403 """SetStipple(self, Bitmap stipple)"""
404 return _gdi_
.Pen_SetStipple(*args
, **kwargs
)
406 def __eq__(*args
, **kwargs
):
407 """__eq__(self, Pen other) -> bool"""
408 return _gdi_
.Pen___eq__(*args
, **kwargs
)
410 def __ne__(*args
, **kwargs
):
411 """__ne__(self, Pen other) -> bool"""
412 return _gdi_
.Pen___ne__(*args
, **kwargs
)
414 def __nonzero__(self
): return self
.Ok()
417 def __init__(self
, this
):
419 if not hasattr(self
,"thisown"): self
.thisown
= 0
421 _gdi_
.Pen_swigregister(PenPtr
)
423 #---------------------------------------------------------------------------
425 class Brush(GDIObject
):
427 A brush is a drawing tool for filling in areas. It is used for
428 painting the background of rectangles, ellipses, etc. when drawing on
429 a `wx.DC`. It has a colour and a style.
432 return "<%s.%s; proxy of C++ wxBrush instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
433 def __init__(self
, *args
, **kwargs
):
435 __init__(self, Colour colour, int style=SOLID) -> Brush
437 Constructs a brush from a `wx.Colour` object and a style.
439 newobj
= _gdi_
.new_Brush(*args
, **kwargs
)
440 self
.this
= newobj
.this
443 def __del__(self
, destroy
=_gdi_
.delete_Brush
):
446 if self
.thisown
: destroy(self
)
449 def SetColour(*args
, **kwargs
):
451 SetColour(self, Colour col)
453 Set the brush's `wx.Colour`.
455 return _gdi_
.Brush_SetColour(*args
, **kwargs
)
457 def SetStyle(*args
, **kwargs
):
459 SetStyle(self, int style)
461 Sets the style of the brush. See `__init__` for a listing of styles.
463 return _gdi_
.Brush_SetStyle(*args
, **kwargs
)
465 def SetStipple(*args
, **kwargs
):
467 SetStipple(self, Bitmap stipple)
469 Sets the stipple `wx.Bitmap`.
471 return _gdi_
.Brush_SetStipple(*args
, **kwargs
)
473 def GetColour(*args
, **kwargs
):
475 GetColour(self) -> Colour
477 Returns the `wx.Colour` of the brush.
479 return _gdi_
.Brush_GetColour(*args
, **kwargs
)
481 def GetStyle(*args
, **kwargs
):
483 GetStyle(self) -> int
485 Returns the style of the brush. See `__init__` for a listing of
488 return _gdi_
.Brush_GetStyle(*args
, **kwargs
)
490 def GetStipple(*args
, **kwargs
):
492 GetStipple(self) -> Bitmap
494 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
495 have a wx.STIPPLE style, then the return value may be non-None but an
496 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
498 return _gdi_
.Brush_GetStipple(*args
, **kwargs
)
500 def IsHatch(*args
, **kwargs
):
502 IsHatch(self) -> bool
504 Is the current style a hatch type?
506 return _gdi_
.Brush_IsHatch(*args
, **kwargs
)
508 def Ok(*args
, **kwargs
):
512 Returns True if the brush is initialised and valid.
514 return _gdi_
.Brush_Ok(*args
, **kwargs
)
516 def __nonzero__(self
): return self
.Ok()
518 class BrushPtr(Brush
):
519 def __init__(self
, this
):
521 if not hasattr(self
,"thisown"): self
.thisown
= 0
522 self
.__class
__ = Brush
523 _gdi_
.Brush_swigregister(BrushPtr
)
525 def BrushFromBitmap(*args
, **kwargs
):
527 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
529 Constructs a stippled brush using a bitmap.
531 val
= _gdi_
.new_BrushFromBitmap(*args
, **kwargs
)
535 class Bitmap(GDIObject
):
537 The wx.Bitmap class encapsulates the concept of a platform-dependent
538 bitmap. It can be either monochrome or colour, and either loaded from
539 a file or created dynamically. A bitmap can be selected into a memory
540 device context (instance of `wx.MemoryDC`). This enables the bitmap to
541 be copied to a window or memory device context using `wx.DC.Blit`, or
542 to be used as a drawing surface.
545 return "<%s.%s; proxy of C++ wxBitmap instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
546 def __init__(self
, *args
, **kwargs
):
548 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
550 Loads a bitmap from a file.
552 newobj
= _gdi_
.new_Bitmap(*args
, **kwargs
)
553 self
.this
= newobj
.this
556 def __del__(self
, destroy
=_gdi_
.delete_Bitmap
):
559 if self
.thisown
: destroy(self
)
562 def GetHandle(*args
, **kwargs
):
563 """GetHandle(self) -> long"""
564 return _gdi_
.Bitmap_GetHandle(*args
, **kwargs
)
566 def SetHandle(*args
, **kwargs
):
567 """SetHandle(self, long handle)"""
568 return _gdi_
.Bitmap_SetHandle(*args
, **kwargs
)
570 def Ok(*args
, **kwargs
):
571 """Ok(self) -> bool"""
572 return _gdi_
.Bitmap_Ok(*args
, **kwargs
)
574 def GetWidth(*args
, **kwargs
):
576 GetWidth(self) -> int
578 Gets the width of the bitmap in pixels.
580 return _gdi_
.Bitmap_GetWidth(*args
, **kwargs
)
582 def GetHeight(*args
, **kwargs
):
584 GetHeight(self) -> int
586 Gets the height of the bitmap in pixels.
588 return _gdi_
.Bitmap_GetHeight(*args
, **kwargs
)
590 def GetDepth(*args
, **kwargs
):
592 GetDepth(self) -> int
594 Gets the colour depth of the bitmap. A value of 1 indicates a
597 return _gdi_
.Bitmap_GetDepth(*args
, **kwargs
)
599 def GetSize(*args
, **kwargs
):
601 GetSize(self) -> Size
603 Get the size of the bitmap.
605 return _gdi_
.Bitmap_GetSize(*args
, **kwargs
)
607 def ConvertToImage(*args
, **kwargs
):
609 ConvertToImage(self) -> Image
611 Creates a platform-independent image from a platform-dependent
612 bitmap. This preserves mask information so that bitmaps and images can
613 be converted back and forth without loss in that respect.
615 return _gdi_
.Bitmap_ConvertToImage(*args
, **kwargs
)
617 def GetMask(*args
, **kwargs
):
619 GetMask(self) -> Mask
621 Gets the associated mask (if any) which may have been loaded from a
622 file or explpicitly set for the bitmap.
624 :see: `SetMask`, `wx.Mask`
627 return _gdi_
.Bitmap_GetMask(*args
, **kwargs
)
629 def SetMask(*args
, **kwargs
):
631 SetMask(self, Mask mask)
633 Sets the mask for this bitmap.
635 :see: `GetMask`, `wx.Mask`
638 return _gdi_
.Bitmap_SetMask(*args
, **kwargs
)
640 def SetMaskColour(*args
, **kwargs
):
642 SetMaskColour(self, Colour colour)
644 Create a Mask based on a specified colour in the Bitmap.
646 return _gdi_
.Bitmap_SetMaskColour(*args
, **kwargs
)
648 def GetSubBitmap(*args
, **kwargs
):
650 GetSubBitmap(self, Rect rect) -> Bitmap
652 Returns a sub-bitmap of the current one as long as the rect belongs
653 entirely to the bitmap. This function preserves bit depth and mask
656 return _gdi_
.Bitmap_GetSubBitmap(*args
, **kwargs
)
658 def SaveFile(*args
, **kwargs
):
660 SaveFile(self, String name, int type, Palette palette=None) -> bool
662 Saves a bitmap in the named file. See `__init__` for a description of
663 the ``type`` parameter.
665 return _gdi_
.Bitmap_SaveFile(*args
, **kwargs
)
667 def LoadFile(*args
, **kwargs
):
669 LoadFile(self, String name, int type) -> bool
671 Loads a bitmap from a file. See `__init__` for a description of the
674 return _gdi_
.Bitmap_LoadFile(*args
, **kwargs
)
676 def GetPalette(*args
, **kwargs
):
677 """GetPalette(self) -> Palette"""
678 return _gdi_
.Bitmap_GetPalette(*args
, **kwargs
)
680 def SetPalette(*args
, **kwargs
):
681 """SetPalette(self, Palette palette)"""
682 return _gdi_
.Bitmap_SetPalette(*args
, **kwargs
)
684 def CopyFromIcon(*args
, **kwargs
):
685 """CopyFromIcon(self, Icon icon) -> bool"""
686 return _gdi_
.Bitmap_CopyFromIcon(*args
, **kwargs
)
688 def SetHeight(*args
, **kwargs
):
690 SetHeight(self, int height)
692 Set the height property (does not affect the existing bitmap data).
694 return _gdi_
.Bitmap_SetHeight(*args
, **kwargs
)
696 def SetWidth(*args
, **kwargs
):
698 SetWidth(self, int width)
700 Set the width property (does not affect the existing bitmap data).
702 return _gdi_
.Bitmap_SetWidth(*args
, **kwargs
)
704 def SetDepth(*args
, **kwargs
):
706 SetDepth(self, int depth)
708 Set the depth property (does not affect the existing bitmap data).
710 return _gdi_
.Bitmap_SetDepth(*args
, **kwargs
)
712 def SetSize(*args
, **kwargs
):
714 SetSize(self, Size size)
716 Set the bitmap size (does not affect the existing bitmap data).
718 return _gdi_
.Bitmap_SetSize(*args
, **kwargs
)
720 def CopyFromCursor(*args
, **kwargs
):
721 """CopyFromCursor(self, Cursor cursor) -> bool"""
722 return _gdi_
.Bitmap_CopyFromCursor(*args
, **kwargs
)
724 def __nonzero__(self
): return self
.Ok()
725 def __eq__(*args
, **kwargs
):
726 """__eq__(self, Bitmap other) -> bool"""
727 return _gdi_
.Bitmap___eq__(*args
, **kwargs
)
729 def __ne__(*args
, **kwargs
):
730 """__ne__(self, Bitmap other) -> bool"""
731 return _gdi_
.Bitmap___ne__(*args
, **kwargs
)
734 class BitmapPtr(Bitmap
):
735 def __init__(self
, this
):
737 if not hasattr(self
,"thisown"): self
.thisown
= 0
738 self
.__class
__ = Bitmap
739 _gdi_
.Bitmap_swigregister(BitmapPtr
)
741 def EmptyBitmap(*args
, **kwargs
):
743 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
745 Creates a new bitmap of the given size. A depth of -1 indicates the
746 depth of the current screen or visual. Some platforms only support 1
747 for monochrome and -1 for the current colour setting.
749 val
= _gdi_
.new_EmptyBitmap(*args
, **kwargs
)
753 def BitmapFromIcon(*args
, **kwargs
):
755 BitmapFromIcon(Icon icon) -> Bitmap
757 Create a new bitmap from a `wx.Icon` object.
759 val
= _gdi_
.new_BitmapFromIcon(*args
, **kwargs
)
763 def BitmapFromImage(*args
, **kwargs
):
765 BitmapFromImage(Image image, int depth=-1) -> Bitmap
767 Creates bitmap object from a `wx.Image`. This has to be done to
768 actually display a `wx.Image` as you cannot draw an image directly on
769 a window. The resulting bitmap will use the provided colour depth (or
770 that of the current screen colour depth if depth is -1) which entails
771 that a colour reduction may have to take place.
773 val
= _gdi_
.new_BitmapFromImage(*args
, **kwargs
)
777 def BitmapFromXPMData(*args
, **kwargs
):
779 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
781 Construct a Bitmap from a list of strings formatted as XPM data.
783 val
= _gdi_
.new_BitmapFromXPMData(*args
, **kwargs
)
787 def BitmapFromBits(*args
, **kwargs
):
789 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
791 Creates a bitmap from an array of bits. You should only use this
792 function for monochrome bitmaps (depth 1) in portable programs: in
793 this case the bits parameter should contain an XBM image. For other
794 bit depths, the behaviour is platform dependent.
796 val
= _gdi_
.new_BitmapFromBits(*args
, **kwargs
)
800 class Mask(_core
.Object
):
802 This class encapsulates a monochrome mask bitmap, where the masked
803 area is black and the unmasked area is white. When associated with a
804 bitmap and drawn in a device context, the unmasked area of the bitmap
805 will be drawn, and the masked area will not be drawn.
807 A mask may be associated with a `wx.Bitmap`. It is used in
808 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
809 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
813 return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
814 def __init__(self
, *args
, **kwargs
):
816 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
818 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
819 that indicates the transparent portions of the mask. In other words,
820 the pixels in ``bitmap`` that match ``colour`` will be the transparent
821 portions of the mask. If no ``colour`` or an invalid ``colour`` is
822 passed then BLACK is used.
824 :see: `wx.Bitmap`, `wx.Colour`
826 newobj
= _gdi_
.new_Mask(*args
, **kwargs
)
827 self
.this
= newobj
.this
832 def __init__(self
, this
):
834 if not hasattr(self
,"thisown"): self
.thisown
= 0
835 self
.__class
__ = Mask
836 _gdi_
.Mask_swigregister(MaskPtr
)
838 MaskColour
= wx
._deprecated
(Mask
, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
839 class Icon(GDIObject
):
840 """Proxy of C++ Icon class"""
842 return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
843 def __init__(self
, *args
, **kwargs
):
844 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
845 newobj
= _gdi_
.new_Icon(*args
, **kwargs
)
846 self
.this
= newobj
.this
849 def __del__(self
, destroy
=_gdi_
.delete_Icon
):
852 if self
.thisown
: destroy(self
)
855 def LoadFile(*args
, **kwargs
):
856 """LoadFile(self, String name, int type) -> bool"""
857 return _gdi_
.Icon_LoadFile(*args
, **kwargs
)
859 def GetHandle(*args
, **kwargs
):
860 """GetHandle(self) -> long"""
861 return _gdi_
.Icon_GetHandle(*args
, **kwargs
)
863 def SetHandle(*args
, **kwargs
):
864 """SetHandle(self, long handle)"""
865 return _gdi_
.Icon_SetHandle(*args
, **kwargs
)
867 def Ok(*args
, **kwargs
):
868 """Ok(self) -> bool"""
869 return _gdi_
.Icon_Ok(*args
, **kwargs
)
871 def GetWidth(*args
, **kwargs
):
872 """GetWidth(self) -> int"""
873 return _gdi_
.Icon_GetWidth(*args
, **kwargs
)
875 def GetHeight(*args
, **kwargs
):
876 """GetHeight(self) -> int"""
877 return _gdi_
.Icon_GetHeight(*args
, **kwargs
)
879 def GetDepth(*args
, **kwargs
):
880 """GetDepth(self) -> int"""
881 return _gdi_
.Icon_GetDepth(*args
, **kwargs
)
883 def SetWidth(*args
, **kwargs
):
884 """SetWidth(self, int w)"""
885 return _gdi_
.Icon_SetWidth(*args
, **kwargs
)
887 def SetHeight(*args
, **kwargs
):
888 """SetHeight(self, int h)"""
889 return _gdi_
.Icon_SetHeight(*args
, **kwargs
)
891 def SetDepth(*args
, **kwargs
):
892 """SetDepth(self, int d)"""
893 return _gdi_
.Icon_SetDepth(*args
, **kwargs
)
895 def SetSize(*args
, **kwargs
):
896 """SetSize(self, Size size)"""
897 return _gdi_
.Icon_SetSize(*args
, **kwargs
)
899 def CopyFromBitmap(*args
, **kwargs
):
900 """CopyFromBitmap(self, Bitmap bmp)"""
901 return _gdi_
.Icon_CopyFromBitmap(*args
, **kwargs
)
903 def __nonzero__(self
): return self
.Ok()
906 def __init__(self
, this
):
908 if not hasattr(self
,"thisown"): self
.thisown
= 0
909 self
.__class
__ = Icon
910 _gdi_
.Icon_swigregister(IconPtr
)
912 def EmptyIcon(*args
, **kwargs
):
913 """EmptyIcon() -> Icon"""
914 val
= _gdi_
.new_EmptyIcon(*args
, **kwargs
)
918 def IconFromLocation(*args
, **kwargs
):
919 """IconFromLocation(IconLocation loc) -> Icon"""
920 val
= _gdi_
.new_IconFromLocation(*args
, **kwargs
)
924 def IconFromBitmap(*args
, **kwargs
):
925 """IconFromBitmap(Bitmap bmp) -> Icon"""
926 val
= _gdi_
.new_IconFromBitmap(*args
, **kwargs
)
930 def IconFromXPMData(*args
, **kwargs
):
931 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
932 val
= _gdi_
.new_IconFromXPMData(*args
, **kwargs
)
936 class IconLocation(object):
937 """Proxy of C++ IconLocation class"""
939 return "<%s.%s; proxy of C++ wxIconLocation instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
940 def __init__(self
, *args
, **kwargs
):
941 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
942 newobj
= _gdi_
.new_IconLocation(*args
, **kwargs
)
943 self
.this
= newobj
.this
946 def __del__(self
, destroy
=_gdi_
.delete_IconLocation
):
949 if self
.thisown
: destroy(self
)
952 def IsOk(*args
, **kwargs
):
953 """IsOk(self) -> bool"""
954 return _gdi_
.IconLocation_IsOk(*args
, **kwargs
)
956 def __nonzero__(self
): return self
.Ok()
957 def SetFileName(*args
, **kwargs
):
958 """SetFileName(self, String filename)"""
959 return _gdi_
.IconLocation_SetFileName(*args
, **kwargs
)
961 def GetFileName(*args
, **kwargs
):
962 """GetFileName(self) -> String"""
963 return _gdi_
.IconLocation_GetFileName(*args
, **kwargs
)
965 def SetIndex(*args
, **kwargs
):
966 """SetIndex(self, int num)"""
967 return _gdi_
.IconLocation_SetIndex(*args
, **kwargs
)
969 def GetIndex(*args
, **kwargs
):
970 """GetIndex(self) -> int"""
971 return _gdi_
.IconLocation_GetIndex(*args
, **kwargs
)
974 class IconLocationPtr(IconLocation
):
975 def __init__(self
, this
):
977 if not hasattr(self
,"thisown"): self
.thisown
= 0
978 self
.__class
__ = IconLocation
979 _gdi_
.IconLocation_swigregister(IconLocationPtr
)
981 class IconBundle(object):
982 """Proxy of C++ IconBundle class"""
984 return "<%s.%s; proxy of C++ wxIconBundle instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
985 def __init__(self
, *args
, **kwargs
):
986 """__init__(self) -> IconBundle"""
987 newobj
= _gdi_
.new_IconBundle(*args
, **kwargs
)
988 self
.this
= newobj
.this
991 def __del__(self
, destroy
=_gdi_
.delete_IconBundle
):
994 if self
.thisown
: destroy(self
)
997 def AddIcon(*args
, **kwargs
):
998 """AddIcon(self, Icon icon)"""
999 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
1001 def AddIconFromFile(*args
, **kwargs
):
1002 """AddIconFromFile(self, String file, long type)"""
1003 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
1005 def GetIcon(*args
, **kwargs
):
1006 """GetIcon(self, Size size) -> Icon"""
1007 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
1010 class IconBundlePtr(IconBundle
):
1011 def __init__(self
, this
):
1013 if not hasattr(self
,"thisown"): self
.thisown
= 0
1014 self
.__class
__ = IconBundle
1015 _gdi_
.IconBundle_swigregister(IconBundlePtr
)
1017 def IconBundleFromFile(*args
, **kwargs
):
1018 """IconBundleFromFile(String file, long type) -> IconBundle"""
1019 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
1023 def IconBundleFromIcon(*args
, **kwargs
):
1024 """IconBundleFromIcon(Icon icon) -> IconBundle"""
1025 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
1029 class Cursor(GDIObject
):
1031 A cursor is a small bitmap usually used for denoting where the mouse
1032 pointer is, with a picture that might indicate the interpretation of a
1035 A single cursor object may be used in many windows (any subwindow
1036 type). The wxWindows convention is to set the cursor for a window, as
1037 in X, rather than to set it globally as in MS Windows, although a
1038 global `wx.SetCursor` function is also available for use on MS Windows.
1042 return "<%s.%s; proxy of C++ wxCursor instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1043 def __init__(self
, *args
, **kwargs
):
1045 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1047 Construct a Cursor from a file. Specify the type of file using
1048 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1051 newobj
= _gdi_
.new_Cursor(*args
, **kwargs
)
1052 self
.this
= newobj
.this
1055 def __del__(self
, destroy
=_gdi_
.delete_Cursor
):
1058 if self
.thisown
: destroy(self
)
1061 def GetHandle(*args
, **kwargs
):
1063 GetHandle(self) -> long
1065 Get the MS Windows handle for the cursor
1067 return _gdi_
.Cursor_GetHandle(*args
, **kwargs
)
1069 def SetHandle(*args
, **kwargs
):
1071 SetHandle(self, long handle)
1073 Set the MS Windows handle to use for the cursor
1075 return _gdi_
.Cursor_SetHandle(*args
, **kwargs
)
1077 def Ok(*args
, **kwargs
):
1078 """Ok(self) -> bool"""
1079 return _gdi_
.Cursor_Ok(*args
, **kwargs
)
1081 def __nonzero__(self
): return self
.Ok()
1082 def GetWidth(*args
, **kwargs
):
1083 """GetWidth(self) -> int"""
1084 return _gdi_
.Cursor_GetWidth(*args
, **kwargs
)
1086 def GetHeight(*args
, **kwargs
):
1087 """GetHeight(self) -> int"""
1088 return _gdi_
.Cursor_GetHeight(*args
, **kwargs
)
1090 def GetDepth(*args
, **kwargs
):
1091 """GetDepth(self) -> int"""
1092 return _gdi_
.Cursor_GetDepth(*args
, **kwargs
)
1094 def SetWidth(*args
, **kwargs
):
1095 """SetWidth(self, int w)"""
1096 return _gdi_
.Cursor_SetWidth(*args
, **kwargs
)
1098 def SetHeight(*args
, **kwargs
):
1099 """SetHeight(self, int h)"""
1100 return _gdi_
.Cursor_SetHeight(*args
, **kwargs
)
1102 def SetDepth(*args
, **kwargs
):
1103 """SetDepth(self, int d)"""
1104 return _gdi_
.Cursor_SetDepth(*args
, **kwargs
)
1106 def SetSize(*args
, **kwargs
):
1107 """SetSize(self, Size size)"""
1108 return _gdi_
.Cursor_SetSize(*args
, **kwargs
)
1111 class CursorPtr(Cursor
):
1112 def __init__(self
, this
):
1114 if not hasattr(self
,"thisown"): self
.thisown
= 0
1115 self
.__class
__ = Cursor
1116 _gdi_
.Cursor_swigregister(CursorPtr
)
1118 def StockCursor(*args
, **kwargs
):
1120 StockCursor(int id) -> Cursor
1122 Create a cursor using one of the stock cursors. Note that not all
1123 stock cursors are available on all platforms.
1125 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
1129 def CursorFromImage(*args
, **kwargs
):
1131 CursorFromImage(Image image) -> Cursor
1133 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1134 for setting the transparent portions of the cursor.
1136 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
1140 #---------------------------------------------------------------------------
1142 OutRegion
= _gdi_
.OutRegion
1143 PartRegion
= _gdi_
.PartRegion
1144 InRegion
= _gdi_
.InRegion
1145 class Region(GDIObject
):
1146 """Proxy of C++ Region class"""
1148 return "<%s.%s; proxy of C++ wxRegion instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1149 def __init__(self
, *args
, **kwargs
):
1150 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1151 newobj
= _gdi_
.new_Region(*args
, **kwargs
)
1152 self
.this
= newobj
.this
1155 def __del__(self
, destroy
=_gdi_
.delete_Region
):
1158 if self
.thisown
: destroy(self
)
1161 def Clear(*args
, **kwargs
):
1163 return _gdi_
.Region_Clear(*args
, **kwargs
)
1165 def Offset(*args
, **kwargs
):
1166 """Offset(self, int x, int y) -> bool"""
1167 return _gdi_
.Region_Offset(*args
, **kwargs
)
1169 def Contains(*args
, **kwargs
):
1170 """Contains(self, int x, int y) -> int"""
1171 return _gdi_
.Region_Contains(*args
, **kwargs
)
1173 def ContainsPoint(*args
, **kwargs
):
1174 """ContainsPoint(self, Point pt) -> int"""
1175 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
1177 def ContainsRect(*args
, **kwargs
):
1178 """ContainsRect(self, Rect rect) -> int"""
1179 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
1181 def ContainsRectDim(*args
, **kwargs
):
1182 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1183 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
1185 def GetBox(*args
, **kwargs
):
1186 """GetBox(self) -> Rect"""
1187 return _gdi_
.Region_GetBox(*args
, **kwargs
)
1189 def Intersect(*args
, **kwargs
):
1190 """Intersect(self, int x, int y, int width, int height) -> bool"""
1191 return _gdi_
.Region_Intersect(*args
, **kwargs
)
1193 def IntersectRect(*args
, **kwargs
):
1194 """IntersectRect(self, Rect rect) -> bool"""
1195 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
1197 def IntersectRegion(*args
, **kwargs
):
1198 """IntersectRegion(self, Region region) -> bool"""
1199 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
1201 def IsEmpty(*args
, **kwargs
):
1202 """IsEmpty(self) -> bool"""
1203 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
1205 def Union(*args
, **kwargs
):
1206 """Union(self, int x, int y, int width, int height) -> bool"""
1207 return _gdi_
.Region_Union(*args
, **kwargs
)
1209 def UnionRect(*args
, **kwargs
):
1210 """UnionRect(self, Rect rect) -> bool"""
1211 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1213 def UnionRegion(*args
, **kwargs
):
1214 """UnionRegion(self, Region region) -> bool"""
1215 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1217 def Subtract(*args
, **kwargs
):
1218 """Subtract(self, int x, int y, int width, int height) -> bool"""
1219 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1221 def SubtractRect(*args
, **kwargs
):
1222 """SubtractRect(self, Rect rect) -> bool"""
1223 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1225 def SubtractRegion(*args
, **kwargs
):
1226 """SubtractRegion(self, Region region) -> bool"""
1227 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1229 def Xor(*args
, **kwargs
):
1230 """Xor(self, int x, int y, int width, int height) -> bool"""
1231 return _gdi_
.Region_Xor(*args
, **kwargs
)
1233 def XorRect(*args
, **kwargs
):
1234 """XorRect(self, Rect rect) -> bool"""
1235 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1237 def XorRegion(*args
, **kwargs
):
1238 """XorRegion(self, Region region) -> bool"""
1239 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1241 def ConvertToBitmap(*args
, **kwargs
):
1242 """ConvertToBitmap(self) -> Bitmap"""
1243 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1245 def UnionBitmap(*args
, **kwargs
):
1246 """UnionBitmap(self, Bitmap bmp) -> bool"""
1247 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1249 def UnionBitmapColour(*args
, **kwargs
):
1250 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1251 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1254 class RegionPtr(Region
):
1255 def __init__(self
, this
):
1257 if not hasattr(self
,"thisown"): self
.thisown
= 0
1258 self
.__class
__ = Region
1259 _gdi_
.Region_swigregister(RegionPtr
)
1261 def RegionFromBitmap(*args
, **kwargs
):
1262 """RegionFromBitmap(Bitmap bmp) -> Region"""
1263 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1267 def RegionFromBitmapColour(*args
, **kwargs
):
1268 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1269 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1273 def RegionFromPoints(*args
, **kwargs
):
1274 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1275 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1279 class RegionIterator(_core
.Object
):
1280 """Proxy of C++ RegionIterator class"""
1282 return "<%s.%s; proxy of C++ wxRegionIterator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1283 def __init__(self
, *args
, **kwargs
):
1284 """__init__(self, Region region) -> RegionIterator"""
1285 newobj
= _gdi_
.new_RegionIterator(*args
, **kwargs
)
1286 self
.this
= newobj
.this
1289 def __del__(self
, destroy
=_gdi_
.delete_RegionIterator
):
1292 if self
.thisown
: destroy(self
)
1295 def GetX(*args
, **kwargs
):
1296 """GetX(self) -> int"""
1297 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1299 def GetY(*args
, **kwargs
):
1300 """GetY(self) -> int"""
1301 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1303 def GetW(*args
, **kwargs
):
1304 """GetW(self) -> int"""
1305 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1307 def GetWidth(*args
, **kwargs
):
1308 """GetWidth(self) -> int"""
1309 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1311 def GetH(*args
, **kwargs
):
1312 """GetH(self) -> int"""
1313 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1315 def GetHeight(*args
, **kwargs
):
1316 """GetHeight(self) -> int"""
1317 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1319 def GetRect(*args
, **kwargs
):
1320 """GetRect(self) -> Rect"""
1321 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1323 def HaveRects(*args
, **kwargs
):
1324 """HaveRects(self) -> bool"""
1325 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1327 def Reset(*args
, **kwargs
):
1329 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1331 def Next(*args
, **kwargs
):
1333 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1335 def __nonzero__(*args
, **kwargs
):
1336 """__nonzero__(self) -> bool"""
1337 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1340 class RegionIteratorPtr(RegionIterator
):
1341 def __init__(self
, this
):
1343 if not hasattr(self
,"thisown"): self
.thisown
= 0
1344 self
.__class
__ = RegionIterator
1345 _gdi_
.RegionIterator_swigregister(RegionIteratorPtr
)
1347 #---------------------------------------------------------------------------
1349 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1350 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1351 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1352 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1353 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1354 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1355 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1356 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1357 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1358 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1359 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1360 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1361 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1362 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1363 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1364 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1365 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1366 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1367 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1368 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1369 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1370 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1371 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1372 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1373 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1374 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1375 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1376 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1377 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1378 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1379 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1380 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1381 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1382 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1383 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1384 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1385 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1386 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1387 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1388 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1389 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1390 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1391 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1392 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1393 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1394 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1395 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1396 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1397 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1398 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1399 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1400 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1401 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1402 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1403 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1404 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1405 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1406 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1407 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1408 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1409 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1410 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1411 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1412 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1413 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1414 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1415 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1416 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1417 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1418 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1419 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1420 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1421 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1422 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1423 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1424 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1425 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1426 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1427 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1428 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1429 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1430 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1431 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1432 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1433 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1434 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1435 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1436 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1437 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1438 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1439 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1440 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1441 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1442 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1443 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1444 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1445 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1446 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1447 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1448 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1449 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1450 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1451 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1452 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1453 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1454 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1455 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1456 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1457 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1458 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1459 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1460 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1461 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1462 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1463 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1464 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1465 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1466 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1467 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1468 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1469 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1470 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1471 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1472 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1473 #---------------------------------------------------------------------------
1475 class NativeFontInfo(object):
1476 """Proxy of C++ NativeFontInfo class"""
1478 return "<%s.%s; proxy of C++ wxNativeFontInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1479 def __init__(self
, *args
, **kwargs
):
1480 """__init__(self) -> NativeFontInfo"""
1481 newobj
= _gdi_
.new_NativeFontInfo(*args
, **kwargs
)
1482 self
.this
= newobj
.this
1485 def __del__(self
, destroy
=_gdi_
.delete_NativeFontInfo
):
1488 if self
.thisown
: destroy(self
)
1491 def Init(*args
, **kwargs
):
1493 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1495 def InitFromFont(*args
, **kwargs
):
1496 """InitFromFont(self, Font font)"""
1497 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1499 def GetPointSize(*args
, **kwargs
):
1500 """GetPointSize(self) -> int"""
1501 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1503 def GetPixelSize(*args
, **kwargs
):
1504 """GetPixelSize(self) -> Size"""
1505 return _gdi_
.NativeFontInfo_GetPixelSize(*args
, **kwargs
)
1507 def GetStyle(*args
, **kwargs
):
1508 """GetStyle(self) -> int"""
1509 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1511 def GetWeight(*args
, **kwargs
):
1512 """GetWeight(self) -> int"""
1513 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1515 def GetUnderlined(*args
, **kwargs
):
1516 """GetUnderlined(self) -> bool"""
1517 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1519 def GetFaceName(*args
, **kwargs
):
1520 """GetFaceName(self) -> String"""
1521 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1523 def GetFamily(*args
, **kwargs
):
1524 """GetFamily(self) -> int"""
1525 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1527 def GetEncoding(*args
, **kwargs
):
1528 """GetEncoding(self) -> int"""
1529 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1531 def SetPointSize(*args
, **kwargs
):
1532 """SetPointSize(self, int pointsize)"""
1533 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1535 def SetPixelSize(*args
, **kwargs
):
1536 """SetPixelSize(self, Size pixelSize)"""
1537 return _gdi_
.NativeFontInfo_SetPixelSize(*args
, **kwargs
)
1539 def SetStyle(*args
, **kwargs
):
1540 """SetStyle(self, int style)"""
1541 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1543 def SetWeight(*args
, **kwargs
):
1544 """SetWeight(self, int weight)"""
1545 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1547 def SetUnderlined(*args
, **kwargs
):
1548 """SetUnderlined(self, bool underlined)"""
1549 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1551 def SetFaceName(*args
, **kwargs
):
1552 """SetFaceName(self, String facename)"""
1553 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1555 def SetFamily(*args
, **kwargs
):
1556 """SetFamily(self, int family)"""
1557 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1559 def SetEncoding(*args
, **kwargs
):
1560 """SetEncoding(self, int encoding)"""
1561 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1563 def FromString(*args
, **kwargs
):
1564 """FromString(self, String s) -> bool"""
1565 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1567 def ToString(*args
, **kwargs
):
1568 """ToString(self) -> String"""
1569 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1571 def __str__(*args
, **kwargs
):
1572 """__str__(self) -> String"""
1573 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1575 def FromUserString(*args
, **kwargs
):
1576 """FromUserString(self, String s) -> bool"""
1577 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1579 def ToUserString(*args
, **kwargs
):
1580 """ToUserString(self) -> String"""
1581 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1584 class NativeFontInfoPtr(NativeFontInfo
):
1585 def __init__(self
, this
):
1587 if not hasattr(self
,"thisown"): self
.thisown
= 0
1588 self
.__class
__ = NativeFontInfo
1589 _gdi_
.NativeFontInfo_swigregister(NativeFontInfoPtr
)
1591 class NativeEncodingInfo(object):
1592 """Proxy of C++ NativeEncodingInfo class"""
1594 return "<%s.%s; proxy of C++ wxNativeEncodingInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1595 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1596 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1597 def __init__(self
, *args
, **kwargs
):
1598 """__init__(self) -> NativeEncodingInfo"""
1599 newobj
= _gdi_
.new_NativeEncodingInfo(*args
, **kwargs
)
1600 self
.this
= newobj
.this
1603 def __del__(self
, destroy
=_gdi_
.delete_NativeEncodingInfo
):
1606 if self
.thisown
: destroy(self
)
1609 def FromString(*args
, **kwargs
):
1610 """FromString(self, String s) -> bool"""
1611 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1613 def ToString(*args
, **kwargs
):
1614 """ToString(self) -> String"""
1615 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1618 class NativeEncodingInfoPtr(NativeEncodingInfo
):
1619 def __init__(self
, this
):
1621 if not hasattr(self
,"thisown"): self
.thisown
= 0
1622 self
.__class
__ = NativeEncodingInfo
1623 _gdi_
.NativeEncodingInfo_swigregister(NativeEncodingInfoPtr
)
1626 def GetNativeFontEncoding(*args
, **kwargs
):
1627 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1628 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1630 def TestFontEncoding(*args
, **kwargs
):
1631 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1632 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1633 #---------------------------------------------------------------------------
1635 class FontMapper(object):
1636 """Proxy of C++ FontMapper class"""
1638 return "<%s.%s; proxy of C++ wxFontMapper instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1639 def __init__(self
, *args
, **kwargs
):
1640 """__init__(self) -> FontMapper"""
1641 newobj
= _gdi_
.new_FontMapper(*args
, **kwargs
)
1642 self
.this
= newobj
.this
1645 def __del__(self
, destroy
=_gdi_
.delete_FontMapper
):
1648 if self
.thisown
: destroy(self
)
1651 def Get(*args
, **kwargs
):
1652 """Get() -> FontMapper"""
1653 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1655 Get
= staticmethod(Get
)
1656 def Set(*args
, **kwargs
):
1657 """Set(FontMapper mapper) -> FontMapper"""
1658 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1660 Set
= staticmethod(Set
)
1661 def CharsetToEncoding(*args
, **kwargs
):
1662 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1663 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1665 def GetSupportedEncodingsCount(*args
, **kwargs
):
1666 """GetSupportedEncodingsCount() -> size_t"""
1667 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1669 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1670 def GetEncoding(*args
, **kwargs
):
1671 """GetEncoding(size_t n) -> int"""
1672 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1674 GetEncoding
= staticmethod(GetEncoding
)
1675 def GetEncodingName(*args
, **kwargs
):
1676 """GetEncodingName(int encoding) -> String"""
1677 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1679 GetEncodingName
= staticmethod(GetEncodingName
)
1680 def GetEncodingDescription(*args
, **kwargs
):
1681 """GetEncodingDescription(int encoding) -> String"""
1682 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1684 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1685 def GetEncodingFromName(*args
, **kwargs
):
1686 """GetEncodingFromName(String name) -> int"""
1687 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1689 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1690 def SetConfigPath(*args
, **kwargs
):
1691 """SetConfigPath(self, String prefix)"""
1692 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1694 def GetDefaultConfigPath(*args
, **kwargs
):
1695 """GetDefaultConfigPath() -> String"""
1696 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1698 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1699 def GetAltForEncoding(*args
, **kwargs
):
1700 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1701 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1703 def IsEncodingAvailable(*args
, **kwargs
):
1704 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1705 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1707 def SetDialogParent(*args
, **kwargs
):
1708 """SetDialogParent(self, Window parent)"""
1709 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1711 def SetDialogTitle(*args
, **kwargs
):
1712 """SetDialogTitle(self, String title)"""
1713 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1716 class FontMapperPtr(FontMapper
):
1717 def __init__(self
, this
):
1719 if not hasattr(self
,"thisown"): self
.thisown
= 0
1720 self
.__class
__ = FontMapper
1721 _gdi_
.FontMapper_swigregister(FontMapperPtr
)
1723 def FontMapper_Get(*args
, **kwargs
):
1724 """FontMapper_Get() -> FontMapper"""
1725 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1727 def FontMapper_Set(*args
, **kwargs
):
1728 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1729 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1731 def FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
):
1732 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1733 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1735 def FontMapper_GetEncoding(*args
, **kwargs
):
1736 """FontMapper_GetEncoding(size_t n) -> int"""
1737 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1739 def FontMapper_GetEncodingName(*args
, **kwargs
):
1740 """FontMapper_GetEncodingName(int encoding) -> String"""
1741 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1743 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1744 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1745 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1747 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1748 """FontMapper_GetEncodingFromName(String name) -> int"""
1749 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1751 def FontMapper_GetDefaultConfigPath(*args
, **kwargs
):
1752 """FontMapper_GetDefaultConfigPath() -> String"""
1753 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1755 #---------------------------------------------------------------------------
1757 class Font(GDIObject
):
1759 A font is an object which determines the appearance of text. Fonts are
1760 used for drawing text to a device context, and setting the appearance
1763 You can retrieve the current system font settings with `wx.SystemSettings`.
1766 return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
1767 def __init__(self
, *args
, **kwargs
):
1769 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1770 String face=EmptyString,
1771 int encoding=FONTENCODING_DEFAULT) -> Font
1773 Creates a font object with the specified attributes.
1775 :param pointSize: The size of the font in points.
1777 :param family: Font family. A generic way of referring to fonts
1778 without specifying actual facename. It can be One of
1779 the ``wx.FONTFAMILY_xxx`` constants.
1781 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1783 :param weight: Font weight, sometimes also referred to as font
1784 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1786 :param underline: The value can be ``True`` or ``False`` and
1787 indicates whether the font will include an underline. This
1788 may not be supported on all platforms.
1790 :param face: An optional string specifying the actual typeface to
1791 be used. If it is an empty string, a default typeface will be
1792 chosen based on the family.
1794 :param encoding: An encoding which may be one of the
1795 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1796 available, no font is created.
1798 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1799 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1802 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1803 newobj
= _gdi_
.new_Font(*args
, **kwargs
)
1804 self
.this
= newobj
.this
1807 def __del__(self
, destroy
=_gdi_
.delete_Font
):
1810 if self
.thisown
: destroy(self
)
1813 def Ok(*args
, **kwargs
):
1817 Returns ``True`` if this font was successfully created.
1819 return _gdi_
.Font_Ok(*args
, **kwargs
)
1821 def __nonzero__(self
): return self
.Ok()
1822 def __eq__(*args
, **kwargs
):
1823 """__eq__(self, Font other) -> bool"""
1824 return _gdi_
.Font___eq__(*args
, **kwargs
)
1826 def __ne__(*args
, **kwargs
):
1827 """__ne__(self, Font other) -> bool"""
1828 return _gdi_
.Font___ne__(*args
, **kwargs
)
1830 def GetPointSize(*args
, **kwargs
):
1832 GetPointSize(self) -> int
1834 Gets the point size.
1836 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
1838 def GetPixelSize(*args
, **kwargs
):
1840 GetPixelSize(self) -> Size
1842 Returns the size in pixels if the font was constructed with a pixel
1845 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
1847 def IsUsingSizeInPixels(*args
, **kwargs
):
1849 IsUsingSizeInPixels(self) -> bool
1851 Returns ``True`` if the font is using a pixelSize.
1853 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
1855 def GetFamily(*args
, **kwargs
):
1857 GetFamily(self) -> int
1859 Gets the font family.
1861 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
1863 def GetStyle(*args
, **kwargs
):
1865 GetStyle(self) -> int
1867 Gets the font style.
1869 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
1871 def GetWeight(*args
, **kwargs
):
1873 GetWeight(self) -> int
1875 Gets the font weight.
1877 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
1879 def GetUnderlined(*args
, **kwargs
):
1881 GetUnderlined(self) -> bool
1883 Returns ``True`` if the font is underlined, ``False`` otherwise.
1885 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
1887 def GetFaceName(*args
, **kwargs
):
1889 GetFaceName(self) -> String
1891 Returns the typeface name associated with the font, or the empty
1892 string if there is no typeface information.
1894 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
1896 def GetEncoding(*args
, **kwargs
):
1898 GetEncoding(self) -> int
1900 Get the font's encoding.
1902 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
1904 def GetNativeFontInfo(*args
, **kwargs
):
1906 GetNativeFontInfo(self) -> NativeFontInfo
1908 Constructs a `wx.NativeFontInfo` object from this font.
1910 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
1912 def IsFixedWidth(*args
, **kwargs
):
1914 IsFixedWidth(self) -> bool
1916 Returns true if the font is a fixed width (or monospaced) font, false
1917 if it is a proportional one or font is invalid.
1919 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
1921 def GetNativeFontInfoDesc(*args
, **kwargs
):
1923 GetNativeFontInfoDesc(self) -> String
1925 Returns the platform-dependent string completely describing this font
1926 or an empty string if the font isn't valid.
1928 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
1930 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
1932 GetNativeFontInfoUserDesc(self) -> String
1934 Returns a human readable version of `GetNativeFontInfoDesc`.
1936 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
1938 def SetPointSize(*args
, **kwargs
):
1940 SetPointSize(self, int pointSize)
1942 Sets the point size.
1944 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
1946 def SetPixelSize(*args
, **kwargs
):
1948 SetPixelSize(self, Size pixelSize)
1950 Sets the size in pixels rather than points. If there is platform API
1951 support for this then it is used, otherwise a font with the closest
1952 size is found using a binary search.
1954 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
1956 def SetFamily(*args
, **kwargs
):
1958 SetFamily(self, int family)
1960 Sets the font family.
1962 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
1964 def SetStyle(*args
, **kwargs
):
1966 SetStyle(self, int style)
1968 Sets the font style.
1970 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
1972 def SetWeight(*args
, **kwargs
):
1974 SetWeight(self, int weight)
1976 Sets the font weight.
1978 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
1980 def SetFaceName(*args
, **kwargs
):
1982 SetFaceName(self, String faceName)
1984 Sets the facename for the font. The facename, which should be a valid
1985 font installed on the end-user's system.
1987 To avoid portability problems, don't rely on a specific face, but
1988 specify the font family instead or as well. A suitable font will be
1989 found on the end-user's system. If both the family and the facename
1990 are specified, wxWidgets will first search for the specific face, and
1991 then for a font belonging to the same family.
1993 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
1995 def SetUnderlined(*args
, **kwargs
):
1997 SetUnderlined(self, bool underlined)
2001 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
2003 def SetEncoding(*args
, **kwargs
):
2005 SetEncoding(self, int encoding)
2007 Set the font encoding.
2009 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
2011 def SetNativeFontInfo(*args
, **kwargs
):
2013 SetNativeFontInfo(self, NativeFontInfo info)
2015 Set the font's attributes from a `wx.NativeFontInfo` object.
2017 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
2019 def SetNativeFontInfoFromString(*args
, **kwargs
):
2021 SetNativeFontInfoFromString(self, String info)
2023 Set the font's attributes from string representation of a
2024 `wx.NativeFontInfo` object.
2026 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
2028 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
2030 SetNativeFontInfoUserDesc(self, String info)
2032 Set the font's attributes from a string formerly returned from
2033 `GetNativeFontInfoDesc`.
2035 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
2037 def GetFamilyString(*args
, **kwargs
):
2039 GetFamilyString(self) -> String
2041 Returns a string representation of the font family.
2043 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
2045 def GetStyleString(*args
, **kwargs
):
2047 GetStyleString(self) -> String
2049 Returns a string representation of the font style.
2051 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
2053 def GetWeightString(*args
, **kwargs
):
2055 GetWeightString(self) -> String
2057 Return a string representation of the font weight.
2059 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
2061 def SetNoAntiAliasing(*args
, **kwargs
):
2062 """SetNoAntiAliasing(self, bool no=True)"""
2063 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
2065 def GetNoAntiAliasing(*args
, **kwargs
):
2066 """GetNoAntiAliasing(self) -> bool"""
2067 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
2069 def GetDefaultEncoding(*args
, **kwargs
):
2071 GetDefaultEncoding() -> int
2073 Returns the encoding used for all fonts created with an encoding of
2074 ``wx.FONTENCODING_DEFAULT``.
2076 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
2078 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
2079 def SetDefaultEncoding(*args
, **kwargs
):
2081 SetDefaultEncoding(int encoding)
2083 Sets the default font encoding.
2085 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2087 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
2089 class FontPtr(Font
):
2090 def __init__(self
, this
):
2092 if not hasattr(self
,"thisown"): self
.thisown
= 0
2093 self
.__class
__ = Font
2094 _gdi_
.Font_swigregister(FontPtr
)
2096 def FontFromNativeInfo(*args
, **kwargs
):
2098 FontFromNativeInfo(NativeFontInfo info) -> Font
2100 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2102 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2103 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
2107 def FontFromNativeInfoString(*args
, **kwargs
):
2109 FontFromNativeInfoString(String info) -> Font
2111 Construct a `wx.Font` from the string representation of a
2112 `wx.NativeFontInfo` object.
2114 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2115 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
2119 def FFont(*args
, **kwargs
):
2121 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2122 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2124 A bit of a simpler way to create a `wx.Font` using flags instead of
2125 individual attribute settings. The value of flags can be a
2126 combination of the following:
2128 ============================ ==
2134 wx.FONTFLAG_ANTIALIASED
2135 wx.FONTFLAG_NOT_ANTIALIASED
2136 wx.FONTFLAG_UNDERLINED
2137 wx.FONTFLAG_STRIKETHROUGH
2138 ============================ ==
2140 :see: `wx.Font.__init__`
2142 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2143 val
= _gdi_
.new_FFont(*args
, **kwargs
)
2147 def FontFromPixelSize(*args
, **kwargs
):
2149 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2150 bool underlined=False, String face=wxEmptyString,
2151 int encoding=FONTENCODING_DEFAULT) -> Font
2153 Creates a font using a size in pixels rather than points. If there is
2154 platform API support for this then it is used, otherwise a font with
2155 the closest size is found using a binary search.
2157 :see: `wx.Font.__init__`
2159 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2160 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
2164 def FFontFromPixelSize(*args
, **kwargs
):
2166 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2167 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2169 Creates a font using a size in pixels rather than points. If there is
2170 platform API support for this then it is used, otherwise a font with
2171 the closest size is found using a binary search.
2173 :see: `wx.Font.__init__`, `wx.FFont`
2175 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2176 val
= _gdi_
.new_FFontFromPixelSize(*args
, **kwargs
)
2180 def Font_GetDefaultEncoding(*args
, **kwargs
):
2182 Font_GetDefaultEncoding() -> int
2184 Returns the encoding used for all fonts created with an encoding of
2185 ``wx.FONTENCODING_DEFAULT``.
2187 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
2189 def Font_SetDefaultEncoding(*args
, **kwargs
):
2191 Font_SetDefaultEncoding(int encoding)
2193 Sets the default font encoding.
2195 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2197 Font2
= wx
._deprecated
(FFont
, "Use `wx.FFont` instead.")
2198 #---------------------------------------------------------------------------
2200 class FontEnumerator(object):
2201 """Proxy of C++ FontEnumerator class"""
2203 return "<%s.%s; proxy of C++ wxPyFontEnumerator instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2204 def __init__(self
, *args
, **kwargs
):
2205 """__init__(self) -> FontEnumerator"""
2206 newobj
= _gdi_
.new_FontEnumerator(*args
, **kwargs
)
2207 self
.this
= newobj
.this
2210 self
._setCallbackInfo
(self
, FontEnumerator
, 0)
2212 def __del__(self
, destroy
=_gdi_
.delete_FontEnumerator
):
2215 if self
.thisown
: destroy(self
)
2218 def _setCallbackInfo(*args
, **kwargs
):
2219 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
2220 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
2222 def EnumerateFacenames(*args
, **kwargs
):
2223 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2224 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
2226 def EnumerateEncodings(*args
, **kwargs
):
2227 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2228 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
2230 def GetEncodings(*args
, **kwargs
):
2231 """GetEncodings(self) -> PyObject"""
2232 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
2234 def GetFacenames(*args
, **kwargs
):
2235 """GetFacenames(self) -> PyObject"""
2236 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
2239 class FontEnumeratorPtr(FontEnumerator
):
2240 def __init__(self
, this
):
2242 if not hasattr(self
,"thisown"): self
.thisown
= 0
2243 self
.__class
__ = FontEnumerator
2244 _gdi_
.FontEnumerator_swigregister(FontEnumeratorPtr
)
2246 #---------------------------------------------------------------------------
2248 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
2249 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
2250 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
2251 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
2252 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
2253 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
2254 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
2255 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
2256 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
2257 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
2258 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
2259 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
2260 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
2261 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
2262 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
2263 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
2264 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
2265 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
2266 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
2267 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
2268 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
2269 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
2270 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
2271 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
2272 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
2273 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
2274 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
2275 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
2276 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
2277 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
2278 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
2279 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
2280 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
2281 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
2282 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
2283 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
2284 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
2285 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
2286 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
2287 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
2288 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
2289 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
2290 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
2291 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
2292 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
2293 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
2294 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
2295 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
2296 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
2297 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
2298 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
2299 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
2300 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
2301 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
2302 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
2303 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
2304 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
2305 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
2306 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
2307 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
2308 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
2309 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
2310 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
2311 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
2312 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
2313 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
2314 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
2315 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
2316 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
2317 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
2318 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
2319 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
2320 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
2321 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
2322 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
2323 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
2324 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
2325 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2326 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2327 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2328 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2329 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2330 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2331 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2332 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2333 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2334 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2335 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2336 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2337 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2338 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2339 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2340 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2341 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2342 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2343 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2344 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2345 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2346 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2347 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2348 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2349 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2350 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2351 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2352 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2353 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2354 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2355 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2356 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2357 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2358 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2359 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2360 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2361 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2362 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2363 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2364 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2365 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2366 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2367 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2368 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2369 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2370 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2371 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2372 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2373 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2374 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2375 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2376 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2377 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2378 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2379 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2380 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2381 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2382 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2383 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2384 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2385 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2386 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2387 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2388 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2389 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2390 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2391 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2392 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2393 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2394 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2395 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2396 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2397 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2398 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2399 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2400 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2401 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2402 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2403 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2404 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2405 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2406 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2407 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2408 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2409 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2410 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2411 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2412 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2413 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2414 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2415 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2416 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2417 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2418 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2419 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2420 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2421 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2422 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2423 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2424 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2425 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2426 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2427 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2428 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2429 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2430 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2431 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2432 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2433 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2434 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2435 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2436 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2437 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2438 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2439 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2440 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2441 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2442 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2443 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2444 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2445 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2446 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2447 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2448 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2449 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2450 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2451 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2452 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2453 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2454 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2455 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2456 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2457 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2458 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2459 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2460 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2461 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2462 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2463 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2464 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2465 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2466 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2467 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2468 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2469 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2470 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2471 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2472 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2473 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2474 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2475 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2476 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2477 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2478 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2479 class LanguageInfo(object):
2480 """Proxy of C++ LanguageInfo class"""
2481 def __init__(self
): raise RuntimeError, "No constructor defined"
2483 return "<%s.%s; proxy of C++ wxLanguageInfo instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2484 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2485 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2486 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2488 class LanguageInfoPtr(LanguageInfo
):
2489 def __init__(self
, this
):
2491 if not hasattr(self
,"thisown"): self
.thisown
= 0
2492 self
.__class
__ = LanguageInfo
2493 _gdi_
.LanguageInfo_swigregister(LanguageInfoPtr
)
2495 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2496 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2497 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2498 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2499 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2500 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2501 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2502 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2503 class Locale(object):
2504 """Proxy of C++ Locale class"""
2506 return "<%s.%s; proxy of C++ wxLocale instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2507 def __init__(self
, *args
, **kwargs
):
2508 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2509 newobj
= _gdi_
.new_Locale(*args
, **kwargs
)
2510 self
.this
= newobj
.this
2513 def __del__(self
, destroy
=_gdi_
.delete_Locale
):
2516 if self
.thisown
: destroy(self
)
2519 def Init1(*args
, **kwargs
):
2521 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2522 bool bLoadDefault=True,
2523 bool bConvertEncoding=False) -> bool
2525 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2527 def Init2(*args
, **kwargs
):
2528 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2529 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2531 def Init(self
, *_args
, **_kwargs
):
2532 if type(_args
[0]) in [type(''), type(u
'')]:
2533 val
= self
.Init1(*_args
, **_kwargs
)
2535 val
= self
.Init2(*_args
, **_kwargs
)
2538 def GetSystemLanguage(*args
, **kwargs
):
2539 """GetSystemLanguage() -> int"""
2540 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2542 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2543 def GetSystemEncoding(*args
, **kwargs
):
2544 """GetSystemEncoding() -> int"""
2545 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2547 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2548 def GetSystemEncodingName(*args
, **kwargs
):
2549 """GetSystemEncodingName() -> String"""
2550 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2552 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2553 def IsOk(*args
, **kwargs
):
2554 """IsOk(self) -> bool"""
2555 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2557 def __nonzero__(self
): return self
.IsOk()
2558 def GetLocale(*args
, **kwargs
):
2559 """GetLocale(self) -> String"""
2560 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2562 def GetLanguage(*args
, **kwargs
):
2563 """GetLanguage(self) -> int"""
2564 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2566 def GetSysName(*args
, **kwargs
):
2567 """GetSysName(self) -> String"""
2568 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2570 def GetCanonicalName(*args
, **kwargs
):
2571 """GetCanonicalName(self) -> String"""
2572 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2574 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2575 """AddCatalogLookupPathPrefix(String prefix)"""
2576 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2578 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2579 def AddCatalog(*args
, **kwargs
):
2580 """AddCatalog(self, String szDomain) -> bool"""
2581 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2583 def IsLoaded(*args
, **kwargs
):
2584 """IsLoaded(self, String szDomain) -> bool"""
2585 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2587 def GetLanguageInfo(*args
, **kwargs
):
2588 """GetLanguageInfo(int lang) -> LanguageInfo"""
2589 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2591 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2592 def GetLanguageName(*args
, **kwargs
):
2593 """GetLanguageName(int lang) -> String"""
2594 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2596 GetLanguageName
= staticmethod(GetLanguageName
)
2597 def FindLanguageInfo(*args
, **kwargs
):
2598 """FindLanguageInfo(String locale) -> LanguageInfo"""
2599 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2601 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2602 def AddLanguage(*args
, **kwargs
):
2603 """AddLanguage(LanguageInfo info)"""
2604 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2606 AddLanguage
= staticmethod(AddLanguage
)
2607 def GetString(*args
, **kwargs
):
2608 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2609 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2611 def GetName(*args
, **kwargs
):
2612 """GetName(self) -> String"""
2613 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2616 class LocalePtr(Locale
):
2617 def __init__(self
, this
):
2619 if not hasattr(self
,"thisown"): self
.thisown
= 0
2620 self
.__class
__ = Locale
2621 _gdi_
.Locale_swigregister(LocalePtr
)
2623 def Locale_GetSystemLanguage(*args
, **kwargs
):
2624 """Locale_GetSystemLanguage() -> int"""
2625 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2627 def Locale_GetSystemEncoding(*args
, **kwargs
):
2628 """Locale_GetSystemEncoding() -> int"""
2629 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2631 def Locale_GetSystemEncodingName(*args
, **kwargs
):
2632 """Locale_GetSystemEncodingName() -> String"""
2633 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2635 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2636 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2637 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2639 def Locale_GetLanguageInfo(*args
, **kwargs
):
2640 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2641 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2643 def Locale_GetLanguageName(*args
, **kwargs
):
2644 """Locale_GetLanguageName(int lang) -> String"""
2645 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2647 def Locale_FindLanguageInfo(*args
, **kwargs
):
2648 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2649 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2651 def Locale_AddLanguage(*args
, **kwargs
):
2652 """Locale_AddLanguage(LanguageInfo info)"""
2653 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2656 def GetLocale(*args
, **kwargs
):
2657 """GetLocale() -> Locale"""
2658 return _gdi_
.GetLocale(*args
, **kwargs
)
2659 #---------------------------------------------------------------------------
2661 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2662 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2663 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2664 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2665 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2666 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2667 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2668 class EncodingConverter(_core
.Object
):
2669 """Proxy of C++ EncodingConverter class"""
2671 return "<%s.%s; proxy of C++ wxEncodingConverter instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2672 def __init__(self
, *args
, **kwargs
):
2673 """__init__(self) -> EncodingConverter"""
2674 newobj
= _gdi_
.new_EncodingConverter(*args
, **kwargs
)
2675 self
.this
= newobj
.this
2678 def __del__(self
, destroy
=_gdi_
.delete_EncodingConverter
):
2681 if self
.thisown
: destroy(self
)
2684 def Init(*args
, **kwargs
):
2685 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2686 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2688 def Convert(*args
, **kwargs
):
2689 """Convert(self, String input) -> String"""
2690 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2692 def GetPlatformEquivalents(*args
, **kwargs
):
2693 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2694 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2696 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
2697 def GetAllEquivalents(*args
, **kwargs
):
2698 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2699 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2701 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
2702 def CanConvert(*args
, **kwargs
):
2703 """CanConvert(int encIn, int encOut) -> bool"""
2704 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2706 CanConvert
= staticmethod(CanConvert
)
2707 def __nonzero__(self
): return self
.IsOk()
2709 class EncodingConverterPtr(EncodingConverter
):
2710 def __init__(self
, this
):
2712 if not hasattr(self
,"thisown"): self
.thisown
= 0
2713 self
.__class
__ = EncodingConverter
2714 _gdi_
.EncodingConverter_swigregister(EncodingConverterPtr
)
2716 def GetTranslation(*args
):
2718 GetTranslation(String str) -> String
2719 GetTranslation(String str, String strPlural, size_t n) -> String
2721 return _gdi_
.GetTranslation(*args
)
2723 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
2724 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2725 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2727 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
2728 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2729 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2731 def EncodingConverter_CanConvert(*args
, **kwargs
):
2732 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2733 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2735 #----------------------------------------------------------------------------
2736 # On MSW add the directory where the wxWidgets catalogs were installed
2737 # to the default catalog path.
2738 if wx
.Platform
== "__WXMSW__":
2740 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "locale")
2741 Locale
.AddCatalogLookupPathPrefix(_localedir
)
2744 #----------------------------------------------------------------------------
2746 #---------------------------------------------------------------------------
2748 class DC(_core
.Object
):
2750 A wx.DC is a device context onto which graphics and text can be
2751 drawn. It is intended to represent a number of output devices in a
2752 generic way, so a window can have a device context associated with it,
2753 and a printer also has a device context. In this way, the same piece
2754 of code may write to a number of different devices, if the device
2755 context is used as a parameter.
2757 Derived types of wxDC have documentation for specific features only,
2758 so refer to this section for most device context information.
2760 The wx.DC class is abstract and can not be instantiated, you must use
2761 one of the derived classes instead. Which one will depend on the
2762 situation in which it is used.
2764 def __init__(self
): raise RuntimeError, "No constructor defined"
2766 return "<%s.%s; proxy of C++ wxDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
2767 def __del__(self
, destroy
=_gdi_
.delete_DC
):
2770 if self
.thisown
: destroy(self
)
2773 # These have been deprecated in wxWidgets. Since they never
2774 # really did anything to begin with, just make them be NOPs.
2775 def BeginDrawing(self
): pass
2776 def EndDrawing(self
): pass
2778 def FloodFill(*args
, **kwargs
):
2780 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2782 Flood fills the device context starting from the given point, using
2783 the current brush colour, and using a style:
2785 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2786 the given colour is encountered.
2788 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2791 Returns False if the operation failed.
2793 Note: The present implementation for non-Windows platforms may fail to
2794 find colour borders if the pixels do not match the colour
2795 exactly. However the function will still return true.
2797 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
2799 def FloodFillPoint(*args
, **kwargs
):
2801 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2803 Flood fills the device context starting from the given point, using
2804 the current brush colour, and using a style:
2806 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2807 the given colour is encountered.
2809 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2812 Returns False if the operation failed.
2814 Note: The present implementation for non-Windows platforms may fail to
2815 find colour borders if the pixels do not match the colour
2816 exactly. However the function will still return true.
2818 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
2820 def GradientFillConcentric(*args
, **kwargs
):
2822 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
2825 Fill the area specified by rect with a radial gradient, starting from
2826 initialColour in the center of the circle and fading to destColour on
2827 the outside of the circle. The circleCenter argument is the relative
2828 coordinants of the center of the circle in the specified rect.
2830 Note: Currently this function is very slow, don't use it for real-time
2833 return _gdi_
.DC_GradientFillConcentric(*args
, **kwargs
)
2835 def GradientFillLinear(*args
, **kwargs
):
2837 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
2838 int nDirection=EAST)
2840 Fill the area specified by rect with a linear gradient, starting from
2841 initialColour and eventually fading to destColour. The nDirection
2842 parameter specifies the direction of the colour change, default is to
2843 use initialColour on the left part of the rectangle and destColour on
2846 return _gdi_
.DC_GradientFillLinear(*args
, **kwargs
)
2848 def GetPixel(*args
, **kwargs
):
2850 GetPixel(self, int x, int y) -> Colour
2852 Gets the colour at the specified location on the DC.
2854 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
2856 def GetPixelPoint(*args
, **kwargs
):
2857 """GetPixelPoint(self, Point pt) -> Colour"""
2858 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
2860 def DrawLine(*args
, **kwargs
):
2862 DrawLine(self, int x1, int y1, int x2, int y2)
2864 Draws a line from the first point to the second. The current pen is
2865 used for drawing the line. Note that the second point is *not* part of
2866 the line and is not drawn by this function (this is consistent with
2867 the behaviour of many other toolkits).
2869 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
2871 def DrawLinePoint(*args
, **kwargs
):
2873 DrawLinePoint(self, Point pt1, Point pt2)
2875 Draws a line from the first point to the second. The current pen is
2876 used for drawing the line. Note that the second point is *not* part of
2877 the line and is not drawn by this function (this is consistent with
2878 the behaviour of many other toolkits).
2880 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
2882 def CrossHair(*args
, **kwargs
):
2884 CrossHair(self, int x, int y)
2886 Displays a cross hair using the current pen. This is a vertical and
2887 horizontal line the height and width of the window, centred on the
2890 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
2892 def CrossHairPoint(*args
, **kwargs
):
2894 CrossHairPoint(self, Point pt)
2896 Displays a cross hair using the current pen. This is a vertical and
2897 horizontal line the height and width of the window, centred on the
2900 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
2902 def DrawArc(*args
, **kwargs
):
2904 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
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_DrawArc(*args
, **kwargs
)
2915 def DrawArcPoint(*args
, **kwargs
):
2917 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2919 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2920 the first point to the second. The current pen is used for the outline
2921 and the current brush for filling the shape.
2923 The arc is drawn in an anticlockwise direction from the start point to
2926 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
2928 def DrawCheckMark(*args
, **kwargs
):
2930 DrawCheckMark(self, int x, int y, int width, int height)
2932 Draws a check mark inside the given rectangle.
2934 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
2936 def DrawCheckMarkRect(*args
, **kwargs
):
2938 DrawCheckMarkRect(self, Rect rect)
2940 Draws a check mark inside the given rectangle.
2942 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
2944 def DrawEllipticArc(*args
, **kwargs
):
2946 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
2948 Draws an arc of an ellipse, with the given rectangle defining the
2949 bounds of the ellipse. The current pen is used for drawing the arc and
2950 the current brush is used for drawing the pie.
2952 The *start* and *end* parameters specify the start and end of the arc
2953 relative to the three-o'clock position from the center of the
2954 rectangle. Angles are specified in degrees (360 is a complete
2955 circle). Positive values mean counter-clockwise motion. If start is
2956 equal to end, a complete ellipse will be drawn.
2958 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
2960 def DrawEllipticArcPointSize(*args
, **kwargs
):
2962 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
2964 Draws an arc of an ellipse, with the given rectangle defining the
2965 bounds of the ellipse. The current pen is used for drawing the arc and
2966 the current brush is used for drawing the pie.
2968 The *start* and *end* parameters specify the start and end of the arc
2969 relative to the three-o'clock position from the center of the
2970 rectangle. Angles are specified in degrees (360 is a complete
2971 circle). Positive values mean counter-clockwise motion. If start is
2972 equal to end, a complete ellipse will be drawn.
2974 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
2976 def DrawPoint(*args
, **kwargs
):
2978 DrawPoint(self, int x, int y)
2980 Draws a point using the current pen.
2982 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
2984 def DrawPointPoint(*args
, **kwargs
):
2986 DrawPointPoint(self, Point pt)
2988 Draws a point using the current pen.
2990 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
2992 def DrawRectangle(*args
, **kwargs
):
2994 DrawRectangle(self, int x, int y, int width, int height)
2996 Draws a rectangle with the given top left corner, and with the given
2997 size. The current pen is used for the outline and the current brush
2998 for filling the shape.
3000 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
3002 def DrawRectangleRect(*args
, **kwargs
):
3004 DrawRectangleRect(self, Rect rect)
3006 Draws a rectangle with the given top left corner, and with the given
3007 size. The current pen is used for the outline and the current brush
3008 for filling the shape.
3010 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
3012 def DrawRectanglePointSize(*args
, **kwargs
):
3014 DrawRectanglePointSize(self, Point pt, Size sz)
3016 Draws a rectangle with the given top left corner, and with the given
3017 size. The current pen is used for the outline and the current brush
3018 for filling the shape.
3020 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
3022 def DrawRoundedRectangle(*args
, **kwargs
):
3024 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3026 Draws a rectangle with the given top left corner, and with the given
3027 size. The corners are quarter-circles using the given radius. The
3028 current pen is used for the outline and the current brush for filling
3031 If radius is positive, the value is assumed to be the radius of the
3032 rounded corner. If radius is negative, the absolute value is assumed
3033 to be the proportion of the smallest dimension of the rectangle. This
3034 means that the corner can be a sensible size relative to the size of
3035 the rectangle, and also avoids the strange effects X produces when the
3036 corners are too big for the rectangle.
3038 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
3040 def DrawRoundedRectangleRect(*args
, **kwargs
):
3042 DrawRoundedRectangleRect(self, Rect r, double radius)
3044 Draws a rectangle with the given top left corner, and with the given
3045 size. The corners are quarter-circles using the given radius. The
3046 current pen is used for the outline and the current brush for filling
3049 If radius is positive, the value is assumed to be the radius of the
3050 rounded corner. If radius is negative, the absolute value is assumed
3051 to be the proportion of the smallest dimension of the rectangle. This
3052 means that the corner can be a sensible size relative to the size of
3053 the rectangle, and also avoids the strange effects X produces when the
3054 corners are too big for the rectangle.
3056 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
3058 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
3060 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3062 Draws a rectangle with the given top left corner, and with the given
3063 size. The corners are quarter-circles using the given radius. The
3064 current pen is used for the outline and the current brush for filling
3067 If radius is positive, the value is assumed to be the radius of the
3068 rounded corner. If radius is negative, the absolute value is assumed
3069 to be the proportion of the smallest dimension of the rectangle. This
3070 means that the corner can be a sensible size relative to the size of
3071 the rectangle, and also avoids the strange effects X produces when the
3072 corners are too big for the rectangle.
3074 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
3076 def DrawCircle(*args
, **kwargs
):
3078 DrawCircle(self, int x, int y, int radius)
3080 Draws a circle with the given center point and radius. The current
3081 pen is used for the outline and the current brush for filling the
3084 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
3086 def DrawCirclePoint(*args
, **kwargs
):
3088 DrawCirclePoint(self, Point pt, int radius)
3090 Draws a circle with the given center point and radius. The current
3091 pen is used for the outline and the current brush for filling the
3094 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
3096 def DrawEllipse(*args
, **kwargs
):
3098 DrawEllipse(self, int x, int y, int width, int height)
3100 Draws an ellipse contained in the specified rectangle. The current pen
3101 is used for the outline and the current brush for filling the shape.
3103 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
3105 def DrawEllipseRect(*args
, **kwargs
):
3107 DrawEllipseRect(self, Rect rect)
3109 Draws an ellipse contained in the specified rectangle. The current pen
3110 is used for the outline and the current brush for filling the shape.
3112 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
3114 def DrawEllipsePointSize(*args
, **kwargs
):
3116 DrawEllipsePointSize(self, Point pt, Size sz)
3118 Draws an ellipse contained in the specified rectangle. The current pen
3119 is used for the outline and the current brush for filling the shape.
3121 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
3123 def DrawIcon(*args
, **kwargs
):
3125 DrawIcon(self, Icon icon, int x, int y)
3127 Draw an icon on the display (does nothing if the device context is
3128 PostScript). This can be the simplest way of drawing bitmaps on a
3131 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
3133 def DrawIconPoint(*args
, **kwargs
):
3135 DrawIconPoint(self, Icon icon, Point pt)
3137 Draw an icon on the display (does nothing if the device context is
3138 PostScript). This can be the simplest way of drawing bitmaps on a
3141 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
3143 def DrawBitmap(*args
, **kwargs
):
3145 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3147 Draw a bitmap on the device context at the specified point. If
3148 *transparent* is true and the bitmap has a transparency mask, (or
3149 alpha channel on the platforms that support it) then the bitmap will
3150 be drawn transparently.
3152 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
3154 def DrawBitmapPoint(*args
, **kwargs
):
3156 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3158 Draw a bitmap on the device context at the specified point. If
3159 *transparent* is true and the bitmap has a transparency mask, (or
3160 alpha channel on the platforms that support it) then the bitmap will
3161 be drawn transparently.
3163 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
3165 def DrawText(*args
, **kwargs
):
3167 DrawText(self, String text, int x, int y)
3169 Draws a text string at the specified point, using the current text
3170 font, and the current text foreground and background colours.
3172 The coordinates refer to the top-left corner of the rectangle bounding
3173 the string. See `GetTextExtent` for how to get the dimensions of a
3174 text string, which can be used to position the text more precisely.
3176 **NOTE**: under wxGTK the current logical function is used by this
3177 function but it is ignored by wxMSW. Thus, you should avoid using
3178 logical functions with this function in portable programs.
3180 return _gdi_
.DC_DrawText(*args
, **kwargs
)
3182 def DrawTextPoint(*args
, **kwargs
):
3184 DrawTextPoint(self, String text, Point pt)
3186 Draws a text string at the specified point, using the current text
3187 font, and the current text foreground and background colours.
3189 The coordinates refer to the top-left corner of the rectangle bounding
3190 the string. See `GetTextExtent` for how to get the dimensions of a
3191 text string, which can be used to position the text more precisely.
3193 **NOTE**: under wxGTK the current logical function is used by this
3194 function but it is ignored by wxMSW. Thus, you should avoid using
3195 logical functions with this function in portable programs.
3197 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
3199 def DrawRotatedText(*args
, **kwargs
):
3201 DrawRotatedText(self, String text, int x, int y, 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_DrawRotatedText(*args
, **kwargs
)
3212 def DrawRotatedTextPoint(*args
, **kwargs
):
3214 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3216 Draws the text rotated by *angle* degrees, if supported by the platform.
3218 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3219 function. In particular, a font different from ``wx.NORMAL_FONT``
3220 should be used as the it is not normally a TrueType
3221 font. ``wx.SWISS_FONT`` is an example of a font which is.
3223 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
3225 def Blit(*args
, **kwargs
):
3227 Blit(self, int xdest, int ydest, int width, int height, DC source,
3228 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3229 int xsrcMask=-1, int ysrcMask=-1) -> bool
3231 Copy from a source DC to this DC. Parameters specify the destination
3232 coordinates, size of area to copy, source DC, source coordinates,
3233 logical function, whether to use a bitmap mask, and mask source
3236 return _gdi_
.DC_Blit(*args
, **kwargs
)
3238 def BlitPointSize(*args
, **kwargs
):
3240 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3241 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3243 Copy from a source DC to this DC. Parameters specify the destination
3244 coordinates, size of area to copy, source DC, source coordinates,
3245 logical function, whether to use a bitmap mask, and mask source
3248 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
3250 def SetClippingRegion(*args
, **kwargs
):
3252 SetClippingRegion(self, int x, int y, int width, int height)
3254 Sets the clipping region for this device context to the intersection
3255 of the given region described by the parameters of this method and the
3256 previously set clipping region. You should call `DestroyClippingRegion`
3257 if you want to set the clipping region exactly to the region
3260 The clipping region is an area to which drawing is
3261 restricted. Possible uses for the clipping region are for clipping
3262 text or for speeding up window redraws when only a known area of the
3265 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
3267 def SetClippingRegionPointSize(*args
, **kwargs
):
3269 SetClippingRegionPointSize(self, Point pt, Size sz)
3271 Sets the clipping region for this device context to the intersection
3272 of the given region described by the parameters of this method and the
3273 previously set clipping region. You should call `DestroyClippingRegion`
3274 if you want to set the clipping region exactly to the region
3277 The clipping region is an area to which drawing is
3278 restricted. Possible uses for the clipping region are for clipping
3279 text or for speeding up window redraws when only a known area of the
3282 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
3284 def SetClippingRegionAsRegion(*args
, **kwargs
):
3286 SetClippingRegionAsRegion(self, Region region)
3288 Sets the clipping region for this device context to the intersection
3289 of the given region described by the parameters of this method and the
3290 previously set clipping region. You should call `DestroyClippingRegion`
3291 if you want to set the clipping region exactly to the region
3294 The clipping region is an area to which drawing is
3295 restricted. Possible uses for the clipping region are for clipping
3296 text or for speeding up window redraws when only a known area of the
3299 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
3301 def SetClippingRect(*args
, **kwargs
):
3303 SetClippingRect(self, Rect rect)
3305 Sets the clipping region for this device context to the intersection
3306 of the given region described by the parameters of this method and the
3307 previously set clipping region. You should call `DestroyClippingRegion`
3308 if you want to set the clipping region exactly to the region
3311 The clipping region is an area to which drawing is
3312 restricted. Possible uses for the clipping region are for clipping
3313 text or for speeding up window redraws when only a known area of the
3316 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
3318 def DrawLines(*args
, **kwargs
):
3320 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3322 Draws lines using a sequence of `wx.Point` objects, adding the
3323 optional offset coordinate. The current pen is used for drawing the
3326 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
3328 def DrawPolygon(*args
, **kwargs
):
3330 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3331 int fillStyle=ODDEVEN_RULE)
3333 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3334 the optional offset coordinate. The last argument specifies the fill
3335 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3337 The current pen is used for drawing the outline, and the current brush
3338 for filling the shape. Using a transparent brush suppresses
3339 filling. Note that wxWidgets automatically closes the first and last
3342 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3344 def DrawLabel(*args
, **kwargs
):
3346 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3349 Draw *text* within the specified rectangle, abiding by the alignment
3350 flags. Will additionally emphasize the character at *indexAccel* if
3353 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3355 def DrawImageLabel(*args
, **kwargs
):
3357 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3358 int indexAccel=-1) -> Rect
3360 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3361 drawing it) within the specified rectangle, abiding by the alignment
3362 flags. Will additionally emphasize the character at *indexAccel* if
3363 it is not -1. Returns the bounding rectangle.
3365 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3367 def DrawSpline(*args
, **kwargs
):
3369 DrawSpline(self, List points)
3371 Draws a spline between all given control points, (a list of `wx.Point`
3372 objects) using the current pen. The spline is drawn using a series of
3373 lines, using an algorithm taken from the X drawing program 'XFIG'.
3375 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3377 def Clear(*args
, **kwargs
):
3381 Clears the device context using the current background brush.
3383 return _gdi_
.DC_Clear(*args
, **kwargs
)
3385 def StartDoc(*args
, **kwargs
):
3387 StartDoc(self, String message) -> bool
3389 Starts a document (only relevant when outputting to a
3390 printer). *Message* is a message to show whilst printing.
3392 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3394 def EndDoc(*args
, **kwargs
):
3398 Ends a document (only relevant when outputting to a printer).
3400 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3402 def StartPage(*args
, **kwargs
):
3406 Starts a document page (only relevant when outputting to a printer).
3408 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3410 def EndPage(*args
, **kwargs
):
3414 Ends a document page (only relevant when outputting to a printer).
3416 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3418 def SetFont(*args
, **kwargs
):
3420 SetFont(self, Font font)
3422 Sets the current font for the DC. It must be a valid font, in
3423 particular you should not pass ``wx.NullFont`` to this method.
3425 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3427 def SetPen(*args
, **kwargs
):
3429 SetPen(self, Pen pen)
3431 Sets the current pen for the DC.
3433 If the argument is ``wx.NullPen``, the current pen is selected out of the
3434 device context, and the original pen restored.
3436 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3438 def SetBrush(*args
, **kwargs
):
3440 SetBrush(self, Brush brush)
3442 Sets the current brush for the DC.
3444 If the argument is ``wx.NullBrush``, the current brush is selected out
3445 of the device context, and the original brush restored, allowing the
3446 current brush to be destroyed safely.
3448 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3450 def SetBackground(*args
, **kwargs
):
3452 SetBackground(self, Brush brush)
3454 Sets the current background brush for the DC.
3456 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3458 def SetBackgroundMode(*args
, **kwargs
):
3460 SetBackgroundMode(self, int mode)
3462 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3463 determines whether text will be drawn with a background colour or
3466 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3468 def SetPalette(*args
, **kwargs
):
3470 SetPalette(self, Palette palette)
3472 If this is a window DC or memory DC, assigns the given palette to the
3473 window or bitmap associated with the DC. If the argument is
3474 ``wx.NullPalette``, the current palette is selected out of the device
3475 context, and the original palette restored.
3477 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3479 def DestroyClippingRegion(*args
, **kwargs
):
3481 DestroyClippingRegion(self)
3483 Destroys the current clipping region so that none of the DC is
3486 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3488 def GetClippingBox(*args
, **kwargs
):
3490 GetClippingBox() -> (x, y, width, height)
3492 Gets the rectangle surrounding the current clipping region.
3494 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3496 def GetClippingRect(*args
, **kwargs
):
3498 GetClippingRect(self) -> Rect
3500 Gets the rectangle surrounding the current clipping region.
3502 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3504 def GetCharHeight(*args
, **kwargs
):
3506 GetCharHeight(self) -> int
3508 Gets the character height of the currently set font.
3510 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3512 def GetCharWidth(*args
, **kwargs
):
3514 GetCharWidth(self) -> int
3516 Gets the average character width of the currently set font.
3518 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3520 def GetTextExtent(*args
, **kwargs
):
3522 GetTextExtent(wxString string) -> (width, height)
3524 Get the width and height of the text using the current font. Only
3525 works for single line strings.
3527 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3529 def GetFullTextExtent(*args
, **kwargs
):
3531 GetFullTextExtent(wxString string, Font font=None) ->
3532 (width, height, descent, externalLeading)
3534 Get the width, height, decent and leading of the text using the
3535 current or specified font. Only works for single line strings.
3537 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3539 def GetMultiLineTextExtent(*args
, **kwargs
):
3541 GetMultiLineTextExtent(wxString string, Font font=None) ->
3542 (width, height, descent, externalLeading)
3544 Get the width, height, decent and leading of the text using the
3545 current or specified font. Works for single as well as multi-line
3548 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3550 def GetPartialTextExtents(*args
, **kwargs
):
3552 GetPartialTextExtents(self, text) -> [widths]
3554 Returns a list of integers such that each value is the distance in
3555 pixels from the begining of text to the coresponding character of
3556 *text*. The generic version simply builds a running total of the widths
3557 of each character using GetTextExtent, however if the various
3558 platforms have a native API function that is faster or more accurate
3559 than the generic implementation then it will be used instead.
3561 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3563 def GetSize(*args
, **kwargs
):
3565 GetSize(self) -> Size
3567 This gets the horizontal and vertical resolution in device units. It
3568 can be used to scale graphics to fit the page. For example, if *maxX*
3569 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3570 used in your application, the following code will scale the graphic to
3571 fit on the printer page::
3574 scaleX = maxX*1.0 / w
3575 scaleY = maxY*1.0 / h
3576 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3579 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3581 def GetSizeTuple(*args
, **kwargs
):
3583 GetSizeTuple() -> (width, height)
3585 This gets the horizontal and vertical resolution in device units. It
3586 can be used to scale graphics to fit the page. For example, if *maxX*
3587 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3588 used in your application, the following code will scale the graphic to
3589 fit on the printer page::
3592 scaleX = maxX*1.0 / w
3593 scaleY = maxY*1.0 / h
3594 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3597 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3599 def GetSizeMM(*args
, **kwargs
):
3601 GetSizeMM(self) -> Size
3603 Get the DC size in milimeters.
3605 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3607 def GetSizeMMTuple(*args
, **kwargs
):
3609 GetSizeMMTuple() -> (width, height)
3611 Get the DC size in milimeters.
3613 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3615 def DeviceToLogicalX(*args
, **kwargs
):
3617 DeviceToLogicalX(self, int x) -> int
3619 Convert device X coordinate to logical coordinate, using the current
3622 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
3624 def DeviceToLogicalY(*args
, **kwargs
):
3626 DeviceToLogicalY(self, int y) -> int
3628 Converts device Y coordinate to logical coordinate, using the current
3631 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
3633 def DeviceToLogicalXRel(*args
, **kwargs
):
3635 DeviceToLogicalXRel(self, int x) -> int
3637 Convert device X coordinate to relative logical coordinate, using the
3638 current mapping mode but ignoring the x axis orientation. Use this
3639 function for converting a width, for example.
3641 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
3643 def DeviceToLogicalYRel(*args
, **kwargs
):
3645 DeviceToLogicalYRel(self, int y) -> int
3647 Convert device Y coordinate to relative logical coordinate, using the
3648 current mapping mode but ignoring the y axis orientation. Use this
3649 function for converting a height, for example.
3651 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
3653 def LogicalToDeviceX(*args
, **kwargs
):
3655 LogicalToDeviceX(self, int x) -> int
3657 Converts logical X coordinate to device coordinate, using the current
3660 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
3662 def LogicalToDeviceY(*args
, **kwargs
):
3664 LogicalToDeviceY(self, int y) -> int
3666 Converts logical Y coordinate to device coordinate, using the current
3669 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
3671 def LogicalToDeviceXRel(*args
, **kwargs
):
3673 LogicalToDeviceXRel(self, int x) -> int
3675 Converts logical X coordinate to relative device coordinate, using the
3676 current mapping mode but ignoring the x axis orientation. Use this for
3677 converting a width, for example.
3679 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
3681 def LogicalToDeviceYRel(*args
, **kwargs
):
3683 LogicalToDeviceYRel(self, int y) -> int
3685 Converts logical Y coordinate to relative device coordinate, using the
3686 current mapping mode but ignoring the y axis orientation. Use this for
3687 converting a height, for example.
3689 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
3691 def CanDrawBitmap(*args
, **kwargs
):
3692 """CanDrawBitmap(self) -> bool"""
3693 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
3695 def CanGetTextExtent(*args
, **kwargs
):
3696 """CanGetTextExtent(self) -> bool"""
3697 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
3699 def GetDepth(*args
, **kwargs
):
3701 GetDepth(self) -> int
3703 Returns the colour depth of the DC.
3705 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
3707 def GetPPI(*args
, **kwargs
):
3709 GetPPI(self) -> Size
3711 Resolution in Pixels per inch
3713 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
3715 def Ok(*args
, **kwargs
):
3719 Returns true if the DC is ok to use.
3721 return _gdi_
.DC_Ok(*args
, **kwargs
)
3723 def GetBackgroundMode(*args
, **kwargs
):
3725 GetBackgroundMode(self) -> int
3727 Returns the current background mode, either ``wx.SOLID`` or
3730 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
3732 def GetBackground(*args
, **kwargs
):
3734 GetBackground(self) -> Brush
3736 Gets the brush used for painting the background.
3738 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
3740 def GetBrush(*args
, **kwargs
):
3742 GetBrush(self) -> Brush
3744 Gets the current brush
3746 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
3748 def GetFont(*args
, **kwargs
):
3750 GetFont(self) -> Font
3752 Gets the current font
3754 return _gdi_
.DC_GetFont(*args
, **kwargs
)
3756 def GetPen(*args
, **kwargs
):
3760 Gets the current pen
3762 return _gdi_
.DC_GetPen(*args
, **kwargs
)
3764 def GetTextBackground(*args
, **kwargs
):
3766 GetTextBackground(self) -> Colour
3768 Gets the current text background colour
3770 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
3772 def GetTextForeground(*args
, **kwargs
):
3774 GetTextForeground(self) -> Colour
3776 Gets the current text foreground colour
3778 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
3780 def SetTextForeground(*args
, **kwargs
):
3782 SetTextForeground(self, Colour colour)
3784 Sets the current text foreground colour for the DC.
3786 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
3788 def SetTextBackground(*args
, **kwargs
):
3790 SetTextBackground(self, Colour colour)
3792 Sets the current text background colour for the DC.
3794 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
3796 def GetMapMode(*args
, **kwargs
):
3798 GetMapMode(self) -> int
3800 Gets the current *mapping mode* for the device context
3802 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
3804 def SetMapMode(*args
, **kwargs
):
3806 SetMapMode(self, int mode)
3808 The *mapping mode* of the device context defines the unit of
3809 measurement used to convert logical units to device units. The
3810 mapping mode can be one of the following:
3812 ================ =============================================
3813 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3815 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3816 wx.MM_METRIC Each logical unit is 1 mm.
3817 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3818 wx.MM_TEXT Each logical unit is 1 pixel.
3819 ================ =============================================
3822 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
3824 def GetUserScale(*args
, **kwargs
):
3826 GetUserScale(self) -> (xScale, yScale)
3828 Gets the current user scale factor (set by `SetUserScale`).
3830 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
3832 def SetUserScale(*args
, **kwargs
):
3834 SetUserScale(self, double x, double y)
3836 Sets the user scaling factor, useful for applications which require
3839 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
3841 def GetLogicalScale(*args
, **kwargs
):
3842 """GetLogicalScale() -> (xScale, yScale)"""
3843 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
3845 def SetLogicalScale(*args
, **kwargs
):
3846 """SetLogicalScale(self, double x, double y)"""
3847 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
3849 def GetLogicalOrigin(*args
, **kwargs
):
3850 """GetLogicalOrigin(self) -> Point"""
3851 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
3853 def GetLogicalOriginTuple(*args
, **kwargs
):
3854 """GetLogicalOriginTuple() -> (x,y)"""
3855 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
3857 def SetLogicalOrigin(*args
, **kwargs
):
3858 """SetLogicalOrigin(self, int x, int y)"""
3859 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
3861 def SetLogicalOriginPoint(*args
, **kwargs
):
3862 """SetLogicalOriginPoint(self, Point point)"""
3863 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
3865 def GetDeviceOrigin(*args
, **kwargs
):
3866 """GetDeviceOrigin(self) -> Point"""
3867 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
3869 def GetDeviceOriginTuple(*args
, **kwargs
):
3870 """GetDeviceOriginTuple() -> (x,y)"""
3871 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
3873 def SetDeviceOrigin(*args
, **kwargs
):
3874 """SetDeviceOrigin(self, int x, int y)"""
3875 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
3877 def SetDeviceOriginPoint(*args
, **kwargs
):
3878 """SetDeviceOriginPoint(self, Point point)"""
3879 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
3881 def SetAxisOrientation(*args
, **kwargs
):
3883 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3885 Sets the x and y axis orientation (i.e., the direction from lowest to
3886 highest values on the axis). The default orientation is the natural
3887 orientation, e.g. x axis from left to right and y axis from bottom up.
3889 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
3891 def GetLogicalFunction(*args
, **kwargs
):
3893 GetLogicalFunction(self) -> int
3895 Gets the current logical function (set by `SetLogicalFunction`).
3897 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
3899 def SetLogicalFunction(*args
, **kwargs
):
3901 SetLogicalFunction(self, int function)
3903 Sets the current logical function for the device context. This
3904 determines how a source pixel (from a pen or brush colour, or source
3905 device context if using `Blit`) combines with a destination pixel in
3906 the current device context.
3908 The possible values and their meaning in terms of source and
3909 destination pixel values are as follows:
3911 ================ ==========================
3913 wx.AND_INVERT (NOT src) AND dst
3914 wx.AND_REVERSE src AND (NOT dst)
3917 wx.EQUIV (NOT src) XOR dst
3919 wx.NAND (NOT src) OR (NOT dst)
3920 wx.NOR (NOT src) AND (NOT dst)
3923 wx.OR_INVERT (NOT src) OR dst
3924 wx.OR_REVERSE src OR (NOT dst)
3926 wx.SRC_INVERT NOT src
3928 ================ ==========================
3930 The default is wx.COPY, which simply draws with the current
3931 colour. The others combine the current colour and the background using
3932 a logical operation. wx.INVERT is commonly used for drawing rubber
3933 bands or moving outlines, since drawing twice reverts to the original
3937 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
3939 def ComputeScaleAndOrigin(*args
, **kwargs
):
3941 ComputeScaleAndOrigin(self)
3943 Performs all necessary computations for given platform and context
3944 type after each change of scale and origin parameters. Usually called
3945 automatically internally after such changes.
3948 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
3950 def SetOptimization(self
, optimize
):
3952 def GetOptimization(self
):
3955 SetOptimization
= wx
._deprecated
(SetOptimization
)
3956 GetOptimization
= wx
._deprecated
(GetOptimization
)
3958 def CalcBoundingBox(*args
, **kwargs
):
3960 CalcBoundingBox(self, int x, int y)
3962 Adds the specified point to the bounding box which can be retrieved
3963 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3965 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
3967 def CalcBoundingBoxPoint(*args
, **kwargs
):
3969 CalcBoundingBoxPoint(self, Point point)
3971 Adds the specified point to the bounding box which can be retrieved
3972 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3974 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
3976 def ResetBoundingBox(*args
, **kwargs
):
3978 ResetBoundingBox(self)
3980 Resets the bounding box: after a call to this function, the bounding
3981 box doesn't contain anything.
3983 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
3985 def MinX(*args
, **kwargs
):
3989 Gets the minimum horizontal extent used in drawing commands so far.
3991 return _gdi_
.DC_MinX(*args
, **kwargs
)
3993 def MaxX(*args
, **kwargs
):
3997 Gets the maximum horizontal extent used in drawing commands so far.
3999 return _gdi_
.DC_MaxX(*args
, **kwargs
)
4001 def MinY(*args
, **kwargs
):
4005 Gets the minimum vertical extent used in drawing commands so far.
4007 return _gdi_
.DC_MinY(*args
, **kwargs
)
4009 def MaxY(*args
, **kwargs
):
4013 Gets the maximum vertical extent used in drawing commands so far.
4015 return _gdi_
.DC_MaxY(*args
, **kwargs
)
4017 def GetBoundingBox(*args
, **kwargs
):
4019 GetBoundingBox() -> (x1,y1, x2,y2)
4021 Returns the min and max points used in drawing commands so far.
4023 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
4025 def __nonzero__(self
): return self
.Ok()
4026 def GetHDC(*args
, **kwargs
):
4027 """GetHDC(self) -> long"""
4028 return _gdi_
.DC_GetHDC(*args
, **kwargs
)
4030 def _DrawPointList(*args
, **kwargs
):
4031 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4032 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
4034 def _DrawLineList(*args
, **kwargs
):
4035 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4036 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
4038 def _DrawRectangleList(*args
, **kwargs
):
4039 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4040 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
4042 def _DrawEllipseList(*args
, **kwargs
):
4043 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4044 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
4046 def _DrawPolygonList(*args
, **kwargs
):
4047 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4048 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
4050 def _DrawTextList(*args
, **kwargs
):
4052 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4053 PyObject backgroundList) -> PyObject
4055 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
4057 def DrawPointList(self
, points
, pens
=None):
4059 Draw a list of points as quickly as possible.
4061 :param points: A sequence of 2-element sequences representing
4062 each point to draw, (x,y).
4063 :param pens: If None, then the current pen is used. If a
4064 single pen then it will be used for all points. If
4065 a list of pens then there should be one for each point
4070 elif isinstance(pens
, wx
.Pen
):
4072 elif len(pens
) != len(points
):
4073 raise ValueError('points and pens must have same length')
4074 return self
._DrawPointList
(points
, pens
, [])
4077 def DrawLineList(self
, lines
, pens
=None):
4079 Draw a list of lines as quickly as possible.
4081 :param lines: A sequence of 4-element sequences representing
4082 each line to draw, (x1,y1, x2,y2).
4083 :param pens: If None, then the current pen is used. If a
4084 single pen then it will be used for all lines. If
4085 a list of pens then there should be one for each line
4090 elif isinstance(pens
, wx
.Pen
):
4092 elif len(pens
) != len(lines
):
4093 raise ValueError('lines and pens must have same length')
4094 return self
._DrawLineList
(lines
, pens
, [])
4097 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
4099 Draw a list of rectangles as quickly as possible.
4101 :param rectangles: A sequence of 4-element sequences representing
4102 each rectangle to draw, (x,y, w,h).
4103 :param pens: If None, then the current pen is used. If a
4104 single pen then it will be used for all rectangles.
4105 If a list of pens then there should be one for each
4106 rectangle in rectangles.
4107 :param brushes: A brush or brushes to be used to fill the rectagles,
4108 with similar semantics as the pens parameter.
4112 elif isinstance(pens
, wx
.Pen
):
4114 elif len(pens
) != len(rectangles
):
4115 raise ValueError('rectangles and pens must have same length')
4118 elif isinstance(brushes
, wx
.Brush
):
4120 elif len(brushes
) != len(rectangles
):
4121 raise ValueError('rectangles and brushes must have same length')
4122 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
4125 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
4127 Draw a list of ellipses as quickly as possible.
4129 :param ellipses: A sequence of 4-element sequences representing
4130 each ellipse to draw, (x,y, w,h).
4131 :param pens: If None, then the current pen is used. If a
4132 single pen then it will be used for all ellipses.
4133 If a list of pens then there should be one for each
4134 ellipse in ellipses.
4135 :param brushes: A brush or brushes to be used to fill the ellipses,
4136 with similar semantics as the pens parameter.
4140 elif isinstance(pens
, wx
.Pen
):
4142 elif len(pens
) != len(ellipses
):
4143 raise ValueError('ellipses and pens must have same length')
4146 elif isinstance(brushes
, wx
.Brush
):
4148 elif len(brushes
) != len(ellipses
):
4149 raise ValueError('ellipses and brushes must have same length')
4150 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
4153 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
4155 Draw a list of polygons, each of which is a list of points.
4157 :param polygons: A sequence of sequences of sequences.
4158 [[(x1,y1),(x2,y2),(x3,y3)...],
4159 [(x1,y1),(x2,y2),(x3,y3)...]]
4161 :param pens: If None, then the current pen is used. If a
4162 single pen then it will be used for all polygons.
4163 If a list of pens then there should be one for each
4165 :param brushes: A brush or brushes to be used to fill the polygons,
4166 with similar semantics as the pens parameter.
4170 elif isinstance(pens
, wx
.Pen
):
4172 elif len(pens
) != len(polygons
):
4173 raise ValueError('polygons and pens must have same length')
4176 elif isinstance(brushes
, wx
.Brush
):
4178 elif len(brushes
) != len(polygons
):
4179 raise ValueError('polygons and brushes must have same length')
4180 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
4183 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
4185 Draw a list of strings using a list of coordinants for positioning each string.
4187 :param textList: A list of strings
4188 :param coords: A list of (x,y) positions
4189 :param foregrounds: A list of `wx.Colour` objects to use for the
4190 foregrounds of the strings.
4191 :param backgrounds: A list of `wx.Colour` objects to use for the
4192 backgrounds of the strings.
4194 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4195 If you want backgrounds to do anything.
4197 if type(textList
) == type(''):
4198 textList
= [textList
]
4199 elif len(textList
) != len(coords
):
4200 raise ValueError('textlist and coords must have same length')
4201 if foregrounds
is None:
4203 elif isinstance(foregrounds
, wx
.Colour
):
4204 foregrounds
= [foregrounds
]
4205 elif len(foregrounds
) != len(coords
):
4206 raise ValueError('foregrounds and coords must have same length')
4207 if backgrounds
is None:
4209 elif isinstance(backgrounds
, wx
.Colour
):
4210 backgrounds
= [backgrounds
]
4211 elif len(backgrounds
) != len(coords
):
4212 raise ValueError('backgrounds and coords must have same length')
4213 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
4217 def __init__(self
, this
):
4219 if not hasattr(self
,"thisown"): self
.thisown
= 0
4221 _gdi_
.DC_swigregister(DCPtr
)
4223 #---------------------------------------------------------------------------
4227 A memory device context provides a means to draw graphics onto a
4228 bitmap. A bitmap must be selected into the new memory DC before it may
4229 be used for anything. Typical usage is as follows::
4232 dc.SelectObject(bitmap)
4233 # draw on the dc usign any of the Draw methods
4234 dc.SelectObject(wx.NullBitmap)
4235 # the bitmap now contains wahtever was drawn upon it
4237 Note that the memory DC *must* be deleted (or the bitmap selected out
4238 of it) before a bitmap can be reselected into another memory DC.
4242 return "<%s.%s; proxy of C++ wxMemoryDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4243 def __init__(self
, *args
, **kwargs
):
4245 __init__(self) -> MemoryDC
4247 Constructs a new memory device context.
4249 Use the Ok member to test whether the constructor was successful in
4250 creating a usable device context. Don't forget to select a bitmap into
4251 the DC before drawing on it.
4253 newobj
= _gdi_
.new_MemoryDC(*args
, **kwargs
)
4254 self
.this
= newobj
.this
4257 def SelectObject(*args
, **kwargs
):
4259 SelectObject(self, Bitmap bitmap)
4261 Selects the bitmap into the device context, to use as the memory
4262 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4263 the DC, and therefore the bitmap, and also to use Blit to copy the
4266 If the argument is wx.NullBitmap (or some other uninitialised
4267 `wx.Bitmap`) the current bitmap is selected out of the device context,
4268 and the original bitmap restored, allowing the current bitmap to be
4271 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
4274 class MemoryDCPtr(MemoryDC
):
4275 def __init__(self
, this
):
4277 if not hasattr(self
,"thisown"): self
.thisown
= 0
4278 self
.__class
__ = MemoryDC
4279 _gdi_
.MemoryDC_swigregister(MemoryDCPtr
)
4281 def MemoryDCFromDC(*args
, **kwargs
):
4283 MemoryDCFromDC(DC oldDC) -> MemoryDC
4285 Creates a DC that is compatible with the oldDC.
4287 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
4291 #---------------------------------------------------------------------------
4293 BUFFER_VIRTUAL_AREA
= _gdi_
.BUFFER_VIRTUAL_AREA
4294 BUFFER_CLIENT_AREA
= _gdi_
.BUFFER_CLIENT_AREA
4295 class BufferedDC(MemoryDC
):
4297 This simple class provides a simple way to avoid flicker: when drawing
4298 on it, everything is in fact first drawn on an in-memory buffer (a
4299 `wx.Bitmap`) and then copied to the screen only once, when this object
4302 It can be used in the same way as any other device
4303 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
4304 want to use it in your EVT_PAINT handler, you should look at
4305 `wx.BufferedPaintDC`.
4309 return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4310 def __init__(self
, *args
):
4312 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4313 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4315 Constructs a buffered DC.
4317 newobj
= _gdi_
.new_BufferedDC(*args
)
4318 self
.this
= newobj
.this
4321 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
4323 def __del__(self
, destroy
=_gdi_
.delete_BufferedDC
):
4327 Copies everything drawn on the DC so far to the underlying DC
4328 associated with this object, if any.
4331 if self
.thisown
: destroy(self
)
4334 def UnMask(*args
, **kwargs
):
4338 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4339 can be effectively used once only). This is usually only called in
4342 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
4345 class BufferedDCPtr(BufferedDC
):
4346 def __init__(self
, this
):
4348 if not hasattr(self
,"thisown"): self
.thisown
= 0
4349 self
.__class
__ = BufferedDC
4350 _gdi_
.BufferedDC_swigregister(BufferedDCPtr
)
4352 class BufferedPaintDC(BufferedDC
):
4354 This is a subclass of `wx.BufferedDC` which can be used inside of an
4355 EVT_PAINT event handler. Just create an object of this class instead
4356 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4357 flicker. The only thing to watch out for is that if you are using this
4358 class together with `wx.ScrolledWindow`, you probably do **not** want
4359 to call `wx.Window.PrepareDC` on it as it already does this internally
4360 for the real underlying `wx.PaintDC`.
4362 If your window is already fully buffered in a `wx.Bitmap` then your
4363 EVT_PAINT handler can be as simple as just creating a
4364 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4365 automatically when it is destroyed. For example::
4367 def OnPaint(self, event):
4368 dc = wx.BufferedPaintDC(self, self.buffer)
4376 return "<%s.%s; proxy of C++ wxBufferedPaintDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4377 def __init__(self
, *args
, **kwargs
):
4379 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4381 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4382 provide the bitmap to be used for buffering or let this object create
4383 one internally (in the latter case, the size of the client part of the
4384 window is automatically used).
4388 newobj
= _gdi_
.new_BufferedPaintDC(*args
, **kwargs
)
4389 self
.this
= newobj
.this
4393 class BufferedPaintDCPtr(BufferedPaintDC
):
4394 def __init__(self
, this
):
4396 if not hasattr(self
,"thisown"): self
.thisown
= 0
4397 self
.__class
__ = BufferedPaintDC
4398 _gdi_
.BufferedPaintDC_swigregister(BufferedPaintDCPtr
)
4400 #---------------------------------------------------------------------------
4404 A wxScreenDC can be used to paint anywhere on the screen. This should
4405 normally be constructed as a temporary stack object; don't store a
4410 return "<%s.%s; proxy of C++ wxScreenDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4411 def __init__(self
, *args
, **kwargs
):
4413 __init__(self) -> ScreenDC
4415 A wxScreenDC can be used to paint anywhere on the screen. This should
4416 normally be constructed as a temporary stack object; don't store a
4420 newobj
= _gdi_
.new_ScreenDC(*args
, **kwargs
)
4421 self
.this
= newobj
.this
4424 def StartDrawingOnTopWin(*args
, **kwargs
):
4426 StartDrawingOnTopWin(self, Window window) -> bool
4428 Specify that the area of the screen to be drawn upon coincides with
4431 :see: `EndDrawingOnTop`
4433 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4435 def StartDrawingOnTop(*args
, **kwargs
):
4437 StartDrawingOnTop(self, Rect rect=None) -> bool
4439 Specify that the area is the given rectangle, or the whole screen if
4442 :see: `EndDrawingOnTop`
4444 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4446 def EndDrawingOnTop(*args
, **kwargs
):
4448 EndDrawingOnTop(self) -> bool
4450 Use this in conjunction with `StartDrawingOnTop` or
4451 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4452 top of existing windows. Without this, some window systems (such as X)
4453 only allow drawing to take place underneath other windows.
4455 You might use this pair of functions when implementing a drag feature,
4456 for example as in the `wx.SplitterWindow` implementation.
4458 These functions are probably obsolete since the X implementations
4459 allow drawing directly on the screen now. However, the fact that this
4460 function allows the screen to be refreshed afterwards may be useful
4461 to some applications.
4463 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4466 class ScreenDCPtr(ScreenDC
):
4467 def __init__(self
, this
):
4469 if not hasattr(self
,"thisown"): self
.thisown
= 0
4470 self
.__class
__ = ScreenDC
4471 _gdi_
.ScreenDC_swigregister(ScreenDCPtr
)
4473 #---------------------------------------------------------------------------
4477 A wx.ClientDC must be constructed if an application wishes to paint on
4478 the client area of a window from outside an EVT_PAINT event. This should
4479 normally be constructed as a temporary stack object; don't store a
4480 wx.ClientDC object long term.
4482 To draw on a window from within an EVT_PAINT handler, construct a
4483 `wx.PaintDC` object.
4485 To draw on the whole window including decorations, construct a
4486 `wx.WindowDC` object (Windows only).
4490 return "<%s.%s; proxy of C++ wxClientDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4491 def __init__(self
, *args
, **kwargs
):
4493 __init__(self, Window win) -> ClientDC
4495 Constructor. Pass the window on which you wish to paint.
4497 newobj
= _gdi_
.new_ClientDC(*args
, **kwargs
)
4498 self
.this
= newobj
.this
4502 class ClientDCPtr(ClientDC
):
4503 def __init__(self
, this
):
4505 if not hasattr(self
,"thisown"): self
.thisown
= 0
4506 self
.__class
__ = ClientDC
4507 _gdi_
.ClientDC_swigregister(ClientDCPtr
)
4509 #---------------------------------------------------------------------------
4513 A wx.PaintDC must be constructed if an application wishes to paint on
4514 the client area of a window from within an EVT_PAINT event
4515 handler. This should normally be constructed as a temporary stack
4516 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4517 handler, you **must** create a wx.PaintDC object within it even if you
4518 don't actually use it.
4520 Using wx.PaintDC within EVT_PAINT handlers is important because it
4521 automatically sets the clipping area to the damaged area of the
4522 window. Attempts to draw outside this area do not appear.
4524 To draw on a window from outside EVT_PAINT handlers, construct a
4525 `wx.ClientDC` object.
4529 return "<%s.%s; proxy of C++ wxPaintDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4530 def __init__(self
, *args
, **kwargs
):
4532 __init__(self, Window win) -> PaintDC
4534 Constructor. Pass the window on which you wish to paint.
4536 newobj
= _gdi_
.new_PaintDC(*args
, **kwargs
)
4537 self
.this
= newobj
.this
4541 class PaintDCPtr(PaintDC
):
4542 def __init__(self
, this
):
4544 if not hasattr(self
,"thisown"): self
.thisown
= 0
4545 self
.__class
__ = PaintDC
4546 _gdi_
.PaintDC_swigregister(PaintDCPtr
)
4548 #---------------------------------------------------------------------------
4552 A wx.WindowDC must be constructed if an application wishes to paint on
4553 the whole area of a window (client and decorations). This should
4554 normally be constructed as a temporary stack object; don't store a
4558 return "<%s.%s; proxy of C++ wxWindowDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4559 def __init__(self
, *args
, **kwargs
):
4561 __init__(self, Window win) -> WindowDC
4563 Constructor. Pass the window on which you wish to paint.
4565 newobj
= _gdi_
.new_WindowDC(*args
, **kwargs
)
4566 self
.this
= newobj
.this
4570 class WindowDCPtr(WindowDC
):
4571 def __init__(self
, this
):
4573 if not hasattr(self
,"thisown"): self
.thisown
= 0
4574 self
.__class
__ = WindowDC
4575 _gdi_
.WindowDC_swigregister(WindowDCPtr
)
4577 #---------------------------------------------------------------------------
4581 wx.MirrorDC is a simple wrapper class which is always associated with a
4582 real `wx.DC` object and either forwards all of its operations to it
4583 without changes (no mirroring takes place) or exchanges x and y
4584 coordinates which makes it possible to reuse the same code to draw a
4585 figure and its mirror -- i.e. reflection related to the diagonal line
4589 return "<%s.%s; proxy of C++ wxMirrorDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4590 def __init__(self
, *args
, **kwargs
):
4592 __init__(self, DC dc, bool mirror) -> MirrorDC
4594 Creates a mirrored DC associated with the real *dc*. Everything drawn
4595 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4598 newobj
= _gdi_
.new_MirrorDC(*args
, **kwargs
)
4599 self
.this
= newobj
.this
4603 class MirrorDCPtr(MirrorDC
):
4604 def __init__(self
, this
):
4606 if not hasattr(self
,"thisown"): self
.thisown
= 0
4607 self
.__class
__ = MirrorDC
4608 _gdi_
.MirrorDC_swigregister(MirrorDCPtr
)
4610 #---------------------------------------------------------------------------
4612 class PostScriptDC(DC
):
4613 """This is a `wx.DC` that can write to PostScript files on any platform."""
4615 return "<%s.%s; proxy of C++ wxPostScriptDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4616 def __init__(self
, *args
, **kwargs
):
4618 __init__(self, wxPrintData printData) -> PostScriptDC
4620 Constructs a PostScript printer device context from a `wx.PrintData`
4623 newobj
= _gdi_
.new_PostScriptDC(*args
, **kwargs
)
4624 self
.this
= newobj
.this
4627 def GetPrintData(*args
, **kwargs
):
4628 """GetPrintData(self) -> wxPrintData"""
4629 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
4631 def SetPrintData(*args
, **kwargs
):
4632 """SetPrintData(self, wxPrintData data)"""
4633 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
4635 def SetResolution(*args
, **kwargs
):
4637 SetResolution(int ppi)
4639 Set resolution (in pixels per inch) that will be used in PostScript
4640 output. Default is 720ppi.
4642 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4644 SetResolution
= staticmethod(SetResolution
)
4645 def GetResolution(*args
, **kwargs
):
4647 GetResolution() -> int
4649 Return resolution used in PostScript output.
4651 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4653 GetResolution
= staticmethod(GetResolution
)
4655 class PostScriptDCPtr(PostScriptDC
):
4656 def __init__(self
, this
):
4658 if not hasattr(self
,"thisown"): self
.thisown
= 0
4659 self
.__class
__ = PostScriptDC
4660 _gdi_
.PostScriptDC_swigregister(PostScriptDCPtr
)
4662 def PostScriptDC_SetResolution(*args
, **kwargs
):
4664 PostScriptDC_SetResolution(int ppi)
4666 Set resolution (in pixels per inch) that will be used in PostScript
4667 output. Default is 720ppi.
4669 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4671 def PostScriptDC_GetResolution(*args
, **kwargs
):
4673 PostScriptDC_GetResolution() -> int
4675 Return resolution used in PostScript output.
4677 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4679 #---------------------------------------------------------------------------
4681 class MetaFile(_core
.Object
):
4682 """Proxy of C++ MetaFile class"""
4684 return "<%s.%s; proxy of C++ wxMetaFile instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4685 def __init__(self
, *args
, **kwargs
):
4686 """__init__(self, String filename=EmptyString) -> MetaFile"""
4687 newobj
= _gdi_
.new_MetaFile(*args
, **kwargs
)
4688 self
.this
= newobj
.this
4691 def __del__(self
, destroy
=_gdi_
.delete_MetaFile
):
4694 if self
.thisown
: destroy(self
)
4697 def Ok(*args
, **kwargs
):
4698 """Ok(self) -> bool"""
4699 return _gdi_
.MetaFile_Ok(*args
, **kwargs
)
4701 def SetClipboard(*args
, **kwargs
):
4702 """SetClipboard(self, int width=0, int height=0) -> bool"""
4703 return _gdi_
.MetaFile_SetClipboard(*args
, **kwargs
)
4705 def GetSize(*args
, **kwargs
):
4706 """GetSize(self) -> Size"""
4707 return _gdi_
.MetaFile_GetSize(*args
, **kwargs
)
4709 def GetWidth(*args
, **kwargs
):
4710 """GetWidth(self) -> int"""
4711 return _gdi_
.MetaFile_GetWidth(*args
, **kwargs
)
4713 def GetHeight(*args
, **kwargs
):
4714 """GetHeight(self) -> int"""
4715 return _gdi_
.MetaFile_GetHeight(*args
, **kwargs
)
4717 def GetFileName(*args
, **kwargs
):
4718 """GetFileName(self) -> String"""
4719 return _gdi_
.MetaFile_GetFileName(*args
, **kwargs
)
4721 def __nonzero__(self
): return self
.Ok()
4723 class MetaFilePtr(MetaFile
):
4724 def __init__(self
, this
):
4726 if not hasattr(self
,"thisown"): self
.thisown
= 0
4727 self
.__class
__ = MetaFile
4728 _gdi_
.MetaFile_swigregister(MetaFilePtr
)
4730 class MetaFileDC(DC
):
4731 """Proxy of C++ MetaFileDC class"""
4733 return "<%s.%s; proxy of C++ wxMetaFileDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4734 def __init__(self
, *args
, **kwargs
):
4736 __init__(self, String filename=EmptyString, int width=0, int height=0,
4737 String description=EmptyString) -> MetaFileDC
4739 newobj
= _gdi_
.new_MetaFileDC(*args
, **kwargs
)
4740 self
.this
= newobj
.this
4743 def Close(*args
, **kwargs
):
4744 """Close(self) -> MetaFile"""
4745 return _gdi_
.MetaFileDC_Close(*args
, **kwargs
)
4748 class MetaFileDCPtr(MetaFileDC
):
4749 def __init__(self
, this
):
4751 if not hasattr(self
,"thisown"): self
.thisown
= 0
4752 self
.__class
__ = MetaFileDC
4753 _gdi_
.MetaFileDC_swigregister(MetaFileDCPtr
)
4755 class PrinterDC(DC
):
4756 """Proxy of C++ PrinterDC class"""
4758 return "<%s.%s; proxy of C++ wxPrinterDC instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4759 def __init__(self
, *args
, **kwargs
):
4760 """__init__(self, wxPrintData printData) -> PrinterDC"""
4761 newobj
= _gdi_
.new_PrinterDC(*args
, **kwargs
)
4762 self
.this
= newobj
.this
4766 class PrinterDCPtr(PrinterDC
):
4767 def __init__(self
, this
):
4769 if not hasattr(self
,"thisown"): self
.thisown
= 0
4770 self
.__class
__ = PrinterDC
4771 _gdi_
.PrinterDC_swigregister(PrinterDCPtr
)
4773 #---------------------------------------------------------------------------
4775 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
4776 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
4777 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
4778 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
4779 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
4780 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
4781 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
4782 class ImageList(_core
.Object
):
4783 """Proxy of C++ ImageList class"""
4785 return "<%s.%s; proxy of C++ wxImageList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4786 def __init__(self
, *args
, **kwargs
):
4787 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4788 newobj
= _gdi_
.new_ImageList(*args
, **kwargs
)
4789 self
.this
= newobj
.this
4792 def __del__(self
, destroy
=_gdi_
.delete_ImageList
):
4795 if self
.thisown
: destroy(self
)
4798 def Add(*args
, **kwargs
):
4799 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4800 return _gdi_
.ImageList_Add(*args
, **kwargs
)
4802 def AddWithColourMask(*args
, **kwargs
):
4803 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4804 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
4806 def AddIcon(*args
, **kwargs
):
4807 """AddIcon(self, Icon icon) -> int"""
4808 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
4810 def GetBitmap(*args
, **kwargs
):
4811 """GetBitmap(self, int index) -> Bitmap"""
4812 return _gdi_
.ImageList_GetBitmap(*args
, **kwargs
)
4814 def GetIcon(*args
, **kwargs
):
4815 """GetIcon(self, int index) -> Icon"""
4816 return _gdi_
.ImageList_GetIcon(*args
, **kwargs
)
4818 def Replace(*args
, **kwargs
):
4819 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
4820 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
4822 def Draw(*args
, **kwargs
):
4824 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4825 bool solidBackground=False) -> bool
4827 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
4829 def GetImageCount(*args
, **kwargs
):
4830 """GetImageCount(self) -> int"""
4831 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
4833 def Remove(*args
, **kwargs
):
4834 """Remove(self, int index) -> bool"""
4835 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
4837 def RemoveAll(*args
, **kwargs
):
4838 """RemoveAll(self) -> bool"""
4839 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
4841 def GetSize(*args
, **kwargs
):
4842 """GetSize() -> (width,height)"""
4843 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
4846 class ImageListPtr(ImageList
):
4847 def __init__(self
, this
):
4849 if not hasattr(self
,"thisown"): self
.thisown
= 0
4850 self
.__class
__ = ImageList
4851 _gdi_
.ImageList_swigregister(ImageListPtr
)
4853 #---------------------------------------------------------------------------
4855 class PenList(_core
.Object
):
4856 """Proxy of C++ PenList class"""
4857 def __init__(self
): raise RuntimeError, "No constructor defined"
4859 return "<%s.%s; proxy of C++ wxPenList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4860 def AddPen(*args
, **kwargs
):
4861 """AddPen(self, Pen pen)"""
4862 return _gdi_
.PenList_AddPen(*args
, **kwargs
)
4864 def FindOrCreatePen(*args
, **kwargs
):
4865 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
4866 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
4868 def RemovePen(*args
, **kwargs
):
4869 """RemovePen(self, Pen pen)"""
4870 return _gdi_
.PenList_RemovePen(*args
, **kwargs
)
4872 def GetCount(*args
, **kwargs
):
4873 """GetCount(self) -> int"""
4874 return _gdi_
.PenList_GetCount(*args
, **kwargs
)
4877 class PenListPtr(PenList
):
4878 def __init__(self
, this
):
4880 if not hasattr(self
,"thisown"): self
.thisown
= 0
4881 self
.__class
__ = PenList
4882 _gdi_
.PenList_swigregister(PenListPtr
)
4884 NORMAL_FONT
= cvar
.NORMAL_FONT
4885 SMALL_FONT
= cvar
.SMALL_FONT
4886 ITALIC_FONT
= cvar
.ITALIC_FONT
4887 SWISS_FONT
= cvar
.SWISS_FONT
4888 RED_PEN
= cvar
.RED_PEN
4889 CYAN_PEN
= cvar
.CYAN_PEN
4890 GREEN_PEN
= cvar
.GREEN_PEN
4891 BLACK_PEN
= cvar
.BLACK_PEN
4892 WHITE_PEN
= cvar
.WHITE_PEN
4893 TRANSPARENT_PEN
= cvar
.TRANSPARENT_PEN
4894 BLACK_DASHED_PEN
= cvar
.BLACK_DASHED_PEN
4895 GREY_PEN
= cvar
.GREY_PEN
4896 MEDIUM_GREY_PEN
= cvar
.MEDIUM_GREY_PEN
4897 LIGHT_GREY_PEN
= cvar
.LIGHT_GREY_PEN
4898 BLUE_BRUSH
= cvar
.BLUE_BRUSH
4899 GREEN_BRUSH
= cvar
.GREEN_BRUSH
4900 WHITE_BRUSH
= cvar
.WHITE_BRUSH
4901 BLACK_BRUSH
= cvar
.BLACK_BRUSH
4902 TRANSPARENT_BRUSH
= cvar
.TRANSPARENT_BRUSH
4903 CYAN_BRUSH
= cvar
.CYAN_BRUSH
4904 RED_BRUSH
= cvar
.RED_BRUSH
4905 GREY_BRUSH
= cvar
.GREY_BRUSH
4906 MEDIUM_GREY_BRUSH
= cvar
.MEDIUM_GREY_BRUSH
4907 LIGHT_GREY_BRUSH
= cvar
.LIGHT_GREY_BRUSH
4914 LIGHT_GREY
= cvar
.LIGHT_GREY
4915 STANDARD_CURSOR
= cvar
.STANDARD_CURSOR
4916 HOURGLASS_CURSOR
= cvar
.HOURGLASS_CURSOR
4917 CROSS_CURSOR
= cvar
.CROSS_CURSOR
4918 NullBitmap
= cvar
.NullBitmap
4919 NullIcon
= cvar
.NullIcon
4920 NullCursor
= cvar
.NullCursor
4921 NullPen
= cvar
.NullPen
4922 NullBrush
= cvar
.NullBrush
4923 NullPalette
= cvar
.NullPalette
4924 NullFont
= cvar
.NullFont
4925 NullColour
= cvar
.NullColour
4927 class BrushList(_core
.Object
):
4928 """Proxy of C++ BrushList class"""
4929 def __init__(self
): raise RuntimeError, "No constructor defined"
4931 return "<%s.%s; proxy of C++ wxBrushList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4932 def AddBrush(*args
, **kwargs
):
4933 """AddBrush(self, Brush brush)"""
4934 return _gdi_
.BrushList_AddBrush(*args
, **kwargs
)
4936 def FindOrCreateBrush(*args
, **kwargs
):
4937 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
4938 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
4940 def RemoveBrush(*args
, **kwargs
):
4941 """RemoveBrush(self, Brush brush)"""
4942 return _gdi_
.BrushList_RemoveBrush(*args
, **kwargs
)
4944 def GetCount(*args
, **kwargs
):
4945 """GetCount(self) -> int"""
4946 return _gdi_
.BrushList_GetCount(*args
, **kwargs
)
4949 class BrushListPtr(BrushList
):
4950 def __init__(self
, this
):
4952 if not hasattr(self
,"thisown"): self
.thisown
= 0
4953 self
.__class
__ = BrushList
4954 _gdi_
.BrushList_swigregister(BrushListPtr
)
4956 class ColourDatabase(_core
.Object
):
4957 """Proxy of C++ ColourDatabase class"""
4959 return "<%s.%s; proxy of C++ wxColourDatabase instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
4960 def __init__(self
, *args
, **kwargs
):
4961 """__init__(self) -> ColourDatabase"""
4962 newobj
= _gdi_
.new_ColourDatabase(*args
, **kwargs
)
4963 self
.this
= newobj
.this
4966 def __del__(self
, destroy
=_gdi_
.delete_ColourDatabase
):
4969 if self
.thisown
: destroy(self
)
4972 def Find(*args
, **kwargs
):
4973 """Find(self, String name) -> Colour"""
4974 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
4976 def FindName(*args
, **kwargs
):
4977 """FindName(self, Colour colour) -> String"""
4978 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
4981 def AddColour(*args
, **kwargs
):
4982 """AddColour(self, String name, Colour colour)"""
4983 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
4985 def Append(*args
, **kwargs
):
4986 """Append(self, String name, int red, int green, int blue)"""
4987 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
4990 class ColourDatabasePtr(ColourDatabase
):
4991 def __init__(self
, this
):
4993 if not hasattr(self
,"thisown"): self
.thisown
= 0
4994 self
.__class
__ = ColourDatabase
4995 _gdi_
.ColourDatabase_swigregister(ColourDatabasePtr
)
4997 class FontList(_core
.Object
):
4998 """Proxy of C++ FontList class"""
4999 def __init__(self
): raise RuntimeError, "No constructor defined"
5001 return "<%s.%s; proxy of C++ wxFontList instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5002 def AddFont(*args
, **kwargs
):
5003 """AddFont(self, Font font)"""
5004 return _gdi_
.FontList_AddFont(*args
, **kwargs
)
5006 def FindOrCreateFont(*args
, **kwargs
):
5008 FindOrCreateFont(self, int point_size, int family, int style, int weight,
5009 bool underline=False, String facename=EmptyString,
5010 int encoding=FONTENCODING_DEFAULT) -> Font
5012 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
5014 def RemoveFont(*args
, **kwargs
):
5015 """RemoveFont(self, Font font)"""
5016 return _gdi_
.FontList_RemoveFont(*args
, **kwargs
)
5018 def GetCount(*args
, **kwargs
):
5019 """GetCount(self) -> int"""
5020 return _gdi_
.FontList_GetCount(*args
, **kwargs
)
5023 class FontListPtr(FontList
):
5024 def __init__(self
, this
):
5026 if not hasattr(self
,"thisown"): self
.thisown
= 0
5027 self
.__class
__ = FontList
5028 _gdi_
.FontList_swigregister(FontListPtr
)
5030 #---------------------------------------------------------------------------
5032 NullColor
= NullColour
5033 #---------------------------------------------------------------------------
5035 class Effects(_core
.Object
):
5036 """Proxy of C++ Effects class"""
5038 return "<%s.%s; proxy of C++ wxEffects instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5039 def __init__(self
, *args
, **kwargs
):
5040 """__init__(self) -> Effects"""
5041 newobj
= _gdi_
.new_Effects(*args
, **kwargs
)
5042 self
.this
= newobj
.this
5045 def GetHighlightColour(*args
, **kwargs
):
5046 """GetHighlightColour(self) -> Colour"""
5047 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
5049 def GetLightShadow(*args
, **kwargs
):
5050 """GetLightShadow(self) -> Colour"""
5051 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
5053 def GetFaceColour(*args
, **kwargs
):
5054 """GetFaceColour(self) -> Colour"""
5055 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
5057 def GetMediumShadow(*args
, **kwargs
):
5058 """GetMediumShadow(self) -> Colour"""
5059 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
5061 def GetDarkShadow(*args
, **kwargs
):
5062 """GetDarkShadow(self) -> Colour"""
5063 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
5065 def SetHighlightColour(*args
, **kwargs
):
5066 """SetHighlightColour(self, Colour c)"""
5067 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
5069 def SetLightShadow(*args
, **kwargs
):
5070 """SetLightShadow(self, Colour c)"""
5071 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
5073 def SetFaceColour(*args
, **kwargs
):
5074 """SetFaceColour(self, Colour c)"""
5075 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
5077 def SetMediumShadow(*args
, **kwargs
):
5078 """SetMediumShadow(self, Colour c)"""
5079 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
5081 def SetDarkShadow(*args
, **kwargs
):
5082 """SetDarkShadow(self, Colour c)"""
5083 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
5085 def Set(*args
, **kwargs
):
5087 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
5088 Colour mediumShadow, Colour darkShadow)
5090 return _gdi_
.Effects_Set(*args
, **kwargs
)
5092 def DrawSunkenEdge(*args
, **kwargs
):
5093 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
5094 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
5096 def TileBitmap(*args
, **kwargs
):
5097 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
5098 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
5101 class EffectsPtr(Effects
):
5102 def __init__(self
, this
):
5104 if not hasattr(self
,"thisown"): self
.thisown
= 0
5105 self
.__class
__ = Effects
5106 _gdi_
.Effects_swigregister(EffectsPtr
)
5107 TheFontList
= cvar
.TheFontList
5108 ThePenList
= cvar
.ThePenList
5109 TheBrushList
= cvar
.TheBrushList
5110 TheColourDatabase
= cvar
.TheColourDatabase
5112 #---------------------------------------------------------------------------
5114 CONTROL_DISABLED
= _gdi_
.CONTROL_DISABLED
5115 CONTROL_FOCUSED
= _gdi_
.CONTROL_FOCUSED
5116 CONTROL_PRESSED
= _gdi_
.CONTROL_PRESSED
5117 CONTROL_ISDEFAULT
= _gdi_
.CONTROL_ISDEFAULT
5118 CONTROL_ISSUBMENU
= _gdi_
.CONTROL_ISSUBMENU
5119 CONTROL_EXPANDED
= _gdi_
.CONTROL_EXPANDED
5120 CONTROL_CURRENT
= _gdi_
.CONTROL_CURRENT
5121 CONTROL_SELECTED
= _gdi_
.CONTROL_SELECTED
5122 CONTROL_CHECKED
= _gdi_
.CONTROL_CHECKED
5123 CONTROL_CHECKABLE
= _gdi_
.CONTROL_CHECKABLE
5124 CONTROL_UNDETERMINED
= _gdi_
.CONTROL_UNDETERMINED
5125 CONTROL_FLAGS_MASK
= _gdi_
.CONTROL_FLAGS_MASK
5126 CONTROL_DIRTY
= _gdi_
.CONTROL_DIRTY
5127 class SplitterRenderParams(object):
5129 This is just a simple struct used as a return value of
5130 `wx.RendererNative.GetSplitterParams` and contains some platform
5131 specific metrics about splitters.
5133 * widthSash: the width of the splitter sash.
5134 * border: the width of the border of the splitter window.
5135 * isHotSensitive: ``True`` if the splitter changes its
5136 appearance when the mouse is over it.
5141 return "<%s.%s; proxy of C++ wxSplitterRenderParams instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5142 def __init__(self
, *args
, **kwargs
):
5144 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
5146 This is just a simple struct used as a return value of
5147 `wx.RendererNative.GetSplitterParams` and contains some platform
5148 specific metrics about splitters.
5150 * widthSash: the width of the splitter sash.
5151 * border: the width of the border of the splitter window.
5152 * isHotSensitive: ``True`` if the splitter changes its
5153 appearance when the mouse is over it.
5157 newobj
= _gdi_
.new_SplitterRenderParams(*args
, **kwargs
)
5158 self
.this
= newobj
.this
5161 def __del__(self
, destroy
=_gdi_
.delete_SplitterRenderParams
):
5164 if self
.thisown
: destroy(self
)
5167 widthSash
= property(_gdi_
.SplitterRenderParams_widthSash_get
)
5168 border
= property(_gdi_
.SplitterRenderParams_border_get
)
5169 isHotSensitive
= property(_gdi_
.SplitterRenderParams_isHotSensitive_get
)
5171 class SplitterRenderParamsPtr(SplitterRenderParams
):
5172 def __init__(self
, this
):
5174 if not hasattr(self
,"thisown"): self
.thisown
= 0
5175 self
.__class
__ = SplitterRenderParams
5176 _gdi_
.SplitterRenderParams_swigregister(SplitterRenderParamsPtr
)
5178 class RendererVersion(object):
5180 This simple struct represents the `wx.RendererNative` interface
5181 version and is only used as the return value of
5182 `wx.RendererNative.GetVersion`.
5185 return "<%s.%s; proxy of C++ wxRendererVersion instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5186 def __init__(self
, *args
, **kwargs
):
5188 __init__(self, int version_, int age_) -> RendererVersion
5190 This simple struct represents the `wx.RendererNative` interface
5191 version and is only used as the return value of
5192 `wx.RendererNative.GetVersion`.
5194 newobj
= _gdi_
.new_RendererVersion(*args
, **kwargs
)
5195 self
.this
= newobj
.this
5198 def __del__(self
, destroy
=_gdi_
.delete_RendererVersion
):
5201 if self
.thisown
: destroy(self
)
5204 Current_Version
= _gdi_
.RendererVersion_Current_Version
5205 Current_Age
= _gdi_
.RendererVersion_Current_Age
5206 def IsCompatible(*args
, **kwargs
):
5207 """IsCompatible(RendererVersion ver) -> bool"""
5208 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
5210 IsCompatible
= staticmethod(IsCompatible
)
5211 version
= property(_gdi_
.RendererVersion_version_get
)
5212 age
= property(_gdi_
.RendererVersion_age_get
)
5214 class RendererVersionPtr(RendererVersion
):
5215 def __init__(self
, this
):
5217 if not hasattr(self
,"thisown"): self
.thisown
= 0
5218 self
.__class
__ = RendererVersion
5219 _gdi_
.RendererVersion_swigregister(RendererVersionPtr
)
5221 def RendererVersion_IsCompatible(*args
, **kwargs
):
5222 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
5223 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
5225 class RendererNative(object):
5227 One of the design principles of wxWidgets is to use the native widgets
5228 on every platform in order to be as close to the native look and feel
5229 on every platform. However there are still cases when some generic
5230 widgets are needed for various reasons, but it can sometimes take a
5231 lot of messy work to make them conform to the native LnF.
5233 The wx.RendererNative class is a collection of functions that have
5234 platform-specific implementations for drawing certain parts of
5235 genereic controls in ways that are as close to the native look as
5239 def __init__(self
): raise RuntimeError, "No constructor defined"
5241 return "<%s.%s; proxy of C++ wxRendererNative instance at %s>" % (self
.__class
__.__module
__, self
.__class
__.__name
__, self
.this
,)
5242 def DrawHeaderButton(*args
, **kwargs
):
5244 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0)
5246 Draw the header control button (such as whar is used by `wx.ListCtrl`
5249 return _gdi_
.RendererNative_DrawHeaderButton(*args
, **kwargs
)
5251 def DrawTreeItemButton(*args
, **kwargs
):
5253 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
5255 Draw the expanded/collapsed icon for a tree control item.
5257 return _gdi_
.RendererNative_DrawTreeItemButton(*args
, **kwargs
)
5259 def DrawSplitterBorder(*args
, **kwargs
):
5261 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
5263 Draw the border for a sash window: this border must be such that the
5264 sash drawn by `DrawSplitterSash` blends into it well.
5266 return _gdi_
.RendererNative_DrawSplitterBorder(*args
, **kwargs
)
5268 def DrawSplitterSash(*args
, **kwargs
):
5270 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
5273 Draw a sash. The orient parameter defines whether the sash should be
5274 vertical or horizontal and how the position should be interpreted.
5276 return _gdi_
.RendererNative_DrawSplitterSash(*args
, **kwargs
)
5278 def DrawComboBoxDropButton(*args
, **kwargs
):
5280 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
5282 Draw a button like the one used by `wx.ComboBox` to show a drop down
5283 window. The usual appearance is a downwards pointing arrow.
5285 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
5286 ``wx.CONTROL_CURRENT`` bits set.
5288 return _gdi_
.RendererNative_DrawComboBoxDropButton(*args
, **kwargs
)
5290 def DrawDropArrow(*args
, **kwargs
):
5292 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
5294 Draw a drop down arrow that is suitable for use outside a combo
5295 box. Arrow will have a transparent background.
5297 ``rect`` is not entirely filled by the arrow. Instead, you should use
5298 bounding rectangle of a drop down button which arrow matches the size
5299 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
5300 ``wx.CONTROL_CURRENT`` bit set.
5302 return _gdi_
.RendererNative_DrawDropArrow(*args
, **kwargs
)
5304 def GetSplitterParams(*args
, **kwargs
):
5306 GetSplitterParams(self, Window win) -> SplitterRenderParams
5308 Get the splitter parameters, see `wx.SplitterRenderParams`.
5310 return _gdi_
.RendererNative_GetSplitterParams(*args
, **kwargs
)
5312 def Get(*args
, **kwargs
):
5314 Get() -> RendererNative
5316 Return the currently used renderer
5318 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
5320 Get
= staticmethod(Get
)
5321 def GetGeneric(*args
, **kwargs
):
5323 GetGeneric() -> RendererNative
5325 Return the generic implementation of the renderer. Under some
5326 platforms, this is the default renderer implementation, others have
5327 platform-specific default renderer which can be retrieved by calling
5330 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
5332 GetGeneric
= staticmethod(GetGeneric
)
5333 def GetDefault(*args
, **kwargs
):
5335 GetDefault() -> RendererNative
5337 Return the default (native) implementation for this platform -- this
5338 is also the one used by default but this may be changed by calling `Set`
5339 in which case the return value of this method may be different from
5340 the return value of `Get`.
5342 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
5344 GetDefault
= staticmethod(GetDefault
)
5345 def Set(*args
, **kwargs
):
5347 Set(RendererNative renderer) -> RendererNative
5349 Set the renderer to use, passing None reverts to using the default
5350 renderer. Returns the previous renderer used with Set or None.
5352 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
5354 Set
= staticmethod(Set
)
5355 def GetVersion(*args
, **kwargs
):
5357 GetVersion(self) -> RendererVersion
5359 Returns the version of the renderer. Will be used for ensuring
5360 compatibility of dynamically loaded renderers.
5362 return _gdi_
.RendererNative_GetVersion(*args
, **kwargs
)
5365 class RendererNativePtr(RendererNative
):
5366 def __init__(self
, this
):
5368 if not hasattr(self
,"thisown"): self
.thisown
= 0
5369 self
.__class
__ = RendererNative
5370 _gdi_
.RendererNative_swigregister(RendererNativePtr
)
5372 def RendererNative_Get(*args
, **kwargs
):
5374 RendererNative_Get() -> RendererNative
5376 Return the currently used renderer
5378 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
5380 def RendererNative_GetGeneric(*args
, **kwargs
):
5382 RendererNative_GetGeneric() -> RendererNative
5384 Return the generic implementation of the renderer. Under some
5385 platforms, this is the default renderer implementation, others have
5386 platform-specific default renderer which can be retrieved by calling
5389 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
5391 def RendererNative_GetDefault(*args
, **kwargs
):
5393 RendererNative_GetDefault() -> RendererNative
5395 Return the default (native) implementation for this platform -- this
5396 is also the one used by default but this may be changed by calling `Set`
5397 in which case the return value of this method may be different from
5398 the return value of `Get`.
5400 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
5402 def RendererNative_Set(*args
, **kwargs
):
5404 RendererNative_Set(RendererNative renderer) -> RendererNative
5406 Set the renderer to use, passing None reverts to using the default
5407 renderer. Returns the previous renderer used with Set or None.
5409 return _gdi_
.RendererNative_Set(*args
, **kwargs
)