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