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