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