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 `wxBitmapFromBuffer` 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 `wxBitmapFromBufferRGBA` 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 AddIcon(*args
, **kwargs
):
1234 """AddIcon(self, Icon icon)"""
1235 return _gdi_
.IconBundle_AddIcon(*args
, **kwargs
)
1237 def AddIconFromFile(*args
, **kwargs
):
1238 """AddIconFromFile(self, String file, long type)"""
1239 return _gdi_
.IconBundle_AddIconFromFile(*args
, **kwargs
)
1241 def GetIcon(*args
, **kwargs
):
1242 """GetIcon(self, Size size) -> Icon"""
1243 return _gdi_
.IconBundle_GetIcon(*args
, **kwargs
)
1245 Icon
= property(GetIcon
,doc
="See `GetIcon`")
1246 _gdi_
.IconBundle_swigregister(IconBundle
)
1248 def IconBundleFromFile(*args
, **kwargs
):
1249 """IconBundleFromFile(String file, long type) -> IconBundle"""
1250 val
= _gdi_
.new_IconBundleFromFile(*args
, **kwargs
)
1253 def IconBundleFromIcon(*args
, **kwargs
):
1254 """IconBundleFromIcon(Icon icon) -> IconBundle"""
1255 val
= _gdi_
.new_IconBundleFromIcon(*args
, **kwargs
)
1258 class Cursor(GDIObject
):
1260 A cursor is a small bitmap usually used for denoting where the mouse
1261 pointer is, with a picture that might indicate the interpretation of a
1264 A single cursor object may be used in many windows (any subwindow
1265 type). The wxWindows convention is to set the cursor for a window, as
1266 in X, rather than to set it globally as in MS Windows, although a
1267 global `wx.SetCursor` function is also available for use on MS Windows.
1270 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1271 __repr__
= _swig_repr
1272 def __init__(self
, *args
, **kwargs
):
1274 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1276 Construct a Cursor from a file. Specify the type of file using
1277 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1280 _gdi_
.Cursor_swiginit(self
,_gdi_
.new_Cursor(*args
, **kwargs
))
1281 __swig_destroy__
= _gdi_
.delete_Cursor
1282 __del__
= lambda self
: None;
1283 def IsOk(*args
, **kwargs
):
1284 """IsOk(self) -> bool"""
1285 return _gdi_
.Cursor_IsOk(*args
, **kwargs
)
1288 def __nonzero__(self
): return self
.IsOk()
1289 _gdi_
.Cursor_swigregister(Cursor
)
1291 def StockCursor(*args
, **kwargs
):
1293 StockCursor(int id) -> Cursor
1295 Create a cursor using one of the stock cursors. Note that not all
1296 stock cursors are available on all platforms.
1298 val
= _gdi_
.new_StockCursor(*args
, **kwargs
)
1301 def CursorFromImage(*args
, **kwargs
):
1303 CursorFromImage(Image image) -> Cursor
1305 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1306 for setting the transparent portions of the cursor.
1308 val
= _gdi_
.new_CursorFromImage(*args
, **kwargs
)
1311 #---------------------------------------------------------------------------
1313 OutRegion
= _gdi_
.OutRegion
1314 PartRegion
= _gdi_
.PartRegion
1315 InRegion
= _gdi_
.InRegion
1316 class Region(GDIObject
):
1317 """Proxy of C++ Region class"""
1318 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1319 __repr__
= _swig_repr
1320 def __init__(self
, *args
, **kwargs
):
1321 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1322 _gdi_
.Region_swiginit(self
,_gdi_
.new_Region(*args
, **kwargs
))
1323 __swig_destroy__
= _gdi_
.delete_Region
1324 __del__
= lambda self
: None;
1325 def Clear(*args
, **kwargs
):
1327 return _gdi_
.Region_Clear(*args
, **kwargs
)
1329 def Offset(*args
, **kwargs
):
1330 """Offset(self, int x, int y) -> bool"""
1331 return _gdi_
.Region_Offset(*args
, **kwargs
)
1333 def Contains(*args
, **kwargs
):
1334 """Contains(self, int x, int y) -> int"""
1335 return _gdi_
.Region_Contains(*args
, **kwargs
)
1337 def ContainsPoint(*args
, **kwargs
):
1338 """ContainsPoint(self, Point pt) -> int"""
1339 return _gdi_
.Region_ContainsPoint(*args
, **kwargs
)
1341 def ContainsRect(*args
, **kwargs
):
1342 """ContainsRect(self, Rect rect) -> int"""
1343 return _gdi_
.Region_ContainsRect(*args
, **kwargs
)
1345 def ContainsRectDim(*args
, **kwargs
):
1346 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1347 return _gdi_
.Region_ContainsRectDim(*args
, **kwargs
)
1349 def GetBox(*args
, **kwargs
):
1350 """GetBox(self) -> Rect"""
1351 return _gdi_
.Region_GetBox(*args
, **kwargs
)
1353 def Intersect(*args
, **kwargs
):
1354 """Intersect(self, int x, int y, int width, int height) -> bool"""
1355 return _gdi_
.Region_Intersect(*args
, **kwargs
)
1357 def IntersectRect(*args
, **kwargs
):
1358 """IntersectRect(self, Rect rect) -> bool"""
1359 return _gdi_
.Region_IntersectRect(*args
, **kwargs
)
1361 def IntersectRegion(*args
, **kwargs
):
1362 """IntersectRegion(self, Region region) -> bool"""
1363 return _gdi_
.Region_IntersectRegion(*args
, **kwargs
)
1365 def IsEmpty(*args
, **kwargs
):
1366 """IsEmpty(self) -> bool"""
1367 return _gdi_
.Region_IsEmpty(*args
, **kwargs
)
1369 def IsEqual(*args
, **kwargs
):
1370 """IsEqual(self, Region region) -> bool"""
1371 return _gdi_
.Region_IsEqual(*args
, **kwargs
)
1373 def Union(*args
, **kwargs
):
1374 """Union(self, int x, int y, int width, int height) -> bool"""
1375 return _gdi_
.Region_Union(*args
, **kwargs
)
1377 def UnionRect(*args
, **kwargs
):
1378 """UnionRect(self, Rect rect) -> bool"""
1379 return _gdi_
.Region_UnionRect(*args
, **kwargs
)
1381 def UnionRegion(*args
, **kwargs
):
1382 """UnionRegion(self, Region region) -> bool"""
1383 return _gdi_
.Region_UnionRegion(*args
, **kwargs
)
1385 def Subtract(*args
, **kwargs
):
1386 """Subtract(self, int x, int y, int width, int height) -> bool"""
1387 return _gdi_
.Region_Subtract(*args
, **kwargs
)
1389 def SubtractRect(*args
, **kwargs
):
1390 """SubtractRect(self, Rect rect) -> bool"""
1391 return _gdi_
.Region_SubtractRect(*args
, **kwargs
)
1393 def SubtractRegion(*args
, **kwargs
):
1394 """SubtractRegion(self, Region region) -> bool"""
1395 return _gdi_
.Region_SubtractRegion(*args
, **kwargs
)
1397 def Xor(*args
, **kwargs
):
1398 """Xor(self, int x, int y, int width, int height) -> bool"""
1399 return _gdi_
.Region_Xor(*args
, **kwargs
)
1401 def XorRect(*args
, **kwargs
):
1402 """XorRect(self, Rect rect) -> bool"""
1403 return _gdi_
.Region_XorRect(*args
, **kwargs
)
1405 def XorRegion(*args
, **kwargs
):
1406 """XorRegion(self, Region region) -> bool"""
1407 return _gdi_
.Region_XorRegion(*args
, **kwargs
)
1409 def ConvertToBitmap(*args
, **kwargs
):
1410 """ConvertToBitmap(self) -> Bitmap"""
1411 return _gdi_
.Region_ConvertToBitmap(*args
, **kwargs
)
1413 def UnionBitmap(*args
, **kwargs
):
1414 """UnionBitmap(self, Bitmap bmp) -> bool"""
1415 return _gdi_
.Region_UnionBitmap(*args
, **kwargs
)
1417 def UnionBitmapColour(*args
, **kwargs
):
1418 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1419 return _gdi_
.Region_UnionBitmapColour(*args
, **kwargs
)
1421 Box
= property(GetBox
,doc
="See `GetBox`")
1422 _gdi_
.Region_swigregister(Region
)
1424 def RegionFromBitmap(*args
, **kwargs
):
1425 """RegionFromBitmap(Bitmap bmp) -> Region"""
1426 val
= _gdi_
.new_RegionFromBitmap(*args
, **kwargs
)
1429 def RegionFromBitmapColour(*args
, **kwargs
):
1430 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1431 val
= _gdi_
.new_RegionFromBitmapColour(*args
, **kwargs
)
1434 def RegionFromPoints(*args
, **kwargs
):
1435 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1436 val
= _gdi_
.new_RegionFromPoints(*args
, **kwargs
)
1439 class RegionIterator(_core
.Object
):
1440 """Proxy of C++ RegionIterator class"""
1441 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1442 __repr__
= _swig_repr
1443 def __init__(self
, *args
, **kwargs
):
1444 """__init__(self, Region region) -> RegionIterator"""
1445 _gdi_
.RegionIterator_swiginit(self
,_gdi_
.new_RegionIterator(*args
, **kwargs
))
1446 __swig_destroy__
= _gdi_
.delete_RegionIterator
1447 __del__
= lambda self
: None;
1448 def GetX(*args
, **kwargs
):
1449 """GetX(self) -> int"""
1450 return _gdi_
.RegionIterator_GetX(*args
, **kwargs
)
1452 def GetY(*args
, **kwargs
):
1453 """GetY(self) -> int"""
1454 return _gdi_
.RegionIterator_GetY(*args
, **kwargs
)
1456 def GetW(*args
, **kwargs
):
1457 """GetW(self) -> int"""
1458 return _gdi_
.RegionIterator_GetW(*args
, **kwargs
)
1460 def GetWidth(*args
, **kwargs
):
1461 """GetWidth(self) -> int"""
1462 return _gdi_
.RegionIterator_GetWidth(*args
, **kwargs
)
1464 def GetH(*args
, **kwargs
):
1465 """GetH(self) -> int"""
1466 return _gdi_
.RegionIterator_GetH(*args
, **kwargs
)
1468 def GetHeight(*args
, **kwargs
):
1469 """GetHeight(self) -> int"""
1470 return _gdi_
.RegionIterator_GetHeight(*args
, **kwargs
)
1472 def GetRect(*args
, **kwargs
):
1473 """GetRect(self) -> Rect"""
1474 return _gdi_
.RegionIterator_GetRect(*args
, **kwargs
)
1476 def HaveRects(*args
, **kwargs
):
1477 """HaveRects(self) -> bool"""
1478 return _gdi_
.RegionIterator_HaveRects(*args
, **kwargs
)
1480 def Reset(*args
, **kwargs
):
1482 return _gdi_
.RegionIterator_Reset(*args
, **kwargs
)
1484 def Next(*args
, **kwargs
):
1486 return _gdi_
.RegionIterator_Next(*args
, **kwargs
)
1488 def __nonzero__(*args
, **kwargs
):
1489 """__nonzero__(self) -> bool"""
1490 return _gdi_
.RegionIterator___nonzero__(*args
, **kwargs
)
1492 H
= property(GetH
,doc
="See `GetH`")
1493 Height
= property(GetHeight
,doc
="See `GetHeight`")
1494 Rect
= property(GetRect
,doc
="See `GetRect`")
1495 W
= property(GetW
,doc
="See `GetW`")
1496 Width
= property(GetWidth
,doc
="See `GetWidth`")
1497 X
= property(GetX
,doc
="See `GetX`")
1498 Y
= property(GetY
,doc
="See `GetY`")
1499 _gdi_
.RegionIterator_swigregister(RegionIterator
)
1501 #---------------------------------------------------------------------------
1503 FONTFAMILY_DEFAULT
= _gdi_
.FONTFAMILY_DEFAULT
1504 FONTFAMILY_DECORATIVE
= _gdi_
.FONTFAMILY_DECORATIVE
1505 FONTFAMILY_ROMAN
= _gdi_
.FONTFAMILY_ROMAN
1506 FONTFAMILY_SCRIPT
= _gdi_
.FONTFAMILY_SCRIPT
1507 FONTFAMILY_SWISS
= _gdi_
.FONTFAMILY_SWISS
1508 FONTFAMILY_MODERN
= _gdi_
.FONTFAMILY_MODERN
1509 FONTFAMILY_TELETYPE
= _gdi_
.FONTFAMILY_TELETYPE
1510 FONTFAMILY_MAX
= _gdi_
.FONTFAMILY_MAX
1511 FONTFAMILY_UNKNOWN
= _gdi_
.FONTFAMILY_UNKNOWN
1512 FONTSTYLE_NORMAL
= _gdi_
.FONTSTYLE_NORMAL
1513 FONTSTYLE_ITALIC
= _gdi_
.FONTSTYLE_ITALIC
1514 FONTSTYLE_SLANT
= _gdi_
.FONTSTYLE_SLANT
1515 FONTSTYLE_MAX
= _gdi_
.FONTSTYLE_MAX
1516 FONTWEIGHT_NORMAL
= _gdi_
.FONTWEIGHT_NORMAL
1517 FONTWEIGHT_LIGHT
= _gdi_
.FONTWEIGHT_LIGHT
1518 FONTWEIGHT_BOLD
= _gdi_
.FONTWEIGHT_BOLD
1519 FONTWEIGHT_MAX
= _gdi_
.FONTWEIGHT_MAX
1520 FONTFLAG_DEFAULT
= _gdi_
.FONTFLAG_DEFAULT
1521 FONTFLAG_ITALIC
= _gdi_
.FONTFLAG_ITALIC
1522 FONTFLAG_SLANT
= _gdi_
.FONTFLAG_SLANT
1523 FONTFLAG_LIGHT
= _gdi_
.FONTFLAG_LIGHT
1524 FONTFLAG_BOLD
= _gdi_
.FONTFLAG_BOLD
1525 FONTFLAG_ANTIALIASED
= _gdi_
.FONTFLAG_ANTIALIASED
1526 FONTFLAG_NOT_ANTIALIASED
= _gdi_
.FONTFLAG_NOT_ANTIALIASED
1527 FONTFLAG_UNDERLINED
= _gdi_
.FONTFLAG_UNDERLINED
1528 FONTFLAG_STRIKETHROUGH
= _gdi_
.FONTFLAG_STRIKETHROUGH
1529 FONTFLAG_MASK
= _gdi_
.FONTFLAG_MASK
1530 FONTENCODING_SYSTEM
= _gdi_
.FONTENCODING_SYSTEM
1531 FONTENCODING_DEFAULT
= _gdi_
.FONTENCODING_DEFAULT
1532 FONTENCODING_ISO8859_1
= _gdi_
.FONTENCODING_ISO8859_1
1533 FONTENCODING_ISO8859_2
= _gdi_
.FONTENCODING_ISO8859_2
1534 FONTENCODING_ISO8859_3
= _gdi_
.FONTENCODING_ISO8859_3
1535 FONTENCODING_ISO8859_4
= _gdi_
.FONTENCODING_ISO8859_4
1536 FONTENCODING_ISO8859_5
= _gdi_
.FONTENCODING_ISO8859_5
1537 FONTENCODING_ISO8859_6
= _gdi_
.FONTENCODING_ISO8859_6
1538 FONTENCODING_ISO8859_7
= _gdi_
.FONTENCODING_ISO8859_7
1539 FONTENCODING_ISO8859_8
= _gdi_
.FONTENCODING_ISO8859_8
1540 FONTENCODING_ISO8859_9
= _gdi_
.FONTENCODING_ISO8859_9
1541 FONTENCODING_ISO8859_10
= _gdi_
.FONTENCODING_ISO8859_10
1542 FONTENCODING_ISO8859_11
= _gdi_
.FONTENCODING_ISO8859_11
1543 FONTENCODING_ISO8859_12
= _gdi_
.FONTENCODING_ISO8859_12
1544 FONTENCODING_ISO8859_13
= _gdi_
.FONTENCODING_ISO8859_13
1545 FONTENCODING_ISO8859_14
= _gdi_
.FONTENCODING_ISO8859_14
1546 FONTENCODING_ISO8859_15
= _gdi_
.FONTENCODING_ISO8859_15
1547 FONTENCODING_ISO8859_MAX
= _gdi_
.FONTENCODING_ISO8859_MAX
1548 FONTENCODING_KOI8
= _gdi_
.FONTENCODING_KOI8
1549 FONTENCODING_KOI8_U
= _gdi_
.FONTENCODING_KOI8_U
1550 FONTENCODING_ALTERNATIVE
= _gdi_
.FONTENCODING_ALTERNATIVE
1551 FONTENCODING_BULGARIAN
= _gdi_
.FONTENCODING_BULGARIAN
1552 FONTENCODING_CP437
= _gdi_
.FONTENCODING_CP437
1553 FONTENCODING_CP850
= _gdi_
.FONTENCODING_CP850
1554 FONTENCODING_CP852
= _gdi_
.FONTENCODING_CP852
1555 FONTENCODING_CP855
= _gdi_
.FONTENCODING_CP855
1556 FONTENCODING_CP866
= _gdi_
.FONTENCODING_CP866
1557 FONTENCODING_CP874
= _gdi_
.FONTENCODING_CP874
1558 FONTENCODING_CP932
= _gdi_
.FONTENCODING_CP932
1559 FONTENCODING_CP936
= _gdi_
.FONTENCODING_CP936
1560 FONTENCODING_CP949
= _gdi_
.FONTENCODING_CP949
1561 FONTENCODING_CP950
= _gdi_
.FONTENCODING_CP950
1562 FONTENCODING_CP1250
= _gdi_
.FONTENCODING_CP1250
1563 FONTENCODING_CP1251
= _gdi_
.FONTENCODING_CP1251
1564 FONTENCODING_CP1252
= _gdi_
.FONTENCODING_CP1252
1565 FONTENCODING_CP1253
= _gdi_
.FONTENCODING_CP1253
1566 FONTENCODING_CP1254
= _gdi_
.FONTENCODING_CP1254
1567 FONTENCODING_CP1255
= _gdi_
.FONTENCODING_CP1255
1568 FONTENCODING_CP1256
= _gdi_
.FONTENCODING_CP1256
1569 FONTENCODING_CP1257
= _gdi_
.FONTENCODING_CP1257
1570 FONTENCODING_CP12_MAX
= _gdi_
.FONTENCODING_CP12_MAX
1571 FONTENCODING_UTF7
= _gdi_
.FONTENCODING_UTF7
1572 FONTENCODING_UTF8
= _gdi_
.FONTENCODING_UTF8
1573 FONTENCODING_EUC_JP
= _gdi_
.FONTENCODING_EUC_JP
1574 FONTENCODING_UTF16BE
= _gdi_
.FONTENCODING_UTF16BE
1575 FONTENCODING_UTF16LE
= _gdi_
.FONTENCODING_UTF16LE
1576 FONTENCODING_UTF32BE
= _gdi_
.FONTENCODING_UTF32BE
1577 FONTENCODING_UTF32LE
= _gdi_
.FONTENCODING_UTF32LE
1578 FONTENCODING_MACROMAN
= _gdi_
.FONTENCODING_MACROMAN
1579 FONTENCODING_MACJAPANESE
= _gdi_
.FONTENCODING_MACJAPANESE
1580 FONTENCODING_MACCHINESETRAD
= _gdi_
.FONTENCODING_MACCHINESETRAD
1581 FONTENCODING_MACKOREAN
= _gdi_
.FONTENCODING_MACKOREAN
1582 FONTENCODING_MACARABIC
= _gdi_
.FONTENCODING_MACARABIC
1583 FONTENCODING_MACHEBREW
= _gdi_
.FONTENCODING_MACHEBREW
1584 FONTENCODING_MACGREEK
= _gdi_
.FONTENCODING_MACGREEK
1585 FONTENCODING_MACCYRILLIC
= _gdi_
.FONTENCODING_MACCYRILLIC
1586 FONTENCODING_MACDEVANAGARI
= _gdi_
.FONTENCODING_MACDEVANAGARI
1587 FONTENCODING_MACGURMUKHI
= _gdi_
.FONTENCODING_MACGURMUKHI
1588 FONTENCODING_MACGUJARATI
= _gdi_
.FONTENCODING_MACGUJARATI
1589 FONTENCODING_MACORIYA
= _gdi_
.FONTENCODING_MACORIYA
1590 FONTENCODING_MACBENGALI
= _gdi_
.FONTENCODING_MACBENGALI
1591 FONTENCODING_MACTAMIL
= _gdi_
.FONTENCODING_MACTAMIL
1592 FONTENCODING_MACTELUGU
= _gdi_
.FONTENCODING_MACTELUGU
1593 FONTENCODING_MACKANNADA
= _gdi_
.FONTENCODING_MACKANNADA
1594 FONTENCODING_MACMALAJALAM
= _gdi_
.FONTENCODING_MACMALAJALAM
1595 FONTENCODING_MACSINHALESE
= _gdi_
.FONTENCODING_MACSINHALESE
1596 FONTENCODING_MACBURMESE
= _gdi_
.FONTENCODING_MACBURMESE
1597 FONTENCODING_MACKHMER
= _gdi_
.FONTENCODING_MACKHMER
1598 FONTENCODING_MACTHAI
= _gdi_
.FONTENCODING_MACTHAI
1599 FONTENCODING_MACLAOTIAN
= _gdi_
.FONTENCODING_MACLAOTIAN
1600 FONTENCODING_MACGEORGIAN
= _gdi_
.FONTENCODING_MACGEORGIAN
1601 FONTENCODING_MACARMENIAN
= _gdi_
.FONTENCODING_MACARMENIAN
1602 FONTENCODING_MACCHINESESIMP
= _gdi_
.FONTENCODING_MACCHINESESIMP
1603 FONTENCODING_MACTIBETAN
= _gdi_
.FONTENCODING_MACTIBETAN
1604 FONTENCODING_MACMONGOLIAN
= _gdi_
.FONTENCODING_MACMONGOLIAN
1605 FONTENCODING_MACETHIOPIC
= _gdi_
.FONTENCODING_MACETHIOPIC
1606 FONTENCODING_MACCENTRALEUR
= _gdi_
.FONTENCODING_MACCENTRALEUR
1607 FONTENCODING_MACVIATNAMESE
= _gdi_
.FONTENCODING_MACVIATNAMESE
1608 FONTENCODING_MACARABICEXT
= _gdi_
.FONTENCODING_MACARABICEXT
1609 FONTENCODING_MACSYMBOL
= _gdi_
.FONTENCODING_MACSYMBOL
1610 FONTENCODING_MACDINGBATS
= _gdi_
.FONTENCODING_MACDINGBATS
1611 FONTENCODING_MACTURKISH
= _gdi_
.FONTENCODING_MACTURKISH
1612 FONTENCODING_MACCROATIAN
= _gdi_
.FONTENCODING_MACCROATIAN
1613 FONTENCODING_MACICELANDIC
= _gdi_
.FONTENCODING_MACICELANDIC
1614 FONTENCODING_MACROMANIAN
= _gdi_
.FONTENCODING_MACROMANIAN
1615 FONTENCODING_MACCELTIC
= _gdi_
.FONTENCODING_MACCELTIC
1616 FONTENCODING_MACGAELIC
= _gdi_
.FONTENCODING_MACGAELIC
1617 FONTENCODING_MACKEYBOARD
= _gdi_
.FONTENCODING_MACKEYBOARD
1618 FONTENCODING_MACMIN
= _gdi_
.FONTENCODING_MACMIN
1619 FONTENCODING_MACMAX
= _gdi_
.FONTENCODING_MACMAX
1620 FONTENCODING_MAX
= _gdi_
.FONTENCODING_MAX
1621 FONTENCODING_UTF16
= _gdi_
.FONTENCODING_UTF16
1622 FONTENCODING_UTF32
= _gdi_
.FONTENCODING_UTF32
1623 FONTENCODING_UNICODE
= _gdi_
.FONTENCODING_UNICODE
1624 FONTENCODING_GB2312
= _gdi_
.FONTENCODING_GB2312
1625 FONTENCODING_BIG5
= _gdi_
.FONTENCODING_BIG5
1626 FONTENCODING_SHIFT_JIS
= _gdi_
.FONTENCODING_SHIFT_JIS
1627 #---------------------------------------------------------------------------
1629 class NativeFontInfo(object):
1630 """Proxy of C++ NativeFontInfo class"""
1631 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1632 __repr__
= _swig_repr
1633 def __init__(self
, *args
, **kwargs
):
1634 """__init__(self) -> NativeFontInfo"""
1635 _gdi_
.NativeFontInfo_swiginit(self
,_gdi_
.new_NativeFontInfo(*args
, **kwargs
))
1636 __swig_destroy__
= _gdi_
.delete_NativeFontInfo
1637 __del__
= lambda self
: None;
1638 def Init(*args
, **kwargs
):
1640 return _gdi_
.NativeFontInfo_Init(*args
, **kwargs
)
1642 def InitFromFont(*args
, **kwargs
):
1643 """InitFromFont(self, Font font)"""
1644 return _gdi_
.NativeFontInfo_InitFromFont(*args
, **kwargs
)
1646 def GetPointSize(*args
, **kwargs
):
1647 """GetPointSize(self) -> int"""
1648 return _gdi_
.NativeFontInfo_GetPointSize(*args
, **kwargs
)
1650 def GetStyle(*args
, **kwargs
):
1651 """GetStyle(self) -> int"""
1652 return _gdi_
.NativeFontInfo_GetStyle(*args
, **kwargs
)
1654 def GetWeight(*args
, **kwargs
):
1655 """GetWeight(self) -> int"""
1656 return _gdi_
.NativeFontInfo_GetWeight(*args
, **kwargs
)
1658 def GetUnderlined(*args
, **kwargs
):
1659 """GetUnderlined(self) -> bool"""
1660 return _gdi_
.NativeFontInfo_GetUnderlined(*args
, **kwargs
)
1662 def GetFaceName(*args
, **kwargs
):
1663 """GetFaceName(self) -> String"""
1664 return _gdi_
.NativeFontInfo_GetFaceName(*args
, **kwargs
)
1666 def GetFamily(*args
, **kwargs
):
1667 """GetFamily(self) -> int"""
1668 return _gdi_
.NativeFontInfo_GetFamily(*args
, **kwargs
)
1670 def GetEncoding(*args
, **kwargs
):
1671 """GetEncoding(self) -> int"""
1672 return _gdi_
.NativeFontInfo_GetEncoding(*args
, **kwargs
)
1674 def SetPointSize(*args
, **kwargs
):
1675 """SetPointSize(self, int pointsize)"""
1676 return _gdi_
.NativeFontInfo_SetPointSize(*args
, **kwargs
)
1678 def SetStyle(*args
, **kwargs
):
1679 """SetStyle(self, int style)"""
1680 return _gdi_
.NativeFontInfo_SetStyle(*args
, **kwargs
)
1682 def SetWeight(*args
, **kwargs
):
1683 """SetWeight(self, int weight)"""
1684 return _gdi_
.NativeFontInfo_SetWeight(*args
, **kwargs
)
1686 def SetUnderlined(*args
, **kwargs
):
1687 """SetUnderlined(self, bool underlined)"""
1688 return _gdi_
.NativeFontInfo_SetUnderlined(*args
, **kwargs
)
1690 def SetFaceName(*args
, **kwargs
):
1691 """SetFaceName(self, String facename) -> bool"""
1692 return _gdi_
.NativeFontInfo_SetFaceName(*args
, **kwargs
)
1694 def SetFamily(*args
, **kwargs
):
1695 """SetFamily(self, int family)"""
1696 return _gdi_
.NativeFontInfo_SetFamily(*args
, **kwargs
)
1698 def SetEncoding(*args
, **kwargs
):
1699 """SetEncoding(self, int encoding)"""
1700 return _gdi_
.NativeFontInfo_SetEncoding(*args
, **kwargs
)
1702 def FromString(*args
, **kwargs
):
1703 """FromString(self, String s) -> bool"""
1704 return _gdi_
.NativeFontInfo_FromString(*args
, **kwargs
)
1706 def ToString(*args
, **kwargs
):
1707 """ToString(self) -> String"""
1708 return _gdi_
.NativeFontInfo_ToString(*args
, **kwargs
)
1710 def __str__(*args
, **kwargs
):
1711 """__str__(self) -> String"""
1712 return _gdi_
.NativeFontInfo___str__(*args
, **kwargs
)
1714 def FromUserString(*args
, **kwargs
):
1715 """FromUserString(self, String s) -> bool"""
1716 return _gdi_
.NativeFontInfo_FromUserString(*args
, **kwargs
)
1718 def ToUserString(*args
, **kwargs
):
1719 """ToUserString(self) -> String"""
1720 return _gdi_
.NativeFontInfo_ToUserString(*args
, **kwargs
)
1722 Encoding
= property(GetEncoding
,SetEncoding
,doc
="See `GetEncoding` and `SetEncoding`")
1723 FaceName
= property(GetFaceName
,SetFaceName
,doc
="See `GetFaceName` and `SetFaceName`")
1724 Family
= property(GetFamily
,SetFamily
,doc
="See `GetFamily` and `SetFamily`")
1725 PointSize
= property(GetPointSize
,SetPointSize
,doc
="See `GetPointSize` and `SetPointSize`")
1726 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
1727 Underlined
= property(GetUnderlined
,SetUnderlined
,doc
="See `GetUnderlined` and `SetUnderlined`")
1728 Weight
= property(GetWeight
,SetWeight
,doc
="See `GetWeight` and `SetWeight`")
1729 _gdi_
.NativeFontInfo_swigregister(NativeFontInfo
)
1731 class NativeEncodingInfo(object):
1732 """Proxy of C++ NativeEncodingInfo class"""
1733 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1734 __repr__
= _swig_repr
1735 facename
= property(_gdi_
.NativeEncodingInfo_facename_get
, _gdi_
.NativeEncodingInfo_facename_set
)
1736 encoding
= property(_gdi_
.NativeEncodingInfo_encoding_get
, _gdi_
.NativeEncodingInfo_encoding_set
)
1737 def __init__(self
, *args
, **kwargs
):
1738 """__init__(self) -> NativeEncodingInfo"""
1739 _gdi_
.NativeEncodingInfo_swiginit(self
,_gdi_
.new_NativeEncodingInfo(*args
, **kwargs
))
1740 __swig_destroy__
= _gdi_
.delete_NativeEncodingInfo
1741 __del__
= lambda self
: None;
1742 def FromString(*args
, **kwargs
):
1743 """FromString(self, String s) -> bool"""
1744 return _gdi_
.NativeEncodingInfo_FromString(*args
, **kwargs
)
1746 def ToString(*args
, **kwargs
):
1747 """ToString(self) -> String"""
1748 return _gdi_
.NativeEncodingInfo_ToString(*args
, **kwargs
)
1750 _gdi_
.NativeEncodingInfo_swigregister(NativeEncodingInfo
)
1753 def GetNativeFontEncoding(*args
, **kwargs
):
1754 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1755 return _gdi_
.GetNativeFontEncoding(*args
, **kwargs
)
1757 def TestFontEncoding(*args
, **kwargs
):
1758 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1759 return _gdi_
.TestFontEncoding(*args
, **kwargs
)
1760 #---------------------------------------------------------------------------
1762 class FontMapper(object):
1763 """Proxy of C++ FontMapper class"""
1764 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1765 __repr__
= _swig_repr
1766 def __init__(self
, *args
, **kwargs
):
1767 """__init__(self) -> FontMapper"""
1768 _gdi_
.FontMapper_swiginit(self
,_gdi_
.new_FontMapper(*args
, **kwargs
))
1769 __swig_destroy__
= _gdi_
.delete_FontMapper
1770 __del__
= lambda self
: None;
1771 def Get(*args
, **kwargs
):
1772 """Get() -> FontMapper"""
1773 return _gdi_
.FontMapper_Get(*args
, **kwargs
)
1775 Get
= staticmethod(Get
)
1776 def Set(*args
, **kwargs
):
1777 """Set(FontMapper mapper) -> FontMapper"""
1778 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1780 Set
= staticmethod(Set
)
1781 def CharsetToEncoding(*args
, **kwargs
):
1782 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1783 return _gdi_
.FontMapper_CharsetToEncoding(*args
, **kwargs
)
1785 def GetSupportedEncodingsCount(*args
, **kwargs
):
1786 """GetSupportedEncodingsCount() -> size_t"""
1787 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
, **kwargs
)
1789 GetSupportedEncodingsCount
= staticmethod(GetSupportedEncodingsCount
)
1790 def GetEncoding(*args
, **kwargs
):
1791 """GetEncoding(size_t n) -> int"""
1792 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1794 GetEncoding
= staticmethod(GetEncoding
)
1795 def GetEncodingName(*args
, **kwargs
):
1796 """GetEncodingName(int encoding) -> String"""
1797 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1799 GetEncodingName
= staticmethod(GetEncodingName
)
1800 def GetEncodingDescription(*args
, **kwargs
):
1801 """GetEncodingDescription(int encoding) -> String"""
1802 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1804 GetEncodingDescription
= staticmethod(GetEncodingDescription
)
1805 def GetEncodingFromName(*args
, **kwargs
):
1806 """GetEncodingFromName(String name) -> int"""
1807 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1809 GetEncodingFromName
= staticmethod(GetEncodingFromName
)
1810 def SetConfigPath(*args
, **kwargs
):
1811 """SetConfigPath(self, String prefix)"""
1812 return _gdi_
.FontMapper_SetConfigPath(*args
, **kwargs
)
1814 def GetDefaultConfigPath(*args
, **kwargs
):
1815 """GetDefaultConfigPath() -> String"""
1816 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
, **kwargs
)
1818 GetDefaultConfigPath
= staticmethod(GetDefaultConfigPath
)
1819 def GetAltForEncoding(*args
, **kwargs
):
1820 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1821 return _gdi_
.FontMapper_GetAltForEncoding(*args
, **kwargs
)
1823 def IsEncodingAvailable(*args
, **kwargs
):
1824 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1825 return _gdi_
.FontMapper_IsEncodingAvailable(*args
, **kwargs
)
1827 def SetDialogParent(*args
, **kwargs
):
1828 """SetDialogParent(self, Window parent)"""
1829 return _gdi_
.FontMapper_SetDialogParent(*args
, **kwargs
)
1831 def SetDialogTitle(*args
, **kwargs
):
1832 """SetDialogTitle(self, String title)"""
1833 return _gdi_
.FontMapper_SetDialogTitle(*args
, **kwargs
)
1835 AltForEncoding
= property(GetAltForEncoding
,doc
="See `GetAltForEncoding`")
1836 _gdi_
.FontMapper_swigregister(FontMapper
)
1838 def FontMapper_Get(*args
):
1839 """FontMapper_Get() -> FontMapper"""
1840 return _gdi_
.FontMapper_Get(*args
)
1842 def FontMapper_Set(*args
, **kwargs
):
1843 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1844 return _gdi_
.FontMapper_Set(*args
, **kwargs
)
1846 def FontMapper_GetSupportedEncodingsCount(*args
):
1847 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1848 return _gdi_
.FontMapper_GetSupportedEncodingsCount(*args
)
1850 def FontMapper_GetEncoding(*args
, **kwargs
):
1851 """FontMapper_GetEncoding(size_t n) -> int"""
1852 return _gdi_
.FontMapper_GetEncoding(*args
, **kwargs
)
1854 def FontMapper_GetEncodingName(*args
, **kwargs
):
1855 """FontMapper_GetEncodingName(int encoding) -> String"""
1856 return _gdi_
.FontMapper_GetEncodingName(*args
, **kwargs
)
1858 def FontMapper_GetEncodingDescription(*args
, **kwargs
):
1859 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1860 return _gdi_
.FontMapper_GetEncodingDescription(*args
, **kwargs
)
1862 def FontMapper_GetEncodingFromName(*args
, **kwargs
):
1863 """FontMapper_GetEncodingFromName(String name) -> int"""
1864 return _gdi_
.FontMapper_GetEncodingFromName(*args
, **kwargs
)
1866 def FontMapper_GetDefaultConfigPath(*args
):
1867 """FontMapper_GetDefaultConfigPath() -> String"""
1868 return _gdi_
.FontMapper_GetDefaultConfigPath(*args
)
1870 #---------------------------------------------------------------------------
1872 class Font(GDIObject
):
1874 A font is an object which determines the appearance of text. Fonts are
1875 used for drawing text to a device context, and setting the appearance
1878 You can retrieve the current system font settings with `wx.SystemSettings`.
1880 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
1881 __repr__
= _swig_repr
1882 def __init__(self
, *args
, **kwargs
):
1884 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1885 String face=EmptyString,
1886 int encoding=FONTENCODING_DEFAULT) -> Font
1888 Creates a font object with the specified attributes.
1890 :param pointSize: The size of the font in points.
1892 :param family: Font family. A generic way of referring to fonts
1893 without specifying actual facename. It can be One of
1894 the ``wx.FONTFAMILY_xxx`` constants.
1896 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1898 :param weight: Font weight, sometimes also referred to as font
1899 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1901 :param underline: The value can be ``True`` or ``False`` and
1902 indicates whether the font will include an underline. This
1903 may not be supported on all platforms.
1905 :param face: An optional string specifying the actual typeface to
1906 be used. If it is an empty string, a default typeface will be
1907 chosen based on the family.
1909 :param encoding: An encoding which may be one of the
1910 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1911 available, no font is created.
1913 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1914 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1917 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
1918 _gdi_
.Font_swiginit(self
,_gdi_
.new_Font(*args
, **kwargs
))
1919 __swig_destroy__
= _gdi_
.delete_Font
1920 __del__
= lambda self
: None;
1921 def IsOk(*args
, **kwargs
):
1925 Returns ``True`` if this font was successfully created.
1927 return _gdi_
.Font_IsOk(*args
, **kwargs
)
1930 def __nonzero__(self
): return self
.IsOk()
1931 def __eq__(*args
, **kwargs
):
1932 """__eq__(self, Font other) -> bool"""
1933 return _gdi_
.Font___eq__(*args
, **kwargs
)
1935 def __ne__(*args
, **kwargs
):
1936 """__ne__(self, Font other) -> bool"""
1937 return _gdi_
.Font___ne__(*args
, **kwargs
)
1939 def GetPointSize(*args
, **kwargs
):
1941 GetPointSize(self) -> int
1943 Gets the point size.
1945 return _gdi_
.Font_GetPointSize(*args
, **kwargs
)
1947 def GetPixelSize(*args
, **kwargs
):
1949 GetPixelSize(self) -> Size
1951 Returns the size in pixels if the font was constructed with a pixel
1954 return _gdi_
.Font_GetPixelSize(*args
, **kwargs
)
1956 def IsUsingSizeInPixels(*args
, **kwargs
):
1958 IsUsingSizeInPixels(self) -> bool
1960 Returns ``True`` if the font is using a pixelSize.
1962 return _gdi_
.Font_IsUsingSizeInPixels(*args
, **kwargs
)
1964 def GetFamily(*args
, **kwargs
):
1966 GetFamily(self) -> int
1968 Gets the font family.
1970 return _gdi_
.Font_GetFamily(*args
, **kwargs
)
1972 def GetStyle(*args
, **kwargs
):
1974 GetStyle(self) -> int
1976 Gets the font style.
1978 return _gdi_
.Font_GetStyle(*args
, **kwargs
)
1980 def GetWeight(*args
, **kwargs
):
1982 GetWeight(self) -> int
1984 Gets the font weight.
1986 return _gdi_
.Font_GetWeight(*args
, **kwargs
)
1988 def GetUnderlined(*args
, **kwargs
):
1990 GetUnderlined(self) -> bool
1992 Returns ``True`` if the font is underlined, ``False`` otherwise.
1994 return _gdi_
.Font_GetUnderlined(*args
, **kwargs
)
1996 def GetFaceName(*args
, **kwargs
):
1998 GetFaceName(self) -> String
2000 Returns the typeface name associated with the font, or the empty
2001 string if there is no typeface information.
2003 return _gdi_
.Font_GetFaceName(*args
, **kwargs
)
2005 def GetEncoding(*args
, **kwargs
):
2007 GetEncoding(self) -> int
2009 Get the font's encoding.
2011 return _gdi_
.Font_GetEncoding(*args
, **kwargs
)
2013 def GetNativeFontInfo(*args
, **kwargs
):
2015 GetNativeFontInfo(self) -> NativeFontInfo
2017 Constructs a `wx.NativeFontInfo` object from this font.
2019 return _gdi_
.Font_GetNativeFontInfo(*args
, **kwargs
)
2021 def IsFixedWidth(*args
, **kwargs
):
2023 IsFixedWidth(self) -> bool
2025 Returns true if the font is a fixed width (or monospaced) font, false
2026 if it is a proportional one or font is invalid.
2028 return _gdi_
.Font_IsFixedWidth(*args
, **kwargs
)
2030 def GetNativeFontInfoDesc(*args
, **kwargs
):
2032 GetNativeFontInfoDesc(self) -> String
2034 Returns the platform-dependent string completely describing this font
2035 or an empty string if the font isn't valid.
2037 return _gdi_
.Font_GetNativeFontInfoDesc(*args
, **kwargs
)
2039 def GetNativeFontInfoUserDesc(*args
, **kwargs
):
2041 GetNativeFontInfoUserDesc(self) -> String
2043 Returns a human readable version of `GetNativeFontInfoDesc`.
2045 return _gdi_
.Font_GetNativeFontInfoUserDesc(*args
, **kwargs
)
2047 def SetPointSize(*args
, **kwargs
):
2049 SetPointSize(self, int pointSize)
2051 Sets the point size.
2053 return _gdi_
.Font_SetPointSize(*args
, **kwargs
)
2055 def SetPixelSize(*args
, **kwargs
):
2057 SetPixelSize(self, Size pixelSize)
2059 Sets the size in pixels rather than points. If there is platform API
2060 support for this then it is used, otherwise a font with the closest
2061 size is found using a binary search.
2063 return _gdi_
.Font_SetPixelSize(*args
, **kwargs
)
2065 def SetFamily(*args
, **kwargs
):
2067 SetFamily(self, int family)
2069 Sets the font family.
2071 return _gdi_
.Font_SetFamily(*args
, **kwargs
)
2073 def SetStyle(*args
, **kwargs
):
2075 SetStyle(self, int style)
2077 Sets the font style.
2079 return _gdi_
.Font_SetStyle(*args
, **kwargs
)
2081 def SetWeight(*args
, **kwargs
):
2083 SetWeight(self, int weight)
2085 Sets the font weight.
2087 return _gdi_
.Font_SetWeight(*args
, **kwargs
)
2089 def SetFaceName(*args
, **kwargs
):
2091 SetFaceName(self, String faceName) -> bool
2093 Sets the facename for the font. The facename, which should be a valid
2094 font installed on the end-user's system.
2096 To avoid portability problems, don't rely on a specific face, but
2097 specify the font family instead or as well. A suitable font will be
2098 found on the end-user's system. If both the family and the facename
2099 are specified, wxWidgets will first search for the specific face, and
2100 then for a font belonging to the same family.
2102 return _gdi_
.Font_SetFaceName(*args
, **kwargs
)
2104 def SetUnderlined(*args
, **kwargs
):
2106 SetUnderlined(self, bool underlined)
2110 return _gdi_
.Font_SetUnderlined(*args
, **kwargs
)
2112 def SetEncoding(*args
, **kwargs
):
2114 SetEncoding(self, int encoding)
2116 Set the font encoding.
2118 return _gdi_
.Font_SetEncoding(*args
, **kwargs
)
2120 def SetNativeFontInfo(*args
, **kwargs
):
2122 SetNativeFontInfo(self, NativeFontInfo info)
2124 Set the font's attributes from a `wx.NativeFontInfo` object.
2126 return _gdi_
.Font_SetNativeFontInfo(*args
, **kwargs
)
2128 def SetNativeFontInfoFromString(*args
, **kwargs
):
2130 SetNativeFontInfoFromString(self, String info) -> bool
2132 Set the font's attributes from string representation of a
2133 `wx.NativeFontInfo` object.
2135 return _gdi_
.Font_SetNativeFontInfoFromString(*args
, **kwargs
)
2137 def SetNativeFontInfoUserDesc(*args
, **kwargs
):
2139 SetNativeFontInfoUserDesc(self, String info) -> bool
2141 Set the font's attributes from a string formerly returned from
2142 `GetNativeFontInfoDesc`.
2144 return _gdi_
.Font_SetNativeFontInfoUserDesc(*args
, **kwargs
)
2146 def GetFamilyString(*args
, **kwargs
):
2148 GetFamilyString(self) -> String
2150 Returns a string representation of the font family.
2152 return _gdi_
.Font_GetFamilyString(*args
, **kwargs
)
2154 def GetStyleString(*args
, **kwargs
):
2156 GetStyleString(self) -> String
2158 Returns a string representation of the font style.
2160 return _gdi_
.Font_GetStyleString(*args
, **kwargs
)
2162 def GetWeightString(*args
, **kwargs
):
2164 GetWeightString(self) -> String
2166 Return a string representation of the font weight.
2168 return _gdi_
.Font_GetWeightString(*args
, **kwargs
)
2170 def SetNoAntiAliasing(*args
, **kwargs
):
2171 """SetNoAntiAliasing(self, bool no=True)"""
2172 return _gdi_
.Font_SetNoAntiAliasing(*args
, **kwargs
)
2174 def GetNoAntiAliasing(*args
, **kwargs
):
2175 """GetNoAntiAliasing(self) -> bool"""
2176 return _gdi_
.Font_GetNoAntiAliasing(*args
, **kwargs
)
2178 def GetDefaultEncoding(*args
, **kwargs
):
2180 GetDefaultEncoding() -> int
2182 Returns the encoding used for all fonts created with an encoding of
2183 ``wx.FONTENCODING_DEFAULT``.
2185 return _gdi_
.Font_GetDefaultEncoding(*args
, **kwargs
)
2187 GetDefaultEncoding
= staticmethod(GetDefaultEncoding
)
2188 def SetDefaultEncoding(*args
, **kwargs
):
2190 SetDefaultEncoding(int encoding)
2192 Sets the default font encoding.
2194 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2196 SetDefaultEncoding
= staticmethod(SetDefaultEncoding
)
2197 Encoding
= property(GetEncoding
,SetEncoding
,doc
="See `GetEncoding` and `SetEncoding`")
2198 FaceName
= property(GetFaceName
,SetFaceName
,doc
="See `GetFaceName` and `SetFaceName`")
2199 Family
= property(GetFamily
,SetFamily
,doc
="See `GetFamily` and `SetFamily`")
2200 FamilyString
= property(GetFamilyString
,doc
="See `GetFamilyString`")
2201 NativeFontInfo
= property(GetNativeFontInfo
,SetNativeFontInfo
,doc
="See `GetNativeFontInfo` and `SetNativeFontInfo`")
2202 NativeFontInfoDesc
= property(GetNativeFontInfoDesc
,doc
="See `GetNativeFontInfoDesc`")
2203 NativeFontInfoUserDesc
= property(GetNativeFontInfoUserDesc
,SetNativeFontInfoUserDesc
,doc
="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`")
2204 NoAntiAliasing
= property(GetNoAntiAliasing
,SetNoAntiAliasing
,doc
="See `GetNoAntiAliasing` and `SetNoAntiAliasing`")
2205 PixelSize
= property(GetPixelSize
,SetPixelSize
,doc
="See `GetPixelSize` and `SetPixelSize`")
2206 PointSize
= property(GetPointSize
,SetPointSize
,doc
="See `GetPointSize` and `SetPointSize`")
2207 Style
= property(GetStyle
,SetStyle
,doc
="See `GetStyle` and `SetStyle`")
2208 StyleString
= property(GetStyleString
,doc
="See `GetStyleString`")
2209 Underlined
= property(GetUnderlined
,SetUnderlined
,doc
="See `GetUnderlined` and `SetUnderlined`")
2210 Weight
= property(GetWeight
,SetWeight
,doc
="See `GetWeight` and `SetWeight`")
2211 WeightString
= property(GetWeightString
,doc
="See `GetWeightString`")
2212 _gdi_
.Font_swigregister(Font
)
2214 def FontFromNativeInfo(*args
, **kwargs
):
2216 FontFromNativeInfo(NativeFontInfo info) -> Font
2218 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2220 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2221 val
= _gdi_
.new_FontFromNativeInfo(*args
, **kwargs
)
2224 def FontFromNativeInfoString(*args
, **kwargs
):
2226 FontFromNativeInfoString(String info) -> Font
2228 Construct a `wx.Font` from the string representation of a
2229 `wx.NativeFontInfo` object.
2231 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2232 val
= _gdi_
.new_FontFromNativeInfoString(*args
, **kwargs
)
2235 def FFont(*args
, **kwargs
):
2237 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2238 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2240 A bit of a simpler way to create a `wx.Font` using flags instead of
2241 individual attribute settings. The value of flags can be a
2242 combination of the following:
2244 ============================ ==
2250 wx.FONTFLAG_ANTIALIASED
2251 wx.FONTFLAG_NOT_ANTIALIASED
2252 wx.FONTFLAG_UNDERLINED
2253 wx.FONTFLAG_STRIKETHROUGH
2254 ============================ ==
2256 :see: `wx.Font.__init__`
2258 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2259 val
= _gdi_
.new_FFont(*args
, **kwargs
)
2262 def FontFromPixelSize(*args
, **kwargs
):
2264 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2265 bool underlined=False, String face=wxEmptyString,
2266 int encoding=FONTENCODING_DEFAULT) -> Font
2268 Creates a font using a size in pixels rather than points. If there is
2269 platform API support for this then it is used, otherwise a font with
2270 the closest size is found using a binary search.
2272 :see: `wx.Font.__init__`
2274 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2275 val
= _gdi_
.new_FontFromPixelSize(*args
, **kwargs
)
2278 def FFontFromPixelSize(*args
, **kwargs
):
2280 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2281 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2283 Creates a font using a size in pixels rather than points. If there is
2284 platform API support for this then it is used, otherwise a font with
2285 the closest size is found using a binary search.
2287 :see: `wx.Font.__init__`, `wx.FFont`
2289 if kwargs
.has_key('faceName'): kwargs
['face'] = kwargs
['faceName'];del kwargs
['faceName']
2290 val
= _gdi_
.new_FFontFromPixelSize(*args
, **kwargs
)
2293 def Font_GetDefaultEncoding(*args
):
2295 Font_GetDefaultEncoding() -> int
2297 Returns the encoding used for all fonts created with an encoding of
2298 ``wx.FONTENCODING_DEFAULT``.
2300 return _gdi_
.Font_GetDefaultEncoding(*args
)
2302 def Font_SetDefaultEncoding(*args
, **kwargs
):
2304 Font_SetDefaultEncoding(int encoding)
2306 Sets the default font encoding.
2308 return _gdi_
.Font_SetDefaultEncoding(*args
, **kwargs
)
2310 Font2
= wx
._deprecated
(FFont
, "Use `wx.FFont` instead.")
2311 #---------------------------------------------------------------------------
2313 class FontEnumerator(object):
2314 """Proxy of C++ FontEnumerator class"""
2315 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2316 __repr__
= _swig_repr
2317 def __init__(self
, *args
, **kwargs
):
2318 """__init__(self) -> FontEnumerator"""
2319 _gdi_
.FontEnumerator_swiginit(self
,_gdi_
.new_FontEnumerator(*args
, **kwargs
))
2320 FontEnumerator
._setCallbackInfo
(self
, self
, FontEnumerator
)
2322 __swig_destroy__
= _gdi_
.delete_FontEnumerator
2323 __del__
= lambda self
: None;
2324 def _setCallbackInfo(*args
, **kwargs
):
2325 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=0)"""
2326 return _gdi_
.FontEnumerator__setCallbackInfo(*args
, **kwargs
)
2328 def EnumerateFacenames(*args
, **kwargs
):
2329 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2330 return _gdi_
.FontEnumerator_EnumerateFacenames(*args
, **kwargs
)
2332 def EnumerateEncodings(*args
, **kwargs
):
2333 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2334 return _gdi_
.FontEnumerator_EnumerateEncodings(*args
, **kwargs
)
2336 def GetEncodings(*args
, **kwargs
):
2337 """GetEncodings() -> PyObject"""
2338 return _gdi_
.FontEnumerator_GetEncodings(*args
, **kwargs
)
2340 GetEncodings
= staticmethod(GetEncodings
)
2341 def GetFacenames(*args
, **kwargs
):
2342 """GetFacenames() -> PyObject"""
2343 return _gdi_
.FontEnumerator_GetFacenames(*args
, **kwargs
)
2345 GetFacenames
= staticmethod(GetFacenames
)
2346 def IsValidFacename(*args
, **kwargs
):
2348 IsValidFacename(String str) -> bool
2350 Convenience function that returns true if the given face name exist in
2353 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2355 IsValidFacename
= staticmethod(IsValidFacename
)
2356 _gdi_
.FontEnumerator_swigregister(FontEnumerator
)
2358 def FontEnumerator_GetEncodings(*args
):
2359 """FontEnumerator_GetEncodings() -> PyObject"""
2360 return _gdi_
.FontEnumerator_GetEncodings(*args
)
2362 def FontEnumerator_GetFacenames(*args
):
2363 """FontEnumerator_GetFacenames() -> PyObject"""
2364 return _gdi_
.FontEnumerator_GetFacenames(*args
)
2366 def FontEnumerator_IsValidFacename(*args
, **kwargs
):
2368 FontEnumerator_IsValidFacename(String str) -> bool
2370 Convenience function that returns true if the given face name exist in
2373 return _gdi_
.FontEnumerator_IsValidFacename(*args
, **kwargs
)
2375 #---------------------------------------------------------------------------
2377 LANGUAGE_DEFAULT
= _gdi_
.LANGUAGE_DEFAULT
2378 LANGUAGE_UNKNOWN
= _gdi_
.LANGUAGE_UNKNOWN
2379 LANGUAGE_ABKHAZIAN
= _gdi_
.LANGUAGE_ABKHAZIAN
2380 LANGUAGE_AFAR
= _gdi_
.LANGUAGE_AFAR
2381 LANGUAGE_AFRIKAANS
= _gdi_
.LANGUAGE_AFRIKAANS
2382 LANGUAGE_ALBANIAN
= _gdi_
.LANGUAGE_ALBANIAN
2383 LANGUAGE_AMHARIC
= _gdi_
.LANGUAGE_AMHARIC
2384 LANGUAGE_ARABIC
= _gdi_
.LANGUAGE_ARABIC
2385 LANGUAGE_ARABIC_ALGERIA
= _gdi_
.LANGUAGE_ARABIC_ALGERIA
2386 LANGUAGE_ARABIC_BAHRAIN
= _gdi_
.LANGUAGE_ARABIC_BAHRAIN
2387 LANGUAGE_ARABIC_EGYPT
= _gdi_
.LANGUAGE_ARABIC_EGYPT
2388 LANGUAGE_ARABIC_IRAQ
= _gdi_
.LANGUAGE_ARABIC_IRAQ
2389 LANGUAGE_ARABIC_JORDAN
= _gdi_
.LANGUAGE_ARABIC_JORDAN
2390 LANGUAGE_ARABIC_KUWAIT
= _gdi_
.LANGUAGE_ARABIC_KUWAIT
2391 LANGUAGE_ARABIC_LEBANON
= _gdi_
.LANGUAGE_ARABIC_LEBANON
2392 LANGUAGE_ARABIC_LIBYA
= _gdi_
.LANGUAGE_ARABIC_LIBYA
2393 LANGUAGE_ARABIC_MOROCCO
= _gdi_
.LANGUAGE_ARABIC_MOROCCO
2394 LANGUAGE_ARABIC_OMAN
= _gdi_
.LANGUAGE_ARABIC_OMAN
2395 LANGUAGE_ARABIC_QATAR
= _gdi_
.LANGUAGE_ARABIC_QATAR
2396 LANGUAGE_ARABIC_SAUDI_ARABIA
= _gdi_
.LANGUAGE_ARABIC_SAUDI_ARABIA
2397 LANGUAGE_ARABIC_SUDAN
= _gdi_
.LANGUAGE_ARABIC_SUDAN
2398 LANGUAGE_ARABIC_SYRIA
= _gdi_
.LANGUAGE_ARABIC_SYRIA
2399 LANGUAGE_ARABIC_TUNISIA
= _gdi_
.LANGUAGE_ARABIC_TUNISIA
2400 LANGUAGE_ARABIC_UAE
= _gdi_
.LANGUAGE_ARABIC_UAE
2401 LANGUAGE_ARABIC_YEMEN
= _gdi_
.LANGUAGE_ARABIC_YEMEN
2402 LANGUAGE_ARMENIAN
= _gdi_
.LANGUAGE_ARMENIAN
2403 LANGUAGE_ASSAMESE
= _gdi_
.LANGUAGE_ASSAMESE
2404 LANGUAGE_AYMARA
= _gdi_
.LANGUAGE_AYMARA
2405 LANGUAGE_AZERI
= _gdi_
.LANGUAGE_AZERI
2406 LANGUAGE_AZERI_CYRILLIC
= _gdi_
.LANGUAGE_AZERI_CYRILLIC
2407 LANGUAGE_AZERI_LATIN
= _gdi_
.LANGUAGE_AZERI_LATIN
2408 LANGUAGE_BASHKIR
= _gdi_
.LANGUAGE_BASHKIR
2409 LANGUAGE_BASQUE
= _gdi_
.LANGUAGE_BASQUE
2410 LANGUAGE_BELARUSIAN
= _gdi_
.LANGUAGE_BELARUSIAN
2411 LANGUAGE_BENGALI
= _gdi_
.LANGUAGE_BENGALI
2412 LANGUAGE_BHUTANI
= _gdi_
.LANGUAGE_BHUTANI
2413 LANGUAGE_BIHARI
= _gdi_
.LANGUAGE_BIHARI
2414 LANGUAGE_BISLAMA
= _gdi_
.LANGUAGE_BISLAMA
2415 LANGUAGE_BRETON
= _gdi_
.LANGUAGE_BRETON
2416 LANGUAGE_BULGARIAN
= _gdi_
.LANGUAGE_BULGARIAN
2417 LANGUAGE_BURMESE
= _gdi_
.LANGUAGE_BURMESE
2418 LANGUAGE_CAMBODIAN
= _gdi_
.LANGUAGE_CAMBODIAN
2419 LANGUAGE_CATALAN
= _gdi_
.LANGUAGE_CATALAN
2420 LANGUAGE_CHINESE
= _gdi_
.LANGUAGE_CHINESE
2421 LANGUAGE_CHINESE_SIMPLIFIED
= _gdi_
.LANGUAGE_CHINESE_SIMPLIFIED
2422 LANGUAGE_CHINESE_TRADITIONAL
= _gdi_
.LANGUAGE_CHINESE_TRADITIONAL
2423 LANGUAGE_CHINESE_HONGKONG
= _gdi_
.LANGUAGE_CHINESE_HONGKONG
2424 LANGUAGE_CHINESE_MACAU
= _gdi_
.LANGUAGE_CHINESE_MACAU
2425 LANGUAGE_CHINESE_SINGAPORE
= _gdi_
.LANGUAGE_CHINESE_SINGAPORE
2426 LANGUAGE_CHINESE_TAIWAN
= _gdi_
.LANGUAGE_CHINESE_TAIWAN
2427 LANGUAGE_CORSICAN
= _gdi_
.LANGUAGE_CORSICAN
2428 LANGUAGE_CROATIAN
= _gdi_
.LANGUAGE_CROATIAN
2429 LANGUAGE_CZECH
= _gdi_
.LANGUAGE_CZECH
2430 LANGUAGE_DANISH
= _gdi_
.LANGUAGE_DANISH
2431 LANGUAGE_DUTCH
= _gdi_
.LANGUAGE_DUTCH
2432 LANGUAGE_DUTCH_BELGIAN
= _gdi_
.LANGUAGE_DUTCH_BELGIAN
2433 LANGUAGE_ENGLISH
= _gdi_
.LANGUAGE_ENGLISH
2434 LANGUAGE_ENGLISH_UK
= _gdi_
.LANGUAGE_ENGLISH_UK
2435 LANGUAGE_ENGLISH_US
= _gdi_
.LANGUAGE_ENGLISH_US
2436 LANGUAGE_ENGLISH_AUSTRALIA
= _gdi_
.LANGUAGE_ENGLISH_AUSTRALIA
2437 LANGUAGE_ENGLISH_BELIZE
= _gdi_
.LANGUAGE_ENGLISH_BELIZE
2438 LANGUAGE_ENGLISH_BOTSWANA
= _gdi_
.LANGUAGE_ENGLISH_BOTSWANA
2439 LANGUAGE_ENGLISH_CANADA
= _gdi_
.LANGUAGE_ENGLISH_CANADA
2440 LANGUAGE_ENGLISH_CARIBBEAN
= _gdi_
.LANGUAGE_ENGLISH_CARIBBEAN
2441 LANGUAGE_ENGLISH_DENMARK
= _gdi_
.LANGUAGE_ENGLISH_DENMARK
2442 LANGUAGE_ENGLISH_EIRE
= _gdi_
.LANGUAGE_ENGLISH_EIRE
2443 LANGUAGE_ENGLISH_JAMAICA
= _gdi_
.LANGUAGE_ENGLISH_JAMAICA
2444 LANGUAGE_ENGLISH_NEW_ZEALAND
= _gdi_
.LANGUAGE_ENGLISH_NEW_ZEALAND
2445 LANGUAGE_ENGLISH_PHILIPPINES
= _gdi_
.LANGUAGE_ENGLISH_PHILIPPINES
2446 LANGUAGE_ENGLISH_SOUTH_AFRICA
= _gdi_
.LANGUAGE_ENGLISH_SOUTH_AFRICA
2447 LANGUAGE_ENGLISH_TRINIDAD
= _gdi_
.LANGUAGE_ENGLISH_TRINIDAD
2448 LANGUAGE_ENGLISH_ZIMBABWE
= _gdi_
.LANGUAGE_ENGLISH_ZIMBABWE
2449 LANGUAGE_ESPERANTO
= _gdi_
.LANGUAGE_ESPERANTO
2450 LANGUAGE_ESTONIAN
= _gdi_
.LANGUAGE_ESTONIAN
2451 LANGUAGE_FAEROESE
= _gdi_
.LANGUAGE_FAEROESE
2452 LANGUAGE_FARSI
= _gdi_
.LANGUAGE_FARSI
2453 LANGUAGE_FIJI
= _gdi_
.LANGUAGE_FIJI
2454 LANGUAGE_FINNISH
= _gdi_
.LANGUAGE_FINNISH
2455 LANGUAGE_FRENCH
= _gdi_
.LANGUAGE_FRENCH
2456 LANGUAGE_FRENCH_BELGIAN
= _gdi_
.LANGUAGE_FRENCH_BELGIAN
2457 LANGUAGE_FRENCH_CANADIAN
= _gdi_
.LANGUAGE_FRENCH_CANADIAN
2458 LANGUAGE_FRENCH_LUXEMBOURG
= _gdi_
.LANGUAGE_FRENCH_LUXEMBOURG
2459 LANGUAGE_FRENCH_MONACO
= _gdi_
.LANGUAGE_FRENCH_MONACO
2460 LANGUAGE_FRENCH_SWISS
= _gdi_
.LANGUAGE_FRENCH_SWISS
2461 LANGUAGE_FRISIAN
= _gdi_
.LANGUAGE_FRISIAN
2462 LANGUAGE_GALICIAN
= _gdi_
.LANGUAGE_GALICIAN
2463 LANGUAGE_GEORGIAN
= _gdi_
.LANGUAGE_GEORGIAN
2464 LANGUAGE_GERMAN
= _gdi_
.LANGUAGE_GERMAN
2465 LANGUAGE_GERMAN_AUSTRIAN
= _gdi_
.LANGUAGE_GERMAN_AUSTRIAN
2466 LANGUAGE_GERMAN_BELGIUM
= _gdi_
.LANGUAGE_GERMAN_BELGIUM
2467 LANGUAGE_GERMAN_LIECHTENSTEIN
= _gdi_
.LANGUAGE_GERMAN_LIECHTENSTEIN
2468 LANGUAGE_GERMAN_LUXEMBOURG
= _gdi_
.LANGUAGE_GERMAN_LUXEMBOURG
2469 LANGUAGE_GERMAN_SWISS
= _gdi_
.LANGUAGE_GERMAN_SWISS
2470 LANGUAGE_GREEK
= _gdi_
.LANGUAGE_GREEK
2471 LANGUAGE_GREENLANDIC
= _gdi_
.LANGUAGE_GREENLANDIC
2472 LANGUAGE_GUARANI
= _gdi_
.LANGUAGE_GUARANI
2473 LANGUAGE_GUJARATI
= _gdi_
.LANGUAGE_GUJARATI
2474 LANGUAGE_HAUSA
= _gdi_
.LANGUAGE_HAUSA
2475 LANGUAGE_HEBREW
= _gdi_
.LANGUAGE_HEBREW
2476 LANGUAGE_HINDI
= _gdi_
.LANGUAGE_HINDI
2477 LANGUAGE_HUNGARIAN
= _gdi_
.LANGUAGE_HUNGARIAN
2478 LANGUAGE_ICELANDIC
= _gdi_
.LANGUAGE_ICELANDIC
2479 LANGUAGE_INDONESIAN
= _gdi_
.LANGUAGE_INDONESIAN
2480 LANGUAGE_INTERLINGUA
= _gdi_
.LANGUAGE_INTERLINGUA
2481 LANGUAGE_INTERLINGUE
= _gdi_
.LANGUAGE_INTERLINGUE
2482 LANGUAGE_INUKTITUT
= _gdi_
.LANGUAGE_INUKTITUT
2483 LANGUAGE_INUPIAK
= _gdi_
.LANGUAGE_INUPIAK
2484 LANGUAGE_IRISH
= _gdi_
.LANGUAGE_IRISH
2485 LANGUAGE_ITALIAN
= _gdi_
.LANGUAGE_ITALIAN
2486 LANGUAGE_ITALIAN_SWISS
= _gdi_
.LANGUAGE_ITALIAN_SWISS
2487 LANGUAGE_JAPANESE
= _gdi_
.LANGUAGE_JAPANESE
2488 LANGUAGE_JAVANESE
= _gdi_
.LANGUAGE_JAVANESE
2489 LANGUAGE_KANNADA
= _gdi_
.LANGUAGE_KANNADA
2490 LANGUAGE_KASHMIRI
= _gdi_
.LANGUAGE_KASHMIRI
2491 LANGUAGE_KASHMIRI_INDIA
= _gdi_
.LANGUAGE_KASHMIRI_INDIA
2492 LANGUAGE_KAZAKH
= _gdi_
.LANGUAGE_KAZAKH
2493 LANGUAGE_KERNEWEK
= _gdi_
.LANGUAGE_KERNEWEK
2494 LANGUAGE_KINYARWANDA
= _gdi_
.LANGUAGE_KINYARWANDA
2495 LANGUAGE_KIRGHIZ
= _gdi_
.LANGUAGE_KIRGHIZ
2496 LANGUAGE_KIRUNDI
= _gdi_
.LANGUAGE_KIRUNDI
2497 LANGUAGE_KONKANI
= _gdi_
.LANGUAGE_KONKANI
2498 LANGUAGE_KOREAN
= _gdi_
.LANGUAGE_KOREAN
2499 LANGUAGE_KURDISH
= _gdi_
.LANGUAGE_KURDISH
2500 LANGUAGE_LAOTHIAN
= _gdi_
.LANGUAGE_LAOTHIAN
2501 LANGUAGE_LATIN
= _gdi_
.LANGUAGE_LATIN
2502 LANGUAGE_LATVIAN
= _gdi_
.LANGUAGE_LATVIAN
2503 LANGUAGE_LINGALA
= _gdi_
.LANGUAGE_LINGALA
2504 LANGUAGE_LITHUANIAN
= _gdi_
.LANGUAGE_LITHUANIAN
2505 LANGUAGE_MACEDONIAN
= _gdi_
.LANGUAGE_MACEDONIAN
2506 LANGUAGE_MALAGASY
= _gdi_
.LANGUAGE_MALAGASY
2507 LANGUAGE_MALAY
= _gdi_
.LANGUAGE_MALAY
2508 LANGUAGE_MALAYALAM
= _gdi_
.LANGUAGE_MALAYALAM
2509 LANGUAGE_MALAY_BRUNEI_DARUSSALAM
= _gdi_
.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2510 LANGUAGE_MALAY_MALAYSIA
= _gdi_
.LANGUAGE_MALAY_MALAYSIA
2511 LANGUAGE_MALTESE
= _gdi_
.LANGUAGE_MALTESE
2512 LANGUAGE_MANIPURI
= _gdi_
.LANGUAGE_MANIPURI
2513 LANGUAGE_MAORI
= _gdi_
.LANGUAGE_MAORI
2514 LANGUAGE_MARATHI
= _gdi_
.LANGUAGE_MARATHI
2515 LANGUAGE_MOLDAVIAN
= _gdi_
.LANGUAGE_MOLDAVIAN
2516 LANGUAGE_MONGOLIAN
= _gdi_
.LANGUAGE_MONGOLIAN
2517 LANGUAGE_NAURU
= _gdi_
.LANGUAGE_NAURU
2518 LANGUAGE_NEPALI
= _gdi_
.LANGUAGE_NEPALI
2519 LANGUAGE_NEPALI_INDIA
= _gdi_
.LANGUAGE_NEPALI_INDIA
2520 LANGUAGE_NORWEGIAN_BOKMAL
= _gdi_
.LANGUAGE_NORWEGIAN_BOKMAL
2521 LANGUAGE_NORWEGIAN_NYNORSK
= _gdi_
.LANGUAGE_NORWEGIAN_NYNORSK
2522 LANGUAGE_OCCITAN
= _gdi_
.LANGUAGE_OCCITAN
2523 LANGUAGE_ORIYA
= _gdi_
.LANGUAGE_ORIYA
2524 LANGUAGE_OROMO
= _gdi_
.LANGUAGE_OROMO
2525 LANGUAGE_PASHTO
= _gdi_
.LANGUAGE_PASHTO
2526 LANGUAGE_POLISH
= _gdi_
.LANGUAGE_POLISH
2527 LANGUAGE_PORTUGUESE
= _gdi_
.LANGUAGE_PORTUGUESE
2528 LANGUAGE_PORTUGUESE_BRAZILIAN
= _gdi_
.LANGUAGE_PORTUGUESE_BRAZILIAN
2529 LANGUAGE_PUNJABI
= _gdi_
.LANGUAGE_PUNJABI
2530 LANGUAGE_QUECHUA
= _gdi_
.LANGUAGE_QUECHUA
2531 LANGUAGE_RHAETO_ROMANCE
= _gdi_
.LANGUAGE_RHAETO_ROMANCE
2532 LANGUAGE_ROMANIAN
= _gdi_
.LANGUAGE_ROMANIAN
2533 LANGUAGE_RUSSIAN
= _gdi_
.LANGUAGE_RUSSIAN
2534 LANGUAGE_RUSSIAN_UKRAINE
= _gdi_
.LANGUAGE_RUSSIAN_UKRAINE
2535 LANGUAGE_SAMOAN
= _gdi_
.LANGUAGE_SAMOAN
2536 LANGUAGE_SANGHO
= _gdi_
.LANGUAGE_SANGHO
2537 LANGUAGE_SANSKRIT
= _gdi_
.LANGUAGE_SANSKRIT
2538 LANGUAGE_SCOTS_GAELIC
= _gdi_
.LANGUAGE_SCOTS_GAELIC
2539 LANGUAGE_SERBIAN
= _gdi_
.LANGUAGE_SERBIAN
2540 LANGUAGE_SERBIAN_CYRILLIC
= _gdi_
.LANGUAGE_SERBIAN_CYRILLIC
2541 LANGUAGE_SERBIAN_LATIN
= _gdi_
.LANGUAGE_SERBIAN_LATIN
2542 LANGUAGE_SERBO_CROATIAN
= _gdi_
.LANGUAGE_SERBO_CROATIAN
2543 LANGUAGE_SESOTHO
= _gdi_
.LANGUAGE_SESOTHO
2544 LANGUAGE_SETSWANA
= _gdi_
.LANGUAGE_SETSWANA
2545 LANGUAGE_SHONA
= _gdi_
.LANGUAGE_SHONA
2546 LANGUAGE_SINDHI
= _gdi_
.LANGUAGE_SINDHI
2547 LANGUAGE_SINHALESE
= _gdi_
.LANGUAGE_SINHALESE
2548 LANGUAGE_SISWATI
= _gdi_
.LANGUAGE_SISWATI
2549 LANGUAGE_SLOVAK
= _gdi_
.LANGUAGE_SLOVAK
2550 LANGUAGE_SLOVENIAN
= _gdi_
.LANGUAGE_SLOVENIAN
2551 LANGUAGE_SOMALI
= _gdi_
.LANGUAGE_SOMALI
2552 LANGUAGE_SPANISH
= _gdi_
.LANGUAGE_SPANISH
2553 LANGUAGE_SPANISH_ARGENTINA
= _gdi_
.LANGUAGE_SPANISH_ARGENTINA
2554 LANGUAGE_SPANISH_BOLIVIA
= _gdi_
.LANGUAGE_SPANISH_BOLIVIA
2555 LANGUAGE_SPANISH_CHILE
= _gdi_
.LANGUAGE_SPANISH_CHILE
2556 LANGUAGE_SPANISH_COLOMBIA
= _gdi_
.LANGUAGE_SPANISH_COLOMBIA
2557 LANGUAGE_SPANISH_COSTA_RICA
= _gdi_
.LANGUAGE_SPANISH_COSTA_RICA
2558 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
= _gdi_
.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2559 LANGUAGE_SPANISH_ECUADOR
= _gdi_
.LANGUAGE_SPANISH_ECUADOR
2560 LANGUAGE_SPANISH_EL_SALVADOR
= _gdi_
.LANGUAGE_SPANISH_EL_SALVADOR
2561 LANGUAGE_SPANISH_GUATEMALA
= _gdi_
.LANGUAGE_SPANISH_GUATEMALA
2562 LANGUAGE_SPANISH_HONDURAS
= _gdi_
.LANGUAGE_SPANISH_HONDURAS
2563 LANGUAGE_SPANISH_MEXICAN
= _gdi_
.LANGUAGE_SPANISH_MEXICAN
2564 LANGUAGE_SPANISH_MODERN
= _gdi_
.LANGUAGE_SPANISH_MODERN
2565 LANGUAGE_SPANISH_NICARAGUA
= _gdi_
.LANGUAGE_SPANISH_NICARAGUA
2566 LANGUAGE_SPANISH_PANAMA
= _gdi_
.LANGUAGE_SPANISH_PANAMA
2567 LANGUAGE_SPANISH_PARAGUAY
= _gdi_
.LANGUAGE_SPANISH_PARAGUAY
2568 LANGUAGE_SPANISH_PERU
= _gdi_
.LANGUAGE_SPANISH_PERU
2569 LANGUAGE_SPANISH_PUERTO_RICO
= _gdi_
.LANGUAGE_SPANISH_PUERTO_RICO
2570 LANGUAGE_SPANISH_URUGUAY
= _gdi_
.LANGUAGE_SPANISH_URUGUAY
2571 LANGUAGE_SPANISH_US
= _gdi_
.LANGUAGE_SPANISH_US
2572 LANGUAGE_SPANISH_VENEZUELA
= _gdi_
.LANGUAGE_SPANISH_VENEZUELA
2573 LANGUAGE_SUNDANESE
= _gdi_
.LANGUAGE_SUNDANESE
2574 LANGUAGE_SWAHILI
= _gdi_
.LANGUAGE_SWAHILI
2575 LANGUAGE_SWEDISH
= _gdi_
.LANGUAGE_SWEDISH
2576 LANGUAGE_SWEDISH_FINLAND
= _gdi_
.LANGUAGE_SWEDISH_FINLAND
2577 LANGUAGE_TAGALOG
= _gdi_
.LANGUAGE_TAGALOG
2578 LANGUAGE_TAJIK
= _gdi_
.LANGUAGE_TAJIK
2579 LANGUAGE_TAMIL
= _gdi_
.LANGUAGE_TAMIL
2580 LANGUAGE_TATAR
= _gdi_
.LANGUAGE_TATAR
2581 LANGUAGE_TELUGU
= _gdi_
.LANGUAGE_TELUGU
2582 LANGUAGE_THAI
= _gdi_
.LANGUAGE_THAI
2583 LANGUAGE_TIBETAN
= _gdi_
.LANGUAGE_TIBETAN
2584 LANGUAGE_TIGRINYA
= _gdi_
.LANGUAGE_TIGRINYA
2585 LANGUAGE_TONGA
= _gdi_
.LANGUAGE_TONGA
2586 LANGUAGE_TSONGA
= _gdi_
.LANGUAGE_TSONGA
2587 LANGUAGE_TURKISH
= _gdi_
.LANGUAGE_TURKISH
2588 LANGUAGE_TURKMEN
= _gdi_
.LANGUAGE_TURKMEN
2589 LANGUAGE_TWI
= _gdi_
.LANGUAGE_TWI
2590 LANGUAGE_UIGHUR
= _gdi_
.LANGUAGE_UIGHUR
2591 LANGUAGE_UKRAINIAN
= _gdi_
.LANGUAGE_UKRAINIAN
2592 LANGUAGE_URDU
= _gdi_
.LANGUAGE_URDU
2593 LANGUAGE_URDU_INDIA
= _gdi_
.LANGUAGE_URDU_INDIA
2594 LANGUAGE_URDU_PAKISTAN
= _gdi_
.LANGUAGE_URDU_PAKISTAN
2595 LANGUAGE_UZBEK
= _gdi_
.LANGUAGE_UZBEK
2596 LANGUAGE_UZBEK_CYRILLIC
= _gdi_
.LANGUAGE_UZBEK_CYRILLIC
2597 LANGUAGE_UZBEK_LATIN
= _gdi_
.LANGUAGE_UZBEK_LATIN
2598 LANGUAGE_VIETNAMESE
= _gdi_
.LANGUAGE_VIETNAMESE
2599 LANGUAGE_VOLAPUK
= _gdi_
.LANGUAGE_VOLAPUK
2600 LANGUAGE_WELSH
= _gdi_
.LANGUAGE_WELSH
2601 LANGUAGE_WOLOF
= _gdi_
.LANGUAGE_WOLOF
2602 LANGUAGE_XHOSA
= _gdi_
.LANGUAGE_XHOSA
2603 LANGUAGE_YIDDISH
= _gdi_
.LANGUAGE_YIDDISH
2604 LANGUAGE_YORUBA
= _gdi_
.LANGUAGE_YORUBA
2605 LANGUAGE_ZHUANG
= _gdi_
.LANGUAGE_ZHUANG
2606 LANGUAGE_ZULU
= _gdi_
.LANGUAGE_ZULU
2607 LANGUAGE_USER_DEFINED
= _gdi_
.LANGUAGE_USER_DEFINED
2608 class LanguageInfo(object):
2609 """Proxy of C++ LanguageInfo class"""
2610 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2611 def __init__(self
): raise AttributeError, "No constructor defined"
2612 __repr__
= _swig_repr
2613 Language
= property(_gdi_
.LanguageInfo_Language_get
, _gdi_
.LanguageInfo_Language_set
)
2614 CanonicalName
= property(_gdi_
.LanguageInfo_CanonicalName_get
, _gdi_
.LanguageInfo_CanonicalName_set
)
2615 Description
= property(_gdi_
.LanguageInfo_Description_get
, _gdi_
.LanguageInfo_Description_set
)
2616 _gdi_
.LanguageInfo_swigregister(LanguageInfo
)
2618 LOCALE_CAT_NUMBER
= _gdi_
.LOCALE_CAT_NUMBER
2619 LOCALE_CAT_DATE
= _gdi_
.LOCALE_CAT_DATE
2620 LOCALE_CAT_MONEY
= _gdi_
.LOCALE_CAT_MONEY
2621 LOCALE_CAT_MAX
= _gdi_
.LOCALE_CAT_MAX
2622 LOCALE_THOUSANDS_SEP
= _gdi_
.LOCALE_THOUSANDS_SEP
2623 LOCALE_DECIMAL_POINT
= _gdi_
.LOCALE_DECIMAL_POINT
2624 LOCALE_LOAD_DEFAULT
= _gdi_
.LOCALE_LOAD_DEFAULT
2625 LOCALE_CONV_ENCODING
= _gdi_
.LOCALE_CONV_ENCODING
2626 class Locale(object):
2627 """Proxy of C++ Locale class"""
2628 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2629 __repr__
= _swig_repr
2630 def __init__(self
, *args
, **kwargs
):
2631 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2632 _gdi_
.Locale_swiginit(self
,_gdi_
.new_Locale(*args
, **kwargs
))
2633 __swig_destroy__
= _gdi_
.delete_Locale
2634 __del__
= lambda self
: None;
2635 def Init1(*args
, **kwargs
):
2637 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2638 bool bLoadDefault=True,
2639 bool bConvertEncoding=False) -> bool
2641 return _gdi_
.Locale_Init1(*args
, **kwargs
)
2643 def Init2(*args
, **kwargs
):
2644 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2645 return _gdi_
.Locale_Init2(*args
, **kwargs
)
2647 def Init(self
, *_args
, **_kwargs
):
2648 if type(_args
[0]) in [type(''), type(u
'')]:
2649 val
= self
.Init1(*_args
, **_kwargs
)
2651 val
= self
.Init2(*_args
, **_kwargs
)
2654 def GetSystemLanguage(*args
, **kwargs
):
2655 """GetSystemLanguage() -> int"""
2656 return _gdi_
.Locale_GetSystemLanguage(*args
, **kwargs
)
2658 GetSystemLanguage
= staticmethod(GetSystemLanguage
)
2659 def GetSystemEncoding(*args
, **kwargs
):
2660 """GetSystemEncoding() -> int"""
2661 return _gdi_
.Locale_GetSystemEncoding(*args
, **kwargs
)
2663 GetSystemEncoding
= staticmethod(GetSystemEncoding
)
2664 def GetSystemEncodingName(*args
, **kwargs
):
2665 """GetSystemEncodingName() -> String"""
2666 return _gdi_
.Locale_GetSystemEncodingName(*args
, **kwargs
)
2668 GetSystemEncodingName
= staticmethod(GetSystemEncodingName
)
2669 def IsOk(*args
, **kwargs
):
2670 """IsOk(self) -> bool"""
2671 return _gdi_
.Locale_IsOk(*args
, **kwargs
)
2673 def __nonzero__(self
): return self
.IsOk()
2674 def GetLocale(*args
, **kwargs
):
2675 """GetLocale(self) -> String"""
2676 return _gdi_
.Locale_GetLocale(*args
, **kwargs
)
2678 def GetLanguage(*args
, **kwargs
):
2679 """GetLanguage(self) -> int"""
2680 return _gdi_
.Locale_GetLanguage(*args
, **kwargs
)
2682 def GetSysName(*args
, **kwargs
):
2683 """GetSysName(self) -> String"""
2684 return _gdi_
.Locale_GetSysName(*args
, **kwargs
)
2686 def GetCanonicalName(*args
, **kwargs
):
2687 """GetCanonicalName(self) -> String"""
2688 return _gdi_
.Locale_GetCanonicalName(*args
, **kwargs
)
2690 def AddCatalogLookupPathPrefix(*args
, **kwargs
):
2691 """AddCatalogLookupPathPrefix(String prefix)"""
2692 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2694 AddCatalogLookupPathPrefix
= staticmethod(AddCatalogLookupPathPrefix
)
2695 def AddCatalog(*args
, **kwargs
):
2696 """AddCatalog(self, String szDomain) -> bool"""
2697 return _gdi_
.Locale_AddCatalog(*args
, **kwargs
)
2699 def IsAvailable(*args
, **kwargs
):
2700 """IsAvailable(int lang) -> bool"""
2701 return _gdi_
.Locale_IsAvailable(*args
, **kwargs
)
2703 IsAvailable
= staticmethod(IsAvailable
)
2704 def IsLoaded(*args
, **kwargs
):
2705 """IsLoaded(self, String szDomain) -> bool"""
2706 return _gdi_
.Locale_IsLoaded(*args
, **kwargs
)
2708 def GetLanguageInfo(*args
, **kwargs
):
2709 """GetLanguageInfo(int lang) -> LanguageInfo"""
2710 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2712 GetLanguageInfo
= staticmethod(GetLanguageInfo
)
2713 def GetLanguageName(*args
, **kwargs
):
2714 """GetLanguageName(int lang) -> String"""
2715 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2717 GetLanguageName
= staticmethod(GetLanguageName
)
2718 def FindLanguageInfo(*args
, **kwargs
):
2719 """FindLanguageInfo(String locale) -> LanguageInfo"""
2720 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2722 FindLanguageInfo
= staticmethod(FindLanguageInfo
)
2723 def AddLanguage(*args
, **kwargs
):
2724 """AddLanguage(LanguageInfo info)"""
2725 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2727 AddLanguage
= staticmethod(AddLanguage
)
2728 def GetString(*args
, **kwargs
):
2729 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2730 return _gdi_
.Locale_GetString(*args
, **kwargs
)
2732 def GetName(*args
, **kwargs
):
2733 """GetName(self) -> String"""
2734 return _gdi_
.Locale_GetName(*args
, **kwargs
)
2736 CanonicalName
= property(GetCanonicalName
,doc
="See `GetCanonicalName`")
2737 Language
= property(GetLanguage
,doc
="See `GetLanguage`")
2738 Locale
= property(GetLocale
,doc
="See `GetLocale`")
2739 Name
= property(GetName
,doc
="See `GetName`")
2740 String
= property(GetString
,doc
="See `GetString`")
2741 SysName
= property(GetSysName
,doc
="See `GetSysName`")
2742 _gdi_
.Locale_swigregister(Locale
)
2744 def Locale_GetSystemLanguage(*args
):
2745 """Locale_GetSystemLanguage() -> int"""
2746 return _gdi_
.Locale_GetSystemLanguage(*args
)
2748 def Locale_GetSystemEncoding(*args
):
2749 """Locale_GetSystemEncoding() -> int"""
2750 return _gdi_
.Locale_GetSystemEncoding(*args
)
2752 def Locale_GetSystemEncodingName(*args
):
2753 """Locale_GetSystemEncodingName() -> String"""
2754 return _gdi_
.Locale_GetSystemEncodingName(*args
)
2756 def Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
):
2757 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2758 return _gdi_
.Locale_AddCatalogLookupPathPrefix(*args
, **kwargs
)
2760 def Locale_IsAvailable(*args
, **kwargs
):
2761 """Locale_IsAvailable(int lang) -> bool"""
2762 return _gdi_
.Locale_IsAvailable(*args
, **kwargs
)
2764 def Locale_GetLanguageInfo(*args
, **kwargs
):
2765 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2766 return _gdi_
.Locale_GetLanguageInfo(*args
, **kwargs
)
2768 def Locale_GetLanguageName(*args
, **kwargs
):
2769 """Locale_GetLanguageName(int lang) -> String"""
2770 return _gdi_
.Locale_GetLanguageName(*args
, **kwargs
)
2772 def Locale_FindLanguageInfo(*args
, **kwargs
):
2773 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2774 return _gdi_
.Locale_FindLanguageInfo(*args
, **kwargs
)
2776 def Locale_AddLanguage(*args
, **kwargs
):
2777 """Locale_AddLanguage(LanguageInfo info)"""
2778 return _gdi_
.Locale_AddLanguage(*args
, **kwargs
)
2780 class PyLocale(Locale
):
2781 """Proxy of C++ PyLocale class"""
2782 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2783 __repr__
= _swig_repr
2784 def __init__(self
, *args
, **kwargs
):
2785 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
2786 _gdi_
.PyLocale_swiginit(self
,_gdi_
.new_PyLocale(*args
, **kwargs
))
2787 PyLocale
._setCallbackInfo
(self
, self
, PyLocale
)
2789 __swig_destroy__
= _gdi_
.delete_PyLocale
2790 __del__
= lambda self
: None;
2791 def _setCallbackInfo(*args
, **kwargs
):
2792 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
2793 return _gdi_
.PyLocale__setCallbackInfo(*args
, **kwargs
)
2795 def GetSingularString(*args
, **kwargs
):
2796 """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar"""
2797 return _gdi_
.PyLocale_GetSingularString(*args
, **kwargs
)
2799 def GetPluralString(*args
, **kwargs
):
2801 GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n,
2802 wxChar szDomain=None) -> wxChar
2804 return _gdi_
.PyLocale_GetPluralString(*args
, **kwargs
)
2806 _gdi_
.PyLocale_swigregister(PyLocale
)
2809 def GetLocale(*args
):
2810 """GetLocale() -> Locale"""
2811 return _gdi_
.GetLocale(*args
)
2812 #---------------------------------------------------------------------------
2814 CONVERT_STRICT
= _gdi_
.CONVERT_STRICT
2815 CONVERT_SUBSTITUTE
= _gdi_
.CONVERT_SUBSTITUTE
2816 PLATFORM_CURRENT
= _gdi_
.PLATFORM_CURRENT
2817 PLATFORM_UNIX
= _gdi_
.PLATFORM_UNIX
2818 PLATFORM_WINDOWS
= _gdi_
.PLATFORM_WINDOWS
2819 PLATFORM_OS2
= _gdi_
.PLATFORM_OS2
2820 PLATFORM_MAC
= _gdi_
.PLATFORM_MAC
2821 class EncodingConverter(_core
.Object
):
2822 """Proxy of C++ EncodingConverter class"""
2823 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2824 __repr__
= _swig_repr
2825 def __init__(self
, *args
, **kwargs
):
2826 """__init__(self) -> EncodingConverter"""
2827 _gdi_
.EncodingConverter_swiginit(self
,_gdi_
.new_EncodingConverter(*args
, **kwargs
))
2828 __swig_destroy__
= _gdi_
.delete_EncodingConverter
2829 __del__
= lambda self
: None;
2830 def Init(*args
, **kwargs
):
2831 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2832 return _gdi_
.EncodingConverter_Init(*args
, **kwargs
)
2834 def Convert(*args
, **kwargs
):
2835 """Convert(self, String input) -> String"""
2836 return _gdi_
.EncodingConverter_Convert(*args
, **kwargs
)
2838 def GetPlatformEquivalents(*args
, **kwargs
):
2839 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2840 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2842 GetPlatformEquivalents
= staticmethod(GetPlatformEquivalents
)
2843 def GetAllEquivalents(*args
, **kwargs
):
2844 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2845 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2847 GetAllEquivalents
= staticmethod(GetAllEquivalents
)
2848 def CanConvert(*args
, **kwargs
):
2849 """CanConvert(int encIn, int encOut) -> bool"""
2850 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2852 CanConvert
= staticmethod(CanConvert
)
2853 def __nonzero__(self
): return self
.IsOk()
2854 _gdi_
.EncodingConverter_swigregister(EncodingConverter
)
2856 def GetTranslation(*args
):
2858 GetTranslation(String str) -> String
2859 GetTranslation(String str, String domain) -> String
2860 GetTranslation(String str, String strPlural, size_t n) -> String
2861 GetTranslation(String str, String strPlural, size_t n, String domain) -> String
2863 return _gdi_
.GetTranslation(*args
)
2865 def EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
):
2866 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2867 return _gdi_
.EncodingConverter_GetPlatformEquivalents(*args
, **kwargs
)
2869 def EncodingConverter_GetAllEquivalents(*args
, **kwargs
):
2870 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2871 return _gdi_
.EncodingConverter_GetAllEquivalents(*args
, **kwargs
)
2873 def EncodingConverter_CanConvert(*args
, **kwargs
):
2874 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2875 return _gdi_
.EncodingConverter_CanConvert(*args
, **kwargs
)
2877 #----------------------------------------------------------------------------
2878 # On MSW add the directory where the wxWidgets catalogs were installed
2879 # to the default catalog path.
2880 if wx
.Platform
== "__WXMSW__":
2882 _localedir
= os
.path
.join(os
.path
.split(__file__
)[0], "locale")
2883 Locale
.AddCatalogLookupPathPrefix(_localedir
)
2886 #----------------------------------------------------------------------------
2888 #---------------------------------------------------------------------------
2890 class DC(_core
.Object
):
2892 A wx.DC is a device context onto which graphics and text can be
2893 drawn. It is intended to represent a number of output devices in a
2894 generic way, so a window can have a device context associated with it,
2895 and a printer also has a device context. In this way, the same piece
2896 of code may write to a number of different devices, if the device
2897 context is used as a parameter.
2899 Derived types of wxDC have documentation for specific features only,
2900 so refer to this section for most device context information.
2902 The wx.DC class is abstract and can not be instantiated, you must use
2903 one of the derived classes instead. Which one will depend on the
2904 situation in which it is used.
2906 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
2907 def __init__(self
): raise AttributeError, "No constructor defined"
2908 __repr__
= _swig_repr
2909 __swig_destroy__
= _gdi_
.delete_DC
2910 __del__
= lambda self
: None;
2911 # These have been deprecated in wxWidgets. Since they never
2912 # really did anything to begin with, just make them be NOPs.
2913 def BeginDrawing(self
): pass
2914 def EndDrawing(self
): pass
2916 def FloodFill(*args
, **kwargs
):
2918 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2920 Flood fills the device context starting from the given point, using
2921 the current brush colour, and using a style:
2923 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2924 the given colour is encountered.
2926 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2929 Returns False if the operation failed.
2931 Note: The present implementation for non-Windows platforms may fail to
2932 find colour borders if the pixels do not match the colour
2933 exactly. However the function will still return true.
2935 return _gdi_
.DC_FloodFill(*args
, **kwargs
)
2937 def FloodFillPoint(*args
, **kwargs
):
2939 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2941 Flood fills the device context starting from the given point, using
2942 the current brush colour, and using a style:
2944 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2945 the given colour is encountered.
2947 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2950 Returns False if the operation failed.
2952 Note: The present implementation for non-Windows platforms may fail to
2953 find colour borders if the pixels do not match the colour
2954 exactly. However the function will still return true.
2956 return _gdi_
.DC_FloodFillPoint(*args
, **kwargs
)
2958 def GradientFillConcentric(*args
, **kwargs
):
2960 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
2963 Fill the area specified by rect with a radial gradient, starting from
2964 initialColour in the center of the circle and fading to destColour on
2965 the outside of the circle. The circleCenter argument is the relative
2966 coordinants of the center of the circle in the specified rect.
2968 Note: Currently this function is very slow, don't use it for real-time
2971 return _gdi_
.DC_GradientFillConcentric(*args
, **kwargs
)
2973 def GradientFillLinear(*args
, **kwargs
):
2975 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
2976 int nDirection=EAST)
2978 Fill the area specified by rect with a linear gradient, starting from
2979 initialColour and eventually fading to destColour. The nDirection
2980 parameter specifies the direction of the colour change, default is to
2981 use initialColour on the left part of the rectangle and destColour on
2984 return _gdi_
.DC_GradientFillLinear(*args
, **kwargs
)
2986 def GetPixel(*args
, **kwargs
):
2988 GetPixel(self, int x, int y) -> Colour
2990 Gets the colour at the specified location on the DC.
2992 return _gdi_
.DC_GetPixel(*args
, **kwargs
)
2994 def GetPixelPoint(*args
, **kwargs
):
2995 """GetPixelPoint(self, Point pt) -> Colour"""
2996 return _gdi_
.DC_GetPixelPoint(*args
, **kwargs
)
2998 def DrawLine(*args
, **kwargs
):
3000 DrawLine(self, int x1, int y1, int x2, int y2)
3002 Draws a line from the first point to the second. The current pen is
3003 used for drawing the line. Note that the second point is *not* part of
3004 the line and is not drawn by this function (this is consistent with
3005 the behaviour of many other toolkits).
3007 return _gdi_
.DC_DrawLine(*args
, **kwargs
)
3009 def DrawLinePoint(*args
, **kwargs
):
3011 DrawLinePoint(self, Point pt1, Point pt2)
3013 Draws a line from the first point to the second. The current pen is
3014 used for drawing the line. Note that the second point is *not* part of
3015 the line and is not drawn by this function (this is consistent with
3016 the behaviour of many other toolkits).
3018 return _gdi_
.DC_DrawLinePoint(*args
, **kwargs
)
3020 def CrossHair(*args
, **kwargs
):
3022 CrossHair(self, int x, int y)
3024 Displays a cross hair using the current pen. This is a vertical and
3025 horizontal line the height and width of the window, centred on the
3028 return _gdi_
.DC_CrossHair(*args
, **kwargs
)
3030 def CrossHairPoint(*args
, **kwargs
):
3032 CrossHairPoint(self, Point pt)
3034 Displays a cross hair using the current pen. This is a vertical and
3035 horizontal line the height and width of the window, centred on the
3038 return _gdi_
.DC_CrossHairPoint(*args
, **kwargs
)
3040 def DrawArc(*args
, **kwargs
):
3042 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
3044 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3045 the first point to the second. The current pen is used for the outline
3046 and the current brush for filling the shape.
3048 The arc is drawn in an anticlockwise direction from the start point to
3051 return _gdi_
.DC_DrawArc(*args
, **kwargs
)
3053 def DrawArcPoint(*args
, **kwargs
):
3055 DrawArcPoint(self, Point pt1, Point pt2, Point center)
3057 Draws an arc of a circle, centred on the *center* point (xc, yc), from
3058 the first point to the second. The current pen is used for the outline
3059 and the current brush for filling the shape.
3061 The arc is drawn in an anticlockwise direction from the start point to
3064 return _gdi_
.DC_DrawArcPoint(*args
, **kwargs
)
3066 def DrawCheckMark(*args
, **kwargs
):
3068 DrawCheckMark(self, int x, int y, int width, int height)
3070 Draws a check mark inside the given rectangle.
3072 return _gdi_
.DC_DrawCheckMark(*args
, **kwargs
)
3074 def DrawCheckMarkRect(*args
, **kwargs
):
3076 DrawCheckMarkRect(self, Rect rect)
3078 Draws a check mark inside the given rectangle.
3080 return _gdi_
.DC_DrawCheckMarkRect(*args
, **kwargs
)
3082 def DrawEllipticArc(*args
, **kwargs
):
3084 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3086 Draws an arc of an ellipse, with the given rectangle defining the
3087 bounds of the ellipse. The current pen is used for drawing the arc and
3088 the current brush is used for drawing the pie.
3090 The *start* and *end* parameters specify the start and end of the arc
3091 relative to the three-o'clock position from the center of the
3092 rectangle. Angles are specified in degrees (360 is a complete
3093 circle). Positive values mean counter-clockwise motion. If start is
3094 equal to end, a complete ellipse will be drawn.
3096 return _gdi_
.DC_DrawEllipticArc(*args
, **kwargs
)
3098 def DrawEllipticArcPointSize(*args
, **kwargs
):
3100 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3102 Draws an arc of an ellipse, with the given rectangle defining the
3103 bounds of the ellipse. The current pen is used for drawing the arc and
3104 the current brush is used for drawing the pie.
3106 The *start* and *end* parameters specify the start and end of the arc
3107 relative to the three-o'clock position from the center of the
3108 rectangle. Angles are specified in degrees (360 is a complete
3109 circle). Positive values mean counter-clockwise motion. If start is
3110 equal to end, a complete ellipse will be drawn.
3112 return _gdi_
.DC_DrawEllipticArcPointSize(*args
, **kwargs
)
3114 def DrawPoint(*args
, **kwargs
):
3116 DrawPoint(self, int x, int y)
3118 Draws a point using the current pen.
3120 return _gdi_
.DC_DrawPoint(*args
, **kwargs
)
3122 def DrawPointPoint(*args
, **kwargs
):
3124 DrawPointPoint(self, Point pt)
3126 Draws a point using the current pen.
3128 return _gdi_
.DC_DrawPointPoint(*args
, **kwargs
)
3130 def DrawRectangle(*args
, **kwargs
):
3132 DrawRectangle(self, int x, int y, int width, int height)
3134 Draws a rectangle with the given top left corner, and with the given
3135 size. The current pen is used for the outline and the current brush
3136 for filling the shape.
3138 return _gdi_
.DC_DrawRectangle(*args
, **kwargs
)
3140 def DrawRectangleRect(*args
, **kwargs
):
3142 DrawRectangleRect(self, Rect rect)
3144 Draws a rectangle with the given top left corner, and with the given
3145 size. The current pen is used for the outline and the current brush
3146 for filling the shape.
3148 return _gdi_
.DC_DrawRectangleRect(*args
, **kwargs
)
3150 def DrawRectanglePointSize(*args
, **kwargs
):
3152 DrawRectanglePointSize(self, Point pt, Size sz)
3154 Draws a rectangle with the given top left corner, and with the given
3155 size. The current pen is used for the outline and the current brush
3156 for filling the shape.
3158 return _gdi_
.DC_DrawRectanglePointSize(*args
, **kwargs
)
3160 def DrawRoundedRectangle(*args
, **kwargs
):
3162 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3164 Draws a rectangle with the given top left corner, and with the given
3165 size. The corners are quarter-circles using the given radius. The
3166 current pen is used for the outline and the current brush for filling
3169 If radius is positive, the value is assumed to be the radius of the
3170 rounded corner. If radius is negative, the absolute value is assumed
3171 to be the proportion of the smallest dimension of the rectangle. This
3172 means that the corner can be a sensible size relative to the size of
3173 the rectangle, and also avoids the strange effects X produces when the
3174 corners are too big for the rectangle.
3176 return _gdi_
.DC_DrawRoundedRectangle(*args
, **kwargs
)
3178 def DrawRoundedRectangleRect(*args
, **kwargs
):
3180 DrawRoundedRectangleRect(self, Rect r, double radius)
3182 Draws a rectangle with the given top left corner, and with the given
3183 size. The corners are quarter-circles using the given radius. The
3184 current pen is used for the outline and the current brush for filling
3187 If radius is positive, the value is assumed to be the radius of the
3188 rounded corner. If radius is negative, the absolute value is assumed
3189 to be the proportion of the smallest dimension of the rectangle. This
3190 means that the corner can be a sensible size relative to the size of
3191 the rectangle, and also avoids the strange effects X produces when the
3192 corners are too big for the rectangle.
3194 return _gdi_
.DC_DrawRoundedRectangleRect(*args
, **kwargs
)
3196 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
3198 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3200 Draws a rectangle with the given top left corner, and with the given
3201 size. The corners are quarter-circles using the given radius. The
3202 current pen is used for the outline and the current brush for filling
3205 If radius is positive, the value is assumed to be the radius of the
3206 rounded corner. If radius is negative, the absolute value is assumed
3207 to be the proportion of the smallest dimension of the rectangle. This
3208 means that the corner can be a sensible size relative to the size of
3209 the rectangle, and also avoids the strange effects X produces when the
3210 corners are too big for the rectangle.
3212 return _gdi_
.DC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
3214 def DrawCircle(*args
, **kwargs
):
3216 DrawCircle(self, int x, int y, int radius)
3218 Draws a circle with the given center point and radius. The current
3219 pen is used for the outline and the current brush for filling the
3222 return _gdi_
.DC_DrawCircle(*args
, **kwargs
)
3224 def DrawCirclePoint(*args
, **kwargs
):
3226 DrawCirclePoint(self, Point pt, int radius)
3228 Draws a circle with the given center point and radius. The current
3229 pen is used for the outline and the current brush for filling the
3232 return _gdi_
.DC_DrawCirclePoint(*args
, **kwargs
)
3234 def DrawEllipse(*args
, **kwargs
):
3236 DrawEllipse(self, int x, int y, int width, int height)
3238 Draws an ellipse contained in the specified rectangle. The current pen
3239 is used for the outline and the current brush for filling the shape.
3241 return _gdi_
.DC_DrawEllipse(*args
, **kwargs
)
3243 def DrawEllipseRect(*args
, **kwargs
):
3245 DrawEllipseRect(self, Rect rect)
3247 Draws an ellipse contained in the specified rectangle. The current pen
3248 is used for the outline and the current brush for filling the shape.
3250 return _gdi_
.DC_DrawEllipseRect(*args
, **kwargs
)
3252 def DrawEllipsePointSize(*args
, **kwargs
):
3254 DrawEllipsePointSize(self, Point pt, Size sz)
3256 Draws an ellipse contained in the specified rectangle. The current pen
3257 is used for the outline and the current brush for filling the shape.
3259 return _gdi_
.DC_DrawEllipsePointSize(*args
, **kwargs
)
3261 def DrawIcon(*args
, **kwargs
):
3263 DrawIcon(self, Icon icon, int x, int y)
3265 Draw an icon on the display (does nothing if the device context is
3266 PostScript). This can be the simplest way of drawing bitmaps on a
3269 return _gdi_
.DC_DrawIcon(*args
, **kwargs
)
3271 def DrawIconPoint(*args
, **kwargs
):
3273 DrawIconPoint(self, Icon icon, Point pt)
3275 Draw an icon on the display (does nothing if the device context is
3276 PostScript). This can be the simplest way of drawing bitmaps on a
3279 return _gdi_
.DC_DrawIconPoint(*args
, **kwargs
)
3281 def DrawBitmap(*args
, **kwargs
):
3283 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3285 Draw a bitmap on the device context at the specified point. If
3286 *transparent* is true and the bitmap has a transparency mask, (or
3287 alpha channel on the platforms that support it) then the bitmap will
3288 be drawn transparently.
3290 return _gdi_
.DC_DrawBitmap(*args
, **kwargs
)
3292 def DrawBitmapPoint(*args
, **kwargs
):
3294 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3296 Draw a bitmap on the device context at the specified point. If
3297 *transparent* is true and the bitmap has a transparency mask, (or
3298 alpha channel on the platforms that support it) then the bitmap will
3299 be drawn transparently.
3301 return _gdi_
.DC_DrawBitmapPoint(*args
, **kwargs
)
3303 def DrawText(*args
, **kwargs
):
3305 DrawText(self, String text, int x, int y)
3307 Draws a text string at the specified point, using the current text
3308 font, and the current text foreground and background colours.
3310 The coordinates refer to the top-left corner of the rectangle bounding
3311 the string. See `GetTextExtent` for how to get the dimensions of a
3312 text string, which can be used to position the text more precisely.
3314 **NOTE**: under wxGTK the current logical function is used by this
3315 function but it is ignored by wxMSW. Thus, you should avoid using
3316 logical functions with this function in portable programs.
3318 return _gdi_
.DC_DrawText(*args
, **kwargs
)
3320 def DrawTextPoint(*args
, **kwargs
):
3322 DrawTextPoint(self, String text, Point pt)
3324 Draws a text string at the specified point, using the current text
3325 font, and the current text foreground and background colours.
3327 The coordinates refer to the top-left corner of the rectangle bounding
3328 the string. See `GetTextExtent` for how to get the dimensions of a
3329 text string, which can be used to position the text more precisely.
3331 **NOTE**: under wxGTK the current logical function is used by this
3332 function but it is ignored by wxMSW. Thus, you should avoid using
3333 logical functions with this function in portable programs.
3335 return _gdi_
.DC_DrawTextPoint(*args
, **kwargs
)
3337 def DrawRotatedText(*args
, **kwargs
):
3339 DrawRotatedText(self, String text, int x, int y, double angle)
3341 Draws the text rotated by *angle* degrees, if supported by the platform.
3343 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3344 function. In particular, a font different from ``wx.NORMAL_FONT``
3345 should be used as the it is not normally a TrueType
3346 font. ``wx.SWISS_FONT`` is an example of a font which is.
3348 return _gdi_
.DC_DrawRotatedText(*args
, **kwargs
)
3350 def DrawRotatedTextPoint(*args
, **kwargs
):
3352 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3354 Draws the text rotated by *angle* degrees, if supported by the platform.
3356 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3357 function. In particular, a font different from ``wx.NORMAL_FONT``
3358 should be used as the it is not normally a TrueType
3359 font. ``wx.SWISS_FONT`` is an example of a font which is.
3361 return _gdi_
.DC_DrawRotatedTextPoint(*args
, **kwargs
)
3363 def Blit(*args
, **kwargs
):
3365 Blit(self, int xdest, int ydest, int width, int height, DC source,
3366 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3367 int xsrcMask=-1, int ysrcMask=-1) -> bool
3369 Copy from a source DC to this DC. Parameters specify the destination
3370 coordinates, size of area to copy, source DC, source coordinates,
3371 logical function, whether to use a bitmap mask, and mask source
3374 return _gdi_
.DC_Blit(*args
, **kwargs
)
3376 def BlitPointSize(*args
, **kwargs
):
3378 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3379 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3381 Copy from a source DC to this DC. Parameters specify the destination
3382 coordinates, size of area to copy, source DC, source coordinates,
3383 logical function, whether to use a bitmap mask, and mask source
3386 return _gdi_
.DC_BlitPointSize(*args
, **kwargs
)
3388 def GetAsBitmap(*args
, **kwargs
):
3389 """GetAsBitmap(self, Rect subrect=None) -> Bitmap"""
3390 return _gdi_
.DC_GetAsBitmap(*args
, **kwargs
)
3392 def SetClippingRegion(*args
, **kwargs
):
3394 SetClippingRegion(self, int x, int y, int width, int height)
3396 Sets the clipping region for this device context to the intersection
3397 of the given region described by the parameters of this method and the
3398 previously set clipping region. You should call `DestroyClippingRegion`
3399 if you want to set the clipping region exactly to the region
3402 The clipping region is an area to which drawing is
3403 restricted. Possible uses for the clipping region are for clipping
3404 text or for speeding up window redraws when only a known area of the
3407 return _gdi_
.DC_SetClippingRegion(*args
, **kwargs
)
3409 def SetClippingRegionPointSize(*args
, **kwargs
):
3411 SetClippingRegionPointSize(self, Point pt, Size sz)
3413 Sets the clipping region for this device context to the intersection
3414 of the given region described by the parameters of this method and the
3415 previously set clipping region. You should call `DestroyClippingRegion`
3416 if you want to set the clipping region exactly to the region
3419 The clipping region is an area to which drawing is
3420 restricted. Possible uses for the clipping region are for clipping
3421 text or for speeding up window redraws when only a known area of the
3424 return _gdi_
.DC_SetClippingRegionPointSize(*args
, **kwargs
)
3426 def SetClippingRegionAsRegion(*args
, **kwargs
):
3428 SetClippingRegionAsRegion(self, Region region)
3430 Sets the clipping region for this device context to the intersection
3431 of the given region described by the parameters of this method and the
3432 previously set clipping region. You should call `DestroyClippingRegion`
3433 if you want to set the clipping region exactly to the region
3436 The clipping region is an area to which drawing is
3437 restricted. Possible uses for the clipping region are for clipping
3438 text or for speeding up window redraws when only a known area of the
3441 return _gdi_
.DC_SetClippingRegionAsRegion(*args
, **kwargs
)
3443 def SetClippingRect(*args
, **kwargs
):
3445 SetClippingRect(self, Rect rect)
3447 Sets the clipping region for this device context to the intersection
3448 of the given region described by the parameters of this method and the
3449 previously set clipping region. You should call `DestroyClippingRegion`
3450 if you want to set the clipping region exactly to the region
3453 The clipping region is an area to which drawing is
3454 restricted. Possible uses for the clipping region are for clipping
3455 text or for speeding up window redraws when only a known area of the
3458 return _gdi_
.DC_SetClippingRect(*args
, **kwargs
)
3460 def DrawLines(*args
, **kwargs
):
3462 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3464 Draws lines using a sequence of `wx.Point` objects, adding the
3465 optional offset coordinate. The current pen is used for drawing the
3468 return _gdi_
.DC_DrawLines(*args
, **kwargs
)
3470 def DrawPolygon(*args
, **kwargs
):
3472 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3473 int fillStyle=ODDEVEN_RULE)
3475 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3476 the optional offset coordinate. The last argument specifies the fill
3477 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3479 The current pen is used for drawing the outline, and the current brush
3480 for filling the shape. Using a transparent brush suppresses
3481 filling. Note that wxWidgets automatically closes the first and last
3484 return _gdi_
.DC_DrawPolygon(*args
, **kwargs
)
3486 def DrawLabel(*args
, **kwargs
):
3488 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3491 Draw *text* within the specified rectangle, abiding by the alignment
3492 flags. Will additionally emphasize the character at *indexAccel* if
3495 return _gdi_
.DC_DrawLabel(*args
, **kwargs
)
3497 def DrawImageLabel(*args
, **kwargs
):
3499 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3500 int indexAccel=-1) -> Rect
3502 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3503 drawing it) within the specified rectangle, abiding by the alignment
3504 flags. Will additionally emphasize the character at *indexAccel* if
3505 it is not -1. Returns the bounding rectangle.
3507 return _gdi_
.DC_DrawImageLabel(*args
, **kwargs
)
3509 def DrawSpline(*args
, **kwargs
):
3511 DrawSpline(self, List points)
3513 Draws a spline between all given control points, (a list of `wx.Point`
3514 objects) using the current pen. The spline is drawn using a series of
3515 lines, using an algorithm taken from the X drawing program 'XFIG'.
3517 return _gdi_
.DC_DrawSpline(*args
, **kwargs
)
3519 def Clear(*args
, **kwargs
):
3523 Clears the device context using the current background brush.
3525 return _gdi_
.DC_Clear(*args
, **kwargs
)
3527 def StartDoc(*args
, **kwargs
):
3529 StartDoc(self, String message) -> bool
3531 Starts a document (only relevant when outputting to a
3532 printer). *Message* is a message to show whilst printing.
3534 return _gdi_
.DC_StartDoc(*args
, **kwargs
)
3536 def EndDoc(*args
, **kwargs
):
3540 Ends a document (only relevant when outputting to a printer).
3542 return _gdi_
.DC_EndDoc(*args
, **kwargs
)
3544 def StartPage(*args
, **kwargs
):
3548 Starts a document page (only relevant when outputting to a printer).
3550 return _gdi_
.DC_StartPage(*args
, **kwargs
)
3552 def EndPage(*args
, **kwargs
):
3556 Ends a document page (only relevant when outputting to a printer).
3558 return _gdi_
.DC_EndPage(*args
, **kwargs
)
3560 def SetFont(*args
, **kwargs
):
3562 SetFont(self, Font font)
3564 Sets the current font for the DC. It must be a valid font, in
3565 particular you should not pass ``wx.NullFont`` to this method.
3567 return _gdi_
.DC_SetFont(*args
, **kwargs
)
3569 def SetPen(*args
, **kwargs
):
3571 SetPen(self, Pen pen)
3573 Sets the current pen for the DC.
3575 If the argument is ``wx.NullPen``, the current pen is selected out of the
3576 device context, and the original pen restored.
3578 return _gdi_
.DC_SetPen(*args
, **kwargs
)
3580 def SetBrush(*args
, **kwargs
):
3582 SetBrush(self, Brush brush)
3584 Sets the current brush for the DC.
3586 If the argument is ``wx.NullBrush``, the current brush is selected out
3587 of the device context, and the original brush restored, allowing the
3588 current brush to be destroyed safely.
3590 return _gdi_
.DC_SetBrush(*args
, **kwargs
)
3592 def SetBackground(*args
, **kwargs
):
3594 SetBackground(self, Brush brush)
3596 Sets the current background brush for the DC.
3598 return _gdi_
.DC_SetBackground(*args
, **kwargs
)
3600 def SetBackgroundMode(*args
, **kwargs
):
3602 SetBackgroundMode(self, int mode)
3604 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3605 determines whether text will be drawn with a background colour or
3608 return _gdi_
.DC_SetBackgroundMode(*args
, **kwargs
)
3610 def SetPalette(*args
, **kwargs
):
3612 SetPalette(self, Palette palette)
3614 If this is a window DC or memory DC, assigns the given palette to the
3615 window or bitmap associated with the DC. If the argument is
3616 ``wx.NullPalette``, the current palette is selected out of the device
3617 context, and the original palette restored.
3619 return _gdi_
.DC_SetPalette(*args
, **kwargs
)
3621 def DestroyClippingRegion(*args
, **kwargs
):
3623 DestroyClippingRegion(self)
3625 Destroys the current clipping region so that none of the DC is
3628 return _gdi_
.DC_DestroyClippingRegion(*args
, **kwargs
)
3630 def GetClippingBox(*args
, **kwargs
):
3632 GetClippingBox() -> (x, y, width, height)
3634 Gets the rectangle surrounding the current clipping region.
3636 return _gdi_
.DC_GetClippingBox(*args
, **kwargs
)
3638 def GetClippingRect(*args
, **kwargs
):
3640 GetClippingRect(self) -> Rect
3642 Gets the rectangle surrounding the current clipping region.
3644 return _gdi_
.DC_GetClippingRect(*args
, **kwargs
)
3646 def GetCharHeight(*args
, **kwargs
):
3648 GetCharHeight(self) -> int
3650 Gets the character height of the currently set font.
3652 return _gdi_
.DC_GetCharHeight(*args
, **kwargs
)
3654 def GetCharWidth(*args
, **kwargs
):
3656 GetCharWidth(self) -> int
3658 Gets the average character width of the currently set font.
3660 return _gdi_
.DC_GetCharWidth(*args
, **kwargs
)
3662 def GetTextExtent(*args
, **kwargs
):
3664 GetTextExtent(wxString string) -> (width, height)
3666 Get the width and height of the text using the current font. Only
3667 works for single line strings.
3669 return _gdi_
.DC_GetTextExtent(*args
, **kwargs
)
3671 def GetFullTextExtent(*args
, **kwargs
):
3673 GetFullTextExtent(wxString string, Font font=None) ->
3674 (width, height, descent, externalLeading)
3676 Get the width, height, decent and leading of the text using the
3677 current or specified font. Only works for single line strings.
3679 return _gdi_
.DC_GetFullTextExtent(*args
, **kwargs
)
3681 def GetMultiLineTextExtent(*args
, **kwargs
):
3683 GetMultiLineTextExtent(wxString string, Font font=None) ->
3684 (width, height, lineHeight)
3686 Get the width, height, and line height of the text using the
3687 current or specified font. Works for single as well as multi-line
3690 return _gdi_
.DC_GetMultiLineTextExtent(*args
, **kwargs
)
3692 def GetPartialTextExtents(*args
, **kwargs
):
3694 GetPartialTextExtents(self, text) -> [widths]
3696 Returns a list of integers such that each value is the distance in
3697 pixels from the begining of text to the coresponding character of
3698 *text*. The generic version simply builds a running total of the widths
3699 of each character using GetTextExtent, however if the various
3700 platforms have a native API function that is faster or more accurate
3701 than the generic implementation then it will be used instead.
3703 return _gdi_
.DC_GetPartialTextExtents(*args
, **kwargs
)
3705 def GetSize(*args
, **kwargs
):
3707 GetSize(self) -> Size
3709 This gets the horizontal and vertical resolution in device units. It
3710 can be used to scale graphics to fit the page. For example, if *maxX*
3711 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3712 used in your application, the following code will scale the graphic to
3713 fit on the printer page::
3716 scaleX = maxX*1.0 / w
3717 scaleY = maxY*1.0 / h
3718 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3721 return _gdi_
.DC_GetSize(*args
, **kwargs
)
3723 def GetSizeTuple(*args
, **kwargs
):
3725 GetSizeTuple() -> (width, height)
3727 This gets the horizontal and vertical resolution in device units. It
3728 can be used to scale graphics to fit the page. For example, if *maxX*
3729 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3730 used in your application, the following code will scale the graphic to
3731 fit on the printer page::
3734 scaleX = maxX*1.0 / w
3735 scaleY = maxY*1.0 / h
3736 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3739 return _gdi_
.DC_GetSizeTuple(*args
, **kwargs
)
3741 def GetSizeMM(*args
, **kwargs
):
3743 GetSizeMM(self) -> Size
3745 Get the DC size in milimeters.
3747 return _gdi_
.DC_GetSizeMM(*args
, **kwargs
)
3749 def GetSizeMMTuple(*args
, **kwargs
):
3751 GetSizeMMTuple() -> (width, height)
3753 Get the DC size in milimeters.
3755 return _gdi_
.DC_GetSizeMMTuple(*args
, **kwargs
)
3757 def DeviceToLogicalX(*args
, **kwargs
):
3759 DeviceToLogicalX(self, int x) -> int
3761 Convert device X coordinate to logical coordinate, using the current
3764 return _gdi_
.DC_DeviceToLogicalX(*args
, **kwargs
)
3766 def DeviceToLogicalY(*args
, **kwargs
):
3768 DeviceToLogicalY(self, int y) -> int
3770 Converts device Y coordinate to logical coordinate, using the current
3773 return _gdi_
.DC_DeviceToLogicalY(*args
, **kwargs
)
3775 def DeviceToLogicalXRel(*args
, **kwargs
):
3777 DeviceToLogicalXRel(self, int x) -> int
3779 Convert device X coordinate to relative logical coordinate, using the
3780 current mapping mode but ignoring the x axis orientation. Use this
3781 function for converting a width, for example.
3783 return _gdi_
.DC_DeviceToLogicalXRel(*args
, **kwargs
)
3785 def DeviceToLogicalYRel(*args
, **kwargs
):
3787 DeviceToLogicalYRel(self, int y) -> int
3789 Convert device Y coordinate to relative logical coordinate, using the
3790 current mapping mode but ignoring the y axis orientation. Use this
3791 function for converting a height, for example.
3793 return _gdi_
.DC_DeviceToLogicalYRel(*args
, **kwargs
)
3795 def LogicalToDeviceX(*args
, **kwargs
):
3797 LogicalToDeviceX(self, int x) -> int
3799 Converts logical X coordinate to device coordinate, using the current
3802 return _gdi_
.DC_LogicalToDeviceX(*args
, **kwargs
)
3804 def LogicalToDeviceY(*args
, **kwargs
):
3806 LogicalToDeviceY(self, int y) -> int
3808 Converts logical Y coordinate to device coordinate, using the current
3811 return _gdi_
.DC_LogicalToDeviceY(*args
, **kwargs
)
3813 def LogicalToDeviceXRel(*args
, **kwargs
):
3815 LogicalToDeviceXRel(self, int x) -> int
3817 Converts logical X coordinate to relative device coordinate, using the
3818 current mapping mode but ignoring the x axis orientation. Use this for
3819 converting a width, for example.
3821 return _gdi_
.DC_LogicalToDeviceXRel(*args
, **kwargs
)
3823 def LogicalToDeviceYRel(*args
, **kwargs
):
3825 LogicalToDeviceYRel(self, int y) -> int
3827 Converts logical Y coordinate to relative device coordinate, using the
3828 current mapping mode but ignoring the y axis orientation. Use this for
3829 converting a height, for example.
3831 return _gdi_
.DC_LogicalToDeviceYRel(*args
, **kwargs
)
3833 def CanDrawBitmap(*args
, **kwargs
):
3834 """CanDrawBitmap(self) -> bool"""
3835 return _gdi_
.DC_CanDrawBitmap(*args
, **kwargs
)
3837 def CanGetTextExtent(*args
, **kwargs
):
3838 """CanGetTextExtent(self) -> bool"""
3839 return _gdi_
.DC_CanGetTextExtent(*args
, **kwargs
)
3841 def GetDepth(*args
, **kwargs
):
3843 GetDepth(self) -> int
3845 Returns the colour depth of the DC.
3847 return _gdi_
.DC_GetDepth(*args
, **kwargs
)
3849 def GetPPI(*args
, **kwargs
):
3851 GetPPI(self) -> Size
3853 Resolution in pixels per inch
3855 return _gdi_
.DC_GetPPI(*args
, **kwargs
)
3857 def IsOk(*args
, **kwargs
):
3861 Returns true if the DC is ok to use.
3863 return _gdi_
.DC_IsOk(*args
, **kwargs
)
3866 def GetBackgroundMode(*args
, **kwargs
):
3868 GetBackgroundMode(self) -> int
3870 Returns the current background mode, either ``wx.SOLID`` or
3873 return _gdi_
.DC_GetBackgroundMode(*args
, **kwargs
)
3875 def GetBackground(*args
, **kwargs
):
3877 GetBackground(self) -> Brush
3879 Gets the brush used for painting the background.
3881 return _gdi_
.DC_GetBackground(*args
, **kwargs
)
3883 def GetBrush(*args
, **kwargs
):
3885 GetBrush(self) -> Brush
3887 Gets the current brush
3889 return _gdi_
.DC_GetBrush(*args
, **kwargs
)
3891 def GetFont(*args
, **kwargs
):
3893 GetFont(self) -> Font
3895 Gets the current font
3897 return _gdi_
.DC_GetFont(*args
, **kwargs
)
3899 def GetPen(*args
, **kwargs
):
3903 Gets the current pen
3905 return _gdi_
.DC_GetPen(*args
, **kwargs
)
3907 def GetTextBackground(*args
, **kwargs
):
3909 GetTextBackground(self) -> Colour
3911 Gets the current text background colour
3913 return _gdi_
.DC_GetTextBackground(*args
, **kwargs
)
3915 def GetTextForeground(*args
, **kwargs
):
3917 GetTextForeground(self) -> Colour
3919 Gets the current text foreground colour
3921 return _gdi_
.DC_GetTextForeground(*args
, **kwargs
)
3923 def SetTextForeground(*args
, **kwargs
):
3925 SetTextForeground(self, Colour colour)
3927 Sets the current text foreground colour for the DC.
3929 return _gdi_
.DC_SetTextForeground(*args
, **kwargs
)
3931 def SetTextBackground(*args
, **kwargs
):
3933 SetTextBackground(self, Colour colour)
3935 Sets the current text background colour for the DC.
3937 return _gdi_
.DC_SetTextBackground(*args
, **kwargs
)
3939 def GetMapMode(*args
, **kwargs
):
3941 GetMapMode(self) -> int
3943 Gets the current *mapping mode* for the device context
3945 return _gdi_
.DC_GetMapMode(*args
, **kwargs
)
3947 def SetMapMode(*args
, **kwargs
):
3949 SetMapMode(self, int mode)
3951 The *mapping mode* of the device context defines the unit of
3952 measurement used to convert logical units to device units. The
3953 mapping mode can be one of the following:
3955 ================ =============================================
3956 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3958 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3959 wx.MM_METRIC Each logical unit is 1 mm.
3960 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3961 wx.MM_TEXT Each logical unit is 1 pixel.
3962 ================ =============================================
3965 return _gdi_
.DC_SetMapMode(*args
, **kwargs
)
3967 def GetUserScale(*args
, **kwargs
):
3969 GetUserScale(self) -> (xScale, yScale)
3971 Gets the current user scale factor (set by `SetUserScale`).
3973 return _gdi_
.DC_GetUserScale(*args
, **kwargs
)
3975 def SetUserScale(*args
, **kwargs
):
3977 SetUserScale(self, double x, double y)
3979 Sets the user scaling factor, useful for applications which require
3982 return _gdi_
.DC_SetUserScale(*args
, **kwargs
)
3984 def GetLogicalScale(*args
, **kwargs
):
3985 """GetLogicalScale() -> (xScale, yScale)"""
3986 return _gdi_
.DC_GetLogicalScale(*args
, **kwargs
)
3988 def SetLogicalScale(*args
, **kwargs
):
3989 """SetLogicalScale(self, double x, double y)"""
3990 return _gdi_
.DC_SetLogicalScale(*args
, **kwargs
)
3992 def GetLogicalOrigin(*args
, **kwargs
):
3993 """GetLogicalOrigin(self) -> Point"""
3994 return _gdi_
.DC_GetLogicalOrigin(*args
, **kwargs
)
3996 def GetLogicalOriginTuple(*args
, **kwargs
):
3997 """GetLogicalOriginTuple() -> (x,y)"""
3998 return _gdi_
.DC_GetLogicalOriginTuple(*args
, **kwargs
)
4000 def SetLogicalOrigin(*args
, **kwargs
):
4001 """SetLogicalOrigin(self, int x, int y)"""
4002 return _gdi_
.DC_SetLogicalOrigin(*args
, **kwargs
)
4004 def SetLogicalOriginPoint(*args
, **kwargs
):
4005 """SetLogicalOriginPoint(self, Point point)"""
4006 return _gdi_
.DC_SetLogicalOriginPoint(*args
, **kwargs
)
4008 def GetDeviceOrigin(*args
, **kwargs
):
4009 """GetDeviceOrigin(self) -> Point"""
4010 return _gdi_
.DC_GetDeviceOrigin(*args
, **kwargs
)
4012 def GetDeviceOriginTuple(*args
, **kwargs
):
4013 """GetDeviceOriginTuple() -> (x,y)"""
4014 return _gdi_
.DC_GetDeviceOriginTuple(*args
, **kwargs
)
4016 def SetDeviceOrigin(*args
, **kwargs
):
4017 """SetDeviceOrigin(self, int x, int y)"""
4018 return _gdi_
.DC_SetDeviceOrigin(*args
, **kwargs
)
4020 def SetDeviceOriginPoint(*args
, **kwargs
):
4021 """SetDeviceOriginPoint(self, Point point)"""
4022 return _gdi_
.DC_SetDeviceOriginPoint(*args
, **kwargs
)
4024 def SetAxisOrientation(*args
, **kwargs
):
4026 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
4028 Sets the x and y axis orientation (i.e., the direction from lowest to
4029 highest values on the axis). The default orientation is the natural
4030 orientation, e.g. x axis from left to right and y axis from bottom up.
4032 return _gdi_
.DC_SetAxisOrientation(*args
, **kwargs
)
4034 def GetLogicalFunction(*args
, **kwargs
):
4036 GetLogicalFunction(self) -> int
4038 Gets the current logical function (set by `SetLogicalFunction`).
4040 return _gdi_
.DC_GetLogicalFunction(*args
, **kwargs
)
4042 def SetLogicalFunction(*args
, **kwargs
):
4044 SetLogicalFunction(self, int function)
4046 Sets the current logical function for the device context. This
4047 determines how a source pixel (from a pen or brush colour, or source
4048 device context if using `Blit`) combines with a destination pixel in
4049 the current device context.
4051 The possible values and their meaning in terms of source and
4052 destination pixel values are as follows:
4054 ================ ==========================
4056 wx.AND_INVERT (NOT src) AND dst
4057 wx.AND_REVERSE src AND (NOT dst)
4060 wx.EQUIV (NOT src) XOR dst
4062 wx.NAND (NOT src) OR (NOT dst)
4063 wx.NOR (NOT src) AND (NOT dst)
4066 wx.OR_INVERT (NOT src) OR dst
4067 wx.OR_REVERSE src OR (NOT dst)
4069 wx.SRC_INVERT NOT src
4071 ================ ==========================
4073 The default is wx.COPY, which simply draws with the current
4074 colour. The others combine the current colour and the background using
4075 a logical operation. wx.INVERT is commonly used for drawing rubber
4076 bands or moving outlines, since drawing twice reverts to the original
4080 return _gdi_
.DC_SetLogicalFunction(*args
, **kwargs
)
4082 def ComputeScaleAndOrigin(*args
, **kwargs
):
4084 ComputeScaleAndOrigin(self)
4086 Performs all necessary computations for given platform and context
4087 type after each change of scale and origin parameters. Usually called
4088 automatically internally after such changes.
4091 return _gdi_
.DC_ComputeScaleAndOrigin(*args
, **kwargs
)
4093 def SetOptimization(self
, optimize
):
4095 def GetOptimization(self
):
4098 SetOptimization
= wx
._deprecated
(SetOptimization
)
4099 GetOptimization
= wx
._deprecated
(GetOptimization
)
4101 def CalcBoundingBox(*args
, **kwargs
):
4103 CalcBoundingBox(self, int x, int y)
4105 Adds the specified point to the bounding box which can be retrieved
4106 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4108 return _gdi_
.DC_CalcBoundingBox(*args
, **kwargs
)
4110 def CalcBoundingBoxPoint(*args
, **kwargs
):
4112 CalcBoundingBoxPoint(self, Point point)
4114 Adds the specified point to the bounding box which can be retrieved
4115 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4117 return _gdi_
.DC_CalcBoundingBoxPoint(*args
, **kwargs
)
4119 def ResetBoundingBox(*args
, **kwargs
):
4121 ResetBoundingBox(self)
4123 Resets the bounding box: after a call to this function, the bounding
4124 box doesn't contain anything.
4126 return _gdi_
.DC_ResetBoundingBox(*args
, **kwargs
)
4128 def MinX(*args
, **kwargs
):
4132 Gets the minimum horizontal extent used in drawing commands so far.
4134 return _gdi_
.DC_MinX(*args
, **kwargs
)
4136 def MaxX(*args
, **kwargs
):
4140 Gets the maximum horizontal extent used in drawing commands so far.
4142 return _gdi_
.DC_MaxX(*args
, **kwargs
)
4144 def MinY(*args
, **kwargs
):
4148 Gets the minimum vertical extent used in drawing commands so far.
4150 return _gdi_
.DC_MinY(*args
, **kwargs
)
4152 def MaxY(*args
, **kwargs
):
4156 Gets the maximum vertical extent used in drawing commands so far.
4158 return _gdi_
.DC_MaxY(*args
, **kwargs
)
4160 def GetBoundingBox(*args
, **kwargs
):
4162 GetBoundingBox() -> (x1,y1, x2,y2)
4164 Returns the min and max points used in drawing commands so far.
4166 return _gdi_
.DC_GetBoundingBox(*args
, **kwargs
)
4168 def __nonzero__(self
): return self
.IsOk()
4169 def GetLayoutDirection(*args
, **kwargs
):
4171 GetLayoutDirection(self) -> int
4173 Get the layout direction (LTR or RTL)_ for this dc. On platforms
4174 where RTL layout is supported, the return value will either be
4175 ``wx.Layout_LeftToRight`` or ``wx.Layout_RightToLeft``.
4176 ``wx.Layout_Default`` is returned if layout direction is not
4179 return _gdi_
.DC_GetLayoutDirection(*args
, **kwargs
)
4181 def SetLayoutDirection(*args
, **kwargs
):
4183 SetLayoutDirection(self, int dir)
4185 Change the layout direction for this dc.
4187 return _gdi_
.DC_SetLayoutDirection(*args
, **kwargs
)
4189 def _DrawPointList(*args
, **kwargs
):
4190 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4191 return _gdi_
.DC__DrawPointList(*args
, **kwargs
)
4193 def _DrawLineList(*args
, **kwargs
):
4194 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4195 return _gdi_
.DC__DrawLineList(*args
, **kwargs
)
4197 def _DrawRectangleList(*args
, **kwargs
):
4198 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4199 return _gdi_
.DC__DrawRectangleList(*args
, **kwargs
)
4201 def _DrawEllipseList(*args
, **kwargs
):
4202 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4203 return _gdi_
.DC__DrawEllipseList(*args
, **kwargs
)
4205 def _DrawPolygonList(*args
, **kwargs
):
4206 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4207 return _gdi_
.DC__DrawPolygonList(*args
, **kwargs
)
4209 def _DrawTextList(*args
, **kwargs
):
4211 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4212 PyObject backgroundList) -> PyObject
4214 return _gdi_
.DC__DrawTextList(*args
, **kwargs
)
4216 def DrawPointList(self
, points
, pens
=None):
4218 Draw a list of points as quickly as possible.
4220 :param points: A sequence of 2-element sequences representing
4221 each point to draw, (x,y).
4222 :param pens: If None, then the current pen is used. If a
4223 single pen then it will be used for all points. If
4224 a list of pens then there should be one for each point
4229 elif isinstance(pens
, wx
.Pen
):
4231 elif len(pens
) != len(points
):
4232 raise ValueError('points and pens must have same length')
4233 return self
._DrawPointList
(points
, pens
, [])
4236 def DrawLineList(self
, lines
, pens
=None):
4238 Draw a list of lines as quickly as possible.
4240 :param lines: A sequence of 4-element sequences representing
4241 each line to draw, (x1,y1, x2,y2).
4242 :param pens: If None, then the current pen is used. If a
4243 single pen then it will be used for all lines. If
4244 a list of pens then there should be one for each line
4249 elif isinstance(pens
, wx
.Pen
):
4251 elif len(pens
) != len(lines
):
4252 raise ValueError('lines and pens must have same length')
4253 return self
._DrawLineList
(lines
, pens
, [])
4256 def DrawRectangleList(self
, rectangles
, pens
=None, brushes
=None):
4258 Draw a list of rectangles as quickly as possible.
4260 :param rectangles: A sequence of 4-element sequences representing
4261 each rectangle to draw, (x,y, w,h).
4262 :param pens: If None, then the current pen is used. If a
4263 single pen then it will be used for all rectangles.
4264 If a list of pens then there should be one for each
4265 rectangle in rectangles.
4266 :param brushes: A brush or brushes to be used to fill the rectagles,
4267 with similar semantics as the pens parameter.
4271 elif isinstance(pens
, wx
.Pen
):
4273 elif len(pens
) != len(rectangles
):
4274 raise ValueError('rectangles and pens must have same length')
4277 elif isinstance(brushes
, wx
.Brush
):
4279 elif len(brushes
) != len(rectangles
):
4280 raise ValueError('rectangles and brushes must have same length')
4281 return self
._DrawRectangleList
(rectangles
, pens
, brushes
)
4284 def DrawEllipseList(self
, ellipses
, pens
=None, brushes
=None):
4286 Draw a list of ellipses as quickly as possible.
4288 :param ellipses: A sequence of 4-element sequences representing
4289 each ellipse to draw, (x,y, w,h).
4290 :param pens: If None, then the current pen is used. If a
4291 single pen then it will be used for all ellipses.
4292 If a list of pens then there should be one for each
4293 ellipse in ellipses.
4294 :param brushes: A brush or brushes to be used to fill the ellipses,
4295 with similar semantics as the pens parameter.
4299 elif isinstance(pens
, wx
.Pen
):
4301 elif len(pens
) != len(ellipses
):
4302 raise ValueError('ellipses and pens must have same length')
4305 elif isinstance(brushes
, wx
.Brush
):
4307 elif len(brushes
) != len(ellipses
):
4308 raise ValueError('ellipses and brushes must have same length')
4309 return self
._DrawEllipseList
(ellipses
, pens
, brushes
)
4312 def DrawPolygonList(self
, polygons
, pens
=None, brushes
=None):
4314 Draw a list of polygons, each of which is a list of points.
4316 :param polygons: A sequence of sequences of sequences.
4317 [[(x1,y1),(x2,y2),(x3,y3)...],
4318 [(x1,y1),(x2,y2),(x3,y3)...]]
4320 :param pens: If None, then the current pen is used. If a
4321 single pen then it will be used for all polygons.
4322 If a list of pens then there should be one for each
4324 :param brushes: A brush or brushes to be used to fill the polygons,
4325 with similar semantics as the pens parameter.
4329 elif isinstance(pens
, wx
.Pen
):
4331 elif len(pens
) != len(polygons
):
4332 raise ValueError('polygons and pens must have same length')
4335 elif isinstance(brushes
, wx
.Brush
):
4337 elif len(brushes
) != len(polygons
):
4338 raise ValueError('polygons and brushes must have same length')
4339 return self
._DrawPolygonList
(polygons
, pens
, brushes
)
4342 def DrawTextList(self
, textList
, coords
, foregrounds
= None, backgrounds
= None):
4344 Draw a list of strings using a list of coordinants for positioning each string.
4346 :param textList: A list of strings
4347 :param coords: A list of (x,y) positions
4348 :param foregrounds: A list of `wx.Colour` objects to use for the
4349 foregrounds of the strings.
4350 :param backgrounds: A list of `wx.Colour` objects to use for the
4351 backgrounds of the strings.
4353 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4354 If you want backgrounds to do anything.
4356 if type(textList
) == type(''):
4357 textList
= [textList
]
4358 elif len(textList
) != len(coords
):
4359 raise ValueError('textlist and coords must have same length')
4360 if foregrounds
is None:
4362 elif isinstance(foregrounds
, wx
.Colour
):
4363 foregrounds
= [foregrounds
]
4364 elif len(foregrounds
) != len(coords
):
4365 raise ValueError('foregrounds and coords must have same length')
4366 if backgrounds
is None:
4368 elif isinstance(backgrounds
, wx
.Colour
):
4369 backgrounds
= [backgrounds
]
4370 elif len(backgrounds
) != len(coords
):
4371 raise ValueError('backgrounds and coords must have same length')
4372 return self
._DrawTextList
(textList
, coords
, foregrounds
, backgrounds
)
4374 Background
= property(GetBackground
,SetBackground
,doc
="See `GetBackground` and `SetBackground`")
4375 BackgroundMode
= property(GetBackgroundMode
,SetBackgroundMode
,doc
="See `GetBackgroundMode` and `SetBackgroundMode`")
4376 BoundingBox
= property(GetBoundingBox
,doc
="See `GetBoundingBox`")
4377 Brush
= property(GetBrush
,SetBrush
,doc
="See `GetBrush` and `SetBrush`")
4378 CharHeight
= property(GetCharHeight
,doc
="See `GetCharHeight`")
4379 CharWidth
= property(GetCharWidth
,doc
="See `GetCharWidth`")
4380 ClippingBox
= property(GetClippingBox
,doc
="See `GetClippingBox`")
4381 ClippingRect
= property(GetClippingRect
,SetClippingRect
,doc
="See `GetClippingRect` and `SetClippingRect`")
4382 Depth
= property(GetDepth
,doc
="See `GetDepth`")
4383 DeviceOrigin
= property(GetDeviceOrigin
,SetDeviceOrigin
,doc
="See `GetDeviceOrigin` and `SetDeviceOrigin`")
4384 Font
= property(GetFont
,SetFont
,doc
="See `GetFont` and `SetFont`")
4385 FullTextExtent
= property(GetFullTextExtent
,doc
="See `GetFullTextExtent`")
4386 LogicalFunction
= property(GetLogicalFunction
,SetLogicalFunction
,doc
="See `GetLogicalFunction` and `SetLogicalFunction`")
4387 LogicalOrigin
= property(GetLogicalOrigin
,SetLogicalOrigin
,doc
="See `GetLogicalOrigin` and `SetLogicalOrigin`")
4388 LogicalScale
= property(GetLogicalScale
,SetLogicalScale
,doc
="See `GetLogicalScale` and `SetLogicalScale`")
4389 MapMode
= property(GetMapMode
,SetMapMode
,doc
="See `GetMapMode` and `SetMapMode`")
4390 MultiLineTextExtent
= property(GetMultiLineTextExtent
,doc
="See `GetMultiLineTextExtent`")
4391 Optimization
= property(GetOptimization
,SetOptimization
,doc
="See `GetOptimization` and `SetOptimization`")
4392 PPI
= property(GetPPI
,doc
="See `GetPPI`")
4393 PartialTextExtents
= property(GetPartialTextExtents
,doc
="See `GetPartialTextExtents`")
4394 Pen
= property(GetPen
,SetPen
,doc
="See `GetPen` and `SetPen`")
4395 Pixel
= property(GetPixel
,doc
="See `GetPixel`")
4396 PixelPoint
= property(GetPixelPoint
,doc
="See `GetPixelPoint`")
4397 Size
= property(GetSize
,doc
="See `GetSize`")
4398 SizeMM
= property(GetSizeMM
,doc
="See `GetSizeMM`")
4399 TextBackground
= property(GetTextBackground
,SetTextBackground
,doc
="See `GetTextBackground` and `SetTextBackground`")
4400 TextExtent
= property(GetTextExtent
,doc
="See `GetTextExtent`")
4401 TextForeground
= property(GetTextForeground
,SetTextForeground
,doc
="See `GetTextForeground` and `SetTextForeground`")
4402 UserScale
= property(GetUserScale
,SetUserScale
,doc
="See `GetUserScale` and `SetUserScale`")
4403 LayoutDirection
= property(GetLayoutDirection
,SetLayoutDirection
)
4404 _gdi_
.DC_swigregister(DC
)
4406 #---------------------------------------------------------------------------
4408 class DCTextColourChanger(object):
4410 wx.DCTextColourChanger can be used to temporarily change the DC text
4411 colour and restore it automatically when the object goes out of scope
4413 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4414 __repr__
= _swig_repr
4415 def __init__(self
, *args
, **kwargs
):
4417 __init__(self, DC dc, Colour col) -> DCTextColourChanger
4419 wx.DCTextColourChanger can be used to temporarily change the DC text
4420 colour and restore it automatically when the object goes out of scope
4422 _gdi_
.DCTextColourChanger_swiginit(self
,_gdi_
.new_DCTextColourChanger(*args
, **kwargs
))
4423 __swig_destroy__
= _gdi_
.delete_DCTextColourChanger
4424 __del__
= lambda self
: None;
4425 _gdi_
.DCTextColourChanger_swigregister(DCTextColourChanger
)
4427 class DCPenChanger(object):
4429 wx.DCPenChanger can be used to temporarily change the DC pen and
4430 restore it automatically when the object goes out of scope
4432 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4433 __repr__
= _swig_repr
4434 def __init__(self
, *args
, **kwargs
):
4436 __init__(self, DC dc, Pen pen) -> DCPenChanger
4438 wx.DCPenChanger can be used to temporarily change the DC pen and
4439 restore it automatically when the object goes out of scope
4441 _gdi_
.DCPenChanger_swiginit(self
,_gdi_
.new_DCPenChanger(*args
, **kwargs
))
4442 __swig_destroy__
= _gdi_
.delete_DCPenChanger
4443 __del__
= lambda self
: None;
4444 _gdi_
.DCPenChanger_swigregister(DCPenChanger
)
4446 class DCBrushChanger(object):
4448 wx.DCBrushChanger can be used to temporarily change the DC brush and
4449 restore it automatically when the object goes out of scope
4451 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4452 __repr__
= _swig_repr
4453 def __init__(self
, *args
, **kwargs
):
4455 __init__(self, DC dc, Brush brush) -> DCBrushChanger
4457 wx.DCBrushChanger can be used to temporarily change the DC brush and
4458 restore it automatically when the object goes out of scope
4460 _gdi_
.DCBrushChanger_swiginit(self
,_gdi_
.new_DCBrushChanger(*args
, **kwargs
))
4461 __swig_destroy__
= _gdi_
.delete_DCBrushChanger
4462 __del__
= lambda self
: None;
4463 _gdi_
.DCBrushChanger_swigregister(DCBrushChanger
)
4465 class DCClipper(object):
4467 wx.wxDCClipper sets the DC's clipping region when it is constructed,
4468 and then automatically destroys the clipping region when the clipper
4471 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4472 __repr__
= _swig_repr
4473 def __init__(self
, *args
):
4475 __init__(self, DC dc, Region r) -> DCClipper
4476 __init__(self, DC dc, Rect r) -> DCClipper
4477 __init__(self, DC dc, int x, int y, int w, int h) -> DCClipper
4479 wx.wxDCClipper sets the DC's clipping region when it is constructed,
4480 and then automatically destroys the clipping region when the clipper
4483 _gdi_
.DCClipper_swiginit(self
,_gdi_
.new_DCClipper(*args
))
4484 __swig_destroy__
= _gdi_
.delete_DCClipper
4485 __del__
= lambda self
: None;
4486 _gdi_
.DCClipper_swigregister(DCClipper
)
4488 #---------------------------------------------------------------------------
4492 A wxScreenDC can be used to paint anywhere on the screen. This should
4493 normally be constructed as a temporary stack object; don't store a
4497 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4498 __repr__
= _swig_repr
4499 def __init__(self
, *args
, **kwargs
):
4501 __init__(self) -> ScreenDC
4503 A wxScreenDC can be used to paint anywhere on the screen. This should
4504 normally be constructed as a temporary stack object; don't store a
4508 _gdi_
.ScreenDC_swiginit(self
,_gdi_
.new_ScreenDC(*args
, **kwargs
))
4509 def StartDrawingOnTopWin(*args
, **kwargs
):
4511 StartDrawingOnTopWin(self, Window window) -> bool
4513 Specify that the area of the screen to be drawn upon coincides with
4516 :see: `EndDrawingOnTop`
4518 return _gdi_
.ScreenDC_StartDrawingOnTopWin(*args
, **kwargs
)
4520 def StartDrawingOnTop(*args
, **kwargs
):
4522 StartDrawingOnTop(self, Rect rect=None) -> bool
4524 Specify that the area is the given rectangle, or the whole screen if
4527 :see: `EndDrawingOnTop`
4529 return _gdi_
.ScreenDC_StartDrawingOnTop(*args
, **kwargs
)
4531 def EndDrawingOnTop(*args
, **kwargs
):
4533 EndDrawingOnTop(self) -> bool
4535 Use this in conjunction with `StartDrawingOnTop` or
4536 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4537 top of existing windows. Without this, some window systems (such as X)
4538 only allow drawing to take place underneath other windows.
4540 You might use this pair of functions when implementing a drag feature,
4541 for example as in the `wx.SplitterWindow` implementation.
4543 These functions are probably obsolete since the X implementations
4544 allow drawing directly on the screen now. However, the fact that this
4545 function allows the screen to be refreshed afterwards may be useful
4546 to some applications.
4548 return _gdi_
.ScreenDC_EndDrawingOnTop(*args
, **kwargs
)
4550 _gdi_
.ScreenDC_swigregister(ScreenDC
)
4552 #---------------------------------------------------------------------------
4556 A wx.WindowDC must be constructed if an application wishes to paint on
4557 the whole area of a window (client and decorations). This should
4558 normally be constructed as a temporary stack object; don't store a
4561 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4562 __repr__
= _swig_repr
4563 def __init__(self
, *args
, **kwargs
):
4565 __init__(self, Window win) -> WindowDC
4567 Constructor. Pass the window on which you wish to paint.
4569 _gdi_
.WindowDC_swiginit(self
,_gdi_
.new_WindowDC(*args
, **kwargs
))
4570 _gdi_
.WindowDC_swigregister(WindowDC
)
4572 #---------------------------------------------------------------------------
4574 class ClientDC(WindowDC
):
4576 A wx.ClientDC must be constructed if an application wishes to paint on
4577 the client area of a window from outside an EVT_PAINT event. This should
4578 normally be constructed as a temporary stack object; don't store a
4579 wx.ClientDC object long term.
4581 To draw on a window from within an EVT_PAINT handler, construct a
4582 `wx.PaintDC` object.
4584 To draw on the whole window including decorations, construct a
4585 `wx.WindowDC` object (Windows only).
4588 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4589 __repr__
= _swig_repr
4590 def __init__(self
, *args
, **kwargs
):
4592 __init__(self, Window win) -> ClientDC
4594 Constructor. Pass the window on which you wish to paint.
4596 _gdi_
.ClientDC_swiginit(self
,_gdi_
.new_ClientDC(*args
, **kwargs
))
4597 _gdi_
.ClientDC_swigregister(ClientDC
)
4599 #---------------------------------------------------------------------------
4601 class PaintDC(ClientDC
):
4603 A wx.PaintDC must be constructed if an application wishes to paint on
4604 the client area of a window from within an EVT_PAINT event
4605 handler. This should normally be constructed as a temporary stack
4606 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4607 handler, you **must** create a wx.PaintDC object within it even if you
4608 don't actually use it.
4610 Using wx.PaintDC within EVT_PAINT handlers is important because it
4611 automatically sets the clipping area to the damaged area of the
4612 window. Attempts to draw outside this area do not appear.
4614 To draw on a window from outside EVT_PAINT handlers, construct a
4615 `wx.ClientDC` object.
4618 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4619 __repr__
= _swig_repr
4620 def __init__(self
, *args
, **kwargs
):
4622 __init__(self, Window win) -> PaintDC
4624 Constructor. Pass the window on which you wish to paint.
4626 _gdi_
.PaintDC_swiginit(self
,_gdi_
.new_PaintDC(*args
, **kwargs
))
4627 _gdi_
.PaintDC_swigregister(PaintDC
)
4629 #---------------------------------------------------------------------------
4631 class MemoryDC(WindowDC
):
4633 A memory device context provides a means to draw graphics onto a
4634 bitmap. A bitmap must be selected into the new memory DC before it may
4635 be used for anything. Typical usage is as follows::
4638 dc.SelectObject(bitmap)
4639 # draw on the dc using any of the Draw methods
4640 dc.SelectObject(wx.NullBitmap)
4641 # the bitmap now contains wahtever was drawn upon it
4643 Note that the memory DC *must* be deleted (or the bitmap selected out
4644 of it) before a bitmap can be reselected into another memory DC.
4647 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4648 __repr__
= _swig_repr
4649 def __init__(self
, *args
, **kwargs
):
4651 __init__(self, Bitmap bitmap=NullBitmap) -> MemoryDC
4653 Constructs a new memory device context.
4655 Use the Ok member to test whether the constructor was successful in
4656 creating a usable device context. If a bitmap is not given to this
4657 constructor then don't forget to select a bitmap into the DC before
4660 _gdi_
.MemoryDC_swiginit(self
,_gdi_
.new_MemoryDC(*args
, **kwargs
))
4661 def SelectObject(*args
, **kwargs
):
4663 SelectObject(self, Bitmap bitmap)
4665 Selects the bitmap into the device context, to use as the memory
4666 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4667 the DC, and therefore the bitmap, and also to use Blit to copy the
4670 If the argument is wx.NullBitmap (or some other uninitialised
4671 `wx.Bitmap`) the current bitmap is selected out of the device context,
4672 and the original bitmap restored, allowing the current bitmap to be
4675 return _gdi_
.MemoryDC_SelectObject(*args
, **kwargs
)
4677 def SelectObjectAsSource(*args
, **kwargs
):
4678 """SelectObjectAsSource(self, Bitmap bmp)"""
4679 return _gdi_
.MemoryDC_SelectObjectAsSource(*args
, **kwargs
)
4681 _gdi_
.MemoryDC_swigregister(MemoryDC
)
4683 def MemoryDCFromDC(*args
, **kwargs
):
4685 MemoryDCFromDC(DC oldDC) -> MemoryDC
4687 Creates a DC that is compatible with the oldDC.
4689 val
= _gdi_
.new_MemoryDCFromDC(*args
, **kwargs
)
4692 #---------------------------------------------------------------------------
4694 BUFFER_VIRTUAL_AREA
= _gdi_
.BUFFER_VIRTUAL_AREA
4695 BUFFER_CLIENT_AREA
= _gdi_
.BUFFER_CLIENT_AREA
4696 class BufferedDC(MemoryDC
):
4698 This simple class provides a simple way to avoid flicker: when drawing
4699 on it, everything is in fact first drawn on an in-memory buffer (a
4700 `wx.Bitmap`) and then copied to the screen only once, when this object
4701 is destroyed. You can either provide a buffer bitmap yourself, and
4702 reuse it the next time something needs painted, or you can let the
4703 buffered DC create and provide a buffer bitmap itself.
4705 Buffered DCs can be used in the same way as any other device context.
4706 wx.BufferedDC itself typically replaces `wx.ClientDC`, if you want to
4707 use it in your EVT_PAINT handler, you should look at
4708 `wx.BufferedPaintDC`. You can also use a wx.BufferedDC without
4709 providing a target DC. In this case the operations done on the dc
4710 will only be written to the buffer bitmap and *not* to any window, so
4711 you will want to have provided the buffer bitmap and then reuse it
4712 when it needs painted to the window.
4714 Please note that GTK+ 2.0 and OS X provide double buffering themselves
4715 natively. You may want to use `wx.Window.IsDoubleBuffered` to
4716 determine whether you need to use buffering or not, or use
4717 `wx.AutoBufferedPaintDC` to avoid needless double buffering on systems
4718 that already do it automatically.
4723 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4724 __repr__
= _swig_repr
4725 def __init__(self
, *args
):
4727 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4728 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4730 Constructs a buffered DC.
4732 _gdi_
.BufferedDC_swiginit(self
,_gdi_
.new_BufferedDC(*args
))
4733 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
4735 __swig_destroy__
= _gdi_
.delete_BufferedDC
4736 __del__
= lambda self
: None;
4737 def UnMask(*args
, **kwargs
):
4741 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4742 can be effectively used once only). This is usually only called in
4745 return _gdi_
.BufferedDC_UnMask(*args
, **kwargs
)
4747 def SetStyle(*args
, **kwargs
):
4748 """SetStyle(self, int style)"""
4749 return _gdi_
.BufferedDC_SetStyle(*args
, **kwargs
)
4751 def GetStyle(*args
, **kwargs
):
4752 """GetStyle(self) -> int"""
4753 return _gdi_
.BufferedDC_GetStyle(*args
, **kwargs
)
4755 _gdi_
.BufferedDC_swigregister(BufferedDC
)
4757 class BufferedPaintDC(BufferedDC
):
4759 This is a subclass of `wx.BufferedDC` which can be used inside of an
4760 EVT_PAINT event handler. Just create an object of this class instead
4761 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4762 flicker. The only thing to watch out for is that if you are using this
4763 class together with `wx.ScrolledWindow`, you probably do **not** want
4764 to call `wx.Window.PrepareDC` on it as it already does this internally
4765 for the real underlying `wx.PaintDC`.
4767 If your window is already fully buffered in a `wx.Bitmap` then your
4768 EVT_PAINT handler can be as simple as just creating a
4769 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4770 automatically when it is destroyed. For example::
4772 def OnPaint(self, event):
4773 dc = wx.BufferedPaintDC(self, self.buffer)
4778 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4779 __repr__
= _swig_repr
4780 def __init__(self
, *args
, **kwargs
):
4782 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4784 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4785 provide the bitmap to be used for buffering or let this object create
4786 one internally (in the latter case, the size of the client part of the
4787 window is automatically used).
4789 _gdi_
.BufferedPaintDC_swiginit(self
,_gdi_
.new_BufferedPaintDC(*args
, **kwargs
))
4790 _gdi_
.BufferedPaintDC_swigregister(BufferedPaintDC
)
4792 #---------------------------------------------------------------------------
4794 class AutoBufferedPaintDC(DC
):
4796 If the current platform double buffers by default then this DC is the
4797 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
4799 :see: `wx.AutoBufferedPaintDCFactory`
4802 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4803 __repr__
= _swig_repr
4804 def __init__(self
, *args
, **kwargs
):
4806 __init__(self, Window win) -> AutoBufferedPaintDC
4808 If the current platform double buffers by default then this DC is the
4809 same as a plain `wx.PaintDC`, otherwise it is a `wx.BufferedPaintDC`.
4811 :see: `wx.AutoBufferedPaintDCFactory`
4814 _gdi_
.AutoBufferedPaintDC_swiginit(self
,_gdi_
.new_AutoBufferedPaintDC(*args
, **kwargs
))
4815 _gdi_
.AutoBufferedPaintDC_swigregister(AutoBufferedPaintDC
)
4818 def AutoBufferedPaintDCFactory(*args
, **kwargs
):
4820 AutoBufferedPaintDCFactory(Window window) -> DC
4822 Checks if the window is natively double buffered and will return a
4823 `wx.PaintDC` if it is, a `wx.BufferedPaintDC` otherwise. The advantage of
4824 this function over `wx.AutoBufferedPaintDC` is that this function will check
4825 if the the specified window has double-buffering enabled rather than just
4826 going by platform defaults.
4828 return _gdi_
.AutoBufferedPaintDCFactory(*args
, **kwargs
)
4829 #---------------------------------------------------------------------------
4833 wx.MirrorDC is a simple wrapper class which is always associated with a
4834 real `wx.DC` object and either forwards all of its operations to it
4835 without changes (no mirroring takes place) or exchanges x and y
4836 coordinates which makes it possible to reuse the same code to draw a
4837 figure and its mirror -- i.e. reflection related to the diagonal line
4840 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4841 __repr__
= _swig_repr
4842 def __init__(self
, *args
, **kwargs
):
4844 __init__(self, DC dc, bool mirror) -> MirrorDC
4846 Creates a mirrored DC associated with the real *dc*. Everything drawn
4847 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4850 _gdi_
.MirrorDC_swiginit(self
,_gdi_
.new_MirrorDC(*args
, **kwargs
))
4851 _gdi_
.MirrorDC_swigregister(MirrorDC
)
4853 #---------------------------------------------------------------------------
4855 class PostScriptDC(DC
):
4856 """This is a `wx.DC` that can write to PostScript files on any platform."""
4857 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4858 __repr__
= _swig_repr
4859 def __init__(self
, *args
, **kwargs
):
4861 __init__(self, wxPrintData printData) -> PostScriptDC
4863 Constructs a PostScript printer device context from a `wx.PrintData`
4866 _gdi_
.PostScriptDC_swiginit(self
,_gdi_
.new_PostScriptDC(*args
, **kwargs
))
4867 def GetPrintData(*args
, **kwargs
):
4868 """GetPrintData(self) -> wxPrintData"""
4869 return _gdi_
.PostScriptDC_GetPrintData(*args
, **kwargs
)
4871 def SetPrintData(*args
, **kwargs
):
4872 """SetPrintData(self, wxPrintData data)"""
4873 return _gdi_
.PostScriptDC_SetPrintData(*args
, **kwargs
)
4875 def SetResolution(*args
, **kwargs
):
4877 SetResolution(int ppi)
4879 Set resolution (in pixels per inch) that will be used in PostScript
4880 output. Default is 720ppi.
4882 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4884 SetResolution
= staticmethod(SetResolution
)
4885 def GetResolution(*args
, **kwargs
):
4887 GetResolution() -> int
4889 Return resolution used in PostScript output.
4891 return _gdi_
.PostScriptDC_GetResolution(*args
, **kwargs
)
4893 GetResolution
= staticmethod(GetResolution
)
4894 PrintData
= property(GetPrintData
,SetPrintData
,doc
="See `GetPrintData` and `SetPrintData`")
4895 _gdi_
.PostScriptDC_swigregister(PostScriptDC
)
4897 def PostScriptDC_SetResolution(*args
, **kwargs
):
4899 PostScriptDC_SetResolution(int ppi)
4901 Set resolution (in pixels per inch) that will be used in PostScript
4902 output. Default is 720ppi.
4904 return _gdi_
.PostScriptDC_SetResolution(*args
, **kwargs
)
4906 def PostScriptDC_GetResolution(*args
):
4908 PostScriptDC_GetResolution() -> int
4910 Return resolution used in PostScript output.
4912 return _gdi_
.PostScriptDC_GetResolution(*args
)
4914 #---------------------------------------------------------------------------
4916 class MetaFile(_core
.Object
):
4917 """Proxy of C++ MetaFile class"""
4918 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4919 __repr__
= _swig_repr
4920 def __init__(self
, *args
, **kwargs
):
4921 """__init__(self, String filename=EmptyString) -> MetaFile"""
4922 _gdi_
.MetaFile_swiginit(self
,_gdi_
.new_MetaFile(*args
, **kwargs
))
4923 _gdi_
.MetaFile_swigregister(MetaFile
)
4925 class MetaFileDC(DC
):
4926 """Proxy of C++ MetaFileDC class"""
4927 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4928 __repr__
= _swig_repr
4929 def __init__(self
, *args
, **kwargs
):
4931 __init__(self, String filename=EmptyString, int width=0, int height=0,
4932 String description=EmptyString) -> MetaFileDC
4934 _gdi_
.MetaFileDC_swiginit(self
,_gdi_
.new_MetaFileDC(*args
, **kwargs
))
4935 _gdi_
.MetaFileDC_swigregister(MetaFileDC
)
4937 class PrinterDC(DC
):
4938 """Proxy of C++ PrinterDC class"""
4939 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4940 __repr__
= _swig_repr
4941 def __init__(self
, *args
, **kwargs
):
4942 """__init__(self, wxPrintData printData) -> PrinterDC"""
4943 _gdi_
.PrinterDC_swiginit(self
,_gdi_
.new_PrinterDC(*args
, **kwargs
))
4944 _gdi_
.PrinterDC_swigregister(PrinterDC
)
4946 #---------------------------------------------------------------------------
4948 class GraphicsObject(_core
.Object
):
4950 This class is the superclass of native graphics objects like pens
4951 etc. It provides the internal reference counting. It is not to be
4952 instantiated by user code.
4954 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4955 __repr__
= _swig_repr
4956 def __init__(self
, *args
, **kwargs
):
4958 __init__(self, GraphicsRenderer renderer=None) -> GraphicsObject
4960 This class is the superclass of native graphics objects like pens
4961 etc. It provides the internal reference counting. It is not to be
4962 instantiated by user code.
4964 _gdi_
.GraphicsObject_swiginit(self
,_gdi_
.new_GraphicsObject(*args
, **kwargs
))
4965 __swig_destroy__
= _gdi_
.delete_GraphicsObject
4966 __del__
= lambda self
: None;
4967 def IsNull(*args
, **kwargs
):
4969 IsNull(self) -> bool
4971 Is this object valid (false) or still empty (true)?
4973 return _gdi_
.GraphicsObject_IsNull(*args
, **kwargs
)
4975 def GetRenderer(*args
, **kwargs
):
4977 GetRenderer(self) -> GraphicsRenderer
4979 Returns the renderer that was used to create this instance, or
4980 ``None`` if it has not been initialized yet.
4982 return _gdi_
.GraphicsObject_GetRenderer(*args
, **kwargs
)
4984 _gdi_
.GraphicsObject_swigregister(GraphicsObject
)
4986 class GraphicsPen(GraphicsObject
):
4988 A wx.GraphicsPen is a native representation of a pen. It is used for
4989 stroking a path on a `wx.GraphicsContext`. The contents are specific and
4990 private to the respective renderer. The only way to get a valid instance
4991 is via a CreatePen call on the graphics context or the renderer
4994 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
4995 __repr__
= _swig_repr
4996 def __init__(self
, *args
, **kwargs
):
4998 __init__(self) -> GraphicsPen
5000 A wx.GraphicsPen is a native representation of a pen. It is used for
5001 stroking a path on a `wx.GraphicsContext`. The contents are specific and
5002 private to the respective renderer. The only way to get a valid instance
5003 is via a CreatePen call on the graphics context or the renderer
5006 _gdi_
.GraphicsPen_swiginit(self
,_gdi_
.new_GraphicsPen(*args
, **kwargs
))
5007 __swig_destroy__
= _gdi_
.delete_GraphicsPen
5008 __del__
= lambda self
: None;
5009 _gdi_
.GraphicsPen_swigregister(GraphicsPen
)
5011 class GraphicsBrush(GraphicsObject
):
5013 A wx.GraphicsBrush is a native representation of a brush. It is used
5014 for filling a path on a `wx.GraphicsContext`. The contents are
5015 specific and private to the respective renderer. The only way to get a
5016 valid instance is via a Create...Brush call on the graphics context or
5017 the renderer instance.
5019 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5020 __repr__
= _swig_repr
5021 def __init__(self
, *args
, **kwargs
):
5023 __init__(self) -> GraphicsBrush
5025 A wx.GraphicsBrush is a native representation of a brush. It is used
5026 for filling a path on a `wx.GraphicsContext`. The contents are
5027 specific and private to the respective renderer. The only way to get a
5028 valid instance is via a Create...Brush call on the graphics context or
5029 the renderer instance.
5031 _gdi_
.GraphicsBrush_swiginit(self
,_gdi_
.new_GraphicsBrush(*args
, **kwargs
))
5032 __swig_destroy__
= _gdi_
.delete_GraphicsBrush
5033 __del__
= lambda self
: None;
5034 _gdi_
.GraphicsBrush_swigregister(GraphicsBrush
)
5036 class GraphicsFont(GraphicsObject
):
5038 A `wx.GraphicsFont` is a native representation of a font (including
5039 text colour). The contents are specific an private to the respective
5040 renderer. The only way to get a valid instance is via a CreateFont
5041 call on the graphics context or the renderer instance.
5043 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5044 __repr__
= _swig_repr
5045 def __init__(self
, *args
, **kwargs
):
5047 __init__(self) -> GraphicsFont
5049 A `wx.GraphicsFont` is a native representation of a font (including
5050 text colour). The contents are specific an private to the respective
5051 renderer. The only way to get a valid instance is via a CreateFont
5052 call on the graphics context or the renderer instance.
5054 _gdi_
.GraphicsFont_swiginit(self
,_gdi_
.new_GraphicsFont(*args
, **kwargs
))
5055 __swig_destroy__
= _gdi_
.delete_GraphicsFont
5056 __del__
= lambda self
: None;
5057 _gdi_
.GraphicsFont_swigregister(GraphicsFont
)
5059 class GraphicsMatrix(GraphicsObject
):
5061 A wx.GraphicsMatrix is a native representation of an affine
5062 matrix. The contents are specific an private to the respective
5063 renderer. The only way to get a valid instance is via a CreateMatrix
5064 call on the graphics context or the renderer instance.
5066 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5067 __repr__
= _swig_repr
5068 def __init__(self
, *args
, **kwargs
):
5070 __init__(self) -> GraphicsMatrix
5072 A wx.GraphicsMatrix is a native representation of an affine
5073 matrix. The contents are specific an private to the respective
5074 renderer. The only way to get a valid instance is via a CreateMatrix
5075 call on the graphics context or the renderer instance.
5077 _gdi_
.GraphicsMatrix_swiginit(self
,_gdi_
.new_GraphicsMatrix(*args
, **kwargs
))
5078 __swig_destroy__
= _gdi_
.delete_GraphicsMatrix
5079 __del__
= lambda self
: None;
5080 def Concat(*args
, **kwargs
):
5082 Concat(self, GraphicsMatrix t)
5084 Concatenates the passed in matrix to the current matrix.
5086 return _gdi_
.GraphicsMatrix_Concat(*args
, **kwargs
)
5088 def Set(*args
, **kwargs
):
5090 Set(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
5091 Double tx=0.0, Double ty=0.0)
5093 Sets the matrix to the specified values (default values are the
5096 return _gdi_
.GraphicsMatrix_Set(*args
, **kwargs
)
5098 def Invert(*args
, **kwargs
):
5104 return _gdi_
.GraphicsMatrix_Invert(*args
, **kwargs
)
5106 def IsEqual(*args
, **kwargs
):
5108 IsEqual(self, GraphicsMatrix t) -> bool
5110 Returns ``True`` if the elements of the transformation matrix are equal
5112 return _gdi_
.GraphicsMatrix_IsEqual(*args
, **kwargs
)
5114 def IsIdentity(*args
, **kwargs
):
5116 IsIdentity(self) -> bool
5118 Returns ``True`` if this is the identity matrix
5120 return _gdi_
.GraphicsMatrix_IsIdentity(*args
, **kwargs
)
5122 def Translate(*args
, **kwargs
):
5124 Translate(self, Double dx, Double dy)
5126 Add a translation to this matrix.
5128 return _gdi_
.GraphicsMatrix_Translate(*args
, **kwargs
)
5130 def Scale(*args
, **kwargs
):
5132 Scale(self, Double xScale, Double yScale)
5136 return _gdi_
.GraphicsMatrix_Scale(*args
, **kwargs
)
5138 def Rotate(*args
, **kwargs
):
5140 Rotate(self, Double angle)
5142 Rotates this matrix. The angle should be specified in radians.
5144 return _gdi_
.GraphicsMatrix_Rotate(*args
, **kwargs
)
5146 def TransformPoint(*args
, **kwargs
):
5148 TransformPoint(self, x, y) --> (x, y)
5150 Applies this matrix to a point, returns the resulting point values
5152 return _gdi_
.GraphicsMatrix_TransformPoint(*args
, **kwargs
)
5154 def TransformDistance(*args
, **kwargs
):
5156 TransformDistance(self, dx, dy) --> (dx, dy)
5158 Applies this matrix to a distance (ie. performs all transforms except
5161 return _gdi_
.GraphicsMatrix_TransformDistance(*args
, **kwargs
)
5163 def GetNativeMatrix(*args
, **kwargs
):
5165 GetNativeMatrix(self) -> void
5167 Returns the native representation of the matrix. For CoreGraphics this
5168 is a CFAffineMatrix pointer. For GDIPlus a Matrix Pointer and for
5169 Cairo a cairo_matrix_t pointer. NOTE: For wxPython we still need a
5170 way to make this value usable.
5172 return _gdi_
.GraphicsMatrix_GetNativeMatrix(*args
, **kwargs
)
5174 _gdi_
.GraphicsMatrix_swigregister(GraphicsMatrix
)
5176 class GraphicsPath(GraphicsObject
):
5177 """Proxy of C++ GraphicsPath class"""
5178 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5179 __repr__
= _swig_repr
5180 def __init__(self
, *args
, **kwargs
):
5181 """__init__(self) -> GraphicsPath"""
5182 _gdi_
.GraphicsPath_swiginit(self
,_gdi_
.new_GraphicsPath(*args
, **kwargs
))
5183 __swig_destroy__
= _gdi_
.delete_GraphicsPath
5184 __del__
= lambda self
: None;
5185 def MoveToPoint(*args
):
5187 MoveToPoint(self, Double x, Double y)
5188 MoveToPoint(self, Point2D p)
5190 Begins a new subpath at the specified point.
5192 return _gdi_
.GraphicsPath_MoveToPoint(*args
)
5194 def AddLineToPoint(*args
):
5196 AddLineToPoint(self, Double x, Double y)
5197 AddLineToPoint(self, Point2D p)
5199 Adds a straight line from the current point to the specified point.
5201 return _gdi_
.GraphicsPath_AddLineToPoint(*args
)
5203 def AddCurveToPoint(*args
):
5205 AddCurveToPoint(self, Double cx1, Double cy1, Double cx2, Double cy2, Double x,
5207 AddCurveToPoint(self, Point2D c1, Point2D c2, Point2D e)
5209 Adds a cubic Bezier curve from the current point, using two control
5210 points and an end point
5212 return _gdi_
.GraphicsPath_AddCurveToPoint(*args
)
5214 def AddPath(*args
, **kwargs
):
5216 AddPath(self, GraphicsPath path)
5220 return _gdi_
.GraphicsPath_AddPath(*args
, **kwargs
)
5222 def CloseSubpath(*args
, **kwargs
):
5226 Closes the current sub-path.
5228 return _gdi_
.GraphicsPath_CloseSubpath(*args
, **kwargs
)
5230 def GetCurrentPoint(*args
, **kwargs
):
5232 GetCurrentPoint(self) -> Point2D
5234 Gets the last point of the current path, (0,0) if not yet set
5236 return _gdi_
.GraphicsPath_GetCurrentPoint(*args
, **kwargs
)
5240 AddArc(self, Double x, Double y, Double r, Double startAngle, Double endAngle,
5242 AddArc(self, Point2D c, Double r, Double startAngle, Double endAngle,
5245 Adds an arc of a circle centering at (x,y) with radius (r) from
5246 startAngle to endAngle
5248 return _gdi_
.GraphicsPath_AddArc(*args
)
5250 def AddQuadCurveToPoint(*args
, **kwargs
):
5252 AddQuadCurveToPoint(self, Double cx, Double cy, Double x, Double y)
5254 Adds a quadratic Bezier curve from the current point, using a control
5255 point and an end point
5257 return _gdi_
.GraphicsPath_AddQuadCurveToPoint(*args
, **kwargs
)
5259 def AddRectangle(*args
, **kwargs
):
5261 AddRectangle(self, Double x, Double y, Double w, Double h)
5263 Appends a rectangle as a new closed subpath.
5265 return _gdi_
.GraphicsPath_AddRectangle(*args
, **kwargs
)
5267 def AddCircle(*args
, **kwargs
):
5269 AddCircle(self, Double x, Double y, Double r)
5271 Appends a circle around (x,y) with radius r as a new closed subpath.
5273 return _gdi_
.GraphicsPath_AddCircle(*args
, **kwargs
)
5275 def AddArcToPoint(*args
, **kwargs
):
5277 AddArcToPoint(self, Double x1, Double y1, Double x2, Double y2, Double r)
5279 Appends an arc to two tangents connecting (current) to (x1,y1) and (x1,y1)
5280 to (x2,y2), also a straight line from (current) to (x1,y1)
5282 return _gdi_
.GraphicsPath_AddArcToPoint(*args
, **kwargs
)
5284 def AddEllipse(*args
, **kwargs
):
5286 AddEllipse(self, Double x, Double y, Double w, Double h)
5288 Appends an ellipse fitting into the passed in rectangle.
5290 return _gdi_
.GraphicsPath_AddEllipse(*args
, **kwargs
)
5292 def AddRoundedRectangle(*args
, **kwargs
):
5294 AddRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)
5296 Appends a rounded rectangle.
5298 return _gdi_
.GraphicsPath_AddRoundedRectangle(*args
, **kwargs
)
5300 def GetNativePath(*args
, **kwargs
):
5302 GetNativePath(self) -> void
5304 Returns the native path (CGPathRef for Core Graphics, Path pointer for
5305 GDIPlus and a cairo_path_t pointer for cairo). NOTE: For wxPython we
5306 still need a way to make this value usable.
5308 return _gdi_
.GraphicsPath_GetNativePath(*args
, **kwargs
)
5310 def UnGetNativePath(*args
, **kwargs
):
5312 UnGetNativePath(self, void p)
5314 Gives back the native path returned by GetNativePath() because there
5315 might be some deallocations necessary (eg on cairo the native path
5316 returned by GetNativePath is newly allocated each time).
5318 return _gdi_
.GraphicsPath_UnGetNativePath(*args
, **kwargs
)
5320 def Transform(*args
, **kwargs
):
5322 Transform(self, GraphicsMatrix matrix)
5324 Transforms each point of this path by the matrix
5326 return _gdi_
.GraphicsPath_Transform(*args
, **kwargs
)
5328 def GetBox(*args
, **kwargs
):
5330 GetBox(self) -> wxRect2DDouble
5332 Gets the bounding box enclosing all points (possibly including control points)
5334 return _gdi_
.GraphicsPath_GetBox(*args
, **kwargs
)
5336 def Contains(*args
):
5338 Contains(self, Double x, Double y, int fillStyle=ODDEVEN_RULE) -> bool
5339 Contains(self, wxPoint2DDouble c, int fillStyle=ODDEVEN_RULE) -> bool
5341 Returns ``True`` if the point is within the path.
5343 return _gdi_
.GraphicsPath_Contains(*args
)
5345 _gdi_
.GraphicsPath_swigregister(GraphicsPath
)
5347 class GraphicsContext(GraphicsObject
):
5349 A `wx.GraphicsContext` instance is the object that is drawn upon. It is
5350 created by a renderer using the CreateContext calls, this can be done
5351 either directly using a renderer instance, or indirectly using the
5352 static convenience CreateXXX functions of wx.GraphicsContext that
5353 always delegate the task to the default renderer.
5355 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5356 def __init__(self
): raise AttributeError, "No constructor defined"
5357 __repr__
= _swig_repr
5358 __swig_destroy__
= _gdi_
.delete_GraphicsContext
5359 __del__
= lambda self
: None;
5362 Create(WindowDC dc) -> GraphicsContext
5363 Create(Window window) -> GraphicsContext
5365 Creates a wx.GraphicsContext either from a window or a DC.
5367 val
= _gdi_
.GraphicsContext_Create(*args
)
5368 val
.__dc
= args
[0] # save a ref so the dc will not be deleted before self
5371 Create
= staticmethod(Create
)
5372 def CreateMeasuringContext(*args
):
5374 CreateMeasuringContext() -> GraphicsContext
5376 Create a lightwieght context that can be used for measuring text only.
5378 val
= _gdi_
.GraphicsContext_CreateMeasuringContext(*args
)
5379 val
.__dc
= args
[0] # save a ref so the dc will not be deleted before self
5382 CreateMeasuringContext
= staticmethod(CreateMeasuringContext
)
5383 def CreateFromNative(*args
, **kwargs
):
5385 CreateFromNative(void context) -> GraphicsContext
5387 Creates a wx.GraphicsContext from a native context. This native context
5388 must be eg a CGContextRef for Core Graphics, a Graphics pointer for
5389 GDIPlus or a cairo_t pointer for Cairo.
5391 return _gdi_
.GraphicsContext_CreateFromNative(*args
, **kwargs
)
5393 CreateFromNative
= staticmethod(CreateFromNative
)
5394 def CreateFromNativeWindow(*args
, **kwargs
):
5396 CreateFromNativeWindow(void window) -> GraphicsContext
5398 Creates a wx.GraphicsContext from a native window.
5400 return _gdi_
.GraphicsContext_CreateFromNativeWindow(*args
, **kwargs
)
5402 CreateFromNativeWindow
= staticmethod(CreateFromNativeWindow
)
5403 def CreatePath(*args
, **kwargs
):
5405 CreatePath(self) -> GraphicsPath
5407 Creates a native graphics path which is initially empty.
5409 return _gdi_
.GraphicsContext_CreatePath(*args
, **kwargs
)
5411 def CreatePen(*args
, **kwargs
):
5413 CreatePen(self, Pen pen) -> GraphicsPen
5415 Creates a native pen from a `wx.Pen`.
5417 return _gdi_
.GraphicsContext_CreatePen(*args
, **kwargs
)
5419 def CreateBrush(*args
, **kwargs
):
5421 CreateBrush(self, Brush brush) -> GraphicsBrush
5423 Creates a native brush from a `wx.Brush`.
5425 return _gdi_
.GraphicsContext_CreateBrush(*args
, **kwargs
)
5427 def CreateLinearGradientBrush(*args
, **kwargs
):
5429 CreateLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, Colour c1,
5430 Colour c2) -> GraphicsBrush
5432 Creates a native brush, having a linear gradient, starting at (x1,y1)
5433 with color c1 to (x2,y2) with color c2.
5435 return _gdi_
.GraphicsContext_CreateLinearGradientBrush(*args
, **kwargs
)
5437 def CreateRadialGradientBrush(*args
, **kwargs
):
5439 CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
5440 Colour oColor, Colour cColor) -> GraphicsBrush
5442 Creates a native brush, having a radial gradient originating at
5443 point (xo,yc) with color oColour and ends on a circle around (xc,yc) with
5444 radius r and color cColour.
5446 return _gdi_
.GraphicsContext_CreateRadialGradientBrush(*args
, **kwargs
)
5448 def CreateFont(*args
, **kwargs
):
5450 CreateFont(self, Font font, Colour col=*wxBLACK) -> GraphicsFont
5452 Creates a native graphics font from a `wx.Font` and a text colour.
5454 return _gdi_
.GraphicsContext_CreateFont(*args
, **kwargs
)
5456 def CreateMatrix(*args
, **kwargs
):
5458 CreateMatrix(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
5459 Double tx=0.0, Double ty=0.0) -> GraphicsMatrix
5461 Creates a native affine transformation matrix from the passed in
5462 values. The defaults result in an identity matrix.
5464 return _gdi_
.GraphicsContext_CreateMatrix(*args
, **kwargs
)
5466 def PushState(*args
, **kwargs
):
5470 push the current state of the context, ie the transformation matrix on a stack
5472 return _gdi_
.GraphicsContext_PushState(*args
, **kwargs
)
5474 def PopState(*args
, **kwargs
):
5478 pops a stored state from the stack
5480 return _gdi_
.GraphicsContext_PopState(*args
, **kwargs
)
5482 def ClipRegion(*args
, **kwargs
):
5484 ClipRegion(self, Region region)
5486 Clips drawings to the region, combined to current clipping region.
5488 return _gdi_
.GraphicsContext_ClipRegion(*args
, **kwargs
)
5490 def Clip(*args
, **kwargs
):
5492 Clip(self, Double x, Double y, Double w, Double h)
5494 Clips drawings to the rectangle.
5496 return _gdi_
.GraphicsContext_Clip(*args
, **kwargs
)
5498 def ResetClip(*args
, **kwargs
):
5502 Resets the clipping to original shape.
5504 return _gdi_
.GraphicsContext_ResetClip(*args
, **kwargs
)
5506 def GetNativeContext(*args
, **kwargs
):
5508 GetNativeContext(self) -> void
5510 Returns the native context (CGContextRef for Core Graphics, Graphics
5511 pointer for GDIPlus and cairo_t pointer for cairo).
5513 return _gdi_
.GraphicsContext_GetNativeContext(*args
, **kwargs
)
5515 def Translate(*args
, **kwargs
):
5517 Translate(self, Double dx, Double dy)
5519 Translates the current transformation matrix.
5521 return _gdi_
.GraphicsContext_Translate(*args
, **kwargs
)
5523 def Scale(*args
, **kwargs
):
5525 Scale(self, Double xScale, Double yScale)
5527 Scale the current transformation matrix of the context.
5529 return _gdi_
.GraphicsContext_Scale(*args
, **kwargs
)
5531 def Rotate(*args
, **kwargs
):
5533 Rotate(self, Double angle)
5535 Rotate the current transformation matrix of the context. ``angle`` is
5536 specified in radians.
5538 return _gdi_
.GraphicsContext_Rotate(*args
, **kwargs
)
5540 def ConcatTransform(*args
, **kwargs
):
5542 ConcatTransform(self, GraphicsMatrix matrix)
5544 Concatenates the passed in transform with the current transform of
5547 return _gdi_
.GraphicsContext_ConcatTransform(*args
, **kwargs
)
5549 def SetTransform(*args
, **kwargs
):
5551 SetTransform(self, GraphicsMatrix matrix)
5553 Sets the current transform of this context.
5555 return _gdi_
.GraphicsContext_SetTransform(*args
, **kwargs
)
5557 def GetTransform(*args
, **kwargs
):
5559 GetTransform(self) -> GraphicsMatrix
5561 Gets the current transformation matrix of this context.
5563 return _gdi_
.GraphicsContext_GetTransform(*args
, **kwargs
)
5567 SetPen(self, GraphicsPen pen)
5568 SetPen(self, Pen pen)
5572 return _gdi_
.GraphicsContext_SetPen(*args
)
5574 def SetBrush(*args
):
5576 SetBrush(self, GraphicsBrush brush)
5577 SetBrush(self, Brush brush)
5579 Sets the brush for filling
5581 return _gdi_
.GraphicsContext_SetBrush(*args
)
5585 SetFont(self, GraphicsFont font)
5586 SetFont(self, Font font, Colour colour=*wxBLACK)
5590 return _gdi_
.GraphicsContext_SetFont(*args
)
5592 def StrokePath(*args
, **kwargs
):
5594 StrokePath(self, GraphicsPath path)
5596 Strokes along a path with the current pen.
5598 return _gdi_
.GraphicsContext_StrokePath(*args
, **kwargs
)
5600 def FillPath(*args
, **kwargs
):
5602 FillPath(self, GraphicsPath path, int fillStyle=ODDEVEN_RULE)
5604 Fills a path with the current brush.
5606 return _gdi_
.GraphicsContext_FillPath(*args
, **kwargs
)
5608 def DrawPath(*args
, **kwargs
):
5610 DrawPath(self, GraphicsPath path, int fillStyle=ODDEVEN_RULE)
5612 Draws the path by first filling and then stroking.
5614 return _gdi_
.GraphicsContext_DrawPath(*args
, **kwargs
)
5616 def DrawText(*args
, **kwargs
):
5618 DrawText(self, String str, Double x, Double y, GraphicsBrush backgroundBrush=NullGraphicsBrush)
5620 Draws a text string at the defined position.
5622 return _gdi_
.GraphicsContext_DrawText(*args
, **kwargs
)
5624 def DrawRotatedText(*args
, **kwargs
):
5626 DrawRotatedText(self, String str, Double x, Double y, Double angle, GraphicsBrush backgroundBrush=NullGraphicsBrush)
5628 Draws a text string at the defined position, at the specified angle,
5629 which is given in radians.
5631 return _gdi_
.GraphicsContext_DrawRotatedText(*args
, **kwargs
)
5633 def GetFullTextExtent(*args
, **kwargs
):
5635 GetFullTextExtent(self, text) --> (width, height, descent, externalLeading)
5637 Gets the dimensions of the string using the currently selected
5638 font. ``text`` is the string to measure, ``w`` and ``h`` are the total
5639 width and height respectively, ``descent`` is the dimension from the
5640 baseline of the font to the bottom of the descender, and
5641 ``externalLeading`` is any extra vertical space added to the font by
5642 the font designer (usually is zero).
5644 return _gdi_
.GraphicsContext_GetFullTextExtent(*args
, **kwargs
)
5646 def GetTextExtent(*args
, **kwargs
):
5648 GetTextExtent(self, text) --> (width, height)
5650 Gets the dimensions of the string using the currently selected
5651 font. ``text`` is the string to measure, ``w`` and ``h`` are the total
5652 width and height respectively.
5654 return _gdi_
.GraphicsContext_GetTextExtent(*args
, **kwargs
)
5656 def GetPartialTextExtents(*args
, **kwargs
):
5658 GetPartialTextExtents(self, text) -> [widths]
5660 Returns a list of widths from the beginning of ``text`` to the
5661 coresponding character in ``text``.
5663 return _gdi_
.GraphicsContext_GetPartialTextExtents(*args
, **kwargs
)
5665 def DrawBitmap(*args
, **kwargs
):
5667 DrawBitmap(self, Bitmap bmp, Double x, Double y, Double w, Double h)
5669 Draws the bitmap. In case of a mono bitmap, this is treated as a mask
5670 and the current brush is used for filling.
5672 return _gdi_
.GraphicsContext_DrawBitmap(*args
, **kwargs
)
5674 def DrawIcon(*args
, **kwargs
):
5676 DrawIcon(self, Icon icon, Double x, Double y, Double w, Double h)
5680 return _gdi_
.GraphicsContext_DrawIcon(*args
, **kwargs
)
5682 def StrokeLine(*args
, **kwargs
):
5684 StrokeLine(self, Double x1, Double y1, Double x2, Double y2)
5686 Strokes a single line.
5688 return _gdi_
.GraphicsContext_StrokeLine(*args
, **kwargs
)
5690 def StrokeLines(*args
, **kwargs
):
5692 StrokeLines(self, List points)
5694 Stroke lines connecting each of the points
5696 return _gdi_
.GraphicsContext_StrokeLines(*args
, **kwargs
)
5698 def StrokeLineSegements(*args
, **kwargs
):
5700 StrokeLineSegements(self, PyObject beginPoints, PyObject endPoints)
5702 Stroke disconnected lines from begin to end points
5704 return _gdi_
.GraphicsContext_StrokeLineSegements(*args
, **kwargs
)
5706 def DrawLines(*args
, **kwargs
):
5708 DrawLines(self, size_t points, int fillStyle=ODDEVEN_RULE)
5712 return _gdi_
.GraphicsContext_DrawLines(*args
, **kwargs
)
5714 def DrawRectangle(*args
, **kwargs
):
5716 DrawRectangle(self, Double x, Double y, Double w, Double h)
5720 return _gdi_
.GraphicsContext_DrawRectangle(*args
, **kwargs
)
5722 def DrawEllipse(*args
, **kwargs
):
5724 DrawEllipse(self, Double x, Double y, Double w, Double h)
5728 return _gdi_
.GraphicsContext_DrawEllipse(*args
, **kwargs
)
5730 def DrawRoundedRectangle(*args
, **kwargs
):
5732 DrawRoundedRectangle(self, Double x, Double y, Double w, Double h, Double radius)
5734 Draws a rounded rectangle
5736 return _gdi_
.GraphicsContext_DrawRoundedRectangle(*args
, **kwargs
)
5738 def ShouldOffset(*args
, **kwargs
):
5740 ShouldOffset(self) -> bool
5742 helper to determine if a 0.5 offset should be applied for the drawing operation
5744 return _gdi_
.GraphicsContext_ShouldOffset(*args
, **kwargs
)
5746 _gdi_
.GraphicsContext_swigregister(GraphicsContext
)
5748 NullGraphicsPen
= cvar
.NullGraphicsPen
5749 NullGraphicsBrush
= cvar
.NullGraphicsBrush
5750 NullGraphicsFont
= cvar
.NullGraphicsFont
5751 NullGraphicsMatrix
= cvar
.NullGraphicsMatrix
5752 NullGraphicsPath
= cvar
.NullGraphicsPath
5754 def GraphicsContext_Create(*args
):
5756 Create(WindowDC dc) -> GraphicsContext
5757 GraphicsContext_Create(Window window) -> GraphicsContext
5759 Creates a wx.GraphicsContext either from a window or a DC.
5761 val
= _gdi_
.GraphicsContext_Create(*args
)
5762 val
.__dc
= args
[0] # save a ref so the dc will not be deleted before self
5765 def GraphicsContext_CreateMeasuringContext(*args
):
5767 GraphicsContext_CreateMeasuringContext() -> GraphicsContext
5769 Create a lightwieght context that can be used for measuring text only.
5771 val
= _gdi_
.GraphicsContext_CreateMeasuringContext(*args
)
5772 val
.__dc
= args
[0] # save a ref so the dc will not be deleted before self
5775 def GraphicsContext_CreateFromNative(*args
, **kwargs
):
5777 GraphicsContext_CreateFromNative(void context) -> GraphicsContext
5779 Creates a wx.GraphicsContext from a native context. This native context
5780 must be eg a CGContextRef for Core Graphics, a Graphics pointer for
5781 GDIPlus or a cairo_t pointer for Cairo.
5783 return _gdi_
.GraphicsContext_CreateFromNative(*args
, **kwargs
)
5785 def GraphicsContext_CreateFromNativeWindow(*args
, **kwargs
):
5787 GraphicsContext_CreateFromNativeWindow(void window) -> GraphicsContext
5789 Creates a wx.GraphicsContext from a native window.
5791 return _gdi_
.GraphicsContext_CreateFromNativeWindow(*args
, **kwargs
)
5793 class GraphicsRenderer(_core
.Object
):
5794 """Proxy of C++ GraphicsRenderer class"""
5795 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5796 def __init__(self
): raise AttributeError, "No constructor defined"
5797 __repr__
= _swig_repr
5798 __swig_destroy__
= _gdi_
.delete_GraphicsRenderer
5799 __del__
= lambda self
: None;
5800 def GetDefaultRenderer(*args
, **kwargs
):
5801 """GetDefaultRenderer() -> GraphicsRenderer"""
5802 return _gdi_
.GraphicsRenderer_GetDefaultRenderer(*args
, **kwargs
)
5804 GetDefaultRenderer
= staticmethod(GetDefaultRenderer
)
5805 def CreateContext(*args
):
5807 CreateContext(self, WindowDC dc) -> GraphicsContext
5808 CreateContext(self, Window window) -> GraphicsContext
5810 return _gdi_
.GraphicsRenderer_CreateContext(*args
)
5812 def CreateMeasuringContext(*args
, **kwargs
):
5813 """CreateMeasuringContext(self) -> GraphicsContext"""
5814 return _gdi_
.GraphicsRenderer_CreateMeasuringContext(*args
, **kwargs
)
5816 def CreateContextFromNativeContext(*args
, **kwargs
):
5817 """CreateContextFromNativeContext(self, void context) -> GraphicsContext"""
5818 return _gdi_
.GraphicsRenderer_CreateContextFromNativeContext(*args
, **kwargs
)
5820 def CreateContextFromNativeWindow(*args
, **kwargs
):
5821 """CreateContextFromNativeWindow(self, void window) -> GraphicsContext"""
5822 return _gdi_
.GraphicsRenderer_CreateContextFromNativeWindow(*args
, **kwargs
)
5824 def CreatePath(*args
, **kwargs
):
5825 """CreatePath(self) -> GraphicsPath"""
5826 return _gdi_
.GraphicsRenderer_CreatePath(*args
, **kwargs
)
5828 def CreateMatrix(*args
, **kwargs
):
5830 CreateMatrix(self, Double a=1.0, Double b=0.0, Double c=0.0, Double d=1.0,
5831 Double tx=0.0, Double ty=0.0) -> GraphicsMatrix
5833 return _gdi_
.GraphicsRenderer_CreateMatrix(*args
, **kwargs
)
5835 def CreatePen(*args
, **kwargs
):
5836 """CreatePen(self, Pen pen) -> GraphicsPen"""
5837 return _gdi_
.GraphicsRenderer_CreatePen(*args
, **kwargs
)
5839 def CreateBrush(*args
, **kwargs
):
5840 """CreateBrush(self, Brush brush) -> GraphicsBrush"""
5841 return _gdi_
.GraphicsRenderer_CreateBrush(*args
, **kwargs
)
5843 def CreateLinearGradientBrush(*args
, **kwargs
):
5845 CreateLinearGradientBrush(self, Double x1, Double y1, Double x2, Double y2, Colour c1,
5846 Colour c2) -> GraphicsBrush
5848 return _gdi_
.GraphicsRenderer_CreateLinearGradientBrush(*args
, **kwargs
)
5850 def CreateRadialGradientBrush(*args
, **kwargs
):
5852 CreateRadialGradientBrush(self, Double xo, Double yo, Double xc, Double yc, Double radius,
5853 Colour oColor, Colour cColor) -> GraphicsBrush
5855 return _gdi_
.GraphicsRenderer_CreateRadialGradientBrush(*args
, **kwargs
)
5857 def CreateFont(*args
, **kwargs
):
5858 """CreateFont(self, Font font, Colour col=*wxBLACK) -> GraphicsFont"""
5859 return _gdi_
.GraphicsRenderer_CreateFont(*args
, **kwargs
)
5861 _gdi_
.GraphicsRenderer_swigregister(GraphicsRenderer
)
5863 def GraphicsRenderer_GetDefaultRenderer(*args
):
5864 """GraphicsRenderer_GetDefaultRenderer() -> GraphicsRenderer"""
5865 return _gdi_
.GraphicsRenderer_GetDefaultRenderer(*args
)
5868 """Proxy of C++ GCDC class"""
5869 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5870 __repr__
= _swig_repr
5871 def __init__(self
, *args
):
5873 __init__(self, WindowDC dc) -> GCDC
5874 __init__(self, Window window) -> GCDC
5876 _gdi_
.GCDC_swiginit(self
,_gdi_
.new_GCDC(*args
))
5877 self
.__dc
= args
[0] # save a ref so the other dc will not be deleted before self
5879 __swig_destroy__
= _gdi_
.delete_GCDC
5880 __del__
= lambda self
: None;
5881 def GetGraphicsContext(*args
, **kwargs
):
5882 """GetGraphicsContext(self) -> GraphicsContext"""
5883 return _gdi_
.GCDC_GetGraphicsContext(*args
, **kwargs
)
5885 def SetGraphicsContext(*args
, **kwargs
):
5886 """SetGraphicsContext(self, GraphicsContext ctx)"""
5887 return _gdi_
.GCDC_SetGraphicsContext(*args
, **kwargs
)
5889 GraphicsContext
= property(GetGraphicsContext
,SetGraphicsContext
)
5890 _gdi_
.GCDC_swigregister(GCDC
)
5892 class Overlay(object):
5893 """Proxy of C++ Overlay class"""
5894 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5895 __repr__
= _swig_repr
5896 def __init__(self
, *args
, **kwargs
):
5897 """__init__(self) -> Overlay"""
5898 _gdi_
.Overlay_swiginit(self
,_gdi_
.new_Overlay(*args
, **kwargs
))
5899 __swig_destroy__
= _gdi_
.delete_Overlay
5900 __del__
= lambda self
: None;
5901 def Reset(*args
, **kwargs
):
5903 return _gdi_
.Overlay_Reset(*args
, **kwargs
)
5905 _gdi_
.Overlay_swigregister(Overlay
)
5907 class DCOverlay(object):
5908 """Proxy of C++ DCOverlay class"""
5909 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5910 __repr__
= _swig_repr
5911 def __init__(self
, *args
):
5913 __init__(self, Overlay overlay, WindowDC dc, int x, int y, int width,
5914 int height) -> DCOverlay
5915 __init__(self, Overlay overlay, WindowDC dc) -> DCOverlay
5917 _gdi_
.DCOverlay_swiginit(self
,_gdi_
.new_DCOverlay(*args
))
5918 __swig_destroy__
= _gdi_
.delete_DCOverlay
5919 __del__
= lambda self
: None;
5920 def Clear(*args
, **kwargs
):
5922 return _gdi_
.DCOverlay_Clear(*args
, **kwargs
)
5924 _gdi_
.DCOverlay_swigregister(DCOverlay
)
5926 #---------------------------------------------------------------------------
5928 IMAGELIST_DRAW_NORMAL
= _gdi_
.IMAGELIST_DRAW_NORMAL
5929 IMAGELIST_DRAW_TRANSPARENT
= _gdi_
.IMAGELIST_DRAW_TRANSPARENT
5930 IMAGELIST_DRAW_SELECTED
= _gdi_
.IMAGELIST_DRAW_SELECTED
5931 IMAGELIST_DRAW_FOCUSED
= _gdi_
.IMAGELIST_DRAW_FOCUSED
5932 IMAGE_LIST_NORMAL
= _gdi_
.IMAGE_LIST_NORMAL
5933 IMAGE_LIST_SMALL
= _gdi_
.IMAGE_LIST_SMALL
5934 IMAGE_LIST_STATE
= _gdi_
.IMAGE_LIST_STATE
5935 class ImageList(_core
.Object
):
5936 """Proxy of C++ ImageList class"""
5937 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
5938 __repr__
= _swig_repr
5939 def __init__(self
, *args
, **kwargs
):
5940 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
5941 _gdi_
.ImageList_swiginit(self
,_gdi_
.new_ImageList(*args
, **kwargs
))
5942 __swig_destroy__
= _gdi_
.delete_ImageList
5943 __del__
= lambda self
: None;
5944 def Add(*args
, **kwargs
):
5945 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
5946 return _gdi_
.ImageList_Add(*args
, **kwargs
)
5948 def AddWithColourMask(*args
, **kwargs
):
5949 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
5950 return _gdi_
.ImageList_AddWithColourMask(*args
, **kwargs
)
5952 def AddIcon(*args
, **kwargs
):
5953 """AddIcon(self, Icon icon) -> int"""
5954 return _gdi_
.ImageList_AddIcon(*args
, **kwargs
)
5956 def GetBitmap(*args
, **kwargs
):
5957 """GetBitmap(self, int index) -> Bitmap"""
5958 return _gdi_
.ImageList_GetBitmap(*args
, **kwargs
)
5960 def GetIcon(*args
, **kwargs
):
5961 """GetIcon(self, int index) -> Icon"""
5962 return _gdi_
.ImageList_GetIcon(*args
, **kwargs
)
5964 def Replace(*args
, **kwargs
):
5965 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
5966 return _gdi_
.ImageList_Replace(*args
, **kwargs
)
5968 def Draw(*args
, **kwargs
):
5970 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
5971 bool solidBackground=False) -> bool
5973 return _gdi_
.ImageList_Draw(*args
, **kwargs
)
5975 def GetImageCount(*args
, **kwargs
):
5976 """GetImageCount(self) -> int"""
5977 return _gdi_
.ImageList_GetImageCount(*args
, **kwargs
)
5979 def Remove(*args
, **kwargs
):
5980 """Remove(self, int index) -> bool"""
5981 return _gdi_
.ImageList_Remove(*args
, **kwargs
)
5983 def RemoveAll(*args
, **kwargs
):
5984 """RemoveAll(self) -> bool"""
5985 return _gdi_
.ImageList_RemoveAll(*args
, **kwargs
)
5987 def GetSize(*args
, **kwargs
):
5988 """GetSize(index) -> (width,height)"""
5989 return _gdi_
.ImageList_GetSize(*args
, **kwargs
)
5991 ImageCount
= property(GetImageCount
,doc
="See `GetImageCount`")
5992 Size
= property(GetSize
,doc
="See `GetSize`")
5993 _gdi_
.ImageList_swigregister(ImageList
)
5995 #---------------------------------------------------------------------------
5997 class StockGDI(object):
5998 """Proxy of C++ StockGDI class"""
5999 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6000 __repr__
= _swig_repr
6001 BRUSH_BLACK
= _gdi_
.StockGDI_BRUSH_BLACK
6002 BRUSH_BLUE
= _gdi_
.StockGDI_BRUSH_BLUE
6003 BRUSH_CYAN
= _gdi_
.StockGDI_BRUSH_CYAN
6004 BRUSH_GREEN
= _gdi_
.StockGDI_BRUSH_GREEN
6005 BRUSH_GREY
= _gdi_
.StockGDI_BRUSH_GREY
6006 BRUSH_LIGHTGREY
= _gdi_
.StockGDI_BRUSH_LIGHTGREY
6007 BRUSH_MEDIUMGREY
= _gdi_
.StockGDI_BRUSH_MEDIUMGREY
6008 BRUSH_RED
= _gdi_
.StockGDI_BRUSH_RED
6009 BRUSH_TRANSPARENT
= _gdi_
.StockGDI_BRUSH_TRANSPARENT
6010 BRUSH_WHITE
= _gdi_
.StockGDI_BRUSH_WHITE
6011 COLOUR_BLACK
= _gdi_
.StockGDI_COLOUR_BLACK
6012 COLOUR_BLUE
= _gdi_
.StockGDI_COLOUR_BLUE
6013 COLOUR_CYAN
= _gdi_
.StockGDI_COLOUR_CYAN
6014 COLOUR_GREEN
= _gdi_
.StockGDI_COLOUR_GREEN
6015 COLOUR_LIGHTGREY
= _gdi_
.StockGDI_COLOUR_LIGHTGREY
6016 COLOUR_RED
= _gdi_
.StockGDI_COLOUR_RED
6017 COLOUR_WHITE
= _gdi_
.StockGDI_COLOUR_WHITE
6018 CURSOR_CROSS
= _gdi_
.StockGDI_CURSOR_CROSS
6019 CURSOR_HOURGLASS
= _gdi_
.StockGDI_CURSOR_HOURGLASS
6020 CURSOR_STANDARD
= _gdi_
.StockGDI_CURSOR_STANDARD
6021 FONT_ITALIC
= _gdi_
.StockGDI_FONT_ITALIC
6022 FONT_NORMAL
= _gdi_
.StockGDI_FONT_NORMAL
6023 FONT_SMALL
= _gdi_
.StockGDI_FONT_SMALL
6024 FONT_SWISS
= _gdi_
.StockGDI_FONT_SWISS
6025 PEN_BLACK
= _gdi_
.StockGDI_PEN_BLACK
6026 PEN_BLACKDASHED
= _gdi_
.StockGDI_PEN_BLACKDASHED
6027 PEN_CYAN
= _gdi_
.StockGDI_PEN_CYAN
6028 PEN_GREEN
= _gdi_
.StockGDI_PEN_GREEN
6029 PEN_GREY
= _gdi_
.StockGDI_PEN_GREY
6030 PEN_LIGHTGREY
= _gdi_
.StockGDI_PEN_LIGHTGREY
6031 PEN_MEDIUMGREY
= _gdi_
.StockGDI_PEN_MEDIUMGREY
6032 PEN_RED
= _gdi_
.StockGDI_PEN_RED
6033 PEN_TRANSPARENT
= _gdi_
.StockGDI_PEN_TRANSPARENT
6034 PEN_WHITE
= _gdi_
.StockGDI_PEN_WHITE
6035 ITEMCOUNT
= _gdi_
.StockGDI_ITEMCOUNT
6036 def __init__(self
, *args
, **kwargs
):
6037 """__init__(self) -> StockGDI"""
6038 _gdi_
.StockGDI_swiginit(self
,_gdi_
.new_StockGDI(*args
, **kwargs
))
6039 __swig_destroy__
= _gdi_
.delete_StockGDI
6040 __del__
= lambda self
: None;
6041 def DeleteAll(*args
, **kwargs
):
6043 return _gdi_
.StockGDI_DeleteAll(*args
, **kwargs
)
6045 DeleteAll
= staticmethod(DeleteAll
)
6046 def instance(*args
, **kwargs
):
6047 """instance() -> StockGDI"""
6048 return _gdi_
.StockGDI_instance(*args
, **kwargs
)
6050 instance
= staticmethod(instance
)
6051 def GetBrush(*args
, **kwargs
):
6052 """GetBrush(int item) -> Brush"""
6053 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
6055 GetBrush
= staticmethod(GetBrush
)
6056 def GetColour(*args
, **kwargs
):
6057 """GetColour(int item) -> Colour"""
6058 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
6060 GetColour
= staticmethod(GetColour
)
6061 def GetCursor(*args
, **kwargs
):
6062 """GetCursor(int item) -> Cursor"""
6063 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
6065 GetCursor
= staticmethod(GetCursor
)
6066 def GetPen(*args
, **kwargs
):
6067 """GetPen(int item) -> Pen"""
6068 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
6070 GetPen
= staticmethod(GetPen
)
6071 def GetFont(*args
, **kwargs
):
6072 """GetFont(self, int item) -> Font"""
6073 return _gdi_
.StockGDI_GetFont(*args
, **kwargs
)
6075 def _initStockObjects():
6077 wx
.ITALIC_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_ITALIC
).this
6078 wx
.NORMAL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_NORMAL
).this
6079 wx
.SMALL_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SMALL
).this
6080 wx
.SWISS_FONT
.this
= StockGDI
.instance().GetFont(StockGDI
.FONT_SWISS
).this
6082 wx
.BLACK_DASHED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACKDASHED
).this
6083 wx
.BLACK_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_BLACK
).this
6084 wx
.CYAN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_CYAN
).this
6085 wx
.GREEN_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREEN
).this
6086 wx
.GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_GREY
).this
6087 wx
.LIGHT_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_LIGHTGREY
).this
6088 wx
.MEDIUM_GREY_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_MEDIUMGREY
).this
6089 wx
.RED_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_RED
).this
6090 wx
.TRANSPARENT_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_TRANSPARENT
).this
6091 wx
.WHITE_PEN
.this
= StockGDI
.GetPen(StockGDI
.PEN_WHITE
).this
6093 wx
.BLACK_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLACK
).this
6094 wx
.BLUE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_BLUE
).this
6095 wx
.CYAN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_CYAN
).this
6096 wx
.GREEN_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREEN
).this
6097 wx
.GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_GREY
).this
6098 wx
.LIGHT_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_LIGHTGREY
).this
6099 wx
.MEDIUM_GREY_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_MEDIUMGREY
).this
6100 wx
.RED_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_RED
).this
6101 wx
.TRANSPARENT_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_TRANSPARENT
).this
6102 wx
.WHITE_BRUSH
.this
= StockGDI
.GetBrush(StockGDI
.BRUSH_WHITE
).this
6104 wx
.BLACK
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLACK
).this
6105 wx
.BLUE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_BLUE
).this
6106 wx
.CYAN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_CYAN
).this
6107 wx
.GREEN
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_GREEN
).this
6108 wx
.LIGHT_GREY
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_LIGHTGREY
).this
6109 wx
.RED
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_RED
).this
6110 wx
.WHITE
.this
= StockGDI
.GetColour(StockGDI
.COLOUR_WHITE
).this
6112 wx
.CROSS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_CROSS
).this
6113 wx
.HOURGLASS_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_HOURGLASS
).this
6114 wx
.STANDARD_CURSOR
.this
= StockGDI
.GetCursor(StockGDI
.CURSOR_STANDARD
).this
6116 wx
.TheFontList
.this
= _wxPyInitTheFontList().this
6117 wx
.ThePenList
.this
= _wxPyInitThePenList().this
6118 wx
.TheBrushList
.this
= _wxPyInitTheBrushList().this
6119 wx
.TheColourDatabase
.this
= _wxPyInitTheColourDatabase().this
6122 _initStockObjects
= staticmethod(_initStockObjects
)
6124 _gdi_
.StockGDI_swigregister(StockGDI
)
6126 def StockGDI_DeleteAll(*args
):
6127 """StockGDI_DeleteAll()"""
6128 return _gdi_
.StockGDI_DeleteAll(*args
)
6130 def StockGDI_instance(*args
):
6131 """StockGDI_instance() -> StockGDI"""
6132 return _gdi_
.StockGDI_instance(*args
)
6134 def StockGDI_GetBrush(*args
, **kwargs
):
6135 """StockGDI_GetBrush(int item) -> Brush"""
6136 return _gdi_
.StockGDI_GetBrush(*args
, **kwargs
)
6138 def StockGDI_GetColour(*args
, **kwargs
):
6139 """StockGDI_GetColour(int item) -> Colour"""
6140 return _gdi_
.StockGDI_GetColour(*args
, **kwargs
)
6142 def StockGDI_GetCursor(*args
, **kwargs
):
6143 """StockGDI_GetCursor(int item) -> Cursor"""
6144 return _gdi_
.StockGDI_GetCursor(*args
, **kwargs
)
6146 def StockGDI_GetPen(*args
, **kwargs
):
6147 """StockGDI_GetPen(int item) -> Pen"""
6148 return _gdi_
.StockGDI_GetPen(*args
, **kwargs
)
6150 # Create an uninitialized instance for the stock objects, they will
6151 # be initialized later when the wx.App object is created.
6152 ITALIC_FONT
= Font
.__new
__(Font
)
6153 NORMAL_FONT
= Font
.__new
__(Font
)
6154 SMALL_FONT
= Font
.__new
__(Font
)
6155 SWISS_FONT
= Font
.__new
__(Font
)
6157 BLACK_DASHED_PEN
= Pen
.__new
__(Pen
)
6158 BLACK_PEN
= Pen
.__new
__(Pen
)
6159 CYAN_PEN
= Pen
.__new
__(Pen
)
6160 GREEN_PEN
= Pen
.__new
__(Pen
)
6161 GREY_PEN
= Pen
.__new
__(Pen
)
6162 LIGHT_GREY_PEN
= Pen
.__new
__(Pen
)
6163 MEDIUM_GREY_PEN
= Pen
.__new
__(Pen
)
6164 RED_PEN
= Pen
.__new
__(Pen
)
6165 TRANSPARENT_PEN
= Pen
.__new
__(Pen
)
6166 WHITE_PEN
= Pen
.__new
__(Pen
)
6168 BLACK_BRUSH
= Brush
.__new
__(Brush
)
6169 BLUE_BRUSH
= Brush
.__new
__(Brush
)
6170 CYAN_BRUSH
= Brush
.__new
__(Brush
)
6171 GREEN_BRUSH
= Brush
.__new
__(Brush
)
6172 GREY_BRUSH
= Brush
.__new
__(Brush
)
6173 LIGHT_GREY_BRUSH
= Brush
.__new
__(Brush
)
6174 MEDIUM_GREY_BRUSH
= Brush
.__new
__(Brush
)
6175 RED_BRUSH
= Brush
.__new
__(Brush
)
6176 TRANSPARENT_BRUSH
= Brush
.__new
__(Brush
)
6177 WHITE_BRUSH
= Brush
.__new
__(Brush
)
6179 BLACK
= Colour
.__new
__(Colour
)
6180 BLUE
= Colour
.__new
__(Colour
)
6181 CYAN
= Colour
.__new
__(Colour
)
6182 GREEN
= Colour
.__new
__(Colour
)
6183 LIGHT_GREY
= Colour
.__new
__(Colour
)
6184 RED
= Colour
.__new
__(Colour
)
6185 WHITE
= Colour
.__new
__(Colour
)
6187 CROSS_CURSOR
= Cursor
.__new
__(Cursor
)
6188 HOURGLASS_CURSOR
= Cursor
.__new
__(Cursor
)
6189 STANDARD_CURSOR
= Cursor
.__new
__(Cursor
)
6191 class GDIObjListBase(object):
6192 """Proxy of C++ GDIObjListBase class"""
6193 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6194 __repr__
= _swig_repr
6195 def __init__(self
, *args
, **kwargs
):
6196 """__init__(self) -> GDIObjListBase"""
6197 _gdi_
.GDIObjListBase_swiginit(self
,_gdi_
.new_GDIObjListBase(*args
, **kwargs
))
6198 __swig_destroy__
= _gdi_
.delete_GDIObjListBase
6199 __del__
= lambda self
: None;
6200 _gdi_
.GDIObjListBase_swigregister(GDIObjListBase
)
6201 NullBitmap
= cvar
.NullBitmap
6202 NullIcon
= cvar
.NullIcon
6203 NullCursor
= cvar
.NullCursor
6204 NullPen
= cvar
.NullPen
6205 NullBrush
= cvar
.NullBrush
6206 NullPalette
= cvar
.NullPalette
6207 NullFont
= cvar
.NullFont
6208 NullColour
= cvar
.NullColour
6210 class PenList(GDIObjListBase
):
6211 """Proxy of C++ PenList class"""
6212 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6213 def __init__(self
): raise AttributeError, "No constructor defined"
6214 __repr__
= _swig_repr
6215 def FindOrCreatePen(*args
, **kwargs
):
6216 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
6217 return _gdi_
.PenList_FindOrCreatePen(*args
, **kwargs
)
6219 def AddPen(*args
, **kwargs
):
6220 """AddPen(self, Pen pen)"""
6221 return _gdi_
.PenList_AddPen(*args
, **kwargs
)
6223 def RemovePen(*args
, **kwargs
):
6224 """RemovePen(self, Pen pen)"""
6225 return _gdi_
.PenList_RemovePen(*args
, **kwargs
)
6227 AddPen
= wx
._deprecated
(AddPen
)
6228 RemovePen
= wx
._deprecated
(RemovePen
)
6230 _gdi_
.PenList_swigregister(PenList
)
6232 class BrushList(GDIObjListBase
):
6233 """Proxy of C++ BrushList class"""
6234 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6235 def __init__(self
): raise AttributeError, "No constructor defined"
6236 __repr__
= _swig_repr
6237 def FindOrCreateBrush(*args
, **kwargs
):
6238 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
6239 return _gdi_
.BrushList_FindOrCreateBrush(*args
, **kwargs
)
6241 def AddBrush(*args
, **kwargs
):
6242 """AddBrush(self, Brush brush)"""
6243 return _gdi_
.BrushList_AddBrush(*args
, **kwargs
)
6245 def RemoveBrush(*args
, **kwargs
):
6246 """RemoveBrush(self, Brush brush)"""
6247 return _gdi_
.BrushList_RemoveBrush(*args
, **kwargs
)
6249 AddBrush
= wx
._deprecated
(AddBrush
)
6250 RemoveBrush
= wx
._deprecated
(RemoveBrush
)
6252 _gdi_
.BrushList_swigregister(BrushList
)
6254 class FontList(GDIObjListBase
):
6255 """Proxy of C++ FontList class"""
6256 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6257 def __init__(self
): raise AttributeError, "No constructor defined"
6258 __repr__
= _swig_repr
6259 def FindOrCreateFont(*args
, **kwargs
):
6261 FindOrCreateFont(self, int point_size, int family, int style, int weight,
6262 bool underline=False, String facename=EmptyString,
6263 int encoding=FONTENCODING_DEFAULT) -> Font
6265 return _gdi_
.FontList_FindOrCreateFont(*args
, **kwargs
)
6267 def AddFont(*args
, **kwargs
):
6268 """AddFont(self, Font font)"""
6269 return _gdi_
.FontList_AddFont(*args
, **kwargs
)
6271 def RemoveFont(*args
, **kwargs
):
6272 """RemoveFont(self, Font font)"""
6273 return _gdi_
.FontList_RemoveFont(*args
, **kwargs
)
6275 AddFont
= wx
._deprecated
(AddFont
)
6276 RemoveFont
= wx
._deprecated
(RemoveFont
)
6278 _gdi_
.FontList_swigregister(FontList
)
6280 class ColourDatabase(object):
6281 """Proxy of C++ ColourDatabase class"""
6282 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6283 __repr__
= _swig_repr
6284 def __init__(self
, *args
, **kwargs
):
6285 """__init__(self) -> ColourDatabase"""
6286 _gdi_
.ColourDatabase_swiginit(self
,_gdi_
.new_ColourDatabase(*args
, **kwargs
))
6287 __swig_destroy__
= _gdi_
.delete_ColourDatabase
6288 __del__
= lambda self
: None;
6289 def Find(*args
, **kwargs
):
6290 """Find(self, String name) -> Colour"""
6291 return _gdi_
.ColourDatabase_Find(*args
, **kwargs
)
6293 def FindName(*args
, **kwargs
):
6294 """FindName(self, Colour colour) -> String"""
6295 return _gdi_
.ColourDatabase_FindName(*args
, **kwargs
)
6298 def AddColour(*args
, **kwargs
):
6299 """AddColour(self, String name, Colour colour)"""
6300 return _gdi_
.ColourDatabase_AddColour(*args
, **kwargs
)
6302 def Append(*args
, **kwargs
):
6303 """Append(self, String name, int red, int green, int blue)"""
6304 return _gdi_
.ColourDatabase_Append(*args
, **kwargs
)
6306 _gdi_
.ColourDatabase_swigregister(ColourDatabase
)
6308 #---------------------------------------------------------------------------
6311 def _wxPyInitTheFontList(*args
):
6312 """_wxPyInitTheFontList() -> FontList"""
6313 return _gdi_
._wxPyInitTheFontList
(*args
)
6315 def _wxPyInitThePenList(*args
):
6316 """_wxPyInitThePenList() -> PenList"""
6317 return _gdi_
._wxPyInitThePenList
(*args
)
6319 def _wxPyInitTheBrushList(*args
):
6320 """_wxPyInitTheBrushList() -> BrushList"""
6321 return _gdi_
._wxPyInitTheBrushList
(*args
)
6323 def _wxPyInitTheColourDatabase(*args
):
6324 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
6325 return _gdi_
._wxPyInitTheColourDatabase
(*args
)
6326 # Create an uninitialized instance for the stock objects, they will
6327 # be initialized later when the wx.App object is created.
6328 TheFontList
= FontList
.__new
__(FontList
)
6329 ThePenList
= PenList
.__new
__(PenList
)
6330 TheBrushList
= BrushList
.__new
__(BrushList
)
6331 TheColourDatabase
= ColourDatabase
.__new
__(ColourDatabase
)
6333 NullColor
= NullColour
6334 #---------------------------------------------------------------------------
6336 class Effects(_core
.Object
):
6337 """Proxy of C++ Effects class"""
6338 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6339 __repr__
= _swig_repr
6340 def __init__(self
, *args
, **kwargs
):
6341 """__init__(self) -> Effects"""
6342 _gdi_
.Effects_swiginit(self
,_gdi_
.new_Effects(*args
, **kwargs
))
6343 def GetHighlightColour(*args
, **kwargs
):
6344 """GetHighlightColour(self) -> Colour"""
6345 return _gdi_
.Effects_GetHighlightColour(*args
, **kwargs
)
6347 def GetLightShadow(*args
, **kwargs
):
6348 """GetLightShadow(self) -> Colour"""
6349 return _gdi_
.Effects_GetLightShadow(*args
, **kwargs
)
6351 def GetFaceColour(*args
, **kwargs
):
6352 """GetFaceColour(self) -> Colour"""
6353 return _gdi_
.Effects_GetFaceColour(*args
, **kwargs
)
6355 def GetMediumShadow(*args
, **kwargs
):
6356 """GetMediumShadow(self) -> Colour"""
6357 return _gdi_
.Effects_GetMediumShadow(*args
, **kwargs
)
6359 def GetDarkShadow(*args
, **kwargs
):
6360 """GetDarkShadow(self) -> Colour"""
6361 return _gdi_
.Effects_GetDarkShadow(*args
, **kwargs
)
6363 def SetHighlightColour(*args
, **kwargs
):
6364 """SetHighlightColour(self, Colour c)"""
6365 return _gdi_
.Effects_SetHighlightColour(*args
, **kwargs
)
6367 def SetLightShadow(*args
, **kwargs
):
6368 """SetLightShadow(self, Colour c)"""
6369 return _gdi_
.Effects_SetLightShadow(*args
, **kwargs
)
6371 def SetFaceColour(*args
, **kwargs
):
6372 """SetFaceColour(self, Colour c)"""
6373 return _gdi_
.Effects_SetFaceColour(*args
, **kwargs
)
6375 def SetMediumShadow(*args
, **kwargs
):
6376 """SetMediumShadow(self, Colour c)"""
6377 return _gdi_
.Effects_SetMediumShadow(*args
, **kwargs
)
6379 def SetDarkShadow(*args
, **kwargs
):
6380 """SetDarkShadow(self, Colour c)"""
6381 return _gdi_
.Effects_SetDarkShadow(*args
, **kwargs
)
6383 def Set(*args
, **kwargs
):
6385 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
6386 Colour mediumShadow, Colour darkShadow)
6388 return _gdi_
.Effects_Set(*args
, **kwargs
)
6390 def DrawSunkenEdge(*args
, **kwargs
):
6391 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
6392 return _gdi_
.Effects_DrawSunkenEdge(*args
, **kwargs
)
6394 def TileBitmap(*args
, **kwargs
):
6395 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
6396 return _gdi_
.Effects_TileBitmap(*args
, **kwargs
)
6398 DarkShadow
= property(GetDarkShadow
,SetDarkShadow
,doc
="See `GetDarkShadow` and `SetDarkShadow`")
6399 FaceColour
= property(GetFaceColour
,SetFaceColour
,doc
="See `GetFaceColour` and `SetFaceColour`")
6400 HighlightColour
= property(GetHighlightColour
,SetHighlightColour
,doc
="See `GetHighlightColour` and `SetHighlightColour`")
6401 LightShadow
= property(GetLightShadow
,SetLightShadow
,doc
="See `GetLightShadow` and `SetLightShadow`")
6402 MediumShadow
= property(GetMediumShadow
,SetMediumShadow
,doc
="See `GetMediumShadow` and `SetMediumShadow`")
6403 _gdi_
.Effects_swigregister(Effects
)
6405 #---------------------------------------------------------------------------
6407 CONTROL_DISABLED
= _gdi_
.CONTROL_DISABLED
6408 CONTROL_FOCUSED
= _gdi_
.CONTROL_FOCUSED
6409 CONTROL_PRESSED
= _gdi_
.CONTROL_PRESSED
6410 CONTROL_SPECIAL
= _gdi_
.CONTROL_SPECIAL
6411 CONTROL_ISDEFAULT
= _gdi_
.CONTROL_ISDEFAULT
6412 CONTROL_ISSUBMENU
= _gdi_
.CONTROL_ISSUBMENU
6413 CONTROL_EXPANDED
= _gdi_
.CONTROL_EXPANDED
6414 CONTROL_SIZEGRIP
= _gdi_
.CONTROL_SIZEGRIP
6415 CONTROL_CURRENT
= _gdi_
.CONTROL_CURRENT
6416 CONTROL_SELECTED
= _gdi_
.CONTROL_SELECTED
6417 CONTROL_CHECKED
= _gdi_
.CONTROL_CHECKED
6418 CONTROL_CHECKABLE
= _gdi_
.CONTROL_CHECKABLE
6419 CONTROL_UNDETERMINED
= _gdi_
.CONTROL_UNDETERMINED
6420 CONTROL_FLAGS_MASK
= _gdi_
.CONTROL_FLAGS_MASK
6421 CONTROL_DIRTY
= _gdi_
.CONTROL_DIRTY
6422 class SplitterRenderParams(object):
6424 This is just a simple struct used as a return value of
6425 `wx.RendererNative.GetSplitterParams` and contains some platform
6426 specific metrics about splitters.
6428 * widthSash: the width of the splitter sash.
6429 * border: the width of the border of the splitter window.
6430 * isHotSensitive: ``True`` if the splitter changes its
6431 appearance when the mouse is over it.
6435 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6436 __repr__
= _swig_repr
6437 def __init__(self
, *args
, **kwargs
):
6439 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
6441 This is just a simple struct used as a return value of
6442 `wx.RendererNative.GetSplitterParams` and contains some platform
6443 specific metrics about splitters.
6445 * widthSash: the width of the splitter sash.
6446 * border: the width of the border of the splitter window.
6447 * isHotSensitive: ``True`` if the splitter changes its
6448 appearance when the mouse is over it.
6452 _gdi_
.SplitterRenderParams_swiginit(self
,_gdi_
.new_SplitterRenderParams(*args
, **kwargs
))
6453 __swig_destroy__
= _gdi_
.delete_SplitterRenderParams
6454 __del__
= lambda self
: None;
6455 widthSash
= property(_gdi_
.SplitterRenderParams_widthSash_get
)
6456 border
= property(_gdi_
.SplitterRenderParams_border_get
)
6457 isHotSensitive
= property(_gdi_
.SplitterRenderParams_isHotSensitive_get
)
6458 _gdi_
.SplitterRenderParams_swigregister(SplitterRenderParams
)
6460 class HeaderButtonParams(object):
6461 """Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`"""
6462 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6463 __repr__
= _swig_repr
6464 def __init__(self
, *args
, **kwargs
):
6466 __init__(self) -> HeaderButtonParams
6468 Extra (optional) parameters for `wx.RendererNative.DrawHeaderButton`
6470 _gdi_
.HeaderButtonParams_swiginit(self
,_gdi_
.new_HeaderButtonParams(*args
, **kwargs
))
6471 __swig_destroy__
= _gdi_
.delete_HeaderButtonParams
6472 __del__
= lambda self
: None;
6473 m_arrowColour
= property(_gdi_
.HeaderButtonParams_m_arrowColour_get
, _gdi_
.HeaderButtonParams_m_arrowColour_set
)
6474 m_selectionColour
= property(_gdi_
.HeaderButtonParams_m_selectionColour_get
, _gdi_
.HeaderButtonParams_m_selectionColour_set
)
6475 m_labelText
= property(_gdi_
.HeaderButtonParams_m_labelText_get
, _gdi_
.HeaderButtonParams_m_labelText_set
)
6476 m_labelFont
= property(_gdi_
.HeaderButtonParams_m_labelFont_get
, _gdi_
.HeaderButtonParams_m_labelFont_set
)
6477 m_labelColour
= property(_gdi_
.HeaderButtonParams_m_labelColour_get
, _gdi_
.HeaderButtonParams_m_labelColour_set
)
6478 m_labelBitmap
= property(_gdi_
.HeaderButtonParams_m_labelBitmap_get
, _gdi_
.HeaderButtonParams_m_labelBitmap_set
)
6479 m_labelAlignment
= property(_gdi_
.HeaderButtonParams_m_labelAlignment_get
, _gdi_
.HeaderButtonParams_m_labelAlignment_set
)
6480 _gdi_
.HeaderButtonParams_swigregister(HeaderButtonParams
)
6482 HDR_SORT_ICON_NONE
= _gdi_
.HDR_SORT_ICON_NONE
6483 HDR_SORT_ICON_UP
= _gdi_
.HDR_SORT_ICON_UP
6484 HDR_SORT_ICON_DOWN
= _gdi_
.HDR_SORT_ICON_DOWN
6485 class RendererVersion(object):
6487 This simple struct represents the `wx.RendererNative` interface
6488 version and is only used as the return value of
6489 `wx.RendererNative.GetVersion`.
6491 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6492 __repr__
= _swig_repr
6493 def __init__(self
, *args
, **kwargs
):
6495 __init__(self, int version_, int age_) -> RendererVersion
6497 This simple struct represents the `wx.RendererNative` interface
6498 version and is only used as the return value of
6499 `wx.RendererNative.GetVersion`.
6501 _gdi_
.RendererVersion_swiginit(self
,_gdi_
.new_RendererVersion(*args
, **kwargs
))
6502 __swig_destroy__
= _gdi_
.delete_RendererVersion
6503 __del__
= lambda self
: None;
6504 Current_Version
= _gdi_
.RendererVersion_Current_Version
6505 Current_Age
= _gdi_
.RendererVersion_Current_Age
6506 def IsCompatible(*args
, **kwargs
):
6507 """IsCompatible(RendererVersion ver) -> bool"""
6508 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
6510 IsCompatible
= staticmethod(IsCompatible
)
6511 version
= property(_gdi_
.RendererVersion_version_get
)
6512 age
= property(_gdi_
.RendererVersion_age_get
)
6513 _gdi_
.RendererVersion_swigregister(RendererVersion
)
6515 def RendererVersion_IsCompatible(*args
, **kwargs
):
6516 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
6517 return _gdi_
.RendererVersion_IsCompatible(*args
, **kwargs
)
6519 class RendererNative(object):
6521 One of the design principles of wxWidgets is to use the native
6522 widgets on every platform in order to be as close as possible to
6523 the native look and feel on every platform. However there are
6524 still cases when some generic widgets are needed for various
6525 reasons, but it can sometimes take a lot of messy work to make
6526 them conform to the native LnF.
6528 The wx.RendererNative class is a collection of functions that have
6529 platform-specific implementations for drawing certain parts of
6530 genereic controls in ways that are as close to the native look as
6533 Note that each drawing function restores the `wx.DC` attributes if it
6534 changes them, so it is safe to assume that the same pen, brush and
6535 colours that were active before the call to this function are still in
6539 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6540 def __init__(self
): raise AttributeError, "No constructor defined"
6541 __repr__
= _swig_repr
6542 def DrawHeaderButton(*args
, **kwargs
):
6544 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6545 HeaderButtonParams params=None)
6547 Draw the header control button (such as what is used by `wx.ListCtrl`
6550 return _gdi_
.RendererNative_DrawHeaderButton(*args
, **kwargs
)
6552 def DrawHeaderButtonContents(*args
, **kwargs
):
6554 DrawHeaderButtonContents(self, Window win, DC dc, Rect rect, int flags=0, int sortArrow=HDR_SORT_ICON_NONE,
6555 HeaderButtonParams params=None)
6557 Draw the contents of a header control button, (label, sort
6558 arrows, etc.) Normally this is only called by `DrawHeaderButton`.
6560 return _gdi_
.RendererNative_DrawHeaderButtonContents(*args
, **kwargs
)
6562 def GetHeaderButtonHeight(*args
, **kwargs
):
6564 GetHeaderButtonHeight(self, Window win) -> int
6566 Returns the default height of a header button, either a fixed platform
6567 height if available, or a generic height based on the window's font.
6569 return _gdi_
.RendererNative_GetHeaderButtonHeight(*args
, **kwargs
)
6571 def DrawTreeItemButton(*args
, **kwargs
):
6573 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
6575 Draw the expanded/collapsed icon for a tree control item.
6577 return _gdi_
.RendererNative_DrawTreeItemButton(*args
, **kwargs
)
6579 def DrawSplitterBorder(*args
, **kwargs
):
6581 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
6583 Draw the border for a sash window: this border must be such that the
6584 sash drawn by `DrawSplitterSash` blends into it well.
6586 return _gdi_
.RendererNative_DrawSplitterBorder(*args
, **kwargs
)
6588 def DrawSplitterSash(*args
, **kwargs
):
6590 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
6593 Draw a sash. The orient parameter defines whether the sash should be
6594 vertical or horizontal and how the position should be interpreted.
6596 return _gdi_
.RendererNative_DrawSplitterSash(*args
, **kwargs
)
6598 def DrawComboBoxDropButton(*args
, **kwargs
):
6600 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
6602 Draw a button like the one used by `wx.ComboBox` to show a drop down
6603 window. The usual appearance is a downwards pointing arrow.
6605 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
6606 ``wx.CONTROL_CURRENT`` bits set.
6608 return _gdi_
.RendererNative_DrawComboBoxDropButton(*args
, **kwargs
)
6610 def DrawDropArrow(*args
, **kwargs
):
6612 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
6614 Draw a drop down arrow that is suitable for use outside a combo
6615 box. Arrow will have a transparent background.
6617 ``rect`` is not entirely filled by the arrow. Instead, you should use
6618 bounding rectangle of a drop down button which arrow matches the size
6619 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
6620 ``wx.CONTROL_CURRENT`` bit set.
6622 return _gdi_
.RendererNative_DrawDropArrow(*args
, **kwargs
)
6624 def DrawCheckBox(*args
, **kwargs
):
6626 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
6628 Draw a check button. Flags may use wx.CONTROL_CHECKED,
6629 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
6631 return _gdi_
.RendererNative_DrawCheckBox(*args
, **kwargs
)
6633 def DrawPushButton(*args
, **kwargs
):
6635 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
6637 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
6638 wx.CONTROL_ISDEFAULT
6640 return _gdi_
.RendererNative_DrawPushButton(*args
, **kwargs
)
6642 def DrawItemSelectionRect(*args
, **kwargs
):
6644 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
6646 Draw rectangle indicating that an item in e.g. a list control has been
6649 The flags parameter may be:
6651 ==================== ============================================
6652 wx.CONTROL_SELECTED item is selected, e.g. draw background
6653 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
6654 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
6655 background vs. grey otherwise
6656 ==================== ============================================
6659 return _gdi_
.RendererNative_DrawItemSelectionRect(*args
, **kwargs
)
6661 def GetSplitterParams(*args
, **kwargs
):
6663 GetSplitterParams(self, Window win) -> SplitterRenderParams
6665 Get the splitter parameters, see `wx.SplitterRenderParams`.
6667 return _gdi_
.RendererNative_GetSplitterParams(*args
, **kwargs
)
6669 def Get(*args
, **kwargs
):
6671 Get() -> RendererNative
6673 Return the currently used renderer
6675 return _gdi_
.RendererNative_Get(*args
, **kwargs
)
6677 Get
= staticmethod(Get
)
6678 def GetGeneric(*args
, **kwargs
):
6680 GetGeneric() -> RendererNative
6682 Return the generic implementation of the renderer. Under some
6683 platforms, this is the default renderer implementation, others have
6684 platform-specific default renderer which can be retrieved by calling
6685 `wx.RendererNative.GetDefault`.
6687 return _gdi_
.RendererNative_GetGeneric(*args
, **kwargs
)
6689 GetGeneric
= staticmethod(GetGeneric
)
6690 def GetDefault(*args
, **kwargs
):
6692 GetDefault() -> RendererNative
6694 Return the default (native) implementation for this platform -- this
6695 is also the one used by default but this may be changed by calling
6696 `wx.RendererNative.Set` in which case the return value of this method
6697 may be different from the return value of `wx.RendererNative.Get`.
6699 return _gdi_
.RendererNative_GetDefault(*args
, **kwargs
)
6701 GetDefault
= staticmethod(GetDefault
)
6702 def Set(*args
, **kwargs
):
6704 Set(RendererNative renderer) -> RendererNative
6706 Set the renderer to use, passing None reverts to using the default
6707 renderer. Returns the previous renderer used with Set or None.
6709 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
6711 Set
= staticmethod(Set
)
6712 def GetVersion(*args
, **kwargs
):
6714 GetVersion(self) -> RendererVersion
6716 Returns the version of the renderer. Will be used for ensuring
6717 compatibility of dynamically loaded renderers.
6719 return _gdi_
.RendererNative_GetVersion(*args
, **kwargs
)
6721 SplitterParams
= property(GetSplitterParams
,doc
="See `GetSplitterParams`")
6722 Version
= property(GetVersion
,doc
="See `GetVersion`")
6723 _gdi_
.RendererNative_swigregister(RendererNative
)
6725 def RendererNative_Get(*args
):
6727 RendererNative_Get() -> RendererNative
6729 Return the currently used renderer
6731 return _gdi_
.RendererNative_Get(*args
)
6733 def RendererNative_GetGeneric(*args
):
6735 RendererNative_GetGeneric() -> RendererNative
6737 Return the generic implementation of the renderer. Under some
6738 platforms, this is the default renderer implementation, others have
6739 platform-specific default renderer which can be retrieved by calling
6740 `wx.RendererNative.GetDefault`.
6742 return _gdi_
.RendererNative_GetGeneric(*args
)
6744 def RendererNative_GetDefault(*args
):
6746 RendererNative_GetDefault() -> RendererNative
6748 Return the default (native) implementation for this platform -- this
6749 is also the one used by default but this may be changed by calling
6750 `wx.RendererNative.Set` in which case the return value of this method
6751 may be different from the return value of `wx.RendererNative.Get`.
6753 return _gdi_
.RendererNative_GetDefault(*args
)
6755 def RendererNative_Set(*args
, **kwargs
):
6757 RendererNative_Set(RendererNative renderer) -> RendererNative
6759 Set the renderer to use, passing None reverts to using the default
6760 renderer. Returns the previous renderer used with Set or None.
6762 return _gdi_
.RendererNative_Set(*args
, **kwargs
)
6764 #---------------------------------------------------------------------------
6766 class PseudoDC(_core
.Object
):
6768 A PseudoDC is an object that can be used as if it were a `wx.DC`. All
6769 commands issued to the PseudoDC are stored in a list. You can then
6770 play these commands back to a real DC object using the DrawToDC
6771 method. Commands in the command list are indexed by ID. You can use
6772 this to clear the operations associated with a single ID and then
6773 re-draw the object associated with that ID.
6775 thisown
= property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
6776 __repr__
= _swig_repr
6777 def __init__(self
, *args
, **kwargs
):
6779 __init__(self) -> PseudoDC
6781 Constructs a new Pseudo device context for recording dc operations
6783 _gdi_
.PseudoDC_swiginit(self
,_gdi_
.new_PseudoDC(*args
, **kwargs
))
6784 def BeginDrawing(*args
, **kwargs
):
6788 Allows for optimization of drawing code on platforms that need it. On
6789 other platforms this is just an empty function and is harmless. To
6790 take advantage of this postential optimization simply enclose each
6791 group of calls to the drawing primitives within calls to
6792 `BeginDrawing` and `EndDrawing`.
6794 return _gdi_
.PseudoDC_BeginDrawing(*args
, **kwargs
)
6796 def EndDrawing(*args
, **kwargs
):
6800 Ends the group of drawing primitives started with `BeginDrawing`, and
6801 invokes whatever optimization is available for this DC type on the
6804 return _gdi_
.PseudoDC_EndDrawing(*args
, **kwargs
)
6806 __swig_destroy__
= _gdi_
.delete_PseudoDC
6807 __del__
= lambda self
: None;
6808 def RemoveAll(*args
, **kwargs
):
6812 Removes all objects and operations from the recorded list.
6814 return _gdi_
.PseudoDC_RemoveAll(*args
, **kwargs
)
6816 def GetLen(*args
, **kwargs
):
6820 Returns the number of operations in the recorded list.
6822 return _gdi_
.PseudoDC_GetLen(*args
, **kwargs
)
6824 def SetId(*args
, **kwargs
):
6828 Sets the id to be associated with subsequent operations.
6830 return _gdi_
.PseudoDC_SetId(*args
, **kwargs
)
6832 def ClearId(*args
, **kwargs
):
6834 ClearId(self, int id)
6836 Removes all operations associated with id so the object can be redrawn.
6838 return _gdi_
.PseudoDC_ClearId(*args
, **kwargs
)
6840 def RemoveId(*args
, **kwargs
):
6842 RemoveId(self, int id)
6844 Remove the object node (and all operations) associated with an id.
6846 return _gdi_
.PseudoDC_RemoveId(*args
, **kwargs
)
6848 def TranslateId(*args
, **kwargs
):
6850 TranslateId(self, int id, int dx, int dy)
6852 Translate the operations of id by dx,dy.
6854 return _gdi_
.PseudoDC_TranslateId(*args
, **kwargs
)
6856 def SetIdGreyedOut(*args
, **kwargs
):
6858 SetIdGreyedOut(self, int id, bool greyout=True)
6860 Set whether an object is drawn greyed out or not.
6862 return _gdi_
.PseudoDC_SetIdGreyedOut(*args
, **kwargs
)
6864 def GetIdGreyedOut(*args
, **kwargs
):
6866 GetIdGreyedOut(self, int id) -> bool
6868 Get whether an object is drawn greyed out or not.
6870 return _gdi_
.PseudoDC_GetIdGreyedOut(*args
, **kwargs
)
6872 def FindObjects(*args
, **kwargs
):
6874 FindObjects(self, int x, int y, int radius=1, wxColor bg=*wxWHITE) -> PyObject
6876 Returns a list of all the id's that draw a pixel with color
6877 not equal to bg within radius of (x,y).
6878 Returns an empty list if nothing is found. The list is in
6879 reverse drawing order so list[0] is the top id.
6881 return _gdi_
.PseudoDC_FindObjects(*args
, **kwargs
)
6883 def FindObjectsByBBox(*args
, **kwargs
):
6885 FindObjectsByBBox(self, int x, int y) -> PyObject
6887 Returns a list of all the id's whose bounding boxes include (x,y).
6888 Returns an empty list if nothing is found. The list is in
6889 reverse drawing order so list[0] is the top id.
6891 return _gdi_
.PseudoDC_FindObjectsByBBox(*args
, **kwargs
)
6893 def DrawIdToDC(*args
, **kwargs
):
6895 DrawIdToDC(self, int id, DC dc)
6897 Draw recorded operations of id to dc.
6899 return _gdi_
.PseudoDC_DrawIdToDC(*args
, **kwargs
)
6901 def SetIdBounds(*args
, **kwargs
):
6903 SetIdBounds(self, int id, Rect rect)
6905 Set the bounding rect of a given object. This will create
6906 an object node if one doesn't exist.
6908 return _gdi_
.PseudoDC_SetIdBounds(*args
, **kwargs
)
6910 def GetIdBounds(*args
, **kwargs
):
6912 GetIdBounds(self, int id) -> Rect
6914 Returns the bounding rectangle previouly set with SetIdBounds. If
6915 no bounds have been set, it returns wx.Rect(0,0,0,0).
6917 return _gdi_
.PseudoDC_GetIdBounds(*args
, **kwargs
)
6919 def DrawToDCClipped(*args
, **kwargs
):
6921 DrawToDCClipped(self, DC dc, Rect rect)
6923 Draws the recorded operations to dc unless the operation is known to
6926 return _gdi_
.PseudoDC_DrawToDCClipped(*args
, **kwargs
)
6928 def DrawToDCClippedRgn(*args
, **kwargs
):
6930 DrawToDCClippedRgn(self, DC dc, Region region)
6932 Draws the recorded operations to dc unless the operation is known to
6935 return _gdi_
.PseudoDC_DrawToDCClippedRgn(*args
, **kwargs
)
6937 def DrawToDC(*args
, **kwargs
):
6939 DrawToDC(self, DC dc)
6941 Draws the recorded operations to dc.
6943 return _gdi_
.PseudoDC_DrawToDC(*args
, **kwargs
)
6945 def FloodFill(*args
, **kwargs
):
6947 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
6949 Flood fills the device context starting from the given point, using
6950 the current brush colour, and using a style:
6952 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
6953 the given colour is encountered.
6955 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
6958 Returns False if the operation failed.
6960 Note: The present implementation for non-Windows platforms may fail to
6961 find colour borders if the pixels do not match the colour
6962 exactly. However the function will still return true.
6964 return _gdi_
.PseudoDC_FloodFill(*args
, **kwargs
)
6966 def FloodFillPoint(*args
, **kwargs
):
6968 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
6970 Flood fills the device context starting from the given point, using
6971 the current brush colour, and using a style:
6973 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
6974 the given colour is encountered.
6976 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
6979 Returns False if the operation failed.
6981 Note: The present implementation for non-Windows platforms may fail to
6982 find colour borders if the pixels do not match the colour
6983 exactly. However the function will still return true.
6985 return _gdi_
.PseudoDC_FloodFillPoint(*args
, **kwargs
)
6987 def DrawLine(*args
, **kwargs
):
6989 DrawLine(self, int x1, int y1, int x2, int y2)
6991 Draws a line from the first point to the second. The current pen is
6992 used for drawing the line. Note that the second point is *not* part of
6993 the line and is not drawn by this function (this is consistent with
6994 the behaviour of many other toolkits).
6996 return _gdi_
.PseudoDC_DrawLine(*args
, **kwargs
)
6998 def DrawLinePoint(*args
, **kwargs
):
7000 DrawLinePoint(self, Point pt1, Point pt2)
7002 Draws a line from the first point to the second. The current pen is
7003 used for drawing the line. Note that the second point is *not* part of
7004 the line and is not drawn by this function (this is consistent with
7005 the behaviour of many other toolkits).
7007 return _gdi_
.PseudoDC_DrawLinePoint(*args
, **kwargs
)
7009 def CrossHair(*args
, **kwargs
):
7011 CrossHair(self, int x, int y)
7013 Displays a cross hair using the current pen. This is a vertical and
7014 horizontal line the height and width of the window, centred on the
7017 return _gdi_
.PseudoDC_CrossHair(*args
, **kwargs
)
7019 def CrossHairPoint(*args
, **kwargs
):
7021 CrossHairPoint(self, Point pt)
7023 Displays a cross hair using the current pen. This is a vertical and
7024 horizontal line the height and width of the window, centred on the
7027 return _gdi_
.PseudoDC_CrossHairPoint(*args
, **kwargs
)
7029 def DrawArc(*args
, **kwargs
):
7031 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
7033 Draws an arc of a circle, centred on the *center* point (xc, yc), from
7034 the first point to the second. The current pen is used for the outline
7035 and the current brush for filling the shape.
7037 The arc is drawn in an anticlockwise direction from the start point to
7040 return _gdi_
.PseudoDC_DrawArc(*args
, **kwargs
)
7042 def DrawArcPoint(*args
, **kwargs
):
7044 DrawArcPoint(self, Point pt1, Point pt2, Point center)
7046 Draws an arc of a circle, centred on the *center* point (xc, yc), from
7047 the first point to the second. The current pen is used for the outline
7048 and the current brush for filling the shape.
7050 The arc is drawn in an anticlockwise direction from the start point to
7053 return _gdi_
.PseudoDC_DrawArcPoint(*args
, **kwargs
)
7055 def DrawCheckMark(*args
, **kwargs
):
7057 DrawCheckMark(self, int x, int y, int width, int height)
7059 Draws a check mark inside the given rectangle.
7061 return _gdi_
.PseudoDC_DrawCheckMark(*args
, **kwargs
)
7063 def DrawCheckMarkRect(*args
, **kwargs
):
7065 DrawCheckMarkRect(self, Rect rect)
7067 Draws a check mark inside the given rectangle.
7069 return _gdi_
.PseudoDC_DrawCheckMarkRect(*args
, **kwargs
)
7071 def DrawEllipticArc(*args
, **kwargs
):
7073 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
7075 Draws an arc of an ellipse, with the given rectangle defining the
7076 bounds of the ellipse. The current pen is used for drawing the arc and
7077 the current brush is used for drawing the pie.
7079 The *start* and *end* parameters specify the start and end of the arc
7080 relative to the three-o'clock position from the center of the
7081 rectangle. Angles are specified in degrees (360 is a complete
7082 circle). Positive values mean counter-clockwise motion. If start is
7083 equal to end, a complete ellipse will be drawn.
7085 return _gdi_
.PseudoDC_DrawEllipticArc(*args
, **kwargs
)
7087 def DrawEllipticArcPointSize(*args
, **kwargs
):
7089 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
7091 Draws an arc of an ellipse, with the given rectangle defining the
7092 bounds of the ellipse. The current pen is used for drawing the arc and
7093 the current brush is used for drawing the pie.
7095 The *start* and *end* parameters specify the start and end of the arc
7096 relative to the three-o'clock position from the center of the
7097 rectangle. Angles are specified in degrees (360 is a complete
7098 circle). Positive values mean counter-clockwise motion. If start is
7099 equal to end, a complete ellipse will be drawn.
7101 return _gdi_
.PseudoDC_DrawEllipticArcPointSize(*args
, **kwargs
)
7103 def DrawPoint(*args
, **kwargs
):
7105 DrawPoint(self, int x, int y)
7107 Draws a point using the current pen.
7109 return _gdi_
.PseudoDC_DrawPoint(*args
, **kwargs
)
7111 def DrawPointPoint(*args
, **kwargs
):
7113 DrawPointPoint(self, Point pt)
7115 Draws a point using the current pen.
7117 return _gdi_
.PseudoDC_DrawPointPoint(*args
, **kwargs
)
7119 def DrawRectangle(*args
, **kwargs
):
7121 DrawRectangle(self, int x, int y, int width, int height)
7123 Draws a rectangle with the given top left corner, and with the given
7124 size. The current pen is used for the outline and the current brush
7125 for filling the shape.
7127 return _gdi_
.PseudoDC_DrawRectangle(*args
, **kwargs
)
7129 def DrawRectangleRect(*args
, **kwargs
):
7131 DrawRectangleRect(self, Rect rect)
7133 Draws a rectangle with the given top left corner, and with the given
7134 size. The current pen is used for the outline and the current brush
7135 for filling the shape.
7137 return _gdi_
.PseudoDC_DrawRectangleRect(*args
, **kwargs
)
7139 def DrawRectanglePointSize(*args
, **kwargs
):
7141 DrawRectanglePointSize(self, Point pt, Size sz)
7143 Draws a rectangle with the given top left corner, and with the given
7144 size. The current pen is used for the outline and the current brush
7145 for filling the shape.
7147 return _gdi_
.PseudoDC_DrawRectanglePointSize(*args
, **kwargs
)
7149 def DrawRoundedRectangle(*args
, **kwargs
):
7151 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
7153 Draws a rectangle with the given top left corner, and with the given
7154 size. The corners are quarter-circles using the given radius. The
7155 current pen is used for the outline and the current brush for filling
7158 If radius is positive, the value is assumed to be the radius of the
7159 rounded corner. If radius is negative, the absolute value is assumed
7160 to be the proportion of the smallest dimension of the rectangle. This
7161 means that the corner can be a sensible size relative to the size of
7162 the rectangle, and also avoids the strange effects X produces when the
7163 corners are too big for the rectangle.
7165 return _gdi_
.PseudoDC_DrawRoundedRectangle(*args
, **kwargs
)
7167 def DrawRoundedRectangleRect(*args
, **kwargs
):
7169 DrawRoundedRectangleRect(self, Rect r, double radius)
7171 Draws a rectangle with the given top left corner, and with the given
7172 size. The corners are quarter-circles using the given radius. The
7173 current pen is used for the outline and the current brush for filling
7176 If radius is positive, the value is assumed to be the radius of the
7177 rounded corner. If radius is negative, the absolute value is assumed
7178 to be the proportion of the smallest dimension of the rectangle. This
7179 means that the corner can be a sensible size relative to the size of
7180 the rectangle, and also avoids the strange effects X produces when the
7181 corners are too big for the rectangle.
7183 return _gdi_
.PseudoDC_DrawRoundedRectangleRect(*args
, **kwargs
)
7185 def DrawRoundedRectanglePointSize(*args
, **kwargs
):
7187 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
7189 Draws a rectangle with the given top left corner, and with the given
7190 size. The corners are quarter-circles using the given radius. The
7191 current pen is used for the outline and the current brush for filling
7194 If radius is positive, the value is assumed to be the radius of the
7195 rounded corner. If radius is negative, the absolute value is assumed
7196 to be the proportion of the smallest dimension of the rectangle. This
7197 means that the corner can be a sensible size relative to the size of
7198 the rectangle, and also avoids the strange effects X produces when the
7199 corners are too big for the rectangle.
7201 return _gdi_
.PseudoDC_DrawRoundedRectanglePointSize(*args
, **kwargs
)
7203 def DrawCircle(*args
, **kwargs
):
7205 DrawCircle(self, int x, int y, int radius)
7207 Draws a circle with the given center point and radius. The current
7208 pen is used for the outline and the current brush for filling the
7211 return _gdi_
.PseudoDC_DrawCircle(*args
, **kwargs
)
7213 def DrawCirclePoint(*args
, **kwargs
):
7215 DrawCirclePoint(self, Point pt, int radius)
7217 Draws a circle with the given center point and radius. The current
7218 pen is used for the outline and the current brush for filling the
7221 return _gdi_
.PseudoDC_DrawCirclePoint(*args
, **kwargs
)
7223 def DrawEllipse(*args
, **kwargs
):
7225 DrawEllipse(self, int x, int y, int width, int height)
7227 Draws an ellipse contained in the specified rectangle. The current pen
7228 is used for the outline and the current brush for filling the shape.
7230 return _gdi_
.PseudoDC_DrawEllipse(*args
, **kwargs
)
7232 def DrawEllipseRect(*args
, **kwargs
):
7234 DrawEllipseRect(self, Rect rect)
7236 Draws an ellipse contained in the specified rectangle. The current pen
7237 is used for the outline and the current brush for filling the shape.
7239 return _gdi_
.PseudoDC_DrawEllipseRect(*args
, **kwargs
)
7241 def DrawEllipsePointSize(*args
, **kwargs
):
7243 DrawEllipsePointSize(self, Point pt, Size sz)
7245 Draws an ellipse contained in the specified rectangle. The current pen
7246 is used for the outline and the current brush for filling the shape.
7248 return _gdi_
.PseudoDC_DrawEllipsePointSize(*args
, **kwargs
)
7250 def DrawIcon(*args
, **kwargs
):
7252 DrawIcon(self, Icon icon, int x, int y)
7254 Draw an icon on the display (does nothing if the device context is
7255 PostScript). This can be the simplest way of drawing bitmaps on a
7258 return _gdi_
.PseudoDC_DrawIcon(*args
, **kwargs
)
7260 def DrawIconPoint(*args
, **kwargs
):
7262 DrawIconPoint(self, Icon icon, Point pt)
7264 Draw an icon on the display (does nothing if the device context is
7265 PostScript). This can be the simplest way of drawing bitmaps on a
7268 return _gdi_
.PseudoDC_DrawIconPoint(*args
, **kwargs
)
7270 def DrawBitmap(*args
, **kwargs
):
7272 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
7274 Draw a bitmap on the device context at the specified point. If
7275 *transparent* is true and the bitmap has a transparency mask, (or
7276 alpha channel on the platforms that support it) then the bitmap will
7277 be drawn transparently.
7279 return _gdi_
.PseudoDC_DrawBitmap(*args
, **kwargs
)
7281 def DrawBitmapPoint(*args
, **kwargs
):
7283 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
7285 Draw a bitmap on the device context at the specified point. If
7286 *transparent* is true and the bitmap has a transparency mask, (or
7287 alpha channel on the platforms that support it) then the bitmap will
7288 be drawn transparently.
7290 return _gdi_
.PseudoDC_DrawBitmapPoint(*args
, **kwargs
)
7292 def DrawText(*args
, **kwargs
):
7294 DrawText(self, String text, int x, int y)
7296 Draws a text string at the specified point, using the current text
7297 font, and the current text foreground and background colours.
7299 The coordinates refer to the top-left corner of the rectangle bounding
7300 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
7301 a text string, which can be used to position the text more precisely,
7302 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
7305 **NOTE**: under wxGTK the current logical function is used by this
7306 function but it is ignored by wxMSW. Thus, you should avoid using
7307 logical functions with this function in portable programs.
7309 return _gdi_
.PseudoDC_DrawText(*args
, **kwargs
)
7311 def DrawTextPoint(*args
, **kwargs
):
7313 DrawTextPoint(self, String text, Point pt)
7315 Draws a text string at the specified point, using the current text
7316 font, and the current text foreground and background colours.
7318 The coordinates refer to the top-left corner of the rectangle bounding
7319 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
7320 a text string, which can be used to position the text more precisely,
7321 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
7324 **NOTE**: under wxGTK the current logical function is used by this
7325 function but it is ignored by wxMSW. Thus, you should avoid using
7326 logical functions with this function in portable programs.
7328 return _gdi_
.PseudoDC_DrawTextPoint(*args
, **kwargs
)
7330 def DrawRotatedText(*args
, **kwargs
):
7332 DrawRotatedText(self, String text, int x, int y, double angle)
7334 Draws the text rotated by *angle* degrees, if supported by the platform.
7336 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
7337 function. In particular, a font different from ``wx.NORMAL_FONT``
7338 should be used as the it is not normally a TrueType
7339 font. ``wx.SWISS_FONT`` is an example of a font which is.
7341 return _gdi_
.PseudoDC_DrawRotatedText(*args
, **kwargs
)
7343 def DrawRotatedTextPoint(*args
, **kwargs
):
7345 DrawRotatedTextPoint(self, String text, Point pt, double angle)
7347 Draws the text rotated by *angle* degrees, if supported by the platform.
7349 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
7350 function. In particular, a font different from ``wx.NORMAL_FONT``
7351 should be used as the it is not normally a TrueType
7352 font. ``wx.SWISS_FONT`` is an example of a font which is.
7354 return _gdi_
.PseudoDC_DrawRotatedTextPoint(*args
, **kwargs
)
7356 def DrawLines(*args
, **kwargs
):
7358 DrawLines(self, List points, int xoffset=0, int yoffset=0)
7360 Draws lines using a sequence of `wx.Point` objects, adding the
7361 optional offset coordinate. The current pen is used for drawing the
7364 return _gdi_
.PseudoDC_DrawLines(*args
, **kwargs
)
7366 def DrawPolygon(*args
, **kwargs
):
7368 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
7369 int fillStyle=ODDEVEN_RULE)
7371 Draws a filled polygon using a sequence of `wx.Point` objects, adding
7372 the optional offset coordinate. The last argument specifies the fill
7373 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
7375 The current pen is used for drawing the outline, and the current brush
7376 for filling the shape. Using a transparent brush suppresses
7377 filling. Note that wxWidgets automatically closes the first and last
7380 return _gdi_
.PseudoDC_DrawPolygon(*args
, **kwargs
)
7382 def DrawLabel(*args
, **kwargs
):
7384 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
7387 Draw *text* within the specified rectangle, abiding by the alignment
7388 flags. Will additionally emphasize the character at *indexAccel* if
7391 return _gdi_
.PseudoDC_DrawLabel(*args
, **kwargs
)
7393 def DrawImageLabel(*args
, **kwargs
):
7395 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
7398 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
7399 drawing it) within the specified rectangle, abiding by the alignment
7400 flags. Will additionally emphasize the character at *indexAccel* if
7403 return _gdi_
.PseudoDC_DrawImageLabel(*args
, **kwargs
)
7405 def DrawSpline(*args
, **kwargs
):
7407 DrawSpline(self, List points)
7409 Draws a spline between all given control points, (a list of `wx.Point`
7410 objects) using the current pen. The spline is drawn using a series of
7411 lines, using an algorithm taken from the X drawing program 'XFIG'.
7413 return _gdi_
.PseudoDC_DrawSpline(*args
, **kwargs
)
7415 def Clear(*args
, **kwargs
):
7419 Clears the device context using the current background brush.
7421 return _gdi_
.PseudoDC_Clear(*args
, **kwargs
)
7423 def SetFont(*args
, **kwargs
):
7425 SetFont(self, Font font)
7427 Sets the current font for the DC. It must be a valid font, in
7428 particular you should not pass ``wx.NullFont`` to this method.
7430 return _gdi_
.PseudoDC_SetFont(*args
, **kwargs
)
7432 def SetPen(*args
, **kwargs
):
7434 SetPen(self, Pen pen)
7436 Sets the current pen for the DC.
7438 If the argument is ``wx.NullPen``, the current pen is selected out of the
7439 device context, and the original pen restored.
7441 return _gdi_
.PseudoDC_SetPen(*args
, **kwargs
)
7443 def SetBrush(*args
, **kwargs
):
7445 SetBrush(self, Brush brush)
7447 Sets the current brush for the DC.
7449 If the argument is ``wx.NullBrush``, the current brush is selected out
7450 of the device context, and the original brush restored, allowing the
7451 current brush to be destroyed safely.
7453 return _gdi_
.PseudoDC_SetBrush(*args
, **kwargs
)
7455 def SetBackground(*args
, **kwargs
):
7457 SetBackground(self, Brush brush)
7459 Sets the current background brush for the DC.
7461 return _gdi_
.PseudoDC_SetBackground(*args
, **kwargs
)
7463 def SetBackgroundMode(*args
, **kwargs
):
7465 SetBackgroundMode(self, int mode)
7467 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
7468 determines whether text will be drawn with a background colour or
7471 return _gdi_
.PseudoDC_SetBackgroundMode(*args
, **kwargs
)
7473 def SetPalette(*args
, **kwargs
):
7475 SetPalette(self, Palette palette)
7477 If this is a window DC or memory DC, assigns the given palette to the
7478 window or bitmap associated with the DC. If the argument is
7479 ``wx.NullPalette``, the current palette is selected out of the device
7480 context, and the original palette restored.
7482 return _gdi_
.PseudoDC_SetPalette(*args
, **kwargs
)
7484 def SetTextForeground(*args
, **kwargs
):
7486 SetTextForeground(self, Colour colour)
7488 Sets the current text foreground colour for the DC.
7490 return _gdi_
.PseudoDC_SetTextForeground(*args
, **kwargs
)
7492 def SetTextBackground(*args
, **kwargs
):
7494 SetTextBackground(self, Colour colour)
7496 Sets the current text background colour for the DC.
7498 return _gdi_
.PseudoDC_SetTextBackground(*args
, **kwargs
)
7500 def SetLogicalFunction(*args
, **kwargs
):
7502 SetLogicalFunction(self, int function)
7504 Sets the current logical function for the device context. This
7505 determines how a source pixel (from a pen or brush colour, combines
7506 with a destination pixel in the current device context.
7508 The possible values and their meaning in terms of source and
7509 destination pixel values are as follows:
7511 ================ ==========================
7513 wx.AND_INVERT (NOT src) AND dst
7514 wx.AND_REVERSE src AND (NOT dst)
7517 wx.EQUIV (NOT src) XOR dst
7519 wx.NAND (NOT src) OR (NOT dst)
7520 wx.NOR (NOT src) AND (NOT dst)
7523 wx.OR_INVERT (NOT src) OR dst
7524 wx.OR_REVERSE src OR (NOT dst)
7526 wx.SRC_INVERT NOT src
7528 ================ ==========================
7530 The default is wx.COPY, which simply draws with the current
7531 colour. The others combine the current colour and the background using
7532 a logical operation. wx.INVERT is commonly used for drawing rubber
7533 bands or moving outlines, since drawing twice reverts to the original
7537 return _gdi_
.PseudoDC_SetLogicalFunction(*args
, **kwargs
)
7539 IdBounds
= property(GetIdBounds
,SetIdBounds
,doc
="See `GetIdBounds` and `SetIdBounds`")
7540 Len
= property(GetLen
,doc
="See `GetLen`")
7541 _gdi_
.PseudoDC_swigregister(PseudoDC
)