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