]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/mac/_gdi.py
70eb01d0a2fb0a14891765c928906ecaf2d95356
[wxWidgets.git] / wxPython / src / mac / _gdi.py
1 # This file was created automatically by SWIG 1.3.29.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _gdi_
5 import new
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)
9 if (name == "this"):
10 if type(value).__name__ == 'PySwigObject':
11 self.__dict__[name] = value
12 return
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
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20 def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
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
28
29 def _swig_repr(self):
30 try: strthis = "proxy of " + self.this.__repr__()
31 except: strthis = ""
32 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
33
34 import types
35 try:
36 _object = types.ObjectType
37 _newclass = 1
38 except AttributeError:
39 class _object : pass
40 _newclass = 0
41 del types
42
43
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"):
48 set(self,name,value)
49 else:
50 raise AttributeError("You cannot add attributes to %s" % self)
51 return set_attr
52
53
54 import _core
55 wx = _core
56 #---------------------------------------------------------------------------
57
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')
61 __repr__ = _swig_repr
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)
70
71 _gdi_.GDIObject_swigregister(GDIObject)
72
73 #---------------------------------------------------------------------------
74
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):
81 """
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.
85
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
90 equivallent::
91
92 win.SetBackgroundColour(wxColour(0,0,255))
93 win.SetBackgroundColour('BLUE')
94 win.SetBackgroundColour('#0000FF')
95 win.SetBackgroundColour((0,0,255))
96
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`.
101
102 """
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):
106 """
107 __init__(self, byte red=0, byte green=0, byte blue=0, byte alpha=ALPHA_OPAQUE) -> Colour
108
109 Constructs a colour from red, green and blue values.
110
111 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
112
113 """
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):
118 """
119 Red(self) -> byte
120
121 Returns the red intensity.
122 """
123 return _gdi_.Colour_Red(*args, **kwargs)
124
125 def Green(*args, **kwargs):
126 """
127 Green(self) -> byte
128
129 Returns the green intensity.
130 """
131 return _gdi_.Colour_Green(*args, **kwargs)
132
133 def Blue(*args, **kwargs):
134 """
135 Blue(self) -> byte
136
137 Returns the blue intensity.
138 """
139 return _gdi_.Colour_Blue(*args, **kwargs)
140
141 def Alpha(*args, **kwargs):
142 """
143 Alpha(self) -> byte
144
145 Returns the Alpha value.
146 """
147 return _gdi_.Colour_Alpha(*args, **kwargs)
148
149 def Ok(*args, **kwargs):
150 """
151 Ok(self) -> bool
152
153 Returns True if the colour object is valid (the colour has been
154 initialised with RGB values).
155 """
156 return _gdi_.Colour_Ok(*args, **kwargs)
157
158 def Set(*args, **kwargs):
159 """
160 Set(self, byte red, byte green, byte blue, byte alpha=ALPHA_OPAQUE)
161
162 Sets the RGB intensity values.
163 """
164 return _gdi_.Colour_Set(*args, **kwargs)
165
166 def SetRGB(*args, **kwargs):
167 """
168 SetRGB(self, unsigned long colRGB)
169
170 Sets the RGB intensity values from a packed RGB value.
171 """
172 return _gdi_.Colour_SetRGB(*args, **kwargs)
173
174 def SetFromName(*args, **kwargs):
175 """
176 SetFromName(self, String colourName)
177
178 Sets the RGB intensity values using a colour name listed in
179 ``wx.TheColourDatabase``.
180 """
181 return _gdi_.Colour_SetFromName(*args, **kwargs)
182
183 def GetAsString(*args, **kwargs):
184 """
185 GetAsString(self, long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) -> String
186
187 Return the colour as a string. Acceptable flags are:
188
189 =================== ==================================
190 wx.C2S_NAME return colour name, when possible
191 wx.C2S_CSS_SYNTAX return colour in rgb(r,g,b) syntax
192 wx.C2S_HTML_SYNTAX return colour in #rrggbb syntax
193 =================== ==================================
194 """
195 return _gdi_.Colour_GetAsString(*args, **kwargs)
196
197 def GetPixel(*args, **kwargs):
198 """
199 GetPixel(self) -> long
200
201 Returns a pixel value which is platform-dependent. On Windows, a
202 COLORREF is returned. On X, an allocated pixel value is returned. -1
203 is returned if the pixel is invalid (on X, unallocated).
204 """
205 return _gdi_.Colour_GetPixel(*args, **kwargs)
206
207 def __eq__(*args, **kwargs):
208 """
209 __eq__(self, PyObject other) -> bool
210
211 Compare colours for equality.
212 """
213 return _gdi_.Colour___eq__(*args, **kwargs)
214
215 def __ne__(*args, **kwargs):
216 """
217 __ne__(self, PyObject other) -> bool
218
219 Compare colours for inequality.
220 """
221 return _gdi_.Colour___ne__(*args, **kwargs)
222
223 def Get(*args, **kwargs):
224 """
225 Get() -> (r, g, b)
226
227 Returns the RGB intensity values as a tuple.
228 """
229 return _gdi_.Colour_Get(*args, **kwargs)
230
231 def GetRGB(*args, **kwargs):
232 """
233 GetRGB(self) -> unsigned long
234
235 Return the colour as a packed RGB value
236 """
237 return _gdi_.Colour_GetRGB(*args, **kwargs)
238
239 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
240 def __str__(self): return str(self.Get(True))
241 def __repr__(self): return 'wx.Colour' + str(self.Get(True))
242 def __nonzero__(self): return self.Ok()
243 __safe_for_unpickling__ = True
244 def __reduce__(self): return (Colour, self.Get(True))
245
246 Pixel = property(GetPixel,doc="See `GetPixel`")
247 RGB = property(GetRGB,SetRGB,doc="See `GetRGB` and `SetRGB`")
248 _gdi_.Colour_swigregister(Colour)
249
250 def NamedColour(*args, **kwargs):
251 """
252 NamedColour(String colorName) -> Colour
253
254 Constructs a colour object using a colour name listed in
255 ``wx.TheColourDatabase``.
256 """
257 val = _gdi_.new_NamedColour(*args, **kwargs)
258 return val
259
260 def ColourRGB(*args, **kwargs):
261 """
262 ColourRGB(unsigned long colRGB) -> Colour
263
264 Constructs a colour from a packed RGB value.
265 """
266 val = _gdi_.new_ColourRGB(*args, **kwargs)
267 return val
268
269 Color = Colour
270 NamedColor = NamedColour
271 ColorRGB = ColourRGB
272
273 class Palette(GDIObject):
274 """Proxy of C++ Palette class"""
275 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
276 __repr__ = _swig_repr
277 def __init__(self, *args, **kwargs):
278 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
279 _gdi_.Palette_swiginit(self,_gdi_.new_Palette(*args, **kwargs))
280 __swig_destroy__ = _gdi_.delete_Palette
281 __del__ = lambda self : None;
282 def GetPixel(*args, **kwargs):
283 """GetPixel(self, byte red, byte green, byte blue) -> int"""
284 return _gdi_.Palette_GetPixel(*args, **kwargs)
285
286 def GetRGB(*args, **kwargs):
287 """GetRGB(self, int pixel) -> (R,G,B)"""
288 return _gdi_.Palette_GetRGB(*args, **kwargs)
289
290 def GetColoursCount(*args, **kwargs):
291 """GetColoursCount(self) -> int"""
292 return _gdi_.Palette_GetColoursCount(*args, **kwargs)
293
294 def Ok(*args, **kwargs):
295 """Ok(self) -> bool"""
296 return _gdi_.Palette_Ok(*args, **kwargs)
297
298 def __nonzero__(self): return self.Ok()
299 _gdi_.Palette_swigregister(Palette)
300
301 #---------------------------------------------------------------------------
302
303 class Pen(GDIObject):
304 """Proxy of C++ Pen class"""
305 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
306 __repr__ = _swig_repr
307 def __init__(self, *args, **kwargs):
308 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
309 _gdi_.Pen_swiginit(self,_gdi_.new_Pen(*args, **kwargs))
310 __swig_destroy__ = _gdi_.delete_Pen
311 __del__ = lambda self : None;
312 def GetCap(*args, **kwargs):
313 """GetCap(self) -> int"""
314 return _gdi_.Pen_GetCap(*args, **kwargs)
315
316 def GetColour(*args, **kwargs):
317 """GetColour(self) -> Colour"""
318 return _gdi_.Pen_GetColour(*args, **kwargs)
319
320 def GetJoin(*args, **kwargs):
321 """GetJoin(self) -> int"""
322 return _gdi_.Pen_GetJoin(*args, **kwargs)
323
324 def GetStyle(*args, **kwargs):
325 """GetStyle(self) -> int"""
326 return _gdi_.Pen_GetStyle(*args, **kwargs)
327
328 def GetWidth(*args, **kwargs):
329 """GetWidth(self) -> int"""
330 return _gdi_.Pen_GetWidth(*args, **kwargs)
331
332 def Ok(*args, **kwargs):
333 """Ok(self) -> bool"""
334 return _gdi_.Pen_Ok(*args, **kwargs)
335
336 def SetCap(*args, **kwargs):
337 """SetCap(self, int cap_style)"""
338 return _gdi_.Pen_SetCap(*args, **kwargs)
339
340 def SetColour(*args, **kwargs):
341 """SetColour(self, Colour colour)"""
342 return _gdi_.Pen_SetColour(*args, **kwargs)
343
344 def SetJoin(*args, **kwargs):
345 """SetJoin(self, int join_style)"""
346 return _gdi_.Pen_SetJoin(*args, **kwargs)
347
348 def SetStyle(*args, **kwargs):
349 """SetStyle(self, int style)"""
350 return _gdi_.Pen_SetStyle(*args, **kwargs)
351
352 def SetWidth(*args, **kwargs):
353 """SetWidth(self, int width)"""
354 return _gdi_.Pen_SetWidth(*args, **kwargs)
355
356 def SetDashes(*args, **kwargs):
357 """SetDashes(self, int dashes)"""
358 return _gdi_.Pen_SetDashes(*args, **kwargs)
359
360 def GetDashes(*args, **kwargs):
361 """GetDashes(self) -> PyObject"""
362 return _gdi_.Pen_GetDashes(*args, **kwargs)
363
364 def _SetDashes(*args, **kwargs):
365 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
366 return _gdi_.Pen__SetDashes(*args, **kwargs)
367
368 def SetDashes(self, dashes):
369 """
370 Associate a list of dash lengths with the Pen.
371 """
372 self._SetDashes(self, dashes)
373
374 def __eq__(*args, **kwargs):
375 """__eq__(self, Pen other) -> bool"""
376 return _gdi_.Pen___eq__(*args, **kwargs)
377
378 def __ne__(*args, **kwargs):
379 """__ne__(self, Pen other) -> bool"""
380 return _gdi_.Pen___ne__(*args, **kwargs)
381
382 def __nonzero__(self): return self.Ok()
383 _gdi_.Pen_swigregister(Pen)
384
385 #---------------------------------------------------------------------------
386
387 class Brush(GDIObject):
388 """
389 A brush is a drawing tool for filling in areas. It is used for
390 painting the background of rectangles, ellipses, etc. when drawing on
391 a `wx.DC`. It has a colour and a style.
392 """
393 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
394 __repr__ = _swig_repr
395 def __init__(self, *args, **kwargs):
396 """
397 __init__(self, Colour colour, int style=SOLID) -> Brush
398
399 Constructs a brush from a `wx.Colour` object and a style.
400 """
401 _gdi_.Brush_swiginit(self,_gdi_.new_Brush(*args, **kwargs))
402 __swig_destroy__ = _gdi_.delete_Brush
403 __del__ = lambda self : None;
404 def SetColour(*args, **kwargs):
405 """
406 SetColour(self, Colour col)
407
408 Set the brush's `wx.Colour`.
409 """
410 return _gdi_.Brush_SetColour(*args, **kwargs)
411
412 def SetStyle(*args, **kwargs):
413 """
414 SetStyle(self, int style)
415
416 Sets the style of the brush. See `__init__` for a listing of styles.
417 """
418 return _gdi_.Brush_SetStyle(*args, **kwargs)
419
420 def SetStipple(*args, **kwargs):
421 """
422 SetStipple(self, Bitmap stipple)
423
424 Sets the stipple `wx.Bitmap`.
425 """
426 return _gdi_.Brush_SetStipple(*args, **kwargs)
427
428 def GetColour(*args, **kwargs):
429 """
430 GetColour(self) -> Colour
431
432 Returns the `wx.Colour` of the brush.
433 """
434 return _gdi_.Brush_GetColour(*args, **kwargs)
435
436 def GetStyle(*args, **kwargs):
437 """
438 GetStyle(self) -> int
439
440 Returns the style of the brush. See `__init__` for a listing of
441 styles.
442 """
443 return _gdi_.Brush_GetStyle(*args, **kwargs)
444
445 def GetStipple(*args, **kwargs):
446 """
447 GetStipple(self) -> Bitmap
448
449 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
450 have a wx.STIPPLE style, then the return value may be non-None but an
451 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
452 """
453 return _gdi_.Brush_GetStipple(*args, **kwargs)
454
455 def IsHatch(*args, **kwargs):
456 """
457 IsHatch(self) -> bool
458
459 Is the current style a hatch type?
460 """
461 return _gdi_.Brush_IsHatch(*args, **kwargs)
462
463 def Ok(*args, **kwargs):
464 """
465 Ok(self) -> bool
466
467 Returns True if the brush is initialised and valid.
468 """
469 return _gdi_.Brush_Ok(*args, **kwargs)
470
471 def MacGetTheme(*args, **kwargs):
472 """MacGetTheme(self) -> short"""
473 return _gdi_.Brush_MacGetTheme(*args, **kwargs)
474
475 def MacSetTheme(*args, **kwargs):
476 """MacSetTheme(self, short macThemeBrush)"""
477 return _gdi_.Brush_MacSetTheme(*args, **kwargs)
478
479 def __nonzero__(self): return self.Ok()
480 Colour = property(GetColour,SetColour,doc="See `GetColour` and `SetColour`")
481 Stipple = property(GetStipple,SetStipple,doc="See `GetStipple` and `SetStipple`")
482 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
483 _gdi_.Brush_swigregister(Brush)
484
485 def BrushFromBitmap(*args, **kwargs):
486 """
487 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
488
489 Constructs a stippled brush using a bitmap.
490 """
491 val = _gdi_.new_BrushFromBitmap(*args, **kwargs)
492 return val
493
494 class Bitmap(GDIObject):
495 """
496 The wx.Bitmap class encapsulates the concept of a platform-dependent
497 bitmap. It can be either monochrome or colour, and either loaded from
498 a file or created dynamically. A bitmap can be selected into a memory
499 device context (instance of `wx.MemoryDC`). This enables the bitmap to
500 be copied to a window or memory device context using `wx.DC.Blit`, or
501 to be used as a drawing surface.
502 """
503 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
504 __repr__ = _swig_repr
505 def __init__(self, *args, **kwargs):
506 """
507 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
508
509 Loads a bitmap from a file.
510 """
511 _gdi_.Bitmap_swiginit(self,_gdi_.new_Bitmap(*args, **kwargs))
512 __swig_destroy__ = _gdi_.delete_Bitmap
513 __del__ = lambda self : None;
514 def Ok(*args, **kwargs):
515 """Ok(self) -> bool"""
516 return _gdi_.Bitmap_Ok(*args, **kwargs)
517
518 def GetWidth(*args, **kwargs):
519 """
520 GetWidth(self) -> int
521
522 Gets the width of the bitmap in pixels.
523 """
524 return _gdi_.Bitmap_GetWidth(*args, **kwargs)
525
526 def GetHeight(*args, **kwargs):
527 """
528 GetHeight(self) -> int
529
530 Gets the height of the bitmap in pixels.
531 """
532 return _gdi_.Bitmap_GetHeight(*args, **kwargs)
533
534 def GetDepth(*args, **kwargs):
535 """
536 GetDepth(self) -> int
537
538 Gets the colour depth of the bitmap. A value of 1 indicates a
539 monochrome bitmap.
540 """
541 return _gdi_.Bitmap_GetDepth(*args, **kwargs)
542
543 def GetSize(*args, **kwargs):
544 """
545 GetSize(self) -> Size
546
547 Get the size of the bitmap.
548 """
549 return _gdi_.Bitmap_GetSize(*args, **kwargs)
550
551 def ConvertToImage(*args, **kwargs):
552 """
553 ConvertToImage(self) -> Image
554
555 Creates a platform-independent image from a platform-dependent
556 bitmap. This preserves mask information so that bitmaps and images can
557 be converted back and forth without loss in that respect.
558 """
559 return _gdi_.Bitmap_ConvertToImage(*args, **kwargs)
560
561 def GetMask(*args, **kwargs):
562 """
563 GetMask(self) -> Mask
564
565 Gets the associated mask (if any) which may have been loaded from a
566 file or explpicitly set for the bitmap.
567
568 :see: `SetMask`, `wx.Mask`
569
570 """
571 return _gdi_.Bitmap_GetMask(*args, **kwargs)
572
573 def SetMask(*args, **kwargs):
574 """
575 SetMask(self, Mask mask)
576
577 Sets the mask for this bitmap.
578
579 :see: `GetMask`, `wx.Mask`
580
581 """
582 return _gdi_.Bitmap_SetMask(*args, **kwargs)
583
584 def SetMaskColour(*args, **kwargs):
585 """
586 SetMaskColour(self, Colour colour)
587
588 Create a Mask based on a specified colour in the Bitmap.
589 """
590 return _gdi_.Bitmap_SetMaskColour(*args, **kwargs)
591
592 def GetSubBitmap(*args, **kwargs):
593 """
594 GetSubBitmap(self, Rect rect) -> Bitmap
595
596 Returns a sub-bitmap of the current one as long as the rect belongs
597 entirely to the bitmap. This function preserves bit depth and mask
598 information.
599 """
600 return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs)
601
602 def SaveFile(*args, **kwargs):
603 """
604 SaveFile(self, String name, int type, Palette palette=None) -> bool
605
606 Saves a bitmap in the named file. See `__init__` for a description of
607 the ``type`` parameter.
608 """
609 return _gdi_.Bitmap_SaveFile(*args, **kwargs)
610
611 def LoadFile(*args, **kwargs):
612 """
613 LoadFile(self, String name, int type) -> bool
614
615 Loads a bitmap from a file. See `__init__` for a description of the
616 ``type`` parameter.
617 """
618 return _gdi_.Bitmap_LoadFile(*args, **kwargs)
619
620 def GetPalette(*args, **kwargs):
621 """GetPalette(self) -> Palette"""
622 return _gdi_.Bitmap_GetPalette(*args, **kwargs)
623
624 def CopyFromIcon(*args, **kwargs):
625 """CopyFromIcon(self, Icon icon) -> bool"""
626 return _gdi_.Bitmap_CopyFromIcon(*args, **kwargs)
627
628 def SetHeight(*args, **kwargs):
629 """
630 SetHeight(self, int height)
631
632 Set the height property (does not affect the existing bitmap data).
633 """
634 return _gdi_.Bitmap_SetHeight(*args, **kwargs)
635
636 def SetWidth(*args, **kwargs):
637 """
638 SetWidth(self, int width)
639
640 Set the width property (does not affect the existing bitmap data).
641 """
642 return _gdi_.Bitmap_SetWidth(*args, **kwargs)
643
644 def SetDepth(*args, **kwargs):
645 """
646 SetDepth(self, int depth)
647
648 Set the depth property (does not affect the existing bitmap data).
649 """
650 return _gdi_.Bitmap_SetDepth(*args, **kwargs)
651
652 def SetSize(*args, **kwargs):
653 """
654 SetSize(self, Size size)
655
656 Set the bitmap size (does not affect the existing bitmap data).
657 """
658 return _gdi_.Bitmap_SetSize(*args, **kwargs)
659
660 def __nonzero__(self): return self.Ok()
661 def __eq__(*args, **kwargs):
662 """__eq__(self, Bitmap other) -> bool"""
663 return _gdi_.Bitmap___eq__(*args, **kwargs)
664
665 def __ne__(*args, **kwargs):
666 """__ne__(self, Bitmap other) -> bool"""
667 return _gdi_.Bitmap___ne__(*args, **kwargs)
668
669 Depth = property(GetDepth,SetDepth,doc="See `GetDepth` and `SetDepth`")
670 Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`")
671 Mask = property(GetMask,SetMask,doc="See `GetMask` and `SetMask`")
672 Palette = property(GetPalette,doc="See `GetPalette`")
673 Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`")
674 SubBitmap = property(GetSubBitmap,doc="See `GetSubBitmap`")
675 Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
676 _gdi_.Bitmap_swigregister(Bitmap)
677
678 def EmptyBitmap(*args, **kwargs):
679 """
680 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
681
682 Creates a new bitmap of the given size. A depth of -1 indicates the
683 depth of the current screen or visual. Some platforms only support 1
684 for monochrome and -1 for the current display depth.
685 """
686 val = _gdi_.new_EmptyBitmap(*args, **kwargs)
687 return val
688
689 def BitmapFromIcon(*args, **kwargs):
690 """
691 BitmapFromIcon(Icon icon) -> Bitmap
692
693 Create a new bitmap from a `wx.Icon` object.
694 """
695 val = _gdi_.new_BitmapFromIcon(*args, **kwargs)
696 return val
697
698 def BitmapFromImage(*args, **kwargs):
699 """
700 BitmapFromImage(Image image, int depth=-1) -> Bitmap
701
702 Creates bitmap object from a `wx.Image`. This has to be done to
703 actually display a `wx.Image` as you cannot draw an image directly on
704 a window. The resulting bitmap will use the provided colour depth (or
705 that of the current screen colour depth if depth is -1) which entails
706 that a colour reduction may have to take place.
707 """
708 val = _gdi_.new_BitmapFromImage(*args, **kwargs)
709 return val
710
711 def BitmapFromXPMData(*args, **kwargs):
712 """
713 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
714
715 Construct a Bitmap from a list of strings formatted as XPM data.
716 """
717 val = _gdi_.new_BitmapFromXPMData(*args, **kwargs)
718 return val
719
720 def BitmapFromBits(*args, **kwargs):
721 """
722 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
723
724 Creates a bitmap from an array of bits. You should only use this
725 function for monochrome bitmaps (depth 1) in portable programs: in
726 this case the bits parameter should contain an XBM image. For other
727 bit depths, the behaviour is platform dependent.
728 """
729 val = _gdi_.new_BitmapFromBits(*args, **kwargs)
730 return val
731
732
733 def _BitmapFromBufferAlpha(*args, **kwargs):
734 """_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
735 return _gdi_._BitmapFromBufferAlpha(*args, **kwargs)
736
737 def _BitmapFromBuffer(*args, **kwargs):
738 """_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
739 return _gdi_._BitmapFromBuffer(*args, **kwargs)
740 def BitmapFromBuffer(width, height, dataBuffer, alphaBuffer=None):
741 """
742 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
743 parameter must be a Python object that implements the buffer
744 interface, such as a string, array, etc. The dataBuffer object is
745 expected to contain a series of RGB bytes and be width*height*3
746 bytes long. A buffer object can optionally be supplied for the
747 image's alpha channel data, and it is expected to be width*height
748 bytes long. On Windows the RGB values are 'premultiplied' by the
749 alpha values. (The other platforms do the multiplication
750 themselves.)
751
752 Unlike `wx.ImageFromBuffer` the bitmap created with this function
753 does not share the memory buffer with the buffer object. This is
754 because the native pixel buffer format varies on different
755 platforms, and so instead an efficient as possible copy of the
756 data is made from the buffer objects to the bitmap's native pixel
757 buffer. For direct access to a bitmap's pixel buffer see
758 `wx.NativePixelData` and `wx.AlphaPixelData`.
759
760 :see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
761 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
762 """
763 if alphaBuffer is not None:
764 return _gdi_._BitmapFromBufferAlpha(width, height, dataBuffer, alphaBuffer)
765 else:
766 return _gdi_._BitmapFromBuffer(width, height, dataBuffer)
767
768
769 def _BitmapFromBufferRGBA(*args, **kwargs):
770 """_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
771 return _gdi_._BitmapFromBufferRGBA(*args, **kwargs)
772 def BitmapFromBufferRGBA(width, height, dataBuffer):
773 """
774 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
775 parameter must be a Python object that implements the buffer
776 interface, such as a string, array, etc. The dataBuffer object is
777 expected to contain a series of RGBA bytes (red, green, blue and
778 alpha) and be width*height*4 bytes long. On Windows the RGB
779 values are 'premultiplied' by the alpha values. (The other
780 platforms do the multiplication themselves.)
781
782 Unlike `wx.ImageFromBuffer` the bitmap created with this function
783 does not share the memory buffer with the buffer object. This is
784 because the native pixel buffer format varies on different
785 platforms, and so instead an efficient as possible copy of the
786 data is made from the buffer object to the bitmap's native pixel
787 buffer. For direct access to a bitmap's pixel buffer see
788 `wx.NativePixelData` and `wx.AlphaPixelData`.
789
790 :see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
791 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
792 """
793 return _gdi_._BitmapFromBufferRGBA(width, height, dataBuffer)
794
795 class PixelDataBase(object):
796 """Proxy of C++ PixelDataBase class"""
797 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
798 def __init__(self): raise AttributeError, "No constructor defined"
799 __repr__ = _swig_repr
800 def GetOrigin(*args, **kwargs):
801 """GetOrigin(self) -> Point"""
802 return _gdi_.PixelDataBase_GetOrigin(*args, **kwargs)
803
804 def GetWidth(*args, **kwargs):
805 """GetWidth(self) -> int"""
806 return _gdi_.PixelDataBase_GetWidth(*args, **kwargs)
807
808 def GetHeight(*args, **kwargs):
809 """GetHeight(self) -> int"""
810 return _gdi_.PixelDataBase_GetHeight(*args, **kwargs)
811
812 def GetSize(*args, **kwargs):
813 """GetSize(self) -> Size"""
814 return _gdi_.PixelDataBase_GetSize(*args, **kwargs)
815
816 def GetRowStride(*args, **kwargs):
817 """GetRowStride(self) -> int"""
818 return _gdi_.PixelDataBase_GetRowStride(*args, **kwargs)
819
820 _gdi_.PixelDataBase_swigregister(PixelDataBase)
821
822 class NativePixelData(PixelDataBase):
823 """Proxy of C++ NativePixelData class"""
824 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
825 __repr__ = _swig_repr
826 def __init__(self, *args):
827 """
828 __init__(self, Bitmap bmp) -> NativePixelData
829 __init__(self, Bitmap bmp, Rect rect) -> NativePixelData
830 __init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
831 """
832 _gdi_.NativePixelData_swiginit(self,_gdi_.new_NativePixelData(*args))
833 __swig_destroy__ = _gdi_.delete_NativePixelData
834 __del__ = lambda self : None;
835 def GetPixels(*args, **kwargs):
836 """GetPixels(self) -> NativePixelData_Accessor"""
837 return _gdi_.NativePixelData_GetPixels(*args, **kwargs)
838
839 def UseAlpha(*args, **kwargs):
840 """UseAlpha(self)"""
841 return _gdi_.NativePixelData_UseAlpha(*args, **kwargs)
842
843 def __nonzero__(*args, **kwargs):
844 """__nonzero__(self) -> bool"""
845 return _gdi_.NativePixelData___nonzero__(*args, **kwargs)
846
847 def __iter__(self):
848 """
849 Create and return an iterator object for this pixel data
850 object. (It's really a generator but I won't tell if you
851 don't tell.)
852 """
853 width = self.GetWidth()
854 height = self.GetHeight()
855 pixels = self.GetPixels()
856
857
858
859
860 class PixelFacade(object):
861 def Get(self):
862 return pixels.Get()
863 def Set(self, *args, **kw):
864 return pixels.Set(*args, **kw)
865 def __str__(self):
866 return str(self.Get())
867 def __repr__(self):
868 return 'pixel(%d,%d): %s' % (x,y,self.Get())
869 X = property(lambda self: x)
870 Y = property(lambda self: y)
871
872 pf = PixelFacade()
873 for y in xrange(height):
874 for x in xrange(width):
875
876
877
878 yield pf
879 pixels.nextPixel()
880 pixels.MoveTo(self, 0, y)
881
882 Pixels = property(GetPixels,doc="See `GetPixels`")
883 _gdi_.NativePixelData_swigregister(NativePixelData)
884
885 class NativePixelData_Accessor(object):
886 """Proxy of C++ NativePixelData_Accessor class"""
887 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
888 __repr__ = _swig_repr
889 def __init__(self, *args):
890 """
891 __init__(self, NativePixelData data) -> NativePixelData_Accessor
892 __init__(self, Bitmap bmp, NativePixelData data) -> NativePixelData_Accessor
893 __init__(self) -> NativePixelData_Accessor
894 """
895 _gdi_.NativePixelData_Accessor_swiginit(self,_gdi_.new_NativePixelData_Accessor(*args))
896 __swig_destroy__ = _gdi_.delete_NativePixelData_Accessor
897 __del__ = lambda self : None;
898 def Reset(*args, **kwargs):
899 """Reset(self, NativePixelData data)"""
900 return _gdi_.NativePixelData_Accessor_Reset(*args, **kwargs)
901
902 def IsOk(*args, **kwargs):
903 """IsOk(self) -> bool"""
904 return _gdi_.NativePixelData_Accessor_IsOk(*args, **kwargs)
905
906 def nextPixel(*args, **kwargs):
907 """nextPixel(self)"""
908 return _gdi_.NativePixelData_Accessor_nextPixel(*args, **kwargs)
909
910 def Offset(*args, **kwargs):
911 """Offset(self, NativePixelData data, int x, int y)"""
912 return _gdi_.NativePixelData_Accessor_Offset(*args, **kwargs)
913
914 def OffsetX(*args, **kwargs):
915 """OffsetX(self, NativePixelData data, int x)"""
916 return _gdi_.NativePixelData_Accessor_OffsetX(*args, **kwargs)
917
918 def OffsetY(*args, **kwargs):
919 """OffsetY(self, NativePixelData data, int y)"""
920 return _gdi_.NativePixelData_Accessor_OffsetY(*args, **kwargs)
921
922 def MoveTo(*args, **kwargs):
923 """MoveTo(self, NativePixelData data, int x, int y)"""
924 return _gdi_.NativePixelData_Accessor_MoveTo(*args, **kwargs)
925
926 def Set(*args, **kwargs):
927 """Set(self, byte red, byte green, byte blue)"""
928 return _gdi_.NativePixelData_Accessor_Set(*args, **kwargs)
929
930 def Get(*args, **kwargs):
931 """Get(self) -> PyObject"""
932 return _gdi_.NativePixelData_Accessor_Get(*args, **kwargs)
933
934 _gdi_.NativePixelData_Accessor_swigregister(NativePixelData_Accessor)
935
936 class AlphaPixelData(PixelDataBase):
937 """Proxy of C++ AlphaPixelData class"""
938 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
939 __repr__ = _swig_repr
940 def __init__(self, *args):
941 """
942 __init__(self, Bitmap bmp) -> AlphaPixelData
943 __init__(self, Bitmap bmp, Rect rect) -> AlphaPixelData
944 __init__(self, Bitmap bmp, Point pt, Size sz) -> AlphaPixelData
945 """
946 _gdi_.AlphaPixelData_swiginit(self,_gdi_.new_AlphaPixelData(*args))
947 self.UseAlpha()
948
949 __swig_destroy__ = _gdi_.delete_AlphaPixelData
950 __del__ = lambda self : None;
951 def GetPixels(*args, **kwargs):
952 """GetPixels(self) -> AlphaPixelData_Accessor"""
953 return _gdi_.AlphaPixelData_GetPixels(*args, **kwargs)
954
955 def UseAlpha(*args, **kwargs):
956 """UseAlpha(self)"""
957 return _gdi_.AlphaPixelData_UseAlpha(*args, **kwargs)
958
959 def __nonzero__(*args, **kwargs):
960 """__nonzero__(self) -> bool"""
961 return _gdi_.AlphaPixelData___nonzero__(*args, **kwargs)
962
963 def __iter__(self):
964 """
965 Create and return an iterator object for this pixel data
966 object. (It's really a generator but I won't tell if you
967 don't tell.)
968 """
969 width = self.GetWidth()
970 height = self.GetHeight()
971 pixels = self.GetPixels()
972
973
974
975
976 class PixelFacade(object):
977 def Get(self):
978 return pixels.Get()
979 def Set(self, *args, **kw):
980 return pixels.Set(*args, **kw)
981 def __str__(self):
982 return str(self.Get())
983 def __repr__(self):
984 return 'pixel(%d,%d): %s' % (x,y,self.Get())
985 X = property(lambda self: x)
986 Y = property(lambda self: y)
987
988 pf = PixelFacade()
989 for y in xrange(height):
990 for x in xrange(width):
991
992
993
994 yield pf
995 pixels.nextPixel()
996 pixels.MoveTo(self, 0, y)
997
998 Pixels = property(GetPixels,doc="See `GetPixels`")
999 _gdi_.AlphaPixelData_swigregister(AlphaPixelData)
1000
1001 class AlphaPixelData_Accessor(object):
1002 """Proxy of C++ AlphaPixelData_Accessor class"""
1003 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1004 __repr__ = _swig_repr
1005 def __init__(self, *args):
1006 """
1007 __init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
1008 __init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
1009 __init__(self) -> AlphaPixelData_Accessor
1010 """
1011 _gdi_.AlphaPixelData_Accessor_swiginit(self,_gdi_.new_AlphaPixelData_Accessor(*args))
1012 __swig_destroy__ = _gdi_.delete_AlphaPixelData_Accessor
1013 __del__ = lambda self : None;
1014 def Reset(*args, **kwargs):
1015 """Reset(self, AlphaPixelData data)"""
1016 return _gdi_.AlphaPixelData_Accessor_Reset(*args, **kwargs)
1017
1018 def IsOk(*args, **kwargs):
1019 """IsOk(self) -> bool"""
1020 return _gdi_.AlphaPixelData_Accessor_IsOk(*args, **kwargs)
1021
1022 def nextPixel(*args, **kwargs):
1023 """nextPixel(self)"""
1024 return _gdi_.AlphaPixelData_Accessor_nextPixel(*args, **kwargs)
1025
1026 def Offset(*args, **kwargs):
1027 """Offset(self, AlphaPixelData data, int x, int y)"""
1028 return _gdi_.AlphaPixelData_Accessor_Offset(*args, **kwargs)
1029
1030 def OffsetX(*args, **kwargs):
1031 """OffsetX(self, AlphaPixelData data, int x)"""
1032 return _gdi_.AlphaPixelData_Accessor_OffsetX(*args, **kwargs)
1033
1034 def OffsetY(*args, **kwargs):
1035 """OffsetY(self, AlphaPixelData data, int y)"""
1036 return _gdi_.AlphaPixelData_Accessor_OffsetY(*args, **kwargs)
1037
1038 def MoveTo(*args, **kwargs):
1039 """MoveTo(self, AlphaPixelData data, int x, int y)"""
1040 return _gdi_.AlphaPixelData_Accessor_MoveTo(*args, **kwargs)
1041
1042 def Set(*args, **kwargs):
1043 """Set(self, byte red, byte green, byte blue, byte alpha)"""
1044 return _gdi_.AlphaPixelData_Accessor_Set(*args, **kwargs)
1045
1046 def Get(*args, **kwargs):
1047 """Get(self) -> PyObject"""
1048 return _gdi_.AlphaPixelData_Accessor_Get(*args, **kwargs)
1049
1050 _gdi_.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor)
1051
1052 class Mask(_core.Object):
1053 """
1054 This class encapsulates a monochrome mask bitmap, where the masked
1055 area is black and the unmasked area is white. When associated with a
1056 bitmap and drawn in a device context, the unmasked area of the bitmap
1057 will be drawn, and the masked area will not be drawn.
1058
1059 A mask may be associated with a `wx.Bitmap`. It is used in
1060 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
1061 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
1062 mask.
1063 """
1064 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1065 __repr__ = _swig_repr
1066 def __init__(self, *args, **kwargs):
1067 """
1068 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
1069
1070 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
1071 that indicates the transparent portions of the mask. In other words,
1072 the pixels in ``bitmap`` that match ``colour`` will be the transparent
1073 portions of the mask. If no ``colour`` or an invalid ``colour`` is
1074 passed then BLACK is used.
1075
1076 :see: `wx.Bitmap`, `wx.Colour`
1077 """
1078 _gdi_.Mask_swiginit(self,_gdi_.new_Mask(*args, **kwargs))
1079 __swig_destroy__ = _gdi_.delete_Mask
1080 __del__ = lambda self : None;
1081 _gdi_.Mask_swigregister(Mask)
1082
1083 MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
1084 class Icon(GDIObject):
1085 """Proxy of C++ Icon class"""
1086 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1087 __repr__ = _swig_repr
1088 def __init__(self, *args, **kwargs):
1089 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
1090 _gdi_.Icon_swiginit(self,_gdi_.new_Icon(*args, **kwargs))
1091 __swig_destroy__ = _gdi_.delete_Icon
1092 __del__ = lambda self : None;
1093 def Ok(*args, **kwargs):
1094 """Ok(self) -> bool"""
1095 return _gdi_.Icon_Ok(*args, **kwargs)
1096
1097 def GetWidth(*args, **kwargs):
1098 """GetWidth(self) -> int"""
1099 return _gdi_.Icon_GetWidth(*args, **kwargs)
1100
1101 def GetHeight(*args, **kwargs):
1102 """GetHeight(self) -> int"""
1103 return _gdi_.Icon_GetHeight(*args, **kwargs)
1104
1105 def GetDepth(*args, **kwargs):
1106 """GetDepth(self) -> int"""
1107 return _gdi_.Icon_GetDepth(*args, **kwargs)
1108
1109 def SetWidth(*args, **kwargs):
1110 """SetWidth(self, int w)"""
1111 return _gdi_.Icon_SetWidth(*args, **kwargs)
1112
1113 def SetHeight(*args, **kwargs):
1114 """SetHeight(self, int h)"""
1115 return _gdi_.Icon_SetHeight(*args, **kwargs)
1116
1117 def SetDepth(*args, **kwargs):
1118 """SetDepth(self, int d)"""
1119 return _gdi_.Icon_SetDepth(*args, **kwargs)
1120
1121 def CopyFromBitmap(*args, **kwargs):
1122 """CopyFromBitmap(self, Bitmap bmp)"""
1123 return _gdi_.Icon_CopyFromBitmap(*args, **kwargs)
1124
1125 def __nonzero__(self): return self.Ok()
1126 Depth = property(GetDepth,SetDepth,doc="See `GetDepth` and `SetDepth`")
1127 Height = property(GetHeight,SetHeight,doc="See `GetHeight` and `SetHeight`")
1128 Width = property(GetWidth,SetWidth,doc="See `GetWidth` and `SetWidth`")
1129 _gdi_.Icon_swigregister(Icon)
1130
1131 def EmptyIcon(*args, **kwargs):
1132 """EmptyIcon() -> Icon"""
1133 val = _gdi_.new_EmptyIcon(*args, **kwargs)
1134 return val
1135
1136 def IconFromLocation(*args, **kwargs):
1137 """IconFromLocation(IconLocation loc) -> Icon"""
1138 val = _gdi_.new_IconFromLocation(*args, **kwargs)
1139 return val
1140
1141 def IconFromBitmap(*args, **kwargs):
1142 """IconFromBitmap(Bitmap bmp) -> Icon"""
1143 val = _gdi_.new_IconFromBitmap(*args, **kwargs)
1144 return val
1145
1146 def IconFromXPMData(*args, **kwargs):
1147 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
1148 val = _gdi_.new_IconFromXPMData(*args, **kwargs)
1149 return val
1150
1151 class IconLocation(object):
1152 """Proxy of C++ IconLocation class"""
1153 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1154 __repr__ = _swig_repr
1155 def __init__(self, *args, **kwargs):
1156 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
1157 _gdi_.IconLocation_swiginit(self,_gdi_.new_IconLocation(*args, **kwargs))
1158 __swig_destroy__ = _gdi_.delete_IconLocation
1159 __del__ = lambda self : None;
1160 def IsOk(*args, **kwargs):
1161 """IsOk(self) -> bool"""
1162 return _gdi_.IconLocation_IsOk(*args, **kwargs)
1163
1164 def __nonzero__(self): return self.Ok()
1165 def SetFileName(*args, **kwargs):
1166 """SetFileName(self, String filename)"""
1167 return _gdi_.IconLocation_SetFileName(*args, **kwargs)
1168
1169 def GetFileName(*args, **kwargs):
1170 """GetFileName(self) -> String"""
1171 return _gdi_.IconLocation_GetFileName(*args, **kwargs)
1172
1173 def SetIndex(*args, **kwargs):
1174 """SetIndex(self, int num)"""
1175 return _gdi_.IconLocation_SetIndex(*args, **kwargs)
1176
1177 def GetIndex(*args, **kwargs):
1178 """GetIndex(self) -> int"""
1179 return _gdi_.IconLocation_GetIndex(*args, **kwargs)
1180
1181 FileName = property(GetFileName,SetFileName,doc="See `GetFileName` and `SetFileName`")
1182 Index = property(GetIndex,SetIndex,doc="See `GetIndex` and `SetIndex`")
1183 _gdi_.IconLocation_swigregister(IconLocation)
1184
1185 class IconBundle(object):
1186 """Proxy of C++ IconBundle class"""
1187 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1188 __repr__ = _swig_repr
1189 def __init__(self, *args, **kwargs):
1190 """__init__(self) -> IconBundle"""
1191 _gdi_.IconBundle_swiginit(self,_gdi_.new_IconBundle(*args, **kwargs))
1192 __swig_destroy__ = _gdi_.delete_IconBundle
1193 __del__ = lambda self : None;
1194 def AddIcon(*args, **kwargs):
1195 """AddIcon(self, Icon icon)"""
1196 return _gdi_.IconBundle_AddIcon(*args, **kwargs)
1197
1198 def AddIconFromFile(*args, **kwargs):
1199 """AddIconFromFile(self, String file, long type)"""
1200 return _gdi_.IconBundle_AddIconFromFile(*args, **kwargs)
1201
1202 def GetIcon(*args, **kwargs):
1203 """GetIcon(self, Size size) -> Icon"""
1204 return _gdi_.IconBundle_GetIcon(*args, **kwargs)
1205
1206 Icon = property(GetIcon,doc="See `GetIcon`")
1207 _gdi_.IconBundle_swigregister(IconBundle)
1208
1209 def IconBundleFromFile(*args, **kwargs):
1210 """IconBundleFromFile(String file, long type) -> IconBundle"""
1211 val = _gdi_.new_IconBundleFromFile(*args, **kwargs)
1212 return val
1213
1214 def IconBundleFromIcon(*args, **kwargs):
1215 """IconBundleFromIcon(Icon icon) -> IconBundle"""
1216 val = _gdi_.new_IconBundleFromIcon(*args, **kwargs)
1217 return val
1218
1219 class Cursor(GDIObject):
1220 """
1221 A cursor is a small bitmap usually used for denoting where the mouse
1222 pointer is, with a picture that might indicate the interpretation of a
1223 mouse click.
1224
1225 A single cursor object may be used in many windows (any subwindow
1226 type). The wxWindows convention is to set the cursor for a window, as
1227 in X, rather than to set it globally as in MS Windows, although a
1228 global `wx.SetCursor` function is also available for use on MS Windows.
1229
1230 """
1231 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1232 __repr__ = _swig_repr
1233 def __init__(self, *args, **kwargs):
1234 """
1235 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
1236
1237 Construct a Cursor from a file. Specify the type of file using
1238 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
1239 file.
1240 """
1241 _gdi_.Cursor_swiginit(self,_gdi_.new_Cursor(*args, **kwargs))
1242 __swig_destroy__ = _gdi_.delete_Cursor
1243 __del__ = lambda self : None;
1244 def Ok(*args, **kwargs):
1245 """Ok(self) -> bool"""
1246 return _gdi_.Cursor_Ok(*args, **kwargs)
1247
1248 def __nonzero__(self): return self.Ok()
1249 _gdi_.Cursor_swigregister(Cursor)
1250
1251 def StockCursor(*args, **kwargs):
1252 """
1253 StockCursor(int id) -> Cursor
1254
1255 Create a cursor using one of the stock cursors. Note that not all
1256 stock cursors are available on all platforms.
1257 """
1258 val = _gdi_.new_StockCursor(*args, **kwargs)
1259 return val
1260
1261 def CursorFromImage(*args, **kwargs):
1262 """
1263 CursorFromImage(Image image) -> Cursor
1264
1265 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
1266 for setting the transparent portions of the cursor.
1267 """
1268 val = _gdi_.new_CursorFromImage(*args, **kwargs)
1269 return val
1270
1271 #---------------------------------------------------------------------------
1272
1273 OutRegion = _gdi_.OutRegion
1274 PartRegion = _gdi_.PartRegion
1275 InRegion = _gdi_.InRegion
1276 class Region(GDIObject):
1277 """Proxy of C++ Region class"""
1278 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1279 __repr__ = _swig_repr
1280 def __init__(self, *args, **kwargs):
1281 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
1282 _gdi_.Region_swiginit(self,_gdi_.new_Region(*args, **kwargs))
1283 __swig_destroy__ = _gdi_.delete_Region
1284 __del__ = lambda self : None;
1285 def Clear(*args, **kwargs):
1286 """Clear(self)"""
1287 return _gdi_.Region_Clear(*args, **kwargs)
1288
1289 def Offset(*args, **kwargs):
1290 """Offset(self, int x, int y) -> bool"""
1291 return _gdi_.Region_Offset(*args, **kwargs)
1292
1293 def Contains(*args, **kwargs):
1294 """Contains(self, int x, int y) -> int"""
1295 return _gdi_.Region_Contains(*args, **kwargs)
1296
1297 def ContainsPoint(*args, **kwargs):
1298 """ContainsPoint(self, Point pt) -> int"""
1299 return _gdi_.Region_ContainsPoint(*args, **kwargs)
1300
1301 def ContainsRect(*args, **kwargs):
1302 """ContainsRect(self, Rect rect) -> int"""
1303 return _gdi_.Region_ContainsRect(*args, **kwargs)
1304
1305 def ContainsRectDim(*args, **kwargs):
1306 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
1307 return _gdi_.Region_ContainsRectDim(*args, **kwargs)
1308
1309 def GetBox(*args, **kwargs):
1310 """GetBox(self) -> Rect"""
1311 return _gdi_.Region_GetBox(*args, **kwargs)
1312
1313 def Intersect(*args, **kwargs):
1314 """Intersect(self, int x, int y, int width, int height) -> bool"""
1315 return _gdi_.Region_Intersect(*args, **kwargs)
1316
1317 def IntersectRect(*args, **kwargs):
1318 """IntersectRect(self, Rect rect) -> bool"""
1319 return _gdi_.Region_IntersectRect(*args, **kwargs)
1320
1321 def IntersectRegion(*args, **kwargs):
1322 """IntersectRegion(self, Region region) -> bool"""
1323 return _gdi_.Region_IntersectRegion(*args, **kwargs)
1324
1325 def IsEmpty(*args, **kwargs):
1326 """IsEmpty(self) -> bool"""
1327 return _gdi_.Region_IsEmpty(*args, **kwargs)
1328
1329 def Union(*args, **kwargs):
1330 """Union(self, int x, int y, int width, int height) -> bool"""
1331 return _gdi_.Region_Union(*args, **kwargs)
1332
1333 def UnionRect(*args, **kwargs):
1334 """UnionRect(self, Rect rect) -> bool"""
1335 return _gdi_.Region_UnionRect(*args, **kwargs)
1336
1337 def UnionRegion(*args, **kwargs):
1338 """UnionRegion(self, Region region) -> bool"""
1339 return _gdi_.Region_UnionRegion(*args, **kwargs)
1340
1341 def Subtract(*args, **kwargs):
1342 """Subtract(self, int x, int y, int width, int height) -> bool"""
1343 return _gdi_.Region_Subtract(*args, **kwargs)
1344
1345 def SubtractRect(*args, **kwargs):
1346 """SubtractRect(self, Rect rect) -> bool"""
1347 return _gdi_.Region_SubtractRect(*args, **kwargs)
1348
1349 def SubtractRegion(*args, **kwargs):
1350 """SubtractRegion(self, Region region) -> bool"""
1351 return _gdi_.Region_SubtractRegion(*args, **kwargs)
1352
1353 def Xor(*args, **kwargs):
1354 """Xor(self, int x, int y, int width, int height) -> bool"""
1355 return _gdi_.Region_Xor(*args, **kwargs)
1356
1357 def XorRect(*args, **kwargs):
1358 """XorRect(self, Rect rect) -> bool"""
1359 return _gdi_.Region_XorRect(*args, **kwargs)
1360
1361 def XorRegion(*args, **kwargs):
1362 """XorRegion(self, Region region) -> bool"""
1363 return _gdi_.Region_XorRegion(*args, **kwargs)
1364
1365 def ConvertToBitmap(*args, **kwargs):
1366 """ConvertToBitmap(self) -> Bitmap"""
1367 return _gdi_.Region_ConvertToBitmap(*args, **kwargs)
1368
1369 def UnionBitmap(*args, **kwargs):
1370 """UnionBitmap(self, Bitmap bmp) -> bool"""
1371 return _gdi_.Region_UnionBitmap(*args, **kwargs)
1372
1373 def UnionBitmapColour(*args, **kwargs):
1374 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1375 return _gdi_.Region_UnionBitmapColour(*args, **kwargs)
1376
1377 _gdi_.Region_swigregister(Region)
1378
1379 def RegionFromBitmap(*args, **kwargs):
1380 """RegionFromBitmap(Bitmap bmp) -> Region"""
1381 val = _gdi_.new_RegionFromBitmap(*args, **kwargs)
1382 return val
1383
1384 def RegionFromBitmapColour(*args, **kwargs):
1385 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1386 val = _gdi_.new_RegionFromBitmapColour(*args, **kwargs)
1387 return val
1388
1389 def RegionFromPoints(*args, **kwargs):
1390 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
1391 val = _gdi_.new_RegionFromPoints(*args, **kwargs)
1392 return val
1393
1394 class RegionIterator(_core.Object):
1395 """Proxy of C++ RegionIterator class"""
1396 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1397 __repr__ = _swig_repr
1398 def __init__(self, *args, **kwargs):
1399 """__init__(self, Region region) -> RegionIterator"""
1400 _gdi_.RegionIterator_swiginit(self,_gdi_.new_RegionIterator(*args, **kwargs))
1401 __swig_destroy__ = _gdi_.delete_RegionIterator
1402 __del__ = lambda self : None;
1403 def GetX(*args, **kwargs):
1404 """GetX(self) -> int"""
1405 return _gdi_.RegionIterator_GetX(*args, **kwargs)
1406
1407 def GetY(*args, **kwargs):
1408 """GetY(self) -> int"""
1409 return _gdi_.RegionIterator_GetY(*args, **kwargs)
1410
1411 def GetW(*args, **kwargs):
1412 """GetW(self) -> int"""
1413 return _gdi_.RegionIterator_GetW(*args, **kwargs)
1414
1415 def GetWidth(*args, **kwargs):
1416 """GetWidth(self) -> int"""
1417 return _gdi_.RegionIterator_GetWidth(*args, **kwargs)
1418
1419 def GetH(*args, **kwargs):
1420 """GetH(self) -> int"""
1421 return _gdi_.RegionIterator_GetH(*args, **kwargs)
1422
1423 def GetHeight(*args, **kwargs):
1424 """GetHeight(self) -> int"""
1425 return _gdi_.RegionIterator_GetHeight(*args, **kwargs)
1426
1427 def GetRect(*args, **kwargs):
1428 """GetRect(self) -> Rect"""
1429 return _gdi_.RegionIterator_GetRect(*args, **kwargs)
1430
1431 def HaveRects(*args, **kwargs):
1432 """HaveRects(self) -> bool"""
1433 return _gdi_.RegionIterator_HaveRects(*args, **kwargs)
1434
1435 def Reset(*args, **kwargs):
1436 """Reset(self)"""
1437 return _gdi_.RegionIterator_Reset(*args, **kwargs)
1438
1439 def Next(*args, **kwargs):
1440 """Next(self)"""
1441 return _gdi_.RegionIterator_Next(*args, **kwargs)
1442
1443 def __nonzero__(*args, **kwargs):
1444 """__nonzero__(self) -> bool"""
1445 return _gdi_.RegionIterator___nonzero__(*args, **kwargs)
1446
1447 _gdi_.RegionIterator_swigregister(RegionIterator)
1448
1449 #---------------------------------------------------------------------------
1450
1451 FONTFAMILY_DEFAULT = _gdi_.FONTFAMILY_DEFAULT
1452 FONTFAMILY_DECORATIVE = _gdi_.FONTFAMILY_DECORATIVE
1453 FONTFAMILY_ROMAN = _gdi_.FONTFAMILY_ROMAN
1454 FONTFAMILY_SCRIPT = _gdi_.FONTFAMILY_SCRIPT
1455 FONTFAMILY_SWISS = _gdi_.FONTFAMILY_SWISS
1456 FONTFAMILY_MODERN = _gdi_.FONTFAMILY_MODERN
1457 FONTFAMILY_TELETYPE = _gdi_.FONTFAMILY_TELETYPE
1458 FONTFAMILY_MAX = _gdi_.FONTFAMILY_MAX
1459 FONTFAMILY_UNKNOWN = _gdi_.FONTFAMILY_UNKNOWN
1460 FONTSTYLE_NORMAL = _gdi_.FONTSTYLE_NORMAL
1461 FONTSTYLE_ITALIC = _gdi_.FONTSTYLE_ITALIC
1462 FONTSTYLE_SLANT = _gdi_.FONTSTYLE_SLANT
1463 FONTSTYLE_MAX = _gdi_.FONTSTYLE_MAX
1464 FONTWEIGHT_NORMAL = _gdi_.FONTWEIGHT_NORMAL
1465 FONTWEIGHT_LIGHT = _gdi_.FONTWEIGHT_LIGHT
1466 FONTWEIGHT_BOLD = _gdi_.FONTWEIGHT_BOLD
1467 FONTWEIGHT_MAX = _gdi_.FONTWEIGHT_MAX
1468 FONTFLAG_DEFAULT = _gdi_.FONTFLAG_DEFAULT
1469 FONTFLAG_ITALIC = _gdi_.FONTFLAG_ITALIC
1470 FONTFLAG_SLANT = _gdi_.FONTFLAG_SLANT
1471 FONTFLAG_LIGHT = _gdi_.FONTFLAG_LIGHT
1472 FONTFLAG_BOLD = _gdi_.FONTFLAG_BOLD
1473 FONTFLAG_ANTIALIASED = _gdi_.FONTFLAG_ANTIALIASED
1474 FONTFLAG_NOT_ANTIALIASED = _gdi_.FONTFLAG_NOT_ANTIALIASED
1475 FONTFLAG_UNDERLINED = _gdi_.FONTFLAG_UNDERLINED
1476 FONTFLAG_STRIKETHROUGH = _gdi_.FONTFLAG_STRIKETHROUGH
1477 FONTFLAG_MASK = _gdi_.FONTFLAG_MASK
1478 FONTENCODING_SYSTEM = _gdi_.FONTENCODING_SYSTEM
1479 FONTENCODING_DEFAULT = _gdi_.FONTENCODING_DEFAULT
1480 FONTENCODING_ISO8859_1 = _gdi_.FONTENCODING_ISO8859_1
1481 FONTENCODING_ISO8859_2 = _gdi_.FONTENCODING_ISO8859_2
1482 FONTENCODING_ISO8859_3 = _gdi_.FONTENCODING_ISO8859_3
1483 FONTENCODING_ISO8859_4 = _gdi_.FONTENCODING_ISO8859_4
1484 FONTENCODING_ISO8859_5 = _gdi_.FONTENCODING_ISO8859_5
1485 FONTENCODING_ISO8859_6 = _gdi_.FONTENCODING_ISO8859_6
1486 FONTENCODING_ISO8859_7 = _gdi_.FONTENCODING_ISO8859_7
1487 FONTENCODING_ISO8859_8 = _gdi_.FONTENCODING_ISO8859_8
1488 FONTENCODING_ISO8859_9 = _gdi_.FONTENCODING_ISO8859_9
1489 FONTENCODING_ISO8859_10 = _gdi_.FONTENCODING_ISO8859_10
1490 FONTENCODING_ISO8859_11 = _gdi_.FONTENCODING_ISO8859_11
1491 FONTENCODING_ISO8859_12 = _gdi_.FONTENCODING_ISO8859_12
1492 FONTENCODING_ISO8859_13 = _gdi_.FONTENCODING_ISO8859_13
1493 FONTENCODING_ISO8859_14 = _gdi_.FONTENCODING_ISO8859_14
1494 FONTENCODING_ISO8859_15 = _gdi_.FONTENCODING_ISO8859_15
1495 FONTENCODING_ISO8859_MAX = _gdi_.FONTENCODING_ISO8859_MAX
1496 FONTENCODING_KOI8 = _gdi_.FONTENCODING_KOI8
1497 FONTENCODING_KOI8_U = _gdi_.FONTENCODING_KOI8_U
1498 FONTENCODING_ALTERNATIVE = _gdi_.FONTENCODING_ALTERNATIVE
1499 FONTENCODING_BULGARIAN = _gdi_.FONTENCODING_BULGARIAN
1500 FONTENCODING_CP437 = _gdi_.FONTENCODING_CP437
1501 FONTENCODING_CP850 = _gdi_.FONTENCODING_CP850
1502 FONTENCODING_CP852 = _gdi_.FONTENCODING_CP852
1503 FONTENCODING_CP855 = _gdi_.FONTENCODING_CP855
1504 FONTENCODING_CP866 = _gdi_.FONTENCODING_CP866
1505 FONTENCODING_CP874 = _gdi_.FONTENCODING_CP874
1506 FONTENCODING_CP932 = _gdi_.FONTENCODING_CP932
1507 FONTENCODING_CP936 = _gdi_.FONTENCODING_CP936
1508 FONTENCODING_CP949 = _gdi_.FONTENCODING_CP949
1509 FONTENCODING_CP950 = _gdi_.FONTENCODING_CP950
1510 FONTENCODING_CP1250 = _gdi_.FONTENCODING_CP1250
1511 FONTENCODING_CP1251 = _gdi_.FONTENCODING_CP1251
1512 FONTENCODING_CP1252 = _gdi_.FONTENCODING_CP1252
1513 FONTENCODING_CP1253 = _gdi_.FONTENCODING_CP1253
1514 FONTENCODING_CP1254 = _gdi_.FONTENCODING_CP1254
1515 FONTENCODING_CP1255 = _gdi_.FONTENCODING_CP1255
1516 FONTENCODING_CP1256 = _gdi_.FONTENCODING_CP1256
1517 FONTENCODING_CP1257 = _gdi_.FONTENCODING_CP1257
1518 FONTENCODING_CP12_MAX = _gdi_.FONTENCODING_CP12_MAX
1519 FONTENCODING_UTF7 = _gdi_.FONTENCODING_UTF7
1520 FONTENCODING_UTF8 = _gdi_.FONTENCODING_UTF8
1521 FONTENCODING_EUC_JP = _gdi_.FONTENCODING_EUC_JP
1522 FONTENCODING_UTF16BE = _gdi_.FONTENCODING_UTF16BE
1523 FONTENCODING_UTF16LE = _gdi_.FONTENCODING_UTF16LE
1524 FONTENCODING_UTF32BE = _gdi_.FONTENCODING_UTF32BE
1525 FONTENCODING_UTF32LE = _gdi_.FONTENCODING_UTF32LE
1526 FONTENCODING_MACROMAN = _gdi_.FONTENCODING_MACROMAN
1527 FONTENCODING_MACJAPANESE = _gdi_.FONTENCODING_MACJAPANESE
1528 FONTENCODING_MACCHINESETRAD = _gdi_.FONTENCODING_MACCHINESETRAD
1529 FONTENCODING_MACKOREAN = _gdi_.FONTENCODING_MACKOREAN
1530 FONTENCODING_MACARABIC = _gdi_.FONTENCODING_MACARABIC
1531 FONTENCODING_MACHEBREW = _gdi_.FONTENCODING_MACHEBREW
1532 FONTENCODING_MACGREEK = _gdi_.FONTENCODING_MACGREEK
1533 FONTENCODING_MACCYRILLIC = _gdi_.FONTENCODING_MACCYRILLIC
1534 FONTENCODING_MACDEVANAGARI = _gdi_.FONTENCODING_MACDEVANAGARI
1535 FONTENCODING_MACGURMUKHI = _gdi_.FONTENCODING_MACGURMUKHI
1536 FONTENCODING_MACGUJARATI = _gdi_.FONTENCODING_MACGUJARATI
1537 FONTENCODING_MACORIYA = _gdi_.FONTENCODING_MACORIYA
1538 FONTENCODING_MACBENGALI = _gdi_.FONTENCODING_MACBENGALI
1539 FONTENCODING_MACTAMIL = _gdi_.FONTENCODING_MACTAMIL
1540 FONTENCODING_MACTELUGU = _gdi_.FONTENCODING_MACTELUGU
1541 FONTENCODING_MACKANNADA = _gdi_.FONTENCODING_MACKANNADA
1542 FONTENCODING_MACMALAJALAM = _gdi_.FONTENCODING_MACMALAJALAM
1543 FONTENCODING_MACSINHALESE = _gdi_.FONTENCODING_MACSINHALESE
1544 FONTENCODING_MACBURMESE = _gdi_.FONTENCODING_MACBURMESE
1545 FONTENCODING_MACKHMER = _gdi_.FONTENCODING_MACKHMER
1546 FONTENCODING_MACTHAI = _gdi_.FONTENCODING_MACTHAI
1547 FONTENCODING_MACLAOTIAN = _gdi_.FONTENCODING_MACLAOTIAN
1548 FONTENCODING_MACGEORGIAN = _gdi_.FONTENCODING_MACGEORGIAN
1549 FONTENCODING_MACARMENIAN = _gdi_.FONTENCODING_MACARMENIAN
1550 FONTENCODING_MACCHINESESIMP = _gdi_.FONTENCODING_MACCHINESESIMP
1551 FONTENCODING_MACTIBETAN = _gdi_.FONTENCODING_MACTIBETAN
1552 FONTENCODING_MACMONGOLIAN = _gdi_.FONTENCODING_MACMONGOLIAN
1553 FONTENCODING_MACETHIOPIC = _gdi_.FONTENCODING_MACETHIOPIC
1554 FONTENCODING_MACCENTRALEUR = _gdi_.FONTENCODING_MACCENTRALEUR
1555 FONTENCODING_MACVIATNAMESE = _gdi_.FONTENCODING_MACVIATNAMESE
1556 FONTENCODING_MACARABICEXT = _gdi_.FONTENCODING_MACARABICEXT
1557 FONTENCODING_MACSYMBOL = _gdi_.FONTENCODING_MACSYMBOL
1558 FONTENCODING_MACDINGBATS = _gdi_.FONTENCODING_MACDINGBATS
1559 FONTENCODING_MACTURKISH = _gdi_.FONTENCODING_MACTURKISH
1560 FONTENCODING_MACCROATIAN = _gdi_.FONTENCODING_MACCROATIAN
1561 FONTENCODING_MACICELANDIC = _gdi_.FONTENCODING_MACICELANDIC
1562 FONTENCODING_MACROMANIAN = _gdi_.FONTENCODING_MACROMANIAN
1563 FONTENCODING_MACCELTIC = _gdi_.FONTENCODING_MACCELTIC
1564 FONTENCODING_MACGAELIC = _gdi_.FONTENCODING_MACGAELIC
1565 FONTENCODING_MACKEYBOARD = _gdi_.FONTENCODING_MACKEYBOARD
1566 FONTENCODING_MACMIN = _gdi_.FONTENCODING_MACMIN
1567 FONTENCODING_MACMAX = _gdi_.FONTENCODING_MACMAX
1568 FONTENCODING_MAX = _gdi_.FONTENCODING_MAX
1569 FONTENCODING_UTF16 = _gdi_.FONTENCODING_UTF16
1570 FONTENCODING_UTF32 = _gdi_.FONTENCODING_UTF32
1571 FONTENCODING_UNICODE = _gdi_.FONTENCODING_UNICODE
1572 FONTENCODING_GB2312 = _gdi_.FONTENCODING_GB2312
1573 FONTENCODING_BIG5 = _gdi_.FONTENCODING_BIG5
1574 FONTENCODING_SHIFT_JIS = _gdi_.FONTENCODING_SHIFT_JIS
1575 #---------------------------------------------------------------------------
1576
1577 class NativeFontInfo(object):
1578 """Proxy of C++ NativeFontInfo class"""
1579 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1580 __repr__ = _swig_repr
1581 def __init__(self, *args, **kwargs):
1582 """__init__(self) -> NativeFontInfo"""
1583 _gdi_.NativeFontInfo_swiginit(self,_gdi_.new_NativeFontInfo(*args, **kwargs))
1584 __swig_destroy__ = _gdi_.delete_NativeFontInfo
1585 __del__ = lambda self : None;
1586 def Init(*args, **kwargs):
1587 """Init(self)"""
1588 return _gdi_.NativeFontInfo_Init(*args, **kwargs)
1589
1590 def InitFromFont(*args, **kwargs):
1591 """InitFromFont(self, Font font)"""
1592 return _gdi_.NativeFontInfo_InitFromFont(*args, **kwargs)
1593
1594 def GetPointSize(*args, **kwargs):
1595 """GetPointSize(self) -> int"""
1596 return _gdi_.NativeFontInfo_GetPointSize(*args, **kwargs)
1597
1598 def GetStyle(*args, **kwargs):
1599 """GetStyle(self) -> int"""
1600 return _gdi_.NativeFontInfo_GetStyle(*args, **kwargs)
1601
1602 def GetWeight(*args, **kwargs):
1603 """GetWeight(self) -> int"""
1604 return _gdi_.NativeFontInfo_GetWeight(*args, **kwargs)
1605
1606 def GetUnderlined(*args, **kwargs):
1607 """GetUnderlined(self) -> bool"""
1608 return _gdi_.NativeFontInfo_GetUnderlined(*args, **kwargs)
1609
1610 def GetFaceName(*args, **kwargs):
1611 """GetFaceName(self) -> String"""
1612 return _gdi_.NativeFontInfo_GetFaceName(*args, **kwargs)
1613
1614 def GetFamily(*args, **kwargs):
1615 """GetFamily(self) -> int"""
1616 return _gdi_.NativeFontInfo_GetFamily(*args, **kwargs)
1617
1618 def GetEncoding(*args, **kwargs):
1619 """GetEncoding(self) -> int"""
1620 return _gdi_.NativeFontInfo_GetEncoding(*args, **kwargs)
1621
1622 def SetPointSize(*args, **kwargs):
1623 """SetPointSize(self, int pointsize)"""
1624 return _gdi_.NativeFontInfo_SetPointSize(*args, **kwargs)
1625
1626 def SetStyle(*args, **kwargs):
1627 """SetStyle(self, int style)"""
1628 return _gdi_.NativeFontInfo_SetStyle(*args, **kwargs)
1629
1630 def SetWeight(*args, **kwargs):
1631 """SetWeight(self, int weight)"""
1632 return _gdi_.NativeFontInfo_SetWeight(*args, **kwargs)
1633
1634 def SetUnderlined(*args, **kwargs):
1635 """SetUnderlined(self, bool underlined)"""
1636 return _gdi_.NativeFontInfo_SetUnderlined(*args, **kwargs)
1637
1638 def SetFaceName(*args, **kwargs):
1639 """SetFaceName(self, String facename) -> bool"""
1640 return _gdi_.NativeFontInfo_SetFaceName(*args, **kwargs)
1641
1642 def SetFamily(*args, **kwargs):
1643 """SetFamily(self, int family)"""
1644 return _gdi_.NativeFontInfo_SetFamily(*args, **kwargs)
1645
1646 def SetEncoding(*args, **kwargs):
1647 """SetEncoding(self, int encoding)"""
1648 return _gdi_.NativeFontInfo_SetEncoding(*args, **kwargs)
1649
1650 def FromString(*args, **kwargs):
1651 """FromString(self, String s) -> bool"""
1652 return _gdi_.NativeFontInfo_FromString(*args, **kwargs)
1653
1654 def ToString(*args, **kwargs):
1655 """ToString(self) -> String"""
1656 return _gdi_.NativeFontInfo_ToString(*args, **kwargs)
1657
1658 def __str__(*args, **kwargs):
1659 """__str__(self) -> String"""
1660 return _gdi_.NativeFontInfo___str__(*args, **kwargs)
1661
1662 def FromUserString(*args, **kwargs):
1663 """FromUserString(self, String s) -> bool"""
1664 return _gdi_.NativeFontInfo_FromUserString(*args, **kwargs)
1665
1666 def ToUserString(*args, **kwargs):
1667 """ToUserString(self) -> String"""
1668 return _gdi_.NativeFontInfo_ToUserString(*args, **kwargs)
1669
1670 Encoding = property(GetEncoding,SetEncoding,doc="See `GetEncoding` and `SetEncoding`")
1671 FaceName = property(GetFaceName,SetFaceName,doc="See `GetFaceName` and `SetFaceName`")
1672 Family = property(GetFamily,SetFamily,doc="See `GetFamily` and `SetFamily`")
1673 PointSize = property(GetPointSize,SetPointSize,doc="See `GetPointSize` and `SetPointSize`")
1674 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
1675 Underlined = property(GetUnderlined,SetUnderlined,doc="See `GetUnderlined` and `SetUnderlined`")
1676 Weight = property(GetWeight,SetWeight,doc="See `GetWeight` and `SetWeight`")
1677 _gdi_.NativeFontInfo_swigregister(NativeFontInfo)
1678
1679 class NativeEncodingInfo(object):
1680 """Proxy of C++ NativeEncodingInfo class"""
1681 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1682 __repr__ = _swig_repr
1683 facename = property(_gdi_.NativeEncodingInfo_facename_get, _gdi_.NativeEncodingInfo_facename_set)
1684 encoding = property(_gdi_.NativeEncodingInfo_encoding_get, _gdi_.NativeEncodingInfo_encoding_set)
1685 def __init__(self, *args, **kwargs):
1686 """__init__(self) -> NativeEncodingInfo"""
1687 _gdi_.NativeEncodingInfo_swiginit(self,_gdi_.new_NativeEncodingInfo(*args, **kwargs))
1688 __swig_destroy__ = _gdi_.delete_NativeEncodingInfo
1689 __del__ = lambda self : None;
1690 def FromString(*args, **kwargs):
1691 """FromString(self, String s) -> bool"""
1692 return _gdi_.NativeEncodingInfo_FromString(*args, **kwargs)
1693
1694 def ToString(*args, **kwargs):
1695 """ToString(self) -> String"""
1696 return _gdi_.NativeEncodingInfo_ToString(*args, **kwargs)
1697
1698 _gdi_.NativeEncodingInfo_swigregister(NativeEncodingInfo)
1699
1700
1701 def GetNativeFontEncoding(*args, **kwargs):
1702 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1703 return _gdi_.GetNativeFontEncoding(*args, **kwargs)
1704
1705 def TestFontEncoding(*args, **kwargs):
1706 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1707 return _gdi_.TestFontEncoding(*args, **kwargs)
1708 #---------------------------------------------------------------------------
1709
1710 class FontMapper(object):
1711 """Proxy of C++ FontMapper class"""
1712 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1713 __repr__ = _swig_repr
1714 def __init__(self, *args, **kwargs):
1715 """__init__(self) -> FontMapper"""
1716 _gdi_.FontMapper_swiginit(self,_gdi_.new_FontMapper(*args, **kwargs))
1717 __swig_destroy__ = _gdi_.delete_FontMapper
1718 __del__ = lambda self : None;
1719 def Get(*args, **kwargs):
1720 """Get() -> FontMapper"""
1721 return _gdi_.FontMapper_Get(*args, **kwargs)
1722
1723 Get = staticmethod(Get)
1724 def Set(*args, **kwargs):
1725 """Set(FontMapper mapper) -> FontMapper"""
1726 return _gdi_.FontMapper_Set(*args, **kwargs)
1727
1728 Set = staticmethod(Set)
1729 def CharsetToEncoding(*args, **kwargs):
1730 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
1731 return _gdi_.FontMapper_CharsetToEncoding(*args, **kwargs)
1732
1733 def GetSupportedEncodingsCount(*args, **kwargs):
1734 """GetSupportedEncodingsCount() -> size_t"""
1735 return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs)
1736
1737 GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount)
1738 def GetEncoding(*args, **kwargs):
1739 """GetEncoding(size_t n) -> int"""
1740 return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
1741
1742 GetEncoding = staticmethod(GetEncoding)
1743 def GetEncodingName(*args, **kwargs):
1744 """GetEncodingName(int encoding) -> String"""
1745 return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
1746
1747 GetEncodingName = staticmethod(GetEncodingName)
1748 def GetEncodingDescription(*args, **kwargs):
1749 """GetEncodingDescription(int encoding) -> String"""
1750 return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
1751
1752 GetEncodingDescription = staticmethod(GetEncodingDescription)
1753 def GetEncodingFromName(*args, **kwargs):
1754 """GetEncodingFromName(String name) -> int"""
1755 return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
1756
1757 GetEncodingFromName = staticmethod(GetEncodingFromName)
1758 def SetConfigPath(*args, **kwargs):
1759 """SetConfigPath(self, String prefix)"""
1760 return _gdi_.FontMapper_SetConfigPath(*args, **kwargs)
1761
1762 def GetDefaultConfigPath(*args, **kwargs):
1763 """GetDefaultConfigPath() -> String"""
1764 return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs)
1765
1766 GetDefaultConfigPath = staticmethod(GetDefaultConfigPath)
1767 def GetAltForEncoding(*args, **kwargs):
1768 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1769 return _gdi_.FontMapper_GetAltForEncoding(*args, **kwargs)
1770
1771 def IsEncodingAvailable(*args, **kwargs):
1772 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1773 return _gdi_.FontMapper_IsEncodingAvailable(*args, **kwargs)
1774
1775 def SetDialogParent(*args, **kwargs):
1776 """SetDialogParent(self, Window parent)"""
1777 return _gdi_.FontMapper_SetDialogParent(*args, **kwargs)
1778
1779 def SetDialogTitle(*args, **kwargs):
1780 """SetDialogTitle(self, String title)"""
1781 return _gdi_.FontMapper_SetDialogTitle(*args, **kwargs)
1782
1783 AltForEncoding = property(GetAltForEncoding,doc="See `GetAltForEncoding`")
1784 _gdi_.FontMapper_swigregister(FontMapper)
1785
1786 def FontMapper_Get(*args):
1787 """FontMapper_Get() -> FontMapper"""
1788 return _gdi_.FontMapper_Get(*args)
1789
1790 def FontMapper_Set(*args, **kwargs):
1791 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1792 return _gdi_.FontMapper_Set(*args, **kwargs)
1793
1794 def FontMapper_GetSupportedEncodingsCount(*args):
1795 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1796 return _gdi_.FontMapper_GetSupportedEncodingsCount(*args)
1797
1798 def FontMapper_GetEncoding(*args, **kwargs):
1799 """FontMapper_GetEncoding(size_t n) -> int"""
1800 return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
1801
1802 def FontMapper_GetEncodingName(*args, **kwargs):
1803 """FontMapper_GetEncodingName(int encoding) -> String"""
1804 return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
1805
1806 def FontMapper_GetEncodingDescription(*args, **kwargs):
1807 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1808 return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
1809
1810 def FontMapper_GetEncodingFromName(*args, **kwargs):
1811 """FontMapper_GetEncodingFromName(String name) -> int"""
1812 return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
1813
1814 def FontMapper_GetDefaultConfigPath(*args):
1815 """FontMapper_GetDefaultConfigPath() -> String"""
1816 return _gdi_.FontMapper_GetDefaultConfigPath(*args)
1817
1818 #---------------------------------------------------------------------------
1819
1820 class Font(GDIObject):
1821 """
1822 A font is an object which determines the appearance of text. Fonts are
1823 used for drawing text to a device context, and setting the appearance
1824 of a window's text.
1825
1826 You can retrieve the current system font settings with `wx.SystemSettings`.
1827 """
1828 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1829 __repr__ = _swig_repr
1830 def __init__(self, *args, **kwargs):
1831 """
1832 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1833 String face=EmptyString,
1834 int encoding=FONTENCODING_DEFAULT) -> Font
1835
1836 Creates a font object with the specified attributes.
1837
1838 :param pointSize: The size of the font in points.
1839
1840 :param family: Font family. A generic way of referring to fonts
1841 without specifying actual facename. It can be One of
1842 the ``wx.FONTFAMILY_xxx`` constants.
1843
1844 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1845
1846 :param weight: Font weight, sometimes also referred to as font
1847 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1848
1849 :param underline: The value can be ``True`` or ``False`` and
1850 indicates whether the font will include an underline. This
1851 may not be supported on all platforms.
1852
1853 :param face: An optional string specifying the actual typeface to
1854 be used. If it is an empty string, a default typeface will be
1855 chosen based on the family.
1856
1857 :param encoding: An encoding which may be one of the
1858 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1859 available, no font is created.
1860
1861 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1862 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1863
1864 """
1865 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
1866 _gdi_.Font_swiginit(self,_gdi_.new_Font(*args, **kwargs))
1867 __swig_destroy__ = _gdi_.delete_Font
1868 __del__ = lambda self : None;
1869 def Ok(*args, **kwargs):
1870 """
1871 Ok(self) -> bool
1872
1873 Returns ``True`` if this font was successfully created.
1874 """
1875 return _gdi_.Font_Ok(*args, **kwargs)
1876
1877 def __nonzero__(self): return self.Ok()
1878 def __eq__(*args, **kwargs):
1879 """__eq__(self, Font other) -> bool"""
1880 return _gdi_.Font___eq__(*args, **kwargs)
1881
1882 def __ne__(*args, **kwargs):
1883 """__ne__(self, Font other) -> bool"""
1884 return _gdi_.Font___ne__(*args, **kwargs)
1885
1886 def GetPointSize(*args, **kwargs):
1887 """
1888 GetPointSize(self) -> int
1889
1890 Gets the point size.
1891 """
1892 return _gdi_.Font_GetPointSize(*args, **kwargs)
1893
1894 def GetPixelSize(*args, **kwargs):
1895 """
1896 GetPixelSize(self) -> Size
1897
1898 Returns the size in pixels if the font was constructed with a pixel
1899 size.
1900 """
1901 return _gdi_.Font_GetPixelSize(*args, **kwargs)
1902
1903 def IsUsingSizeInPixels(*args, **kwargs):
1904 """
1905 IsUsingSizeInPixels(self) -> bool
1906
1907 Returns ``True`` if the font is using a pixelSize.
1908 """
1909 return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs)
1910
1911 def GetFamily(*args, **kwargs):
1912 """
1913 GetFamily(self) -> int
1914
1915 Gets the font family.
1916 """
1917 return _gdi_.Font_GetFamily(*args, **kwargs)
1918
1919 def GetStyle(*args, **kwargs):
1920 """
1921 GetStyle(self) -> int
1922
1923 Gets the font style.
1924 """
1925 return _gdi_.Font_GetStyle(*args, **kwargs)
1926
1927 def GetWeight(*args, **kwargs):
1928 """
1929 GetWeight(self) -> int
1930
1931 Gets the font weight.
1932 """
1933 return _gdi_.Font_GetWeight(*args, **kwargs)
1934
1935 def GetUnderlined(*args, **kwargs):
1936 """
1937 GetUnderlined(self) -> bool
1938
1939 Returns ``True`` if the font is underlined, ``False`` otherwise.
1940 """
1941 return _gdi_.Font_GetUnderlined(*args, **kwargs)
1942
1943 def GetFaceName(*args, **kwargs):
1944 """
1945 GetFaceName(self) -> String
1946
1947 Returns the typeface name associated with the font, or the empty
1948 string if there is no typeface information.
1949 """
1950 return _gdi_.Font_GetFaceName(*args, **kwargs)
1951
1952 def GetEncoding(*args, **kwargs):
1953 """
1954 GetEncoding(self) -> int
1955
1956 Get the font's encoding.
1957 """
1958 return _gdi_.Font_GetEncoding(*args, **kwargs)
1959
1960 def GetNativeFontInfo(*args, **kwargs):
1961 """
1962 GetNativeFontInfo(self) -> NativeFontInfo
1963
1964 Constructs a `wx.NativeFontInfo` object from this font.
1965 """
1966 return _gdi_.Font_GetNativeFontInfo(*args, **kwargs)
1967
1968 def IsFixedWidth(*args, **kwargs):
1969 """
1970 IsFixedWidth(self) -> bool
1971
1972 Returns true if the font is a fixed width (or monospaced) font, false
1973 if it is a proportional one or font is invalid.
1974 """
1975 return _gdi_.Font_IsFixedWidth(*args, **kwargs)
1976
1977 def GetNativeFontInfoDesc(*args, **kwargs):
1978 """
1979 GetNativeFontInfoDesc(self) -> String
1980
1981 Returns the platform-dependent string completely describing this font
1982 or an empty string if the font isn't valid.
1983 """
1984 return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs)
1985
1986 def GetNativeFontInfoUserDesc(*args, **kwargs):
1987 """
1988 GetNativeFontInfoUserDesc(self) -> String
1989
1990 Returns a human readable version of `GetNativeFontInfoDesc`.
1991 """
1992 return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs)
1993
1994 def SetPointSize(*args, **kwargs):
1995 """
1996 SetPointSize(self, int pointSize)
1997
1998 Sets the point size.
1999 """
2000 return _gdi_.Font_SetPointSize(*args, **kwargs)
2001
2002 def SetPixelSize(*args, **kwargs):
2003 """
2004 SetPixelSize(self, Size pixelSize)
2005
2006 Sets the size in pixels rather than points. If there is platform API
2007 support for this then it is used, otherwise a font with the closest
2008 size is found using a binary search.
2009 """
2010 return _gdi_.Font_SetPixelSize(*args, **kwargs)
2011
2012 def SetFamily(*args, **kwargs):
2013 """
2014 SetFamily(self, int family)
2015
2016 Sets the font family.
2017 """
2018 return _gdi_.Font_SetFamily(*args, **kwargs)
2019
2020 def SetStyle(*args, **kwargs):
2021 """
2022 SetStyle(self, int style)
2023
2024 Sets the font style.
2025 """
2026 return _gdi_.Font_SetStyle(*args, **kwargs)
2027
2028 def SetWeight(*args, **kwargs):
2029 """
2030 SetWeight(self, int weight)
2031
2032 Sets the font weight.
2033 """
2034 return _gdi_.Font_SetWeight(*args, **kwargs)
2035
2036 def SetFaceName(*args, **kwargs):
2037 """
2038 SetFaceName(self, String faceName) -> bool
2039
2040 Sets the facename for the font. The facename, which should be a valid
2041 font installed on the end-user's system.
2042
2043 To avoid portability problems, don't rely on a specific face, but
2044 specify the font family instead or as well. A suitable font will be
2045 found on the end-user's system. If both the family and the facename
2046 are specified, wxWidgets will first search for the specific face, and
2047 then for a font belonging to the same family.
2048 """
2049 return _gdi_.Font_SetFaceName(*args, **kwargs)
2050
2051 def SetUnderlined(*args, **kwargs):
2052 """
2053 SetUnderlined(self, bool underlined)
2054
2055 Sets underlining.
2056 """
2057 return _gdi_.Font_SetUnderlined(*args, **kwargs)
2058
2059 def SetEncoding(*args, **kwargs):
2060 """
2061 SetEncoding(self, int encoding)
2062
2063 Set the font encoding.
2064 """
2065 return _gdi_.Font_SetEncoding(*args, **kwargs)
2066
2067 def SetNativeFontInfo(*args, **kwargs):
2068 """
2069 SetNativeFontInfo(self, NativeFontInfo info)
2070
2071 Set the font's attributes from a `wx.NativeFontInfo` object.
2072 """
2073 return _gdi_.Font_SetNativeFontInfo(*args, **kwargs)
2074
2075 def SetNativeFontInfoFromString(*args, **kwargs):
2076 """
2077 SetNativeFontInfoFromString(self, String info) -> bool
2078
2079 Set the font's attributes from string representation of a
2080 `wx.NativeFontInfo` object.
2081 """
2082 return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs)
2083
2084 def SetNativeFontInfoUserDesc(*args, **kwargs):
2085 """
2086 SetNativeFontInfoUserDesc(self, String info) -> bool
2087
2088 Set the font's attributes from a string formerly returned from
2089 `GetNativeFontInfoDesc`.
2090 """
2091 return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs)
2092
2093 def GetFamilyString(*args, **kwargs):
2094 """
2095 GetFamilyString(self) -> String
2096
2097 Returns a string representation of the font family.
2098 """
2099 return _gdi_.Font_GetFamilyString(*args, **kwargs)
2100
2101 def GetStyleString(*args, **kwargs):
2102 """
2103 GetStyleString(self) -> String
2104
2105 Returns a string representation of the font style.
2106 """
2107 return _gdi_.Font_GetStyleString(*args, **kwargs)
2108
2109 def GetWeightString(*args, **kwargs):
2110 """
2111 GetWeightString(self) -> String
2112
2113 Return a string representation of the font weight.
2114 """
2115 return _gdi_.Font_GetWeightString(*args, **kwargs)
2116
2117 def SetNoAntiAliasing(*args, **kwargs):
2118 """SetNoAntiAliasing(self, bool no=True)"""
2119 return _gdi_.Font_SetNoAntiAliasing(*args, **kwargs)
2120
2121 def GetNoAntiAliasing(*args, **kwargs):
2122 """GetNoAntiAliasing(self) -> bool"""
2123 return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs)
2124
2125 def GetDefaultEncoding(*args, **kwargs):
2126 """
2127 GetDefaultEncoding() -> int
2128
2129 Returns the encoding used for all fonts created with an encoding of
2130 ``wx.FONTENCODING_DEFAULT``.
2131 """
2132 return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
2133
2134 GetDefaultEncoding = staticmethod(GetDefaultEncoding)
2135 def SetDefaultEncoding(*args, **kwargs):
2136 """
2137 SetDefaultEncoding(int encoding)
2138
2139 Sets the default font encoding.
2140 """
2141 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
2142
2143 SetDefaultEncoding = staticmethod(SetDefaultEncoding)
2144 Encoding = property(GetEncoding,SetEncoding,doc="See `GetEncoding` and `SetEncoding`")
2145 FaceName = property(GetFaceName,SetFaceName,doc="See `GetFaceName` and `SetFaceName`")
2146 Family = property(GetFamily,SetFamily,doc="See `GetFamily` and `SetFamily`")
2147 FamilyString = property(GetFamilyString,doc="See `GetFamilyString`")
2148 NativeFontInfo = property(GetNativeFontInfo,SetNativeFontInfo,doc="See `GetNativeFontInfo` and `SetNativeFontInfo`")
2149 NativeFontInfoDesc = property(GetNativeFontInfoDesc,doc="See `GetNativeFontInfoDesc`")
2150 NativeFontInfoUserDesc = property(GetNativeFontInfoUserDesc,SetNativeFontInfoUserDesc,doc="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`")
2151 NoAntiAliasing = property(GetNoAntiAliasing,SetNoAntiAliasing,doc="See `GetNoAntiAliasing` and `SetNoAntiAliasing`")
2152 PixelSize = property(GetPixelSize,SetPixelSize,doc="See `GetPixelSize` and `SetPixelSize`")
2153 PointSize = property(GetPointSize,SetPointSize,doc="See `GetPointSize` and `SetPointSize`")
2154 Style = property(GetStyle,SetStyle,doc="See `GetStyle` and `SetStyle`")
2155 StyleString = property(GetStyleString,doc="See `GetStyleString`")
2156 Underlined = property(GetUnderlined,SetUnderlined,doc="See `GetUnderlined` and `SetUnderlined`")
2157 Weight = property(GetWeight,SetWeight,doc="See `GetWeight` and `SetWeight`")
2158 WeightString = property(GetWeightString,doc="See `GetWeightString`")
2159 _gdi_.Font_swigregister(Font)
2160
2161 def FontFromNativeInfo(*args, **kwargs):
2162 """
2163 FontFromNativeInfo(NativeFontInfo info) -> Font
2164
2165 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2166 """
2167 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2168 val = _gdi_.new_FontFromNativeInfo(*args, **kwargs)
2169 return val
2170
2171 def FontFromNativeInfoString(*args, **kwargs):
2172 """
2173 FontFromNativeInfoString(String info) -> Font
2174
2175 Construct a `wx.Font` from the string representation of a
2176 `wx.NativeFontInfo` object.
2177 """
2178 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2179 val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs)
2180 return val
2181
2182 def FFont(*args, **kwargs):
2183 """
2184 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
2185 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2186
2187 A bit of a simpler way to create a `wx.Font` using flags instead of
2188 individual attribute settings. The value of flags can be a
2189 combination of the following:
2190
2191 ============================ ==
2192 wx.FONTFLAG_DEFAULT
2193 wx.FONTFLAG_ITALIC
2194 wx.FONTFLAG_SLANT
2195 wx.FONTFLAG_LIGHT
2196 wx.FONTFLAG_BOLD
2197 wx.FONTFLAG_ANTIALIASED
2198 wx.FONTFLAG_NOT_ANTIALIASED
2199 wx.FONTFLAG_UNDERLINED
2200 wx.FONTFLAG_STRIKETHROUGH
2201 ============================ ==
2202
2203 :see: `wx.Font.__init__`
2204 """
2205 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2206 val = _gdi_.new_FFont(*args, **kwargs)
2207 return val
2208
2209 def FontFromPixelSize(*args, **kwargs):
2210 """
2211 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2212 bool underlined=False, String face=wxEmptyString,
2213 int encoding=FONTENCODING_DEFAULT) -> Font
2214
2215 Creates a font using a size in pixels rather than points. If there is
2216 platform API support for this then it is used, otherwise a font with
2217 the closest size is found using a binary search.
2218
2219 :see: `wx.Font.__init__`
2220 """
2221 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2222 val = _gdi_.new_FontFromPixelSize(*args, **kwargs)
2223 return val
2224
2225 def FFontFromPixelSize(*args, **kwargs):
2226 """
2227 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2228 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2229
2230 Creates a font using a size in pixels rather than points. If there is
2231 platform API support for this then it is used, otherwise a font with
2232 the closest size is found using a binary search.
2233
2234 :see: `wx.Font.__init__`, `wx.FFont`
2235 """
2236 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2237 val = _gdi_.new_FFontFromPixelSize(*args, **kwargs)
2238 return val
2239
2240 def Font_GetDefaultEncoding(*args):
2241 """
2242 Font_GetDefaultEncoding() -> int
2243
2244 Returns the encoding used for all fonts created with an encoding of
2245 ``wx.FONTENCODING_DEFAULT``.
2246 """
2247 return _gdi_.Font_GetDefaultEncoding(*args)
2248
2249 def Font_SetDefaultEncoding(*args, **kwargs):
2250 """
2251 Font_SetDefaultEncoding(int encoding)
2252
2253 Sets the default font encoding.
2254 """
2255 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
2256
2257 Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.")
2258 #---------------------------------------------------------------------------
2259
2260 class FontEnumerator(object):
2261 """Proxy of C++ FontEnumerator class"""
2262 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2263 __repr__ = _swig_repr
2264 def __init__(self, *args, **kwargs):
2265 """__init__(self) -> FontEnumerator"""
2266 _gdi_.FontEnumerator_swiginit(self,_gdi_.new_FontEnumerator(*args, **kwargs))
2267 self._setCallbackInfo(self, FontEnumerator, 0)
2268
2269 __swig_destroy__ = _gdi_.delete_FontEnumerator
2270 __del__ = lambda self : None;
2271 def _setCallbackInfo(*args, **kwargs):
2272 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
2273 return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs)
2274
2275 def EnumerateFacenames(*args, **kwargs):
2276 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2277 return _gdi_.FontEnumerator_EnumerateFacenames(*args, **kwargs)
2278
2279 def EnumerateEncodings(*args, **kwargs):
2280 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2281 return _gdi_.FontEnumerator_EnumerateEncodings(*args, **kwargs)
2282
2283 def GetEncodings(*args, **kwargs):
2284 """GetEncodings() -> PyObject"""
2285 return _gdi_.FontEnumerator_GetEncodings(*args, **kwargs)
2286
2287 GetEncodings = staticmethod(GetEncodings)
2288 def GetFacenames(*args, **kwargs):
2289 """GetFacenames() -> PyObject"""
2290 return _gdi_.FontEnumerator_GetFacenames(*args, **kwargs)
2291
2292 GetFacenames = staticmethod(GetFacenames)
2293 def IsValidFacename(*args, **kwargs):
2294 """
2295 IsValidFacename(String str) -> bool
2296
2297 Convenience function that returns true if the given face name exist in
2298 the user's system
2299 """
2300 return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2301
2302 IsValidFacename = staticmethod(IsValidFacename)
2303 _gdi_.FontEnumerator_swigregister(FontEnumerator)
2304
2305 def FontEnumerator_GetEncodings(*args):
2306 """FontEnumerator_GetEncodings() -> PyObject"""
2307 return _gdi_.FontEnumerator_GetEncodings(*args)
2308
2309 def FontEnumerator_GetFacenames(*args):
2310 """FontEnumerator_GetFacenames() -> PyObject"""
2311 return _gdi_.FontEnumerator_GetFacenames(*args)
2312
2313 def FontEnumerator_IsValidFacename(*args, **kwargs):
2314 """
2315 FontEnumerator_IsValidFacename(String str) -> bool
2316
2317 Convenience function that returns true if the given face name exist in
2318 the user's system
2319 """
2320 return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2321
2322 #---------------------------------------------------------------------------
2323
2324 Layout_Default = _gdi_.Layout_Default
2325 Layout_LeftToRight = _gdi_.Layout_LeftToRight
2326 Layout_RightToLeft = _gdi_.Layout_RightToLeft
2327 LANGUAGE_DEFAULT = _gdi_.LANGUAGE_DEFAULT
2328 LANGUAGE_UNKNOWN = _gdi_.LANGUAGE_UNKNOWN
2329 LANGUAGE_ABKHAZIAN = _gdi_.LANGUAGE_ABKHAZIAN
2330 LANGUAGE_AFAR = _gdi_.LANGUAGE_AFAR
2331 LANGUAGE_AFRIKAANS = _gdi_.LANGUAGE_AFRIKAANS
2332 LANGUAGE_ALBANIAN = _gdi_.LANGUAGE_ALBANIAN
2333 LANGUAGE_AMHARIC = _gdi_.LANGUAGE_AMHARIC
2334 LANGUAGE_ARABIC = _gdi_.LANGUAGE_ARABIC
2335 LANGUAGE_ARABIC_ALGERIA = _gdi_.LANGUAGE_ARABIC_ALGERIA
2336 LANGUAGE_ARABIC_BAHRAIN = _gdi_.LANGUAGE_ARABIC_BAHRAIN
2337 LANGUAGE_ARABIC_EGYPT = _gdi_.LANGUAGE_ARABIC_EGYPT
2338 LANGUAGE_ARABIC_IRAQ = _gdi_.LANGUAGE_ARABIC_IRAQ
2339 LANGUAGE_ARABIC_JORDAN = _gdi_.LANGUAGE_ARABIC_JORDAN
2340 LANGUAGE_ARABIC_KUWAIT = _gdi_.LANGUAGE_ARABIC_KUWAIT
2341 LANGUAGE_ARABIC_LEBANON = _gdi_.LANGUAGE_ARABIC_LEBANON
2342 LANGUAGE_ARABIC_LIBYA = _gdi_.LANGUAGE_ARABIC_LIBYA
2343 LANGUAGE_ARABIC_MOROCCO = _gdi_.LANGUAGE_ARABIC_MOROCCO
2344 LANGUAGE_ARABIC_OMAN = _gdi_.LANGUAGE_ARABIC_OMAN
2345 LANGUAGE_ARABIC_QATAR = _gdi_.LANGUAGE_ARABIC_QATAR
2346 LANGUAGE_ARABIC_SAUDI_ARABIA = _gdi_.LANGUAGE_ARABIC_SAUDI_ARABIA
2347 LANGUAGE_ARABIC_SUDAN = _gdi_.LANGUAGE_ARABIC_SUDAN
2348 LANGUAGE_ARABIC_SYRIA = _gdi_.LANGUAGE_ARABIC_SYRIA
2349 LANGUAGE_ARABIC_TUNISIA = _gdi_.LANGUAGE_ARABIC_TUNISIA
2350 LANGUAGE_ARABIC_UAE = _gdi_.LANGUAGE_ARABIC_UAE
2351 LANGUAGE_ARABIC_YEMEN = _gdi_.LANGUAGE_ARABIC_YEMEN
2352 LANGUAGE_ARMENIAN = _gdi_.LANGUAGE_ARMENIAN
2353 LANGUAGE_ASSAMESE = _gdi_.LANGUAGE_ASSAMESE
2354 LANGUAGE_AYMARA = _gdi_.LANGUAGE_AYMARA
2355 LANGUAGE_AZERI = _gdi_.LANGUAGE_AZERI
2356 LANGUAGE_AZERI_CYRILLIC = _gdi_.LANGUAGE_AZERI_CYRILLIC
2357 LANGUAGE_AZERI_LATIN = _gdi_.LANGUAGE_AZERI_LATIN
2358 LANGUAGE_BASHKIR = _gdi_.LANGUAGE_BASHKIR
2359 LANGUAGE_BASQUE = _gdi_.LANGUAGE_BASQUE
2360 LANGUAGE_BELARUSIAN = _gdi_.LANGUAGE_BELARUSIAN
2361 LANGUAGE_BENGALI = _gdi_.LANGUAGE_BENGALI
2362 LANGUAGE_BHUTANI = _gdi_.LANGUAGE_BHUTANI
2363 LANGUAGE_BIHARI = _gdi_.LANGUAGE_BIHARI
2364 LANGUAGE_BISLAMA = _gdi_.LANGUAGE_BISLAMA
2365 LANGUAGE_BRETON = _gdi_.LANGUAGE_BRETON
2366 LANGUAGE_BULGARIAN = _gdi_.LANGUAGE_BULGARIAN
2367 LANGUAGE_BURMESE = _gdi_.LANGUAGE_BURMESE
2368 LANGUAGE_CAMBODIAN = _gdi_.LANGUAGE_CAMBODIAN
2369 LANGUAGE_CATALAN = _gdi_.LANGUAGE_CATALAN
2370 LANGUAGE_CHINESE = _gdi_.LANGUAGE_CHINESE
2371 LANGUAGE_CHINESE_SIMPLIFIED = _gdi_.LANGUAGE_CHINESE_SIMPLIFIED
2372 LANGUAGE_CHINESE_TRADITIONAL = _gdi_.LANGUAGE_CHINESE_TRADITIONAL
2373 LANGUAGE_CHINESE_HONGKONG = _gdi_.LANGUAGE_CHINESE_HONGKONG
2374 LANGUAGE_CHINESE_MACAU = _gdi_.LANGUAGE_CHINESE_MACAU
2375 LANGUAGE_CHINESE_SINGAPORE = _gdi_.LANGUAGE_CHINESE_SINGAPORE
2376 LANGUAGE_CHINESE_TAIWAN = _gdi_.LANGUAGE_CHINESE_TAIWAN
2377 LANGUAGE_CORSICAN = _gdi_.LANGUAGE_CORSICAN
2378 LANGUAGE_CROATIAN = _gdi_.LANGUAGE_CROATIAN
2379 LANGUAGE_CZECH = _gdi_.LANGUAGE_CZECH
2380 LANGUAGE_DANISH = _gdi_.LANGUAGE_DANISH
2381 LANGUAGE_DUTCH = _gdi_.LANGUAGE_DUTCH
2382 LANGUAGE_DUTCH_BELGIAN = _gdi_.LANGUAGE_DUTCH_BELGIAN
2383 LANGUAGE_ENGLISH = _gdi_.LANGUAGE_ENGLISH
2384 LANGUAGE_ENGLISH_UK = _gdi_.LANGUAGE_ENGLISH_UK
2385 LANGUAGE_ENGLISH_US = _gdi_.LANGUAGE_ENGLISH_US
2386 LANGUAGE_ENGLISH_AUSTRALIA = _gdi_.LANGUAGE_ENGLISH_AUSTRALIA
2387 LANGUAGE_ENGLISH_BELIZE = _gdi_.LANGUAGE_ENGLISH_BELIZE
2388 LANGUAGE_ENGLISH_BOTSWANA = _gdi_.LANGUAGE_ENGLISH_BOTSWANA
2389 LANGUAGE_ENGLISH_CANADA = _gdi_.LANGUAGE_ENGLISH_CANADA
2390 LANGUAGE_ENGLISH_CARIBBEAN = _gdi_.LANGUAGE_ENGLISH_CARIBBEAN
2391 LANGUAGE_ENGLISH_DENMARK = _gdi_.LANGUAGE_ENGLISH_DENMARK
2392 LANGUAGE_ENGLISH_EIRE = _gdi_.LANGUAGE_ENGLISH_EIRE
2393 LANGUAGE_ENGLISH_JAMAICA = _gdi_.LANGUAGE_ENGLISH_JAMAICA
2394 LANGUAGE_ENGLISH_NEW_ZEALAND = _gdi_.LANGUAGE_ENGLISH_NEW_ZEALAND
2395 LANGUAGE_ENGLISH_PHILIPPINES = _gdi_.LANGUAGE_ENGLISH_PHILIPPINES
2396 LANGUAGE_ENGLISH_SOUTH_AFRICA = _gdi_.LANGUAGE_ENGLISH_SOUTH_AFRICA
2397 LANGUAGE_ENGLISH_TRINIDAD = _gdi_.LANGUAGE_ENGLISH_TRINIDAD
2398 LANGUAGE_ENGLISH_ZIMBABWE = _gdi_.LANGUAGE_ENGLISH_ZIMBABWE
2399 LANGUAGE_ESPERANTO = _gdi_.LANGUAGE_ESPERANTO
2400 LANGUAGE_ESTONIAN = _gdi_.LANGUAGE_ESTONIAN
2401 LANGUAGE_FAEROESE = _gdi_.LANGUAGE_FAEROESE
2402 LANGUAGE_FARSI = _gdi_.LANGUAGE_FARSI
2403 LANGUAGE_FIJI = _gdi_.LANGUAGE_FIJI
2404 LANGUAGE_FINNISH = _gdi_.LANGUAGE_FINNISH
2405 LANGUAGE_FRENCH = _gdi_.LANGUAGE_FRENCH
2406 LANGUAGE_FRENCH_BELGIAN = _gdi_.LANGUAGE_FRENCH_BELGIAN
2407 LANGUAGE_FRENCH_CANADIAN = _gdi_.LANGUAGE_FRENCH_CANADIAN
2408 LANGUAGE_FRENCH_LUXEMBOURG = _gdi_.LANGUAGE_FRENCH_LUXEMBOURG
2409 LANGUAGE_FRENCH_MONACO = _gdi_.LANGUAGE_FRENCH_MONACO
2410 LANGUAGE_FRENCH_SWISS = _gdi_.LANGUAGE_FRENCH_SWISS
2411 LANGUAGE_FRISIAN = _gdi_.LANGUAGE_FRISIAN
2412 LANGUAGE_GALICIAN = _gdi_.LANGUAGE_GALICIAN
2413 LANGUAGE_GEORGIAN = _gdi_.LANGUAGE_GEORGIAN
2414 LANGUAGE_GERMAN = _gdi_.LANGUAGE_GERMAN
2415 LANGUAGE_GERMAN_AUSTRIAN = _gdi_.LANGUAGE_GERMAN_AUSTRIAN
2416 LANGUAGE_GERMAN_BELGIUM = _gdi_.LANGUAGE_GERMAN_BELGIUM
2417 LANGUAGE_GERMAN_LIECHTENSTEIN = _gdi_.LANGUAGE_GERMAN_LIECHTENSTEIN
2418 LANGUAGE_GERMAN_LUXEMBOURG = _gdi_.LANGUAGE_GERMAN_LUXEMBOURG
2419 LANGUAGE_GERMAN_SWISS = _gdi_.LANGUAGE_GERMAN_SWISS
2420 LANGUAGE_GREEK = _gdi_.LANGUAGE_GREEK
2421 LANGUAGE_GREENLANDIC = _gdi_.LANGUAGE_GREENLANDIC
2422 LANGUAGE_GUARANI = _gdi_.LANGUAGE_GUARANI
2423 LANGUAGE_GUJARATI = _gdi_.LANGUAGE_GUJARATI
2424 LANGUAGE_HAUSA = _gdi_.LANGUAGE_HAUSA
2425 LANGUAGE_HEBREW = _gdi_.LANGUAGE_HEBREW
2426 LANGUAGE_HINDI = _gdi_.LANGUAGE_HINDI
2427 LANGUAGE_HUNGARIAN = _gdi_.LANGUAGE_HUNGARIAN
2428 LANGUAGE_ICELANDIC = _gdi_.LANGUAGE_ICELANDIC
2429 LANGUAGE_INDONESIAN = _gdi_.LANGUAGE_INDONESIAN
2430 LANGUAGE_INTERLINGUA = _gdi_.LANGUAGE_INTERLINGUA
2431 LANGUAGE_INTERLINGUE = _gdi_.LANGUAGE_INTERLINGUE
2432 LANGUAGE_INUKTITUT = _gdi_.LANGUAGE_INUKTITUT
2433 LANGUAGE_INUPIAK = _gdi_.LANGUAGE_INUPIAK
2434 LANGUAGE_IRISH = _gdi_.LANGUAGE_IRISH
2435 LANGUAGE_ITALIAN = _gdi_.LANGUAGE_ITALIAN
2436 LANGUAGE_ITALIAN_SWISS = _gdi_.LANGUAGE_ITALIAN_SWISS
2437 LANGUAGE_JAPANESE = _gdi_.LANGUAGE_JAPANESE
2438 LANGUAGE_JAVANESE = _gdi_.LANGUAGE_JAVANESE
2439 LANGUAGE_KANNADA = _gdi_.LANGUAGE_KANNADA
2440 LANGUAGE_KASHMIRI = _gdi_.LANGUAGE_KASHMIRI
2441 LANGUAGE_KASHMIRI_INDIA = _gdi_.LANGUAGE_KASHMIRI_INDIA
2442 LANGUAGE_KAZAKH = _gdi_.LANGUAGE_KAZAKH
2443 LANGUAGE_KERNEWEK = _gdi_.LANGUAGE_KERNEWEK
2444 LANGUAGE_KINYARWANDA = _gdi_.LANGUAGE_KINYARWANDA
2445 LANGUAGE_KIRGHIZ = _gdi_.LANGUAGE_KIRGHIZ
2446 LANGUAGE_KIRUNDI = _gdi_.LANGUAGE_KIRUNDI
2447 LANGUAGE_KONKANI = _gdi_.LANGUAGE_KONKANI
2448 LANGUAGE_KOREAN = _gdi_.LANGUAGE_KOREAN
2449 LANGUAGE_KURDISH = _gdi_.LANGUAGE_KURDISH
2450 LANGUAGE_LAOTHIAN = _gdi_.LANGUAGE_LAOTHIAN
2451 LANGUAGE_LATIN = _gdi_.LANGUAGE_LATIN
2452 LANGUAGE_LATVIAN = _gdi_.LANGUAGE_LATVIAN
2453 LANGUAGE_LINGALA = _gdi_.LANGUAGE_LINGALA
2454 LANGUAGE_LITHUANIAN = _gdi_.LANGUAGE_LITHUANIAN
2455 LANGUAGE_MACEDONIAN = _gdi_.LANGUAGE_MACEDONIAN
2456 LANGUAGE_MALAGASY = _gdi_.LANGUAGE_MALAGASY
2457 LANGUAGE_MALAY = _gdi_.LANGUAGE_MALAY
2458 LANGUAGE_MALAYALAM = _gdi_.LANGUAGE_MALAYALAM
2459 LANGUAGE_MALAY_BRUNEI_DARUSSALAM = _gdi_.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2460 LANGUAGE_MALAY_MALAYSIA = _gdi_.LANGUAGE_MALAY_MALAYSIA
2461 LANGUAGE_MALTESE = _gdi_.LANGUAGE_MALTESE
2462 LANGUAGE_MANIPURI = _gdi_.LANGUAGE_MANIPURI
2463 LANGUAGE_MAORI = _gdi_.LANGUAGE_MAORI
2464 LANGUAGE_MARATHI = _gdi_.LANGUAGE_MARATHI
2465 LANGUAGE_MOLDAVIAN = _gdi_.LANGUAGE_MOLDAVIAN
2466 LANGUAGE_MONGOLIAN = _gdi_.LANGUAGE_MONGOLIAN
2467 LANGUAGE_NAURU = _gdi_.LANGUAGE_NAURU
2468 LANGUAGE_NEPALI = _gdi_.LANGUAGE_NEPALI
2469 LANGUAGE_NEPALI_INDIA = _gdi_.LANGUAGE_NEPALI_INDIA
2470 LANGUAGE_NORWEGIAN_BOKMAL = _gdi_.LANGUAGE_NORWEGIAN_BOKMAL
2471 LANGUAGE_NORWEGIAN_NYNORSK = _gdi_.LANGUAGE_NORWEGIAN_NYNORSK
2472 LANGUAGE_OCCITAN = _gdi_.LANGUAGE_OCCITAN
2473 LANGUAGE_ORIYA = _gdi_.LANGUAGE_ORIYA
2474 LANGUAGE_OROMO = _gdi_.LANGUAGE_OROMO
2475 LANGUAGE_PASHTO = _gdi_.LANGUAGE_PASHTO
2476 LANGUAGE_POLISH = _gdi_.LANGUAGE_POLISH
2477 LANGUAGE_PORTUGUESE = _gdi_.LANGUAGE_PORTUGUESE
2478 LANGUAGE_PORTUGUESE_BRAZILIAN = _gdi_.LANGUAGE_PORTUGUESE_BRAZILIAN
2479 LANGUAGE_PUNJABI = _gdi_.LANGUAGE_PUNJABI
2480 LANGUAGE_QUECHUA = _gdi_.LANGUAGE_QUECHUA
2481 LANGUAGE_RHAETO_ROMANCE = _gdi_.LANGUAGE_RHAETO_ROMANCE
2482 LANGUAGE_ROMANIAN = _gdi_.LANGUAGE_ROMANIAN
2483 LANGUAGE_RUSSIAN = _gdi_.LANGUAGE_RUSSIAN
2484 LANGUAGE_RUSSIAN_UKRAINE = _gdi_.LANGUAGE_RUSSIAN_UKRAINE
2485 LANGUAGE_SAMOAN = _gdi_.LANGUAGE_SAMOAN
2486 LANGUAGE_SANGHO = _gdi_.LANGUAGE_SANGHO
2487 LANGUAGE_SANSKRIT = _gdi_.LANGUAGE_SANSKRIT
2488 LANGUAGE_SCOTS_GAELIC = _gdi_.LANGUAGE_SCOTS_GAELIC
2489 LANGUAGE_SERBIAN = _gdi_.LANGUAGE_SERBIAN
2490 LANGUAGE_SERBIAN_CYRILLIC = _gdi_.LANGUAGE_SERBIAN_CYRILLIC
2491 LANGUAGE_SERBIAN_LATIN = _gdi_.LANGUAGE_SERBIAN_LATIN
2492 LANGUAGE_SERBO_CROATIAN = _gdi_.LANGUAGE_SERBO_CROATIAN
2493 LANGUAGE_SESOTHO = _gdi_.LANGUAGE_SESOTHO
2494 LANGUAGE_SETSWANA = _gdi_.LANGUAGE_SETSWANA
2495 LANGUAGE_SHONA = _gdi_.LANGUAGE_SHONA
2496 LANGUAGE_SINDHI = _gdi_.LANGUAGE_SINDHI
2497 LANGUAGE_SINHALESE = _gdi_.LANGUAGE_SINHALESE
2498 LANGUAGE_SISWATI = _gdi_.LANGUAGE_SISWATI
2499 LANGUAGE_SLOVAK = _gdi_.LANGUAGE_SLOVAK
2500 LANGUAGE_SLOVENIAN = _gdi_.LANGUAGE_SLOVENIAN
2501 LANGUAGE_SOMALI = _gdi_.LANGUAGE_SOMALI
2502 LANGUAGE_SPANISH = _gdi_.LANGUAGE_SPANISH
2503 LANGUAGE_SPANISH_ARGENTINA = _gdi_.LANGUAGE_SPANISH_ARGENTINA
2504 LANGUAGE_SPANISH_BOLIVIA = _gdi_.LANGUAGE_SPANISH_BOLIVIA
2505 LANGUAGE_SPANISH_CHILE = _gdi_.LANGUAGE_SPANISH_CHILE
2506 LANGUAGE_SPANISH_COLOMBIA = _gdi_.LANGUAGE_SPANISH_COLOMBIA
2507 LANGUAGE_SPANISH_COSTA_RICA = _gdi_.LANGUAGE_SPANISH_COSTA_RICA
2508 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC = _gdi_.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2509 LANGUAGE_SPANISH_ECUADOR = _gdi_.LANGUAGE_SPANISH_ECUADOR
2510 LANGUAGE_SPANISH_EL_SALVADOR = _gdi_.LANGUAGE_SPANISH_EL_SALVADOR
2511 LANGUAGE_SPANISH_GUATEMALA = _gdi_.LANGUAGE_SPANISH_GUATEMALA
2512 LANGUAGE_SPANISH_HONDURAS = _gdi_.LANGUAGE_SPANISH_HONDURAS
2513 LANGUAGE_SPANISH_MEXICAN = _gdi_.LANGUAGE_SPANISH_MEXICAN
2514 LANGUAGE_SPANISH_MODERN = _gdi_.LANGUAGE_SPANISH_MODERN
2515 LANGUAGE_SPANISH_NICARAGUA = _gdi_.LANGUAGE_SPANISH_NICARAGUA
2516 LANGUAGE_SPANISH_PANAMA = _gdi_.LANGUAGE_SPANISH_PANAMA
2517 LANGUAGE_SPANISH_PARAGUAY = _gdi_.LANGUAGE_SPANISH_PARAGUAY
2518 LANGUAGE_SPANISH_PERU = _gdi_.LANGUAGE_SPANISH_PERU
2519 LANGUAGE_SPANISH_PUERTO_RICO = _gdi_.LANGUAGE_SPANISH_PUERTO_RICO
2520 LANGUAGE_SPANISH_URUGUAY = _gdi_.LANGUAGE_SPANISH_URUGUAY
2521 LANGUAGE_SPANISH_US = _gdi_.LANGUAGE_SPANISH_US
2522 LANGUAGE_SPANISH_VENEZUELA = _gdi_.LANGUAGE_SPANISH_VENEZUELA
2523 LANGUAGE_SUNDANESE = _gdi_.LANGUAGE_SUNDANESE
2524 LANGUAGE_SWAHILI = _gdi_.LANGUAGE_SWAHILI
2525 LANGUAGE_SWEDISH = _gdi_.LANGUAGE_SWEDISH
2526 LANGUAGE_SWEDISH_FINLAND = _gdi_.LANGUAGE_SWEDISH_FINLAND
2527 LANGUAGE_TAGALOG = _gdi_.LANGUAGE_TAGALOG
2528 LANGUAGE_TAJIK = _gdi_.LANGUAGE_TAJIK
2529 LANGUAGE_TAMIL = _gdi_.LANGUAGE_TAMIL
2530 LANGUAGE_TATAR = _gdi_.LANGUAGE_TATAR
2531 LANGUAGE_TELUGU = _gdi_.LANGUAGE_TELUGU
2532 LANGUAGE_THAI = _gdi_.LANGUAGE_THAI
2533 LANGUAGE_TIBETAN = _gdi_.LANGUAGE_TIBETAN
2534 LANGUAGE_TIGRINYA = _gdi_.LANGUAGE_TIGRINYA
2535 LANGUAGE_TONGA = _gdi_.LANGUAGE_TONGA
2536 LANGUAGE_TSONGA = _gdi_.LANGUAGE_TSONGA
2537 LANGUAGE_TURKISH = _gdi_.LANGUAGE_TURKISH
2538 LANGUAGE_TURKMEN = _gdi_.LANGUAGE_TURKMEN
2539 LANGUAGE_TWI = _gdi_.LANGUAGE_TWI
2540 LANGUAGE_UIGHUR = _gdi_.LANGUAGE_UIGHUR
2541 LANGUAGE_UKRAINIAN = _gdi_.LANGUAGE_UKRAINIAN
2542 LANGUAGE_URDU = _gdi_.LANGUAGE_URDU
2543 LANGUAGE_URDU_INDIA = _gdi_.LANGUAGE_URDU_INDIA
2544 LANGUAGE_URDU_PAKISTAN = _gdi_.LANGUAGE_URDU_PAKISTAN
2545 LANGUAGE_UZBEK = _gdi_.LANGUAGE_UZBEK
2546 LANGUAGE_UZBEK_CYRILLIC = _gdi_.LANGUAGE_UZBEK_CYRILLIC
2547 LANGUAGE_UZBEK_LATIN = _gdi_.LANGUAGE_UZBEK_LATIN
2548 LANGUAGE_VIETNAMESE = _gdi_.LANGUAGE_VIETNAMESE
2549 LANGUAGE_VOLAPUK = _gdi_.LANGUAGE_VOLAPUK
2550 LANGUAGE_WELSH = _gdi_.LANGUAGE_WELSH
2551 LANGUAGE_WOLOF = _gdi_.LANGUAGE_WOLOF
2552 LANGUAGE_XHOSA = _gdi_.LANGUAGE_XHOSA
2553 LANGUAGE_YIDDISH = _gdi_.LANGUAGE_YIDDISH
2554 LANGUAGE_YORUBA = _gdi_.LANGUAGE_YORUBA
2555 LANGUAGE_ZHUANG = _gdi_.LANGUAGE_ZHUANG
2556 LANGUAGE_ZULU = _gdi_.LANGUAGE_ZULU
2557 LANGUAGE_USER_DEFINED = _gdi_.LANGUAGE_USER_DEFINED
2558 class LanguageInfo(object):
2559 """Proxy of C++ LanguageInfo class"""
2560 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2561 def __init__(self): raise AttributeError, "No constructor defined"
2562 __repr__ = _swig_repr
2563 Language = property(_gdi_.LanguageInfo_Language_get, _gdi_.LanguageInfo_Language_set)
2564 CanonicalName = property(_gdi_.LanguageInfo_CanonicalName_get, _gdi_.LanguageInfo_CanonicalName_set)
2565 Description = property(_gdi_.LanguageInfo_Description_get, _gdi_.LanguageInfo_Description_set)
2566 _gdi_.LanguageInfo_swigregister(LanguageInfo)
2567
2568 LOCALE_CAT_NUMBER = _gdi_.LOCALE_CAT_NUMBER
2569 LOCALE_CAT_DATE = _gdi_.LOCALE_CAT_DATE
2570 LOCALE_CAT_MONEY = _gdi_.LOCALE_CAT_MONEY
2571 LOCALE_CAT_MAX = _gdi_.LOCALE_CAT_MAX
2572 LOCALE_THOUSANDS_SEP = _gdi_.LOCALE_THOUSANDS_SEP
2573 LOCALE_DECIMAL_POINT = _gdi_.LOCALE_DECIMAL_POINT
2574 LOCALE_LOAD_DEFAULT = _gdi_.LOCALE_LOAD_DEFAULT
2575 LOCALE_CONV_ENCODING = _gdi_.LOCALE_CONV_ENCODING
2576 class Locale(object):
2577 """Proxy of C++ Locale class"""
2578 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2579 __repr__ = _swig_repr
2580 def __init__(self, *args, **kwargs):
2581 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2582 _gdi_.Locale_swiginit(self,_gdi_.new_Locale(*args, **kwargs))
2583 __swig_destroy__ = _gdi_.delete_Locale
2584 __del__ = lambda self : None;
2585 def Init1(*args, **kwargs):
2586 """
2587 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2588 bool bLoadDefault=True,
2589 bool bConvertEncoding=False) -> bool
2590 """
2591 return _gdi_.Locale_Init1(*args, **kwargs)
2592
2593 def Init2(*args, **kwargs):
2594 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2595 return _gdi_.Locale_Init2(*args, **kwargs)
2596
2597 def Init(self, *_args, **_kwargs):
2598 if type(_args[0]) in [type(''), type(u'')]:
2599 val = self.Init1(*_args, **_kwargs)
2600 else:
2601 val = self.Init2(*_args, **_kwargs)
2602 return val
2603
2604 def GetSystemLanguage(*args, **kwargs):
2605 """GetSystemLanguage() -> int"""
2606 return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
2607
2608 GetSystemLanguage = staticmethod(GetSystemLanguage)
2609 def GetSystemEncoding(*args, **kwargs):
2610 """GetSystemEncoding() -> int"""
2611 return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
2612
2613 GetSystemEncoding = staticmethod(GetSystemEncoding)
2614 def GetSystemEncodingName(*args, **kwargs):
2615 """GetSystemEncodingName() -> String"""
2616 return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
2617
2618 GetSystemEncodingName = staticmethod(GetSystemEncodingName)
2619 def IsOk(*args, **kwargs):
2620 """IsOk(self) -> bool"""
2621 return _gdi_.Locale_IsOk(*args, **kwargs)
2622
2623 def __nonzero__(self): return self.IsOk()
2624 def GetLocale(*args, **kwargs):
2625 """GetLocale(self) -> String"""
2626 return _gdi_.Locale_GetLocale(*args, **kwargs)
2627
2628 def GetLanguage(*args, **kwargs):
2629 """GetLanguage(self) -> int"""
2630 return _gdi_.Locale_GetLanguage(*args, **kwargs)
2631
2632 def GetSysName(*args, **kwargs):
2633 """GetSysName(self) -> String"""
2634 return _gdi_.Locale_GetSysName(*args, **kwargs)
2635
2636 def GetCanonicalName(*args, **kwargs):
2637 """GetCanonicalName(self) -> String"""
2638 return _gdi_.Locale_GetCanonicalName(*args, **kwargs)
2639
2640 def AddCatalogLookupPathPrefix(*args, **kwargs):
2641 """AddCatalogLookupPathPrefix(String prefix)"""
2642 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
2643
2644 AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix)
2645 def AddCatalog(*args, **kwargs):
2646 """AddCatalog(self, String szDomain) -> bool"""
2647 return _gdi_.Locale_AddCatalog(*args, **kwargs)
2648
2649 def IsLoaded(*args, **kwargs):
2650 """IsLoaded(self, String szDomain) -> bool"""
2651 return _gdi_.Locale_IsLoaded(*args, **kwargs)
2652
2653 def GetLanguageInfo(*args, **kwargs):
2654 """GetLanguageInfo(int lang) -> LanguageInfo"""
2655 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
2656
2657 GetLanguageInfo = staticmethod(GetLanguageInfo)
2658 def GetLanguageName(*args, **kwargs):
2659 """GetLanguageName(int lang) -> String"""
2660 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
2661
2662 GetLanguageName = staticmethod(GetLanguageName)
2663 def FindLanguageInfo(*args, **kwargs):
2664 """FindLanguageInfo(String locale) -> LanguageInfo"""
2665 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
2666
2667 FindLanguageInfo = staticmethod(FindLanguageInfo)
2668 def AddLanguage(*args, **kwargs):
2669 """AddLanguage(LanguageInfo info)"""
2670 return _gdi_.Locale_AddLanguage(*args, **kwargs)
2671
2672 AddLanguage = staticmethod(AddLanguage)
2673 def GetString(*args, **kwargs):
2674 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2675 return _gdi_.Locale_GetString(*args, **kwargs)
2676
2677 def GetName(*args, **kwargs):
2678 """GetName(self) -> String"""
2679 return _gdi_.Locale_GetName(*args, **kwargs)
2680
2681 CanonicalName = property(GetCanonicalName,doc="See `GetCanonicalName`")
2682 Language = property(GetLanguage,doc="See `GetLanguage`")
2683 Locale = property(GetLocale,doc="See `GetLocale`")
2684 Name = property(GetName,doc="See `GetName`")
2685 String = property(GetString,doc="See `GetString`")
2686 SysName = property(GetSysName,doc="See `GetSysName`")
2687 _gdi_.Locale_swigregister(Locale)
2688
2689 def Locale_GetSystemLanguage(*args):
2690 """Locale_GetSystemLanguage() -> int"""
2691 return _gdi_.Locale_GetSystemLanguage(*args)
2692
2693 def Locale_GetSystemEncoding(*args):
2694 """Locale_GetSystemEncoding() -> int"""
2695 return _gdi_.Locale_GetSystemEncoding(*args)
2696
2697 def Locale_GetSystemEncodingName(*args):
2698 """Locale_GetSystemEncodingName() -> String"""
2699 return _gdi_.Locale_GetSystemEncodingName(*args)
2700
2701 def Locale_AddCatalogLookupPathPrefix(*args, **kwargs):
2702 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2703 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
2704
2705 def Locale_GetLanguageInfo(*args, **kwargs):
2706 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2707 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
2708
2709 def Locale_GetLanguageName(*args, **kwargs):
2710 """Locale_GetLanguageName(int lang) -> String"""
2711 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
2712
2713 def Locale_FindLanguageInfo(*args, **kwargs):
2714 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2715 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
2716
2717 def Locale_AddLanguage(*args, **kwargs):
2718 """Locale_AddLanguage(LanguageInfo info)"""
2719 return _gdi_.Locale_AddLanguage(*args, **kwargs)
2720
2721 class PyLocale(Locale):
2722 """Proxy of C++ PyLocale class"""
2723 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2724 __repr__ = _swig_repr
2725 def __init__(self, *args, **kwargs):
2726 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
2727 _gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs))
2728 self._setCallbackInfo(self, PyLocale)
2729
2730 __swig_destroy__ = _gdi_.delete_PyLocale
2731 __del__ = lambda self : None;
2732 def _setCallbackInfo(*args, **kwargs):
2733 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
2734 return _gdi_.PyLocale__setCallbackInfo(*args, **kwargs)
2735
2736 def GetSingularString(*args, **kwargs):
2737 """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar"""
2738 return _gdi_.PyLocale_GetSingularString(*args, **kwargs)
2739
2740 def GetPluralString(*args, **kwargs):
2741 """
2742 GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n,
2743 wxChar szDomain=None) -> wxChar
2744 """
2745 return _gdi_.PyLocale_GetPluralString(*args, **kwargs)
2746
2747 _gdi_.PyLocale_swigregister(PyLocale)
2748
2749
2750 def GetLocale(*args):
2751 """GetLocale() -> Locale"""
2752 return _gdi_.GetLocale(*args)
2753 #---------------------------------------------------------------------------
2754
2755 CONVERT_STRICT = _gdi_.CONVERT_STRICT
2756 CONVERT_SUBSTITUTE = _gdi_.CONVERT_SUBSTITUTE
2757 PLATFORM_CURRENT = _gdi_.PLATFORM_CURRENT
2758 PLATFORM_UNIX = _gdi_.PLATFORM_UNIX
2759 PLATFORM_WINDOWS = _gdi_.PLATFORM_WINDOWS
2760 PLATFORM_OS2 = _gdi_.PLATFORM_OS2
2761 PLATFORM_MAC = _gdi_.PLATFORM_MAC
2762 class EncodingConverter(_core.Object):
2763 """Proxy of C++ EncodingConverter class"""
2764 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2765 __repr__ = _swig_repr
2766 def __init__(self, *args, **kwargs):
2767 """__init__(self) -> EncodingConverter"""
2768 _gdi_.EncodingConverter_swiginit(self,_gdi_.new_EncodingConverter(*args, **kwargs))
2769 __swig_destroy__ = _gdi_.delete_EncodingConverter
2770 __del__ = lambda self : None;
2771 def Init(*args, **kwargs):
2772 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2773 return _gdi_.EncodingConverter_Init(*args, **kwargs)
2774
2775 def Convert(*args, **kwargs):
2776 """Convert(self, String input) -> String"""
2777 return _gdi_.EncodingConverter_Convert(*args, **kwargs)
2778
2779 def GetPlatformEquivalents(*args, **kwargs):
2780 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2781 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
2782
2783 GetPlatformEquivalents = staticmethod(GetPlatformEquivalents)
2784 def GetAllEquivalents(*args, **kwargs):
2785 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2786 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
2787
2788 GetAllEquivalents = staticmethod(GetAllEquivalents)
2789 def CanConvert(*args, **kwargs):
2790 """CanConvert(int encIn, int encOut) -> bool"""
2791 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
2792
2793 CanConvert = staticmethod(CanConvert)
2794 def __nonzero__(self): return self.IsOk()
2795 _gdi_.EncodingConverter_swigregister(EncodingConverter)
2796
2797 def GetTranslation(*args):
2798 """
2799 GetTranslation(String str) -> String
2800 GetTranslation(String str, String domain) -> String
2801 GetTranslation(String str, String strPlural, size_t n) -> String
2802 GetTranslation(String str, String strPlural, size_t n, String domain) -> String
2803 """
2804 return _gdi_.GetTranslation(*args)
2805
2806 def EncodingConverter_GetPlatformEquivalents(*args, **kwargs):
2807 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2808 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
2809
2810 def EncodingConverter_GetAllEquivalents(*args, **kwargs):
2811 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2812 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
2813
2814 def EncodingConverter_CanConvert(*args, **kwargs):
2815 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2816 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
2817
2818 #----------------------------------------------------------------------------
2819 # On MSW add the directory where the wxWidgets catalogs were installed
2820 # to the default catalog path.
2821 if wx.Platform == "__WXMSW__":
2822 import os
2823 _localedir = os.path.join(os.path.split(__file__)[0], "i18n")
2824 Locale.AddCatalogLookupPathPrefix(_localedir)
2825 del os
2826
2827 #----------------------------------------------------------------------------
2828
2829 #---------------------------------------------------------------------------
2830
2831 class DC(_core.Object):
2832 """
2833 A wx.DC is a device context onto which graphics and text can be
2834 drawn. It is intended to represent a number of output devices in a
2835 generic way, so a window can have a device context associated with it,
2836 and a printer also has a device context. In this way, the same piece
2837 of code may write to a number of different devices, if the device
2838 context is used as a parameter.
2839
2840 Derived types of wxDC have documentation for specific features only,
2841 so refer to this section for most device context information.
2842
2843 The wx.DC class is abstract and can not be instantiated, you must use
2844 one of the derived classes instead. Which one will depend on the
2845 situation in which it is used.
2846 """
2847 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2848 def __init__(self): raise AttributeError, "No constructor defined"
2849 __repr__ = _swig_repr
2850 __swig_destroy__ = _gdi_.delete_DC
2851 __del__ = lambda self : None;
2852 # These have been deprecated in wxWidgets. Since they never
2853 # really did anything to begin with, just make them be NOPs.
2854 def BeginDrawing(self): pass
2855 def EndDrawing(self): pass
2856
2857 def FloodFill(*args, **kwargs):
2858 """
2859 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2860
2861 Flood fills the device context starting from the given point, using
2862 the current brush colour, and using a style:
2863
2864 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2865 the given colour is encountered.
2866
2867 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2868 colour.
2869
2870 Returns False if the operation failed.
2871
2872 Note: The present implementation for non-Windows platforms may fail to
2873 find colour borders if the pixels do not match the colour
2874 exactly. However the function will still return true.
2875 """
2876 return _gdi_.DC_FloodFill(*args, **kwargs)
2877
2878 def FloodFillPoint(*args, **kwargs):
2879 """
2880 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2881
2882 Flood fills the device context starting from the given point, using
2883 the current brush colour, and using a style:
2884
2885 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2886 the given colour is encountered.
2887
2888 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2889 colour.
2890
2891 Returns False if the operation failed.
2892
2893 Note: The present implementation for non-Windows platforms may fail to
2894 find colour borders if the pixels do not match the colour
2895 exactly. However the function will still return true.
2896 """
2897 return _gdi_.DC_FloodFillPoint(*args, **kwargs)
2898
2899 def GradientFillConcentric(*args, **kwargs):
2900 """
2901 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
2902 Point circleCenter)
2903
2904 Fill the area specified by rect with a radial gradient, starting from
2905 initialColour in the center of the circle and fading to destColour on
2906 the outside of the circle. The circleCenter argument is the relative
2907 coordinants of the center of the circle in the specified rect.
2908
2909 Note: Currently this function is very slow, don't use it for real-time
2910 drawing.
2911 """
2912 return _gdi_.DC_GradientFillConcentric(*args, **kwargs)
2913
2914 def GradientFillLinear(*args, **kwargs):
2915 """
2916 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
2917 int nDirection=EAST)
2918
2919 Fill the area specified by rect with a linear gradient, starting from
2920 initialColour and eventually fading to destColour. The nDirection
2921 parameter specifies the direction of the colour change, default is to
2922 use initialColour on the left part of the rectangle and destColour on
2923 the right side.
2924 """
2925 return _gdi_.DC_GradientFillLinear(*args, **kwargs)
2926
2927 def GetPixel(*args, **kwargs):
2928 """
2929 GetPixel(self, int x, int y) -> Colour
2930
2931 Gets the colour at the specified location on the DC.
2932 """
2933 return _gdi_.DC_GetPixel(*args, **kwargs)
2934
2935 def GetPixelPoint(*args, **kwargs):
2936 """GetPixelPoint(self, Point pt) -> Colour"""
2937 return _gdi_.DC_GetPixelPoint(*args, **kwargs)
2938
2939 def DrawLine(*args, **kwargs):
2940 """
2941 DrawLine(self, int x1, int y1, int x2, int y2)
2942
2943 Draws a line from the first point to the second. The current pen is
2944 used for drawing the line. Note that the second point is *not* part of
2945 the line and is not drawn by this function (this is consistent with
2946 the behaviour of many other toolkits).
2947 """
2948 return _gdi_.DC_DrawLine(*args, **kwargs)
2949
2950 def DrawLinePoint(*args, **kwargs):
2951 """
2952 DrawLinePoint(self, Point pt1, Point pt2)
2953
2954 Draws a line from the first point to the second. The current pen is
2955 used for drawing the line. Note that the second point is *not* part of
2956 the line and is not drawn by this function (this is consistent with
2957 the behaviour of many other toolkits).
2958 """
2959 return _gdi_.DC_DrawLinePoint(*args, **kwargs)
2960
2961 def CrossHair(*args, **kwargs):
2962 """
2963 CrossHair(self, int x, int y)
2964
2965 Displays a cross hair using the current pen. This is a vertical and
2966 horizontal line the height and width of the window, centred on the
2967 given point.
2968 """
2969 return _gdi_.DC_CrossHair(*args, **kwargs)
2970
2971 def CrossHairPoint(*args, **kwargs):
2972 """
2973 CrossHairPoint(self, Point pt)
2974
2975 Displays a cross hair using the current pen. This is a vertical and
2976 horizontal line the height and width of the window, centred on the
2977 given point.
2978 """
2979 return _gdi_.DC_CrossHairPoint(*args, **kwargs)
2980
2981 def DrawArc(*args, **kwargs):
2982 """
2983 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2984
2985 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2986 the first point to the second. The current pen is used for the outline
2987 and the current brush for filling the shape.
2988
2989 The arc is drawn in an anticlockwise direction from the start point to
2990 the end point.
2991 """
2992 return _gdi_.DC_DrawArc(*args, **kwargs)
2993
2994 def DrawArcPoint(*args, **kwargs):
2995 """
2996 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2997
2998 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2999 the first point to the second. The current pen is used for the outline
3000 and the current brush for filling the shape.
3001
3002 The arc is drawn in an anticlockwise direction from the start point to
3003 the end point.
3004 """
3005 return _gdi_.DC_DrawArcPoint(*args, **kwargs)
3006
3007 def DrawCheckMark(*args, **kwargs):
3008 """
3009 DrawCheckMark(self, int x, int y, int width, int height)
3010
3011 Draws a check mark inside the given rectangle.
3012 """
3013 return _gdi_.DC_DrawCheckMark(*args, **kwargs)
3014
3015 def DrawCheckMarkRect(*args, **kwargs):
3016 """
3017 DrawCheckMarkRect(self, Rect rect)
3018
3019 Draws a check mark inside the given rectangle.
3020 """
3021 return _gdi_.DC_DrawCheckMarkRect(*args, **kwargs)
3022
3023 def DrawEllipticArc(*args, **kwargs):
3024 """
3025 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3026
3027 Draws an arc of an ellipse, with the given rectangle defining the
3028 bounds of the ellipse. The current pen is used for drawing the arc and
3029 the current brush is used for drawing the pie.
3030
3031 The *start* and *end* parameters specify the start and end of the arc
3032 relative to the three-o'clock position from the center of the
3033 rectangle. Angles are specified in degrees (360 is a complete
3034 circle). Positive values mean counter-clockwise motion. If start is
3035 equal to end, a complete ellipse will be drawn.
3036 """
3037 return _gdi_.DC_DrawEllipticArc(*args, **kwargs)
3038
3039 def DrawEllipticArcPointSize(*args, **kwargs):
3040 """
3041 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3042
3043 Draws an arc of an ellipse, with the given rectangle defining the
3044 bounds of the ellipse. The current pen is used for drawing the arc and
3045 the current brush is used for drawing the pie.
3046
3047 The *start* and *end* parameters specify the start and end of the arc
3048 relative to the three-o'clock position from the center of the
3049 rectangle. Angles are specified in degrees (360 is a complete
3050 circle). Positive values mean counter-clockwise motion. If start is
3051 equal to end, a complete ellipse will be drawn.
3052 """
3053 return _gdi_.DC_DrawEllipticArcPointSize(*args, **kwargs)
3054
3055 def DrawPoint(*args, **kwargs):
3056 """
3057 DrawPoint(self, int x, int y)
3058
3059 Draws a point using the current pen.
3060 """
3061 return _gdi_.DC_DrawPoint(*args, **kwargs)
3062
3063 def DrawPointPoint(*args, **kwargs):
3064 """
3065 DrawPointPoint(self, Point pt)
3066
3067 Draws a point using the current pen.
3068 """
3069 return _gdi_.DC_DrawPointPoint(*args, **kwargs)
3070
3071 def DrawRectangle(*args, **kwargs):
3072 """
3073 DrawRectangle(self, int x, int y, int width, int height)
3074
3075 Draws a rectangle with the given top left corner, and with the given
3076 size. The current pen is used for the outline and the current brush
3077 for filling the shape.
3078 """
3079 return _gdi_.DC_DrawRectangle(*args, **kwargs)
3080
3081 def DrawRectangleRect(*args, **kwargs):
3082 """
3083 DrawRectangleRect(self, Rect rect)
3084
3085 Draws a rectangle with the given top left corner, and with the given
3086 size. The current pen is used for the outline and the current brush
3087 for filling the shape.
3088 """
3089 return _gdi_.DC_DrawRectangleRect(*args, **kwargs)
3090
3091 def DrawRectanglePointSize(*args, **kwargs):
3092 """
3093 DrawRectanglePointSize(self, Point pt, Size sz)
3094
3095 Draws a rectangle with the given top left corner, and with the given
3096 size. The current pen is used for the outline and the current brush
3097 for filling the shape.
3098 """
3099 return _gdi_.DC_DrawRectanglePointSize(*args, **kwargs)
3100
3101 def DrawRoundedRectangle(*args, **kwargs):
3102 """
3103 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3104
3105 Draws a rectangle with the given top left corner, and with the given
3106 size. The corners are quarter-circles using the given radius. The
3107 current pen is used for the outline and the current brush for filling
3108 the shape.
3109
3110 If radius is positive, the value is assumed to be the radius of the
3111 rounded corner. If radius is negative, the absolute value is assumed
3112 to be the proportion of the smallest dimension of the rectangle. This
3113 means that the corner can be a sensible size relative to the size of
3114 the rectangle, and also avoids the strange effects X produces when the
3115 corners are too big for the rectangle.
3116 """
3117 return _gdi_.DC_DrawRoundedRectangle(*args, **kwargs)
3118
3119 def DrawRoundedRectangleRect(*args, **kwargs):
3120 """
3121 DrawRoundedRectangleRect(self, Rect r, double radius)
3122
3123 Draws a rectangle with the given top left corner, and with the given
3124 size. The corners are quarter-circles using the given radius. The
3125 current pen is used for the outline and the current brush for filling
3126 the shape.
3127
3128 If radius is positive, the value is assumed to be the radius of the
3129 rounded corner. If radius is negative, the absolute value is assumed
3130 to be the proportion of the smallest dimension of the rectangle. This
3131 means that the corner can be a sensible size relative to the size of
3132 the rectangle, and also avoids the strange effects X produces when the
3133 corners are too big for the rectangle.
3134 """
3135 return _gdi_.DC_DrawRoundedRectangleRect(*args, **kwargs)
3136
3137 def DrawRoundedRectanglePointSize(*args, **kwargs):
3138 """
3139 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3140
3141 Draws a rectangle with the given top left corner, and with the given
3142 size. The corners are quarter-circles using the given radius. The
3143 current pen is used for the outline and the current brush for filling
3144 the shape.
3145
3146 If radius is positive, the value is assumed to be the radius of the
3147 rounded corner. If radius is negative, the absolute value is assumed
3148 to be the proportion of the smallest dimension of the rectangle. This
3149 means that the corner can be a sensible size relative to the size of
3150 the rectangle, and also avoids the strange effects X produces when the
3151 corners are too big for the rectangle.
3152 """
3153 return _gdi_.DC_DrawRoundedRectanglePointSize(*args, **kwargs)
3154
3155 def DrawCircle(*args, **kwargs):
3156 """
3157 DrawCircle(self, int x, int y, int radius)
3158
3159 Draws a circle with the given center point and radius. The current
3160 pen is used for the outline and the current brush for filling the
3161 shape.
3162 """
3163 return _gdi_.DC_DrawCircle(*args, **kwargs)
3164
3165 def DrawCirclePoint(*args, **kwargs):
3166 """
3167 DrawCirclePoint(self, Point pt, int radius)
3168
3169 Draws a circle with the given center point and radius. The current
3170 pen is used for the outline and the current brush for filling the
3171 shape.
3172 """
3173 return _gdi_.DC_DrawCirclePoint(*args, **kwargs)
3174
3175 def DrawEllipse(*args, **kwargs):
3176 """
3177 DrawEllipse(self, int x, int y, int width, int height)
3178
3179 Draws an ellipse contained in the specified rectangle. The current pen
3180 is used for the outline and the current brush for filling the shape.
3181 """
3182 return _gdi_.DC_DrawEllipse(*args, **kwargs)
3183
3184 def DrawEllipseRect(*args, **kwargs):
3185 """
3186 DrawEllipseRect(self, Rect rect)
3187
3188 Draws an ellipse contained in the specified rectangle. The current pen
3189 is used for the outline and the current brush for filling the shape.
3190 """
3191 return _gdi_.DC_DrawEllipseRect(*args, **kwargs)
3192
3193 def DrawEllipsePointSize(*args, **kwargs):
3194 """
3195 DrawEllipsePointSize(self, Point pt, Size sz)
3196
3197 Draws an ellipse contained in the specified rectangle. The current pen
3198 is used for the outline and the current brush for filling the shape.
3199 """
3200 return _gdi_.DC_DrawEllipsePointSize(*args, **kwargs)
3201
3202 def DrawIcon(*args, **kwargs):
3203 """
3204 DrawIcon(self, Icon icon, int x, int y)
3205
3206 Draw an icon on the display (does nothing if the device context is
3207 PostScript). This can be the simplest way of drawing bitmaps on a
3208 window.
3209 """
3210 return _gdi_.DC_DrawIcon(*args, **kwargs)
3211
3212 def DrawIconPoint(*args, **kwargs):
3213 """
3214 DrawIconPoint(self, Icon icon, Point pt)
3215
3216 Draw an icon on the display (does nothing if the device context is
3217 PostScript). This can be the simplest way of drawing bitmaps on a
3218 window.
3219 """
3220 return _gdi_.DC_DrawIconPoint(*args, **kwargs)
3221
3222 def DrawBitmap(*args, **kwargs):
3223 """
3224 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3225
3226 Draw a bitmap on the device context at the specified point. If
3227 *transparent* is true and the bitmap has a transparency mask, (or
3228 alpha channel on the platforms that support it) then the bitmap will
3229 be drawn transparently.
3230 """
3231 return _gdi_.DC_DrawBitmap(*args, **kwargs)
3232
3233 def DrawBitmapPoint(*args, **kwargs):
3234 """
3235 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3236
3237 Draw a bitmap on the device context at the specified point. If
3238 *transparent* is true and the bitmap has a transparency mask, (or
3239 alpha channel on the platforms that support it) then the bitmap will
3240 be drawn transparently.
3241 """
3242 return _gdi_.DC_DrawBitmapPoint(*args, **kwargs)
3243
3244 def DrawText(*args, **kwargs):
3245 """
3246 DrawText(self, String text, int x, int y)
3247
3248 Draws a text string at the specified point, using the current text
3249 font, and the current text foreground and background colours.
3250
3251 The coordinates refer to the top-left corner of the rectangle bounding
3252 the string. See `GetTextExtent` for how to get the dimensions of a
3253 text string, which can be used to position the text more precisely.
3254
3255 **NOTE**: under wxGTK the current logical function is used by this
3256 function but it is ignored by wxMSW. Thus, you should avoid using
3257 logical functions with this function in portable programs.
3258 """
3259 return _gdi_.DC_DrawText(*args, **kwargs)
3260
3261 def DrawTextPoint(*args, **kwargs):
3262 """
3263 DrawTextPoint(self, String text, Point pt)
3264
3265 Draws a text string at the specified point, using the current text
3266 font, and the current text foreground and background colours.
3267
3268 The coordinates refer to the top-left corner of the rectangle bounding
3269 the string. See `GetTextExtent` for how to get the dimensions of a
3270 text string, which can be used to position the text more precisely.
3271
3272 **NOTE**: under wxGTK the current logical function is used by this
3273 function but it is ignored by wxMSW. Thus, you should avoid using
3274 logical functions with this function in portable programs.
3275 """
3276 return _gdi_.DC_DrawTextPoint(*args, **kwargs)
3277
3278 def DrawRotatedText(*args, **kwargs):
3279 """
3280 DrawRotatedText(self, String text, int x, int y, double angle)
3281
3282 Draws the text rotated by *angle* degrees, if supported by the platform.
3283
3284 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3285 function. In particular, a font different from ``wx.NORMAL_FONT``
3286 should be used as the it is not normally a TrueType
3287 font. ``wx.SWISS_FONT`` is an example of a font which is.
3288 """
3289 return _gdi_.DC_DrawRotatedText(*args, **kwargs)
3290
3291 def DrawRotatedTextPoint(*args, **kwargs):
3292 """
3293 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3294
3295 Draws the text rotated by *angle* degrees, if supported by the platform.
3296
3297 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3298 function. In particular, a font different from ``wx.NORMAL_FONT``
3299 should be used as the it is not normally a TrueType
3300 font. ``wx.SWISS_FONT`` is an example of a font which is.
3301 """
3302 return _gdi_.DC_DrawRotatedTextPoint(*args, **kwargs)
3303
3304 def Blit(*args, **kwargs):
3305 """
3306 Blit(self, int xdest, int ydest, int width, int height, DC source,
3307 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3308 int xsrcMask=-1, int ysrcMask=-1) -> bool
3309
3310 Copy from a source DC to this DC. Parameters specify the destination
3311 coordinates, size of area to copy, source DC, source coordinates,
3312 logical function, whether to use a bitmap mask, and mask source
3313 position.
3314 """
3315 return _gdi_.DC_Blit(*args, **kwargs)
3316
3317 def BlitPointSize(*args, **kwargs):
3318 """
3319 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
3320 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
3321
3322 Copy from a source DC to this DC. Parameters specify the destination
3323 coordinates, size of area to copy, source DC, source coordinates,
3324 logical function, whether to use a bitmap mask, and mask source
3325 position.
3326 """
3327 return _gdi_.DC_BlitPointSize(*args, **kwargs)
3328
3329 def SetClippingRegion(*args, **kwargs):
3330 """
3331 SetClippingRegion(self, int x, int y, int width, int height)
3332
3333 Sets the clipping region for this device context to the intersection
3334 of the given region described by the parameters of this method and the
3335 previously set clipping region. You should call `DestroyClippingRegion`
3336 if you want to set the clipping region exactly to the region
3337 specified.
3338
3339 The clipping region is an area to which drawing is
3340 restricted. Possible uses for the clipping region are for clipping
3341 text or for speeding up window redraws when only a known area of the
3342 screen is damaged.
3343 """
3344 return _gdi_.DC_SetClippingRegion(*args, **kwargs)
3345
3346 def SetClippingRegionPointSize(*args, **kwargs):
3347 """
3348 SetClippingRegionPointSize(self, Point pt, Size sz)
3349
3350 Sets the clipping region for this device context to the intersection
3351 of the given region described by the parameters of this method and the
3352 previously set clipping region. You should call `DestroyClippingRegion`
3353 if you want to set the clipping region exactly to the region
3354 specified.
3355
3356 The clipping region is an area to which drawing is
3357 restricted. Possible uses for the clipping region are for clipping
3358 text or for speeding up window redraws when only a known area of the
3359 screen is damaged.
3360 """
3361 return _gdi_.DC_SetClippingRegionPointSize(*args, **kwargs)
3362
3363 def SetClippingRegionAsRegion(*args, **kwargs):
3364 """
3365 SetClippingRegionAsRegion(self, Region region)
3366
3367 Sets the clipping region for this device context to the intersection
3368 of the given region described by the parameters of this method and the
3369 previously set clipping region. You should call `DestroyClippingRegion`
3370 if you want to set the clipping region exactly to the region
3371 specified.
3372
3373 The clipping region is an area to which drawing is
3374 restricted. Possible uses for the clipping region are for clipping
3375 text or for speeding up window redraws when only a known area of the
3376 screen is damaged.
3377 """
3378 return _gdi_.DC_SetClippingRegionAsRegion(*args, **kwargs)
3379
3380 def SetClippingRect(*args, **kwargs):
3381 """
3382 SetClippingRect(self, Rect rect)
3383
3384 Sets the clipping region for this device context to the intersection
3385 of the given region described by the parameters of this method and the
3386 previously set clipping region. You should call `DestroyClippingRegion`
3387 if you want to set the clipping region exactly to the region
3388 specified.
3389
3390 The clipping region is an area to which drawing is
3391 restricted. Possible uses for the clipping region are for clipping
3392 text or for speeding up window redraws when only a known area of the
3393 screen is damaged.
3394 """
3395 return _gdi_.DC_SetClippingRect(*args, **kwargs)
3396
3397 def DrawLines(*args, **kwargs):
3398 """
3399 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3400
3401 Draws lines using a sequence of `wx.Point` objects, adding the
3402 optional offset coordinate. The current pen is used for drawing the
3403 lines.
3404 """
3405 return _gdi_.DC_DrawLines(*args, **kwargs)
3406
3407 def DrawPolygon(*args, **kwargs):
3408 """
3409 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3410 int fillStyle=ODDEVEN_RULE)
3411
3412 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3413 the optional offset coordinate. The last argument specifies the fill
3414 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3415
3416 The current pen is used for drawing the outline, and the current brush
3417 for filling the shape. Using a transparent brush suppresses
3418 filling. Note that wxWidgets automatically closes the first and last
3419 points.
3420 """
3421 return _gdi_.DC_DrawPolygon(*args, **kwargs)
3422
3423 def DrawLabel(*args, **kwargs):
3424 """
3425 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3426 int indexAccel=-1)
3427
3428 Draw *text* within the specified rectangle, abiding by the alignment
3429 flags. Will additionally emphasize the character at *indexAccel* if
3430 it is not -1.
3431 """
3432 return _gdi_.DC_DrawLabel(*args, **kwargs)
3433
3434 def DrawImageLabel(*args, **kwargs):
3435 """
3436 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3437 int indexAccel=-1) -> Rect
3438
3439 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3440 drawing it) within the specified rectangle, abiding by the alignment
3441 flags. Will additionally emphasize the character at *indexAccel* if
3442 it is not -1. Returns the bounding rectangle.
3443 """
3444 return _gdi_.DC_DrawImageLabel(*args, **kwargs)
3445
3446 def DrawSpline(*args, **kwargs):
3447 """
3448 DrawSpline(self, List points)
3449
3450 Draws a spline between all given control points, (a list of `wx.Point`
3451 objects) using the current pen. The spline is drawn using a series of
3452 lines, using an algorithm taken from the X drawing program 'XFIG'.
3453 """
3454 return _gdi_.DC_DrawSpline(*args, **kwargs)
3455
3456 def Clear(*args, **kwargs):
3457 """
3458 Clear(self)
3459
3460 Clears the device context using the current background brush.
3461 """
3462 return _gdi_.DC_Clear(*args, **kwargs)
3463
3464 def StartDoc(*args, **kwargs):
3465 """
3466 StartDoc(self, String message) -> bool
3467
3468 Starts a document (only relevant when outputting to a
3469 printer). *Message* is a message to show whilst printing.
3470 """
3471 return _gdi_.DC_StartDoc(*args, **kwargs)
3472
3473 def EndDoc(*args, **kwargs):
3474 """
3475 EndDoc(self)
3476
3477 Ends a document (only relevant when outputting to a printer).
3478 """
3479 return _gdi_.DC_EndDoc(*args, **kwargs)
3480
3481 def StartPage(*args, **kwargs):
3482 """
3483 StartPage(self)
3484
3485 Starts a document page (only relevant when outputting to a printer).
3486 """
3487 return _gdi_.DC_StartPage(*args, **kwargs)
3488
3489 def EndPage(*args, **kwargs):
3490 """
3491 EndPage(self)
3492
3493 Ends a document page (only relevant when outputting to a printer).
3494 """
3495 return _gdi_.DC_EndPage(*args, **kwargs)
3496
3497 def SetFont(*args, **kwargs):
3498 """
3499 SetFont(self, Font font)
3500
3501 Sets the current font for the DC. It must be a valid font, in
3502 particular you should not pass ``wx.NullFont`` to this method.
3503 """
3504 return _gdi_.DC_SetFont(*args, **kwargs)
3505
3506 def SetPen(*args, **kwargs):
3507 """
3508 SetPen(self, Pen pen)
3509
3510 Sets the current pen for the DC.
3511
3512 If the argument is ``wx.NullPen``, the current pen is selected out of the
3513 device context, and the original pen restored.
3514 """
3515 return _gdi_.DC_SetPen(*args, **kwargs)
3516
3517 def SetBrush(*args, **kwargs):
3518 """
3519 SetBrush(self, Brush brush)
3520
3521 Sets the current brush for the DC.
3522
3523 If the argument is ``wx.NullBrush``, the current brush is selected out
3524 of the device context, and the original brush restored, allowing the
3525 current brush to be destroyed safely.
3526 """
3527 return _gdi_.DC_SetBrush(*args, **kwargs)
3528
3529 def SetBackground(*args, **kwargs):
3530 """
3531 SetBackground(self, Brush brush)
3532
3533 Sets the current background brush for the DC.
3534 """
3535 return _gdi_.DC_SetBackground(*args, **kwargs)
3536
3537 def SetBackgroundMode(*args, **kwargs):
3538 """
3539 SetBackgroundMode(self, int mode)
3540
3541 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3542 determines whether text will be drawn with a background colour or
3543 not.
3544 """
3545 return _gdi_.DC_SetBackgroundMode(*args, **kwargs)
3546
3547 def SetPalette(*args, **kwargs):
3548 """
3549 SetPalette(self, Palette palette)
3550
3551 If this is a window DC or memory DC, assigns the given palette to the
3552 window or bitmap associated with the DC. If the argument is
3553 ``wx.NullPalette``, the current palette is selected out of the device
3554 context, and the original palette restored.
3555 """
3556 return _gdi_.DC_SetPalette(*args, **kwargs)
3557
3558 def DestroyClippingRegion(*args, **kwargs):
3559 """
3560 DestroyClippingRegion(self)
3561
3562 Destroys the current clipping region so that none of the DC is
3563 clipped.
3564 """
3565 return _gdi_.DC_DestroyClippingRegion(*args, **kwargs)
3566
3567 def GetClippingBox(*args, **kwargs):
3568 """
3569 GetClippingBox() -> (x, y, width, height)
3570
3571 Gets the rectangle surrounding the current clipping region.
3572 """
3573 return _gdi_.DC_GetClippingBox(*args, **kwargs)
3574
3575 def GetClippingRect(*args, **kwargs):
3576 """
3577 GetClippingRect(self) -> Rect
3578
3579 Gets the rectangle surrounding the current clipping region.
3580 """
3581 return _gdi_.DC_GetClippingRect(*args, **kwargs)
3582
3583 def GetCharHeight(*args, **kwargs):
3584 """
3585 GetCharHeight(self) -> int
3586
3587 Gets the character height of the currently set font.
3588 """
3589 return _gdi_.DC_GetCharHeight(*args, **kwargs)
3590
3591 def GetCharWidth(*args, **kwargs):
3592 """
3593 GetCharWidth(self) -> int
3594
3595 Gets the average character width of the currently set font.
3596 """
3597 return _gdi_.DC_GetCharWidth(*args, **kwargs)
3598
3599 def GetTextExtent(*args, **kwargs):
3600 """
3601 GetTextExtent(wxString string) -> (width, height)
3602
3603 Get the width and height of the text using the current font. Only
3604 works for single line strings.
3605 """
3606 return _gdi_.DC_GetTextExtent(*args, **kwargs)
3607
3608 def GetFullTextExtent(*args, **kwargs):
3609 """
3610 GetFullTextExtent(wxString string, Font font=None) ->
3611 (width, height, descent, externalLeading)
3612
3613 Get the width, height, decent and leading of the text using the
3614 current or specified font. Only works for single line strings.
3615 """
3616 return _gdi_.DC_GetFullTextExtent(*args, **kwargs)
3617
3618 def GetMultiLineTextExtent(*args, **kwargs):
3619 """
3620 GetMultiLineTextExtent(wxString string, Font font=None) ->
3621 (width, height, lineHeight)
3622
3623 Get the width, height, decent and leading of the text using the
3624 current or specified font. Works for single as well as multi-line
3625 strings.
3626 """
3627 return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
3628
3629 def GetPartialTextExtents(*args, **kwargs):
3630 """
3631 GetPartialTextExtents(self, text) -> [widths]
3632
3633 Returns a list of integers such that each value is the distance in
3634 pixels from the begining of text to the coresponding character of
3635 *text*. The generic version simply builds a running total of the widths
3636 of each character using GetTextExtent, however if the various
3637 platforms have a native API function that is faster or more accurate
3638 than the generic implementation then it will be used instead.
3639 """
3640 return _gdi_.DC_GetPartialTextExtents(*args, **kwargs)
3641
3642 def GetSize(*args, **kwargs):
3643 """
3644 GetSize(self) -> Size
3645
3646 This gets the horizontal and vertical resolution in device units. It
3647 can be used to scale graphics to fit the page. For example, if *maxX*
3648 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3649 used in your application, the following code will scale the graphic to
3650 fit on the printer page::
3651
3652 w, h = dc.GetSize()
3653 scaleX = maxX*1.0 / w
3654 scaleY = maxY*1.0 / h
3655 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3656
3657 """
3658 return _gdi_.DC_GetSize(*args, **kwargs)
3659
3660 def GetSizeTuple(*args, **kwargs):
3661 """
3662 GetSizeTuple() -> (width, height)
3663
3664 This gets the horizontal and vertical resolution in device units. It
3665 can be used to scale graphics to fit the page. For example, if *maxX*
3666 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3667 used in your application, the following code will scale the graphic to
3668 fit on the printer page::
3669
3670 w, h = dc.GetSize()
3671 scaleX = maxX*1.0 / w
3672 scaleY = maxY*1.0 / h
3673 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3674
3675 """
3676 return _gdi_.DC_GetSizeTuple(*args, **kwargs)
3677
3678 def GetSizeMM(*args, **kwargs):
3679 """
3680 GetSizeMM(self) -> Size
3681
3682 Get the DC size in milimeters.
3683 """
3684 return _gdi_.DC_GetSizeMM(*args, **kwargs)
3685
3686 def GetSizeMMTuple(*args, **kwargs):
3687 """
3688 GetSizeMMTuple() -> (width, height)
3689
3690 Get the DC size in milimeters.
3691 """
3692 return _gdi_.DC_GetSizeMMTuple(*args, **kwargs)
3693
3694 def DeviceToLogicalX(*args, **kwargs):
3695 """
3696 DeviceToLogicalX(self, int x) -> int
3697
3698 Convert device X coordinate to logical coordinate, using the current
3699 mapping mode.
3700 """
3701 return _gdi_.DC_DeviceToLogicalX(*args, **kwargs)
3702
3703 def DeviceToLogicalY(*args, **kwargs):
3704 """
3705 DeviceToLogicalY(self, int y) -> int
3706
3707 Converts device Y coordinate to logical coordinate, using the current
3708 mapping mode.
3709 """
3710 return _gdi_.DC_DeviceToLogicalY(*args, **kwargs)
3711
3712 def DeviceToLogicalXRel(*args, **kwargs):
3713 """
3714 DeviceToLogicalXRel(self, int x) -> int
3715
3716 Convert device X coordinate to relative logical coordinate, using the
3717 current mapping mode but ignoring the x axis orientation. Use this
3718 function for converting a width, for example.
3719 """
3720 return _gdi_.DC_DeviceToLogicalXRel(*args, **kwargs)
3721
3722 def DeviceToLogicalYRel(*args, **kwargs):
3723 """
3724 DeviceToLogicalYRel(self, int y) -> int
3725
3726 Convert device Y coordinate to relative logical coordinate, using the
3727 current mapping mode but ignoring the y axis orientation. Use this
3728 function for converting a height, for example.
3729 """
3730 return _gdi_.DC_DeviceToLogicalYRel(*args, **kwargs)
3731
3732 def LogicalToDeviceX(*args, **kwargs):
3733 """
3734 LogicalToDeviceX(self, int x) -> int
3735
3736 Converts logical X coordinate to device coordinate, using the current
3737 mapping mode.
3738 """
3739 return _gdi_.DC_LogicalToDeviceX(*args, **kwargs)
3740
3741 def LogicalToDeviceY(*args, **kwargs):
3742 """
3743 LogicalToDeviceY(self, int y) -> int
3744
3745 Converts logical Y coordinate to device coordinate, using the current
3746 mapping mode.
3747 """
3748 return _gdi_.DC_LogicalToDeviceY(*args, **kwargs)
3749
3750 def LogicalToDeviceXRel(*args, **kwargs):
3751 """
3752 LogicalToDeviceXRel(self, int x) -> int
3753
3754 Converts logical X coordinate to relative device coordinate, using the
3755 current mapping mode but ignoring the x axis orientation. Use this for
3756 converting a width, for example.
3757 """
3758 return _gdi_.DC_LogicalToDeviceXRel(*args, **kwargs)
3759
3760 def LogicalToDeviceYRel(*args, **kwargs):
3761 """
3762 LogicalToDeviceYRel(self, int y) -> int
3763
3764 Converts logical Y coordinate to relative device coordinate, using the
3765 current mapping mode but ignoring the y axis orientation. Use this for
3766 converting a height, for example.
3767 """
3768 return _gdi_.DC_LogicalToDeviceYRel(*args, **kwargs)
3769
3770 def CanDrawBitmap(*args, **kwargs):
3771 """CanDrawBitmap(self) -> bool"""
3772 return _gdi_.DC_CanDrawBitmap(*args, **kwargs)
3773
3774 def CanGetTextExtent(*args, **kwargs):
3775 """CanGetTextExtent(self) -> bool"""
3776 return _gdi_.DC_CanGetTextExtent(*args, **kwargs)
3777
3778 def GetDepth(*args, **kwargs):
3779 """
3780 GetDepth(self) -> int
3781
3782 Returns the colour depth of the DC.
3783 """
3784 return _gdi_.DC_GetDepth(*args, **kwargs)
3785
3786 def GetPPI(*args, **kwargs):
3787 """
3788 GetPPI(self) -> Size
3789
3790 Resolution in pixels per inch
3791 """
3792 return _gdi_.DC_GetPPI(*args, **kwargs)
3793
3794 def Ok(*args, **kwargs):
3795 """
3796 Ok(self) -> bool
3797
3798 Returns true if the DC is ok to use.
3799 """
3800 return _gdi_.DC_Ok(*args, **kwargs)
3801
3802 def GetBackgroundMode(*args, **kwargs):
3803 """
3804 GetBackgroundMode(self) -> int
3805
3806 Returns the current background mode, either ``wx.SOLID`` or
3807 ``wx.TRANSPARENT``.
3808 """
3809 return _gdi_.DC_GetBackgroundMode(*args, **kwargs)
3810
3811 def GetBackground(*args, **kwargs):
3812 """
3813 GetBackground(self) -> Brush
3814
3815 Gets the brush used for painting the background.
3816 """
3817 return _gdi_.DC_GetBackground(*args, **kwargs)
3818
3819 def GetBrush(*args, **kwargs):
3820 """
3821 GetBrush(self) -> Brush
3822
3823 Gets the current brush
3824 """
3825 return _gdi_.DC_GetBrush(*args, **kwargs)
3826
3827 def GetFont(*args, **kwargs):
3828 """
3829 GetFont(self) -> Font
3830
3831 Gets the current font
3832 """
3833 return _gdi_.DC_GetFont(*args, **kwargs)
3834
3835 def GetPen(*args, **kwargs):
3836 """
3837 GetPen(self) -> Pen
3838
3839 Gets the current pen
3840 """
3841 return _gdi_.DC_GetPen(*args, **kwargs)
3842
3843 def GetTextBackground(*args, **kwargs):
3844 """
3845 GetTextBackground(self) -> Colour
3846
3847 Gets the current text background colour
3848 """
3849 return _gdi_.DC_GetTextBackground(*args, **kwargs)
3850
3851 def GetTextForeground(*args, **kwargs):
3852 """
3853 GetTextForeground(self) -> Colour
3854
3855 Gets the current text foreground colour
3856 """
3857 return _gdi_.DC_GetTextForeground(*args, **kwargs)
3858
3859 def SetTextForeground(*args, **kwargs):
3860 """
3861 SetTextForeground(self, Colour colour)
3862
3863 Sets the current text foreground colour for the DC.
3864 """
3865 return _gdi_.DC_SetTextForeground(*args, **kwargs)
3866
3867 def SetTextBackground(*args, **kwargs):
3868 """
3869 SetTextBackground(self, Colour colour)
3870
3871 Sets the current text background colour for the DC.
3872 """
3873 return _gdi_.DC_SetTextBackground(*args, **kwargs)
3874
3875 def GetMapMode(*args, **kwargs):
3876 """
3877 GetMapMode(self) -> int
3878
3879 Gets the current *mapping mode* for the device context
3880 """
3881 return _gdi_.DC_GetMapMode(*args, **kwargs)
3882
3883 def SetMapMode(*args, **kwargs):
3884 """
3885 SetMapMode(self, int mode)
3886
3887 The *mapping mode* of the device context defines the unit of
3888 measurement used to convert logical units to device units. The
3889 mapping mode can be one of the following:
3890
3891 ================ =============================================
3892 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3893 of an inch.
3894 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3895 wx.MM_METRIC Each logical unit is 1 mm.
3896 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3897 wx.MM_TEXT Each logical unit is 1 pixel.
3898 ================ =============================================
3899
3900 """
3901 return _gdi_.DC_SetMapMode(*args, **kwargs)
3902
3903 def GetUserScale(*args, **kwargs):
3904 """
3905 GetUserScale(self) -> (xScale, yScale)
3906
3907 Gets the current user scale factor (set by `SetUserScale`).
3908 """
3909 return _gdi_.DC_GetUserScale(*args, **kwargs)
3910
3911 def SetUserScale(*args, **kwargs):
3912 """
3913 SetUserScale(self, double x, double y)
3914
3915 Sets the user scaling factor, useful for applications which require
3916 'zooming'.
3917 """
3918 return _gdi_.DC_SetUserScale(*args, **kwargs)
3919
3920 def GetLogicalScale(*args, **kwargs):
3921 """GetLogicalScale() -> (xScale, yScale)"""
3922 return _gdi_.DC_GetLogicalScale(*args, **kwargs)
3923
3924 def SetLogicalScale(*args, **kwargs):
3925 """SetLogicalScale(self, double x, double y)"""
3926 return _gdi_.DC_SetLogicalScale(*args, **kwargs)
3927
3928 def GetLogicalOrigin(*args, **kwargs):
3929 """GetLogicalOrigin(self) -> Point"""
3930 return _gdi_.DC_GetLogicalOrigin(*args, **kwargs)
3931
3932 def GetLogicalOriginTuple(*args, **kwargs):
3933 """GetLogicalOriginTuple() -> (x,y)"""
3934 return _gdi_.DC_GetLogicalOriginTuple(*args, **kwargs)
3935
3936 def SetLogicalOrigin(*args, **kwargs):
3937 """SetLogicalOrigin(self, int x, int y)"""
3938 return _gdi_.DC_SetLogicalOrigin(*args, **kwargs)
3939
3940 def SetLogicalOriginPoint(*args, **kwargs):
3941 """SetLogicalOriginPoint(self, Point point)"""
3942 return _gdi_.DC_SetLogicalOriginPoint(*args, **kwargs)
3943
3944 def GetDeviceOrigin(*args, **kwargs):
3945 """GetDeviceOrigin(self) -> Point"""
3946 return _gdi_.DC_GetDeviceOrigin(*args, **kwargs)
3947
3948 def GetDeviceOriginTuple(*args, **kwargs):
3949 """GetDeviceOriginTuple() -> (x,y)"""
3950 return _gdi_.DC_GetDeviceOriginTuple(*args, **kwargs)
3951
3952 def SetDeviceOrigin(*args, **kwargs):
3953 """SetDeviceOrigin(self, int x, int y)"""
3954 return _gdi_.DC_SetDeviceOrigin(*args, **kwargs)
3955
3956 def SetDeviceOriginPoint(*args, **kwargs):
3957 """SetDeviceOriginPoint(self, Point point)"""
3958 return _gdi_.DC_SetDeviceOriginPoint(*args, **kwargs)
3959
3960 def SetAxisOrientation(*args, **kwargs):
3961 """
3962 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3963
3964 Sets the x and y axis orientation (i.e., the direction from lowest to
3965 highest values on the axis). The default orientation is the natural
3966 orientation, e.g. x axis from left to right and y axis from bottom up.
3967 """
3968 return _gdi_.DC_SetAxisOrientation(*args, **kwargs)
3969
3970 def GetLogicalFunction(*args, **kwargs):
3971 """
3972 GetLogicalFunction(self) -> int
3973
3974 Gets the current logical function (set by `SetLogicalFunction`).
3975 """
3976 return _gdi_.DC_GetLogicalFunction(*args, **kwargs)
3977
3978 def SetLogicalFunction(*args, **kwargs):
3979 """
3980 SetLogicalFunction(self, int function)
3981
3982 Sets the current logical function for the device context. This
3983 determines how a source pixel (from a pen or brush colour, or source
3984 device context if using `Blit`) combines with a destination pixel in
3985 the current device context.
3986
3987 The possible values and their meaning in terms of source and
3988 destination pixel values are as follows:
3989
3990 ================ ==========================
3991 wx.AND src AND dst
3992 wx.AND_INVERT (NOT src) AND dst
3993 wx.AND_REVERSE src AND (NOT dst)
3994 wx.CLEAR 0
3995 wx.COPY src
3996 wx.EQUIV (NOT src) XOR dst
3997 wx.INVERT NOT dst
3998 wx.NAND (NOT src) OR (NOT dst)
3999 wx.NOR (NOT src) AND (NOT dst)
4000 wx.NO_OP dst
4001 wx.OR src OR dst
4002 wx.OR_INVERT (NOT src) OR dst
4003 wx.OR_REVERSE src OR (NOT dst)
4004 wx.SET 1
4005 wx.SRC_INVERT NOT src
4006 wx.XOR src XOR dst
4007 ================ ==========================
4008
4009 The default is wx.COPY, which simply draws with the current
4010 colour. The others combine the current colour and the background using
4011 a logical operation. wx.INVERT is commonly used for drawing rubber
4012 bands or moving outlines, since drawing twice reverts to the original
4013 colour.
4014
4015 """
4016 return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
4017
4018 def ComputeScaleAndOrigin(*args, **kwargs):
4019 """
4020 ComputeScaleAndOrigin(self)
4021
4022 Performs all necessary computations for given platform and context
4023 type after each change of scale and origin parameters. Usually called
4024 automatically internally after such changes.
4025
4026 """
4027 return _gdi_.DC_ComputeScaleAndOrigin(*args, **kwargs)
4028
4029 def SetOptimization(self, optimize):
4030 pass
4031 def GetOptimization(self):
4032 return False
4033
4034 SetOptimization = wx._deprecated(SetOptimization)
4035 GetOptimization = wx._deprecated(GetOptimization)
4036
4037 def CalcBoundingBox(*args, **kwargs):
4038 """
4039 CalcBoundingBox(self, int x, int y)
4040
4041 Adds the specified point to the bounding box which can be retrieved
4042 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4043 """
4044 return _gdi_.DC_CalcBoundingBox(*args, **kwargs)
4045
4046 def CalcBoundingBoxPoint(*args, **kwargs):
4047 """
4048 CalcBoundingBoxPoint(self, Point point)
4049
4050 Adds the specified point to the bounding box which can be retrieved
4051 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4052 """
4053 return _gdi_.DC_CalcBoundingBoxPoint(*args, **kwargs)
4054
4055 def ResetBoundingBox(*args, **kwargs):
4056 """
4057 ResetBoundingBox(self)
4058
4059 Resets the bounding box: after a call to this function, the bounding
4060 box doesn't contain anything.
4061 """
4062 return _gdi_.DC_ResetBoundingBox(*args, **kwargs)
4063
4064 def MinX(*args, **kwargs):
4065 """
4066 MinX(self) -> int
4067
4068 Gets the minimum horizontal extent used in drawing commands so far.
4069 """
4070 return _gdi_.DC_MinX(*args, **kwargs)
4071
4072 def MaxX(*args, **kwargs):
4073 """
4074 MaxX(self) -> int
4075
4076 Gets the maximum horizontal extent used in drawing commands so far.
4077 """
4078 return _gdi_.DC_MaxX(*args, **kwargs)
4079
4080 def MinY(*args, **kwargs):
4081 """
4082 MinY(self) -> int
4083
4084 Gets the minimum vertical extent used in drawing commands so far.
4085 """
4086 return _gdi_.DC_MinY(*args, **kwargs)
4087
4088 def MaxY(*args, **kwargs):
4089 """
4090 MaxY(self) -> int
4091
4092 Gets the maximum vertical extent used in drawing commands so far.
4093 """
4094 return _gdi_.DC_MaxY(*args, **kwargs)
4095
4096 def GetBoundingBox(*args, **kwargs):
4097 """
4098 GetBoundingBox() -> (x1,y1, x2,y2)
4099
4100 Returns the min and max points used in drawing commands so far.
4101 """
4102 return _gdi_.DC_GetBoundingBox(*args, **kwargs)
4103
4104 def __nonzero__(self): return self.Ok()
4105 def _DrawPointList(*args, **kwargs):
4106 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4107 return _gdi_.DC__DrawPointList(*args, **kwargs)
4108
4109 def _DrawLineList(*args, **kwargs):
4110 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4111 return _gdi_.DC__DrawLineList(*args, **kwargs)
4112
4113 def _DrawRectangleList(*args, **kwargs):
4114 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4115 return _gdi_.DC__DrawRectangleList(*args, **kwargs)
4116
4117 def _DrawEllipseList(*args, **kwargs):
4118 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4119 return _gdi_.DC__DrawEllipseList(*args, **kwargs)
4120
4121 def _DrawPolygonList(*args, **kwargs):
4122 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
4123 return _gdi_.DC__DrawPolygonList(*args, **kwargs)
4124
4125 def _DrawTextList(*args, **kwargs):
4126 """
4127 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
4128 PyObject backgroundList) -> PyObject
4129 """
4130 return _gdi_.DC__DrawTextList(*args, **kwargs)
4131
4132 def DrawPointList(self, points, pens=None):
4133 """
4134 Draw a list of points as quickly as possible.
4135
4136 :param points: A sequence of 2-element sequences representing
4137 each point to draw, (x,y).
4138 :param pens: If None, then the current pen is used. If a
4139 single pen then it will be used for all points. If
4140 a list of pens then there should be one for each point
4141 in points.
4142 """
4143 if pens is None:
4144 pens = []
4145 elif isinstance(pens, wx.Pen):
4146 pens = [pens]
4147 elif len(pens) != len(points):
4148 raise ValueError('points and pens must have same length')
4149 return self._DrawPointList(points, pens, [])
4150
4151
4152 def DrawLineList(self, lines, pens=None):
4153 """
4154 Draw a list of lines as quickly as possible.
4155
4156 :param lines: A sequence of 4-element sequences representing
4157 each line to draw, (x1,y1, x2,y2).
4158 :param pens: If None, then the current pen is used. If a
4159 single pen then it will be used for all lines. If
4160 a list of pens then there should be one for each line
4161 in lines.
4162 """
4163 if pens is None:
4164 pens = []
4165 elif isinstance(pens, wx.Pen):
4166 pens = [pens]
4167 elif len(pens) != len(lines):
4168 raise ValueError('lines and pens must have same length')
4169 return self._DrawLineList(lines, pens, [])
4170
4171
4172 def DrawRectangleList(self, rectangles, pens=None, brushes=None):
4173 """
4174 Draw a list of rectangles as quickly as possible.
4175
4176 :param rectangles: A sequence of 4-element sequences representing
4177 each rectangle to draw, (x,y, w,h).
4178 :param pens: If None, then the current pen is used. If a
4179 single pen then it will be used for all rectangles.
4180 If a list of pens then there should be one for each
4181 rectangle in rectangles.
4182 :param brushes: A brush or brushes to be used to fill the rectagles,
4183 with similar semantics as the pens parameter.
4184 """
4185 if pens is None:
4186 pens = []
4187 elif isinstance(pens, wx.Pen):
4188 pens = [pens]
4189 elif len(pens) != len(rectangles):
4190 raise ValueError('rectangles and pens must have same length')
4191 if brushes is None:
4192 brushes = []
4193 elif isinstance(brushes, wx.Brush):
4194 brushes = [brushes]
4195 elif len(brushes) != len(rectangles):
4196 raise ValueError('rectangles and brushes must have same length')
4197 return self._DrawRectangleList(rectangles, pens, brushes)
4198
4199
4200 def DrawEllipseList(self, ellipses, pens=None, brushes=None):
4201 """
4202 Draw a list of ellipses as quickly as possible.
4203
4204 :param ellipses: A sequence of 4-element sequences representing
4205 each ellipse to draw, (x,y, w,h).
4206 :param pens: If None, then the current pen is used. If a
4207 single pen then it will be used for all ellipses.
4208 If a list of pens then there should be one for each
4209 ellipse in ellipses.
4210 :param brushes: A brush or brushes to be used to fill the ellipses,
4211 with similar semantics as the pens parameter.
4212 """
4213 if pens is None:
4214 pens = []
4215 elif isinstance(pens, wx.Pen):
4216 pens = [pens]
4217 elif len(pens) != len(ellipses):
4218 raise ValueError('ellipses and pens must have same length')
4219 if brushes is None:
4220 brushes = []
4221 elif isinstance(brushes, wx.Brush):
4222 brushes = [brushes]
4223 elif len(brushes) != len(ellipses):
4224 raise ValueError('ellipses and brushes must have same length')
4225 return self._DrawEllipseList(ellipses, pens, brushes)
4226
4227
4228 def DrawPolygonList(self, polygons, pens=None, brushes=None):
4229 """
4230 Draw a list of polygons, each of which is a list of points.
4231
4232 :param polygons: A sequence of sequences of sequences.
4233 [[(x1,y1),(x2,y2),(x3,y3)...],
4234 [(x1,y1),(x2,y2),(x3,y3)...]]
4235
4236 :param pens: If None, then the current pen is used. If a
4237 single pen then it will be used for all polygons.
4238 If a list of pens then there should be one for each
4239 polygon.
4240 :param brushes: A brush or brushes to be used to fill the polygons,
4241 with similar semantics as the pens parameter.
4242 """
4243 if pens is None:
4244 pens = []
4245 elif isinstance(pens, wx.Pen):
4246 pens = [pens]
4247 elif len(pens) != len(polygons):
4248 raise ValueError('polygons and pens must have same length')
4249 if brushes is None:
4250 brushes = []
4251 elif isinstance(brushes, wx.Brush):
4252 brushes = [brushes]
4253 elif len(brushes) != len(polygons):
4254 raise ValueError('polygons and brushes must have same length')
4255 return self._DrawPolygonList(polygons, pens, brushes)
4256
4257
4258 def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None):
4259 """
4260 Draw a list of strings using a list of coordinants for positioning each string.
4261
4262 :param textList: A list of strings
4263 :param coords: A list of (x,y) positions
4264 :param foregrounds: A list of `wx.Colour` objects to use for the
4265 foregrounds of the strings.
4266 :param backgrounds: A list of `wx.Colour` objects to use for the
4267 backgrounds of the strings.
4268
4269 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4270 If you want backgrounds to do anything.
4271 """
4272 if type(textList) == type(''):
4273 textList = [textList]
4274 elif len(textList) != len(coords):
4275 raise ValueError('textlist and coords must have same length')
4276 if foregrounds is None:
4277 foregrounds = []
4278 elif isinstance(foregrounds, wx.Colour):
4279 foregrounds = [foregrounds]
4280 elif len(foregrounds) != len(coords):
4281 raise ValueError('foregrounds and coords must have same length')
4282 if backgrounds is None:
4283 backgrounds = []
4284 elif isinstance(backgrounds, wx.Colour):
4285 backgrounds = [backgrounds]
4286 elif len(backgrounds) != len(coords):
4287 raise ValueError('backgrounds and coords must have same length')
4288 return self._DrawTextList(textList, coords, foregrounds, backgrounds)
4289
4290 Background = property(GetBackground,SetBackground,doc="See `GetBackground` and `SetBackground`")
4291 BackgroundMode = property(GetBackgroundMode,SetBackgroundMode,doc="See `GetBackgroundMode` and `SetBackgroundMode`")
4292 BoundingBox = property(GetBoundingBox,doc="See `GetBoundingBox`")
4293 Brush = property(GetBrush,SetBrush,doc="See `GetBrush` and `SetBrush`")
4294 CharHeight = property(GetCharHeight,doc="See `GetCharHeight`")
4295 CharWidth = property(GetCharWidth,doc="See `GetCharWidth`")
4296 ClippingBox = property(GetClippingBox,doc="See `GetClippingBox`")
4297 ClippingRect = property(GetClippingRect,SetClippingRect,doc="See `GetClippingRect` and `SetClippingRect`")
4298 Depth = property(GetDepth,doc="See `GetDepth`")
4299 DeviceOrigin = property(GetDeviceOrigin,SetDeviceOrigin,doc="See `GetDeviceOrigin` and `SetDeviceOrigin`")
4300 Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`")
4301 FullTextExtent = property(GetFullTextExtent,doc="See `GetFullTextExtent`")
4302 LogicalFunction = property(GetLogicalFunction,SetLogicalFunction,doc="See `GetLogicalFunction` and `SetLogicalFunction`")
4303 LogicalOrigin = property(GetLogicalOrigin,SetLogicalOrigin,doc="See `GetLogicalOrigin` and `SetLogicalOrigin`")
4304 LogicalScale = property(GetLogicalScale,SetLogicalScale,doc="See `GetLogicalScale` and `SetLogicalScale`")
4305 MapMode = property(GetMapMode,SetMapMode,doc="See `GetMapMode` and `SetMapMode`")
4306 MultiLineTextExtent = property(GetMultiLineTextExtent,doc="See `GetMultiLineTextExtent`")
4307 Optimization = property(GetOptimization,SetOptimization,doc="See `GetOptimization` and `SetOptimization`")
4308 PPI = property(GetPPI,doc="See `GetPPI`")
4309 PartialTextExtents = property(GetPartialTextExtents,doc="See `GetPartialTextExtents`")
4310 Pen = property(GetPen,SetPen,doc="See `GetPen` and `SetPen`")
4311 Pixel = property(GetPixel,doc="See `GetPixel`")
4312 PixelPoint = property(GetPixelPoint,doc="See `GetPixelPoint`")
4313 Size = property(GetSize,doc="See `GetSize`")
4314 SizeMM = property(GetSizeMM,doc="See `GetSizeMM`")
4315 TextBackground = property(GetTextBackground,SetTextBackground,doc="See `GetTextBackground` and `SetTextBackground`")
4316 TextExtent = property(GetTextExtent,doc="See `GetTextExtent`")
4317 TextForeground = property(GetTextForeground,SetTextForeground,doc="See `GetTextForeground` and `SetTextForeground`")
4318 UserScale = property(GetUserScale,SetUserScale,doc="See `GetUserScale` and `SetUserScale`")
4319 _gdi_.DC_swigregister(DC)
4320
4321 #---------------------------------------------------------------------------
4322
4323 class MemoryDC(DC):
4324 """
4325 A memory device context provides a means to draw graphics onto a
4326 bitmap. A bitmap must be selected into the new memory DC before it may
4327 be used for anything. Typical usage is as follows::
4328
4329 dc = wx.MemoryDC()
4330 dc.SelectObject(bitmap)
4331 # draw on the dc usign any of the Draw methods
4332 dc.SelectObject(wx.NullBitmap)
4333 # the bitmap now contains wahtever was drawn upon it
4334
4335 Note that the memory DC *must* be deleted (or the bitmap selected out
4336 of it) before a bitmap can be reselected into another memory DC.
4337
4338 """
4339 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4340 __repr__ = _swig_repr
4341 def __init__(self, *args, **kwargs):
4342 """
4343 __init__(self) -> MemoryDC
4344
4345 Constructs a new memory device context.
4346
4347 Use the Ok member to test whether the constructor was successful in
4348 creating a usable device context. Don't forget to select a bitmap into
4349 the DC before drawing on it.
4350 """
4351 _gdi_.MemoryDC_swiginit(self,_gdi_.new_MemoryDC(*args, **kwargs))
4352 def SelectObject(*args, **kwargs):
4353 """
4354 SelectObject(self, Bitmap bitmap)
4355
4356 Selects the bitmap into the device context, to use as the memory
4357 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4358 the DC, and therefore the bitmap, and also to use Blit to copy the
4359 bitmap to a window.
4360
4361 If the argument is wx.NullBitmap (or some other uninitialised
4362 `wx.Bitmap`) the current bitmap is selected out of the device context,
4363 and the original bitmap restored, allowing the current bitmap to be
4364 destroyed safely.
4365 """
4366 return _gdi_.MemoryDC_SelectObject(*args, **kwargs)
4367
4368 _gdi_.MemoryDC_swigregister(MemoryDC)
4369
4370 def MemoryDCFromDC(*args, **kwargs):
4371 """
4372 MemoryDCFromDC(DC oldDC) -> MemoryDC
4373
4374 Creates a DC that is compatible with the oldDC.
4375 """
4376 val = _gdi_.new_MemoryDCFromDC(*args, **kwargs)
4377 return val
4378
4379 #---------------------------------------------------------------------------
4380
4381 BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
4382 BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
4383 class BufferedDC(MemoryDC):
4384 """
4385 This simple class provides a simple way to avoid flicker: when drawing
4386 on it, everything is in fact first drawn on an in-memory buffer (a
4387 `wx.Bitmap`) and then copied to the screen only once, when this object
4388 is destroyed.
4389
4390 It can be used in the same way as any other device
4391 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
4392 want to use it in your EVT_PAINT handler, you should look at
4393 `wx.BufferedPaintDC`.
4394
4395 """
4396 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4397 __repr__ = _swig_repr
4398 def __init__(self, *args):
4399 """
4400 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4401 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
4402
4403 Constructs a buffered DC.
4404 """
4405 _gdi_.BufferedDC_swiginit(self,_gdi_.new_BufferedDC(*args))
4406 self.__dc = args[0] # save a ref so the other dc will not be deleted before self
4407
4408 __swig_destroy__ = _gdi_.delete_BufferedDC
4409 __del__ = lambda self : None;
4410 def UnMask(*args, **kwargs):
4411 """
4412 UnMask(self)
4413
4414 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4415 can be effectively used once only). This is usually only called in
4416 the destructor.
4417 """
4418 return _gdi_.BufferedDC_UnMask(*args, **kwargs)
4419
4420 _gdi_.BufferedDC_swigregister(BufferedDC)
4421
4422 class BufferedPaintDC(BufferedDC):
4423 """
4424 This is a subclass of `wx.BufferedDC` which can be used inside of an
4425 EVT_PAINT event handler. Just create an object of this class instead
4426 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4427 flicker. The only thing to watch out for is that if you are using this
4428 class together with `wx.ScrolledWindow`, you probably do **not** want
4429 to call `wx.Window.PrepareDC` on it as it already does this internally
4430 for the real underlying `wx.PaintDC`.
4431
4432 If your window is already fully buffered in a `wx.Bitmap` then your
4433 EVT_PAINT handler can be as simple as just creating a
4434 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4435 automatically when it is destroyed. For example::
4436
4437 def OnPaint(self, event):
4438 dc = wx.BufferedPaintDC(self, self.buffer)
4439
4440
4441
4442
4443
4444 """
4445 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4446 __repr__ = _swig_repr
4447 def __init__(self, *args, **kwargs):
4448 """
4449 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4450
4451 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4452 provide the bitmap to be used for buffering or let this object create
4453 one internally (in the latter case, the size of the client part of the
4454 window is automatically used).
4455
4456
4457 """
4458 _gdi_.BufferedPaintDC_swiginit(self,_gdi_.new_BufferedPaintDC(*args, **kwargs))
4459 _gdi_.BufferedPaintDC_swigregister(BufferedPaintDC)
4460
4461 #---------------------------------------------------------------------------
4462
4463 class ScreenDC(DC):
4464 """
4465 A wxScreenDC can be used to paint anywhere on the screen. This should
4466 normally be constructed as a temporary stack object; don't store a
4467 wxScreenDC object.
4468
4469 """
4470 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4471 __repr__ = _swig_repr
4472 def __init__(self, *args, **kwargs):
4473 """
4474 __init__(self) -> ScreenDC
4475
4476 A wxScreenDC can be used to paint anywhere on the screen. This should
4477 normally be constructed as a temporary stack object; don't store a
4478 wxScreenDC object.
4479
4480 """
4481 _gdi_.ScreenDC_swiginit(self,_gdi_.new_ScreenDC(*args, **kwargs))
4482 def StartDrawingOnTopWin(*args, **kwargs):
4483 """
4484 StartDrawingOnTopWin(self, Window window) -> bool
4485
4486 Specify that the area of the screen to be drawn upon coincides with
4487 the given window.
4488
4489 :see: `EndDrawingOnTop`
4490 """
4491 return _gdi_.ScreenDC_StartDrawingOnTopWin(*args, **kwargs)
4492
4493 def StartDrawingOnTop(*args, **kwargs):
4494 """
4495 StartDrawingOnTop(self, Rect rect=None) -> bool
4496
4497 Specify that the area is the given rectangle, or the whole screen if
4498 ``None`` is passed.
4499
4500 :see: `EndDrawingOnTop`
4501 """
4502 return _gdi_.ScreenDC_StartDrawingOnTop(*args, **kwargs)
4503
4504 def EndDrawingOnTop(*args, **kwargs):
4505 """
4506 EndDrawingOnTop(self) -> bool
4507
4508 Use this in conjunction with `StartDrawingOnTop` or
4509 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4510 top of existing windows. Without this, some window systems (such as X)
4511 only allow drawing to take place underneath other windows.
4512
4513 You might use this pair of functions when implementing a drag feature,
4514 for example as in the `wx.SplitterWindow` implementation.
4515
4516 These functions are probably obsolete since the X implementations
4517 allow drawing directly on the screen now. However, the fact that this
4518 function allows the screen to be refreshed afterwards may be useful
4519 to some applications.
4520 """
4521 return _gdi_.ScreenDC_EndDrawingOnTop(*args, **kwargs)
4522
4523 _gdi_.ScreenDC_swigregister(ScreenDC)
4524
4525 #---------------------------------------------------------------------------
4526
4527 class ClientDC(DC):
4528 """
4529 A wx.ClientDC must be constructed if an application wishes to paint on
4530 the client area of a window from outside an EVT_PAINT event. This should
4531 normally be constructed as a temporary stack object; don't store a
4532 wx.ClientDC object long term.
4533
4534 To draw on a window from within an EVT_PAINT handler, construct a
4535 `wx.PaintDC` object.
4536
4537 To draw on the whole window including decorations, construct a
4538 `wx.WindowDC` object (Windows only).
4539
4540 """
4541 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4542 __repr__ = _swig_repr
4543 def __init__(self, *args, **kwargs):
4544 """
4545 __init__(self, Window win) -> ClientDC
4546
4547 Constructor. Pass the window on which you wish to paint.
4548 """
4549 _gdi_.ClientDC_swiginit(self,_gdi_.new_ClientDC(*args, **kwargs))
4550 _gdi_.ClientDC_swigregister(ClientDC)
4551
4552 #---------------------------------------------------------------------------
4553
4554 class PaintDC(DC):
4555 """
4556 A wx.PaintDC must be constructed if an application wishes to paint on
4557 the client area of a window from within an EVT_PAINT event
4558 handler. This should normally be constructed as a temporary stack
4559 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4560 handler, you **must** create a wx.PaintDC object within it even if you
4561 don't actually use it.
4562
4563 Using wx.PaintDC within EVT_PAINT handlers is important because it
4564 automatically sets the clipping area to the damaged area of the
4565 window. Attempts to draw outside this area do not appear.
4566
4567 To draw on a window from outside EVT_PAINT handlers, construct a
4568 `wx.ClientDC` object.
4569
4570 """
4571 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4572 __repr__ = _swig_repr
4573 def __init__(self, *args, **kwargs):
4574 """
4575 __init__(self, Window win) -> PaintDC
4576
4577 Constructor. Pass the window on which you wish to paint.
4578 """
4579 _gdi_.PaintDC_swiginit(self,_gdi_.new_PaintDC(*args, **kwargs))
4580 _gdi_.PaintDC_swigregister(PaintDC)
4581
4582 #---------------------------------------------------------------------------
4583
4584 class WindowDC(DC):
4585 """
4586 A wx.WindowDC must be constructed if an application wishes to paint on
4587 the whole area of a window (client and decorations). This should
4588 normally be constructed as a temporary stack object; don't store a
4589 wx.WindowDC object.
4590 """
4591 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4592 __repr__ = _swig_repr
4593 def __init__(self, *args, **kwargs):
4594 """
4595 __init__(self, Window win) -> WindowDC
4596
4597 Constructor. Pass the window on which you wish to paint.
4598 """
4599 _gdi_.WindowDC_swiginit(self,_gdi_.new_WindowDC(*args, **kwargs))
4600 _gdi_.WindowDC_swigregister(WindowDC)
4601
4602 #---------------------------------------------------------------------------
4603
4604 class MirrorDC(DC):
4605 """
4606 wx.MirrorDC is a simple wrapper class which is always associated with a
4607 real `wx.DC` object and either forwards all of its operations to it
4608 without changes (no mirroring takes place) or exchanges x and y
4609 coordinates which makes it possible to reuse the same code to draw a
4610 figure and its mirror -- i.e. reflection related to the diagonal line
4611 x == y.
4612 """
4613 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4614 __repr__ = _swig_repr
4615 def __init__(self, *args, **kwargs):
4616 """
4617 __init__(self, DC dc, bool mirror) -> MirrorDC
4618
4619 Creates a mirrored DC associated with the real *dc*. Everything drawn
4620 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4621 *mirror* is True.
4622 """
4623 _gdi_.MirrorDC_swiginit(self,_gdi_.new_MirrorDC(*args, **kwargs))
4624 _gdi_.MirrorDC_swigregister(MirrorDC)
4625
4626 #---------------------------------------------------------------------------
4627
4628 class PostScriptDC(DC):
4629 """This is a `wx.DC` that can write to PostScript files on any platform."""
4630 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4631 __repr__ = _swig_repr
4632 def __init__(self, *args, **kwargs):
4633 """
4634 __init__(self, wxPrintData printData) -> PostScriptDC
4635
4636 Constructs a PostScript printer device context from a `wx.PrintData`
4637 object.
4638 """
4639 _gdi_.PostScriptDC_swiginit(self,_gdi_.new_PostScriptDC(*args, **kwargs))
4640 def GetPrintData(*args, **kwargs):
4641 """GetPrintData(self) -> wxPrintData"""
4642 return _gdi_.PostScriptDC_GetPrintData(*args, **kwargs)
4643
4644 def SetPrintData(*args, **kwargs):
4645 """SetPrintData(self, wxPrintData data)"""
4646 return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs)
4647
4648 def SetResolution(*args, **kwargs):
4649 """
4650 SetResolution(int ppi)
4651
4652 Set resolution (in pixels per inch) that will be used in PostScript
4653 output. Default is 720ppi.
4654 """
4655 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
4656
4657 SetResolution = staticmethod(SetResolution)
4658 def GetResolution(*args, **kwargs):
4659 """
4660 GetResolution() -> int
4661
4662 Return resolution used in PostScript output.
4663 """
4664 return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
4665
4666 GetResolution = staticmethod(GetResolution)
4667 _gdi_.PostScriptDC_swigregister(PostScriptDC)
4668
4669 def PostScriptDC_SetResolution(*args, **kwargs):
4670 """
4671 PostScriptDC_SetResolution(int ppi)
4672
4673 Set resolution (in pixels per inch) that will be used in PostScript
4674 output. Default is 720ppi.
4675 """
4676 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
4677
4678 def PostScriptDC_GetResolution(*args):
4679 """
4680 PostScriptDC_GetResolution() -> int
4681
4682 Return resolution used in PostScript output.
4683 """
4684 return _gdi_.PostScriptDC_GetResolution(*args)
4685
4686 #---------------------------------------------------------------------------
4687
4688 class MetaFile(_core.Object):
4689 """Proxy of C++ MetaFile class"""
4690 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4691 __repr__ = _swig_repr
4692 def __init__(self, *args, **kwargs):
4693 """__init__(self, String filename=EmptyString) -> MetaFile"""
4694 _gdi_.MetaFile_swiginit(self,_gdi_.new_MetaFile(*args, **kwargs))
4695 __swig_destroy__ = _gdi_.delete_MetaFile
4696 __del__ = lambda self : None;
4697 def Ok(*args, **kwargs):
4698 """Ok(self) -> bool"""
4699 return _gdi_.MetaFile_Ok(*args, **kwargs)
4700
4701 def SetClipboard(*args, **kwargs):
4702 """SetClipboard(self, int width=0, int height=0) -> bool"""
4703 return _gdi_.MetaFile_SetClipboard(*args, **kwargs)
4704
4705 def GetSize(*args, **kwargs):
4706 """GetSize(self) -> Size"""
4707 return _gdi_.MetaFile_GetSize(*args, **kwargs)
4708
4709 def GetWidth(*args, **kwargs):
4710 """GetWidth(self) -> int"""
4711 return _gdi_.MetaFile_GetWidth(*args, **kwargs)
4712
4713 def GetHeight(*args, **kwargs):
4714 """GetHeight(self) -> int"""
4715 return _gdi_.MetaFile_GetHeight(*args, **kwargs)
4716
4717 def __nonzero__(self): return self.Ok()
4718 _gdi_.MetaFile_swigregister(MetaFile)
4719
4720 class MetaFileDC(DC):
4721 """Proxy of C++ MetaFileDC class"""
4722 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4723 __repr__ = _swig_repr
4724 def __init__(self, *args, **kwargs):
4725 """
4726 __init__(self, String filename=EmptyString, int width=0, int height=0,
4727 String description=EmptyString) -> MetaFileDC
4728 """
4729 _gdi_.MetaFileDC_swiginit(self,_gdi_.new_MetaFileDC(*args, **kwargs))
4730 def Close(*args, **kwargs):
4731 """Close(self) -> MetaFile"""
4732 return _gdi_.MetaFileDC_Close(*args, **kwargs)
4733
4734 _gdi_.MetaFileDC_swigregister(MetaFileDC)
4735
4736 class PrinterDC(DC):
4737 """Proxy of C++ PrinterDC class"""
4738 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4739 __repr__ = _swig_repr
4740 def __init__(self, *args, **kwargs):
4741 """__init__(self, wxPrintData printData) -> PrinterDC"""
4742 _gdi_.PrinterDC_swiginit(self,_gdi_.new_PrinterDC(*args, **kwargs))
4743 _gdi_.PrinterDC_swigregister(PrinterDC)
4744
4745 #---------------------------------------------------------------------------
4746
4747 IMAGELIST_DRAW_NORMAL = _gdi_.IMAGELIST_DRAW_NORMAL
4748 IMAGELIST_DRAW_TRANSPARENT = _gdi_.IMAGELIST_DRAW_TRANSPARENT
4749 IMAGELIST_DRAW_SELECTED = _gdi_.IMAGELIST_DRAW_SELECTED
4750 IMAGELIST_DRAW_FOCUSED = _gdi_.IMAGELIST_DRAW_FOCUSED
4751 IMAGE_LIST_NORMAL = _gdi_.IMAGE_LIST_NORMAL
4752 IMAGE_LIST_SMALL = _gdi_.IMAGE_LIST_SMALL
4753 IMAGE_LIST_STATE = _gdi_.IMAGE_LIST_STATE
4754 class ImageList(_core.Object):
4755 """Proxy of C++ ImageList class"""
4756 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4757 __repr__ = _swig_repr
4758 def __init__(self, *args, **kwargs):
4759 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4760 _gdi_.ImageList_swiginit(self,_gdi_.new_ImageList(*args, **kwargs))
4761 __swig_destroy__ = _gdi_.delete_ImageList
4762 __del__ = lambda self : None;
4763 def Add(*args, **kwargs):
4764 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4765 return _gdi_.ImageList_Add(*args, **kwargs)
4766
4767 def AddWithColourMask(*args, **kwargs):
4768 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4769 return _gdi_.ImageList_AddWithColourMask(*args, **kwargs)
4770
4771 def AddIcon(*args, **kwargs):
4772 """AddIcon(self, Icon icon) -> int"""
4773 return _gdi_.ImageList_AddIcon(*args, **kwargs)
4774
4775 def GetBitmap(*args, **kwargs):
4776 """GetBitmap(self, int index) -> Bitmap"""
4777 return _gdi_.ImageList_GetBitmap(*args, **kwargs)
4778
4779 def GetIcon(*args, **kwargs):
4780 """GetIcon(self, int index) -> Icon"""
4781 return _gdi_.ImageList_GetIcon(*args, **kwargs)
4782
4783 def Replace(*args, **kwargs):
4784 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
4785 return _gdi_.ImageList_Replace(*args, **kwargs)
4786
4787 def Draw(*args, **kwargs):
4788 """
4789 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4790 bool solidBackground=False) -> bool
4791 """
4792 return _gdi_.ImageList_Draw(*args, **kwargs)
4793
4794 def GetImageCount(*args, **kwargs):
4795 """GetImageCount(self) -> int"""
4796 return _gdi_.ImageList_GetImageCount(*args, **kwargs)
4797
4798 def Remove(*args, **kwargs):
4799 """Remove(self, int index) -> bool"""
4800 return _gdi_.ImageList_Remove(*args, **kwargs)
4801
4802 def RemoveAll(*args, **kwargs):
4803 """RemoveAll(self) -> bool"""
4804 return _gdi_.ImageList_RemoveAll(*args, **kwargs)
4805
4806 def GetSize(*args, **kwargs):
4807 """GetSize(index) -> (width,height)"""
4808 return _gdi_.ImageList_GetSize(*args, **kwargs)
4809
4810 ImageCount = property(GetImageCount,doc="See `GetImageCount`")
4811 Size = property(GetSize,doc="See `GetSize`")
4812 _gdi_.ImageList_swigregister(ImageList)
4813
4814 #---------------------------------------------------------------------------
4815
4816 class StockGDI(object):
4817 """Proxy of C++ StockGDI class"""
4818 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4819 __repr__ = _swig_repr
4820 BRUSH_BLACK = _gdi_.StockGDI_BRUSH_BLACK
4821 BRUSH_BLUE = _gdi_.StockGDI_BRUSH_BLUE
4822 BRUSH_CYAN = _gdi_.StockGDI_BRUSH_CYAN
4823 BRUSH_GREEN = _gdi_.StockGDI_BRUSH_GREEN
4824 BRUSH_GREY = _gdi_.StockGDI_BRUSH_GREY
4825 BRUSH_LIGHTGREY = _gdi_.StockGDI_BRUSH_LIGHTGREY
4826 BRUSH_MEDIUMGREY = _gdi_.StockGDI_BRUSH_MEDIUMGREY
4827 BRUSH_RED = _gdi_.StockGDI_BRUSH_RED
4828 BRUSH_TRANSPARENT = _gdi_.StockGDI_BRUSH_TRANSPARENT
4829 BRUSH_WHITE = _gdi_.StockGDI_BRUSH_WHITE
4830 COLOUR_BLACK = _gdi_.StockGDI_COLOUR_BLACK
4831 COLOUR_BLUE = _gdi_.StockGDI_COLOUR_BLUE
4832 COLOUR_CYAN = _gdi_.StockGDI_COLOUR_CYAN
4833 COLOUR_GREEN = _gdi_.StockGDI_COLOUR_GREEN
4834 COLOUR_LIGHTGREY = _gdi_.StockGDI_COLOUR_LIGHTGREY
4835 COLOUR_RED = _gdi_.StockGDI_COLOUR_RED
4836 COLOUR_WHITE = _gdi_.StockGDI_COLOUR_WHITE
4837 CURSOR_CROSS = _gdi_.StockGDI_CURSOR_CROSS
4838 CURSOR_HOURGLASS = _gdi_.StockGDI_CURSOR_HOURGLASS
4839 CURSOR_STANDARD = _gdi_.StockGDI_CURSOR_STANDARD
4840 FONT_ITALIC = _gdi_.StockGDI_FONT_ITALIC
4841 FONT_NORMAL = _gdi_.StockGDI_FONT_NORMAL
4842 FONT_SMALL = _gdi_.StockGDI_FONT_SMALL
4843 FONT_SWISS = _gdi_.StockGDI_FONT_SWISS
4844 PEN_BLACK = _gdi_.StockGDI_PEN_BLACK
4845 PEN_BLACKDASHED = _gdi_.StockGDI_PEN_BLACKDASHED
4846 PEN_CYAN = _gdi_.StockGDI_PEN_CYAN
4847 PEN_GREEN = _gdi_.StockGDI_PEN_GREEN
4848 PEN_GREY = _gdi_.StockGDI_PEN_GREY
4849 PEN_LIGHTGREY = _gdi_.StockGDI_PEN_LIGHTGREY
4850 PEN_MEDIUMGREY = _gdi_.StockGDI_PEN_MEDIUMGREY
4851 PEN_RED = _gdi_.StockGDI_PEN_RED
4852 PEN_TRANSPARENT = _gdi_.StockGDI_PEN_TRANSPARENT
4853 PEN_WHITE = _gdi_.StockGDI_PEN_WHITE
4854 ITEMCOUNT = _gdi_.StockGDI_ITEMCOUNT
4855 def __init__(self, *args, **kwargs):
4856 """__init__(self) -> StockGDI"""
4857 _gdi_.StockGDI_swiginit(self,_gdi_.new_StockGDI(*args, **kwargs))
4858 __swig_destroy__ = _gdi_.delete_StockGDI
4859 __del__ = lambda self : None;
4860 def DeleteAll(*args, **kwargs):
4861 """DeleteAll()"""
4862 return _gdi_.StockGDI_DeleteAll(*args, **kwargs)
4863
4864 DeleteAll = staticmethod(DeleteAll)
4865 def instance(*args, **kwargs):
4866 """instance() -> StockGDI"""
4867 return _gdi_.StockGDI_instance(*args, **kwargs)
4868
4869 instance = staticmethod(instance)
4870 def GetBrush(*args, **kwargs):
4871 """GetBrush(int item) -> Brush"""
4872 return _gdi_.StockGDI_GetBrush(*args, **kwargs)
4873
4874 GetBrush = staticmethod(GetBrush)
4875 def GetColour(*args, **kwargs):
4876 """GetColour(int item) -> Colour"""
4877 return _gdi_.StockGDI_GetColour(*args, **kwargs)
4878
4879 GetColour = staticmethod(GetColour)
4880 def GetCursor(*args, **kwargs):
4881 """GetCursor(int item) -> Cursor"""
4882 return _gdi_.StockGDI_GetCursor(*args, **kwargs)
4883
4884 GetCursor = staticmethod(GetCursor)
4885 def GetPen(*args, **kwargs):
4886 """GetPen(int item) -> Pen"""
4887 return _gdi_.StockGDI_GetPen(*args, **kwargs)
4888
4889 GetPen = staticmethod(GetPen)
4890 def GetFont(*args, **kwargs):
4891 """GetFont(self, int item) -> Font"""
4892 return _gdi_.StockGDI_GetFont(*args, **kwargs)
4893
4894 def _initStockObjects():
4895 import wx
4896 wx.ITALIC_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_ITALIC).this
4897 wx.NORMAL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_NORMAL).this
4898 wx.SMALL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SMALL).this
4899 wx.SWISS_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SWISS).this
4900
4901 wx.BLACK_DASHED_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACKDASHED).this
4902 wx.BLACK_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACK).this
4903 wx.CYAN_PEN.this = StockGDI.GetPen(StockGDI.PEN_CYAN).this
4904 wx.GREEN_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREEN).this
4905 wx.GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREY).this
4906 wx.LIGHT_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_LIGHTGREY).this
4907 wx.MEDIUM_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_MEDIUMGREY).this
4908 wx.RED_PEN.this = StockGDI.GetPen(StockGDI.PEN_RED).this
4909 wx.TRANSPARENT_PEN.this = StockGDI.GetPen(StockGDI.PEN_TRANSPARENT).this
4910 wx.WHITE_PEN.this = StockGDI.GetPen(StockGDI.PEN_WHITE).this
4911
4912 wx.BLACK_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLACK).this
4913 wx.BLUE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLUE).this
4914 wx.CYAN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_CYAN).this
4915 wx.GREEN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREEN).this
4916 wx.GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREY).this
4917 wx.LIGHT_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_LIGHTGREY).this
4918 wx.MEDIUM_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_MEDIUMGREY).this
4919 wx.RED_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_RED).this
4920 wx.TRANSPARENT_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_TRANSPARENT).this
4921 wx.WHITE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_WHITE).this
4922
4923 wx.BLACK.this = StockGDI.GetColour(StockGDI.COLOUR_BLACK).this
4924 wx.BLUE.this = StockGDI.GetColour(StockGDI.COLOUR_BLUE).this
4925 wx.CYAN.this = StockGDI.GetColour(StockGDI.COLOUR_CYAN).this
4926 wx.GREEN.this = StockGDI.GetColour(StockGDI.COLOUR_GREEN).this
4927 wx.LIGHT_GREY.this = StockGDI.GetColour(StockGDI.COLOUR_LIGHTGREY).this
4928 wx.RED.this = StockGDI.GetColour(StockGDI.COLOUR_RED).this
4929 wx.WHITE.this = StockGDI.GetColour(StockGDI.COLOUR_WHITE).this
4930
4931 wx.CROSS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_CROSS).this
4932 wx.HOURGLASS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_HOURGLASS).this
4933 wx.STANDARD_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_STANDARD).this
4934
4935 wx.TheFontList.this = _wxPyInitTheFontList().this
4936 wx.ThePenList.this = _wxPyInitThePenList().this
4937 wx.TheBrushList.this = _wxPyInitTheBrushList().this
4938 wx.TheColourDatabase.this = _wxPyInitTheColourDatabase().this
4939
4940
4941 _initStockObjects = staticmethod(_initStockObjects)
4942
4943 _gdi_.StockGDI_swigregister(StockGDI)
4944
4945 def StockGDI_DeleteAll(*args):
4946 """StockGDI_DeleteAll()"""
4947 return _gdi_.StockGDI_DeleteAll(*args)
4948
4949 def StockGDI_instance(*args):
4950 """StockGDI_instance() -> StockGDI"""
4951 return _gdi_.StockGDI_instance(*args)
4952
4953 def StockGDI_GetBrush(*args, **kwargs):
4954 """StockGDI_GetBrush(int item) -> Brush"""
4955 return _gdi_.StockGDI_GetBrush(*args, **kwargs)
4956
4957 def StockGDI_GetColour(*args, **kwargs):
4958 """StockGDI_GetColour(int item) -> Colour"""
4959 return _gdi_.StockGDI_GetColour(*args, **kwargs)
4960
4961 def StockGDI_GetCursor(*args, **kwargs):
4962 """StockGDI_GetCursor(int item) -> Cursor"""
4963 return _gdi_.StockGDI_GetCursor(*args, **kwargs)
4964
4965 def StockGDI_GetPen(*args, **kwargs):
4966 """StockGDI_GetPen(int item) -> Pen"""
4967 return _gdi_.StockGDI_GetPen(*args, **kwargs)
4968
4969 # Create an uninitialized instance for the stock objects, they will
4970 # be initialized later when the wx.App object is created.
4971 ITALIC_FONT = Font.__new__(Font)
4972 NORMAL_FONT = Font.__new__(Font)
4973 SMALL_FONT = Font.__new__(Font)
4974 SWISS_FONT = Font.__new__(Font)
4975
4976 BLACK_DASHED_PEN = Pen.__new__(Pen)
4977 BLACK_PEN = Pen.__new__(Pen)
4978 CYAN_PEN = Pen.__new__(Pen)
4979 GREEN_PEN = Pen.__new__(Pen)
4980 GREY_PEN = Pen.__new__(Pen)
4981 LIGHT_GREY_PEN = Pen.__new__(Pen)
4982 MEDIUM_GREY_PEN = Pen.__new__(Pen)
4983 RED_PEN = Pen.__new__(Pen)
4984 TRANSPARENT_PEN = Pen.__new__(Pen)
4985 WHITE_PEN = Pen.__new__(Pen)
4986
4987 BLACK_BRUSH = Brush.__new__(Brush)
4988 BLUE_BRUSH = Brush.__new__(Brush)
4989 CYAN_BRUSH = Brush.__new__(Brush)
4990 GREEN_BRUSH = Brush.__new__(Brush)
4991 GREY_BRUSH = Brush.__new__(Brush)
4992 LIGHT_GREY_BRUSH = Brush.__new__(Brush)
4993 MEDIUM_GREY_BRUSH = Brush.__new__(Brush)
4994 RED_BRUSH = Brush.__new__(Brush)
4995 TRANSPARENT_BRUSH = Brush.__new__(Brush)
4996 WHITE_BRUSH = Brush.__new__(Brush)
4997
4998 BLACK = Colour.__new__(Colour)
4999 BLUE = Colour.__new__(Colour)
5000 CYAN = Colour.__new__(Colour)
5001 GREEN = Colour.__new__(Colour)
5002 LIGHT_GREY = Colour.__new__(Colour)
5003 RED = Colour.__new__(Colour)
5004 WHITE = Colour.__new__(Colour)
5005
5006 CROSS_CURSOR = Cursor.__new__(Cursor)
5007 HOURGLASS_CURSOR = Cursor.__new__(Cursor)
5008 STANDARD_CURSOR = Cursor.__new__(Cursor)
5009
5010 class GDIObjListBase(object):
5011 """Proxy of C++ GDIObjListBase class"""
5012 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5013 __repr__ = _swig_repr
5014 def __init__(self, *args, **kwargs):
5015 """__init__(self) -> GDIObjListBase"""
5016 _gdi_.GDIObjListBase_swiginit(self,_gdi_.new_GDIObjListBase(*args, **kwargs))
5017 __swig_destroy__ = _gdi_.delete_GDIObjListBase
5018 __del__ = lambda self : None;
5019 _gdi_.GDIObjListBase_swigregister(GDIObjListBase)
5020 cvar = _gdi_.cvar
5021 NullBitmap = cvar.NullBitmap
5022 NullIcon = cvar.NullIcon
5023 NullCursor = cvar.NullCursor
5024 NullPen = cvar.NullPen
5025 NullBrush = cvar.NullBrush
5026 NullPalette = cvar.NullPalette
5027 NullFont = cvar.NullFont
5028 NullColour = cvar.NullColour
5029
5030 class PenList(GDIObjListBase):
5031 """Proxy of C++ PenList class"""
5032 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5033 def __init__(self): raise AttributeError, "No constructor defined"
5034 __repr__ = _swig_repr
5035 def FindOrCreatePen(*args, **kwargs):
5036 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
5037 return _gdi_.PenList_FindOrCreatePen(*args, **kwargs)
5038
5039 def AddPen(*args, **kwargs):
5040 """AddPen(self, Pen pen)"""
5041 return _gdi_.PenList_AddPen(*args, **kwargs)
5042
5043 def RemovePen(*args, **kwargs):
5044 """RemovePen(self, Pen pen)"""
5045 return _gdi_.PenList_RemovePen(*args, **kwargs)
5046
5047 AddPen = wx._deprecated(AddPen)
5048 RemovePen = wx._deprecated(RemovePen)
5049
5050 _gdi_.PenList_swigregister(PenList)
5051
5052 class BrushList(GDIObjListBase):
5053 """Proxy of C++ BrushList class"""
5054 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5055 def __init__(self): raise AttributeError, "No constructor defined"
5056 __repr__ = _swig_repr
5057 def FindOrCreateBrush(*args, **kwargs):
5058 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
5059 return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs)
5060
5061 def AddBrush(*args, **kwargs):
5062 """AddBrush(self, Brush brush)"""
5063 return _gdi_.BrushList_AddBrush(*args, **kwargs)
5064
5065 def RemoveBrush(*args, **kwargs):
5066 """RemoveBrush(self, Brush brush)"""
5067 return _gdi_.BrushList_RemoveBrush(*args, **kwargs)
5068
5069 AddBrush = wx._deprecated(AddBrush)
5070 RemoveBrush = wx._deprecated(RemoveBrush)
5071
5072 _gdi_.BrushList_swigregister(BrushList)
5073
5074 class FontList(GDIObjListBase):
5075 """Proxy of C++ FontList class"""
5076 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5077 def __init__(self): raise AttributeError, "No constructor defined"
5078 __repr__ = _swig_repr
5079 def FindOrCreateFont(*args, **kwargs):
5080 """
5081 FindOrCreateFont(self, int point_size, int family, int style, int weight,
5082 bool underline=False, String facename=EmptyString,
5083 int encoding=FONTENCODING_DEFAULT) -> Font
5084 """
5085 return _gdi_.FontList_FindOrCreateFont(*args, **kwargs)
5086
5087 def AddFont(*args, **kwargs):
5088 """AddFont(self, Font font)"""
5089 return _gdi_.FontList_AddFont(*args, **kwargs)
5090
5091 def RemoveFont(*args, **kwargs):
5092 """RemoveFont(self, Font font)"""
5093 return _gdi_.FontList_RemoveFont(*args, **kwargs)
5094
5095 AddFont = wx._deprecated(AddFont)
5096 RemoveFont = wx._deprecated(RemoveFont)
5097
5098 _gdi_.FontList_swigregister(FontList)
5099
5100 class ColourDatabase(object):
5101 """Proxy of C++ ColourDatabase class"""
5102 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5103 __repr__ = _swig_repr
5104 def __init__(self, *args, **kwargs):
5105 """__init__(self) -> ColourDatabase"""
5106 _gdi_.ColourDatabase_swiginit(self,_gdi_.new_ColourDatabase(*args, **kwargs))
5107 __swig_destroy__ = _gdi_.delete_ColourDatabase
5108 __del__ = lambda self : None;
5109 def Find(*args, **kwargs):
5110 """Find(self, String name) -> Colour"""
5111 return _gdi_.ColourDatabase_Find(*args, **kwargs)
5112
5113 def FindName(*args, **kwargs):
5114 """FindName(self, Colour colour) -> String"""
5115 return _gdi_.ColourDatabase_FindName(*args, **kwargs)
5116
5117 FindColour = Find
5118 def AddColour(*args, **kwargs):
5119 """AddColour(self, String name, Colour colour)"""
5120 return _gdi_.ColourDatabase_AddColour(*args, **kwargs)
5121
5122 def Append(*args, **kwargs):
5123 """Append(self, String name, int red, int green, int blue)"""
5124 return _gdi_.ColourDatabase_Append(*args, **kwargs)
5125
5126 _gdi_.ColourDatabase_swigregister(ColourDatabase)
5127
5128 #---------------------------------------------------------------------------
5129
5130
5131 def _wxPyInitTheFontList(*args):
5132 """_wxPyInitTheFontList() -> FontList"""
5133 return _gdi_._wxPyInitTheFontList(*args)
5134
5135 def _wxPyInitThePenList(*args):
5136 """_wxPyInitThePenList() -> PenList"""
5137 return _gdi_._wxPyInitThePenList(*args)
5138
5139 def _wxPyInitTheBrushList(*args):
5140 """_wxPyInitTheBrushList() -> BrushList"""
5141 return _gdi_._wxPyInitTheBrushList(*args)
5142
5143 def _wxPyInitTheColourDatabase(*args):
5144 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
5145 return _gdi_._wxPyInitTheColourDatabase(*args)
5146 # Create an uninitialized instance for the stock objects, they will
5147 # be initialized later when the wx.App object is created.
5148 TheFontList = FontList.__new__(FontList)
5149 ThePenList = PenList.__new__(PenList)
5150 TheBrushList = BrushList.__new__(BrushList)
5151 TheColourDatabase = ColourDatabase.__new__(ColourDatabase)
5152
5153 NullColor = NullColour
5154 #---------------------------------------------------------------------------
5155
5156 class Effects(_core.Object):
5157 """Proxy of C++ Effects class"""
5158 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5159 __repr__ = _swig_repr
5160 def __init__(self, *args, **kwargs):
5161 """__init__(self) -> Effects"""
5162 _gdi_.Effects_swiginit(self,_gdi_.new_Effects(*args, **kwargs))
5163 def GetHighlightColour(*args, **kwargs):
5164 """GetHighlightColour(self) -> Colour"""
5165 return _gdi_.Effects_GetHighlightColour(*args, **kwargs)
5166
5167 def GetLightShadow(*args, **kwargs):
5168 """GetLightShadow(self) -> Colour"""
5169 return _gdi_.Effects_GetLightShadow(*args, **kwargs)
5170
5171 def GetFaceColour(*args, **kwargs):
5172 """GetFaceColour(self) -> Colour"""
5173 return _gdi_.Effects_GetFaceColour(*args, **kwargs)
5174
5175 def GetMediumShadow(*args, **kwargs):
5176 """GetMediumShadow(self) -> Colour"""
5177 return _gdi_.Effects_GetMediumShadow(*args, **kwargs)
5178
5179 def GetDarkShadow(*args, **kwargs):
5180 """GetDarkShadow(self) -> Colour"""
5181 return _gdi_.Effects_GetDarkShadow(*args, **kwargs)
5182
5183 def SetHighlightColour(*args, **kwargs):
5184 """SetHighlightColour(self, Colour c)"""
5185 return _gdi_.Effects_SetHighlightColour(*args, **kwargs)
5186
5187 def SetLightShadow(*args, **kwargs):
5188 """SetLightShadow(self, Colour c)"""
5189 return _gdi_.Effects_SetLightShadow(*args, **kwargs)
5190
5191 def SetFaceColour(*args, **kwargs):
5192 """SetFaceColour(self, Colour c)"""
5193 return _gdi_.Effects_SetFaceColour(*args, **kwargs)
5194
5195 def SetMediumShadow(*args, **kwargs):
5196 """SetMediumShadow(self, Colour c)"""
5197 return _gdi_.Effects_SetMediumShadow(*args, **kwargs)
5198
5199 def SetDarkShadow(*args, **kwargs):
5200 """SetDarkShadow(self, Colour c)"""
5201 return _gdi_.Effects_SetDarkShadow(*args, **kwargs)
5202
5203 def Set(*args, **kwargs):
5204 """
5205 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
5206 Colour mediumShadow, Colour darkShadow)
5207 """
5208 return _gdi_.Effects_Set(*args, **kwargs)
5209
5210 def DrawSunkenEdge(*args, **kwargs):
5211 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
5212 return _gdi_.Effects_DrawSunkenEdge(*args, **kwargs)
5213
5214 def TileBitmap(*args, **kwargs):
5215 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
5216 return _gdi_.Effects_TileBitmap(*args, **kwargs)
5217
5218 DarkShadow = property(GetDarkShadow,SetDarkShadow,doc="See `GetDarkShadow` and `SetDarkShadow`")
5219 FaceColour = property(GetFaceColour,SetFaceColour,doc="See `GetFaceColour` and `SetFaceColour`")
5220 HighlightColour = property(GetHighlightColour,SetHighlightColour,doc="See `GetHighlightColour` and `SetHighlightColour`")
5221 LightShadow = property(GetLightShadow,SetLightShadow,doc="See `GetLightShadow` and `SetLightShadow`")
5222 MediumShadow = property(GetMediumShadow,SetMediumShadow,doc="See `GetMediumShadow` and `SetMediumShadow`")
5223 _gdi_.Effects_swigregister(Effects)
5224
5225 #---------------------------------------------------------------------------
5226
5227 CONTROL_DISABLED = _gdi_.CONTROL_DISABLED
5228 CONTROL_FOCUSED = _gdi_.CONTROL_FOCUSED
5229 CONTROL_PRESSED = _gdi_.CONTROL_PRESSED
5230 CONTROL_ISDEFAULT = _gdi_.CONTROL_ISDEFAULT
5231 CONTROL_ISSUBMENU = _gdi_.CONTROL_ISSUBMENU
5232 CONTROL_EXPANDED = _gdi_.CONTROL_EXPANDED
5233 CONTROL_CURRENT = _gdi_.CONTROL_CURRENT
5234 CONTROL_SELECTED = _gdi_.CONTROL_SELECTED
5235 CONTROL_CHECKED = _gdi_.CONTROL_CHECKED
5236 CONTROL_CHECKABLE = _gdi_.CONTROL_CHECKABLE
5237 CONTROL_UNDETERMINED = _gdi_.CONTROL_UNDETERMINED
5238 CONTROL_FLAGS_MASK = _gdi_.CONTROL_FLAGS_MASK
5239 CONTROL_DIRTY = _gdi_.CONTROL_DIRTY
5240 class SplitterRenderParams(object):
5241 """
5242 This is just a simple struct used as a return value of
5243 `wx.RendererNative.GetSplitterParams` and contains some platform
5244 specific metrics about splitters.
5245
5246 * widthSash: the width of the splitter sash.
5247 * border: the width of the border of the splitter window.
5248 * isHotSensitive: ``True`` if the splitter changes its
5249 appearance when the mouse is over it.
5250
5251
5252 """
5253 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5254 __repr__ = _swig_repr
5255 def __init__(self, *args, **kwargs):
5256 """
5257 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
5258
5259 This is just a simple struct used as a return value of
5260 `wx.RendererNative.GetSplitterParams` and contains some platform
5261 specific metrics about splitters.
5262
5263 * widthSash: the width of the splitter sash.
5264 * border: the width of the border of the splitter window.
5265 * isHotSensitive: ``True`` if the splitter changes its
5266 appearance when the mouse is over it.
5267
5268
5269 """
5270 _gdi_.SplitterRenderParams_swiginit(self,_gdi_.new_SplitterRenderParams(*args, **kwargs))
5271 __swig_destroy__ = _gdi_.delete_SplitterRenderParams
5272 __del__ = lambda self : None;
5273 widthSash = property(_gdi_.SplitterRenderParams_widthSash_get)
5274 border = property(_gdi_.SplitterRenderParams_border_get)
5275 isHotSensitive = property(_gdi_.SplitterRenderParams_isHotSensitive_get)
5276 _gdi_.SplitterRenderParams_swigregister(SplitterRenderParams)
5277
5278 class RendererVersion(object):
5279 """
5280 This simple struct represents the `wx.RendererNative` interface
5281 version and is only used as the return value of
5282 `wx.RendererNative.GetVersion`.
5283 """
5284 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5285 __repr__ = _swig_repr
5286 def __init__(self, *args, **kwargs):
5287 """
5288 __init__(self, int version_, int age_) -> RendererVersion
5289
5290 This simple struct represents the `wx.RendererNative` interface
5291 version and is only used as the return value of
5292 `wx.RendererNative.GetVersion`.
5293 """
5294 _gdi_.RendererVersion_swiginit(self,_gdi_.new_RendererVersion(*args, **kwargs))
5295 __swig_destroy__ = _gdi_.delete_RendererVersion
5296 __del__ = lambda self : None;
5297 Current_Version = _gdi_.RendererVersion_Current_Version
5298 Current_Age = _gdi_.RendererVersion_Current_Age
5299 def IsCompatible(*args, **kwargs):
5300 """IsCompatible(RendererVersion ver) -> bool"""
5301 return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
5302
5303 IsCompatible = staticmethod(IsCompatible)
5304 version = property(_gdi_.RendererVersion_version_get)
5305 age = property(_gdi_.RendererVersion_age_get)
5306 _gdi_.RendererVersion_swigregister(RendererVersion)
5307
5308 def RendererVersion_IsCompatible(*args, **kwargs):
5309 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
5310 return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
5311
5312 class RendererNative(object):
5313 """
5314 One of the design principles of wxWidgets is to use the native widgets
5315 on every platform in order to be as close to the native look and feel
5316 on every platform. However there are still cases when some generic
5317 widgets are needed for various reasons, but it can sometimes take a
5318 lot of messy work to make them conform to the native LnF.
5319
5320 The wx.RendererNative class is a collection of functions that have
5321 platform-specific implementations for drawing certain parts of
5322 genereic controls in ways that are as close to the native look as
5323 possible.
5324
5325 Note that each drawing function restores the `wx.DC` attributes if it
5326 changes them, so it is safe to assume that the same pen, brush and
5327 colours that were active before the call to this function are still in
5328 effect after it.
5329
5330 """
5331 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5332 def __init__(self): raise AttributeError, "No constructor defined"
5333 __repr__ = _swig_repr
5334 def DrawHeaderButton(*args, **kwargs):
5335 """
5336 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0)
5337
5338 Draw the header control button (such as what is used by `wx.ListCtrl`
5339 in report mode.)
5340 """
5341 return _gdi_.RendererNative_DrawHeaderButton(*args, **kwargs)
5342
5343 def DrawTreeItemButton(*args, **kwargs):
5344 """
5345 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
5346
5347 Draw the expanded/collapsed icon for a tree control item.
5348 """
5349 return _gdi_.RendererNative_DrawTreeItemButton(*args, **kwargs)
5350
5351 def DrawSplitterBorder(*args, **kwargs):
5352 """
5353 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
5354
5355 Draw the border for a sash window: this border must be such that the
5356 sash drawn by `DrawSplitterSash` blends into it well.
5357 """
5358 return _gdi_.RendererNative_DrawSplitterBorder(*args, **kwargs)
5359
5360 def DrawSplitterSash(*args, **kwargs):
5361 """
5362 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
5363 int flags=0)
5364
5365 Draw a sash. The orient parameter defines whether the sash should be
5366 vertical or horizontal and how the position should be interpreted.
5367 """
5368 return _gdi_.RendererNative_DrawSplitterSash(*args, **kwargs)
5369
5370 def DrawComboBoxDropButton(*args, **kwargs):
5371 """
5372 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
5373
5374 Draw a button like the one used by `wx.ComboBox` to show a drop down
5375 window. The usual appearance is a downwards pointing arrow.
5376
5377 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
5378 ``wx.CONTROL_CURRENT`` bits set.
5379 """
5380 return _gdi_.RendererNative_DrawComboBoxDropButton(*args, **kwargs)
5381
5382 def DrawDropArrow(*args, **kwargs):
5383 """
5384 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
5385
5386 Draw a drop down arrow that is suitable for use outside a combo
5387 box. Arrow will have a transparent background.
5388
5389 ``rect`` is not entirely filled by the arrow. Instead, you should use
5390 bounding rectangle of a drop down button which arrow matches the size
5391 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
5392 ``wx.CONTROL_CURRENT`` bit set.
5393 """
5394 return _gdi_.RendererNative_DrawDropArrow(*args, **kwargs)
5395
5396 def DrawCheckBox(*args, **kwargs):
5397 """
5398 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
5399
5400 Draw a check button. Flags may use wx.CONTROL_CHECKED,
5401 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
5402 """
5403 return _gdi_.RendererNative_DrawCheckBox(*args, **kwargs)
5404
5405 def DrawPushButton(*args, **kwargs):
5406 """
5407 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
5408
5409 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
5410 wx.CONTROL_ISDEFAULT
5411 """
5412 return _gdi_.RendererNative_DrawPushButton(*args, **kwargs)
5413
5414 def DrawItemSelectionRect(*args, **kwargs):
5415 """
5416 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
5417
5418 Draw rectangle indicating that an item in e.g. a list control has been
5419 selected or focused
5420
5421 The flags parameter may be:
5422
5423 ==================== ============================================
5424 wx.CONTROL_SELECTED item is selected, e.g. draw background
5425 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
5426 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
5427 background vs. grey otherwise
5428 ==================== ============================================
5429
5430 """
5431 return _gdi_.RendererNative_DrawItemSelectionRect(*args, **kwargs)
5432
5433 def GetSplitterParams(*args, **kwargs):
5434 """
5435 GetSplitterParams(self, Window win) -> SplitterRenderParams
5436
5437 Get the splitter parameters, see `wx.SplitterRenderParams`.
5438 """
5439 return _gdi_.RendererNative_GetSplitterParams(*args, **kwargs)
5440
5441 def Get(*args, **kwargs):
5442 """
5443 Get() -> RendererNative
5444
5445 Return the currently used renderer
5446 """
5447 return _gdi_.RendererNative_Get(*args, **kwargs)
5448
5449 Get = staticmethod(Get)
5450 def GetGeneric(*args, **kwargs):
5451 """
5452 GetGeneric() -> RendererNative
5453
5454 Return the generic implementation of the renderer. Under some
5455 platforms, this is the default renderer implementation, others have
5456 platform-specific default renderer which can be retrieved by calling
5457 `wx.RendererNative.GetDefault`.
5458 """
5459 return _gdi_.RendererNative_GetGeneric(*args, **kwargs)
5460
5461 GetGeneric = staticmethod(GetGeneric)
5462 def GetDefault(*args, **kwargs):
5463 """
5464 GetDefault() -> RendererNative
5465
5466 Return the default (native) implementation for this platform -- this
5467 is also the one used by default but this may be changed by calling
5468 `wx.RendererNative.Set` in which case the return value of this method
5469 may be different from the return value of `wx.RendererNative.Get`.
5470 """
5471 return _gdi_.RendererNative_GetDefault(*args, **kwargs)
5472
5473 GetDefault = staticmethod(GetDefault)
5474 def Set(*args, **kwargs):
5475 """
5476 Set(RendererNative renderer) -> RendererNative
5477
5478 Set the renderer to use, passing None reverts to using the default
5479 renderer. Returns the previous renderer used with Set or None.
5480 """
5481 return _gdi_.RendererNative_Set(*args, **kwargs)
5482
5483 Set = staticmethod(Set)
5484 def GetVersion(*args, **kwargs):
5485 """
5486 GetVersion(self) -> RendererVersion
5487
5488 Returns the version of the renderer. Will be used for ensuring
5489 compatibility of dynamically loaded renderers.
5490 """
5491 return _gdi_.RendererNative_GetVersion(*args, **kwargs)
5492
5493 _gdi_.RendererNative_swigregister(RendererNative)
5494
5495 def RendererNative_Get(*args):
5496 """
5497 RendererNative_Get() -> RendererNative
5498
5499 Return the currently used renderer
5500 """
5501 return _gdi_.RendererNative_Get(*args)
5502
5503 def RendererNative_GetGeneric(*args):
5504 """
5505 RendererNative_GetGeneric() -> RendererNative
5506
5507 Return the generic implementation of the renderer. Under some
5508 platforms, this is the default renderer implementation, others have
5509 platform-specific default renderer which can be retrieved by calling
5510 `wx.RendererNative.GetDefault`.
5511 """
5512 return _gdi_.RendererNative_GetGeneric(*args)
5513
5514 def RendererNative_GetDefault(*args):
5515 """
5516 RendererNative_GetDefault() -> RendererNative
5517
5518 Return the default (native) implementation for this platform -- this
5519 is also the one used by default but this may be changed by calling
5520 `wx.RendererNative.Set` in which case the return value of this method
5521 may be different from the return value of `wx.RendererNative.Get`.
5522 """
5523 return _gdi_.RendererNative_GetDefault(*args)
5524
5525 def RendererNative_Set(*args, **kwargs):
5526 """
5527 RendererNative_Set(RendererNative renderer) -> RendererNative
5528
5529 Set the renderer to use, passing None reverts to using the default
5530 renderer. Returns the previous renderer used with Set or None.
5531 """
5532 return _gdi_.RendererNative_Set(*args, **kwargs)
5533
5534 #---------------------------------------------------------------------------
5535
5536 class PseudoDC(_core.Object):
5537 """
5538 A PseudoDC is an object that can be used as if it were a `wx.DC`. All
5539 commands issued to the PseudoDC are stored in a list. You can then
5540 play these commands back to a real DC object using the DrawToDC
5541 method. Commands in the command list are indexed by ID. You can use
5542 this to clear the operations associated with a single ID and then
5543 re-draw the object associated with that ID.
5544 """
5545 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5546 __repr__ = _swig_repr
5547 def __init__(self, *args, **kwargs):
5548 """
5549 __init__(self) -> PseudoDC
5550
5551 Constructs a new Pseudo device context for recording dc operations
5552 """
5553 _gdi_.PseudoDC_swiginit(self,_gdi_.new_PseudoDC(*args, **kwargs))
5554 def BeginDrawing(*args, **kwargs):
5555 """
5556 BeginDrawing(self)
5557
5558 Allows for optimization of drawing code on platforms that need it. On
5559 other platforms this is just an empty function and is harmless. To
5560 take advantage of this postential optimization simply enclose each
5561 group of calls to the drawing primitives within calls to
5562 `BeginDrawing` and `EndDrawing`.
5563 """
5564 return _gdi_.PseudoDC_BeginDrawing(*args, **kwargs)
5565
5566 def EndDrawing(*args, **kwargs):
5567 """
5568 EndDrawing(self)
5569
5570 Ends the group of drawing primitives started with `BeginDrawing`, and
5571 invokes whatever optimization is available for this DC type on the
5572 current platform.
5573 """
5574 return _gdi_.PseudoDC_EndDrawing(*args, **kwargs)
5575
5576 __swig_destroy__ = _gdi_.delete_PseudoDC
5577 __del__ = lambda self : None;
5578 def RemoveAll(*args, **kwargs):
5579 """
5580 RemoveAll(self)
5581
5582 Removes all objects and operations from the recorded list.
5583 """
5584 return _gdi_.PseudoDC_RemoveAll(*args, **kwargs)
5585
5586 def GetLen(*args, **kwargs):
5587 """
5588 GetLen(self) -> int
5589
5590 Returns the number of operations in the recorded list.
5591 """
5592 return _gdi_.PseudoDC_GetLen(*args, **kwargs)
5593
5594 def SetId(*args, **kwargs):
5595 """
5596 SetId(self, int id)
5597
5598 Sets the id to be associated with subsequent operations.
5599 """
5600 return _gdi_.PseudoDC_SetId(*args, **kwargs)
5601
5602 def ClearId(*args, **kwargs):
5603 """
5604 ClearId(self, int id)
5605
5606 Removes all operations associated with id so the object can be redrawn.
5607 """
5608 return _gdi_.PseudoDC_ClearId(*args, **kwargs)
5609
5610 def RemoveId(*args, **kwargs):
5611 """
5612 RemoveId(self, int id)
5613
5614 Remove the object node (and all operations) associated with an id.
5615 """
5616 return _gdi_.PseudoDC_RemoveId(*args, **kwargs)
5617
5618 def TranslateId(*args, **kwargs):
5619 """
5620 TranslateId(self, int id, int dx, int dy)
5621
5622 Translate the operations of id by dx,dy.
5623 """
5624 return _gdi_.PseudoDC_TranslateId(*args, **kwargs)
5625
5626 def DrawIdToDC(*args, **kwargs):
5627 """
5628 DrawIdToDC(self, int id, DC dc)
5629
5630 Draw recorded operations of id to dc.
5631 """
5632 return _gdi_.PseudoDC_DrawIdToDC(*args, **kwargs)
5633
5634 def SetIdBounds(*args, **kwargs):
5635 """
5636 SetIdBounds(self, int id, Rect rect)
5637
5638 Set the bounding rect of a given object. This will create
5639 an object node if one doesn't exist.
5640 """
5641 return _gdi_.PseudoDC_SetIdBounds(*args, **kwargs)
5642
5643 def GetIdBounds(*args, **kwargs):
5644 """
5645 GetIdBounds(self, int id) -> Rect
5646
5647 Returns the bounding rectangle previouly set with SetIdBounds. If
5648 no bounds have been set, it returns wx.Rect(0,0,0,0).
5649 """
5650 return _gdi_.PseudoDC_GetIdBounds(*args, **kwargs)
5651
5652 def DrawToDCClipped(*args, **kwargs):
5653 """
5654 DrawToDCClipped(self, DC dc, Rect rect)
5655
5656 Draws the recorded operations to dc unless the operation is known to
5657 be outside rect.
5658 """
5659 return _gdi_.PseudoDC_DrawToDCClipped(*args, **kwargs)
5660
5661 def DrawToDCClippedRgn(*args, **kwargs):
5662 """
5663 DrawToDCClippedRgn(self, DC dc, Region region)
5664
5665 Draws the recorded operations to dc unless the operation is known to
5666 be outside rect.
5667 """
5668 return _gdi_.PseudoDC_DrawToDCClippedRgn(*args, **kwargs)
5669
5670 def DrawToDC(*args, **kwargs):
5671 """
5672 DrawToDC(self, DC dc)
5673
5674 Draws the recorded operations to dc.
5675 """
5676 return _gdi_.PseudoDC_DrawToDC(*args, **kwargs)
5677
5678 def FloodFill(*args, **kwargs):
5679 """
5680 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
5681
5682 Flood fills the device context starting from the given point, using
5683 the current brush colour, and using a style:
5684
5685 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
5686 the given colour is encountered.
5687
5688 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
5689 colour.
5690
5691 Returns False if the operation failed.
5692
5693 Note: The present implementation for non-Windows platforms may fail to
5694 find colour borders if the pixels do not match the colour
5695 exactly. However the function will still return true.
5696 """
5697 return _gdi_.PseudoDC_FloodFill(*args, **kwargs)
5698
5699 def FloodFillPoint(*args, **kwargs):
5700 """
5701 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
5702
5703 Flood fills the device context starting from the given point, using
5704 the current brush colour, and using a style:
5705
5706 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
5707 the given colour is encountered.
5708
5709 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
5710 colour.
5711
5712 Returns False if the operation failed.
5713
5714 Note: The present implementation for non-Windows platforms may fail to
5715 find colour borders if the pixels do not match the colour
5716 exactly. However the function will still return true.
5717 """
5718 return _gdi_.PseudoDC_FloodFillPoint(*args, **kwargs)
5719
5720 def DrawLine(*args, **kwargs):
5721 """
5722 DrawLine(self, int x1, int y1, int x2, int y2)
5723
5724 Draws a line from the first point to the second. The current pen is
5725 used for drawing the line. Note that the second point is *not* part of
5726 the line and is not drawn by this function (this is consistent with
5727 the behaviour of many other toolkits).
5728 """
5729 return _gdi_.PseudoDC_DrawLine(*args, **kwargs)
5730
5731 def DrawLinePoint(*args, **kwargs):
5732 """
5733 DrawLinePoint(self, Point pt1, Point pt2)
5734
5735 Draws a line from the first point to the second. The current pen is
5736 used for drawing the line. Note that the second point is *not* part of
5737 the line and is not drawn by this function (this is consistent with
5738 the behaviour of many other toolkits).
5739 """
5740 return _gdi_.PseudoDC_DrawLinePoint(*args, **kwargs)
5741
5742 def CrossHair(*args, **kwargs):
5743 """
5744 CrossHair(self, int x, int y)
5745
5746 Displays a cross hair using the current pen. This is a vertical and
5747 horizontal line the height and width of the window, centred on the
5748 given point.
5749 """
5750 return _gdi_.PseudoDC_CrossHair(*args, **kwargs)
5751
5752 def CrossHairPoint(*args, **kwargs):
5753 """
5754 CrossHairPoint(self, Point pt)
5755
5756 Displays a cross hair using the current pen. This is a vertical and
5757 horizontal line the height and width of the window, centred on the
5758 given point.
5759 """
5760 return _gdi_.PseudoDC_CrossHairPoint(*args, **kwargs)
5761
5762 def DrawArc(*args, **kwargs):
5763 """
5764 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
5765
5766 Draws an arc of a circle, centred on the *center* point (xc, yc), from
5767 the first point to the second. The current pen is used for the outline
5768 and the current brush for filling the shape.
5769
5770 The arc is drawn in an anticlockwise direction from the start point to
5771 the end point.
5772 """
5773 return _gdi_.PseudoDC_DrawArc(*args, **kwargs)
5774
5775 def DrawArcPoint(*args, **kwargs):
5776 """
5777 DrawArcPoint(self, Point pt1, Point pt2, Point center)
5778
5779 Draws an arc of a circle, centred on the *center* point (xc, yc), from
5780 the first point to the second. The current pen is used for the outline
5781 and the current brush for filling the shape.
5782
5783 The arc is drawn in an anticlockwise direction from the start point to
5784 the end point.
5785 """
5786 return _gdi_.PseudoDC_DrawArcPoint(*args, **kwargs)
5787
5788 def DrawCheckMark(*args, **kwargs):
5789 """
5790 DrawCheckMark(self, int x, int y, int width, int height)
5791
5792 Draws a check mark inside the given rectangle.
5793 """
5794 return _gdi_.PseudoDC_DrawCheckMark(*args, **kwargs)
5795
5796 def DrawCheckMarkRect(*args, **kwargs):
5797 """
5798 DrawCheckMarkRect(self, Rect rect)
5799
5800 Draws a check mark inside the given rectangle.
5801 """
5802 return _gdi_.PseudoDC_DrawCheckMarkRect(*args, **kwargs)
5803
5804 def DrawEllipticArc(*args, **kwargs):
5805 """
5806 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
5807
5808 Draws an arc of an ellipse, with the given rectangle defining the
5809 bounds of the ellipse. The current pen is used for drawing the arc and
5810 the current brush is used for drawing the pie.
5811
5812 The *start* and *end* parameters specify the start and end of the arc
5813 relative to the three-o'clock position from the center of the
5814 rectangle. Angles are specified in degrees (360 is a complete
5815 circle). Positive values mean counter-clockwise motion. If start is
5816 equal to end, a complete ellipse will be drawn.
5817 """
5818 return _gdi_.PseudoDC_DrawEllipticArc(*args, **kwargs)
5819
5820 def DrawEllipticArcPointSize(*args, **kwargs):
5821 """
5822 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
5823
5824 Draws an arc of an ellipse, with the given rectangle defining the
5825 bounds of the ellipse. The current pen is used for drawing the arc and
5826 the current brush is used for drawing the pie.
5827
5828 The *start* and *end* parameters specify the start and end of the arc
5829 relative to the three-o'clock position from the center of the
5830 rectangle. Angles are specified in degrees (360 is a complete
5831 circle). Positive values mean counter-clockwise motion. If start is
5832 equal to end, a complete ellipse will be drawn.
5833 """
5834 return _gdi_.PseudoDC_DrawEllipticArcPointSize(*args, **kwargs)
5835
5836 def DrawPoint(*args, **kwargs):
5837 """
5838 DrawPoint(self, int x, int y)
5839
5840 Draws a point using the current pen.
5841 """
5842 return _gdi_.PseudoDC_DrawPoint(*args, **kwargs)
5843
5844 def DrawPointPoint(*args, **kwargs):
5845 """
5846 DrawPointPoint(self, Point pt)
5847
5848 Draws a point using the current pen.
5849 """
5850 return _gdi_.PseudoDC_DrawPointPoint(*args, **kwargs)
5851
5852 def DrawRectangle(*args, **kwargs):
5853 """
5854 DrawRectangle(self, int x, int y, int width, int height)
5855
5856 Draws a rectangle with the given top left corner, and with the given
5857 size. The current pen is used for the outline and the current brush
5858 for filling the shape.
5859 """
5860 return _gdi_.PseudoDC_DrawRectangle(*args, **kwargs)
5861
5862 def DrawRectangleRect(*args, **kwargs):
5863 """
5864 DrawRectangleRect(self, Rect rect)
5865
5866 Draws a rectangle with the given top left corner, and with the given
5867 size. The current pen is used for the outline and the current brush
5868 for filling the shape.
5869 """
5870 return _gdi_.PseudoDC_DrawRectangleRect(*args, **kwargs)
5871
5872 def DrawRectanglePointSize(*args, **kwargs):
5873 """
5874 DrawRectanglePointSize(self, Point pt, Size sz)
5875
5876 Draws a rectangle with the given top left corner, and with the given
5877 size. The current pen is used for the outline and the current brush
5878 for filling the shape.
5879 """
5880 return _gdi_.PseudoDC_DrawRectanglePointSize(*args, **kwargs)
5881
5882 def DrawRoundedRectangle(*args, **kwargs):
5883 """
5884 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
5885
5886 Draws a rectangle with the given top left corner, and with the given
5887 size. The corners are quarter-circles using the given radius. The
5888 current pen is used for the outline and the current brush for filling
5889 the shape.
5890
5891 If radius is positive, the value is assumed to be the radius of the
5892 rounded corner. If radius is negative, the absolute value is assumed
5893 to be the proportion of the smallest dimension of the rectangle. This
5894 means that the corner can be a sensible size relative to the size of
5895 the rectangle, and also avoids the strange effects X produces when the
5896 corners are too big for the rectangle.
5897 """
5898 return _gdi_.PseudoDC_DrawRoundedRectangle(*args, **kwargs)
5899
5900 def DrawRoundedRectangleRect(*args, **kwargs):
5901 """
5902 DrawRoundedRectangleRect(self, Rect r, double radius)
5903
5904 Draws a rectangle with the given top left corner, and with the given
5905 size. The corners are quarter-circles using the given radius. The
5906 current pen is used for the outline and the current brush for filling
5907 the shape.
5908
5909 If radius is positive, the value is assumed to be the radius of the
5910 rounded corner. If radius is negative, the absolute value is assumed
5911 to be the proportion of the smallest dimension of the rectangle. This
5912 means that the corner can be a sensible size relative to the size of
5913 the rectangle, and also avoids the strange effects X produces when the
5914 corners are too big for the rectangle.
5915 """
5916 return _gdi_.PseudoDC_DrawRoundedRectangleRect(*args, **kwargs)
5917
5918 def DrawRoundedRectanglePointSize(*args, **kwargs):
5919 """
5920 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
5921
5922 Draws a rectangle with the given top left corner, and with the given
5923 size. The corners are quarter-circles using the given radius. The
5924 current pen is used for the outline and the current brush for filling
5925 the shape.
5926
5927 If radius is positive, the value is assumed to be the radius of the
5928 rounded corner. If radius is negative, the absolute value is assumed
5929 to be the proportion of the smallest dimension of the rectangle. This
5930 means that the corner can be a sensible size relative to the size of
5931 the rectangle, and also avoids the strange effects X produces when the
5932 corners are too big for the rectangle.
5933 """
5934 return _gdi_.PseudoDC_DrawRoundedRectanglePointSize(*args, **kwargs)
5935
5936 def DrawCircle(*args, **kwargs):
5937 """
5938 DrawCircle(self, int x, int y, int radius)
5939
5940 Draws a circle with the given center point and radius. The current
5941 pen is used for the outline and the current brush for filling the
5942 shape.
5943 """
5944 return _gdi_.PseudoDC_DrawCircle(*args, **kwargs)
5945
5946 def DrawCirclePoint(*args, **kwargs):
5947 """
5948 DrawCirclePoint(self, Point pt, int radius)
5949
5950 Draws a circle with the given center point and radius. The current
5951 pen is used for the outline and the current brush for filling the
5952 shape.
5953 """
5954 return _gdi_.PseudoDC_DrawCirclePoint(*args, **kwargs)
5955
5956 def DrawEllipse(*args, **kwargs):
5957 """
5958 DrawEllipse(self, int x, int y, int width, int height)
5959
5960 Draws an ellipse contained in the specified rectangle. The current pen
5961 is used for the outline and the current brush for filling the shape.
5962 """
5963 return _gdi_.PseudoDC_DrawEllipse(*args, **kwargs)
5964
5965 def DrawEllipseRect(*args, **kwargs):
5966 """
5967 DrawEllipseRect(self, Rect rect)
5968
5969 Draws an ellipse contained in the specified rectangle. The current pen
5970 is used for the outline and the current brush for filling the shape.
5971 """
5972 return _gdi_.PseudoDC_DrawEllipseRect(*args, **kwargs)
5973
5974 def DrawEllipsePointSize(*args, **kwargs):
5975 """
5976 DrawEllipsePointSize(self, Point pt, Size sz)
5977
5978 Draws an ellipse contained in the specified rectangle. The current pen
5979 is used for the outline and the current brush for filling the shape.
5980 """
5981 return _gdi_.PseudoDC_DrawEllipsePointSize(*args, **kwargs)
5982
5983 def DrawIcon(*args, **kwargs):
5984 """
5985 DrawIcon(self, Icon icon, int x, int y)
5986
5987 Draw an icon on the display (does nothing if the device context is
5988 PostScript). This can be the simplest way of drawing bitmaps on a
5989 window.
5990 """
5991 return _gdi_.PseudoDC_DrawIcon(*args, **kwargs)
5992
5993 def DrawIconPoint(*args, **kwargs):
5994 """
5995 DrawIconPoint(self, Icon icon, Point pt)
5996
5997 Draw an icon on the display (does nothing if the device context is
5998 PostScript). This can be the simplest way of drawing bitmaps on a
5999 window.
6000 """
6001 return _gdi_.PseudoDC_DrawIconPoint(*args, **kwargs)
6002
6003 def DrawBitmap(*args, **kwargs):
6004 """
6005 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
6006
6007 Draw a bitmap on the device context at the specified point. If
6008 *transparent* is true and the bitmap has a transparency mask, (or
6009 alpha channel on the platforms that support it) then the bitmap will
6010 be drawn transparently.
6011 """
6012 return _gdi_.PseudoDC_DrawBitmap(*args, **kwargs)
6013
6014 def DrawBitmapPoint(*args, **kwargs):
6015 """
6016 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
6017
6018 Draw a bitmap on the device context at the specified point. If
6019 *transparent* is true and the bitmap has a transparency mask, (or
6020 alpha channel on the platforms that support it) then the bitmap will
6021 be drawn transparently.
6022 """
6023 return _gdi_.PseudoDC_DrawBitmapPoint(*args, **kwargs)
6024
6025 def DrawText(*args, **kwargs):
6026 """
6027 DrawText(self, String text, int x, int y)
6028
6029 Draws a text string at the specified point, using the current text
6030 font, and the current text foreground and background colours.
6031
6032 The coordinates refer to the top-left corner of the rectangle bounding
6033 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
6034 a text string, which can be used to position the text more precisely,
6035 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
6036 not implement it.)
6037
6038 **NOTE**: under wxGTK the current logical function is used by this
6039 function but it is ignored by wxMSW. Thus, you should avoid using
6040 logical functions with this function in portable programs.
6041 """
6042 return _gdi_.PseudoDC_DrawText(*args, **kwargs)
6043
6044 def DrawTextPoint(*args, **kwargs):
6045 """
6046 DrawTextPoint(self, String text, Point pt)
6047
6048 Draws a text string at the specified point, using the current text
6049 font, and the current text foreground and background colours.
6050
6051 The coordinates refer to the top-left corner of the rectangle bounding
6052 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
6053 a text string, which can be used to position the text more precisely,
6054 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
6055 not implement it.)
6056
6057 **NOTE**: under wxGTK the current logical function is used by this
6058 function but it is ignored by wxMSW. Thus, you should avoid using
6059 logical functions with this function in portable programs.
6060 """
6061 return _gdi_.PseudoDC_DrawTextPoint(*args, **kwargs)
6062
6063 def DrawRotatedText(*args, **kwargs):
6064 """
6065 DrawRotatedText(self, String text, int x, int y, double angle)
6066
6067 Draws the text rotated by *angle* degrees, if supported by the platform.
6068
6069 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6070 function. In particular, a font different from ``wx.NORMAL_FONT``
6071 should be used as the it is not normally a TrueType
6072 font. ``wx.SWISS_FONT`` is an example of a font which is.
6073 """
6074 return _gdi_.PseudoDC_DrawRotatedText(*args, **kwargs)
6075
6076 def DrawRotatedTextPoint(*args, **kwargs):
6077 """
6078 DrawRotatedTextPoint(self, String text, Point pt, double angle)
6079
6080 Draws the text rotated by *angle* degrees, if supported by the platform.
6081
6082 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
6083 function. In particular, a font different from ``wx.NORMAL_FONT``
6084 should be used as the it is not normally a TrueType
6085 font. ``wx.SWISS_FONT`` is an example of a font which is.
6086 """
6087 return _gdi_.PseudoDC_DrawRotatedTextPoint(*args, **kwargs)
6088
6089 def DrawLines(*args, **kwargs):
6090 """
6091 DrawLines(self, List points, int xoffset=0, int yoffset=0)
6092
6093 Draws lines using a sequence of `wx.Point` objects, adding the
6094 optional offset coordinate. The current pen is used for drawing the
6095 lines.
6096 """
6097 return _gdi_.PseudoDC_DrawLines(*args, **kwargs)
6098
6099 def DrawPolygon(*args, **kwargs):
6100 """
6101 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
6102 int fillStyle=ODDEVEN_RULE)
6103
6104 Draws a filled polygon using a sequence of `wx.Point` objects, adding
6105 the optional offset coordinate. The last argument specifies the fill
6106 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
6107
6108 The current pen is used for drawing the outline, and the current brush
6109 for filling the shape. Using a transparent brush suppresses
6110 filling. Note that wxWidgets automatically closes the first and last
6111 points.
6112 """
6113 return _gdi_.PseudoDC_DrawPolygon(*args, **kwargs)
6114
6115 def DrawLabel(*args, **kwargs):
6116 """
6117 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6118 int indexAccel=-1)
6119
6120 Draw *text* within the specified rectangle, abiding by the alignment
6121 flags. Will additionally emphasize the character at *indexAccel* if
6122 it is not -1.
6123 """
6124 return _gdi_.PseudoDC_DrawLabel(*args, **kwargs)
6125
6126 def DrawImageLabel(*args, **kwargs):
6127 """
6128 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6129 int indexAccel=-1)
6130
6131 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
6132 drawing it) within the specified rectangle, abiding by the alignment
6133 flags. Will additionally emphasize the character at *indexAccel* if
6134 it is not -1.
6135 """
6136 return _gdi_.PseudoDC_DrawImageLabel(*args, **kwargs)
6137
6138 def DrawSpline(*args, **kwargs):
6139 """
6140 DrawSpline(self, List points)
6141
6142 Draws a spline between all given control points, (a list of `wx.Point`
6143 objects) using the current pen. The spline is drawn using a series of
6144 lines, using an algorithm taken from the X drawing program 'XFIG'.
6145 """
6146 return _gdi_.PseudoDC_DrawSpline(*args, **kwargs)
6147
6148 def Clear(*args, **kwargs):
6149 """
6150 Clear(self)
6151
6152 Clears the device context using the current background brush.
6153 """
6154 return _gdi_.PseudoDC_Clear(*args, **kwargs)
6155
6156 def SetFont(*args, **kwargs):
6157 """
6158 SetFont(self, Font font)
6159
6160 Sets the current font for the DC. It must be a valid font, in
6161 particular you should not pass ``wx.NullFont`` to this method.
6162 """
6163 return _gdi_.PseudoDC_SetFont(*args, **kwargs)
6164
6165 def SetPen(*args, **kwargs):
6166 """
6167 SetPen(self, Pen pen)
6168
6169 Sets the current pen for the DC.
6170
6171 If the argument is ``wx.NullPen``, the current pen is selected out of the
6172 device context, and the original pen restored.
6173 """
6174 return _gdi_.PseudoDC_SetPen(*args, **kwargs)
6175
6176 def SetBrush(*args, **kwargs):
6177 """
6178 SetBrush(self, Brush brush)
6179
6180 Sets the current brush for the DC.
6181
6182 If the argument is ``wx.NullBrush``, the current brush is selected out
6183 of the device context, and the original brush restored, allowing the
6184 current brush to be destroyed safely.
6185 """
6186 return _gdi_.PseudoDC_SetBrush(*args, **kwargs)
6187
6188 def SetBackground(*args, **kwargs):
6189 """
6190 SetBackground(self, Brush brush)
6191
6192 Sets the current background brush for the DC.
6193 """
6194 return _gdi_.PseudoDC_SetBackground(*args, **kwargs)
6195
6196 def SetBackgroundMode(*args, **kwargs):
6197 """
6198 SetBackgroundMode(self, int mode)
6199
6200 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
6201 determines whether text will be drawn with a background colour or
6202 not.
6203 """
6204 return _gdi_.PseudoDC_SetBackgroundMode(*args, **kwargs)
6205
6206 def SetPalette(*args, **kwargs):
6207 """
6208 SetPalette(self, Palette palette)
6209
6210 If this is a window DC or memory DC, assigns the given palette to the
6211 window or bitmap associated with the DC. If the argument is
6212 ``wx.NullPalette``, the current palette is selected out of the device
6213 context, and the original palette restored.
6214 """
6215 return _gdi_.PseudoDC_SetPalette(*args, **kwargs)
6216
6217 def SetTextForeground(*args, **kwargs):
6218 """
6219 SetTextForeground(self, Colour colour)
6220
6221 Sets the current text foreground colour for the DC.
6222 """
6223 return _gdi_.PseudoDC_SetTextForeground(*args, **kwargs)
6224
6225 def SetTextBackground(*args, **kwargs):
6226 """
6227 SetTextBackground(self, Colour colour)
6228
6229 Sets the current text background colour for the DC.
6230 """
6231 return _gdi_.PseudoDC_SetTextBackground(*args, **kwargs)
6232
6233 def SetLogicalFunction(*args, **kwargs):
6234 """
6235 SetLogicalFunction(self, int function)
6236
6237 Sets the current logical function for the device context. This
6238 determines how a source pixel (from a pen or brush colour, combines
6239 with a destination pixel in the current device context.
6240
6241 The possible values and their meaning in terms of source and
6242 destination pixel values are as follows:
6243
6244 ================ ==========================
6245 wx.AND src AND dst
6246 wx.AND_INVERT (NOT src) AND dst
6247 wx.AND_REVERSE src AND (NOT dst)
6248 wx.CLEAR 0
6249 wx.COPY src
6250 wx.EQUIV (NOT src) XOR dst
6251 wx.INVERT NOT dst
6252 wx.NAND (NOT src) OR (NOT dst)
6253 wx.NOR (NOT src) AND (NOT dst)
6254 wx.NO_OP dst
6255 wx.OR src OR dst
6256 wx.OR_INVERT (NOT src) OR dst
6257 wx.OR_REVERSE src OR (NOT dst)
6258 wx.SET 1
6259 wx.SRC_INVERT NOT src
6260 wx.XOR src XOR dst
6261 ================ ==========================
6262
6263 The default is wx.COPY, which simply draws with the current
6264 colour. The others combine the current colour and the background using
6265 a logical operation. wx.INVERT is commonly used for drawing rubber
6266 bands or moving outlines, since drawing twice reverts to the original
6267 colour.
6268
6269 """
6270 return _gdi_.PseudoDC_SetLogicalFunction(*args, **kwargs)
6271
6272 _gdi_.PseudoDC_swigregister(PseudoDC)
6273
6274
6275