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