1 # This file was created automatically by SWIG 1.3.29.
2 # Don't modify this file, modify the SWIG interface instead.
6 new_instancemethod
= new
.instancemethod
7 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
8 if (name
== "thisown"): return self
.this
.own(value
)
10 if type(value
).__name
__ == 'PySwigObject':
11 self
.__dict
__[name
] = value
13 method
= class_type
.__swig
_setmethods
__.get(name
,None)
14 if method
: return method(self
,value
)
15 if (not static
) or hasattr(self
,name
):
16 self
.__dict
__[name
] = value
18 raise AttributeError("You cannot add attributes to %s" % self
)
20 def _swig_setattr(self
,class_type
,name
,value
):
21 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
23 def _swig_getattr(self
,class_type
,name
):
24 if (name
== "thisown"): return self
.this
.own()
25 method
= class_type
.__swig
_getmethods
__.get(name
,None)
26 if method
: return method(self
)
27 raise AttributeError,name
30 try: strthis
= "proxy of " + self
.this
.__repr
__()
32 return "<%s.%s; %s >" % (self
.__class
__.__module
__, self
.__class
__.__name
__, strthis
,)
36 _object
= types
.ObjectType
38 except AttributeError:
44 def _swig_setattr_nondynamic_method(set):
45 def set_attr(self
,name
,value
):
46 if (name
== "thisown"): return self
.this
.own(value
)
47 if hasattr(self
,name
) or (name
== "this"):
50 raise AttributeError("You cannot add attributes to %s" % self
)
56 #---------------------------------------------------------------------------
58 class GDIObject(_core
.Object
):
59 """Proxy of C++ GDIObject class"""
60 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
62 def __init__(self
, *args
, **kwargs
):
63 """__init__(self) -> GDIObject"""
64 _gdi_
.GDIObject_swiginit(self
,_gdi_
.new_GDIObject(*args
, **kwargs
))
65 __swig_destroy__
= _gdi_
.delete_GDIObject
66 __del__
= lambda self
: None;
67 def IsNull(*args
, **kwargs
):
68 """IsNull(self) -> bool"""
69 return _gdi_
.GDIObject_IsNull(*args
, **kwargs
)
71 _gdi_
.GDIObject_swigregister(GDIObject
)
73 #---------------------------------------------------------------------------
75 C2S_NAME
= _gdi_
.C2S_NAME
76 C2S_CSS_SYNTAX
= _gdi_
.C2S_CSS_SYNTAX
77 C2S_HTML_SYNTAX
= _gdi_
.C2S_HTML_SYNTAX
78 ALPHA_TRANSPARENT
= _gdi_
.ALPHA_TRANSPARENT
79 ALPHA_OPAQUE
= _gdi_
.ALPHA_OPAQUE
80 class Colour(_core
.Object
):
82 A colour is an object representing a combination of Red, Green, and
83 Blue (RGB) intensity values, and is used to determine drawing colours,
84 window colours, etc. Valid RGB values are in the range 0 to 255.
86 In wxPython there are typemaps that will automatically convert from a
87 colour name, from a '#RRGGBB' colour hex value string, or from a 3
88 integer tuple to a wx.Colour object when calling C++ methods that
89 expect a wxColour. This means that the following are all
92 win.SetBackgroundColour(wxColour(0,0,255))
93 win.SetBackgroundColour('BLUE')
94 win.SetBackgroundColour('#0000FF')
95 win.SetBackgroundColour((0,0,255))
97 Additional colour names and their coresponding values can be added
98 using `wx.ColourDatabase`. Various system colours (as set in the
99 user's system preferences) can be retrieved with
100 `wx.SystemSettings.GetColour`.
103 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
104 __repr__
= _swig_repr
105 def __init__(self
, *args
, **kwargs
):
107 __init__(self, byte red=0, byte green=0, byte blue=0, byte alpha=ALPHA_OPAQUE) -> Colour
109 Constructs a colour from red, green and blue values.
111 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
114 _gdi_
.Colour_swiginit(self
,_gdi_
.new_Colour(*args
, **kwargs
))
115 __swig_destroy__
= _gdi_
.delete_Colour
116 __del__
= lambda self
: None;
117 def Red(*args
, **kwargs
):
121 Returns the red intensity.
123 return _gdi_
.Colour_Red(*args
, **kwargs
)
125 def Green(*args
, **kwargs
):
129 Returns the green intensity.
131 return _gdi_
.Colour_Green(*args
, **kwargs
)
133 def Blue(*args
, **kwargs
):
137 Returns the blue intensity.
139 return _gdi_
.Colour_Blue(*args
, **kwargs
)
141 def Alpha(*args
, **kwargs
):
145 Returns the Alpha value.
147 return _gdi_
.Colour_Alpha(*args
, **kwargs
)
149 def IsOk(*args
, **kwargs
):
153 Returns True if the colour object is valid (the colour has been
154 initialised with RGB values).
156 return _gdi_
.Colour_IsOk(*args
, **kwargs
)
159 def Set(*args
, **kwargs
):
161 Set(self, byte red, byte green, byte blue, byte alpha=ALPHA_OPAQUE)
163 Sets the RGB intensity values.
165 return _gdi_
.Colour_Set(*args
, **kwargs
)
167 def SetRGB(*args
, **kwargs
):
169 SetRGB(self, unsigned long colRGB)
171 Sets the RGB intensity values from a packed RGB value.
173 return _gdi_
.Colour_SetRGB(*args
, **kwargs
)
175 def SetFromName(*args
, **kwargs
):
177 SetFromName(self, String colourName)
179 Sets the RGB intensity values using a colour name listed in
180 ``wx.TheColourDatabase``.
182 return _gdi_
.Colour_SetFromName(*args
, **kwargs
)
184 def GetAsString(*args
, **kwargs
):
186 GetAsString(self, long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) -> String
188 Return the colour as a string. Acceptable flags are:
190 =================== ==================================
191 wx.C2S_NAME return colour name, when possible
192 wx.C2S_CSS_SYNTAX return colour in rgb(r,g,b) syntax
193 wx.C2S_HTML_SYNTAX return colour in #rrggbb syntax
194 =================== ==================================
196 return _gdi_
.Colour_GetAsString(*args
, **kwargs
)
198 def GetPixel(*args
, **kwargs
):
200 GetPixel(self) -> long
202 Returns a pixel value which is platform-dependent. On Windows, a
203 COLORREF is returned. On X, an allocated pixel value is returned. -1
204 is returned if the pixel is invalid (on X, unallocated).
206 return _gdi_
.Colour_GetPixel(*args
, **kwargs
)
208 def __eq__(*args
, **kwargs
):
210 __eq__(self, PyObject other) -> bool
212 Compare colours for equality.
214 return _gdi_
.Colour___eq__(*args
, **kwargs
)
216 def __ne__(*args
, **kwargs
):
218 __ne__(self, PyObject other) -> bool
220 Compare colours for inequality.
222 return _gdi_
.Colour___ne__(*args
, **kwargs
)
224 def Get(*args
, **kwargs
):
228 Returns the RGB intensity values as a tuple.
230 return _gdi_
.Colour_Get(*args
, **kwargs
)
232 def GetRGB(*args
, **kwargs
):
234 GetRGB(self) -> unsigned long
236 Return the colour as a packed RGB value
238 return _gdi_
.Colour_GetRGB(*args
, **kwargs
)
240 asTuple
= wx
._deprecated
(Get
, "asTuple is deprecated, use `Get` instead")
241 def __str__(self
): return str(self
.Get(True))
242 def __repr__(self
): return 'wx.Colour' + str(self
.Get(True))
243 def __len__(self
): return len(self
.Get())
244 def __getitem__(self
, index
): return self
.Get()[index
]
245 def __nonzero__(self
): return self
.IsOk()
246 __safe_for_unpickling__
= True
247 def __reduce__(self
): return (Colour
, self
.Get(True))
249 Pixel
= property(GetPixel
,doc
="See `GetPixel`")
250 RGB
= property(GetRGB
,SetRGB
,doc
="See `GetRGB` and `SetRGB`")
251 _gdi_
.Colour_swigregister(Colour
)
253 def NamedColour(*args
, **kwargs
):
255 NamedColour(String colorName) -> Colour
257 Constructs a colour object using a colour name listed in
258 ``wx.TheColourDatabase``.
260 val
= _gdi_
.new_NamedColour(*args
, **kwargs
)
263 def ColourRGB(*args
, **kwargs
):
265 ColourRGB(unsigned long colRGB) -> Colour
267 Constructs a colour from a packed RGB value.
269 val
= _gdi_
.new_ColourRGB(*args
, **kwargs
)
273 NamedColor
= NamedColour
276 class Palette(GDIObject
):
277 """Proxy of C++ Palette class"""
278 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
279 __repr__
= _swig_repr
280 def __init__(self
, *args
, **kwargs
):
281 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
282 _gdi_
.Palette_swiginit(self
,_gdi_
.new_Palette(*args
, **kwargs
))
283 __swig_destroy__
= _gdi_
.delete_Palette
284 __del__
= lambda self
: None;
285 def GetPixel(*args
, **kwargs
):
286 """GetPixel(self, byte red, byte green, byte blue) -> int"""
287 return _gdi_
.Palette_GetPixel(*args
, **kwargs
)
289 def GetRGB(*args
, **kwargs
):
290 """GetRGB(self, int pixel) -> (R,G,B)"""
291 return _gdi_
.Palette_GetRGB(*args
, **kwargs
)
293 def GetColoursCount(*args
, **kwargs
):
294 """GetColoursCount(self) -> int"""
295 return _gdi_
.Palette_GetColoursCount(*args
, **kwargs
)
297 def IsOk(*args
, **kwargs
):
298 """IsOk(self) -> bool"""
299 return _gdi_
.Palette_IsOk(*args
, **kwargs
)
302 def __nonzero__(self
): return self
.IsOk()
303 ColoursCount
= property(GetColoursCount
,doc
="See `GetColoursCount`")
304 _gdi_
.Palette_swigregister(Palette
)
306 #---------------------------------------------------------------------------
308 class Pen(GDIObject
):
309 """Proxy of C++ Pen class"""
310 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
311 __repr__
= _swig_repr
312 def __init__(self
, *args
, **kwargs
):
313 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
314 _gdi_
.Pen_swiginit(self
,_gdi_
.new_Pen(*args
, **kwargs
))
315 __swig_destroy__
= _gdi_
.delete_Pen
316 __del__
= lambda self
: None;
317 def GetCap(*args
, **kwargs
):
318 """GetCap(self) -> int"""
319 return _gdi_
.Pen_GetCap(*args
, **kwargs
)
321 def GetColour(*args
, **kwargs
):
322 """GetColour(self) -> Colour"""
323 return _gdi_
.Pen_GetColour(*args
, **kwargs
)
325 def GetJoin(*args
, **kwargs
):
326 """GetJoin(self) -> int"""
327 return _gdi_
.Pen_GetJoin(*args
, **kwargs
)
329 def GetStyle(*args
, **kwargs
):
330 """GetStyle(self) -> int"""
331 return _gdi_
.Pen_GetStyle(*args
, **kwargs
)
333 def GetWidth(*args
, **kwargs
):
334 """GetWidth(self) -> int"""
335 return _gdi_
.Pen_GetWidth(*args
, **kwargs
)
337 def IsOk(*args
, **kwargs
):
338 """IsOk(self) -> bool"""
339 return _gdi_
.Pen_IsOk(*args
, **kwargs
)
342 def SetCap(*args
, **kwargs
):
343 """SetCap(self, int cap_style)"""
344 return _gdi_
.Pen_SetCap(*args
, **kwargs
)
346 def SetColour(*args
, **kwargs
):
347 """SetColour(self, Colour colour)"""
348 return _gdi_
.Pen_SetColour(*args
, **kwargs
)
350 def SetJoin(*args
, **kwargs
):
351 """SetJoin(self, int join_style)"""
352 return _gdi_
.Pen_SetJoin(*args
, **kwargs
)
354 def SetStyle(*args
, **kwargs
):
355 """SetStyle(self, int style)"""
356 return _gdi_
.Pen_SetStyle(*args
, **kwargs
)
358 def SetWidth(*args
, **kwargs
):
359 """SetWidth(self, int width)"""
360 return _gdi_
.Pen_SetWidth(*args
, **kwargs
)
362 def SetDashes(*args
, **kwargs
):
363 """SetDashes(self, int dashes)"""
364 return _gdi_
.Pen_SetDashes(*args
, **kwargs
)
366 def GetDashes(*args
, **kwargs
):
367 """GetDashes(self) -> PyObject"""
368 return _gdi_
.Pen_GetDashes(*args
, **kwargs
)
370 def _SetDashes(*args
, **kwargs
):
371 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
372 return _gdi_
.Pen__SetDashes(*args
, **kwargs
)
374 def SetDashes(self
, dashes
):
376 Associate a list of dash lengths with the Pen.
378 self
._SetDashes
(self
, dashes
)
380 def GetDashCount(*args
, **kwargs
):
381 """GetDashCount(self) -> int"""
382 return _gdi_
.Pen_GetDashCount(*args
, **kwargs
)
384 DashCount
= property(GetDashCount
,doc
="See `GetDashCount`")
385 def __eq__(*args
, **kwargs
):
386 """__eq__(self, Pen other) -> bool"""
387 return _gdi_
.Pen___eq__(*args
, **kwargs
)
389 def __ne__(*args
, **kwargs
):
390 """__ne__(self, Pen other) -> bool"""
391 return _gdi_
.Pen___ne__(*args
, **kwargs
)
393 def __nonzero__(self
): return self
.IsOk()
394 Cap
= property(GetCap
,SetCap
,doc
="See `GetCap` and `SetCap`")
395 Colour
= property(GetColour
,SetColour
,doc
="See `GetColour` and `SetColour`")
396 Dashes
= property(GetDashes
,SetDashes
,doc
="See `GetDashes` and `SetDashes`")
397 Join
= property(GetJoin
,SetJoin
,doc
="See `GetJoin` and `SetJoin`")
398 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
399 Width
= property(GetWidth
,SetWidth
,doc
="See `GetWidth` and `SetWidth`")
400 _gdi_
.Pen_swigregister(Pen
)
402 #---------------------------------------------------------------------------
404 class Brush(GDIObject
):
406 A brush is a drawing tool for filling in areas. It is used for
407 painting the background of rectangles, ellipses, etc. when drawing on
408 a `wx.DC`. It has a colour and a style.
410 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
411 __repr__
= _swig_repr
412 def __init__(self
, *args
, **kwargs
):
414 __init__(self, Colour colour, int style=SOLID) -> Brush
416 Constructs a brush from a `wx.Colour` object and a style.
418 _gdi_
.Brush_swiginit(self
,_gdi_
.new_Brush(*args
, **kwargs
))
419 __swig_destroy__
= _gdi_
.delete_Brush
420 __del__
= lambda self
: None;
421 def SetColour(*args
, **kwargs
):
423 SetColour(self, Colour col)
425 Set the brush's `wx.Colour`.
427 return _gdi_
.Brush_SetColour(*args
, **kwargs
)
429 def SetStyle(*args
, **kwargs
):
431 SetStyle(self, int style)
433 Sets the style of the brush. See `__init__` for a listing of styles.
435 return _gdi_
.Brush_SetStyle(*args
, **kwargs
)
437 def SetStipple(*args
, **kwargs
):
439 SetStipple(self, Bitmap stipple)
441 Sets the stipple `wx.Bitmap`.
443 return _gdi_
.Brush_SetStipple(*args
, **kwargs
)
445 def GetColour(*args
, **kwargs
):
447 GetColour(self) -> Colour
449 Returns the `wx.Colour` of the brush.
451 return _gdi_
.Brush_GetColour(*args
, **kwargs
)
453 def GetStyle(*args
, **kwargs
):
455 GetStyle(self) -> int
457 Returns the style of the brush. See `__init__` for a listing of
460 return _gdi_
.Brush_GetStyle(*args
, **kwargs
)
462 def GetStipple(*args
, **kwargs
):
464 GetStipple(self) -> Bitmap
466 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
467 have a wx.STIPPLE style, then the return value may be non-None but an
468 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
470 return _gdi_
.Brush_GetStipple(*args
, **kwargs
)
472 def IsHatch(*args
, **kwargs
):
474 IsHatch(self) -> bool
476 Is the current style a hatch type?
478 return _gdi_
.Brush_IsHatch(*args
, **kwargs
)
480 def IsOk(*args
, **kwargs
):
484 Returns True if the brush is initialised and valid.
486 return _gdi_
.Brush_IsOk(*args
, **kwargs
)
489 def __nonzero__(self
): return self
.IsOk()
490 Colour
= property(GetColour
,SetColour
,doc
="See `GetColour` and `SetColour`")
491 Stipple
= property(GetStipple
,SetStipple
,doc
="See `GetStipple` and `SetStipple`")
492 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
493 _gdi_
.Brush_swigregister(Brush
)
495 def BrushFromBitmap(*args
, **kwargs
):
497 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
499 Constructs a stippled brush using a bitmap.
501 val
= _gdi_
.new_BrushFromBitmap(*args
, **kwargs
)
504 class Bitmap(GDIObject
):
506 The wx.Bitmap class encapsulates the concept of a platform-dependent
507 bitmap. It can be either monochrome or colour, and either loaded from
508 a file or created dynamically. A bitmap can be selected into a memory
509 device context (instance of `wx.MemoryDC`). This enables the bitmap to
510 be copied to a window or memory device context using `wx.DC.Blit`, or
511 to be used as a drawing surface.
513 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
514 __repr__
= _swig_repr
515 def __init__(self
, *args
, **kwargs
):
517 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
519 Loads a bitmap from a file.
521 _gdi_
.Bitmap_swiginit(self
,_gdi_
.new_Bitmap(*args
, **kwargs
))
522 __swig_destroy__
= _gdi_
.delete_Bitmap
523 __del__
= lambda self
: None;
524 def IsOk(*args
, **kwargs
):
525 """IsOk(self) -> bool"""
526 return _gdi_
.Bitmap_IsOk(*args
, **kwargs
)
529 def GetWidth(*args
, **kwargs
):
531 GetWidth(self) -> int
533 Gets the width of the bitmap in pixels.
535 return _gdi_
.Bitmap_GetWidth(*args
, **kwargs
)
537 def GetHeight(*args
, **kwargs
):
539 GetHeight(self) -> int
541 Gets the height of the bitmap in pixels.
543 return _gdi_
.Bitmap_GetHeight(*args
, **kwargs
)
545 def GetDepth(*args
, **kwargs
):
547 GetDepth(self) -> int
549 Gets the colour depth of the bitmap. A value of 1 indicates a
552 return _gdi_
.Bitmap_GetDepth(*args
, **kwargs
)
554 def GetSize(*args
, **kwargs
):
556 GetSize(self) -> Size
558 Get the size of the bitmap.
560 return _gdi_
.Bitmap_GetSize(*args
, **kwargs
)
562 def ConvertToImage(*args
, **kwargs
):
564 ConvertToImage(self) -> Image
566 Creates a platform-independent image from a platform-dependent
567 bitmap. This preserves mask information so that bitmaps and images can
568 be converted back and forth without loss in that respect.
570 return _gdi_
.Bitmap_ConvertToImage(*args
, **kwargs
)
572 def GetMask(*args
, **kwargs
):
574 GetMask(self) -> Mask
576 Gets the associated mask (if any) which may have been loaded from a
577 file or explpicitly set for the bitmap.
579 :see: `SetMask`, `wx.Mask`
582 return _gdi_
.Bitmap_GetMask(*args
, **kwargs
)
584 def SetMask(*args
, **kwargs
):
586 SetMask(self, Mask mask)
588 Sets the mask for this bitmap.
590 :see: `GetMask`, `wx.Mask`
593 return _gdi_
.Bitmap_SetMask(*args
, **kwargs
)
595 def SetMaskColour(*args
, **kwargs
):
597 SetMaskColour(self, Colour colour)
599 Create a Mask based on a specified colour in the Bitmap.
601 return _gdi_
.Bitmap_SetMaskColour(*args
, **kwargs
)
603 def GetSubBitmap(*args
, **kwargs
):
605 GetSubBitmap(self, Rect rect) -> Bitmap
607 Returns a sub-bitmap of the current one as long as the rect belongs
608 entirely to the bitmap. This function preserves bit depth and mask
611 return _gdi_
.Bitmap_GetSubBitmap(*args
, **kwargs
)
613 def SaveFile(*args
, **kwargs
):
615 SaveFile(self, String name, int type, Palette palette=None) -> bool
617 Saves a bitmap in the named file. See `__init__` for a description of
618 the ``type`` parameter.
620 return _gdi_
.Bitmap_SaveFile(*args
, **kwargs
)
622 def LoadFile(*args
, **kwargs
):
624 LoadFile(self, String name, int type) -> bool
626 Loads a bitmap from a file. See `__init__` for a description of the
629 return _gdi_
.Bitmap_LoadFile(*args
, **kwargs
)
631 def GetPalette(*args
, **kwargs
):
632 """GetPalette(self) -> Palette"""
633 return _gdi_
.Bitmap_GetPalette(*args
, **kwargs
)
635 def CopyFromIcon(*args
, **kwargs
):
636 """CopyFromIcon(self, Icon icon) -> bool"""
637 return _gdi_
.Bitmap_CopyFromIcon(*args
, **kwargs
)
639 def SetHeight(*args
, **kwargs
):
641 SetHeight(self, int height)
643 Set the height property (does not affect the existing bitmap data).
645 return _gdi_
.Bitmap_SetHeight(*args
, **kwargs
)
647 def SetWidth(*args
, **kwargs
):
649 SetWidth(self, int width)
651 Set the width property (does not affect the existing bitmap data).
653 return _gdi_
.Bitmap_SetWidth(*args
, **kwargs
)
655 def SetDepth(*args
, **kwargs
):
657 SetDepth(self, int depth)
659 Set the depth property (does not affect the existing bitmap data).
661 return _gdi_
.Bitmap_SetDepth(*args
, **kwargs
)
663 def SetSize(*args
, **kwargs
):
665 SetSize(self, Size size)
667 Set the bitmap size (does not affect the existing bitmap data).
669 return _gdi_
.Bitmap_SetSize(*args
, **kwargs
)
671 def CopyFromBuffer(*args
, **kwargs
):
673 CopyFromBuffer(self, buffer data)
675 Copy data from a RGB buffer object to replace the bitmap pixel data.
676 See `wx.BitmapFromBuffer` for more .
678 return _gdi_
.Bitmap_CopyFromBuffer(*args
, **kwargs
)
680 def CopyFromBufferRGBA(*args
, **kwargs
):
682 CopyFromBufferRGBA(self, buffer data)
684 Copy data from a RGBA buffer object to replace the bitmap pixel data.
685 See `wx.BitmapFromBufferRGBA` for more .
687 return _gdi_
.Bitmap_CopyFromBufferRGBA(*args
, **kwargs
)
689 def __nonzero__(self
): return self
.IsOk()
690 def __eq__(*args
, **kwargs
):
691 """__eq__(self, Bitmap other) -> bool"""
692 return _gdi_
.Bitmap___eq__(*args
, **kwargs
)
694 def __ne__(*args
, **kwargs
):
695 """__ne__(self, Bitmap other) -> bool"""
696 return _gdi_
.Bitmap___ne__(*args
, **kwargs
)
698 Depth
= property(GetDepth
,SetDepth
,doc
="See `GetDepth` and `SetDepth`")
699 Height
= property(GetHeight
,SetHeight
,doc
="See `GetHeight` and `SetHeight`")
700 Mask
= property(GetMask
,SetMask
,doc
="See `GetMask` and `SetMask`")
701 Palette
= property(GetPalette
,doc
="See `GetPalette`")
702 Size
= property(GetSize
,SetSize
,doc
="See `GetSize` and `SetSize`")
703 SubBitmap
= property(GetSubBitmap
,doc
="See `GetSubBitmap`")
704 Width
= property(GetWidth
,SetWidth
,doc
="See `GetWidth` and `SetWidth`")
705 _gdi_
.Bitmap_swigregister(Bitmap
)
707 def EmptyBitmap(*args
, **kwargs
):
709 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
711 Creates a new bitmap of the given size. A depth of -1 indicates the
712 depth of the current screen or visual. Some platforms only support 1
713 for monochrome and -1 for the current display depth.
715 val
= _gdi_
.new_EmptyBitmap(*args
, **kwargs
)
718 def BitmapFromIcon(*args
, **kwargs
):
720 BitmapFromIcon(Icon icon) -> Bitmap
722 Create a new bitmap from a `wx.Icon` object.
724 val
= _gdi_
.new_BitmapFromIcon(*args
, **kwargs
)
727 def BitmapFromImage(*args
, **kwargs
):
729 BitmapFromImage(Image image, int depth=-1) -> Bitmap
731 Creates bitmap object from a `wx.Image`. This has to be done to
732 actually display a `wx.Image` as you cannot draw an image directly on
733 a window. The resulting bitmap will use the provided colour depth (or
734 that of the current screen colour depth if depth is -1) which entails
735 that a colour reduction may have to take place.
737 val
= _gdi_
.new_BitmapFromImage(*args
, **kwargs
)
740 def BitmapFromXPMData(*args
, **kwargs
):
742 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
744 Construct a Bitmap from a list of strings formatted as XPM data.
746 val
= _gdi_
.new_BitmapFromXPMData(*args
, **kwargs
)
749 def BitmapFromBits(*args
, **kwargs
):
751 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
753 Creates a bitmap from an array of bits. You should only use this
754 function for monochrome bitmaps (depth 1) in portable programs: in
755 this case the bits parameter should contain an XBM image. For other
756 bit depths, the behaviour is platform dependent.
758 val
= _gdi_
.new_BitmapFromBits(*args
, **kwargs
)
762 def _BitmapFromBufferAlpha(*args
, **kwargs
):
763 """_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
764 return _gdi_
._BitmapFromBufferAlpha
(*args
, **kwargs
)
766 def _BitmapFromBuffer(*args
, **kwargs
):
767 """_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
768 return _gdi_
._BitmapFromBuffer
(*args
, **kwargs
)
769 def BitmapFromBuffer(width
, height
, dataBuffer
, alphaBuffer
=None):
771 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
772 parameter must be a Python object that implements the buffer
773 interface, such as a string, array, etc. The dataBuffer object is
774 expected to contain a series of RGB bytes and be width*height*3
775 bytes long. A buffer object can optionally be supplied for the
776 image's alpha channel data, and it is expected to be width*height
777 bytes long. On Windows the RGB values are 'premultiplied' by the
778 alpha values. (The other platforms do the multiplication
781 Unlike `wx.ImageFromBuffer` the bitmap created with this function
782 does not share the memory buffer with the buffer object. This is
783 because the native pixel buffer format varies on different
784 platforms, and so instead an efficient as possible copy of the
785 data is made from the buffer objects to the bitmap's native pixel
786 buffer. For direct access to a bitmap's pixel buffer see
787 `wx.NativePixelData` and `wx.AlphaPixelData`.
789 :see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
790 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
792 if alphaBuffer
is not None:
793 return _gdi_
._BitmapFromBufferAlpha
(width
, height
, dataBuffer
, alphaBuffer
)
795 return _gdi_
._BitmapFromBuffer
(width
, height
, dataBuffer
)
798 def _BitmapFromBufferRGBA(*args
, **kwargs
):
799 """_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
800 return _gdi_
._BitmapFromBufferRGBA
(*args
, **kwargs
)
801 def BitmapFromBufferRGBA(width
, height
, dataBuffer
):
803 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
804 parameter must be a Python object that implements the buffer
805 interface, such as a string, array, etc. The dataBuffer object is
806 expected to contain a series of RGBA bytes (red, green, blue and
807 alpha) and be width*height*4 bytes long. On Windows the RGB
808 values are 'premultiplied' by the alpha values. (The other
809 platforms do the multiplication themselves.)
811 Unlike `wx.ImageFromBuffer` the bitmap created with this function
812 does not share the memory buffer with the buffer object. This is
813 because the native pixel buffer format varies on different
814 platforms, and so instead an efficient as possible copy of the
815 data is made from the buffer object to the bitmap's native pixel
816 buffer. For direct access to a bitmap's pixel buffer see
817 `wx.NativePixelData` and `wx.AlphaPixelData`.
819 :see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
820 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
822 return _gdi_
._BitmapFromBufferRGBA
(width
, height
, dataBuffer
)
824 class PixelDataBase(object):
825 """Proxy of C++ PixelDataBase class"""
826 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
827 def __init__(self
): raise AttributeError, "No constructor defined"
828 __repr__
= _swig_repr
829 def GetOrigin(*args
, **kwargs
):
830 """GetOrigin(self) -> Point"""
831 return _gdi_
.PixelDataBase_GetOrigin(*args
, **kwargs
)
833 def GetWidth(*args
, **kwargs
):
834 """GetWidth(self) -> int"""
835 return _gdi_
.PixelDataBase_GetWidth(*args
, **kwargs
)
837 def GetHeight(*args
, **kwargs
):
838 """GetHeight(self) -> int"""
839 return _gdi_
.PixelDataBase_GetHeight(*args
, **kwargs
)
841 def GetSize(*args
, **kwargs
):
842 """GetSize(self) -> Size"""
843 return _gdi_
.PixelDataBase_GetSize(*args
, **kwargs
)
845 def GetRowStride(*args
, **kwargs
):
846 """GetRowStride(self) -> int"""
847 return _gdi_
.PixelDataBase_GetRowStride(*args
, **kwargs
)
849 Height
= property(GetHeight
,doc
="See `GetHeight`")
850 Origin
= property(GetOrigin
,doc
="See `GetOrigin`")
851 RowStride
= property(GetRowStride
,doc
="See `GetRowStride`")
852 Size
= property(GetSize
,doc
="See `GetSize`")
853 Width
= property(GetWidth
,doc
="See `GetWidth`")
854 _gdi_
.PixelDataBase_swigregister(PixelDataBase
)
856 class NativePixelData(PixelDataBase
):
857 """Proxy of C++ NativePixelData class"""
858 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
859 __repr__
= _swig_repr
860 def __init__(self
, *args
):
862 __init__(self, Bitmap bmp) -> NativePixelData
863 __init__(self, Bitmap bmp, Rect rect) -> NativePixelData
864 __init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
866 _gdi_
.NativePixelData_swiginit(self
,_gdi_
.new_NativePixelData(*args
))
867 __swig_destroy__
= _gdi_
.delete_NativePixelData
868 __del__
= lambda self
: None;
869 def GetPixels(*args
, **kwargs
):
870 """GetPixels(self) -> NativePixelData_Accessor"""
871 return _gdi_
.NativePixelData_GetPixels(*args
, **kwargs
)
873 def UseAlpha(*args
, **kwargs
):
875 return _gdi_
.NativePixelData_UseAlpha(*args
, **kwargs
)
877 def __nonzero__(*args
, **kwargs
):
878 """__nonzero__(self) -> bool"""
879 return _gdi_
.NativePixelData___nonzero__(*args
, **kwargs
)
883 Create and return an iterator object for this pixel data
884 object. (It's really a generator but I won't tell if you
887 width
= self
.GetWidth()
888 height
= self
.GetHeight()
889 pixels
= self
.GetPixels()
894 class PixelFacade(object):
897 def Set(self
, *args
, **kw
):
898 return pixels
.Set(*args
, **kw
)
900 return str(self
.Get())
902 return 'pixel(%d,%d): %s' % (x
,y
,self
.Get())
903 X
= property(lambda self
: x
)
904 Y
= property(lambda self
: y
)
907 for y
in xrange(height
):
908 for x
in xrange(width
):
914 pixels
.MoveTo(self
, 0, y
)
916 Pixels
= property(GetPixels
,doc
="See `GetPixels`")
917 _gdi_
.NativePixelData_swigregister(NativePixelData
)
919 class NativePixelData_Accessor(object):
920 """Proxy of C++ NativePixelData_Accessor class"""
921 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
922 __repr__
= _swig_repr
923 def __init__(self
, *args
):
925 __init__(self, NativePixelData data) -> NativePixelData_Accessor
926 __init__(self, Bitmap bmp, NativePixelData data) -> NativePixelData_Accessor
927 __init__(self) -> NativePixelData_Accessor
929 _gdi_
.NativePixelData_Accessor_swiginit(self
,_gdi_
.new_NativePixelData_Accessor(*args
))
930 __swig_destroy__
= _gdi_
.delete_NativePixelData_Accessor
931 __del__
= lambda self
: None;
932 def Reset(*args
, **kwargs
):
933 """Reset(self, NativePixelData data)"""
934 return _gdi_
.NativePixelData_Accessor_Reset(*args
, **kwargs
)
936 def IsOk(*args
, **kwargs
):
937 """IsOk(self) -> bool"""
938 return _gdi_
.NativePixelData_Accessor_IsOk(*args
, **kwargs
)
940 def nextPixel(*args
, **kwargs
):
941 """nextPixel(self)"""
942 return _gdi_
.NativePixelData_Accessor_nextPixel(*args
, **kwargs
)
944 def Offset(*args
, **kwargs
):
945 """Offset(self, NativePixelData data, int x, int y)"""
946 return _gdi_
.NativePixelData_Accessor_Offset(*args
, **kwargs
)
948 def OffsetX(*args
, **kwargs
):
949 """OffsetX(self, NativePixelData data, int x)"""
950 return _gdi_
.NativePixelData_Accessor_OffsetX(*args
, **kwargs
)
952 def OffsetY(*args
, **kwargs
):
953 """OffsetY(self, NativePixelData data, int y)"""
954 return _gdi_
.NativePixelData_Accessor_OffsetY(*args
, **kwargs
)
956 def MoveTo(*args
, **kwargs
):
957 """MoveTo(self, NativePixelData data, int x, int y)"""
958 return _gdi_
.NativePixelData_Accessor_MoveTo(*args
, **kwargs
)
960 def Set(*args
, **kwargs
):
961 """Set(self, byte red, byte green, byte blue)"""
962 return _gdi_
.NativePixelData_Accessor_Set(*args
, **kwargs
)
964 def Get(*args
, **kwargs
):
965 """Get(self) -> PyObject"""
966 return _gdi_
.NativePixelData_Accessor_Get(*args
, **kwargs
)
968 _gdi_
.NativePixelData_Accessor_swigregister(NativePixelData_Accessor
)
970 class AlphaPixelData(PixelDataBase
):
971 """Proxy of C++ AlphaPixelData class"""
972 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
973 __repr__
= _swig_repr
974 def __init__(self
, *args
):
976 __init__(self, Bitmap bmp) -> AlphaPixelData
977 __init__(self, Bitmap bmp, Rect rect) -> AlphaPixelData
978 __init__(self, Bitmap bmp, Point pt, Size sz) -> AlphaPixelData
980 _gdi_
.AlphaPixelData_swiginit(self
,_gdi_
.new_AlphaPixelData(*args
))
983 __swig_destroy__
= _gdi_
.delete_AlphaPixelData
984 __del__
= lambda self
: None;
985 def GetPixels(*args
, **kwargs
):
986 """GetPixels(self) -> AlphaPixelData_Accessor"""
987 return _gdi_
.AlphaPixelData_GetPixels(*args
, **kwargs
)
989 def UseAlpha(*args
, **kwargs
):
991 return _gdi_
.AlphaPixelData_UseAlpha(*args
, **kwargs
)
993 def __nonzero__(*args
, **kwargs
):
994 """__nonzero__(self) -> bool"""
995 return _gdi_
.AlphaPixelData___nonzero__(*args
, **kwargs
)
999 Create and return an iterator object for this pixel data
1000 object. (It's really a generator but I won't tell if you
1003 width
= self
.GetWidth()
1004 height
= self
.GetHeight()
1005 pixels
= self
.GetPixels()
1010 class PixelFacade(object):
1013 def Set(self
, *args
, **kw
):
1014 return pixels
.Set(*args
, **kw
)
1016 return str(self
.Get())
1018 return 'pixel(%d,%d): %s' % (x
,y
,self
.Get())
1019 X
= property(lambda self
: x
)
1020 Y
= property(lambda self
: y
)
1023 for y
in xrange(height
):
1024 for x
in xrange(width
):
1030 pixels
.MoveTo(self
, 0, y
)
1032 Pixels
= property(GetPixels
,doc
="See `GetPixels`")
1033 _gdi_
.AlphaPixelData_swigregister(AlphaPixelData
)
1035 class AlphaPixelData_Accessor(object):
1036 """Proxy of C++ AlphaPixelData_Accessor class"""
1037 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1038 __repr__
= _swig_repr
1039 def __init__(self
, *args
):
1041 __init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
1042 __init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
1043 __init__(self) -> AlphaPixelData_Accessor
1045 _gdi_
.AlphaPixelData_Accessor_swiginit(self
,_gdi_
.new_AlphaPixelData_Accessor(*args
))
1046 __swig_destroy__
= _gdi_
.delete_AlphaPixelData_Accessor
1047 __del__
= lambda self
: None;
1048 def Reset(*args
, **kwargs
):
1049 """Reset(self, AlphaPixelData data)"""
1050 return _gdi_
.AlphaPixelData_Accessor_Reset(*args
, **kwargs
)
1052 def IsOk(*args
, **kwargs
):
1053 """IsOk(self) -> bool"""
1054 return _gdi_
.AlphaPixelData_Accessor_IsOk(*args
, **kwargs
)
1056 def nextPixel(*args
, **kwargs
):
1057 """nextPixel(self)"""
1058 return _gdi_
.AlphaPixelData_Accessor_nextPixel(*args
, **kwargs
)
1060 def Offset(*args
, **kwargs
):
1061 """Offset(self, AlphaPixelData data, int x, int y)"""
1062 return _gdi_
.AlphaPixelData_Accessor_Offset(*args
, **kwargs
)
1064 def OffsetX(*args
, **kwargs
):
1065 """OffsetX(self, AlphaPixelData data, int x)"""
1066 return _gdi_
.AlphaPixelData_Accessor_OffsetX(*args
, **kwargs
)
1068 def OffsetY(*args
, **kwargs
):
1069 """OffsetY(self, AlphaPixelData data, int y)"""
1070 return _gdi_
.AlphaPixelData_Accessor_OffsetY(*args
, **kwargs
)
1072 def MoveTo(*args
, **kwargs
):
1073 """MoveTo(self, AlphaPixelData data, int x, int y)"""
1074 return _gdi_
.AlphaPixelData_Accessor_MoveTo(*args
, **kwargs
)
1076 def Set(*args
, **kwargs
):
1077 """Set(self, byte red, byte green, byte blue, byte alpha)"""
1078 return _gdi_
.AlphaPixelData_Accessor_Set(*args
, **kwargs
)
1080 def Get(*args
, **kwargs
):
1081 """Get(self) -> PyObject"""
1082 return _gdi_
.AlphaPixelData_Accessor_Get(*args
, **kwargs
)
1084 _gdi_
.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor
)
1086 class Mask(_core
.Object
):
1088 This class encapsulates a monochrome mask bitmap, where the masked
1089 area is black and the unmasked area is white. When associated with a
1090 bitmap and drawn in a device context, the unmasked area of the bitmap
1091 will be drawn, and the masked area will not be drawn.
1093 A mask may be associated with a `wx.Bitmap`. It is used in
1094 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
1095 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
1098 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1099 __repr__
= _swig_repr
1100 def __init__(self
, *args
, **kwargs
):
1102 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
1104 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
1105 that indicates the transparent portions of the mask. In other words,
1106 the pixels in ``bitmap`` that match ``colour`` will be the transparent
1107 portions of the mask. If no ``colour`` or an invalid ``colour`` is
1108 passed then BLACK is used.
1110 :see: `wx.Bitmap`, `wx.Colour`
1112 _gdi_
.Mask_swiginit(self
,_gdi_
.new_Mask(*args
, **kwargs
))
1113 __swig_destroy__
= _gdi_
.delete_Mask
1114 __del__
= lambda self
: None;
1115 _gdi_
.Mask_swigregister(Mask
)
1117 MaskColour
= wx
._deprecated
(Mask
, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
1118 class Icon(GDIObject
):
1119 """Proxy of C++ Icon class"""
1120 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1121 __repr__
= _swig_repr
1122 def __init__(self
, *args
, **kwargs
):
1123 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
1124 _gdi_
.Icon_swiginit(self
,_gdi_
.new_Icon(*args
, **kwargs
))
1125 __swig_destroy__
= _gdi_
.delete_Icon
1126 __del__
= lambda self
: None;
1127 def LoadFile(*args
, **kwargs
):
1128 """LoadFile(self, String name, int type) -> bool"""
1129 return _gdi_
.Icon_LoadFile(*args
, **kwargs
)
1131 def IsOk(*args
, **kwargs
):
1132 """IsOk(self) -> bool"""
1133 return _gdi_
.Icon_IsOk(*args
, **kwargs
)
1136 def GetWidth(*args
, **kwargs
):
1137 """GetWidth(self) -> int"""
1138 return _gdi_
.Icon_GetWidth(*args
, **kwargs
)
1140 def GetHeight(*args
, **kwargs
):
1141 """GetHeight(self) -> int"""
1142 return _gdi_
.Icon_GetHeight(*args
, **kwargs
)
1144 def GetDepth(*args
, **kwargs
):
1145 """GetDepth(self) -> int"""
1146 return _gdi_
.Icon_GetDepth(*args
, **kwargs
)
1148 def SetWidth(*args
, **kwargs
):
1149 """SetWidth(self, int w)"""
1150 return _gdi_
.Icon_SetWidth(*args
, **kwargs
)
1152 def SetHeight(*args
, **kwargs
):
1153 """SetHeight(self, int h)"""
1154 return _gdi_
.Icon_SetHeight(*args
, **kwargs
)
1156 def SetDepth(*args
, **kwargs
):
1157 """SetDepth(self, int d)"""
1158 return _gdi_
.Icon_SetDepth(*args
, **kwargs
)
1160 def CopyFromBitmap(*args
, **kwargs
):
1161 """CopyFromBitmap(self, Bitmap bmp)"""
1162 return _gdi_
.Icon_CopyFromBitmap(*args
, **kwargs
)
1164 def __nonzero__(self
): return self
.IsOk()
1165 Depth
= property(GetDepth
,SetDepth
,doc
="See `GetDepth` and `SetDepth`")
1166 Height
= property(GetHeight
,SetHeight
,doc
="See `GetHeight` and `SetHeight`")
1167 Width
= property(GetWidth
,SetWidth
,doc
="See `GetWidth` and `SetWidth`")
1168 _gdi_
.Icon_swigregister(Icon
)
1170 def EmptyIcon(*args
, **kwargs
):
1171 """EmptyIcon() -> Icon"""
1172 val
= _gdi_
.new_EmptyIcon(*args
, **kwargs
)
1175 def IconFromLocation(*args
, **kwargs
):
1176 """IconFromLocation(IconLocation loc) -> Icon"""
1177 val
= _gdi_
.new_IconFromLocation(*args
, **kwargs
)
1180 def IconFromBitmap(*args
, **kwargs
):
1181 """IconFromBitmap(Bitmap bmp) -> Icon"""
1182 val
= _gdi_
.new_IconFromBitmap(*args
, **kwargs
)
1185 def IconFromXPMData(*args
, **kwargs
):
1186 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
1187 val
= _gdi_
.new_IconFromXPMData(*args
, **kwargs
)
1190 class IconLocation(object):
1191 """Proxy of C++ IconLocation class"""
1192 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1193 __repr__
= _swig_repr
1194 def __init__(self
, *args
, **kwargs
):
1195 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
1196 _gdi_
.IconLocation_swiginit(self
,_gdi_
.new_IconLocation(*args
, **kwargs
))
1197 __swig_destroy__
= _gdi_
.delete_IconLocation
1198 __del__
= lambda self
: None;
1199 def IsOk(*args
, **kwargs
):
1200 """IsOk(self) -> bool"""
1201 return _gdi_
.IconLocation_IsOk(*args
, **kwargs
)
1203 def __nonzero__(self
): return self
.IsOk()
1204 def SetFileName(*args
, **kwargs
):
1205 """SetFileName(self, String filename)"""
1206 return _gdi_
.IconLocation_SetFileName(*args
, **kwargs
)
1208 def GetFileName(*args
, **kwargs
):
1209 """GetFileName(self) -> String"""
1210 return _gdi_
.IconLocation_GetFileName(*args
, **kwargs
)
1212 def SetIndex(*args
, **kwargs
):
1213 """SetIndex(self, int num)"""
1214 return _gdi_
.IconLocation_SetIndex(*args
, **kwargs
)
1216 def GetIndex(*args
, **kwargs
):
1217 """GetIndex(self) -> int"""
1218 return _gdi_
.IconLocation_GetIndex(*args
, **kwargs
)
1220 FileName
= property(GetFileName
,SetFileName
,doc
="See `GetFileName` and `SetFileName`")
1221 Index
= property(GetIndex
,SetIndex
,doc
="See `GetIndex` and `SetIndex`")
1222 _gdi_
.IconLocation_swigregister(IconLocation
)
1224 class IconBundle(object):
1225 """Proxy of C++ IconBundle class"""
1226 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1227 __repr__
= _swig_repr
1228 def __init__(self
, *args
, **kwargs
):
1229 """__init__(self) -> IconBundle"""
1230 _gdi_
.IconBundle_swiginit(self
,_gdi_
.new_IconBundle(*args
, **kwargs
))
1231 __swig_destroy__
= _gdi_
.delete_IconBundle
1232 __del__
= lambda self
: None;
1233 def IsOk(*args
, **kwargs
):
1234 """IsOk(self) -> bool"""
1235 return _gdi_
.IconBundle_IsOk(*args
, **kwargs
)
1237 def __nonzero__(self
): return self
.IsOk()
1238 def AddIcon(*args
, **kwargs
):
1240 AddIcon(self, Icon icon)
1242 Adds the icon to the collection, if the collection already contains an
1243 icon with the same width and height, it is replaced
1245 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
1247 def AddIconFromFile(*args
, **kwargs
):
1249 AddIconFromFile(self, String file, long type)
1251 Adds all the icons contained in the file to the collection, if the
1252 collection already contains icons with the same width and height, they
1255 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
1257 def GetIcon(*args
, **kwargs
):
1259 GetIcon(self, Size size) -> Icon
1261 Returns the icon with the given size; if no such icon exists, returns
1262 the icon with size wxSYS_ICON_[XY]; if no such icon exists, returns
1263 the first icon in the bundle
1265 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
1267 def GetIconOfExactSize(*args
, **kwargs
):
1269 GetIconOfExactSize(self, Size size) -> Icon
1271 Returns the icon exactly of the specified size or wxNullIcon if no
1272 icon of exactly given size are available.
1274 return _gdi_
.IconBundle_GetIconOfExactSize(*args
, **kwargs
)
1276 def GetIconCount(*args
, **kwargs
):
1278 GetIconCount(self) -> size_t
1280 return the number of available icons
1282 return _gdi_
.IconBundle_GetIconCount(*args
, **kwargs
)
1284 def GetIconByIndex(*args
, **kwargs
):
1286 GetIconByIndex(self, size_t n) -> Icon
1288 Return the icon at index (must be < GetIconCount())
1290 return _gdi_
.IconBundle_GetIconByIndex(*args
, **kwargs
)
1292 def IsEmpty(*args
, **kwargs
):
1294 IsEmpty(self) -> bool
1296 Check if we have any icons at all
1298 return _gdi_
.IconBundle_IsEmpty(*args
, **kwargs
)
1300 _gdi_
.IconBundle_swigregister(IconBundle
)
1302 def IconBundleFromFile(*args
, **kwargs
):
1303 """IconBundleFromFile(String file, long type) -> IconBundle"""
1304 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
1307 def IconBundleFromIcon(*args
, **kwargs
):
1308 """IconBundleFromIcon(Icon icon) -> IconBundle"""
1309 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
1312 class Cursor(GDIObject
):
1314 A cursor is a small bitmap usually used for denoting where the mouse
1315 pointer is, with a picture that might indicate the interpretation of a
1318 A single cursor object may be used in many windows (any subwindow
1319 type). The wxWindows convention is to set the cursor for a window, as
1320 in X, rather than to set it globally as in MS Windows, although a
1321 global `wx.SetCursor` function is also available for use on MS Windows.
1324 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1325 __repr__
= _swig_repr
1326 def __init__(self
, *args
, **kwargs
):
1328 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1330 Construct a Cursor from a file. Specify the type of file using
1331 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1334 _gdi_
.Cursor_swiginit(self
,_gdi_
.new_Cursor(*args
, **kwargs
))
1335 __swig_destroy__
= _gdi_
.delete_Cursor
1336 __del__
= lambda self
: None;
1337 def IsOk(*args
, **kwargs
):
1338 """IsOk(self) -> bool"""
1339 return _gdi_
.Cursor_IsOk(*args
, **kwargs
)
1342 def __nonzero__(self
): return self
.IsOk()
1343 _gdi_
.Cursor_swigregister(Cursor
)
1345 def StockCursor(*args
, **kwargs
):
1347 StockCursor(int id) -> Cursor
1349 Create a cursor using one of the stock cursors. Note that not all
1350 stock cursors are available on all platforms.
1352 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
1355 def CursorFromImage(*args
, **kwargs
):
1357 CursorFromImage(Image image) -> Cursor
1359 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1360 for setting the transparent portions of the cursor.
1362 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
1365 #---------------------------------------------------------------------------
1367 OutRegion
= _gdi_
.OutRegion
1368 PartRegion
= _gdi_
.PartRegion
1369 InRegion
= _gdi_
.InRegion
1370 class Region(GDIObject
):
1371 """Proxy of C++ Region class"""
1372 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1373 __repr__
= _swig_repr
1374 def __init__(self
, *args
, **kwargs
):
1375 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1376 _gdi_
.Region_swiginit(self
,_gdi_
.new_Region(*args
, **kwargs
))
1377 __swig_destroy__
= _gdi_
.delete_Region
1378 __del__
= lambda self
: None;
1379 def Clear(*args
, **kwargs
):
1381 return _gdi_
.Region_Clear(*args
, **kwargs
)
1383 def Offset(*args
, **kwargs
):
1384 """Offset(self, int x, int y) -> bool"""
1385 return _gdi_
.Region_Offset(*args
, **kwargs
)
1387 def Contains(*args
, **kwargs
):
1388 """Contains(self, int x, int y) -> int"""
1389 return _gdi_
.Region_Contains(*args
, **kwargs
)
1391 def ContainsPoint(*args
, **kwargs
):
1392 """ContainsPoint(self, Point pt) -> int"""
1393 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
1395 def ContainsRect(*args
, **kwargs
):
1396 """ContainsRect(self, Rect rect) -> int"""
1397 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
1399 def ContainsRectDim(*args
, **kwargs
):
1400 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1401 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
1403 def GetBox(*args
, **kwargs
):
1404 """GetBox(self) -> Rect"""
1405 return _gdi_
.Region_GetBox(*args
, **kwargs
)
1407 def Intersect(*args
, **kwargs
):
1408 """Intersect(self, int x, int y, int width, int height) -> bool"""
1409 return _gdi_
.Region_Intersect(*args
, **kwargs
)
1411 def IntersectRect(*args
, **kwargs
):
1412 """IntersectRect(self, Rect rect) -> bool"""
1413 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
1415 def IntersectRegion(*args
, **kwargs
):
1416 """IntersectRegion(self, Region region) -> bool"""
1417 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
1419 def IsEmpty(*args
, **kwargs
):
1420 """IsEmpty(self) -> bool"""
1421 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
1423 def IsEqual(*args
, **kwargs
):
1424 """IsEqual(self, Region region) -> bool"""
1425 return _gdi_
.Region_IsEqual(*args
, **kwargs
)
1427 def Union(*args
, **kwargs
):
1428 """Union(self, int x, int y, int width, int height) -> bool"""
1429 return _gdi_
.Region_Union(*args
, **kwargs
)
1431 def UnionRect(*args
, **kwargs
):
1432 """UnionRect(self, Rect rect) -> bool"""
1433 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1435 def UnionRegion(*args
, **kwargs
):
1436 """UnionRegion(self, Region region) -> bool"""
1437 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1439 def Subtract(*args
, **kwargs
):
1440 """Subtract(self, int x, int y, int width, int height) -> bool"""
1441 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1443 def SubtractRect(*args
, **kwargs
):
1444 """SubtractRect(self, Rect rect) -> bool"""
1445 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1447 def SubtractRegion(*args
, **kwargs
):
1448 """SubtractRegion(self, Region region) -> bool"""
1449 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1451 def Xor(*args
, **kwargs
):
1452 """Xor(self, int x, int y, int width, int height) -> bool"""
1453 return _gdi_
.Region_Xor(*args
, **kwargs
)
1455 def XorRect(*args
, **kwargs
):
1456 """XorRect(self, Rect rect) -> bool"""
1457 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1459 def XorRegion(*args
, **kwargs
):
1460 """XorRegion(self, Region region) -> bool"""
1461 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1463 def ConvertToBitmap(*args
, **kwargs
):
1464 """ConvertToBitmap(self) -> Bitmap"""
1465 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1467 def UnionBitmap(*args
, **kwargs
):
1468 """UnionBitmap(self, Bitmap bmp) -> bool"""
1469 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1471 def UnionBitmapColour(*args
, **kwargs
):
1472 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1473 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1475 Box
= property(GetBox
,doc
="See `GetBox`")
1476 _gdi_
.Region_swigregister(Region
)
1478 def RegionFromBitmap(*args
, **kwargs
):
1479 """RegionFromBitmap(Bitmap bmp) -> Region"""
1480 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1483 def RegionFromBitmapColour(*args
, **kwargs
):
1484 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1485 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1488 def RegionFromPoints(*args
, **kwargs
):
1489 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1490 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1493 class RegionIterator(_core
.Object
):
1494 """Proxy of C++ RegionIterator class"""
1495 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1496 __repr__
= _swig_repr
1497 def __init__(self
, *args
, **kwargs
):
1498 """__init__(self, Region region) -> RegionIterator"""
1499 _gdi_
.RegionIterator_swiginit(self
,_gdi_
.new_RegionIterator(*args
, **kwargs
))
1500 __swig_destroy__
= _gdi_
.delete_RegionIterator
1501 __del__
= lambda self
: None;
1502 def GetX(*args
, **kwargs
):
1503 """GetX(self) -> int"""
1504 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1506 def GetY(*args
, **kwargs
):
1507 """GetY(self) -> int"""
1508 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1510 def GetW(*args
, **kwargs
):
1511 """GetW(self) -> int"""
1512 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1514 def GetWidth(*args
, **kwargs
):
1515 """GetWidth(self) -> int"""
1516 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1518 def GetH(*args
, **kwargs
):
1519 """GetH(self) -> int"""
1520 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1522 def GetHeight(*args
, **kwargs
):
1523 """GetHeight(self) -> int"""
1524 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1526 def GetRect(*args
, **kwargs
):
1527 """GetRect(self) -> Rect"""
1528 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1530 def HaveRects(*args
, **kwargs
):
1531 """HaveRects(self) -> bool"""
1532 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1534 def Reset(*args
, **kwargs
):
1536 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1538 def Next(*args
, **kwargs
):
1540 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1542 def __nonzero__(*args
, **kwargs
):
1543 """__nonzero__(self) -> bool"""
1544 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1546 H
= property(GetH
,doc
="See `GetH`")
1547 Height
= property(GetHeight
,doc
="See `GetHeight`")
1548 Rect
= property(GetRect
,doc
="See `GetRect`")
1549 W
= property(GetW
,doc
="See `GetW`")
1550 Width
= property(GetWidth
,doc
="See `GetWidth`")
1551 X
= property(GetX
,doc
="See `GetX`")
1552 Y
= property(GetY
,doc
="See `GetY`")
1553 _gdi_
.RegionIterator_swigregister(RegionIterator
)
1555 #---------------------------------------------------------------------------
1557 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1558 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1559 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1560 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1561 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1562 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1563 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1564 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1565 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1566 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1567 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1568 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1569 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1570 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1571 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1572 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1573 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1574 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1575 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1576 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1577 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1578 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1579 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1580 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1581 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1582 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1583 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1584 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1585 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1586 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1587 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1588 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1589 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1590 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1591 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1592 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1593 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1594 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1595 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1596 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1597 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1598 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1599 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1600 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1601 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1602 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1603 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1604 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1605 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1606 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1607 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1608 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1609 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1610 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1611 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1612 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1613 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1614 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1615 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1616 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1617 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1618 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1619 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1620 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1621 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1622 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1623 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1624 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1625 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1626 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1627 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1628 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1629 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1630 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1631 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1632 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1633 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1634 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1635 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1636 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1637 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1638 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1639 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1640 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1641 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1642 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1643 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1644 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1645 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1646 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1647 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1648 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1649 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1650 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1651 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1652 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1653 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1654 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1655 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1656 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1657 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1658 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1659 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1660 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1661 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1662 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1663 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1664 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1665 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1666 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1667 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1668 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1669 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1670 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1671 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1672 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1673 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1674 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1675 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1676 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1677 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1678 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1679 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1680 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1681 #---------------------------------------------------------------------------
1683 class NativeFontInfo(object):
1684 """Proxy of C++ NativeFontInfo class"""
1685 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1686 __repr__
= _swig_repr
1687 def __init__(self
, *args
, **kwargs
):
1688 """__init__(self) -> NativeFontInfo"""
1689 _gdi_
.NativeFontInfo_swiginit(self
,_gdi_
.new_NativeFontInfo(*args
, **kwargs
))
1690 __swig_destroy__
= _gdi_
.delete_NativeFontInfo
1691 __del__
= lambda self
: None;
1692 def Init(*args
, **kwargs
):
1694 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1696 def InitFromFont(*args
, **kwargs
):
1697 """InitFromFont(self, Font font)"""
1698 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1700 def GetPointSize(*args
, **kwargs
):
1701 """GetPointSize(self) -> int"""
1702 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1704 def GetStyle(*args
, **kwargs
):
1705 """GetStyle(self) -> int"""
1706 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1708 def GetWeight(*args
, **kwargs
):
1709 """GetWeight(self) -> int"""
1710 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1712 def GetUnderlined(*args
, **kwargs
):
1713 """GetUnderlined(self) -> bool"""
1714 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1716 def GetFaceName(*args
, **kwargs
):
1717 """GetFaceName(self) -> String"""
1718 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1720 def GetFamily(*args
, **kwargs
):
1721 """GetFamily(self) -> int"""
1722 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1724 def GetEncoding(*args
, **kwargs
):
1725 """GetEncoding(self) -> int"""
1726 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1728 def SetPointSize(*args
, **kwargs
):
1729 """SetPointSize(self, int pointsize)"""
1730 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1732 def SetStyle(*args
, **kwargs
):
1733 """SetStyle(self, int style)"""
1734 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1736 def SetWeight(*args
, **kwargs
):
1737 """SetWeight(self, int weight)"""
1738 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1740 def SetUnderlined(*args
, **kwargs
):
1741 """SetUnderlined(self, bool underlined)"""
1742 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1744 def SetFaceName(*args
, **kwargs
):
1745 """SetFaceName(self, String facename) -> bool"""
1746 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1748 def SetFamily(*args
, **kwargs
):
1749 """SetFamily(self, int family)"""
1750 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1752 def SetEncoding(*args
, **kwargs
):
1753 """SetEncoding(self, int encoding)"""
1754 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1756 def FromString(*args
, **kwargs
):
1757 """FromString(self, String s) -> bool"""
1758 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1760 def ToString(*args
, **kwargs
):
1761 """ToString(self) -> String"""
1762 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1764 def __str__(*args
, **kwargs
):
1765 """__str__(self) -> String"""
1766 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1768 def FromUserString(*args
, **kwargs
):
1769 """FromUserString(self, String s) -> bool"""
1770 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1772 def ToUserString(*args
, **kwargs
):
1773 """ToUserString(self) -> String"""
1774 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1776 Encoding
= property(GetEncoding
,SetEncoding
,doc
="See `GetEncoding` and `SetEncoding`")
1777 FaceName
= property(GetFaceName
,SetFaceName
,doc
="See `GetFaceName` and `SetFaceName`")
1778 Family
= property(GetFamily
,SetFamily
,doc
="See `GetFamily` and `SetFamily`")
1779 PointSize
= property(GetPointSize
,SetPointSize
,doc
="See `GetPointSize` and `SetPointSize`")
1780 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
1781 Underlined
= property(GetUnderlined
,SetUnderlined
,doc
="See `GetUnderlined` and `SetUnderlined`")
1782 Weight
= property(GetWeight
,SetWeight
,doc
="See `GetWeight` and `SetWeight`")
1783 _gdi_
.NativeFontInfo_swigregister(NativeFontInfo
)
1785 class NativeEncodingInfo(object):
1786 """Proxy of C++ NativeEncodingInfo class"""
1787 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1788 __repr__
= _swig_repr
1789 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1790 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1791 def __init__(self
, *args
, **kwargs
):
1792 """__init__(self) -> NativeEncodingInfo"""
1793 _gdi_
.NativeEncodingInfo_swiginit(self
,_gdi_
.new_NativeEncodingInfo(*args
, **kwargs
))
1794 __swig_destroy__
= _gdi_
.delete_NativeEncodingInfo
1795 __del__
= lambda self
: None;
1796 def FromString(*args
, **kwargs
):
1797 """FromString(self, String s) -> bool"""
1798 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1800 def ToString(*args
, **kwargs
):
1801 """ToString(self) -> String"""
1802 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1804 _gdi_
.NativeEncodingInfo_swigregister(NativeEncodingInfo
)
1807 def GetNativeFontEncoding(*args
, **kwargs
):
1808 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1809 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1811 def TestFontEncoding(*args
, **kwargs
):
1812 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1813 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1814 #---------------------------------------------------------------------------
1816 class FontMapper(object):
1817 """Proxy of C++ FontMapper class"""
1818 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1819 __repr__
= _swig_repr
1820 def __init__(self
, *args
, **kwargs
):
1821 """__init__(self) -> FontMapper"""
1822 _gdi_
.FontMapper_swiginit(self
,_gdi_
.new_FontMapper(*args
, **kwargs
))
1823 __swig_destroy__
= _gdi_
.delete_FontMapper
1824 __del__
= lambda self
: None;
1825 def Get(*args
, **kwargs
):
1826 """Get() -> FontMapper"""
1827 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1829 Get
= staticmethod(Get
)
1830 def Set(*args
, **kwargs
):
1831 """Set(FontMapper mapper) -> FontMapper"""
1832 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1834 Set
= staticmethod(Set
)
1835 def CharsetToEncoding(*args
, **kwargs
):
1836 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1837 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1839 def GetSupportedEncodingsCount(*args
, **kwargs
):
1840 """GetSupportedEncodingsCount() -> size_t"""
1841 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1843 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1844 def GetEncoding(*args
, **kwargs
):
1845 """GetEncoding(size_t n) -> int"""
1846 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1848 GetEncoding
= staticmethod(GetEncoding
)
1849 def GetEncodingName(*args
, **kwargs
):
1850 """GetEncodingName(int encoding) -> String"""
1851 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1853 GetEncodingName
= staticmethod(GetEncodingName
)
1854 def GetEncodingDescription(*args
, **kwargs
):
1855 """GetEncodingDescription(int encoding) -> String"""
1856 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1858 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1859 def GetEncodingFromName(*args
, **kwargs
):
1860 """GetEncodingFromName(String name) -> int"""
1861 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1863 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1864 def SetConfigPath(*args
, **kwargs
):
1865 """SetConfigPath(self, String prefix)"""
1866 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1868 def GetDefaultConfigPath(*args
, **kwargs
):
1869 """GetDefaultConfigPath() -> String"""
1870 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1872 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1873 def GetAltForEncoding(*args
, **kwargs
):
1874 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1875 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1877 def IsEncodingAvailable(*args
, **kwargs
):
1878 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1879 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1881 def SetDialogParent(*args
, **kwargs
):
1882 """SetDialogParent(self, Window parent)"""
1883 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1885 def SetDialogTitle(*args
, **kwargs
):
1886 """SetDialogTitle(self, String title)"""
1887 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1889 AltForEncoding
= property(GetAltForEncoding
,doc
="See `GetAltForEncoding`")
1890 _gdi_
.FontMapper_swigregister(FontMapper
)
1892 def FontMapper_Get(*args
):
1893 """FontMapper_Get() -> FontMapper"""
1894 return _gdi_
.FontMapper_Get(*args
)
1896 def FontMapper_Set(*args
, **kwargs
):
1897 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1898 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1900 def FontMapper_GetSupportedEncodingsCount(*args
):
1901 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1902 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
)
1904 def FontMapper_GetEncoding(*args
, **kwargs
):
1905 """FontMapper_GetEncoding(size_t n) -> int"""
1906 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1908 def FontMapper_GetEncodingName(*args
, **kwargs
):
1909 """FontMapper_GetEncodingName(int encoding) -> String"""
1910 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1912 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1913 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1914 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1916 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1917 """FontMapper_GetEncodingFromName(String name) -> int"""
1918 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1920 def FontMapper_GetDefaultConfigPath(*args
):
1921 """FontMapper_GetDefaultConfigPath() -> String"""
1922 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
)
1924 #---------------------------------------------------------------------------
1926 class Font(GDIObject
):
1928 A font is an object which determines the appearance of text. Fonts are
1929 used for drawing text to a device context, and setting the appearance
1932 You can retrieve the current system font settings with `wx.SystemSettings`.
1934 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1935 __repr__
= _swig_repr
1936 def __init__(self
, *args
, **kwargs
):
1938 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1939 String face=EmptyString,
1940 int encoding=FONTENCODING_DEFAULT) -> Font
1942 Creates a font object with the specified attributes.
1944 :param pointSize: The size of the font in points.
1946 :param family: Font family. A generic way of referring to fonts
1947 without specifying actual facename. It can be One of
1948 the ``wx.FONTFAMILY_xxx`` constants.
1950 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1952 :param weight: Font weight, sometimes also referred to as font
1953 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1955 :param underline: The value can be ``True`` or ``False`` and
1956 indicates whether the font will include an underline. This
1957 may not be supported on all platforms.
1959 :param face: An optional string specifying the actual typeface to
1960 be used. If it is an empty string, a default typeface will be
1961 chosen based on the family.
1963 :param encoding: An encoding which may be one of the
1964 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1965 available, no font is created.
1967 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1968 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1971 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1972 _gdi_
.Font_swiginit(self
,_gdi_
.new_Font(*args
, **kwargs
))
1973 __swig_destroy__
= _gdi_
.delete_Font
1974 __del__
= lambda self
: None;
1975 def IsOk(*args
, **kwargs
):
1979 Returns ``True`` if this font was successfully created.
1981 return _gdi_
.Font_IsOk(*args
, **kwargs
)
1984 def __nonzero__(self
): return self
.IsOk()
1985 def __eq__(*args
, **kwargs
):
1986 """__eq__(self, Font other) -> bool"""
1987 return _gdi_
.Font___eq__(*args
, **kwargs
)
1989 def __ne__(*args
, **kwargs
):
1990 """__ne__(self, Font other) -> bool"""
1991 return _gdi_
.Font___ne__(*args
, **kwargs
)
1993 def GetPointSize(*args
, **kwargs
):
1995 GetPointSize(self) -> int
1997 Gets the point size.
1999 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
2001 def GetPixelSize(*args
, **kwargs
):
2003 GetPixelSize(self) -> Size
2005 Returns the size in pixels if the font was constructed with a pixel
2008 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
2010 def IsUsingSizeInPixels(*args
, **kwargs
):
2012 IsUsingSizeInPixels(self) -> bool
2014 Returns ``True`` if the font is using a pixelSize.
2016 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
2018 def GetFamily(*args
, **kwargs
):
2020 GetFamily(self) -> int
2022 Gets the font family.
2024 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
2026 def GetStyle(*args
, **kwargs
):
2028 GetStyle(self) -> int
2030 Gets the font style.
2032 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
2034 def GetWeight(*args
, **kwargs
):
2036 GetWeight(self) -> int
2038 Gets the font weight.
2040 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
2042 def GetUnderlined(*args
, **kwargs
):
2044 GetUnderlined(self) -> bool
2046 Returns ``True`` if the font is underlined, ``False`` otherwise.
2048 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
2050 def GetFaceName(*args
, **kwargs
):
2052 GetFaceName(self) -> String
2054 Returns the typeface name associated with the font, or the empty
2055 string if there is no typeface information.
2057 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
2059 def GetEncoding(*args
, **kwargs
):
2061 GetEncoding(self) -> int
2063 Get the font's encoding.
2065 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
2067 def GetNativeFontInfo(*args
, **kwargs
):
2069 GetNativeFontInfo(self) -> NativeFontInfo
2071 Constructs a `wx.NativeFontInfo` object from this font.
2073 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
2075 def IsFixedWidth(*args
, **kwargs
):
2077 IsFixedWidth(self) -> bool
2079 Returns true if the font is a fixed width (or monospaced) font, false
2080 if it is a proportional one or font is invalid.
2082 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
2084 def GetNativeFontInfoDesc(*args
, **kwargs
):
2086 GetNativeFontInfoDesc(self) -> String
2088 Returns the platform-dependent string completely describing this font
2089 or an empty string if the font isn't valid.
2091 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
2093 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
2095 GetNativeFontInfoUserDesc(self) -> String
2097 Returns a human readable version of `GetNativeFontInfoDesc`.
2099 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
2101 def SetPointSize(*args
, **kwargs
):
2103 SetPointSize(self, int pointSize)
2105 Sets the point size.
2107 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
2109 def SetPixelSize(*args
, **kwargs
):
2111 SetPixelSize(self, Size pixelSize)
2113 Sets the size in pixels rather than points. If there is platform API
2114 support for this then it is used, otherwise a font with the closest
2115 size is found using a binary search.
2117 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
2119 def SetFamily(*args
, **kwargs
):
2121 SetFamily(self, int family)
2123 Sets the font family.
2125 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
2127 def SetStyle(*args
, **kwargs
):
2129 SetStyle(self, int style)
2131 Sets the font style.
2133 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
2135 def SetWeight(*args
, **kwargs
):
2137 SetWeight(self, int weight)
2139 Sets the font weight.
2141 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
2143 def SetFaceName(*args
, **kwargs
):
2145 SetFaceName(self, String faceName) -> bool
2147 Sets the facename for the font. The facename, which should be a valid
2148 font installed on the end-user's system.
2150 To avoid portability problems, don't rely on a specific face, but
2151 specify the font family instead or as well. A suitable font will be
2152 found on the end-user's system. If both the family and the facename
2153 are specified, wxWidgets will first search for the specific face, and
2154 then for a font belonging to the same family.
2156 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
2158 def SetUnderlined(*args
, **kwargs
):
2160 SetUnderlined(self, bool underlined)
2164 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
2166 def SetEncoding(*args
, **kwargs
):
2168 SetEncoding(self, int encoding)
2170 Set the font encoding.
2172 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
2174 def SetNativeFontInfo(*args
, **kwargs
):
2176 SetNativeFontInfo(self, NativeFontInfo info)
2178 Set the font's attributes from a `wx.NativeFontInfo` object.
2180 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
2182 def SetNativeFontInfoFromString(*args
, **kwargs
):
2184 SetNativeFontInfoFromString(self, String info) -> bool
2186 Set the font's attributes from string representation of a
2187 `wx.NativeFontInfo` object.
2189 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
2191 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
2193 SetNativeFontInfoUserDesc(self, String info) -> bool
2195 Set the font's attributes from a string formerly returned from
2196 `GetNativeFontInfoDesc`.
2198 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
2200 def GetFamilyString(*args
, **kwargs
):
2202 GetFamilyString(self) -> String
2204 Returns a string representation of the font family.
2206 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
2208 def GetStyleString(*args
, **kwargs
):
2210 GetStyleString(self) -> String
2212 Returns a string representation of the font style.
2214 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
2216 def GetWeightString(*args
, **kwargs
):
2218 GetWeightString(self) -> String
2220 Return a string representation of the font weight.
2222 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
2224 def SetNoAntiAliasing(*args
, **kwargs
):
2225 """SetNoAntiAliasing(self, bool no=True)"""
2226 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
2228 def GetNoAntiAliasing(*args
, **kwargs
):
2229 """GetNoAntiAliasing(self) -> bool"""
2230 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
2232 def GetDefaultEncoding(*args
, **kwargs
):
2234 GetDefaultEncoding() -> int
2236 Returns the encoding used for all fonts created with an encoding of
2237 ``wx.FONTENCODING_DEFAULT``.
2239 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
2241 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
2242 def SetDefaultEncoding(*args
, **kwargs
):
2244 SetDefaultEncoding(int encoding)
2246 Sets the default font encoding.
2248 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2250 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
2251 Encoding
= property(GetEncoding
,SetEncoding
,doc
="See `GetEncoding` and `SetEncoding`")
2252 FaceName
= property(GetFaceName
,SetFaceName
,doc
="See `GetFaceName` and `SetFaceName`")
2253 Family
= property(GetFamily
,SetFamily
,doc
="See `GetFamily` and `SetFamily`")
2254 FamilyString
= property(GetFamilyString
,doc
="See `GetFamilyString`")
2255 NativeFontInfo
= property(GetNativeFontInfo
,SetNativeFontInfo
,doc
="See `GetNativeFontInfo` and `SetNativeFontInfo`")
2256 NativeFontInfoDesc
= property(GetNativeFontInfoDesc
,doc
="See `GetNativeFontInfoDesc`")
2257 NativeFontInfoUserDesc
= property(GetNativeFontInfoUserDesc
,SetNativeFontInfoUserDesc
,doc
="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`")
2258 NoAntiAliasing
= property(GetNoAntiAliasing
,SetNoAntiAliasing
,doc
="See `GetNoAntiAliasing` and `SetNoAntiAliasing`")
2259 PixelSize
= property(GetPixelSize
,SetPixelSize
,doc
="See `GetPixelSize` and `SetPixelSize`")
2260 PointSize
= property(GetPointSize
,SetPointSize
,doc
="See `GetPointSize` and `SetPointSize`")
2261 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
2262 StyleString
= property(GetStyleString
,doc
="See `GetStyleString`")
2263 Underlined
= property(GetUnderlined
,SetUnderlined
,doc
="See `GetUnderlined` and `SetUnderlined`")
2264 Weight
= property(GetWeight
,SetWeight
,doc
="See `GetWeight` and `SetWeight`")
2265 WeightString
= property(GetWeightString
,doc
="See `GetWeightString`")
2266 _gdi_
.Font_swigregister(Font
)
2268 def FontFromNativeInfo(*args
, **kwargs
):
2270 FontFromNativeInfo(NativeFontInfo info) -> Font
2272 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2274 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2275 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
2278 def FontFromNativeInfoString(*args
, **kwargs
):
2280 FontFromNativeInfoString(String info) -> Font
2282 Construct a `wx.Font` from the string representation of a
2283 `wx.NativeFontInfo` object.
2285 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2286 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
2289 def FFont(*args
, **kwargs
):
2291 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2292 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2294 A bit of a simpler way to create a `wx.Font` using flags instead of
2295 individual attribute settings. The value of flags can be a
2296 combination of the following:
2298 ============================ ==
2304 wx.FONTFLAG_ANTIALIASED
2305 wx.FONTFLAG_NOT_ANTIALIASED
2306 wx.FONTFLAG_UNDERLINED
2307 wx.FONTFLAG_STRIKETHROUGH
2308 ============================ ==
2310 :see: `wx.Font.__init__`
2312 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2313 val
= _gdi_
.new_FFont(*args
, **kwargs
)
2316 def FontFromPixelSize(*args
, **kwargs
):
2318 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2319 bool underlined=False, String face=wxEmptyString,
2320 int encoding=FONTENCODING_DEFAULT) -> Font
2322 Creates a font using a size in pixels rather than points. If there is
2323 platform API support for this then it is used, otherwise a font with
2324 the closest size is found using a binary search.
2326 :see: `wx.Font.__init__`
2328 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2329 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
2332 def FFontFromPixelSize(*args
, **kwargs
):
2334 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2335 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2337 Creates a font using a size in pixels rather than points. If there is
2338 platform API support for this then it is used, otherwise a font with
2339 the closest size is found using a binary search.
2341 :see: `wx.Font.__init__`, `wx.FFont`
2343 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2344 val
= _gdi_
.new_FFontFromPixelSize(*args
, **kwargs
)
2347 def Font_GetDefaultEncoding(*args
):
2349 Font_GetDefaultEncoding() -> int
2351 Returns the encoding used for all fonts created with an encoding of
2352 ``wx.FONTENCODING_DEFAULT``.
2354 return _gdi_
.Font_GetDefaultEncoding(*args
)
2356 def Font_SetDefaultEncoding(*args
, **kwargs
):
2358 Font_SetDefaultEncoding(int encoding)
2360 Sets the default font encoding.
2362 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2364 Font2
= wx
._deprecated
(FFont
, "Use `wx.FFont` instead.")
2365 #---------------------------------------------------------------------------
2367 class FontEnumerator(object):
2368 """Proxy of C++ FontEnumerator class"""
2369 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2370 __repr__
= _swig_repr
2371 def __init__(self
, *args
, **kwargs
):
2372 """__init__(self) -> FontEnumerator"""
2373 _gdi_
.FontEnumerator_swiginit(self
,_gdi_
.new_FontEnumerator(*args
, **kwargs
))
2374 FontEnumerator
._setCallbackInfo
(self
, self
, FontEnumerator
)
2376 __swig_destroy__
= _gdi_
.delete_FontEnumerator
2377 __del__
= lambda self
: None;
2378 def _setCallbackInfo(*args
, **kwargs
):
2379 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)"""
2380 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
2382 def EnumerateFacenames(*args
, **kwargs
):
2383 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2384 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
2386 def EnumerateEncodings(*args
, **kwargs
):
2387 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2388 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
2390 def GetEncodings(*args
, **kwargs
):
2391 """GetEncodings() -> PyObject"""
2392 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
2394 GetEncodings
= staticmethod(GetEncodings
)
2395 def GetFacenames(*args
, **kwargs
):
2396 """GetFacenames() -> PyObject"""
2397 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
2399 GetFacenames
= staticmethod(GetFacenames
)
2400 def IsValidFacename(*args
, **kwargs
):
2402 IsValidFacename(String str) -> bool
2404 Convenience function that returns true if the given face name exist in
2407 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2409 IsValidFacename
= staticmethod(IsValidFacename
)
2410 _gdi_
.FontEnumerator_swigregister(FontEnumerator
)
2412 def FontEnumerator_GetEncodings(*args
):
2413 """FontEnumerator_GetEncodings() -> PyObject"""
2414 return _gdi_
.FontEnumerator_GetEncodings(*args
)
2416 def FontEnumerator_GetFacenames(*args
):
2417 """FontEnumerator_GetFacenames() -> PyObject"""
2418 return _gdi_
.FontEnumerator_GetFacenames(*args
)
2420 def FontEnumerator_IsValidFacename(*args
, **kwargs
):
2422 FontEnumerator_IsValidFacename(String str) -> bool
2424 Convenience function that returns true if the given face name exist in
2427 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2429 #---------------------------------------------------------------------------
2431 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
2432 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
2433 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
2434 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
2435 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
2436 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
2437 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
2438 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
2439 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
2440 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
2441 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
2442 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
2443 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
2444 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
2445 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
2446 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
2447 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
2448 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
2449 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
2450 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
2451 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
2452 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
2453 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
2454 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
2455 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
2456 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
2457 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
2458 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
2459 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
2460 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
2461 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
2462 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
2463 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
2464 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
2465 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
2466 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
2467 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
2468 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
2469 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
2470 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
2471 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
2472 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
2473 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
2474 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
2475 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
2476 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
2477 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
2478 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
2479 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
2480 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
2481 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
2482 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
2483 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
2484 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
2485 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
2486 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
2487 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
2488 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
2489 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
2490 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
2491 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
2492 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
2493 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
2494 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
2495 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
2496 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
2497 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
2498 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
2499 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
2500 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
2501 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
2502 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
2503 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
2504 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
2505 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
2506 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
2507 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
2508 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2509 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2510 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2511 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2512 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2513 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2514 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2515 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2516 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2517 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2518 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2519 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2520 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2521 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2522 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2523 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2524 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2525 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2526 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2527 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2528 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2529 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2530 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2531 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2532 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2533 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2534 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2535 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2536 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2537 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2538 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2539 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2540 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2541 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2542 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2543 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2544 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2545 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2546 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2547 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2548 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2549 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2550 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2551 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2552 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2553 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2554 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2555 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2556 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2557 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2558 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2559 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2560 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2561 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2562 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2563 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2564 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2565 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2566 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2567 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2568 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2569 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2570 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2571 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2572 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2573 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2574 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2575 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2576 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2577 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2578 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2579 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2580 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2581 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2582 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2583 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2584 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2585 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2586 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2587 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2588 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2589 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2590 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2591 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2592 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2593 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2594 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2595 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2596 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2597 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2598 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2599 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2600 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2601 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2602 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2603 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2604 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2605 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2606 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2607 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2608 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2609 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2610 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2611 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2612 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2613 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2614 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2615 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2616 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2617 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2618 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2619 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2620 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2621 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2622 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2623 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2624 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2625 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2626 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2627 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2628 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2629 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2630 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2631 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2632 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2633 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2634 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2635 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2636 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2637 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2638 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2639 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2640 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2641 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2642 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2643 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2644 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2645 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2646 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2647 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2648 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2649 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2650 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2651 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2652 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2653 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2654 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2655 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2656 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2657 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2658 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2659 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2660 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2661 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2662 class LanguageInfo(object):
2663 """Proxy of C++ LanguageInfo class"""
2664 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2665 def __init__(self
): raise AttributeError, "No constructor defined"
2666 __repr__
= _swig_repr
2667 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2668 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2669 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2670 _gdi_
.LanguageInfo_swigregister(LanguageInfo
)
2672 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2673 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2674 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2675 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2676 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2677 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2678 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2679 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2680 class Locale(object):
2681 """Proxy of C++ Locale class"""
2682 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2683 __repr__
= _swig_repr
2684 def __init__(self
, *args
, **kwargs
):
2685 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2686 _gdi_
.Locale_swiginit(self
,_gdi_
.new_Locale(*args
, **kwargs
))
2687 __swig_destroy__
= _gdi_
.delete_Locale
2688 __del__
= lambda self
: None;
2689 def Init1(*args
, **kwargs
):
2691 Init1(self, String name, String shortName=EmptyString, String locale=EmptyString,
2692 bool bLoadDefault=True, bool bConvertEncoding=False) -> bool
2694 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2696 def Init2(*args
, **kwargs
):
2697 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2698 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2700 def Init(self
, *_args
, **_kwargs
):
2701 if type(_args
[0]) in [type(''), type(u
'')]:
2702 val
= self
.Init1(*_args
, **_kwargs
)
2704 val
= self
.Init2(*_args
, **_kwargs
)
2707 def GetSystemLanguage(*args
, **kwargs
):
2708 """GetSystemLanguage() -> int"""
2709 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2711 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2712 def GetSystemEncoding(*args
, **kwargs
):
2713 """GetSystemEncoding() -> int"""
2714 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2716 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2717 def GetSystemEncodingName(*args
, **kwargs
):
2718 """GetSystemEncodingName() -> String"""
2719 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2721 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2722 def IsOk(*args
, **kwargs
):
2723 """IsOk(self) -> bool"""
2724 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2726 def __nonzero__(self
): return self
.IsOk()
2727 def GetLocale(*args
, **kwargs
):
2728 """GetLocale(self) -> String"""
2729 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2731 def GetLanguage(*args
, **kwargs
):
2732 """GetLanguage(self) -> int"""
2733 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2735 def GetSysName(*args
, **kwargs
):
2736 """GetSysName(self) -> String"""
2737 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2739 def GetCanonicalName(*args
, **kwargs
):
2740 """GetCanonicalName(self) -> String"""
2741 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2743 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2744 """AddCatalogLookupPathPrefix(String prefix)"""
2745 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2747 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2748 def AddCatalog(*args
, **kwargs
):
2749 """AddCatalog(self, String domain) -> bool"""
2750 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2752 def IsAvailable(*args
, **kwargs
):
2753 """IsAvailable(int lang) -> bool"""
2754 return _gdi_
.Locale_IsAvailable(*args
, **kwargs
)
2756 IsAvailable
= staticmethod(IsAvailable
)
2757 def IsLoaded(*args
, **kwargs
):
2758 """IsLoaded(self, String domain) -> bool"""
2759 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2761 def GetLanguageInfo(*args
, **kwargs
):
2762 """GetLanguageInfo(int lang) -> LanguageInfo"""
2763 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2765 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2766 def GetLanguageName(*args
, **kwargs
):
2767 """GetLanguageName(int lang) -> String"""
2768 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2770 GetLanguageName
= staticmethod(GetLanguageName
)
2771 def FindLanguageInfo(*args
, **kwargs
):
2772 """FindLanguageInfo(String locale) -> LanguageInfo"""
2773 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2775 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2776 def AddLanguage(*args
, **kwargs
):
2777 """AddLanguage(LanguageInfo info)"""
2778 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2780 AddLanguage
= staticmethod(AddLanguage
)
2781 def GetString(*args
, **kwargs
):
2782 """GetString(self, String origString, String domain=EmptyString) -> String"""
2783 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2785 def GetName(*args
, **kwargs
):
2786 """GetName(self) -> String"""
2787 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2789 CanonicalName
= property(GetCanonicalName
,doc
="See `GetCanonicalName`")
2790 Language
= property(GetLanguage
,doc
="See `GetLanguage`")
2791 Locale
= property(GetLocale
,doc
="See `GetLocale`")
2792 Name
= property(GetName
,doc
="See `GetName`")
2793 String
= property(GetString
,doc
="See `GetString`")
2794 SysName
= property(GetSysName
,doc
="See `GetSysName`")
2795 _gdi_
.Locale_swigregister(Locale
)
2797 def Locale_GetSystemLanguage(*args
):
2798 """Locale_GetSystemLanguage() -> int"""
2799 return _gdi_
.Locale_GetSystemLanguage(*args
)
2801 def Locale_GetSystemEncoding(*args
):
2802 """Locale_GetSystemEncoding() -> int"""
2803 return _gdi_
.Locale_GetSystemEncoding(*args
)
2805 def Locale_GetSystemEncodingName(*args
):
2806 """Locale_GetSystemEncodingName() -> String"""
2807 return _gdi_
.Locale_GetSystemEncodingName(*args
)
2809 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2810 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2811 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2813 def Locale_IsAvailable(*args
, **kwargs
):
2814 """Locale_IsAvailable(int lang) -> bool"""
2815 return _gdi_
.Locale_IsAvailable(*args
, **kwargs
)
2817 def Locale_GetLanguageInfo(*args
, **kwargs
):
2818 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2819 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2821 def Locale_GetLanguageName(*args
, **kwargs
):
2822 """Locale_GetLanguageName(int lang) -> String"""
2823 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2825 def Locale_FindLanguageInfo(*args
, **kwargs
):
2826 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2827 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2829 def Locale_AddLanguage(*args
, **kwargs
):
2830 """Locale_AddLanguage(LanguageInfo info)"""
2831 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2833 class PyLocale(Locale
):
2834 """Proxy of C++ PyLocale class"""
2835 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2836 __repr__
= _swig_repr
2837 def __init__(self
, *args
, **kwargs
):
2838 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
2839 _gdi_
.PyLocale_swiginit(self
,_gdi_
.new_PyLocale(*args
, **kwargs
))
2840 PyLocale
._setCallbackInfo
(self
, self
, PyLocale
)
2842 __swig_destroy__
= _gdi_
.delete_PyLocale
2843 __del__
= lambda self
: None;
2844 def _setCallbackInfo(*args
, **kwargs
):
2845 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
2846 return _gdi_
.PyLocale__setCallbackInfo(*args
, **kwargs
)
2848 def GetSingularString(*args
, **kwargs
):
2849 """GetSingularString(self, String origString, String domain=EmptyString) -> String"""
2850 return _gdi_
.PyLocale_GetSingularString(*args
, **kwargs
)
2852 def GetPluralString(*args
, **kwargs
):
2853 """GetPluralString(self, String origString, String origString2, size_t n, String domain=EmptyString) -> String"""
2854 return _gdi_
.PyLocale_GetPluralString(*args
, **kwargs
)
2856 _gdi_
.PyLocale_swigregister(PyLocale
)
2859 def GetLocale(*args
):
2860 """GetLocale() -> Locale"""
2861 return _gdi_
.GetLocale(*args
)
2862 #---------------------------------------------------------------------------
2864 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2865 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2866 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2867 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2868 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2869 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2870 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2871 class EncodingConverter(_core
.Object
):
2872 """Proxy of C++ EncodingConverter class"""
2873 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2874 __repr__
= _swig_repr
2875 def __init__(self
, *args
, **kwargs
):
2876 """__init__(self) -> EncodingConverter"""
2877 _gdi_
.EncodingConverter_swiginit(self
,_gdi_
.new_EncodingConverter(*args
, **kwargs
))
2878 __swig_destroy__
= _gdi_
.delete_EncodingConverter
2879 __del__
= lambda self
: None;
2880 def Init(*args
, **kwargs
):
2881 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2882 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2884 def Convert(*args
, **kwargs
):
2885 """Convert(self, String input) -> String"""
2886 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2888 def GetPlatformEquivalents(*args
, **kwargs
):
2889 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2890 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2892 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
2893 def GetAllEquivalents(*args
, **kwargs
):
2894 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2895 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2897 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
2898 def CanConvert(*args
, **kwargs
):
2899 """CanConvert(int encIn, int encOut) -> bool"""
2900 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2902 CanConvert
= staticmethod(CanConvert
)
2903 def __nonzero__(self
): return self
.IsOk()
2904 _gdi_
.EncodingConverter_swigregister(EncodingConverter
)
2906 def GetTranslation(*args
):
2908 GetTranslation(String str) -> String
2909 GetTranslation(String str, String domain) -> String
2910 GetTranslation(String str, String strPlural, size_t n) -> String
2911 GetTranslation(String str, String strPlural, size_t n, String domain) -> String
2913 return _gdi_
.GetTranslation(*args
)
2915 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
2916 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2917 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2919 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
2920 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2921 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2923 def EncodingConverter_CanConvert(*args
, **kwargs
):
2924 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2925 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2927 #----------------------------------------------------------------------------
2928 # On MSW add the directory where the wxWidgets catalogs were installed
2929 # to the default catalog path.
2930 if wx
.Platform
== "__WXMSW__":
2932 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "locale")
2933 Locale
.AddCatalogLookupPathPrefix(_localedir
)
2936 #----------------------------------------------------------------------------
2938 #---------------------------------------------------------------------------
2940 class DC(_core
.Object
):
2942 A wx.DC is a device context onto which graphics and text can be
2943 drawn. It is intended to represent a number of output devices in a
2944 generic way, so a window can have a device context associated with it,
2945 and a printer also has a device context. In this way, the same piece
2946 of code may write to a number of different devices, if the device
2947 context is used as a parameter.
2949 Derived types of wxDC have documentation for specific features only,
2950 so refer to this section for most device context information.
2952 The wx.DC class is abstract and can not be instantiated, you must use
2953 one of the derived classes instead. Which one will depend on the
2954 situation in which it is used.
2956 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2957 def __init__(self
): raise AttributeError, "No constructor defined"
2958 __repr__
= _swig_repr
2959 __swig_destroy__
= _gdi_
.delete_DC
2960 __del__
= lambda self
: None;
2961 # These have been deprecated in wxWidgets. Since they never
2962 # really did anything to begin with, just make them be NOPs.
2963 def BeginDrawing(self
): pass
2964 def EndDrawing(self
): pass
2966 def FloodFill(*args
, **kwargs
):
2968 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2970 Flood fills the device context starting from the given point, using
2971 the current brush colour, and using a style:
2973 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2974 the given colour is encountered.
2976 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2979 Returns False if the operation failed.
2981 Note: The present implementation for non-Windows platforms may fail to
2982 find colour borders if the pixels do not match the colour
2983 exactly. However the function will still return true.
2985 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
2987 def FloodFillPoint(*args
, **kwargs
):
2989 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2991 Flood fills the device context starting from the given point, using
2992 the current brush colour, and using a style:
2994 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2995 the given colour is encountered.
2997 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
3000 Returns False if the operation failed.
3002 Note: The present implementation for non-Windows platforms may fail to
3003 find colour borders if the pixels do not match the colour
3004 exactly. However the function will still return true.
3006 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
3008 def GradientFillConcentric(*args
, **kwargs
):
3010 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
3013 Fill the area specified by rect with a radial gradient, starting from
3014 initialColour in the center of the circle and fading to destColour on
3015 the outside of the circle. The circleCenter argument is the relative
3016 coordinants of the center of the circle in the specified rect.
3018 Note: Currently this function is very slow, don't use it for real-time
3021 return _gdi_
.DC_GradientFillConcentric(*args
, **kwargs
)
3023 def GradientFillLinear(*args
, **kwargs
):
3025 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
3026 int nDirection=EAST)
3028 Fill the area specified by rect with a linear gradient, starting from
3029 initialColour and eventually fading to destColour. The nDirection
3030 parameter specifies the direction of the colour change, default is to
3031 use initialColour on the left part of the rectangle and destColour on
3034 return _gdi_
.DC_GradientFillLinear(*args
, **kwargs
)
3036 def GetPixel(*args
, **kwargs
):
3038 GetPixel(self, int x, int y) -> Colour
3040 Gets the colour at the specified location on the DC.
3042 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
3044 def GetPixelPoint(*args
, **kwargs
):
3045 """GetPixelPoint(self, Point pt) -> Colour"""
3046 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
3048 def DrawLine(*args
, **kwargs
):
3050 DrawLine(self, int x1, int y1, int x2, int y2)
3052 Draws a line from the first point to the second. The current pen is
3053 used for drawing the line. Note that the second point is *not* part of
3054 the line and is not drawn by this function (this is consistent with
3055 the behaviour of many other toolkits).
3057 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
3059 def DrawLinePoint(*args
, **kwargs
):
3061 DrawLinePoint(self, Point pt1, Point pt2)
3063 Draws a line from the first point to the second. The current pen is
3064 used for drawing the line. Note that the second point is *not* part of
3065 the line and is not drawn by this function (this is consistent with
3066 the behaviour of many other toolkits).
3068 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
3070 def CrossHair(*args
, **kwargs
):
3072 CrossHair(self, int x, int y)
3074 Displays a cross hair using the current pen. This is a vertical and
3075 horizontal line the height and width of the window, centred on the
3078 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
3080 def CrossHairPoint(*args
, **kwargs
):
3082 CrossHairPoint(self, Point pt)
3084 Displays a cross hair using the current pen. This is a vertical and
3085 horizontal line the height and width of the window, centred on the
3088 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
3090 def DrawArc(*args
, **kwargs
):
3092 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
3094 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3095 the first point to the second. The current pen is used for the outline
3096 and the current brush for filling the shape.
3098 The arc is drawn in an anticlockwise direction from the start point to
3101 return _gdi_
.DC_DrawArc(*args
, **kwargs
)
3103 def DrawArcPoint(*args
, **kwargs
):
3105 DrawArcPoint(self, Point pt1, Point pt2, Point center)
3107 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3108 the first point to the second. The current pen is used for the outline
3109 and the current brush for filling the shape.
3111 The arc is drawn in an anticlockwise direction from the start point to
3114 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
3116 def DrawCheckMark(*args
, **kwargs
):
3118 DrawCheckMark(self, int x, int y, int width, int height)
3120 Draws a check mark inside the given rectangle.
3122 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
3124 def DrawCheckMarkRect(*args
, **kwargs
):
3126 DrawCheckMarkRect(self, Rect rect)
3128 Draws a check mark inside the given rectangle.
3130 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
3132 def DrawEllipticArc(*args
, **kwargs
):
3134 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3136 Draws an arc of an ellipse, with the given rectangle defining the
3137 bounds of the ellipse. The current pen is used for drawing the arc and
3138 the current brush is used for drawing the pie.
3140 The *start* and *end* parameters specify the start and end of the arc
3141 relative to the three-o'clock position from the center of the
3142 rectangle. Angles are specified in degrees (360 is a complete
3143 circle). Positive values mean counter-clockwise motion. If start is
3144 equal to end, a complete ellipse will be drawn.
3146 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
3148 def DrawEllipticArcPointSize(*args
, **kwargs
):
3150 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3152 Draws an arc of an ellipse, with the given rectangle defining the
3153 bounds of the ellipse. The current pen is used for drawing the arc and
3154 the current brush is used for drawing the pie.
3156 The *start* and *end* parameters specify the start and end of the arc
3157 relative to the three-o'clock position from the center of the
3158 rectangle. Angles are specified in degrees (360 is a complete
3159 circle). Positive values mean counter-clockwise motion. If start is
3160 equal to end, a complete ellipse will be drawn.
3162 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
3164 def DrawPoint(*args
, **kwargs
):
3166 DrawPoint(self, int x, int y)
3168 Draws a point using the current pen.
3170 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
3172 def DrawPointPoint(*args
, **kwargs
):
3174 DrawPointPoint(self, Point pt)
3176 Draws a point using the current pen.
3178 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
3180 def DrawRectangle(*args
, **kwargs
):
3182 DrawRectangle(self, int x, int y, int width, int height)
3184 Draws a rectangle with the given top left corner, and with the given
3185 size. The current pen is used for the outline and the current brush
3186 for filling the shape.
3188 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
3190 def DrawRectangleRect(*args
, **kwargs
):
3192 DrawRectangleRect(self, Rect rect)
3194 Draws a rectangle with the given top left corner, and with the given
3195 size. The current pen is used for the outline and the current brush
3196 for filling the shape.
3198 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
3200 def DrawRectanglePointSize(*args
, **kwargs
):
3202 DrawRectanglePointSize(self, Point pt, Size sz)
3204 Draws a rectangle with the given top left corner, and with the given
3205 size. The current pen is used for the outline and the current brush
3206 for filling the shape.
3208 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
3210 def DrawRoundedRectangle(*args
, **kwargs
):
3212 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3214 Draws a rectangle with the given top left corner, and with the given
3215 size. The corners are quarter-circles using the given radius. The
3216 current pen is used for the outline and the current brush for filling
3219 If radius is positive, the value is assumed to be the radius of the
3220 rounded corner. If radius is negative, the absolute value is assumed
3221 to be the proportion of the smallest dimension of the rectangle. This
3222 means that the corner can be a sensible size relative to the size of
3223 the rectangle, and also avoids the strange effects X produces when the
3224 corners are too big for the rectangle.
3226 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
3228 def DrawRoundedRectangleRect(*args
, **kwargs
):
3230 DrawRoundedRectangleRect(self, Rect r, double radius)
3232 Draws a rectangle with the given top left corner, and with the given
3233 size. The corners are quarter-circles using the given radius. The
3234 current pen is used for the outline and the current brush for filling
3237 If radius is positive, the value is assumed to be the radius of the
3238 rounded corner. If radius is negative, the absolute value is assumed
3239 to be the proportion of the smallest dimension of the rectangle. This
3240 means that the corner can be a sensible size relative to the size of
3241 the rectangle, and also avoids the strange effects X produces when the
3242 corners are too big for the rectangle.
3244 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
3246 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
3248 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3250 Draws a rectangle with the given top left corner, and with the given
3251 size. The corners are quarter-circles using the given radius. The
3252 current pen is used for the outline and the current brush for filling
3255 If radius is positive, the value is assumed to be the radius of the
3256 rounded corner. If radius is negative, the absolute value is assumed
3257 to be the proportion of the smallest dimension of the rectangle. This
3258 means that the corner can be a sensible size relative to the size of
3259 the rectangle, and also avoids the strange effects X produces when the
3260 corners are too big for the rectangle.
3262 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
3264 def DrawCircle(*args
, **kwargs
):
3266 DrawCircle(self, int x, int y, int radius)
3268 Draws a circle with the given center point and radius. The current
3269 pen is used for the outline and the current brush for filling the
3272 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
3274 def DrawCirclePoint(*args
, **kwargs
):
3276 DrawCirclePoint(self, Point pt, int radius)
3278 Draws a circle with the given center point and radius. The current
3279 pen is used for the outline and the current brush for filling the
3282 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
3284 def DrawEllipse(*args
, **kwargs
):
3286 DrawEllipse(self, int x, int y, int width, int height)
3288 Draws an ellipse contained in the specified rectangle. The current pen
3289 is used for the outline and the current brush for filling the shape.
3291 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
3293 def DrawEllipseRect(*args
, **kwargs
):
3295 DrawEllipseRect(self, Rect rect)
3297 Draws an ellipse contained in the specified rectangle. The current pen
3298 is used for the outline and the current brush for filling the shape.
3300 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
3302 def DrawEllipsePointSize(*args
, **kwargs
):
3304 DrawEllipsePointSize(self, Point pt, Size sz)
3306 Draws an ellipse contained in the specified rectangle. The current pen
3307 is used for the outline and the current brush for filling the shape.
3309 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
3311 def DrawIcon(*args
, **kwargs
):
3313 DrawIcon(self, Icon icon, int x, int y)
3315 Draw an icon on the display (does nothing if the device context is
3316 PostScript). This can be the simplest way of drawing bitmaps on a
3319 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
3321 def DrawIconPoint(*args
, **kwargs
):
3323 DrawIconPoint(self, Icon icon, Point pt)
3325 Draw an icon on the display (does nothing if the device context is
3326 PostScript). This can be the simplest way of drawing bitmaps on a
3329 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
3331 def DrawBitmap(*args
, **kwargs
):
3333 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3335 Draw a bitmap on the device context at the specified point. If
3336 *transparent* is true and the bitmap has a transparency mask, (or
3337 alpha channel on the platforms that support it) then the bitmap will
3338 be drawn transparently.
3340 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
3342 def DrawBitmapPoint(*args
, **kwargs
):
3344 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3346 Draw a bitmap on the device context at the specified point. If
3347 *transparent* is true and the bitmap has a transparency mask, (or
3348 alpha channel on the platforms that support it) then the bitmap will
3349 be drawn transparently.
3351 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
3353 def DrawText(*args
, **kwargs
):
3355 DrawText(self, String text, int x, int y)
3357 Draws a text string at the specified point, using the current text
3358 font, and the current text foreground and background colours.
3360 The coordinates refer to the top-left corner of the rectangle bounding
3361 the string. See `GetTextExtent` for how to get the dimensions of a
3362 text string, which can be used to position the text more precisely.
3364 **NOTE**: under wxGTK the current logical function is used by this
3365 function but it is ignored by wxMSW. Thus, you should avoid using
3366 logical functions with this function in portable programs.
3368 return _gdi_
.DC_DrawText(*args
, **kwargs
)
3370 def DrawTextPoint(*args
, **kwargs
):
3372 DrawTextPoint(self, String text, Point pt)
3374 Draws a text string at the specified point, using the current text
3375 font, and the current text foreground and background colours.
3377 The coordinates refer to the top-left corner of the rectangle bounding
3378 the string. See `GetTextExtent` for how to get the dimensions of a
3379 text string, which can be used to position the text more precisely.
3381 **NOTE**: under wxGTK the current logical function is used by this
3382 function but it is ignored by wxMSW. Thus, you should avoid using
3383 logical functions with this function in portable programs.
3385 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
3387 def DrawRotatedText(*args
, **kwargs
):
3389 DrawRotatedText(self, String text, int x, int y, double angle)
3391 Draws the text rotated by *angle* degrees, if supported by the platform.
3393 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3394 function. In particular, a font different from ``wx.NORMAL_FONT``
3395 should be used as the it is not normally a TrueType
3396 font. ``wx.SWISS_FONT`` is an example of a font which is.
3398 return _gdi_
.DC_DrawRotatedText(*args
, **kwargs
)
3400 def DrawRotatedTextPoint(*args
, **kwargs
):
3402 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3404 Draws the text rotated by *angle* degrees, if supported by the platform.
3406 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3407 function. In particular, a font different from ``wx.NORMAL_FONT``
3408 should be used as the it is not normally a TrueType
3409 font. ``wx.SWISS_FONT`` is an example of a font which is.
3411 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
3413 def Blit(*args
, **kwargs
):
3415 Blit(self, int xdest, int ydest, int width, int height, DC source,
3416 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3417 int xsrcMask=-1, int ysrcMask=-1) -> bool
3419 Copy from a source DC to this DC. Parameters specify the destination
3420 coordinates, size of area to copy, source DC, source coordinates,
3421 logical function, whether to use a bitmap mask, and mask source
3424 return _gdi_
.DC_Blit(*args
, **kwargs
)
3426 def BlitPointSize(*args
, **kwargs
):
3428 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3429 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3431 Copy from a source DC to this DC. Parameters specify the destination
3432 coordinates, size of area to copy, source DC, source coordinates,
3433 logical function, whether to use a bitmap mask, and mask source
3436 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
3438 def StretchBlit(*args
, **kwargs
):
3440 StretchBlit(self, int dstX, int dstY, int dstWidth, int dstHeight, DC source,
3441 int srcX, int srcY, int srcWidth, int srcHeight,
3442 int rop=COPY, bool useMask=False,
3443 int srcMaskX=wxDefaultCoord, int srcMaskY=wxDefaultCoord) -> bool
3445 Copy from a source DC to this DC, specifying the destination
3446 coordinates, destination size, source DC, source coordinates, size of
3447 source area to copy, logical function, whether to use a bitmap mask,
3448 and mask source position.
3450 return _gdi_
.DC_StretchBlit(*args
, **kwargs
)
3452 def StretchBlitPointSize(*args
, **kwargs
):
3454 StretchBlitPointSize(self, Point dstPt, Size dstSize, DC source, Point srcPt,
3455 Size srcSize, int rop=COPY, bool useMask=False,
3456 Point srcMaskPt=DefaultPosition) -> bool
3458 Copy from a source DC to this DC, specifying the destination
3459 coordinates, destination size, source DC, source coordinates, size of
3460 source area to copy, logical function, whether to use a bitmap mask,
3461 and mask source position. This version is the same as `StretchBlit`
3462 except `wx.Point` and `wx.Size` objects are used instead of individual
3463 position and size components.
3465 return _gdi_
.DC_StretchBlitPointSize(*args
, **kwargs
)
3467 def GetAsBitmap(*args
, **kwargs
):
3468 """GetAsBitmap(self, Rect subrect=None) -> Bitmap"""
3469 return _gdi_
.DC_GetAsBitmap(*args
, **kwargs
)
3471 def SetClippingRegion(*args
, **kwargs
):
3473 SetClippingRegion(self, int x, int y, int width, int height)
3475 Sets the clipping region for this device context to the intersection
3476 of the given region described by the parameters of this method and the
3477 previously set clipping region. You should call `DestroyClippingRegion`
3478 if you want to set the clipping region exactly to the region
3481 The clipping region is an area to which drawing is
3482 restricted. Possible uses for the clipping region are for clipping
3483 text or for speeding up window redraws when only a known area of the
3486 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
3488 def SetClippingRegionPointSize(*args
, **kwargs
):
3490 SetClippingRegionPointSize(self, Point pt, Size sz)
3492 Sets the clipping region for this device context to the intersection
3493 of the given region described by the parameters of this method and the
3494 previously set clipping region. You should call `DestroyClippingRegion`
3495 if you want to set the clipping region exactly to the region
3498 The clipping region is an area to which drawing is
3499 restricted. Possible uses for the clipping region are for clipping
3500 text or for speeding up window redraws when only a known area of the
3503 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
3505 def SetClippingRegionAsRegion(*args
, **kwargs
):
3507 SetClippingRegionAsRegion(self, Region region)
3509 Sets the clipping region for this device context to the intersection
3510 of the given region described by the parameters of this method and the
3511 previously set clipping region. You should call `DestroyClippingRegion`
3512 if you want to set the clipping region exactly to the region
3515 The clipping region is an area to which drawing is
3516 restricted. Possible uses for the clipping region are for clipping
3517 text or for speeding up window redraws when only a known area of the
3520 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
3522 def SetClippingRect(*args
, **kwargs
):
3524 SetClippingRect(self, Rect rect)
3526 Sets the clipping region for this device context to the intersection
3527 of the given region described by the parameters of this method and the
3528 previously set clipping region. You should call `DestroyClippingRegion`
3529 if you want to set the clipping region exactly to the region
3532 The clipping region is an area to which drawing is
3533 restricted. Possible uses for the clipping region are for clipping
3534 text or for speeding up window redraws when only a known area of the
3537 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
3539 def DrawLines(*args
, **kwargs
):
3541 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3543 Draws lines using a sequence of `wx.Point` objects, adding the
3544 optional offset coordinate. The current pen is used for drawing the
3547 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
3549 def DrawPolygon(*args
, **kwargs
):
3551 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3552 int fillStyle=ODDEVEN_RULE)
3554 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3555 the optional offset coordinate. The last argument specifies the fill
3556 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3558 The current pen is used for drawing the outline, and the current brush
3559 for filling the shape. Using a transparent brush suppresses
3560 filling. Note that wxWidgets automatically closes the first and last
3563 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3565 def DrawLabel(*args
, **kwargs
):
3567 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3570 Draw *text* within the specified rectangle, abiding by the alignment
3571 flags. Will additionally emphasize the character at *indexAccel* if
3574 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3576 def DrawImageLabel(*args
, **kwargs
):
3578 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3579 int indexAccel=-1) -> Rect
3581 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3582 drawing it) within the specified rectangle, abiding by the alignment
3583 flags. Will additionally emphasize the character at *indexAccel* if
3584 it is not -1. Returns the bounding rectangle.
3586 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3588 def DrawSpline(*args
, **kwargs
):
3590 DrawSpline(self, List points)
3592 Draws a spline between all given control points, (a list of `wx.Point`
3593 objects) using the current pen. The spline is drawn using a series of
3594 lines, using an algorithm taken from the X drawing program 'XFIG'.
3596 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3598 def Clear(*args
, **kwargs
):
3602 Clears the device context using the current background brush.
3604 return _gdi_
.DC_Clear(*args
, **kwargs
)
3606 def StartDoc(*args
, **kwargs
):
3608 StartDoc(self, String message) -> bool
3610 Starts a document (only relevant when outputting to a
3611 printer). *Message* is a message to show whilst printing.
3613 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3615 def EndDoc(*args
, **kwargs
):
3619 Ends a document (only relevant when outputting to a printer).
3621 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3623 def StartPage(*args
, **kwargs
):
3627 Starts a document page (only relevant when outputting to a printer).
3629 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3631 def EndPage(*args
, **kwargs
):
3635 Ends a document page (only relevant when outputting to a printer).
3637 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3639 def SetFont(*args
, **kwargs
):
3641 SetFont(self, Font font)
3643 Sets the current font for the DC. It must be a valid font, in
3644 particular you should not pass ``wx.NullFont`` to this method.
3646 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3648 def SetPen(*args
, **kwargs
):
3650 SetPen(self, Pen pen)
3652 Sets the current pen for the DC.
3654 If the argument is ``wx.NullPen``, the current pen is selected out of the
3655 device context, and the original pen restored.
3657 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3659 def SetBrush(*args
, **kwargs
):
3661 SetBrush(self, Brush brush)
3663 Sets the current brush for the DC.
3665 If the argument is ``wx.NullBrush``, the current brush is selected out
3666 of the device context, and the original brush restored, allowing the
3667 current brush to be destroyed safely.
3669 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3671 def SetBackground(*args
, **kwargs
):
3673 SetBackground(self, Brush brush)
3675 Sets the current background brush for the DC.
3677 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3679 def SetBackgroundMode(*args
, **kwargs
):
3681 SetBackgroundMode(self, int mode)
3683 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3684 determines whether text will be drawn with a background colour or
3687 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3689 def SetPalette(*args
, **kwargs
):
3691 SetPalette(self, Palette palette)
3693 If this is a window DC or memory DC, assigns the given palette to the
3694 window or bitmap associated with the DC. If the argument is
3695 ``wx.NullPalette``, the current palette is selected out of the device
3696 context, and the original palette restored.
3698 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3700 def DestroyClippingRegion(*args
, **kwargs
):
3702 DestroyClippingRegion(self)
3704 Destroys the current clipping region so that none of the DC is
3707 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3709 def GetClippingBox(*args
, **kwargs
):
3711 GetClippingBox() -> (x, y, width, height)
3713 Gets the rectangle surrounding the current clipping region.
3715 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3717 def GetClippingRect(*args
, **kwargs
):
3719 GetClippingRect(self) -> Rect
3721 Gets the rectangle surrounding the current clipping region.
3723 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3725 def GetCharHeight(*args
, **kwargs
):
3727 GetCharHeight(self) -> int
3729 Gets the character height of the currently set font.
3731 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3733 def GetCharWidth(*args
, **kwargs
):
3735 GetCharWidth(self) -> int
3737 Gets the average character width of the currently set font.
3739 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3741 def GetTextExtent(*args
, **kwargs
):
3743 GetTextExtent(wxString string) -> (width, height)
3745 Get the width and height of the text using the current font. Only
3746 works for single line strings.
3748 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3750 def GetFullTextExtent(*args
, **kwargs
):
3752 GetFullTextExtent(wxString string, Font font=None) ->
3753 (width, height, descent, externalLeading)
3755 Get the width, height, decent and leading of the text using the
3756 current or specified font. Only works for single line strings.
3758 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3760 def GetMultiLineTextExtent(*args
, **kwargs
):
3762 GetMultiLineTextExtent(wxString string, Font font=None) ->
3763 (width, height, lineHeight)
3765 Get the width, height, and line height of the text using the
3766 current or specified font. Works for single as well as multi-line
3769 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3771 def GetPartialTextExtents(*args
, **kwargs
):
3773 GetPartialTextExtents(self, text) -> [widths]
3775 Returns a list of integers such that each value is the distance in
3776 pixels from the begining of text to the coresponding character of
3777 *text*. The generic version simply builds a running total of the widths
3778 of each character using GetTextExtent, however if the various
3779 platforms have a native API function that is faster or more accurate
3780 than the generic implementation then it will be used instead.
3782 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3784 def GetSize(*args
, **kwargs
):
3786 GetSize(self) -> Size
3788 This gets the horizontal and vertical resolution in device units. It
3789 can be used to scale graphics to fit the page. For example, if *maxX*
3790 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3791 used in your application, the following code will scale the graphic to
3792 fit on the printer page::
3795 scaleX = maxX*1.0 / w
3796 scaleY = maxY*1.0 / h
3797 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3800 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3802 def GetSizeTuple(*args
, **kwargs
):
3804 GetSizeTuple() -> (width, height)
3806 This gets the horizontal and vertical resolution in device units. It
3807 can be used to scale graphics to fit the page. For example, if *maxX*
3808 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3809 used in your application, the following code will scale the graphic to
3810 fit on the printer page::
3813 scaleX = maxX*1.0 / w
3814 scaleY = maxY*1.0 / h
3815 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3818 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3820 def GetSizeMM(*args
, **kwargs
):
3822 GetSizeMM(self) -> Size
3824 Get the DC size in milimeters.
3826 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3828 def GetSizeMMTuple(*args
, **kwargs
):
3830 GetSizeMMTuple() -> (width, height)
3832 Get the DC size in milimeters.
3834 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3836 def DeviceToLogicalX(*args
, **kwargs
):
3838 DeviceToLogicalX(self, int x) -> int
3840 Convert device X coordinate to logical coordinate, using the current
3843 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
3845 def DeviceToLogicalY(*args
, **kwargs
):
3847 DeviceToLogicalY(self, int y) -> int
3849 Converts device Y coordinate to logical coordinate, using the current
3852 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
3854 def DeviceToLogicalXRel(*args
, **kwargs
):
3856 DeviceToLogicalXRel(self, int x) -> int
3858 Convert device X coordinate to relative logical coordinate, using the
3859 current mapping mode but ignoring the x axis orientation. Use this
3860 function for converting a width, for example.
3862 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
3864 def DeviceToLogicalYRel(*args
, **kwargs
):
3866 DeviceToLogicalYRel(self, int y) -> int
3868 Convert device Y coordinate to relative logical coordinate, using the
3869 current mapping mode but ignoring the y axis orientation. Use this
3870 function for converting a height, for example.
3872 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
3874 def LogicalToDeviceX(*args
, **kwargs
):
3876 LogicalToDeviceX(self, int x) -> int
3878 Converts logical X coordinate to device coordinate, using the current
3881 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
3883 def LogicalToDeviceY(*args
, **kwargs
):
3885 LogicalToDeviceY(self, int y) -> int
3887 Converts logical Y coordinate to device coordinate, using the current
3890 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
3892 def LogicalToDeviceXRel(*args
, **kwargs
):
3894 LogicalToDeviceXRel(self, int x) -> int
3896 Converts logical X coordinate to relative device coordinate, using the
3897 current mapping mode but ignoring the x axis orientation. Use this for
3898 converting a width, for example.
3900 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
3902 def LogicalToDeviceYRel(*args
, **kwargs
):
3904 LogicalToDeviceYRel(self, int y) -> int
3906 Converts logical Y coordinate to relative device coordinate, using the
3907 current mapping mode but ignoring the y axis orientation. Use this for
3908 converting a height, for example.
3910 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
3912 def CanDrawBitmap(*args
, **kwargs
):
3913 """CanDrawBitmap(self) -> bool"""
3914 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
3916 def CanGetTextExtent(*args
, **kwargs
):
3917 """CanGetTextExtent(self) -> bool"""
3918 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
3920 def GetDepth(*args
, **kwargs
):
3922 GetDepth(self) -> int
3924 Returns the colour depth of the DC.
3926 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
3928 def GetPPI(*args
, **kwargs
):
3930 GetPPI(self) -> Size
3932 Resolution in pixels per inch
3934 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
3936 def IsOk(*args
, **kwargs
):
3940 Returns true if the DC is ok to use.
3942 return _gdi_
.DC_IsOk(*args
, **kwargs
)
3945 def GetBackgroundMode(*args
, **kwargs
):
3947 GetBackgroundMode(self) -> int
3949 Returns the current background mode, either ``wx.SOLID`` or
3952 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
3954 def GetBackground(*args
, **kwargs
):
3956 GetBackground(self) -> Brush
3958 Gets the brush used for painting the background.
3960 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
3962 def GetBrush(*args
, **kwargs
):
3964 GetBrush(self) -> Brush
3966 Gets the current brush
3968 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
3970 def GetFont(*args
, **kwargs
):
3972 GetFont(self) -> Font
3974 Gets the current font
3976 return _gdi_
.DC_GetFont(*args
, **kwargs
)
3978 def GetPen(*args
, **kwargs
):
3982 Gets the current pen
3984 return _gdi_
.DC_GetPen(*args
, **kwargs
)
3986 def GetTextBackground(*args
, **kwargs
):
3988 GetTextBackground(self) -> Colour
3990 Gets the current text background colour
3992 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
3994 def GetTextForeground(*args
, **kwargs
):
3996 GetTextForeground(self) -> Colour
3998 Gets the current text foreground colour
4000 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
4002 def SetTextForeground(*args
, **kwargs
):
4004 SetTextForeground(self, Colour colour)
4006 Sets the current text foreground colour for the DC.
4008 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
4010 def SetTextBackground(*args
, **kwargs
):
4012 SetTextBackground(self, Colour colour)
4014 Sets the current text background colour for the DC.
4016 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
4018 def GetMapMode(*args
, **kwargs
):
4020 GetMapMode(self) -> int
4022 Gets the current *mapping mode* for the device context
4024 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
4026 def SetMapMode(*args
, **kwargs
):
4028 SetMapMode(self, int mode)
4030 The *mapping mode* of the device context defines the unit of
4031 measurement used to convert logical units to device units. The
4032 mapping mode can be one of the following:
4034 ================ =============================================
4035 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
4037 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
4038 wx.MM_METRIC Each logical unit is 1 mm.
4039 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
4040 wx.MM_TEXT Each logical unit is 1 pixel.
4041 ================ =============================================
4044 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
4046 def GetUserScale(*args
, **kwargs
):
4048 GetUserScale(self) -> (xScale, yScale)
4050 Gets the current user scale factor (set by `SetUserScale`).
4052 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
4054 def SetUserScale(*args
, **kwargs
):
4056 SetUserScale(self, double x, double y)
4058 Sets the user scaling factor, useful for applications which require
4061 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
4063 def GetLogicalScale(*args
, **kwargs
):
4064 """GetLogicalScale() -> (xScale, yScale)"""
4065 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
4067 def SetLogicalScale(*args
, **kwargs
):
4068 """SetLogicalScale(self, double x, double y)"""
4069 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
4071 def GetLogicalOrigin(*args
, **kwargs
):
4072 """GetLogicalOrigin(self) -> Point"""
4073 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
4075 def GetLogicalOriginTuple(*args
, **kwargs
):
4076 """GetLogicalOriginTuple() -> (x,y)"""
4077 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
4079 def SetLogicalOrigin(*args
, **kwargs
):
4080 """SetLogicalOrigin(self, int x, int y)"""
4081 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
4083 def SetLogicalOriginPoint(*args
, **kwargs
):
4084 """SetLogicalOriginPoint(self, Point point)"""
4085 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
4087 def GetDeviceOrigin(*args
, **kwargs
):
4088 """GetDeviceOrigin(self) -> Point"""
4089 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
4091 def GetDeviceOriginTuple(*args
, **kwargs
):
4092 """GetDeviceOriginTuple() -> (x,y)"""
4093 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
4095 def SetDeviceOrigin(*args
, **kwargs
):
4096 """SetDeviceOrigin(self, int x, int y)"""
4097 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
4099 def SetDeviceOriginPoint(*args
, **kwargs
):
4100 """SetDeviceOriginPoint(self, Point point)"""
4101 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
4103 def SetAxisOrientation(*args
, **kwargs
):
4105 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
4107 Sets the x and y axis orientation (i.e., the direction from lowest to
4108 highest values on the axis). The default orientation is the natural
4109 orientation, e.g. x axis from left to right and y axis from bottom up.
4111 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
4113 def GetLogicalFunction(*args
, **kwargs
):
4115 GetLogicalFunction(self) -> int
4117 Gets the current logical function (set by `SetLogicalFunction`).
4119 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
4121 def SetLogicalFunction(*args
, **kwargs
):
4123 SetLogicalFunction(self, int function)
4125 Sets the current logical function for the device context. This
4126 determines how a source pixel (from a pen or brush colour, or source
4127 device context if using `Blit`) combines with a destination pixel in
4128 the current device context.
4130 The possible values and their meaning in terms of source and
4131 destination pixel values are as follows:
4133 ================ ==========================
4135 wx.AND_INVERT (NOT src) AND dst
4136 wx.AND_REVERSE src AND (NOT dst)
4139 wx.EQUIV (NOT src) XOR dst
4141 wx.NAND (NOT src) OR (NOT dst)
4142 wx.NOR (NOT src) AND (NOT dst)
4145 wx.OR_INVERT (NOT src) OR dst
4146 wx.OR_REVERSE src OR (NOT dst)
4148 wx.SRC_INVERT NOT src
4150 ================ ==========================
4152 The default is wx.COPY, which simply draws with the current
4153 colour. The others combine the current colour and the background using
4154 a logical operation. wx.INVERT is commonly used for drawing rubber
4155 bands or moving outlines, since drawing twice reverts to the original
4159 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
4161 def ComputeScaleAndOrigin(*args
, **kwargs
):
4163 ComputeScaleAndOrigin(self)
4165 Performs all necessary computations for given platform and context
4166 type after each change of scale and origin parameters. Usually called
4167 automatically internally after such changes.
4170 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
4172 def SetOptimization(self
, optimize
):
4174 def GetOptimization(self
):
4177 SetOptimization
= wx
._deprecated
(SetOptimization
)
4178 GetOptimization
= wx
._deprecated
(GetOptimization
)
4180 def CalcBoundingBox(*args
, **kwargs
):
4182 CalcBoundingBox(self, int x, int y)
4184 Adds the specified point to the bounding box which can be retrieved
4185 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4187 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
4189 def CalcBoundingBoxPoint(*args
, **kwargs
):
4191 CalcBoundingBoxPoint(self, Point point)
4193 Adds the specified point to the bounding box which can be retrieved
4194 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4196 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
4198 def ResetBoundingBox(*args
, **kwargs
):
4200 ResetBoundingBox(self)
4202 Resets the bounding box: after a call to this function, the bounding
4203 box doesn't contain anything.
4205 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
4207 def MinX(*args
, **kwargs
):
4211 Gets the minimum horizontal extent used in drawing commands so far.
4213 return _gdi_
.DC_MinX(*args
, **kwargs
)
4215 def MaxX(*args
, **kwargs
):
4219 Gets the maximum horizontal extent used in drawing commands so far.
4221 return _gdi_
.DC_MaxX(*args
, **kwargs
)
4223 def MinY(*args
, **kwargs
):
4227 Gets the minimum vertical extent used in drawing commands so far.
4229 return _gdi_
.DC_MinY(*args
, **kwargs
)
4231 def MaxY(*args
, **kwargs
):
4235 Gets the maximum vertical extent used in drawing commands so far.
4237 return _gdi_
.DC_MaxY(*args
, **kwargs
)
4239 def GetBoundingBox(*args
, **kwargs
):
4241 GetBoundingBox() -> (x1,y1, x2,y2)
4243 Returns the min and max points used in drawing commands so far.
4245 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
4247 def __nonzero__(self
): return self
.IsOk()
4248 def GetLayoutDirection(*args
, **kwargs
):
4250 GetLayoutDirection(self) -> int
4252 Get the layout direction (LTR or RTL)_ for this dc. On platforms
4253 where RTL layout is supported, the return value will either be
4254 ``wx.Layout_LeftToRight`` or ``wx.Layout_RightToLeft``.
4255 ``wx.Layout_Default`` is returned if layout direction is not
4258 return _gdi_
.DC_GetLayoutDirection(*args
, **kwargs
)
4260 def SetLayoutDirection(*args
, **kwargs
):
4262 SetLayoutDirection(self, int dir)
4264 Change the layout direction for this dc.
4266 return _gdi_
.DC_SetLayoutDirection(*args
, **kwargs
)
4268 def _DrawPointList(*args
, **kwargs
):
4269 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4270 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
4272 def _DrawLineList(*args
, **kwargs
):
4273 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4274 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
4276 def _DrawRectangleList(*args
, **kwargs
):
4277 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4278 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
4280 def _DrawEllipseList(*args
, **kwargs
):
4281 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4282 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
4284 def _DrawPolygonList(*args
, **kwargs
):
4285 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4286 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
4288 def _DrawTextList(*args
, **kwargs
):
4290 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4291 PyObject backgroundList) -> PyObject
4293 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
4295 def DrawPointList(self
, points
, pens
=None):
4297 Draw a list of points as quickly as possible.
4299 :param points: A sequence of 2-element sequences representing
4300 each point to draw, (x,y).
4301 :param pens: If None, then the current pen is used. If a
4302 single pen then it will be used for all points. If
4303 a list of pens then there should be one for each point
4308 elif isinstance(pens
, wx
.Pen
):
4310 elif len(pens
) != len(points
):
4311 raise ValueError('points and pens must have same length')
4312 return self
._DrawPointList
(points
, pens
, [])
4315 def DrawLineList(self
, lines
, pens
=None):
4317 Draw a list of lines as quickly as possible.
4319 :param lines: A sequence of 4-element sequences representing
4320 each line to draw, (x1,y1, x2,y2).
4321 :param pens: If None, then the current pen is used. If a
4322 single pen then it will be used for all lines. If
4323 a list of pens then there should be one for each line
4328 elif isinstance(pens
, wx
.Pen
):
4330 elif len(pens
) != len(lines
):
4331 raise ValueError('lines and pens must have same length')
4332 return self
._DrawLineList
(lines
, pens
, [])
4335 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
4337 Draw a list of rectangles as quickly as possible.
4339 :param rectangles: A sequence of 4-element sequences representing
4340 each rectangle to draw, (x,y, w,h).
4341 :param pens: If None, then the current pen is used. If a
4342 single pen then it will be used for all rectangles.
4343 If a list of pens then there should be one for each
4344 rectangle in rectangles.
4345 :param brushes: A brush or brushes to be used to fill the rectagles,
4346 with similar semantics as the pens parameter.
4350 elif isinstance(pens
, wx
.Pen
):
4352 elif len(pens
) != len(rectangles
):
4353 raise ValueError('rectangles and pens must have same length')
4356 elif isinstance(brushes
, wx
.Brush
):
4358 elif len(brushes
) != len(rectangles
):
4359 raise ValueError('rectangles and brushes must have same length')
4360 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
4363 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
4365 Draw a list of ellipses as quickly as possible.
4367 :param ellipses: A sequence of 4-element sequences representing
4368 each ellipse to draw, (x,y, w,h).
4369 :param pens: If None, then the current pen is used. If a
4370 single pen then it will be used for all ellipses.
4371 If a list of pens then there should be one for each
4372 ellipse in ellipses.
4373 :param brushes: A brush or brushes to be used to fill the ellipses,
4374 with similar semantics as the pens parameter.
4378 elif isinstance(pens
, wx
.Pen
):
4380 elif len(pens
) != len(ellipses
):
4381 raise ValueError('ellipses and pens must have same length')
4384 elif isinstance(brushes
, wx
.Brush
):
4386 elif len(brushes
) != len(ellipses
):
4387 raise ValueError('ellipses and brushes must have same length')
4388 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
4391 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
4393 Draw a list of polygons, each of which is a list of points.
4395 :param polygons: A sequence of sequences of sequences.
4396 [[(x1,y1),(x2,y2),(x3,y3)...],
4397 [(x1,y1),(x2,y2),(x3,y3)...]]
4399 :param pens: If None, then the current pen is used. If a
4400 single pen then it will be used for all polygons.
4401 If a list of pens then there should be one for each
4403 :param brushes: A brush or brushes to be used to fill the polygons,
4404 with similar semantics as the pens parameter.
4408 elif isinstance(pens
, wx
.Pen
):
4410 elif len(pens
) != len(polygons
):
4411 raise ValueError('polygons and pens must have same length')
4414 elif isinstance(brushes
, wx
.Brush
):
4416 elif len(brushes
) != len(polygons
):
4417 raise ValueError('polygons and brushes must have same length')
4418 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
4421 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
4423 Draw a list of strings using a list of coordinants for positioning each string.
4425 :param textList: A list of strings
4426 :param coords: A list of (x,y) positions
4427 :param foregrounds: A list of `wx.Colour` objects to use for the
4428 foregrounds of the strings.
4429 :param backgrounds: A list of `wx.Colour` objects to use for the
4430 backgrounds of the strings.
4432 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4433 If you want backgrounds to do anything.
4435 if type(textList
) == type(''):
4436 textList
= [textList
]
4437 elif len(textList
) != len(coords
):
4438 raise ValueError('textlist and coords must have same length')
4439 if foregrounds
is None:
4441 elif isinstance(foregrounds
, wx
.Colour
):
4442 foregrounds
= [foregrounds
]
4443 elif len(foregrounds
) != len(coords
):
4444 raise ValueError('foregrounds and coords must have same length')
4445 if backgrounds
is None:
4447 elif isinstance(backgrounds
, wx
.Colour
):
4448 backgrounds
= [backgrounds
]
4449 elif len(backgrounds
) != len(coords
):
4450 raise ValueError('backgrounds and coords must have same length')
4451 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
4453 Background
= property(GetBackground
,SetBackground
,doc
="See `GetBackground` and `SetBackground`")
4454 BackgroundMode
= property(GetBackgroundMode
,SetBackgroundMode
,doc
="See `GetBackgroundMode` and `SetBackgroundMode`")
4455 BoundingBox
= property(GetBoundingBox
,doc
="See `GetBoundingBox`")
4456 Brush
= property(GetBrush
,SetBrush
,doc
="See `GetBrush` and `SetBrush`")
4457 CharHeight
= property(GetCharHeight
,doc
="See `GetCharHeight`")
4458 CharWidth
= property(GetCharWidth
,doc
="See `GetCharWidth`")
4459 ClippingBox
= property(GetClippingBox
,doc
="See `GetClippingBox`")
4460 ClippingRect
= property(GetClippingRect
,SetClippingRect
,doc
="See `GetClippingRect` and `SetClippingRect`")
4461 Depth
= property(GetDepth
,doc
="See `GetDepth`")
4462 DeviceOrigin
= property(GetDeviceOrigin
,SetDeviceOrigin
,doc
="See `GetDeviceOrigin` and `SetDeviceOrigin`")
4463 Font
= property(GetFont
,SetFont
,doc
="See `GetFont` and `SetFont`")
4464 FullTextExtent
= property(GetFullTextExtent
,doc
="See `GetFullTextExtent`")
4465 LogicalFunction
= property(GetLogicalFunction
,SetLogicalFunction
,doc
="See `GetLogicalFunction` and `SetLogicalFunction`")
4466 LogicalOrigin
= property(GetLogicalOrigin
,SetLogicalOrigin
,doc
="See `GetLogicalOrigin` and `SetLogicalOrigin`")
4467 LogicalScale
= property(GetLogicalScale
,SetLogicalScale
,doc
="See `GetLogicalScale` and `SetLogicalScale`")
4468 MapMode
= property(GetMapMode
,SetMapMode
,doc
="See `GetMapMode` and `SetMapMode`")
4469 MultiLineTextExtent
= property(GetMultiLineTextExtent
,doc
="See `GetMultiLineTextExtent`")
4470 Optimization
= property(GetOptimization
,SetOptimization
,doc
="See `GetOptimization` and `SetOptimization`")
4471 PPI
= property(GetPPI
,doc
="See `GetPPI`")
4472 PartialTextExtents
= property(GetPartialTextExtents
,doc
="See `GetPartialTextExtents`")
4473 Pen
= property(GetPen
,SetPen
,doc
="See `GetPen` and `SetPen`")
4474 Pixel
= property(GetPixel
,doc
="See `GetPixel`")
4475 PixelPoint
= property(GetPixelPoint
,doc
="See `GetPixelPoint`")
4476 Size
= property(GetSize
,doc
="See `GetSize`")
4477 SizeMM
= property(GetSizeMM
,doc
="See `GetSizeMM`")
4478 TextBackground
= property(GetTextBackground
,SetTextBackground
,doc
="See `GetTextBackground` and `SetTextBackground`")
4479 TextExtent
= property(GetTextExtent
,doc
="See `GetTextExtent`")
4480 TextForeground
= property(GetTextForeground
,SetTextForeground
,doc
="See `GetTextForeground` and `SetTextForeground`")
4481 UserScale
= property(GetUserScale
,SetUserScale
,doc
="See `GetUserScale` and `SetUserScale`")
4482 LayoutDirection
= property(GetLayoutDirection
,SetLayoutDirection
)
4483 _gdi_
.DC_swigregister(DC
)
4485 #---------------------------------------------------------------------------
4487 class DCTextColourChanger(object):
4489 wx.DCTextColourChanger can be used to temporarily change the DC text
4490 colour and restore it automatically when the object goes out of scope
4492 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4493 __repr__
= _swig_repr
4494 def __init__(self
, *args
, **kwargs
):
4496 __init__(self, DC dc, Colour col) -> DCTextColourChanger
4498 wx.DCTextColourChanger can be used to temporarily change the DC text
4499 colour and restore it automatically when the object goes out of scope
4501 _gdi_
.DCTextColourChanger_swiginit(self
,_gdi_
.new_DCTextColourChanger(*args
, **kwargs
))
4502 __swig_destroy__
= _gdi_
.delete_DCTextColourChanger
4503 __del__
= lambda self
: None;
4504 _gdi_
.DCTextColourChanger_swigregister(DCTextColourChanger
)
4506 class DCPenChanger(object):
4508 wx.DCPenChanger can be used to temporarily change the DC pen and
4509 restore it automatically when the object goes out of scope
4511 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4512 __repr__
= _swig_repr
4513 def __init__(self
, *args
, **kwargs
):
4515 __init__(self, DC dc, Pen pen) -> DCPenChanger
4517 wx.DCPenChanger can be used to temporarily change the DC pen and
4518 restore it automatically when the object goes out of scope
4520 _gdi_
.DCPenChanger_swiginit(self
,_gdi_
.new_DCPenChanger(*args
, **kwargs
))
4521 __swig_destroy__
= _gdi_
.delete_DCPenChanger
4522 __del__
= lambda self
: None;
4523 _gdi_
.DCPenChanger_swigregister(DCPenChanger
)
4525 class DCBrushChanger(object):
4527 wx.DCBrushChanger can be used to temporarily change the DC brush and
4528 restore it automatically when the object goes out of scope
4530 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4531 __repr__
= _swig_repr
4532 def __init__(self
, *args
, **kwargs
):
4534 __init__(self, DC dc, Brush brush) -> DCBrushChanger
4536 wx.DCBrushChanger can be used to temporarily change the DC brush and
4537 restore it automatically when the object goes out of scope
4539 _gdi_
.DCBrushChanger_swiginit(self
,_gdi_
.new_DCBrushChanger(*args
, **kwargs
))
4540 __swig_destroy__
= _gdi_
.delete_DCBrushChanger
4541 __del__
= lambda self
: None;
4542 _gdi_
.DCBrushChanger_swigregister(DCBrushChanger
)
4544 class DCClipper(object):
4546 wx.wxDCClipper sets the DC's clipping region when it is constructed,
4547 and then automatically destroys the clipping region when the clipper
4550 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4551 __repr__
= _swig_repr
4552 def __init__(self
, *args
):
4554 __init__(self, DC dc, Region r) -> DCClipper
4555 __init__(self, DC dc, Rect r) -> DCClipper
4556 __init__(self, DC dc, int x, int y, int w, int h) -> DCClipper
4558 wx.wxDCClipper sets the DC's clipping region when it is constructed,
4559 and then automatically destroys the clipping region when the clipper
4562 _gdi_
.DCClipper_swiginit(self
,_gdi_
.new_DCClipper(*args
))
4563 __swig_destroy__
= _gdi_
.delete_DCClipper
4564 __del__
= lambda self
: None;
4565 _gdi_
.DCClipper_swigregister(DCClipper
)
4567 #---------------------------------------------------------------------------
4571 A wxScreenDC can be used to paint anywhere on the screen. This should
4572 normally be constructed as a temporary stack object; don't store a
4576 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4577 __repr__
= _swig_repr
4578 def __init__(self
, *args
, **kwargs
):
4580 __init__(self) -> ScreenDC
4582 A wxScreenDC can be used to paint anywhere on the screen. This should
4583 normally be constructed as a temporary stack object; don't store a
4587 _gdi_
.ScreenDC_swiginit(self
,_gdi_
.new_ScreenDC(*args
, **kwargs
))
4588 def StartDrawingOnTopWin(*args
, **kwargs
):
4590 StartDrawingOnTopWin(self, Window window) -> bool
4592 Specify that the area of the screen to be drawn upon coincides with
4595 :see: `EndDrawingOnTop`
4597 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4599 def StartDrawingOnTop(*args
, **kwargs
):
4601 StartDrawingOnTop(self, Rect rect=None) -> bool
4603 Specify that the area is the given rectangle, or the whole screen if
4606 :see: `EndDrawingOnTop`
4608 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4610 def EndDrawingOnTop(*args
, **kwargs
):
4612 EndDrawingOnTop(self) -> bool
4614 Use this in conjunction with `StartDrawingOnTop` or
4615 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4616 top of existing windows. Without this, some window systems (such as X)
4617 only allow drawing to take place underneath other windows.
4619 You might use this pair of functions when implementing a drag feature,
4620 for example as in the `wx.SplitterWindow` implementation.
4622 These functions are probably obsolete since the X implementations
4623 allow drawing directly on the screen now. However, the fact that this
4624 function allows the screen to be refreshed afterwards may be useful
4625 to some applications.
4627 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4629 _gdi_
.ScreenDC_swigregister(ScreenDC
)
4631 #---------------------------------------------------------------------------
4635 A wx.WindowDC must be constructed if an application wishes to paint on
4636 the whole area of a window (client and decorations). This should
4637 normally be constructed as a temporary stack object; don't store a
4640 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4641 __repr__
= _swig_repr
4642 def __init__(self
, *args
, **kwargs
):
4644 __init__(self, Window win) -> WindowDC
4646 Constructor. Pass the window on which you wish to paint.
4648 _gdi_
.WindowDC_swiginit(self
,_gdi_
.new_WindowDC(*args
, **kwargs
))
4649 _gdi_
.WindowDC_swigregister(WindowDC
)
4651 #---------------------------------------------------------------------------
4653 class ClientDC(WindowDC
):
4655 A wx.ClientDC must be constructed if an application wishes to paint on
4656 the client area of a window from outside an EVT_PAINT event. This should
4657 normally be constructed as a temporary stack object; don't store a
4658 wx.ClientDC object long term.
4660 To draw on a window from within an EVT_PAINT handler, construct a
4661 `wx.PaintDC` object.
4663 To draw on the whole window including decorations, construct a
4664 `wx.WindowDC` object (Windows only).
4667 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4668 __repr__
= _swig_repr
4669 def __init__(self
, *args
, **kwargs
):
4671 __init__(self, Window win) -> ClientDC
4673 Constructor. Pass the window on which you wish to paint.
4675 _gdi_
.ClientDC_swiginit(self
,_gdi_
.new_ClientDC(*args
, **kwargs
))
4676 _gdi_
.ClientDC_swigregister(ClientDC
)
4678 #---------------------------------------------------------------------------
4680 class PaintDC(ClientDC
):
4682 A wx.PaintDC must be constructed if an application wishes to paint on
4683 the client area of a window from within an EVT_PAINT event
4684 handler. This should normally be constructed as a temporary stack
4685 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4686 handler, you **must** create a wx.PaintDC object within it even if you
4687 don't actually use it.
4689 Using wx.PaintDC within EVT_PAINT handlers is important because it
4690 automatically sets the clipping area to the damaged area of the
4691 window. Attempts to draw outside this area do not appear.
4693 To draw on a window from outside EVT_PAINT handlers, construct a
4694 `wx.ClientDC` object.
4697 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4698 __repr__
= _swig_repr
4699 def __init__(self
, *args
, **kwargs
):
4701 __init__(self, Window win) -> PaintDC
4703 Constructor. Pass the window on which you wish to paint.
4705 _gdi_
.PaintDC_swiginit(self
,_gdi_
.new_PaintDC(*args
, **kwargs
))
4706 _gdi_
.PaintDC_swigregister(PaintDC
)
4708 #---------------------------------------------------------------------------
4710 class MemoryDC(WindowDC
):
4712 A memory device context provides a means to draw graphics onto a
4713 bitmap. A bitmap must be selected into the new memory DC before it may
4714 be used for anything. Typical usage is as follows::
4717 dc.SelectObject(bitmap)
4718 # draw on the dc using any of the Draw methods
4719 dc.SelectObject(wx.NullBitmap)
4720 # the bitmap now contains wahtever was drawn upon it
4722 Note that the memory DC *must* be deleted (or the bitmap selected out
4723 of it) before a bitmap can be reselected into another memory DC.
4726 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4727 __repr__
= _swig_repr
4728 def __init__(self
, *args
, **kwargs
):
4730 __init__(self, Bitmap bitmap=NullBitmap) -> MemoryDC
4732 Constructs a new memory device context.
4734 Use the Ok member to test whether the constructor was successful in
4735 creating a usable device context. If a bitmap is not given to this
4736 constructor then don't forget to select a bitmap into the DC before
4739 _gdi_
.MemoryDC_swiginit(self
,_gdi_
.new_MemoryDC(*args
, **kwargs
))
4740 def SelectObject(*args
, **kwargs
):
4742 SelectObject(self, Bitmap bitmap)
4744 Selects the bitmap into the device context, to use as the memory
4745 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4746 the DC, and therefore the bitmap, and also to use Blit to copy the
4749 If the argument is wx.NullBitmap (or some other uninitialised
4750 `wx.Bitmap`) the current bitmap is selected out of the device context,
4751 and the original bitmap restored, allowing the current bitmap to be
4754 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
4756 def SelectObjectAsSource(*args
, **kwargs
):
4757 """SelectObjectAsSource(self, Bitmap bmp)"""
4758 return _gdi_
.MemoryDC_SelectObjectAsSource(*args
, **kwargs
)
4760 _gdi_
.MemoryDC_swigregister(MemoryDC
)
4762 def MemoryDCFromDC(*args
, **kwargs
):
4764 MemoryDCFromDC(DC oldDC) -> MemoryDC
4766 Creates a DC that is compatible with the oldDC.
4768 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
4771 #---------------------------------------------------------------------------
4773 BUFFER_VIRTUAL_AREA
= _gdi_
.BUFFER_VIRTUAL_AREA
4774 BUFFER_CLIENT_AREA
= _gdi_
.BUFFER_CLIENT_AREA
4775 BUFFER_USES_SHARED_BUFFER
= _gdi_
.BUFFER_USES_SHARED_BUFFER
4776 class BufferedDC(MemoryDC
):
4778 This simple class provides a simple way to avoid flicker: when drawing
4779 on it, everything is in fact first drawn on an in-memory buffer (a
4780 `wx.Bitmap`) and then copied to the screen only once, when this object
4781 is destroyed. You can either provide a buffer bitmap yourself, and
4782 reuse it the next time something needs painted, or you can let the
4783 buffered DC create and provide a buffer bitmap itself.
4785 Buffered DCs can be used in the same way as any other device context.
4786 wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to
4787 use it in your EVT_PAINT handler, you should look at
4788 `wx.BufferedPaintDC`. You can also use a wx.BufferedDC without
4789 providing a target DC. In this case the operations done on the dc
4790 will only be written to the buffer bitmap and *not* to any window, so
4791 you will want to have provided the buffer bitmap and then reuse it
4792 when it needs painted to the window.
4794 Please note that GTK+ 2.0 and OS X provide double buffering themselves
4795 natively. You may want to use `wx.Window.IsDoubleBuffered` to
4796 determine whether you need to use buffering or not, or use
4797 `wx.AutoBufferedPaintDC` to avoid needless double buffering on systems
4798 that already do it automatically.
4803 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4804 __repr__
= _swig_repr
4805 def __init__(self
, *args
):
4807 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4808 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4810 Constructs a buffered DC.
4812 _gdi_
.BufferedDC_swiginit(self
,_gdi_
.new_BufferedDC(*args
))
4813 # save a ref so the other dc will not be deleted before self
4815 # also save a ref to the bitmap
4816 if len(args
) > 1: self
.__bmp
= args
[1]
4819 __swig_destroy__
= _gdi_
.delete_BufferedDC
4820 __del__
= lambda self
: None;
4821 def UnMask(*args
, **kwargs
):
4825 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4826 can be effectively used once only). This is usually only called in
4829 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
4831 def SetStyle(*args
, **kwargs
):
4832 """SetStyle(self, int style)"""
4833 return _gdi_
.BufferedDC_SetStyle(*args
, **kwargs
)
4835 def GetStyle(*args
, **kwargs
):
4836 """GetStyle(self) -> int"""
4837 return _gdi_
.BufferedDC_GetStyle(*args
, **kwargs
)
4839 _gdi_
.BufferedDC_swigregister(BufferedDC
)
4841 class BufferedPaintDC(BufferedDC
):
4843 This is a subclass of `wx.BufferedDC` which can be used inside of an
4844 EVT_PAINT event handler. Just create an object of this class instead
4845 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4846 flicker. The only thing to watch out for is that if you are using this
4847 class together with `wx.ScrolledWindow`, you probably do **not** want
4848 to call `wx.Window.PrepareDC` on it as it already does this internally
4849 for the real underlying `wx.PaintDC`.
4851 If your window is already fully buffered in a `wx.Bitmap` then your
4852 EVT_PAINT handler can be as simple as just creating a
4853 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4854 automatically when it is destroyed. For example::
4856 def OnPaint(self, event):
4857 dc = wx.BufferedPaintDC(self, self.buffer)
4862 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4863 __repr__
= _swig_repr
4864 def __init__(self
, *args
, **kwargs
):
4866 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4868 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4869 provide the bitmap to be used for buffering or let this object create
4870 one internally (in the latter case, the size of the client part of the
4871 window is automatically used).
4873 _gdi_
.BufferedPaintDC_swiginit(self
,_gdi_
.new_BufferedPaintDC(*args
, **kwargs
))
4874 if len(args
) > 1: self
.__bmp
= args
[1]
4876 _gdi_
.BufferedPaintDC_swigregister(BufferedPaintDC
)
4878 #---------------------------------------------------------------------------
4880 class AutoBufferedPaintDC(DC
):
4882 If the current platform double buffers by default then this DC is the
4883 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
4885 :see: `wx.AutoBufferedPaintDCFactory`
4888 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4889 __repr__
= _swig_repr
4890 def __init__(self
, *args
, **kwargs
):
4892 __init__(self, Window win) -> AutoBufferedPaintDC
4894 If the current platform double buffers by default then this DC is the
4895 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
4897 :see: `wx.AutoBufferedPaintDCFactory`
4900 _gdi_
.AutoBufferedPaintDC_swiginit(self
,_gdi_
.new_AutoBufferedPaintDC(*args
, **kwargs
))
4901 _gdi_
.AutoBufferedPaintDC_swigregister(AutoBufferedPaintDC
)
4904 def AutoBufferedPaintDCFactory(*args
, **kwargs
):
4906 AutoBufferedPaintDCFactory(Window window) -> DC
4908 Checks if the window is natively double buffered and will return a
4909 `wx.PaintDC` if it is, a `wx.BufferedPaintDC` otherwise. The advantage of
4910 this function over `wx.AutoBufferedPaintDC` is that this function will check
4911 if the the specified window has double-buffering enabled rather than just
4912 going by platform defaults.
4914 return _gdi_
.AutoBufferedPaintDCFactory(*args
, **kwargs
)
4915 #---------------------------------------------------------------------------
4919 wx.MirrorDC is a simple wrapper class which is always associated with a
4920 real `wx.DC` object and either forwards all of its operations to it
4921 without changes (no mirroring takes place) or exchanges x and y
4922 coordinates which makes it possible to reuse the same code to draw a
4923 figure and its mirror -- i.e. reflection related to the diagonal line
4926 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4927 __repr__
= _swig_repr
4928 def __init__(self
, *args
, **kwargs
):
4930 __init__(self, DC dc, bool mirror) -> MirrorDC
4932 Creates a mirrored DC associated with the real *dc*. Everything drawn
4933 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4936 _gdi_
.MirrorDC_swiginit(self
,_gdi_
.new_MirrorDC(*args
, **kwargs
))
4937 _gdi_
.MirrorDC_swigregister(MirrorDC
)
4939 #---------------------------------------------------------------------------
4941 class PostScriptDC(DC
):
4942 """This is a `wx.DC` that can write to PostScript files on any platform."""
4943 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4944 __repr__
= _swig_repr
4945 def __init__(self
, *args
, **kwargs
):
4947 __init__(self, wxPrintData printData) -> PostScriptDC
4949 Constructs a PostScript printer device context from a `wx.PrintData`
4952 _gdi_
.PostScriptDC_swiginit(self
,_gdi_
.new_PostScriptDC(*args
, **kwargs
))
4953 def GetPrintData(*args
, **kwargs
):
4954 """GetPrintData(self) -> wxPrintData"""
4955 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
4957 def SetPrintData(*args
, **kwargs
):
4958 """SetPrintData(self, wxPrintData data)"""
4959 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
4961 def SetResolution(*args
, **kwargs
):
4963 SetResolution(int ppi)
4965 Set resolution (in pixels per inch) that will be used in PostScript
4966 output. Default is 720ppi.
4968 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4970 SetResolution
= staticmethod(SetResolution
)
4971 def GetResolution(*args
, **kwargs
):
4973 GetResolution() -> int
4975 Return resolution used in PostScript output.
4977 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4979 GetResolution
= staticmethod(GetResolution
)
4980 PrintData
= property(GetPrintData
,SetPrintData
,doc
="See `GetPrintData` and `SetPrintData`")
4981 _gdi_
.PostScriptDC_swigregister(PostScriptDC
)
4983 def PostScriptDC_SetResolution(*args
, **kwargs
):
4985 PostScriptDC_SetResolution(int ppi)
4987 Set resolution (in pixels per inch) that will be used in PostScript
4988 output. Default is 720ppi.
4990 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4992 def PostScriptDC_GetResolution(*args
):
4994 PostScriptDC_GetResolution() -> int
4996 Return resolution used in PostScript output.
4998 return _gdi_
.PostScriptDC_GetResolution(*args
)
5000 #---------------------------------------------------------------------------
5002 class MetaFile(_core
.Object
):
5003 """Proxy of C++ MetaFile class"""
5004 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5005 __repr__
= _swig_repr
5006 def __init__(self
, *args
, **kwargs
):
5007 """__init__(self, String filename=EmptyString) -> MetaFile"""
5008 _gdi_
.MetaFile_swiginit(self
,_gdi_
.new_MetaFile(*args
, **kwargs
))
5009 _gdi_
.MetaFile_swigregister(MetaFile
)
5011 class MetaFileDC(DC
):
5012 """Proxy of C++ MetaFileDC class"""
5013 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5014 __repr__
= _swig_repr
5015 def __init__(self
, *args
, **kwargs
):
5017 __init__(self, String filename=EmptyString, int width=0, int height=0,
5018 String description=EmptyString) -> MetaFileDC
5020 _gdi_
.MetaFileDC_swiginit(self
,_gdi_
.new_MetaFileDC(*args
, **kwargs
))
5021 _gdi_
.MetaFileDC_swigregister(MetaFileDC
)
5023 class PrinterDC(DC
):
5024 """Proxy of C++ PrinterDC class"""
5025 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5026 __repr__
= _swig_repr
5027 def __init__(self
, *args
, **kwargs
):
5028 """__init__(self, wxPrintData printData) -> PrinterDC"""
5029 _gdi_
.PrinterDC_swiginit(self
,_gdi_
.new_PrinterDC(*args
, **kwargs
))
5030 _gdi_
.PrinterDC_swigregister(PrinterDC
)
5032 class SVGFileDC(DC
):
5033 """Proxy of C++ SVGFileDC class"""
5034 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5035 def __init__(self
): raise AttributeError, "No constructor defined"
5036 __repr__
= _swig_repr
5037 _gdi_
.SVGFileDC_swigregister(SVGFileDC
)
5039 #---------------------------------------------------------------------------
5041 class GraphicsObject(_core
.Object
):
5043 This class is the superclass of native graphics objects like pens
5044 etc. It provides the internal reference counting. It is not to be
5045 instantiated by user code.
5047 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5048 __repr__
= _swig_repr
5049 def __init__(self
, *args
, **kwargs
):
5051 __init__(self, GraphicsRenderer renderer=None) -> GraphicsObject
5053 This class is the superclass of native graphics objects like pens
5054 etc. It provides the internal reference counting. It is not to be
5055 instantiated by user code.
5057 _gdi_
.GraphicsObject_swiginit(self
,_gdi_
.new_GraphicsObject(*args
, **kwargs
))
5058 __swig_destroy__
= _gdi_
.delete_GraphicsObject
5059 __del__
= lambda self
: None;
5060 def IsNull(*args
, **kwargs
):
5062 IsNull(self) -> bool
5064 Is this object valid (false) or still empty (true)?
5066 return _gdi_
.GraphicsObject_IsNull(*args
, **kwargs
)
5068 def GetRenderer(*args
, **kwargs
):
5070 GetRenderer(self) -> GraphicsRenderer
5072 Returns the renderer that was used to create this instance, or
5073 ``None`` if it has not been initialized yet.
5075 return _gdi_
.GraphicsObject_GetRenderer(*args
, **kwargs
)
5077 _gdi_
.GraphicsObject_swigregister(GraphicsObject
)
5079 class GraphicsPen(GraphicsObject
):
5081 A wx.GraphicsPen is a native representation of a pen. It is used for
5082 stroking a path on a `wx.GraphicsContext`. The contents are specific and
5083 private to the respective renderer. The only way to get a valid instance
5084 is via a CreatePen call on the graphics context or the renderer
5087 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5088 __repr__
= _swig_repr
5089 def __init__(self
, *args
, **kwargs
):
5091 __init__(self) -> GraphicsPen
5093 A wx.GraphicsPen is a native representation of a pen. It is used for
5094 stroking a path on a `wx.GraphicsContext`. The contents are specific and
5095 private to the respective renderer. The only way to get a valid instance
5096 is via a CreatePen call on the graphics context or the renderer
5099 _gdi_
.GraphicsPen_swiginit(self
,_gdi_
.new_GraphicsPen(*args
, **kwargs
))
5100 __swig_destroy__
= _gdi_
.delete_GraphicsPen
5101 __del__
= lambda self
: None;
5102 _gdi_
.GraphicsPen_swigregister(GraphicsPen
)
5104 class GraphicsBrush(GraphicsObject
):
5106 A wx.GraphicsBrush is a native representation of a brush. It is used
5107 for filling a path on a `wx.GraphicsContext`. The contents are
5108 specific and private to the respective renderer. The only way to get a
5109 valid instance is via a Create...Brush call on the graphics context or
5110 the renderer instance.
5112 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5113 __repr__
= _swig_repr
5114 def __init__(self
, *args
, **kwargs
):
5116 __init__(self) -> GraphicsBrush
5118 A wx.GraphicsBrush is a native representation of a brush. It is used
5119 for filling a path on a `wx.GraphicsContext`. The contents are
5120 specific and private to the respective renderer. The only way to get a
5121 valid instance is via a Create...Brush call on the graphics context or
5122 the renderer instance.
5124 _gdi_
.GraphicsBrush_swiginit(self
,_gdi_
.new_GraphicsBrush(*args
, **kwargs
))
5125 __swig_destroy__
= _gdi_
.delete_GraphicsBrush
5126 __del__
= lambda self
: None;
5127 _gdi_
.GraphicsBrush_swigregister(GraphicsBrush
)
5129 class GraphicsFont(GraphicsObject
):
5131 A `wx.GraphicsFont` is a native representation of a font (including
5132 text colour). The contents are specific an private to the respective
5133 renderer. The only way to get a valid instance is via a CreateFont
5134 call on the graphics context or the renderer instance.
5136 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5137 __repr__
= _swig_repr
5138 def __init__(self
, *args
, **kwargs
):
5140 __init__(self) -> GraphicsFont
5142 A `wx.GraphicsFont` is a native representation of a font (including
5143 text colour). The contents are specific an private to the respective
5144 renderer. The only way to get a valid instance is via a CreateFont
5145 call on the graphics context or the renderer instance.
5147 _gdi_
.GraphicsFont_swiginit(self
,_gdi_
.new_GraphicsFont(*args
, **kwargs
))
5148 __swig_destroy__
= _gdi_
.delete_GraphicsFont
5149 __del__
= lambda self
: None;
5150 _gdi_
.GraphicsFont_swigregister(GraphicsFont
)
5152 class GraphicsMatrix(GraphicsObject
):
5154 A wx.GraphicsMatrix is a native representation of an affine
5155 matrix. The contents are specific and private to the respective
5156 renderer. The only way to get a valid instance is via a CreateMatrix
5157 call on the graphics context or the renderer instance.
5159 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5160 def __init__(self
): raise AttributeError, "No constructor defined"
5161 __repr__
= _swig_repr
5162 __swig_destroy__
= _gdi_
.delete_GraphicsMatrix
5163 __del__
= lambda self
: None;
5164 def Concat(*args
, **kwargs
):
5166 Concat(self, GraphicsMatrix t)
5168 Concatenates the passed in matrix to the current matrix.
5170 return _gdi_
.GraphicsMatrix_Concat(*args
, **kwargs
)
5172 def Set(*args
, **kwargs
):
5174 Set(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
5175 Double tx=0.0, Double ty=0.0)
5177 Sets the matrix to the specified values (default values are the
5180 return _gdi_
.GraphicsMatrix_Set(*args
, **kwargs
)
5182 def Get(*args
, **kwargs
):
5184 Get(self) --> (a, b, c, d, tx, ty)
5186 Gets the component values of the matrix and returns them as a tuple.
5188 return _gdi_
.GraphicsMatrix_Get(*args
, **kwargs
)
5190 def Invert(*args
, **kwargs
):
5196 return _gdi_
.GraphicsMatrix_Invert(*args
, **kwargs
)
5198 def IsEqual(*args
, **kwargs
):
5200 IsEqual(self, GraphicsMatrix t) -> bool
5202 Returns ``True`` if the elements of the transformation matrix are
5205 return _gdi_
.GraphicsMatrix_IsEqual(*args
, **kwargs
)
5207 def IsIdentity(*args
, **kwargs
):
5209 IsIdentity(self) -> bool
5211 Returns ``True`` if this is the identity matrix
5213 return _gdi_
.GraphicsMatrix_IsIdentity(*args
, **kwargs
)
5215 def Translate(*args
, **kwargs
):
5217 Translate(self, Double dx, Double dy)
5219 Add a translation to this matrix.
5221 return _gdi_
.GraphicsMatrix_Translate(*args
, **kwargs
)
5223 def Scale(*args
, **kwargs
):
5225 Scale(self, Double xScale, Double yScale)
5229 return _gdi_
.GraphicsMatrix_Scale(*args
, **kwargs
)
5231 def Rotate(*args
, **kwargs
):
5233 Rotate(self, Double angle)
5235 Rotates this matrix. The angle should be specified in radians.
5237 return _gdi_
.GraphicsMatrix_Rotate(*args
, **kwargs
)
5239 def TransformPoint(*args
, **kwargs
):
5241 TransformPoint(self, x, y) --> (x, y)
5243 Applies this matrix to a point, returns the resulting point values
5245 return _gdi_
.GraphicsMatrix_TransformPoint(*args
, **kwargs
)
5247 def TransformDistance(*args
, **kwargs
):
5249 TransformDistance(self, dx, dy) --> (dx, dy)
5251 Applies this matrix to a distance (ie. performs all transforms except
5254 return _gdi_
.GraphicsMatrix_TransformDistance(*args
, **kwargs
)
5256 def GetNativeMatrix(*args
, **kwargs
):
5258 GetNativeMatrix(self) -> void
5260 Returns the native representation of the matrix. For CoreGraphics this
5261 is a CFAffineMatrix pointer. For GDIPlus a Matrix Pointer and for
5262 Cairo a cairo_matrix_t pointer. NOTE: For wxPython we still need a
5263 way to make this value usable.
5265 return _gdi_
.GraphicsMatrix_GetNativeMatrix(*args
, **kwargs
)
5267 _gdi_
.GraphicsMatrix_swigregister(GraphicsMatrix
)
5269 class GraphicsPath(GraphicsObject
):
5270 """Proxy of C++ GraphicsPath class"""
5271 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5272 def __init__(self
): raise AttributeError, "No constructor defined"
5273 __repr__
= _swig_repr
5274 __swig_destroy__
= _gdi_
.delete_GraphicsPath
5275 __del__
= lambda self
: None;
5276 def MoveToPoint(*args
):
5278 MoveToPoint(self, Double x, Double y)
5279 MoveToPoint(self, Point2D p)
5281 Begins a new subpath at the specified point.
5283 return _gdi_
.GraphicsPath_MoveToPoint(*args
)
5285 def AddLineToPoint(*args
):
5287 AddLineToPoint(self, Double x, Double y)
5288 AddLineToPoint(self, Point2D p)
5290 Adds a straight line from the current point to the specified point.
5292 return _gdi_
.GraphicsPath_AddLineToPoint(*args
)
5294 def AddCurveToPoint(*args
):
5296 AddCurveToPoint(self, Double cx1, Double cy1, Double cx2, Double cy2, Double x,
5298 AddCurveToPoint(self, Point2D c1, Point2D c2, Point2D e)
5300 Adds a cubic Bezier curve from the current point, using two control
5301 points and an end point
5303 return _gdi_
.GraphicsPath_AddCurveToPoint(*args
)
5305 def AddPath(*args
, **kwargs
):
5307 AddPath(self, GraphicsPath path)
5311 return _gdi_
.GraphicsPath_AddPath(*args
, **kwargs
)
5313 def CloseSubpath(*args
, **kwargs
):
5317 Closes the current sub-path.
5319 return _gdi_
.GraphicsPath_CloseSubpath(*args
, **kwargs
)
5321 def GetCurrentPoint(*args
, **kwargs
):
5323 GetCurrentPoint(self) -> Point2D
5325 Gets the last point of the current path, (0,0) if not yet set
5327 return _gdi_
.GraphicsPath_GetCurrentPoint(*args
, **kwargs
)
5331 AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle,
5332 bool clockwise=True)
5333 AddArc(self, Point2D c, Double r, Double startAngle, Double endAngle,
5334 bool clockwise=True)
5336 Adds an arc of a circle centering at (x,y) with radius (r) from
5337 startAngle to endAngle
5339 return _gdi_
.GraphicsPath_AddArc(*args
)
5341 def AddQuadCurveToPoint(*args
, **kwargs
):
5343 AddQuadCurveToPoint(self, Double cx, Double cy, Double x, Double y)
5345 Adds a quadratic Bezier curve from the current point, using a control
5346 point and an end point
5348 return _gdi_
.GraphicsPath_AddQuadCurveToPoint(*args
, **kwargs
)
5350 def AddRectangle(*args
, **kwargs
):
5352 AddRectangle(self, Double x, Double y, Double w, Double h)
5354 Appends a rectangle as a new closed subpath.
5356 return _gdi_
.GraphicsPath_AddRectangle(*args
, **kwargs
)
5358 def AddCircle(*args
, **kwargs
):
5360 AddCircle(self, Double x, Double y, Double r)
5362 Appends a circle around (x,y) with radius r as a new closed subpath.
5364 return _gdi_
.GraphicsPath_AddCircle(*args
, **kwargs
)
5366 def AddArcToPoint(*args
, **kwargs
):
5368 AddArcToPoint(self, Double x1, Double y1, Double x2, Double y2, Double r)
5370 Appends an arc to two tangents connecting (current) to (x1,y1) and
5371 (x1,y1) to (x2,y2), also a straight line from (current) to (x1,y1)
5373 return _gdi_
.GraphicsPath_AddArcToPoint(*args
, **kwargs
)
5375 def AddEllipse(*args
, **kwargs
):
5377 AddEllipse(self, Double x, Double y, Double w, Double h)
5379 Appends an ellipse fitting into the passed in rectangle.
5381 return _gdi_
.GraphicsPath_AddEllipse(*args
, **kwargs
)
5383 def AddRoundedRectangle(*args
, **kwargs
):
5385 AddRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)
5387 Appends a rounded rectangle.
5389 return _gdi_
.GraphicsPath_AddRoundedRectangle(*args
, **kwargs
)
5391 def GetNativePath(*args
, **kwargs
):
5393 GetNativePath(self) -> void
5395 Returns the native path (CGPathRef for Core Graphics, Path pointer for
5396 GDIPlus and a cairo_path_t pointer for cairo). NOTE: For wxPython we
5397 still need a way to make this value usable.
5399 return _gdi_
.GraphicsPath_GetNativePath(*args
, **kwargs
)
5401 def UnGetNativePath(*args
, **kwargs
):
5403 UnGetNativePath(self, void p)
5405 Gives back the native path returned by GetNativePath() because there
5406 might be some deallocations necessary (eg on cairo the native path
5407 returned by GetNativePath is newly allocated each time).
5409 return _gdi_
.GraphicsPath_UnGetNativePath(*args
, **kwargs
)
5411 def Transform(*args
, **kwargs
):
5413 Transform(self, GraphicsMatrix matrix)
5415 Transforms each point of this path by the matrix
5417 return _gdi_
.GraphicsPath_Transform(*args
, **kwargs
)
5419 def GetBox(*args
, **kwargs
):
5421 GetBox(self) -> Rect2D
5423 Gets the bounding box enclosing all points (possibly including control
5426 return _gdi_
.GraphicsPath_GetBox(*args
, **kwargs
)
5428 def Contains(*args
):
5430 Contains(self, Double x, Double y, int fillStyle=ODDEVEN_RULE) -> bool
5431 Contains(self, Point2D c, int fillStyle=ODDEVEN_RULE) -> bool
5433 Returns ``True`` if the point is within the path.
5435 return _gdi_
.GraphicsPath_Contains(*args
)
5437 _gdi_
.GraphicsPath_swigregister(GraphicsPath
)
5439 class GraphicsContext(GraphicsObject
):
5441 A `wx.GraphicsContext` instance is the object that is drawn upon. It is
5442 created by a renderer using the CreateContext calls, this can be done
5443 either directly using a renderer instance, or indirectly using the
5444 static convenience CreateXXX functions of wx.GraphicsContext that
5445 always delegate the task to the default renderer.
5447 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5448 def __init__(self
): raise AttributeError, "No constructor defined"
5449 __repr__
= _swig_repr
5450 __swig_destroy__
= _gdi_
.delete_GraphicsContext
5451 __del__
= lambda self
: None;
5454 Create(WindowDC dc) -> GraphicsContext
5455 Create(Window window) -> GraphicsContext
5457 Creates a wx.GraphicsContext either from a window or a DC.
5459 val
= _gdi_
.GraphicsContext_Create(*args
)
5460 val
.__dc
= args
[0] # save a ref so the dc will not be deleted before self
5463 Create
= staticmethod(Create
)
5464 def CreateMeasuringContext(*args
):
5466 CreateMeasuringContext() -> GraphicsContext
5468 Create a lightwieght context that can be used for measuring text only.
5470 val
= _gdi_
.GraphicsContext_CreateMeasuringContext(*args
)
5471 val
.__dc
= args
[0] # save a ref so the dc will not be deleted before self
5474 CreateMeasuringContext
= staticmethod(CreateMeasuringContext
)
5475 def CreateFromNative(*args
, **kwargs
):
5477 CreateFromNative(void context) -> GraphicsContext
5479 Creates a wx.GraphicsContext from a native context. This native
5480 context must be eg a CGContextRef for Core Graphics, a Graphics
5481 pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For
5482 wxPython we still need a way to make this value usable.
5484 return _gdi_
.GraphicsContext_CreateFromNative(*args
, **kwargs
)
5486 CreateFromNative
= staticmethod(CreateFromNative
)
5487 def CreateFromNativeWindow(*args
, **kwargs
):
5489 CreateFromNativeWindow(void window) -> GraphicsContext
5491 Creates a wx.GraphicsContext from a native window. NOTE: For wxPython
5492 we still need a way to make this value usable.
5494 return _gdi_
.GraphicsContext_CreateFromNativeWindow(*args
, **kwargs
)
5496 CreateFromNativeWindow
= staticmethod(CreateFromNativeWindow
)
5497 def CreatePath(*args
, **kwargs
):
5499 CreatePath(self) -> GraphicsPath
5501 Creates a native graphics path which is initially empty.
5503 return _gdi_
.GraphicsContext_CreatePath(*args
, **kwargs
)
5505 def CreatePen(*args
, **kwargs
):
5507 CreatePen(self, Pen pen) -> GraphicsPen
5509 Creates a native pen from a `wx.Pen`.
5511 return _gdi_
.GraphicsContext_CreatePen(*args
, **kwargs
)
5513 def CreateBrush(*args
, **kwargs
):
5515 CreateBrush(self, Brush brush) -> GraphicsBrush
5517 Creates a native brush from a `wx.Brush`.
5519 return _gdi_
.GraphicsContext_CreateBrush(*args
, **kwargs
)
5521 def CreateLinearGradientBrush(*args
, **kwargs
):
5523 CreateLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, Colour c1,
5524 Colour c2) -> GraphicsBrush
5526 Creates a native brush, having a linear gradient, starting at (x1,y1)
5527 with color c1 to (x2,y2) with color c2.
5529 return _gdi_
.GraphicsContext_CreateLinearGradientBrush(*args
, **kwargs
)
5531 def CreateRadialGradientBrush(*args
, **kwargs
):
5533 CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
5534 Colour oColor, Colour cColor) -> GraphicsBrush
5536 Creates a native brush, having a radial gradient originating at point
5537 (xo,yc) with color oColour and ends on a circle around (xc,yc) with
5538 radius r and color cColour.
5540 return _gdi_
.GraphicsContext_CreateRadialGradientBrush(*args
, **kwargs
)
5542 def CreateFont(*args
, **kwargs
):
5544 CreateFont(self, Font font, Colour col=*wxBLACK) -> GraphicsFont
5546 Creates a native graphics font from a `wx.Font` and a text colour.
5548 return _gdi_
.GraphicsContext_CreateFont(*args
, **kwargs
)
5550 def CreateMatrix(*args
, **kwargs
):
5552 CreateMatrix(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
5553 Double tx=0.0, Double ty=0.0) -> GraphicsMatrix
5555 Creates a native affine transformation matrix from the passed in
5556 values. The defaults result in an identity matrix.
5558 return _gdi_
.GraphicsContext_CreateMatrix(*args
, **kwargs
)
5560 def PushState(*args
, **kwargs
):
5564 Push the current state of the context, (ie the transformation matrix)
5567 return _gdi_
.GraphicsContext_PushState(*args
, **kwargs
)
5569 def PopState(*args
, **kwargs
):
5573 Pops a stored state from the stack
5575 return _gdi_
.GraphicsContext_PopState(*args
, **kwargs
)
5577 def ClipRegion(*args
, **kwargs
):
5579 ClipRegion(self, Region region)
5581 Clips drawings to the region, combined to current clipping region.
5583 return _gdi_
.GraphicsContext_ClipRegion(*args
, **kwargs
)
5585 def Clip(*args
, **kwargs
):
5587 Clip(self, Double x, Double y, Double w, Double h)
5589 Clips drawings to the rectangle.
5591 return _gdi_
.GraphicsContext_Clip(*args
, **kwargs
)
5593 def ResetClip(*args
, **kwargs
):
5597 Resets the clipping to original shape.
5599 return _gdi_
.GraphicsContext_ResetClip(*args
, **kwargs
)
5601 def GetNativeContext(*args
, **kwargs
):
5603 GetNativeContext(self) -> void
5605 Returns the native context (CGContextRef for Core Graphics, Graphics
5606 pointer for GDIPlus and cairo_t pointer for cairo).
5608 return _gdi_
.GraphicsContext_GetNativeContext(*args
, **kwargs
)
5610 def GetLogicalFunction(*args
, **kwargs
):
5612 GetLogicalFunction(self) -> int
5614 Returns the current logical function.
5616 return _gdi_
.GraphicsContext_GetLogicalFunction(*args
, **kwargs
)
5618 def SetLogicalFunction(*args
, **kwargs
):
5620 SetLogicalFunction(self, int function) -> bool
5622 Sets the current logical function, returns ``True`` if it supported
5624 return _gdi_
.GraphicsContext_SetLogicalFunction(*args
, **kwargs
)
5626 def Translate(*args
, **kwargs
):
5628 Translate(self, Double dx, Double dy)
5630 Translates the current transformation matrix.
5632 return _gdi_
.GraphicsContext_Translate(*args
, **kwargs
)
5634 def Scale(*args
, **kwargs
):
5636 Scale(self, Double xScale, Double yScale)
5638 Scale the current transformation matrix of the context.
5640 return _gdi_
.GraphicsContext_Scale(*args
, **kwargs
)
5642 def Rotate(*args
, **kwargs
):
5644 Rotate(self, Double angle)
5646 Rotate the current transformation matrix of the context. ``angle`` is
5647 specified in radians.
5649 return _gdi_
.GraphicsContext_Rotate(*args
, **kwargs
)
5651 def ConcatTransform(*args
, **kwargs
):
5653 ConcatTransform(self, GraphicsMatrix matrix)
5655 Concatenates the passed in transform with the current transform of
5658 return _gdi_
.GraphicsContext_ConcatTransform(*args
, **kwargs
)
5660 def SetTransform(*args
, **kwargs
):
5662 SetTransform(self, GraphicsMatrix matrix)
5664 Sets the current transform of this context.
5666 return _gdi_
.GraphicsContext_SetTransform(*args
, **kwargs
)
5668 def GetTransform(*args
, **kwargs
):
5670 GetTransform(self) -> GraphicsMatrix
5672 Gets the current transformation matrix of this context.
5674 return _gdi_
.GraphicsContext_GetTransform(*args
, **kwargs
)
5678 SetPen(self, GraphicsPen pen)
5679 SetPen(self, Pen pen)
5683 return _gdi_
.GraphicsContext_SetPen(*args
)
5685 def SetBrush(*args
):
5687 SetBrush(self, GraphicsBrush brush)
5688 SetBrush(self, Brush brush)
5690 Sets the brush for filling
5692 return _gdi_
.GraphicsContext_SetBrush(*args
)
5696 SetFont(self, GraphicsFont font)
5697 SetFont(self, Font font, Colour colour=*wxBLACK)
5701 return _gdi_
.GraphicsContext_SetFont(*args
)
5703 def StrokePath(*args
, **kwargs
):
5705 StrokePath(self, GraphicsPath path)
5707 Strokes along a path with the current pen.
5709 return _gdi_
.GraphicsContext_StrokePath(*args
, **kwargs
)
5711 def FillPath(*args
, **kwargs
):
5713 FillPath(self, GraphicsPath path, int fillStyle=ODDEVEN_RULE)
5715 Fills a path with the current brush.
5717 return _gdi_
.GraphicsContext_FillPath(*args
, **kwargs
)
5719 def DrawPath(*args
, **kwargs
):
5721 DrawPath(self, GraphicsPath path, int fillStyle=ODDEVEN_RULE)
5723 Draws the path by first filling and then stroking.
5725 return _gdi_
.GraphicsContext_DrawPath(*args
, **kwargs
)
5727 def DrawText(*args
, **kwargs
):
5729 DrawText(self, String str, Double x, Double y, GraphicsBrush backgroundBrush=NullGraphicsBrush)
5731 Draws a text string at the defined position.
5733 return _gdi_
.GraphicsContext_DrawText(*args
, **kwargs
)
5735 def DrawRotatedText(*args
, **kwargs
):
5737 DrawRotatedText(self, String str, Double x, Double y, Double angle, GraphicsBrush backgroundBrush=NullGraphicsBrush)
5739 Draws a text string at the defined position, at the specified angle,
5740 which is given in radians.
5742 return _gdi_
.GraphicsContext_DrawRotatedText(*args
, **kwargs
)
5744 def GetFullTextExtent(*args
, **kwargs
):
5746 GetFullTextExtent(self, text) --> (width, height, descent, externalLeading)
5748 Gets the dimensions of the string using the currently selected
5749 font. ``text`` is the string to measure, ``w`` and ``h`` are the total
5750 width and height respectively, ``descent`` is the dimension from the
5751 baseline of the font to the bottom of the descender, and
5752 ``externalLeading`` is any extra vertical space added to the font by
5753 the font designer (usually is zero).
5755 return _gdi_
.GraphicsContext_GetFullTextExtent(*args
, **kwargs
)
5757 def GetTextExtent(*args
, **kwargs
):
5759 GetTextExtent(self, text) --> (width, height)
5761 Gets the dimensions of the string using the currently selected
5762 font. ``text`` is the string to measure, ``w`` and ``h`` are the total
5763 width and height respectively.
5765 return _gdi_
.GraphicsContext_GetTextExtent(*args
, **kwargs
)
5767 def GetPartialTextExtents(*args
, **kwargs
):
5769 GetPartialTextExtents(self, text) -> [widths]
5771 Returns a list of widths from the beginning of ``text`` to the
5772 coresponding character in ``text``.
5774 return _gdi_
.GraphicsContext_GetPartialTextExtents(*args
, **kwargs
)
5776 def DrawBitmap(*args
, **kwargs
):
5778 DrawBitmap(self, Bitmap bmp, Double x, Double y, Double w, Double h)
5780 Draws the bitmap. In case of a mono bitmap, this is treated as a mask
5781 and the current brush is used for filling.
5783 return _gdi_
.GraphicsContext_DrawBitmap(*args
, **kwargs
)
5785 def DrawIcon(*args
, **kwargs
):
5787 DrawIcon(self, Icon icon, Double x, Double y, Double w, Double h)
5791 return _gdi_
.GraphicsContext_DrawIcon(*args
, **kwargs
)
5793 def StrokeLine(*args
, **kwargs
):
5795 StrokeLine(self, Double x1, Double y1, Double x2, Double y2)
5797 Strokes a single line.
5799 return _gdi_
.GraphicsContext_StrokeLine(*args
, **kwargs
)
5801 def StrokeLines(*args
, **kwargs
):
5803 StrokeLines(self, List points)
5805 Stroke lines connecting each of the points
5807 return _gdi_
.GraphicsContext_StrokeLines(*args
, **kwargs
)
5809 def StrokeLineSegements(*args
, **kwargs
):
5811 StrokeLineSegments(self, List beginPoints, List endPoints)
5813 Stroke disconnected lines from begin to end points
5815 return _gdi_
.GraphicsContext_StrokeLineSegements(*args
, **kwargs
)
5817 def DrawLines(*args
, **kwargs
):
5819 DrawLines(self, size_t points, int fillStyle=ODDEVEN_RULE)
5823 return _gdi_
.GraphicsContext_DrawLines(*args
, **kwargs
)
5825 def DrawRectangle(*args
, **kwargs
):
5827 DrawRectangle(self, Double x, Double y, Double w, Double h)
5831 return _gdi_
.GraphicsContext_DrawRectangle(*args
, **kwargs
)
5833 def DrawEllipse(*args
, **kwargs
):
5835 DrawEllipse(self, Double x, Double y, Double w, Double h)
5839 return _gdi_
.GraphicsContext_DrawEllipse(*args
, **kwargs
)
5841 def DrawRoundedRectangle(*args
, **kwargs
):
5843 DrawRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)
5845 Draws a rounded rectangle
5847 return _gdi_
.GraphicsContext_DrawRoundedRectangle(*args
, **kwargs
)
5849 def ShouldOffset(*args
, **kwargs
):
5851 ShouldOffset(self) -> bool
5853 helper to determine if a 0.5 offset should be applied for the drawing operation
5855 return _gdi_
.GraphicsContext_ShouldOffset(*args
, **kwargs
)
5857 _gdi_
.GraphicsContext_swigregister(GraphicsContext
)
5859 NullGraphicsPen
= cvar
.NullGraphicsPen
5860 NullGraphicsBrush
= cvar
.NullGraphicsBrush
5861 NullGraphicsFont
= cvar
.NullGraphicsFont
5862 NullGraphicsMatrix
= cvar
.NullGraphicsMatrix
5863 NullGraphicsPath
= cvar
.NullGraphicsPath
5865 def GraphicsContext_Create(*args
):
5867 Create(WindowDC dc) -> GraphicsContext
5868 GraphicsContext_Create(Window window) -> GraphicsContext
5870 Creates a wx.GraphicsContext either from a window or a DC.
5872 val
= _gdi_
.GraphicsContext_Create(*args
)
5873 val
.__dc
= args
[0] # save a ref so the dc will not be deleted before self
5876 def GraphicsContext_CreateMeasuringContext(*args
):
5878 GraphicsContext_CreateMeasuringContext() -> GraphicsContext
5880 Create a lightwieght context that can be used for measuring text only.
5882 val
= _gdi_
.GraphicsContext_CreateMeasuringContext(*args
)
5883 val
.__dc
= args
[0] # save a ref so the dc will not be deleted before self
5886 def GraphicsContext_CreateFromNative(*args
, **kwargs
):
5888 GraphicsContext_CreateFromNative(void context) -> GraphicsContext
5890 Creates a wx.GraphicsContext from a native context. This native
5891 context must be eg a CGContextRef for Core Graphics, a Graphics
5892 pointer for GDIPlus or a cairo_t pointer for Cairo. NOTE: For
5893 wxPython we still need a way to make this value usable.
5895 return _gdi_
.GraphicsContext_CreateFromNative(*args
, **kwargs
)
5897 def GraphicsContext_CreateFromNativeWindow(*args
, **kwargs
):
5899 GraphicsContext_CreateFromNativeWindow(void window) -> GraphicsContext
5901 Creates a wx.GraphicsContext from a native window. NOTE: For wxPython
5902 we still need a way to make this value usable.
5904 return _gdi_
.GraphicsContext_CreateFromNativeWindow(*args
, **kwargs
)
5906 class GraphicsRenderer(_core
.Object
):
5907 """Proxy of C++ GraphicsRenderer class"""
5908 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5909 def __init__(self
): raise AttributeError, "No constructor defined"
5910 __repr__
= _swig_repr
5911 __swig_destroy__
= _gdi_
.delete_GraphicsRenderer
5912 __del__
= lambda self
: None;
5913 def GetDefaultRenderer(*args
, **kwargs
):
5914 """GetDefaultRenderer() -> GraphicsRenderer"""
5915 return _gdi_
.GraphicsRenderer_GetDefaultRenderer(*args
, **kwargs
)
5917 GetDefaultRenderer
= staticmethod(GetDefaultRenderer
)
5918 def CreateContext(*args
):
5920 CreateContext(self, WindowDC dc) -> GraphicsContext
5921 CreateContext(self, Window window) -> GraphicsContext
5923 return _gdi_
.GraphicsRenderer_CreateContext(*args
)
5925 def CreateMeasuringContext(*args
, **kwargs
):
5926 """CreateMeasuringContext(self) -> GraphicsContext"""
5927 return _gdi_
.GraphicsRenderer_CreateMeasuringContext(*args
, **kwargs
)
5929 def CreateContextFromNativeContext(*args
, **kwargs
):
5930 """CreateContextFromNativeContext(self, void context) -> GraphicsContext"""
5931 return _gdi_
.GraphicsRenderer_CreateContextFromNativeContext(*args
, **kwargs
)
5933 def CreateContextFromNativeWindow(*args
, **kwargs
):
5934 """CreateContextFromNativeWindow(self, void window) -> GraphicsContext"""
5935 return _gdi_
.GraphicsRenderer_CreateContextFromNativeWindow(*args
, **kwargs
)
5937 def CreatePath(*args
, **kwargs
):
5938 """CreatePath(self) -> GraphicsPath"""
5939 return _gdi_
.GraphicsRenderer_CreatePath(*args
, **kwargs
)
5941 def CreateMatrix(*args
, **kwargs
):
5943 CreateMatrix(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
5944 Double tx=0.0, Double ty=0.0) -> GraphicsMatrix
5946 return _gdi_
.GraphicsRenderer_CreateMatrix(*args
, **kwargs
)
5948 def CreatePen(*args
, **kwargs
):
5949 """CreatePen(self, Pen pen) -> GraphicsPen"""
5950 return _gdi_
.GraphicsRenderer_CreatePen(*args
, **kwargs
)
5952 def CreateBrush(*args
, **kwargs
):
5953 """CreateBrush(self, Brush brush) -> GraphicsBrush"""
5954 return _gdi_
.GraphicsRenderer_CreateBrush(*args
, **kwargs
)
5956 def CreateLinearGradientBrush(*args
, **kwargs
):
5958 CreateLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, Colour c1,
5959 Colour c2) -> GraphicsBrush
5961 return _gdi_
.GraphicsRenderer_CreateLinearGradientBrush(*args
, **kwargs
)
5963 def CreateRadialGradientBrush(*args
, **kwargs
):
5965 CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
5966 Colour oColor, Colour cColor) -> GraphicsBrush
5968 return _gdi_
.GraphicsRenderer_CreateRadialGradientBrush(*args
, **kwargs
)
5970 def CreateFont(*args
, **kwargs
):
5971 """CreateFont(self, Font font, Colour col=*wxBLACK) -> GraphicsFont"""
5972 return _gdi_
.GraphicsRenderer_CreateFont(*args
, **kwargs
)
5974 _gdi_
.GraphicsRenderer_swigregister(GraphicsRenderer
)
5976 def GraphicsRenderer_GetDefaultRenderer(*args
):
5977 """GraphicsRenderer_GetDefaultRenderer() -> GraphicsRenderer"""
5978 return _gdi_
.GraphicsRenderer_GetDefaultRenderer(*args
)
5981 """Proxy of C++ GCDC class"""
5982 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5983 __repr__
= _swig_repr
5984 def __init__(self
, *args
):
5986 __init__(self, WindowDC dc) -> GCDC
5987 __init__(self, Window window) -> GCDC
5989 _gdi_
.GCDC_swiginit(self
,_gdi_
.new_GCDC(*args
))
5990 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
5992 __swig_destroy__
= _gdi_
.delete_GCDC
5993 __del__
= lambda self
: None;
5994 def GetGraphicsContext(*args
, **kwargs
):
5995 """GetGraphicsContext(self) -> GraphicsContext"""
5996 return _gdi_
.GCDC_GetGraphicsContext(*args
, **kwargs
)
5998 def SetGraphicsContext(*args
, **kwargs
):
5999 """SetGraphicsContext(self, GraphicsContext ctx)"""
6000 return _gdi_
.GCDC_SetGraphicsContext(*args
, **kwargs
)
6002 GraphicsContext
= property(GetGraphicsContext
,SetGraphicsContext
)
6003 _gdi_
.GCDC_swigregister(GCDC
)
6005 class Overlay(object):
6006 """Proxy of C++ Overlay class"""
6007 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6008 __repr__
= _swig_repr
6009 def __init__(self
, *args
, **kwargs
):
6010 """__init__(self) -> Overlay"""
6011 _gdi_
.Overlay_swiginit(self
,_gdi_
.new_Overlay(*args
, **kwargs
))
6012 __swig_destroy__
= _gdi_
.delete_Overlay
6013 __del__
= lambda self
: None;
6014 def Reset(*args
, **kwargs
):
6016 return _gdi_
.Overlay_Reset(*args
, **kwargs
)
6018 _gdi_
.Overlay_swigregister(Overlay
)
6020 class DCOverlay(object):
6021 """Proxy of C++ DCOverlay class"""
6022 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6023 __repr__
= _swig_repr
6024 def __init__(self
, *args
):
6026 __init__(self, Overlay overlay, WindowDC dc, int x, int y, int width,
6027 int height) -> DCOverlay
6028 __init__(self, Overlay overlay, WindowDC dc) -> DCOverlay
6030 _gdi_
.DCOverlay_swiginit(self
,_gdi_
.new_DCOverlay(*args
))
6031 __swig_destroy__
= _gdi_
.delete_DCOverlay
6032 __del__
= lambda self
: None;
6033 def Clear(*args
, **kwargs
):
6035 return _gdi_
.DCOverlay_Clear(*args
, **kwargs
)
6037 _gdi_
.DCOverlay_swigregister(DCOverlay
)
6039 #---------------------------------------------------------------------------
6041 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
6042 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
6043 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
6044 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
6045 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
6046 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
6047 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
6048 class ImageList(_core
.Object
):
6049 """Proxy of C++ ImageList class"""
6050 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6051 __repr__
= _swig_repr
6052 def __init__(self
, *args
, **kwargs
):
6053 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
6054 _gdi_
.ImageList_swiginit(self
,_gdi_
.new_ImageList(*args
, **kwargs
))
6055 __swig_destroy__
= _gdi_
.delete_ImageList
6056 __del__
= lambda self
: None;
6057 def Add(*args
, **kwargs
):
6058 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
6059 return _gdi_
.ImageList_Add(*args
, **kwargs
)
6061 def AddWithColourMask(*args
, **kwargs
):
6062 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
6063 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
6065 def AddIcon(*args
, **kwargs
):
6066 """AddIcon(self, Icon icon) -> int"""
6067 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
6069 def GetBitmap(*args
, **kwargs
):
6070 """GetBitmap(self, int index) -> Bitmap"""
6071 return _gdi_
.ImageList_GetBitmap(*args
, **kwargs
)
6073 def GetIcon(*args
, **kwargs
):
6074 """GetIcon(self, int index) -> Icon"""
6075 return _gdi_
.ImageList_GetIcon(*args
, **kwargs
)
6077 def Replace(*args
, **kwargs
):
6078 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
6079 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
6081 def Draw(*args
, **kwargs
):
6083 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
6084 bool solidBackground=False) -> bool
6086 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
6088 def GetImageCount(*args
, **kwargs
):
6089 """GetImageCount(self) -> int"""
6090 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
6092 def Remove(*args
, **kwargs
):
6093 """Remove(self, int index) -> bool"""
6094 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
6096 def RemoveAll(*args
, **kwargs
):
6097 """RemoveAll(self) -> bool"""
6098 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
6100 def GetSize(*args
, **kwargs
):
6101 """GetSize(index) -> (width,height)"""
6102 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
6104 ImageCount
= property(GetImageCount
,doc
="See `GetImageCount`")
6105 Size
= property(GetSize
,doc
="See `GetSize`")
6106 _gdi_
.ImageList_swigregister(ImageList
)
6108 #---------------------------------------------------------------------------
6110 class StockGDI(object):
6111 """Proxy of C++ StockGDI class"""
6112 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6113 __repr__
= _swig_repr
6114 BRUSH_BLACK
= _gdi_
.StockGDI_BRUSH_BLACK
6115 BRUSH_BLUE
= _gdi_
.StockGDI_BRUSH_BLUE
6116 BRUSH_CYAN
= _gdi_
.StockGDI_BRUSH_CYAN
6117 BRUSH_GREEN
= _gdi_
.StockGDI_BRUSH_GREEN
6118 BRUSH_GREY
= _gdi_
.StockGDI_BRUSH_GREY
6119 BRUSH_LIGHTGREY
= _gdi_
.StockGDI_BRUSH_LIGHTGREY
6120 BRUSH_MEDIUMGREY
= _gdi_
.StockGDI_BRUSH_MEDIUMGREY
6121 BRUSH_RED
= _gdi_
.StockGDI_BRUSH_RED
6122 BRUSH_TRANSPARENT
= _gdi_
.StockGDI_BRUSH_TRANSPARENT
6123 BRUSH_WHITE
= _gdi_
.StockGDI_BRUSH_WHITE
6124 COLOUR_BLACK
= _gdi_
.StockGDI_COLOUR_BLACK
6125 COLOUR_BLUE
= _gdi_
.StockGDI_COLOUR_BLUE
6126 COLOUR_CYAN
= _gdi_
.StockGDI_COLOUR_CYAN
6127 COLOUR_GREEN
= _gdi_
.StockGDI_COLOUR_GREEN
6128 COLOUR_LIGHTGREY
= _gdi_
.StockGDI_COLOUR_LIGHTGREY
6129 COLOUR_RED
= _gdi_
.StockGDI_COLOUR_RED
6130 COLOUR_WHITE
= _gdi_
.StockGDI_COLOUR_WHITE
6131 CURSOR_CROSS
= _gdi_
.StockGDI_CURSOR_CROSS
6132 CURSOR_HOURGLASS
= _gdi_
.StockGDI_CURSOR_HOURGLASS
6133 CURSOR_STANDARD
= _gdi_
.StockGDI_CURSOR_STANDARD
6134 FONT_ITALIC
= _gdi_
.StockGDI_FONT_ITALIC
6135 FONT_NORMAL
= _gdi_
.StockGDI_FONT_NORMAL
6136 FONT_SMALL
= _gdi_
.StockGDI_FONT_SMALL
6137 FONT_SWISS
= _gdi_
.StockGDI_FONT_SWISS
6138 PEN_BLACK
= _gdi_
.StockGDI_PEN_BLACK
6139 PEN_BLACKDASHED
= _gdi_
.StockGDI_PEN_BLACKDASHED
6140 PEN_CYAN
= _gdi_
.StockGDI_PEN_CYAN
6141 PEN_GREEN
= _gdi_
.StockGDI_PEN_GREEN
6142 PEN_GREY
= _gdi_
.StockGDI_PEN_GREY
6143 PEN_LIGHTGREY
= _gdi_
.StockGDI_PEN_LIGHTGREY
6144 PEN_MEDIUMGREY
= _gdi_
.StockGDI_PEN_MEDIUMGREY
6145 PEN_RED
= _gdi_
.StockGDI_PEN_RED
6146 PEN_TRANSPARENT
= _gdi_
.StockGDI_PEN_TRANSPARENT
6147 PEN_WHITE
= _gdi_
.StockGDI_PEN_WHITE
6148 ITEMCOUNT
= _gdi_
.StockGDI_ITEMCOUNT
6149 def __init__(self
, *args
, **kwargs
):
6150 """__init__(self) -> StockGDI"""
6151 _gdi_
.StockGDI_swiginit(self
,_gdi_
.new_StockGDI(*args
, **kwargs
))
6152 __swig_destroy__
= _gdi_
.delete_StockGDI
6153 __del__
= lambda self
: None;
6154 def DeleteAll(*args
, **kwargs
):
6156 return _gdi_
.StockGDI_DeleteAll(*args
, **kwargs
)
6158 DeleteAll
= staticmethod(DeleteAll
)
6159 def instance(*args
, **kwargs
):
6160 """instance() -> StockGDI"""
6161 return _gdi_
.StockGDI_instance(*args
, **kwargs
)
6163 instance
= staticmethod(instance
)
6164 def GetBrush(*args
, **kwargs
):
6165 """GetBrush(int item) -> Brush"""
6166 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
6168 GetBrush
= staticmethod(GetBrush
)
6169 def GetColour(*args
, **kwargs
):
6170 """GetColour(int item) -> Colour"""
6171 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
6173 GetColour
= staticmethod(GetColour
)
6174 def GetCursor(*args
, **kwargs
):
6175 """GetCursor(int item) -> Cursor"""
6176 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
6178 GetCursor
= staticmethod(GetCursor
)
6179 def GetPen(*args
, **kwargs
):
6180 """GetPen(int item) -> Pen"""
6181 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
6183 GetPen
= staticmethod(GetPen
)
6184 def GetFont(*args
, **kwargs
):
6185 """GetFont(self, int item) -> Font"""
6186 return _gdi_
.StockGDI_GetFont(*args
, **kwargs
)
6188 def _initStockObjects():
6190 wx
.ITALIC_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_ITALIC
).this
6191 wx
.NORMAL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_NORMAL
).this
6192 wx
.SMALL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SMALL
).this
6193 wx
.SWISS_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SWISS
).this
6195 wx
.BLACK_DASHED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACKDASHED
).this
6196 wx
.BLACK_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACK
).this
6197 wx
.CYAN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_CYAN
).this
6198 wx
.GREEN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREEN
).this
6199 wx
.GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREY
).this
6200 wx
.LIGHT_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_LIGHTGREY
).this
6201 wx
.MEDIUM_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_MEDIUMGREY
).this
6202 wx
.RED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_RED
).this
6203 wx
.TRANSPARENT_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_TRANSPARENT
).this
6204 wx
.WHITE_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_WHITE
).this
6206 wx
.BLACK_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLACK
).this
6207 wx
.BLUE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLUE
).this
6208 wx
.CYAN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_CYAN
).this
6209 wx
.GREEN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREEN
).this
6210 wx
.GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREY
).this
6211 wx
.LIGHT_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_LIGHTGREY
).this
6212 wx
.MEDIUM_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_MEDIUMGREY
).this
6213 wx
.RED_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_RED
).this
6214 wx
.TRANSPARENT_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_TRANSPARENT
).this
6215 wx
.WHITE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_WHITE
).this
6217 wx
.BLACK
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLACK
).this
6218 wx
.BLUE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLUE
).this
6219 wx
.CYAN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_CYAN
).this
6220 wx
.GREEN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_GREEN
).this
6221 wx
.LIGHT_GREY
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_LIGHTGREY
).this
6222 wx
.RED
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_RED
).this
6223 wx
.WHITE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_WHITE
).this
6225 wx
.CROSS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_CROSS
).this
6226 wx
.HOURGLASS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_HOURGLASS
).this
6227 wx
.STANDARD_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_STANDARD
).this
6229 wx
.TheFontList
.this
= _wxPyInitTheFontList().this
6230 wx
.ThePenList
.this
= _wxPyInitThePenList().this
6231 wx
.TheBrushList
.this
= _wxPyInitTheBrushList().this
6232 wx
.TheColourDatabase
.this
= _wxPyInitTheColourDatabase().this
6235 _initStockObjects
= staticmethod(_initStockObjects
)
6237 _gdi_
.StockGDI_swigregister(StockGDI
)
6239 def StockGDI_DeleteAll(*args
):
6240 """StockGDI_DeleteAll()"""
6241 return _gdi_
.StockGDI_DeleteAll(*args
)
6243 def StockGDI_instance(*args
):
6244 """StockGDI_instance() -> StockGDI"""
6245 return _gdi_
.StockGDI_instance(*args
)
6247 def StockGDI_GetBrush(*args
, **kwargs
):
6248 """StockGDI_GetBrush(int item) -> Brush"""
6249 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
6251 def StockGDI_GetColour(*args
, **kwargs
):
6252 """StockGDI_GetColour(int item) -> Colour"""
6253 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
6255 def StockGDI_GetCursor(*args
, **kwargs
):
6256 """StockGDI_GetCursor(int item) -> Cursor"""
6257 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
6259 def StockGDI_GetPen(*args
, **kwargs
):
6260 """StockGDI_GetPen(int item) -> Pen"""
6261 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
6263 # Create an uninitialized instance for the stock objects, they will
6264 # be initialized later when the wx.App object is created.
6265 ITALIC_FONT
= Font
.__new
__(Font
)
6266 NORMAL_FONT
= Font
.__new
__(Font
)
6267 SMALL_FONT
= Font
.__new
__(Font
)
6268 SWISS_FONT
= Font
.__new
__(Font
)
6270 BLACK_DASHED_PEN
= Pen
.__new
__(Pen
)
6271 BLACK_PEN
= Pen
.__new
__(Pen
)
6272 CYAN_PEN
= Pen
.__new
__(Pen
)
6273 GREEN_PEN
= Pen
.__new
__(Pen
)
6274 GREY_PEN
= Pen
.__new
__(Pen
)
6275 LIGHT_GREY_PEN
= Pen
.__new
__(Pen
)
6276 MEDIUM_GREY_PEN
= Pen
.__new
__(Pen
)
6277 RED_PEN
= Pen
.__new
__(Pen
)
6278 TRANSPARENT_PEN
= Pen
.__new
__(Pen
)
6279 WHITE_PEN
= Pen
.__new
__(Pen
)
6281 BLACK_BRUSH
= Brush
.__new
__(Brush
)
6282 BLUE_BRUSH
= Brush
.__new
__(Brush
)
6283 CYAN_BRUSH
= Brush
.__new
__(Brush
)
6284 GREEN_BRUSH
= Brush
.__new
__(Brush
)
6285 GREY_BRUSH
= Brush
.__new
__(Brush
)
6286 LIGHT_GREY_BRUSH
= Brush
.__new
__(Brush
)
6287 MEDIUM_GREY_BRUSH
= Brush
.__new
__(Brush
)
6288 RED_BRUSH
= Brush
.__new
__(Brush
)
6289 TRANSPARENT_BRUSH
= Brush
.__new
__(Brush
)
6290 WHITE_BRUSH
= Brush
.__new
__(Brush
)
6292 BLACK
= Colour
.__new
__(Colour
)
6293 BLUE
= Colour
.__new
__(Colour
)
6294 CYAN
= Colour
.__new
__(Colour
)
6295 GREEN
= Colour
.__new
__(Colour
)
6296 LIGHT_GREY
= Colour
.__new
__(Colour
)
6297 RED
= Colour
.__new
__(Colour
)
6298 WHITE
= Colour
.__new
__(Colour
)
6300 CROSS_CURSOR
= Cursor
.__new
__(Cursor
)
6301 HOURGLASS_CURSOR
= Cursor
.__new
__(Cursor
)
6302 STANDARD_CURSOR
= Cursor
.__new
__(Cursor
)
6304 class GDIObjListBase(object):
6305 """Proxy of C++ GDIObjListBase class"""
6306 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6307 __repr__
= _swig_repr
6308 def __init__(self
, *args
, **kwargs
):
6309 """__init__(self) -> GDIObjListBase"""
6310 _gdi_
.GDIObjListBase_swiginit(self
,_gdi_
.new_GDIObjListBase(*args
, **kwargs
))
6311 __swig_destroy__
= _gdi_
.delete_GDIObjListBase
6312 __del__
= lambda self
: None;
6313 _gdi_
.GDIObjListBase_swigregister(GDIObjListBase
)
6314 NullBitmap
= cvar
.NullBitmap
6315 NullIcon
= cvar
.NullIcon
6316 NullCursor
= cvar
.NullCursor
6317 NullPen
= cvar
.NullPen
6318 NullBrush
= cvar
.NullBrush
6319 NullPalette
= cvar
.NullPalette
6320 NullFont
= cvar
.NullFont
6321 NullColour
= cvar
.NullColour
6322 NullIconBundle
= cvar
.NullIconBundle
6324 class PenList(GDIObjListBase
):
6325 """Proxy of C++ PenList class"""
6326 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6327 def __init__(self
): raise AttributeError, "No constructor defined"
6328 __repr__
= _swig_repr
6329 def FindOrCreatePen(*args
, **kwargs
):
6330 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
6331 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
6333 _gdi_
.PenList_swigregister(PenList
)
6335 class BrushList(GDIObjListBase
):
6336 """Proxy of C++ BrushList class"""
6337 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6338 def __init__(self
): raise AttributeError, "No constructor defined"
6339 __repr__
= _swig_repr
6340 def FindOrCreateBrush(*args
, **kwargs
):
6341 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
6342 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
6344 _gdi_
.BrushList_swigregister(BrushList
)
6346 class FontList(GDIObjListBase
):
6347 """Proxy of C++ FontList class"""
6348 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6349 def __init__(self
): raise AttributeError, "No constructor defined"
6350 __repr__
= _swig_repr
6351 def FindOrCreateFont(*args
, **kwargs
):
6353 FindOrCreateFont(self, int point_size, int family, int style, int weight,
6354 bool underline=False, String facename=EmptyString,
6355 int encoding=FONTENCODING_DEFAULT) -> Font
6357 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
6359 _gdi_
.FontList_swigregister(FontList
)
6361 class ColourDatabase(object):
6362 """Proxy of C++ ColourDatabase class"""
6363 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6364 __repr__
= _swig_repr
6365 def __init__(self
, *args
, **kwargs
):
6366 """__init__(self) -> ColourDatabase"""
6367 _gdi_
.ColourDatabase_swiginit(self
,_gdi_
.new_ColourDatabase(*args
, **kwargs
))
6368 __swig_destroy__
= _gdi_
.delete_ColourDatabase
6369 __del__
= lambda self
: None;
6370 def Find(*args
, **kwargs
):
6371 """Find(self, String name) -> Colour"""
6372 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
6374 def FindName(*args
, **kwargs
):
6375 """FindName(self, Colour colour) -> String"""
6376 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
6379 def AddColour(*args
, **kwargs
):
6380 """AddColour(self, String name, Colour colour)"""
6381 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
6383 def Append(*args
, **kwargs
):
6384 """Append(self, String name, int red, int green, int blue)"""
6385 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
6387 _gdi_
.ColourDatabase_swigregister(ColourDatabase
)
6389 #---------------------------------------------------------------------------
6392 def _wxPyInitTheFontList(*args
):
6393 """_wxPyInitTheFontList() -> FontList"""
6394 return _gdi_
._wxPyInitTheFontList
(*args
)
6396 def _wxPyInitThePenList(*args
):
6397 """_wxPyInitThePenList() -> PenList"""
6398 return _gdi_
._wxPyInitThePenList
(*args
)
6400 def _wxPyInitTheBrushList(*args
):
6401 """_wxPyInitTheBrushList() -> BrushList"""
6402 return _gdi_
._wxPyInitTheBrushList
(*args
)
6404 def _wxPyInitTheColourDatabase(*args
):
6405 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
6406 return _gdi_
._wxPyInitTheColourDatabase
(*args
)
6407 # Create an uninitialized instance for the stock objects, they will
6408 # be initialized later when the wx.App object is created.
6409 TheFontList
= FontList
.__new
__(FontList
)
6410 ThePenList
= PenList
.__new
__(PenList
)
6411 TheBrushList
= BrushList
.__new
__(BrushList
)
6412 TheColourDatabase
= ColourDatabase
.__new
__(ColourDatabase
)
6414 NullColor
= NullColour
6415 #---------------------------------------------------------------------------
6417 class Effects(_core
.Object
):
6418 """Proxy of C++ Effects class"""
6419 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6420 __repr__
= _swig_repr
6421 def __init__(self
, *args
, **kwargs
):
6422 """__init__(self) -> Effects"""
6423 _gdi_
.Effects_swiginit(self
,_gdi_
.new_Effects(*args
, **kwargs
))
6424 def GetHighlightColour(*args
, **kwargs
):
6425 """GetHighlightColour(self) -> Colour"""
6426 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
6428 def GetLightShadow(*args
, **kwargs
):
6429 """GetLightShadow(self) -> Colour"""
6430 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
6432 def GetFaceColour(*args
, **kwargs
):
6433 """GetFaceColour(self) -> Colour"""
6434 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
6436 def GetMediumShadow(*args
, **kwargs
):
6437 """GetMediumShadow(self) -> Colour"""
6438 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
6440 def GetDarkShadow(*args
, **kwargs
):
6441 """GetDarkShadow(self) -> Colour"""
6442 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
6444 def SetHighlightColour(*args
, **kwargs
):
6445 """SetHighlightColour(self, Colour c)"""
6446 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
6448 def SetLightShadow(*args
, **kwargs
):
6449 """SetLightShadow(self, Colour c)"""
6450 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
6452 def SetFaceColour(*args
, **kwargs
):
6453 """SetFaceColour(self, Colour c)"""
6454 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
6456 def SetMediumShadow(*args
, **kwargs
):
6457 """SetMediumShadow(self, Colour c)"""
6458 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
6460 def SetDarkShadow(*args
, **kwargs
):
6461 """SetDarkShadow(self, Colour c)"""
6462 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
6464 def Set(*args
, **kwargs
):
6466 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
6467 Colour mediumShadow, Colour darkShadow)
6469 return _gdi_
.Effects_Set(*args
, **kwargs
)
6471 def DrawSunkenEdge(*args
, **kwargs
):
6472 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
6473 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
6475 def TileBitmap(*args
, **kwargs
):
6476 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
6477 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
6479 DarkShadow
= property(GetDarkShadow
,SetDarkShadow
,doc
="See `GetDarkShadow` and `SetDarkShadow`")
6480 FaceColour
= property(GetFaceColour
,SetFaceColour
,doc
="See `GetFaceColour` and `SetFaceColour`")
6481 HighlightColour
= property(GetHighlightColour
,SetHighlightColour
,doc
="See `GetHighlightColour` and `SetHighlightColour`")
6482 LightShadow
= property(GetLightShadow
,SetLightShadow
,doc
="See `GetLightShadow` and `SetLightShadow`")
6483 MediumShadow
= property(GetMediumShadow
,SetMediumShadow
,doc
="See `GetMediumShadow` and `SetMediumShadow`")
6484 _gdi_
.Effects_swigregister(Effects
)
6486 #---------------------------------------------------------------------------
6488 CONTROL_DISABLED
= _gdi_
.CONTROL_DISABLED
6489 CONTROL_FOCUSED
= _gdi_
.CONTROL_FOCUSED
6490 CONTROL_PRESSED
= _gdi_
.CONTROL_PRESSED
6491 CONTROL_SPECIAL
= _gdi_
.CONTROL_SPECIAL
6492 CONTROL_ISDEFAULT
= _gdi_
.CONTROL_ISDEFAULT
6493 CONTROL_ISSUBMENU
= _gdi_
.CONTROL_ISSUBMENU
6494 CONTROL_EXPANDED
= _gdi_
.CONTROL_EXPANDED
6495 CONTROL_SIZEGRIP
= _gdi_
.CONTROL_SIZEGRIP
6496 CONTROL_FLAT
= _gdi_
.CONTROL_FLAT
6497 CONTROL_CURRENT
= _gdi_
.CONTROL_CURRENT
6498 CONTROL_SELECTED
= _gdi_
.CONTROL_SELECTED
6499 CONTROL_CHECKED
= _gdi_
.CONTROL_CHECKED
6500 CONTROL_CHECKABLE
= _gdi_
.CONTROL_CHECKABLE
6501 CONTROL_UNDETERMINED
= _gdi_
.CONTROL_UNDETERMINED
6502 CONTROL_FLAGS_MASK
= _gdi_
.CONTROL_FLAGS_MASK
6503 CONTROL_DIRTY
= _gdi_
.CONTROL_DIRTY
6504 class SplitterRenderParams(object):
6506 This is just a simple struct used as a return value of
6507 `wx.RendererNative.GetSplitterParams` and contains some platform
6508 specific metrics about splitters.
6510 * widthSash: the width of the splitter sash.
6511 * border: the width of the border of the splitter window.
6512 * isHotSensitive: ``True`` if the splitter changes its
6513 appearance when the mouse is over it.
6517 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6518 __repr__
= _swig_repr
6519 def __init__(self
, *args
, **kwargs
):
6521 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
6523 This is just a simple struct used as a return value of
6524 `wx.RendererNative.GetSplitterParams` and contains some platform
6525 specific metrics about splitters.
6527 * widthSash: the width of the splitter sash.
6528 * border: the width of the border of the splitter window.
6529 * isHotSensitive: ``True`` if the splitter changes its
6530 appearance when the mouse is over it.
6534 _gdi_
.SplitterRenderParams_swiginit(self
,_gdi_
.new_SplitterRenderParams(*args
, **kwargs
))
6535 __swig_destroy__
= _gdi_
.delete_SplitterRenderParams
6536 __del__
= lambda self
: None;
6537 widthSash
= property(_gdi_
.SplitterRenderParams_widthSash_get
)
6538 border
= property(_gdi_
.SplitterRenderParams_border_get
)
6539 isHotSensitive
= property(_gdi_
.SplitterRenderParams_isHotSensitive_get
)
6540 _gdi_
.SplitterRenderParams_swigregister(SplitterRenderParams
)
6542 class HeaderButtonParams(object):
6543 """Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`"""
6544 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6545 __repr__
= _swig_repr
6546 def __init__(self
, *args
, **kwargs
):
6548 __init__(self) -> HeaderButtonParams
6550 Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`
6552 _gdi_
.HeaderButtonParams_swiginit(self
,_gdi_
.new_HeaderButtonParams(*args
, **kwargs
))
6553 __swig_destroy__
= _gdi_
.delete_HeaderButtonParams
6554 __del__
= lambda self
: None;
6555 m_arrowColour
= property(_gdi_
.HeaderButtonParams_m_arrowColour_get
, _gdi_
.HeaderButtonParams_m_arrowColour_set
)
6556 m_selectionColour
= property(_gdi_
.HeaderButtonParams_m_selectionColour_get
, _gdi_
.HeaderButtonParams_m_selectionColour_set
)
6557 m_labelText
= property(_gdi_
.HeaderButtonParams_m_labelText_get
, _gdi_
.HeaderButtonParams_m_labelText_set
)
6558 m_labelFont
= property(_gdi_
.HeaderButtonParams_m_labelFont_get
, _gdi_
.HeaderButtonParams_m_labelFont_set
)
6559 m_labelColour
= property(_gdi_
.HeaderButtonParams_m_labelColour_get
, _gdi_
.HeaderButtonParams_m_labelColour_set
)
6560 m_labelBitmap
= property(_gdi_
.HeaderButtonParams_m_labelBitmap_get
, _gdi_
.HeaderButtonParams_m_labelBitmap_set
)
6561 m_labelAlignment
= property(_gdi_
.HeaderButtonParams_m_labelAlignment_get
, _gdi_
.HeaderButtonParams_m_labelAlignment_set
)
6562 _gdi_
.HeaderButtonParams_swigregister(HeaderButtonParams
)
6564 HDR_SORT_ICON_NONE
= _gdi_
.HDR_SORT_ICON_NONE
6565 HDR_SORT_ICON_UP
= _gdi_
.HDR_SORT_ICON_UP
6566 HDR_SORT_ICON_DOWN
= _gdi_
.HDR_SORT_ICON_DOWN
6567 class RendererVersion(object):
6569 This simple struct represents the `wx.RendererNative` interface
6570 version and is only used as the return value of
6571 `wx.RendererNative.GetVersion`.
6573 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6574 __repr__
= _swig_repr
6575 def __init__(self
, *args
, **kwargs
):
6577 __init__(self, int version_, int age_) -> RendererVersion
6579 This simple struct represents the `wx.RendererNative` interface
6580 version and is only used as the return value of
6581 `wx.RendererNative.GetVersion`.
6583 _gdi_
.RendererVersion_swiginit(self
,_gdi_
.new_RendererVersion(*args
, **kwargs
))
6584 __swig_destroy__
= _gdi_
.delete_RendererVersion
6585 __del__
= lambda self
: None;
6586 Current_Version
= _gdi_
.RendererVersion_Current_Version
6587 Current_Age
= _gdi_
.RendererVersion_Current_Age
6588 def IsCompatible(*args
, **kwargs
):
6589 """IsCompatible(RendererVersion ver) -> bool"""
6590 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
6592 IsCompatible
= staticmethod(IsCompatible
)
6593 version
= property(_gdi_
.RendererVersion_version_get
)
6594 age
= property(_gdi_
.RendererVersion_age_get
)
6595 _gdi_
.RendererVersion_swigregister(RendererVersion
)
6597 def RendererVersion_IsCompatible(*args
, **kwargs
):
6598 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
6599 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
6601 class RendererNative(object):
6603 One of the design principles of wxWidgets is to use the native
6604 widgets on every platform in order to be as close as possible to
6605 the native look and feel on every platform. However there are
6606 still cases when some generic widgets are needed for various
6607 reasons, but it can sometimes take a lot of messy work to make
6608 them conform to the native LnF.
6610 The wx.RendererNative class is a collection of functions that have
6611 platform-specific implementations for drawing certain parts of
6612 genereic controls in ways that are as close to the native look as
6615 Note that each drawing function restores the `wx.DC` attributes if it
6616 changes them, so it is safe to assume that the same pen, brush and
6617 colours that were active before the call to this function are still in
6621 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6622 def __init__(self
): raise AttributeError, "No constructor defined"
6623 __repr__
= _swig_repr
6624 def DrawHeaderButton(*args
, **kwargs
):
6626 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6627 HeaderButtonParams params=None) -> int
6629 Draw a header control button (such as what is used by `wx.ListCtrl` in report
6630 mode.) The optimal size of the label (text and icons) is returned.
6632 return _gdi_
.RendererNative_DrawHeaderButton(*args
, **kwargs
)
6634 def DrawHeaderButtonContents(*args
, **kwargs
):
6636 DrawHeaderButtonContents(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6637 HeaderButtonParams params=None) -> int
6639 Draw the contents of a header control button, (label, sort
6640 arrows, etc.) Normally this is only called by `DrawHeaderButton`.
6642 return _gdi_
.RendererNative_DrawHeaderButtonContents(*args
, **kwargs
)
6644 def GetHeaderButtonHeight(*args
, **kwargs
):
6646 GetHeaderButtonHeight(self, Window win) -> int
6648 Returns the default height of a header button, either a fixed platform
6649 height if available, or a generic height based on the window's font.
6651 return _gdi_
.RendererNative_GetHeaderButtonHeight(*args
, **kwargs
)
6653 def DrawTreeItemButton(*args
, **kwargs
):
6655 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
6657 Draw the expanded/collapsed icon for a tree control item.
6659 return _gdi_
.RendererNative_DrawTreeItemButton(*args
, **kwargs
)
6661 def DrawSplitterBorder(*args
, **kwargs
):
6663 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
6665 Draw the border for a sash window: this border must be such that the
6666 sash drawn by `DrawSplitterSash` blends into it well.
6668 return _gdi_
.RendererNative_DrawSplitterBorder(*args
, **kwargs
)
6670 def DrawSplitterSash(*args
, **kwargs
):
6672 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
6675 Draw a sash. The orient parameter defines whether the sash should be
6676 vertical or horizontal and how the position should be interpreted.
6678 return _gdi_
.RendererNative_DrawSplitterSash(*args
, **kwargs
)
6680 def DrawComboBoxDropButton(*args
, **kwargs
):
6682 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
6684 Draw a button like the one used by `wx.ComboBox` to show a drop down
6685 window. The usual appearance is a downwards pointing arrow.
6687 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
6688 ``wx.CONTROL_CURRENT`` bits set.
6690 return _gdi_
.RendererNative_DrawComboBoxDropButton(*args
, **kwargs
)
6692 def DrawDropArrow(*args
, **kwargs
):
6694 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
6696 Draw a drop down arrow that is suitable for use outside a combo
6697 box. Arrow will have a transparent background.
6699 ``rect`` is not entirely filled by the arrow. Instead, you should use
6700 bounding rectangle of a drop down button which arrow matches the size
6701 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
6702 ``wx.CONTROL_CURRENT`` bit set.
6704 return _gdi_
.RendererNative_DrawDropArrow(*args
, **kwargs
)
6706 def DrawCheckBox(*args
, **kwargs
):
6708 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
6710 Draw a check button. Flags may use wx.CONTROL_CHECKED,
6711 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
6713 return _gdi_
.RendererNative_DrawCheckBox(*args
, **kwargs
)
6715 def DrawPushButton(*args
, **kwargs
):
6717 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
6719 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
6720 wx.CONTROL_ISDEFAULT
6722 return _gdi_
.RendererNative_DrawPushButton(*args
, **kwargs
)
6724 def DrawItemSelectionRect(*args
, **kwargs
):
6726 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
6728 Draw rectangle indicating that an item in e.g. a list control has been
6731 The flags parameter may be:
6733 ==================== ============================================
6734 wx.CONTROL_SELECTED item is selected, e.g. draw background
6735 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
6736 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
6737 background vs. grey otherwise
6738 ==================== ============================================
6741 return _gdi_
.RendererNative_DrawItemSelectionRect(*args
, **kwargs
)
6743 def GetSplitterParams(*args
, **kwargs
):
6745 GetSplitterParams(self, Window win) -> SplitterRenderParams
6747 Get the splitter parameters, see `wx.SplitterRenderParams`.
6749 return _gdi_
.RendererNative_GetSplitterParams(*args
, **kwargs
)
6751 def Get(*args
, **kwargs
):
6753 Get() -> RendererNative
6755 Return the currently used renderer
6757 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
6759 Get
= staticmethod(Get
)
6760 def GetGeneric(*args
, **kwargs
):
6762 GetGeneric() -> RendererNative
6764 Return the generic implementation of the renderer. Under some
6765 platforms, this is the default renderer implementation, others have
6766 platform-specific default renderer which can be retrieved by calling
6767 `wx.RendererNative.GetDefault`.
6769 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
6771 GetGeneric
= staticmethod(GetGeneric
)
6772 def GetDefault(*args
, **kwargs
):
6774 GetDefault() -> RendererNative
6776 Return the default (native) implementation for this platform -- this
6777 is also the one used by default but this may be changed by calling
6778 `wx.RendererNative.Set` in which case the return value of this method
6779 may be different from the return value of `wx.RendererNative.Get`.
6781 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
6783 GetDefault
= staticmethod(GetDefault
)
6784 def Set(*args
, **kwargs
):
6786 Set(RendererNative renderer) -> RendererNative
6788 Set the renderer to use, passing None reverts to using the default
6789 renderer. Returns the previous renderer used with Set or None.
6791 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
6793 Set
= staticmethod(Set
)
6794 def GetVersion(*args
, **kwargs
):
6796 GetVersion(self) -> RendererVersion
6798 Returns the version of the renderer. Will be used for ensuring
6799 compatibility of dynamically loaded renderers.
6801 return _gdi_
.RendererNative_GetVersion(*args
, **kwargs
)
6803 SplitterParams
= property(GetSplitterParams
,doc
="See `GetSplitterParams`")
6804 Version
= property(GetVersion
,doc
="See `GetVersion`")
6805 _gdi_
.RendererNative_swigregister(RendererNative
)
6807 def RendererNative_Get(*args
):
6809 RendererNative_Get() -> RendererNative
6811 Return the currently used renderer
6813 return _gdi_
.RendererNative_Get(*args
)
6815 def RendererNative_GetGeneric(*args
):
6817 RendererNative_GetGeneric() -> RendererNative
6819 Return the generic implementation of the renderer. Under some
6820 platforms, this is the default renderer implementation, others have
6821 platform-specific default renderer which can be retrieved by calling
6822 `wx.RendererNative.GetDefault`.
6824 return _gdi_
.RendererNative_GetGeneric(*args
)
6826 def RendererNative_GetDefault(*args
):
6828 RendererNative_GetDefault() -> RendererNative
6830 Return the default (native) implementation for this platform -- this
6831 is also the one used by default but this may be changed by calling
6832 `wx.RendererNative.Set` in which case the return value of this method
6833 may be different from the return value of `wx.RendererNative.Get`.
6835 return _gdi_
.RendererNative_GetDefault(*args
)
6837 def RendererNative_Set(*args
, **kwargs
):
6839 RendererNative_Set(RendererNative renderer) -> RendererNative
6841 Set the renderer to use, passing None reverts to using the default
6842 renderer. Returns the previous renderer used with Set or None.
6844 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
6846 #---------------------------------------------------------------------------
6848 class PseudoDC(_core
.Object
):
6850 A PseudoDC is an object that can be used as if it were a `wx.DC`. All
6851 commands issued to the PseudoDC are stored in a list. You can then
6852 play these commands back to a real DC object using the DrawToDC
6853 method. Commands in the command list are indexed by ID. You can use
6854 this to clear the operations associated with a single ID and then
6855 re-draw the object associated with that ID.
6857 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6858 __repr__
= _swig_repr
6859 def __init__(self
, *args
, **kwargs
):
6861 __init__(self) -> PseudoDC
6863 Constructs a new Pseudo device context for recording dc operations
6865 _gdi_
.PseudoDC_swiginit(self
,_gdi_
.new_PseudoDC(*args
, **kwargs
))
6866 def BeginDrawing(*args
, **kwargs
):
6870 Allows for optimization of drawing code on platforms that need it. On
6871 other platforms this is just an empty function and is harmless. To
6872 take advantage of this postential optimization simply enclose each
6873 group of calls to the drawing primitives within calls to
6874 `BeginDrawing` and `EndDrawing`.
6876 return _gdi_
.PseudoDC_BeginDrawing(*args
, **kwargs
)
6878 def EndDrawing(*args
, **kwargs
):
6882 Ends the group of drawing primitives started with `BeginDrawing`, and
6883 invokes whatever optimization is available for this DC type on the
6886 return _gdi_
.PseudoDC_EndDrawing(*args
, **kwargs
)
6888 __swig_destroy__
= _gdi_
.delete_PseudoDC
6889 __del__
= lambda self
: None;
6890 def RemoveAll(*args
, **kwargs
):
6894 Removes all objects and operations from the recorded list.
6896 return _gdi_
.PseudoDC_RemoveAll(*args
, **kwargs
)
6898 def GetLen(*args
, **kwargs
):
6902 Returns the number of operations in the recorded list.
6904 return _gdi_
.PseudoDC_GetLen(*args
, **kwargs
)
6906 def SetId(*args
, **kwargs
):
6910 Sets the id to be associated with subsequent operations.
6912 return _gdi_
.PseudoDC_SetId(*args
, **kwargs
)
6914 def ClearId(*args
, **kwargs
):
6916 ClearId(self, int id)
6918 Removes all operations associated with id so the object can be redrawn.
6920 return _gdi_
.PseudoDC_ClearId(*args
, **kwargs
)
6922 def RemoveId(*args
, **kwargs
):
6924 RemoveId(self, int id)
6926 Remove the object node (and all operations) associated with an id.
6928 return _gdi_
.PseudoDC_RemoveId(*args
, **kwargs
)
6930 def TranslateId(*args
, **kwargs
):
6932 TranslateId(self, int id, int dx, int dy)
6934 Translate the operations of id by dx,dy.
6936 return _gdi_
.PseudoDC_TranslateId(*args
, **kwargs
)
6938 def SetIdGreyedOut(*args
, **kwargs
):
6940 SetIdGreyedOut(self, int id, bool greyout=True)
6942 Set whether an object is drawn greyed out or not.
6944 return _gdi_
.PseudoDC_SetIdGreyedOut(*args
, **kwargs
)
6946 def GetIdGreyedOut(*args
, **kwargs
):
6948 GetIdGreyedOut(self, int id) -> bool
6950 Get whether an object is drawn greyed out or not.
6952 return _gdi_
.PseudoDC_GetIdGreyedOut(*args
, **kwargs
)
6954 def FindObjects(*args
, **kwargs
):
6956 FindObjects(self, int x, int y, int radius=1, Colour bg=*wxWHITE) -> PyObject
6958 Returns a list of all the id's that draw a pixel with color
6959 not equal to bg within radius of (x,y).
6960 Returns an empty list if nothing is found. The list is in
6961 reverse drawing order so list[0] is the top id.
6963 return _gdi_
.PseudoDC_FindObjects(*args
, **kwargs
)
6965 def FindObjectsByBBox(*args
, **kwargs
):
6967 FindObjectsByBBox(self, int x, int y) -> PyObject
6969 Returns a list of all the id's whose bounding boxes include (x,y).
6970 Returns an empty list if nothing is found. The list is in
6971 reverse drawing order so list[0] is the top id.
6973 return _gdi_
.PseudoDC_FindObjectsByBBox(*args
, **kwargs
)
6975 def DrawIdToDC(*args
, **kwargs
):
6977 DrawIdToDC(self, int id, DC dc)
6979 Draw recorded operations of id to dc.
6981 return _gdi_
.PseudoDC_DrawIdToDC(*args
, **kwargs
)
6983 def SetIdBounds(*args
, **kwargs
):
6985 SetIdBounds(self, int id, Rect rect)
6987 Set the bounding rect of a given object. This will create
6988 an object node if one doesn't exist.
6990 return _gdi_
.PseudoDC_SetIdBounds(*args
, **kwargs
)
6992 def GetIdBounds(*args
, **kwargs
):
6994 GetIdBounds(self, int id) -> Rect
6996 Returns the bounding rectangle previouly set with SetIdBounds. If
6997 no bounds have been set, it returns wx.Rect(0,0,0,0).
6999 return _gdi_
.PseudoDC_GetIdBounds(*args
, **kwargs
)
7001 def DrawToDCClipped(*args
, **kwargs
):
7003 DrawToDCClipped(self, DC dc, Rect rect)
7005 Draws the recorded operations to dc unless the operation is known to
7008 return _gdi_
.PseudoDC_DrawToDCClipped(*args
, **kwargs
)
7010 def DrawToDCClippedRgn(*args
, **kwargs
):
7012 DrawToDCClippedRgn(self, DC dc, Region region)
7014 Draws the recorded operations to dc unless the operation is known to
7017 return _gdi_
.PseudoDC_DrawToDCClippedRgn(*args
, **kwargs
)
7019 def DrawToDC(*args
, **kwargs
):
7021 DrawToDC(self, DC dc)
7023 Draws the recorded operations to dc.
7025 return _gdi_
.PseudoDC_DrawToDC(*args
, **kwargs
)
7027 def FloodFill(*args
, **kwargs
):
7029 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
7031 Flood fills the device context starting from the given point, using
7032 the current brush colour, and using a style:
7034 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
7035 the given colour is encountered.
7037 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
7040 Returns False if the operation failed.
7042 Note: The present implementation for non-Windows platforms may fail to
7043 find colour borders if the pixels do not match the colour
7044 exactly. However the function will still return true.
7046 return _gdi_
.PseudoDC_FloodFill(*args
, **kwargs
)
7048 def FloodFillPoint(*args
, **kwargs
):
7050 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
7052 Flood fills the device context starting from the given point, using
7053 the current brush colour, and using a style:
7055 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
7056 the given colour is encountered.
7058 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
7061 Returns False if the operation failed.
7063 Note: The present implementation for non-Windows platforms may fail to
7064 find colour borders if the pixels do not match the colour
7065 exactly. However the function will still return true.
7067 return _gdi_
.PseudoDC_FloodFillPoint(*args
, **kwargs
)
7069 def DrawLine(*args
, **kwargs
):
7071 DrawLine(self, int x1, int y1, int x2, int y2)
7073 Draws a line from the first point to the second. The current pen is
7074 used for drawing the line. Note that the second point is *not* part of
7075 the line and is not drawn by this function (this is consistent with
7076 the behaviour of many other toolkits).
7078 return _gdi_
.PseudoDC_DrawLine(*args
, **kwargs
)
7080 def DrawLinePoint(*args
, **kwargs
):
7082 DrawLinePoint(self, Point pt1, Point pt2)
7084 Draws a line from the first point to the second. The current pen is
7085 used for drawing the line. Note that the second point is *not* part of
7086 the line and is not drawn by this function (this is consistent with
7087 the behaviour of many other toolkits).
7089 return _gdi_
.PseudoDC_DrawLinePoint(*args
, **kwargs
)
7091 def CrossHair(*args
, **kwargs
):
7093 CrossHair(self, int x, int y)
7095 Displays a cross hair using the current pen. This is a vertical and
7096 horizontal line the height and width of the window, centred on the
7099 return _gdi_
.PseudoDC_CrossHair(*args
, **kwargs
)
7101 def CrossHairPoint(*args
, **kwargs
):
7103 CrossHairPoint(self, Point pt)
7105 Displays a cross hair using the current pen. This is a vertical and
7106 horizontal line the height and width of the window, centred on the
7109 return _gdi_
.PseudoDC_CrossHairPoint(*args
, **kwargs
)
7111 def DrawArc(*args
, **kwargs
):
7113 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
7115 Draws an arc of a circle, centred on the *center* point (xc, yc), from
7116 the first point to the second. The current pen is used for the outline
7117 and the current brush for filling the shape.
7119 The arc is drawn in an anticlockwise direction from the start point to
7122 return _gdi_
.PseudoDC_DrawArc(*args
, **kwargs
)
7124 def DrawArcPoint(*args
, **kwargs
):
7126 DrawArcPoint(self, Point pt1, Point pt2, Point center)
7128 Draws an arc of a circle, centred on the *center* point (xc, yc), from
7129 the first point to the second. The current pen is used for the outline
7130 and the current brush for filling the shape.
7132 The arc is drawn in an anticlockwise direction from the start point to
7135 return _gdi_
.PseudoDC_DrawArcPoint(*args
, **kwargs
)
7137 def DrawCheckMark(*args
, **kwargs
):
7139 DrawCheckMark(self, int x, int y, int width, int height)
7141 Draws a check mark inside the given rectangle.
7143 return _gdi_
.PseudoDC_DrawCheckMark(*args
, **kwargs
)
7145 def DrawCheckMarkRect(*args
, **kwargs
):
7147 DrawCheckMarkRect(self, Rect rect)
7149 Draws a check mark inside the given rectangle.
7151 return _gdi_
.PseudoDC_DrawCheckMarkRect(*args
, **kwargs
)
7153 def DrawEllipticArc(*args
, **kwargs
):
7155 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
7157 Draws an arc of an ellipse, with the given rectangle defining the
7158 bounds of the ellipse. The current pen is used for drawing the arc and
7159 the current brush is used for drawing the pie.
7161 The *start* and *end* parameters specify the start and end of the arc
7162 relative to the three-o'clock position from the center of the
7163 rectangle. Angles are specified in degrees (360 is a complete
7164 circle). Positive values mean counter-clockwise motion. If start is
7165 equal to end, a complete ellipse will be drawn.
7167 return _gdi_
.PseudoDC_DrawEllipticArc(*args
, **kwargs
)
7169 def DrawEllipticArcPointSize(*args
, **kwargs
):
7171 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
7173 Draws an arc of an ellipse, with the given rectangle defining the
7174 bounds of the ellipse. The current pen is used for drawing the arc and
7175 the current brush is used for drawing the pie.
7177 The *start* and *end* parameters specify the start and end of the arc
7178 relative to the three-o'clock position from the center of the
7179 rectangle. Angles are specified in degrees (360 is a complete
7180 circle). Positive values mean counter-clockwise motion. If start is
7181 equal to end, a complete ellipse will be drawn.
7183 return _gdi_
.PseudoDC_DrawEllipticArcPointSize(*args
, **kwargs
)
7185 def DrawPoint(*args
, **kwargs
):
7187 DrawPoint(self, int x, int y)
7189 Draws a point using the current pen.
7191 return _gdi_
.PseudoDC_DrawPoint(*args
, **kwargs
)
7193 def DrawPointPoint(*args
, **kwargs
):
7195 DrawPointPoint(self, Point pt)
7197 Draws a point using the current pen.
7199 return _gdi_
.PseudoDC_DrawPointPoint(*args
, **kwargs
)
7201 def DrawRectangle(*args
, **kwargs
):
7203 DrawRectangle(self, int x, int y, int width, int height)
7205 Draws a rectangle with the given top left corner, and with the given
7206 size. The current pen is used for the outline and the current brush
7207 for filling the shape.
7209 return _gdi_
.PseudoDC_DrawRectangle(*args
, **kwargs
)
7211 def DrawRectangleRect(*args
, **kwargs
):
7213 DrawRectangleRect(self, Rect rect)
7215 Draws a rectangle with the given top left corner, and with the given
7216 size. The current pen is used for the outline and the current brush
7217 for filling the shape.
7219 return _gdi_
.PseudoDC_DrawRectangleRect(*args
, **kwargs
)
7221 def DrawRectanglePointSize(*args
, **kwargs
):
7223 DrawRectanglePointSize(self, Point pt, Size sz)
7225 Draws a rectangle with the given top left corner, and with the given
7226 size. The current pen is used for the outline and the current brush
7227 for filling the shape.
7229 return _gdi_
.PseudoDC_DrawRectanglePointSize(*args
, **kwargs
)
7231 def DrawRoundedRectangle(*args
, **kwargs
):
7233 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
7235 Draws a rectangle with the given top left corner, and with the given
7236 size. The corners are quarter-circles using the given radius. The
7237 current pen is used for the outline and the current brush for filling
7240 If radius is positive, the value is assumed to be the radius of the
7241 rounded corner. If radius is negative, the absolute value is assumed
7242 to be the proportion of the smallest dimension of the rectangle. This
7243 means that the corner can be a sensible size relative to the size of
7244 the rectangle, and also avoids the strange effects X produces when the
7245 corners are too big for the rectangle.
7247 return _gdi_
.PseudoDC_DrawRoundedRectangle(*args
, **kwargs
)
7249 def DrawRoundedRectangleRect(*args
, **kwargs
):
7251 DrawRoundedRectangleRect(self, Rect r, double radius)
7253 Draws a rectangle with the given top left corner, and with the given
7254 size. The corners are quarter-circles using the given radius. The
7255 current pen is used for the outline and the current brush for filling
7258 If radius is positive, the value is assumed to be the radius of the
7259 rounded corner. If radius is negative, the absolute value is assumed
7260 to be the proportion of the smallest dimension of the rectangle. This
7261 means that the corner can be a sensible size relative to the size of
7262 the rectangle, and also avoids the strange effects X produces when the
7263 corners are too big for the rectangle.
7265 return _gdi_
.PseudoDC_DrawRoundedRectangleRect(*args
, **kwargs
)
7267 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
7269 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
7271 Draws a rectangle with the given top left corner, and with the given
7272 size. The corners are quarter-circles using the given radius. The
7273 current pen is used for the outline and the current brush for filling
7276 If radius is positive, the value is assumed to be the radius of the
7277 rounded corner. If radius is negative, the absolute value is assumed
7278 to be the proportion of the smallest dimension of the rectangle. This
7279 means that the corner can be a sensible size relative to the size of
7280 the rectangle, and also avoids the strange effects X produces when the
7281 corners are too big for the rectangle.
7283 return _gdi_
.PseudoDC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
7285 def DrawCircle(*args
, **kwargs
):
7287 DrawCircle(self, int x, int y, int radius)
7289 Draws a circle with the given center point and radius. The current
7290 pen is used for the outline and the current brush for filling the
7293 return _gdi_
.PseudoDC_DrawCircle(*args
, **kwargs
)
7295 def DrawCirclePoint(*args
, **kwargs
):
7297 DrawCirclePoint(self, Point pt, int radius)
7299 Draws a circle with the given center point and radius. The current
7300 pen is used for the outline and the current brush for filling the
7303 return _gdi_
.PseudoDC_DrawCirclePoint(*args
, **kwargs
)
7305 def DrawEllipse(*args
, **kwargs
):
7307 DrawEllipse(self, int x, int y, int width, int height)
7309 Draws an ellipse contained in the specified rectangle. The current pen
7310 is used for the outline and the current brush for filling the shape.
7312 return _gdi_
.PseudoDC_DrawEllipse(*args
, **kwargs
)
7314 def DrawEllipseRect(*args
, **kwargs
):
7316 DrawEllipseRect(self, Rect rect)
7318 Draws an ellipse contained in the specified rectangle. The current pen
7319 is used for the outline and the current brush for filling the shape.
7321 return _gdi_
.PseudoDC_DrawEllipseRect(*args
, **kwargs
)
7323 def DrawEllipsePointSize(*args
, **kwargs
):
7325 DrawEllipsePointSize(self, Point pt, Size sz)
7327 Draws an ellipse contained in the specified rectangle. The current pen
7328 is used for the outline and the current brush for filling the shape.
7330 return _gdi_
.PseudoDC_DrawEllipsePointSize(*args
, **kwargs
)
7332 def DrawIcon(*args
, **kwargs
):
7334 DrawIcon(self, Icon icon, int x, int y)
7336 Draw an icon on the display (does nothing if the device context is
7337 PostScript). This can be the simplest way of drawing bitmaps on a
7340 return _gdi_
.PseudoDC_DrawIcon(*args
, **kwargs
)
7342 def DrawIconPoint(*args
, **kwargs
):
7344 DrawIconPoint(self, Icon icon, Point pt)
7346 Draw an icon on the display (does nothing if the device context is
7347 PostScript). This can be the simplest way of drawing bitmaps on a
7350 return _gdi_
.PseudoDC_DrawIconPoint(*args
, **kwargs
)
7352 def DrawBitmap(*args
, **kwargs
):
7354 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
7356 Draw a bitmap on the device context at the specified point. If
7357 *transparent* is true and the bitmap has a transparency mask, (or
7358 alpha channel on the platforms that support it) then the bitmap will
7359 be drawn transparently.
7361 return _gdi_
.PseudoDC_DrawBitmap(*args
, **kwargs
)
7363 def DrawBitmapPoint(*args
, **kwargs
):
7365 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
7367 Draw a bitmap on the device context at the specified point. If
7368 *transparent* is true and the bitmap has a transparency mask, (or
7369 alpha channel on the platforms that support it) then the bitmap will
7370 be drawn transparently.
7372 return _gdi_
.PseudoDC_DrawBitmapPoint(*args
, **kwargs
)
7374 def DrawText(*args
, **kwargs
):
7376 DrawText(self, String text, int x, int y)
7378 Draws a text string at the specified point, using the current text
7379 font, and the current text foreground and background colours.
7381 The coordinates refer to the top-left corner of the rectangle bounding
7382 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
7383 a text string, which can be used to position the text more precisely,
7384 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
7387 **NOTE**: under wxGTK the current logical function is used by this
7388 function but it is ignored by wxMSW. Thus, you should avoid using
7389 logical functions with this function in portable programs.
7391 return _gdi_
.PseudoDC_DrawText(*args
, **kwargs
)
7393 def DrawTextPoint(*args
, **kwargs
):
7395 DrawTextPoint(self, String text, Point pt)
7397 Draws a text string at the specified point, using the current text
7398 font, and the current text foreground and background colours.
7400 The coordinates refer to the top-left corner of the rectangle bounding
7401 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
7402 a text string, which can be used to position the text more precisely,
7403 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
7406 **NOTE**: under wxGTK the current logical function is used by this
7407 function but it is ignored by wxMSW. Thus, you should avoid using
7408 logical functions with this function in portable programs.
7410 return _gdi_
.PseudoDC_DrawTextPoint(*args
, **kwargs
)
7412 def DrawRotatedText(*args
, **kwargs
):
7414 DrawRotatedText(self, String text, int x, int y, double angle)
7416 Draws the text rotated by *angle* degrees, if supported by the platform.
7418 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
7419 function. In particular, a font different from ``wx.NORMAL_FONT``
7420 should be used as the it is not normally a TrueType
7421 font. ``wx.SWISS_FONT`` is an example of a font which is.
7423 return _gdi_
.PseudoDC_DrawRotatedText(*args
, **kwargs
)
7425 def DrawRotatedTextPoint(*args
, **kwargs
):
7427 DrawRotatedTextPoint(self, String text, Point pt, double angle)
7429 Draws the text rotated by *angle* degrees, if supported by the platform.
7431 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
7432 function. In particular, a font different from ``wx.NORMAL_FONT``
7433 should be used as the it is not normally a TrueType
7434 font. ``wx.SWISS_FONT`` is an example of a font which is.
7436 return _gdi_
.PseudoDC_DrawRotatedTextPoint(*args
, **kwargs
)
7438 def DrawLines(*args
, **kwargs
):
7440 DrawLines(self, List points, int xoffset=0, int yoffset=0)
7442 Draws lines using a sequence of `wx.Point` objects, adding the
7443 optional offset coordinate. The current pen is used for drawing the
7446 return _gdi_
.PseudoDC_DrawLines(*args
, **kwargs
)
7448 def DrawPolygon(*args
, **kwargs
):
7450 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
7451 int fillStyle=ODDEVEN_RULE)
7453 Draws a filled polygon using a sequence of `wx.Point` objects, adding
7454 the optional offset coordinate. The last argument specifies the fill
7455 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
7457 The current pen is used for drawing the outline, and the current brush
7458 for filling the shape. Using a transparent brush suppresses
7459 filling. Note that wxWidgets automatically closes the first and last
7462 return _gdi_
.PseudoDC_DrawPolygon(*args
, **kwargs
)
7464 def DrawLabel(*args
, **kwargs
):
7466 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
7469 Draw *text* within the specified rectangle, abiding by the alignment
7470 flags. Will additionally emphasize the character at *indexAccel* if
7473 return _gdi_
.PseudoDC_DrawLabel(*args
, **kwargs
)
7475 def DrawImageLabel(*args
, **kwargs
):
7477 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
7480 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
7481 drawing it) within the specified rectangle, abiding by the alignment
7482 flags. Will additionally emphasize the character at *indexAccel* if
7485 return _gdi_
.PseudoDC_DrawImageLabel(*args
, **kwargs
)
7487 def DrawSpline(*args
, **kwargs
):
7489 DrawSpline(self, List points)
7491 Draws a spline between all given control points, (a list of `wx.Point`
7492 objects) using the current pen. The spline is drawn using a series of
7493 lines, using an algorithm taken from the X drawing program 'XFIG'.
7495 return _gdi_
.PseudoDC_DrawSpline(*args
, **kwargs
)
7497 def Clear(*args
, **kwargs
):
7501 Clears the device context using the current background brush.
7503 return _gdi_
.PseudoDC_Clear(*args
, **kwargs
)
7505 def SetFont(*args
, **kwargs
):
7507 SetFont(self, Font font)
7509 Sets the current font for the DC. It must be a valid font, in
7510 particular you should not pass ``wx.NullFont`` to this method.
7512 return _gdi_
.PseudoDC_SetFont(*args
, **kwargs
)
7514 def SetPen(*args
, **kwargs
):
7516 SetPen(self, Pen pen)
7518 Sets the current pen for the DC.
7520 If the argument is ``wx.NullPen``, the current pen is selected out of the
7521 device context, and the original pen restored.
7523 return _gdi_
.PseudoDC_SetPen(*args
, **kwargs
)
7525 def SetBrush(*args
, **kwargs
):
7527 SetBrush(self, Brush brush)
7529 Sets the current brush for the DC.
7531 If the argument is ``wx.NullBrush``, the current brush is selected out
7532 of the device context, and the original brush restored, allowing the
7533 current brush to be destroyed safely.
7535 return _gdi_
.PseudoDC_SetBrush(*args
, **kwargs
)
7537 def SetBackground(*args
, **kwargs
):
7539 SetBackground(self, Brush brush)
7541 Sets the current background brush for the DC.
7543 return _gdi_
.PseudoDC_SetBackground(*args
, **kwargs
)
7545 def SetBackgroundMode(*args
, **kwargs
):
7547 SetBackgroundMode(self, int mode)
7549 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
7550 determines whether text will be drawn with a background colour or
7553 return _gdi_
.PseudoDC_SetBackgroundMode(*args
, **kwargs
)
7555 def SetPalette(*args
, **kwargs
):
7557 SetPalette(self, Palette palette)
7559 If this is a window DC or memory DC, assigns the given palette to the
7560 window or bitmap associated with the DC. If the argument is
7561 ``wx.NullPalette``, the current palette is selected out of the device
7562 context, and the original palette restored.
7564 return _gdi_
.PseudoDC_SetPalette(*args
, **kwargs
)
7566 def SetTextForeground(*args
, **kwargs
):
7568 SetTextForeground(self, Colour colour)
7570 Sets the current text foreground colour for the DC.
7572 return _gdi_
.PseudoDC_SetTextForeground(*args
, **kwargs
)
7574 def SetTextBackground(*args
, **kwargs
):
7576 SetTextBackground(self, Colour colour)
7578 Sets the current text background colour for the DC.
7580 return _gdi_
.PseudoDC_SetTextBackground(*args
, **kwargs
)
7582 def SetLogicalFunction(*args
, **kwargs
):
7584 SetLogicalFunction(self, int function)
7586 Sets the current logical function for the device context. This
7587 determines how a source pixel (from a pen or brush colour, combines
7588 with a destination pixel in the current device context.
7590 The possible values and their meaning in terms of source and
7591 destination pixel values are as follows:
7593 ================ ==========================
7595 wx.AND_INVERT (NOT src) AND dst
7596 wx.AND_REVERSE src AND (NOT dst)
7599 wx.EQUIV (NOT src) XOR dst
7601 wx.NAND (NOT src) OR (NOT dst)
7602 wx.NOR (NOT src) AND (NOT dst)
7605 wx.OR_INVERT (NOT src) OR dst
7606 wx.OR_REVERSE src OR (NOT dst)
7608 wx.SRC_INVERT NOT src
7610 ================ ==========================
7612 The default is wx.COPY, which simply draws with the current
7613 colour. The others combine the current colour and the background using
7614 a logical operation. wx.INVERT is commonly used for drawing rubber
7615 bands or moving outlines, since drawing twice reverts to the original
7619 return _gdi_
.PseudoDC_SetLogicalFunction(*args
, **kwargs
)
7621 IdBounds
= property(GetIdBounds
,SetIdBounds
,doc
="See `GetIdBounds` and `SetIdBounds`")
7622 Len
= property(GetLen
,doc
="See `GetLen`")
7623 _gdi_
.PseudoDC_swigregister(PseudoDC
)