]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/gtk/_gdi.py
51f8c3785a1d61ab12547618a6df9c5da84ba282
[wxWidgets.git] / wxPython / src / gtk / _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 GetDashCount(*args, **kwargs):
393 """GetDashCount(self) -> int"""
394 return _gdi_.Pen_GetDashCount(*args, **kwargs)
395
396 def __eq__(*args, **kwargs):
397 """__eq__(self, Pen other) -> bool"""
398 return _gdi_.Pen___eq__(*args, **kwargs)
399
400 def __ne__(*args, **kwargs):
401 """__ne__(self, Pen other) -> bool"""
402 return _gdi_.Pen___ne__(*args, **kwargs)
403
404 def __nonzero__(self): return self.Ok()
405
406 class PenPtr(Pen):
407 def __init__(self, this):
408 self.this = this
409 if not hasattr(self,"thisown"): self.thisown = 0
410 self.__class__ = Pen
411 _gdi_.Pen_swigregister(PenPtr)
412
413 #---------------------------------------------------------------------------
414
415 class Brush(GDIObject):
416 """
417 A brush is a drawing tool for filling in areas. It is used for
418 painting the background of rectangles, ellipses, etc. when drawing on
419 a `wx.DC`. It has a colour and a style.
420 """
421 def __repr__(self):
422 return "<%s.%s; proxy of C++ wxBrush instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
423 def __init__(self, *args, **kwargs):
424 """
425 __init__(self, Colour colour, int style=SOLID) -> Brush
426
427 Constructs a brush from a `wx.Colour` object and a style.
428 """
429 newobj = _gdi_.new_Brush(*args, **kwargs)
430 self.this = newobj.this
431 self.thisown = 1
432 del newobj.thisown
433 def __del__(self, destroy=_gdi_.delete_Brush):
434 """__del__(self)"""
435 try:
436 if self.thisown: destroy(self)
437 except: pass
438
439 def SetColour(*args, **kwargs):
440 """
441 SetColour(self, Colour col)
442
443 Set the brush's `wx.Colour`.
444 """
445 return _gdi_.Brush_SetColour(*args, **kwargs)
446
447 def SetStyle(*args, **kwargs):
448 """
449 SetStyle(self, int style)
450
451 Sets the style of the brush. See `__init__` for a listing of styles.
452 """
453 return _gdi_.Brush_SetStyle(*args, **kwargs)
454
455 def SetStipple(*args, **kwargs):
456 """
457 SetStipple(self, Bitmap stipple)
458
459 Sets the stipple `wx.Bitmap`.
460 """
461 return _gdi_.Brush_SetStipple(*args, **kwargs)
462
463 def GetColour(*args, **kwargs):
464 """
465 GetColour(self) -> Colour
466
467 Returns the `wx.Colour` of the brush.
468 """
469 return _gdi_.Brush_GetColour(*args, **kwargs)
470
471 def GetStyle(*args, **kwargs):
472 """
473 GetStyle(self) -> int
474
475 Returns the style of the brush. See `__init__` for a listing of
476 styles.
477 """
478 return _gdi_.Brush_GetStyle(*args, **kwargs)
479
480 def GetStipple(*args, **kwargs):
481 """
482 GetStipple(self) -> Bitmap
483
484 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
485 have a wx.STIPPLE style, then the return value may be non-None but an
486 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
487 """
488 return _gdi_.Brush_GetStipple(*args, **kwargs)
489
490 def IsHatch(*args, **kwargs):
491 """
492 IsHatch(self) -> bool
493
494 Is the current style a hatch type?
495 """
496 return _gdi_.Brush_IsHatch(*args, **kwargs)
497
498 def Ok(*args, **kwargs):
499 """
500 Ok(self) -> bool
501
502 Returns True if the brush is initialised and valid.
503 """
504 return _gdi_.Brush_Ok(*args, **kwargs)
505
506 def __nonzero__(self): return self.Ok()
507
508 class BrushPtr(Brush):
509 def __init__(self, this):
510 self.this = this
511 if not hasattr(self,"thisown"): self.thisown = 0
512 self.__class__ = Brush
513 _gdi_.Brush_swigregister(BrushPtr)
514
515 def BrushFromBitmap(*args, **kwargs):
516 """
517 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
518
519 Constructs a stippled brush using a bitmap.
520 """
521 val = _gdi_.new_BrushFromBitmap(*args, **kwargs)
522 val.thisown = 1
523 return val
524
525 class Bitmap(GDIObject):
526 """
527 The wx.Bitmap class encapsulates the concept of a platform-dependent
528 bitmap. It can be either monochrome or colour, and either loaded from
529 a file or created dynamically. A bitmap can be selected into a memory
530 device context (instance of `wx.MemoryDC`). This enables the bitmap to
531 be copied to a window or memory device context using `wx.DC.Blit`, or
532 to be used as a drawing surface.
533 """
534 def __repr__(self):
535 return "<%s.%s; proxy of C++ wxBitmap instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
536 def __init__(self, *args, **kwargs):
537 """
538 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
539
540 Loads a bitmap from a file.
541 """
542 newobj = _gdi_.new_Bitmap(*args, **kwargs)
543 self.this = newobj.this
544 self.thisown = 1
545 del newobj.thisown
546 def __del__(self, destroy=_gdi_.delete_Bitmap):
547 """__del__(self)"""
548 try:
549 if self.thisown: destroy(self)
550 except: pass
551
552 def Ok(*args, **kwargs):
553 """Ok(self) -> bool"""
554 return _gdi_.Bitmap_Ok(*args, **kwargs)
555
556 def GetWidth(*args, **kwargs):
557 """
558 GetWidth(self) -> int
559
560 Gets the width of the bitmap in pixels.
561 """
562 return _gdi_.Bitmap_GetWidth(*args, **kwargs)
563
564 def GetHeight(*args, **kwargs):
565 """
566 GetHeight(self) -> int
567
568 Gets the height of the bitmap in pixels.
569 """
570 return _gdi_.Bitmap_GetHeight(*args, **kwargs)
571
572 def GetDepth(*args, **kwargs):
573 """
574 GetDepth(self) -> int
575
576 Gets the colour depth of the bitmap. A value of 1 indicates a
577 monochrome bitmap.
578 """
579 return _gdi_.Bitmap_GetDepth(*args, **kwargs)
580
581 def GetSize(*args, **kwargs):
582 """
583 GetSize(self) -> Size
584
585 Get the size of the bitmap.
586 """
587 return _gdi_.Bitmap_GetSize(*args, **kwargs)
588
589 def ConvertToImage(*args, **kwargs):
590 """
591 ConvertToImage(self) -> Image
592
593 Creates a platform-independent image from a platform-dependent
594 bitmap. This preserves mask information so that bitmaps and images can
595 be converted back and forth without loss in that respect.
596 """
597 return _gdi_.Bitmap_ConvertToImage(*args, **kwargs)
598
599 def GetMask(*args, **kwargs):
600 """
601 GetMask(self) -> Mask
602
603 Gets the associated mask (if any) which may have been loaded from a
604 file or explpicitly set for the bitmap.
605
606 :see: `SetMask`, `wx.Mask`
607
608 """
609 return _gdi_.Bitmap_GetMask(*args, **kwargs)
610
611 def SetMask(*args, **kwargs):
612 """
613 SetMask(self, Mask mask)
614
615 Sets the mask for this bitmap.
616
617 :see: `GetMask`, `wx.Mask`
618
619 """
620 return _gdi_.Bitmap_SetMask(*args, **kwargs)
621
622 def SetMaskColour(*args, **kwargs):
623 """
624 SetMaskColour(self, Colour colour)
625
626 Create a Mask based on a specified colour in the Bitmap.
627 """
628 return _gdi_.Bitmap_SetMaskColour(*args, **kwargs)
629
630 def GetSubBitmap(*args, **kwargs):
631 """
632 GetSubBitmap(self, Rect rect) -> Bitmap
633
634 Returns a sub-bitmap of the current one as long as the rect belongs
635 entirely to the bitmap. This function preserves bit depth and mask
636 information.
637 """
638 return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs)
639
640 def SaveFile(*args, **kwargs):
641 """
642 SaveFile(self, String name, int type, Palette palette=None) -> bool
643
644 Saves a bitmap in the named file. See `__init__` for a description of
645 the ``type`` parameter.
646 """
647 return _gdi_.Bitmap_SaveFile(*args, **kwargs)
648
649 def LoadFile(*args, **kwargs):
650 """
651 LoadFile(self, String name, int type) -> bool
652
653 Loads a bitmap from a file. See `__init__` for a description of the
654 ``type`` parameter.
655 """
656 return _gdi_.Bitmap_LoadFile(*args, **kwargs)
657
658 def GetPalette(*args, **kwargs):
659 """GetPalette(self) -> Palette"""
660 return _gdi_.Bitmap_GetPalette(*args, **kwargs)
661
662 def CopyFromIcon(*args, **kwargs):
663 """CopyFromIcon(self, Icon icon) -> bool"""
664 return _gdi_.Bitmap_CopyFromIcon(*args, **kwargs)
665
666 def SetHeight(*args, **kwargs):
667 """
668 SetHeight(self, int height)
669
670 Set the height property (does not affect the existing bitmap data).
671 """
672 return _gdi_.Bitmap_SetHeight(*args, **kwargs)
673
674 def SetWidth(*args, **kwargs):
675 """
676 SetWidth(self, int width)
677
678 Set the width property (does not affect the existing bitmap data).
679 """
680 return _gdi_.Bitmap_SetWidth(*args, **kwargs)
681
682 def SetDepth(*args, **kwargs):
683 """
684 SetDepth(self, int depth)
685
686 Set the depth property (does not affect the existing bitmap data).
687 """
688 return _gdi_.Bitmap_SetDepth(*args, **kwargs)
689
690 def SetSize(*args, **kwargs):
691 """
692 SetSize(self, Size size)
693
694 Set the bitmap size (does not affect the existing bitmap data).
695 """
696 return _gdi_.Bitmap_SetSize(*args, **kwargs)
697
698 def __nonzero__(self): return self.Ok()
699 def __eq__(*args, **kwargs):
700 """__eq__(self, Bitmap other) -> bool"""
701 return _gdi_.Bitmap___eq__(*args, **kwargs)
702
703 def __ne__(*args, **kwargs):
704 """__ne__(self, Bitmap other) -> bool"""
705 return _gdi_.Bitmap___ne__(*args, **kwargs)
706
707
708 class BitmapPtr(Bitmap):
709 def __init__(self, this):
710 self.this = this
711 if not hasattr(self,"thisown"): self.thisown = 0
712 self.__class__ = Bitmap
713 _gdi_.Bitmap_swigregister(BitmapPtr)
714
715 def EmptyBitmap(*args, **kwargs):
716 """
717 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
718
719 Creates a new bitmap of the given size. A depth of -1 indicates the
720 depth of the current screen or visual. Some platforms only support 1
721 for monochrome and -1 for the current colour setting.
722 """
723 val = _gdi_.new_EmptyBitmap(*args, **kwargs)
724 val.thisown = 1
725 return val
726
727 def BitmapFromIcon(*args, **kwargs):
728 """
729 BitmapFromIcon(Icon icon) -> Bitmap
730
731 Create a new bitmap from a `wx.Icon` object.
732 """
733 val = _gdi_.new_BitmapFromIcon(*args, **kwargs)
734 val.thisown = 1
735 return val
736
737 def BitmapFromImage(*args, **kwargs):
738 """
739 BitmapFromImage(Image image, int depth=-1) -> Bitmap
740
741 Creates bitmap object from a `wx.Image`. This has to be done to
742 actually display a `wx.Image` as you cannot draw an image directly on
743 a window. The resulting bitmap will use the provided colour depth (or
744 that of the current screen colour depth if depth is -1) which entails
745 that a colour reduction may have to take place.
746 """
747 val = _gdi_.new_BitmapFromImage(*args, **kwargs)
748 val.thisown = 1
749 return val
750
751 def BitmapFromXPMData(*args, **kwargs):
752 """
753 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
754
755 Construct a Bitmap from a list of strings formatted as XPM data.
756 """
757 val = _gdi_.new_BitmapFromXPMData(*args, **kwargs)
758 val.thisown = 1
759 return val
760
761 def BitmapFromBits(*args, **kwargs):
762 """
763 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
764
765 Creates a bitmap from an array of bits. You should only use this
766 function for monochrome bitmaps (depth 1) in portable programs: in
767 this case the bits parameter should contain an XBM image. For other
768 bit depths, the behaviour is platform dependent.
769 """
770 val = _gdi_.new_BitmapFromBits(*args, **kwargs)
771 val.thisown = 1
772 return val
773
774 class Mask(_core.Object):
775 """
776 This class encapsulates a monochrome mask bitmap, where the masked
777 area is black and the unmasked area is white. When associated with a
778 bitmap and drawn in a device context, the unmasked area of the bitmap
779 will be drawn, and the masked area will not be drawn.
780
781 A mask may be associated with a `wx.Bitmap`. It is used in
782 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
783 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
784 mask.
785 """
786 def __repr__(self):
787 return "<%s.%s; proxy of C++ wxMask instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
788 def __init__(self, *args, **kwargs):
789 """
790 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
791
792 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
793 that indicates the transparent portions of the mask. In other words,
794 the pixels in ``bitmap`` that match ``colour`` will be the transparent
795 portions of the mask. If no ``colour`` or an invalid ``colour`` is
796 passed then BLACK is used.
797
798 :see: `wx.Bitmap`, `wx.Colour`
799 """
800 newobj = _gdi_.new_Mask(*args, **kwargs)
801 self.this = newobj.this
802 self.thisown = 1
803 del newobj.thisown
804
805 class MaskPtr(Mask):
806 def __init__(self, this):
807 self.this = this
808 if not hasattr(self,"thisown"): self.thisown = 0
809 self.__class__ = Mask
810 _gdi_.Mask_swigregister(MaskPtr)
811
812 MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
813 class Icon(GDIObject):
814 """Proxy of C++ Icon class"""
815 def __repr__(self):
816 return "<%s.%s; proxy of C++ wxIcon instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
817 def __init__(self, *args, **kwargs):
818 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
819 newobj = _gdi_.new_Icon(*args, **kwargs)
820 self.this = newobj.this
821 self.thisown = 1
822 del newobj.thisown
823 def __del__(self, destroy=_gdi_.delete_Icon):
824 """__del__(self)"""
825 try:
826 if self.thisown: destroy(self)
827 except: pass
828
829 def LoadFile(*args, **kwargs):
830 """LoadFile(self, String name, int type) -> bool"""
831 return _gdi_.Icon_LoadFile(*args, **kwargs)
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 SetConfig(*args, **kwargs):
1601 """SetConfig(self, ConfigBase config)"""
1602 return _gdi_.FontMapper_SetConfig(*args, **kwargs)
1603
1604 def SetConfigPath(*args, **kwargs):
1605 """SetConfigPath(self, String prefix)"""
1606 return _gdi_.FontMapper_SetConfigPath(*args, **kwargs)
1607
1608 def GetDefaultConfigPath(*args, **kwargs):
1609 """GetDefaultConfigPath() -> String"""
1610 return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs)
1611
1612 GetDefaultConfigPath = staticmethod(GetDefaultConfigPath)
1613 def GetAltForEncoding(*args, **kwargs):
1614 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
1615 return _gdi_.FontMapper_GetAltForEncoding(*args, **kwargs)
1616
1617 def IsEncodingAvailable(*args, **kwargs):
1618 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
1619 return _gdi_.FontMapper_IsEncodingAvailable(*args, **kwargs)
1620
1621 def SetDialogParent(*args, **kwargs):
1622 """SetDialogParent(self, Window parent)"""
1623 return _gdi_.FontMapper_SetDialogParent(*args, **kwargs)
1624
1625 def SetDialogTitle(*args, **kwargs):
1626 """SetDialogTitle(self, String title)"""
1627 return _gdi_.FontMapper_SetDialogTitle(*args, **kwargs)
1628
1629
1630 class FontMapperPtr(FontMapper):
1631 def __init__(self, this):
1632 self.this = this
1633 if not hasattr(self,"thisown"): self.thisown = 0
1634 self.__class__ = FontMapper
1635 _gdi_.FontMapper_swigregister(FontMapperPtr)
1636
1637 def FontMapper_Get(*args, **kwargs):
1638 """FontMapper_Get() -> FontMapper"""
1639 return _gdi_.FontMapper_Get(*args, **kwargs)
1640
1641 def FontMapper_Set(*args, **kwargs):
1642 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1643 return _gdi_.FontMapper_Set(*args, **kwargs)
1644
1645 def FontMapper_GetSupportedEncodingsCount(*args, **kwargs):
1646 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1647 return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs)
1648
1649 def FontMapper_GetEncoding(*args, **kwargs):
1650 """FontMapper_GetEncoding(size_t n) -> int"""
1651 return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
1652
1653 def FontMapper_GetEncodingName(*args, **kwargs):
1654 """FontMapper_GetEncodingName(int encoding) -> String"""
1655 return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
1656
1657 def FontMapper_GetEncodingDescription(*args, **kwargs):
1658 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1659 return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
1660
1661 def FontMapper_GetEncodingFromName(*args, **kwargs):
1662 """FontMapper_GetEncodingFromName(String name) -> int"""
1663 return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
1664
1665 def FontMapper_GetDefaultConfigPath(*args, **kwargs):
1666 """FontMapper_GetDefaultConfigPath() -> String"""
1667 return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs)
1668
1669 #---------------------------------------------------------------------------
1670
1671 class Font(GDIObject):
1672 """Proxy of C++ Font class"""
1673 def __repr__(self):
1674 return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1675 def __init__(self, *args, **kwargs):
1676 """
1677 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1678 String face=EmptyString,
1679 int encoding=FONTENCODING_DEFAULT) -> Font
1680 """
1681 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
1682 newobj = _gdi_.new_Font(*args, **kwargs)
1683 self.this = newobj.this
1684 self.thisown = 1
1685 del newobj.thisown
1686 def __del__(self, destroy=_gdi_.delete_Font):
1687 """__del__(self)"""
1688 try:
1689 if self.thisown: destroy(self)
1690 except: pass
1691
1692 def Ok(*args, **kwargs):
1693 """Ok(self) -> bool"""
1694 return _gdi_.Font_Ok(*args, **kwargs)
1695
1696 def __nonzero__(self): return self.Ok()
1697 def __eq__(*args, **kwargs):
1698 """__eq__(self, Font other) -> bool"""
1699 return _gdi_.Font___eq__(*args, **kwargs)
1700
1701 def __ne__(*args, **kwargs):
1702 """__ne__(self, Font other) -> bool"""
1703 return _gdi_.Font___ne__(*args, **kwargs)
1704
1705 def GetPointSize(*args, **kwargs):
1706 """GetPointSize(self) -> int"""
1707 return _gdi_.Font_GetPointSize(*args, **kwargs)
1708
1709 def GetPixelSize(*args, **kwargs):
1710 """GetPixelSize(self) -> Size"""
1711 return _gdi_.Font_GetPixelSize(*args, **kwargs)
1712
1713 def IsUsingSizeInPixels(*args, **kwargs):
1714 """IsUsingSizeInPixels(self) -> bool"""
1715 return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs)
1716
1717 def GetFamily(*args, **kwargs):
1718 """GetFamily(self) -> int"""
1719 return _gdi_.Font_GetFamily(*args, **kwargs)
1720
1721 def GetStyle(*args, **kwargs):
1722 """GetStyle(self) -> int"""
1723 return _gdi_.Font_GetStyle(*args, **kwargs)
1724
1725 def GetWeight(*args, **kwargs):
1726 """GetWeight(self) -> int"""
1727 return _gdi_.Font_GetWeight(*args, **kwargs)
1728
1729 def GetUnderlined(*args, **kwargs):
1730 """GetUnderlined(self) -> bool"""
1731 return _gdi_.Font_GetUnderlined(*args, **kwargs)
1732
1733 def GetFaceName(*args, **kwargs):
1734 """GetFaceName(self) -> String"""
1735 return _gdi_.Font_GetFaceName(*args, **kwargs)
1736
1737 def GetEncoding(*args, **kwargs):
1738 """GetEncoding(self) -> int"""
1739 return _gdi_.Font_GetEncoding(*args, **kwargs)
1740
1741 def GetNativeFontInfo(*args, **kwargs):
1742 """GetNativeFontInfo(self) -> NativeFontInfo"""
1743 return _gdi_.Font_GetNativeFontInfo(*args, **kwargs)
1744
1745 def IsFixedWidth(*args, **kwargs):
1746 """IsFixedWidth(self) -> bool"""
1747 return _gdi_.Font_IsFixedWidth(*args, **kwargs)
1748
1749 def GetNativeFontInfoDesc(*args, **kwargs):
1750 """GetNativeFontInfoDesc(self) -> String"""
1751 return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs)
1752
1753 def GetNativeFontInfoUserDesc(*args, **kwargs):
1754 """GetNativeFontInfoUserDesc(self) -> String"""
1755 return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs)
1756
1757 def SetPointSize(*args, **kwargs):
1758 """SetPointSize(self, int pointSize)"""
1759 return _gdi_.Font_SetPointSize(*args, **kwargs)
1760
1761 def SetPixelSize(*args, **kwargs):
1762 """SetPixelSize(self, Size pixelSize)"""
1763 return _gdi_.Font_SetPixelSize(*args, **kwargs)
1764
1765 def SetFamily(*args, **kwargs):
1766 """SetFamily(self, int family)"""
1767 return _gdi_.Font_SetFamily(*args, **kwargs)
1768
1769 def SetStyle(*args, **kwargs):
1770 """SetStyle(self, int style)"""
1771 return _gdi_.Font_SetStyle(*args, **kwargs)
1772
1773 def SetWeight(*args, **kwargs):
1774 """SetWeight(self, int weight)"""
1775 return _gdi_.Font_SetWeight(*args, **kwargs)
1776
1777 def SetFaceName(*args, **kwargs):
1778 """SetFaceName(self, String faceName)"""
1779 return _gdi_.Font_SetFaceName(*args, **kwargs)
1780
1781 def SetUnderlined(*args, **kwargs):
1782 """SetUnderlined(self, bool underlined)"""
1783 return _gdi_.Font_SetUnderlined(*args, **kwargs)
1784
1785 def SetEncoding(*args, **kwargs):
1786 """SetEncoding(self, int encoding)"""
1787 return _gdi_.Font_SetEncoding(*args, **kwargs)
1788
1789 def SetNativeFontInfo(*args, **kwargs):
1790 """SetNativeFontInfo(self, NativeFontInfo info)"""
1791 return _gdi_.Font_SetNativeFontInfo(*args, **kwargs)
1792
1793 def SetNativeFontInfoFromString(*args, **kwargs):
1794 """SetNativeFontInfoFromString(self, String info)"""
1795 return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs)
1796
1797 def SetNativeFontInfoUserDesc(*args, **kwargs):
1798 """SetNativeFontInfoUserDesc(self, String info)"""
1799 return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs)
1800
1801 def GetFamilyString(*args, **kwargs):
1802 """GetFamilyString(self) -> String"""
1803 return _gdi_.Font_GetFamilyString(*args, **kwargs)
1804
1805 def GetStyleString(*args, **kwargs):
1806 """GetStyleString(self) -> String"""
1807 return _gdi_.Font_GetStyleString(*args, **kwargs)
1808
1809 def GetWeightString(*args, **kwargs):
1810 """GetWeightString(self) -> String"""
1811 return _gdi_.Font_GetWeightString(*args, **kwargs)
1812
1813 def SetNoAntiAliasing(*args, **kwargs):
1814 """SetNoAntiAliasing(self, bool no=True)"""
1815 return _gdi_.Font_SetNoAntiAliasing(*args, **kwargs)
1816
1817 def GetNoAntiAliasing(*args, **kwargs):
1818 """GetNoAntiAliasing(self) -> bool"""
1819 return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs)
1820
1821 def GetDefaultEncoding(*args, **kwargs):
1822 """GetDefaultEncoding() -> int"""
1823 return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
1824
1825 GetDefaultEncoding = staticmethod(GetDefaultEncoding)
1826 def SetDefaultEncoding(*args, **kwargs):
1827 """SetDefaultEncoding(int encoding)"""
1828 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
1829
1830 SetDefaultEncoding = staticmethod(SetDefaultEncoding)
1831
1832 class FontPtr(Font):
1833 def __init__(self, this):
1834 self.this = this
1835 if not hasattr(self,"thisown"): self.thisown = 0
1836 self.__class__ = Font
1837 _gdi_.Font_swigregister(FontPtr)
1838
1839 def FontFromNativeInfo(*args, **kwargs):
1840 """FontFromNativeInfo(NativeFontInfo info) -> Font"""
1841 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
1842 val = _gdi_.new_FontFromNativeInfo(*args, **kwargs)
1843 val.thisown = 1
1844 return val
1845
1846 def FontFromNativeInfoString(*args, **kwargs):
1847 """FontFromNativeInfoString(String info) -> Font"""
1848 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
1849 val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs)
1850 val.thisown = 1
1851 return val
1852
1853 def FFont(*args, **kwargs):
1854 """
1855 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
1856 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
1857 """
1858 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
1859 val = _gdi_.new_FFont(*args, **kwargs)
1860 val.thisown = 1
1861 return val
1862
1863 def FontFromPixelSize(*args, **kwargs):
1864 """
1865 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
1866 bool underlined=False, String face=wxEmptyString,
1867 int encoding=FONTENCODING_DEFAULT) -> Font
1868 """
1869 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
1870 val = _gdi_.new_FontFromPixelSize(*args, **kwargs)
1871 val.thisown = 1
1872 return val
1873
1874 def FFontFromPixelSize(*args, **kwargs):
1875 """
1876 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
1877 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
1878 """
1879 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
1880 val = _gdi_.new_FFontFromPixelSize(*args, **kwargs)
1881 val.thisown = 1
1882 return val
1883
1884 def Font_GetDefaultEncoding(*args, **kwargs):
1885 """Font_GetDefaultEncoding() -> int"""
1886 return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
1887
1888 def Font_SetDefaultEncoding(*args, **kwargs):
1889 """Font_SetDefaultEncoding(int encoding)"""
1890 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
1891
1892 Font2 = wx._deprecated(FFont, "Use `FFont` instead.")
1893 #---------------------------------------------------------------------------
1894
1895 class FontEnumerator(object):
1896 """Proxy of C++ FontEnumerator class"""
1897 def __repr__(self):
1898 return "<%s.%s; proxy of C++ wxPyFontEnumerator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1899 def __init__(self, *args, **kwargs):
1900 """__init__(self) -> FontEnumerator"""
1901 newobj = _gdi_.new_FontEnumerator(*args, **kwargs)
1902 self.this = newobj.this
1903 self.thisown = 1
1904 del newobj.thisown
1905 self._setCallbackInfo(self, FontEnumerator, 0)
1906
1907 def __del__(self, destroy=_gdi_.delete_FontEnumerator):
1908 """__del__(self)"""
1909 try:
1910 if self.thisown: destroy(self)
1911 except: pass
1912
1913 def _setCallbackInfo(*args, **kwargs):
1914 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
1915 return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs)
1916
1917 def EnumerateFacenames(*args, **kwargs):
1918 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
1919 return _gdi_.FontEnumerator_EnumerateFacenames(*args, **kwargs)
1920
1921 def EnumerateEncodings(*args, **kwargs):
1922 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
1923 return _gdi_.FontEnumerator_EnumerateEncodings(*args, **kwargs)
1924
1925 def GetEncodings(*args, **kwargs):
1926 """GetEncodings(self) -> PyObject"""
1927 return _gdi_.FontEnumerator_GetEncodings(*args, **kwargs)
1928
1929 def GetFacenames(*args, **kwargs):
1930 """GetFacenames(self) -> PyObject"""
1931 return _gdi_.FontEnumerator_GetFacenames(*args, **kwargs)
1932
1933
1934 class FontEnumeratorPtr(FontEnumerator):
1935 def __init__(self, this):
1936 self.this = this
1937 if not hasattr(self,"thisown"): self.thisown = 0
1938 self.__class__ = FontEnumerator
1939 _gdi_.FontEnumerator_swigregister(FontEnumeratorPtr)
1940
1941 #---------------------------------------------------------------------------
1942
1943 LANGUAGE_DEFAULT = _gdi_.LANGUAGE_DEFAULT
1944 LANGUAGE_UNKNOWN = _gdi_.LANGUAGE_UNKNOWN
1945 LANGUAGE_ABKHAZIAN = _gdi_.LANGUAGE_ABKHAZIAN
1946 LANGUAGE_AFAR = _gdi_.LANGUAGE_AFAR
1947 LANGUAGE_AFRIKAANS = _gdi_.LANGUAGE_AFRIKAANS
1948 LANGUAGE_ALBANIAN = _gdi_.LANGUAGE_ALBANIAN
1949 LANGUAGE_AMHARIC = _gdi_.LANGUAGE_AMHARIC
1950 LANGUAGE_ARABIC = _gdi_.LANGUAGE_ARABIC
1951 LANGUAGE_ARABIC_ALGERIA = _gdi_.LANGUAGE_ARABIC_ALGERIA
1952 LANGUAGE_ARABIC_BAHRAIN = _gdi_.LANGUAGE_ARABIC_BAHRAIN
1953 LANGUAGE_ARABIC_EGYPT = _gdi_.LANGUAGE_ARABIC_EGYPT
1954 LANGUAGE_ARABIC_IRAQ = _gdi_.LANGUAGE_ARABIC_IRAQ
1955 LANGUAGE_ARABIC_JORDAN = _gdi_.LANGUAGE_ARABIC_JORDAN
1956 LANGUAGE_ARABIC_KUWAIT = _gdi_.LANGUAGE_ARABIC_KUWAIT
1957 LANGUAGE_ARABIC_LEBANON = _gdi_.LANGUAGE_ARABIC_LEBANON
1958 LANGUAGE_ARABIC_LIBYA = _gdi_.LANGUAGE_ARABIC_LIBYA
1959 LANGUAGE_ARABIC_MOROCCO = _gdi_.LANGUAGE_ARABIC_MOROCCO
1960 LANGUAGE_ARABIC_OMAN = _gdi_.LANGUAGE_ARABIC_OMAN
1961 LANGUAGE_ARABIC_QATAR = _gdi_.LANGUAGE_ARABIC_QATAR
1962 LANGUAGE_ARABIC_SAUDI_ARABIA = _gdi_.LANGUAGE_ARABIC_SAUDI_ARABIA
1963 LANGUAGE_ARABIC_SUDAN = _gdi_.LANGUAGE_ARABIC_SUDAN
1964 LANGUAGE_ARABIC_SYRIA = _gdi_.LANGUAGE_ARABIC_SYRIA
1965 LANGUAGE_ARABIC_TUNISIA = _gdi_.LANGUAGE_ARABIC_TUNISIA
1966 LANGUAGE_ARABIC_UAE = _gdi_.LANGUAGE_ARABIC_UAE
1967 LANGUAGE_ARABIC_YEMEN = _gdi_.LANGUAGE_ARABIC_YEMEN
1968 LANGUAGE_ARMENIAN = _gdi_.LANGUAGE_ARMENIAN
1969 LANGUAGE_ASSAMESE = _gdi_.LANGUAGE_ASSAMESE
1970 LANGUAGE_AYMARA = _gdi_.LANGUAGE_AYMARA
1971 LANGUAGE_AZERI = _gdi_.LANGUAGE_AZERI
1972 LANGUAGE_AZERI_CYRILLIC = _gdi_.LANGUAGE_AZERI_CYRILLIC
1973 LANGUAGE_AZERI_LATIN = _gdi_.LANGUAGE_AZERI_LATIN
1974 LANGUAGE_BASHKIR = _gdi_.LANGUAGE_BASHKIR
1975 LANGUAGE_BASQUE = _gdi_.LANGUAGE_BASQUE
1976 LANGUAGE_BELARUSIAN = _gdi_.LANGUAGE_BELARUSIAN
1977 LANGUAGE_BENGALI = _gdi_.LANGUAGE_BENGALI
1978 LANGUAGE_BHUTANI = _gdi_.LANGUAGE_BHUTANI
1979 LANGUAGE_BIHARI = _gdi_.LANGUAGE_BIHARI
1980 LANGUAGE_BISLAMA = _gdi_.LANGUAGE_BISLAMA
1981 LANGUAGE_BRETON = _gdi_.LANGUAGE_BRETON
1982 LANGUAGE_BULGARIAN = _gdi_.LANGUAGE_BULGARIAN
1983 LANGUAGE_BURMESE = _gdi_.LANGUAGE_BURMESE
1984 LANGUAGE_CAMBODIAN = _gdi_.LANGUAGE_CAMBODIAN
1985 LANGUAGE_CATALAN = _gdi_.LANGUAGE_CATALAN
1986 LANGUAGE_CHINESE = _gdi_.LANGUAGE_CHINESE
1987 LANGUAGE_CHINESE_SIMPLIFIED = _gdi_.LANGUAGE_CHINESE_SIMPLIFIED
1988 LANGUAGE_CHINESE_TRADITIONAL = _gdi_.LANGUAGE_CHINESE_TRADITIONAL
1989 LANGUAGE_CHINESE_HONGKONG = _gdi_.LANGUAGE_CHINESE_HONGKONG
1990 LANGUAGE_CHINESE_MACAU = _gdi_.LANGUAGE_CHINESE_MACAU
1991 LANGUAGE_CHINESE_SINGAPORE = _gdi_.LANGUAGE_CHINESE_SINGAPORE
1992 LANGUAGE_CHINESE_TAIWAN = _gdi_.LANGUAGE_CHINESE_TAIWAN
1993 LANGUAGE_CORSICAN = _gdi_.LANGUAGE_CORSICAN
1994 LANGUAGE_CROATIAN = _gdi_.LANGUAGE_CROATIAN
1995 LANGUAGE_CZECH = _gdi_.LANGUAGE_CZECH
1996 LANGUAGE_DANISH = _gdi_.LANGUAGE_DANISH
1997 LANGUAGE_DUTCH = _gdi_.LANGUAGE_DUTCH
1998 LANGUAGE_DUTCH_BELGIAN = _gdi_.LANGUAGE_DUTCH_BELGIAN
1999 LANGUAGE_ENGLISH = _gdi_.LANGUAGE_ENGLISH
2000 LANGUAGE_ENGLISH_UK = _gdi_.LANGUAGE_ENGLISH_UK
2001 LANGUAGE_ENGLISH_US = _gdi_.LANGUAGE_ENGLISH_US
2002 LANGUAGE_ENGLISH_AUSTRALIA = _gdi_.LANGUAGE_ENGLISH_AUSTRALIA
2003 LANGUAGE_ENGLISH_BELIZE = _gdi_.LANGUAGE_ENGLISH_BELIZE
2004 LANGUAGE_ENGLISH_BOTSWANA = _gdi_.LANGUAGE_ENGLISH_BOTSWANA
2005 LANGUAGE_ENGLISH_CANADA = _gdi_.LANGUAGE_ENGLISH_CANADA
2006 LANGUAGE_ENGLISH_CARIBBEAN = _gdi_.LANGUAGE_ENGLISH_CARIBBEAN
2007 LANGUAGE_ENGLISH_DENMARK = _gdi_.LANGUAGE_ENGLISH_DENMARK
2008 LANGUAGE_ENGLISH_EIRE = _gdi_.LANGUAGE_ENGLISH_EIRE
2009 LANGUAGE_ENGLISH_JAMAICA = _gdi_.LANGUAGE_ENGLISH_JAMAICA
2010 LANGUAGE_ENGLISH_NEW_ZEALAND = _gdi_.LANGUAGE_ENGLISH_NEW_ZEALAND
2011 LANGUAGE_ENGLISH_PHILIPPINES = _gdi_.LANGUAGE_ENGLISH_PHILIPPINES
2012 LANGUAGE_ENGLISH_SOUTH_AFRICA = _gdi_.LANGUAGE_ENGLISH_SOUTH_AFRICA
2013 LANGUAGE_ENGLISH_TRINIDAD = _gdi_.LANGUAGE_ENGLISH_TRINIDAD
2014 LANGUAGE_ENGLISH_ZIMBABWE = _gdi_.LANGUAGE_ENGLISH_ZIMBABWE
2015 LANGUAGE_ESPERANTO = _gdi_.LANGUAGE_ESPERANTO
2016 LANGUAGE_ESTONIAN = _gdi_.LANGUAGE_ESTONIAN
2017 LANGUAGE_FAEROESE = _gdi_.LANGUAGE_FAEROESE
2018 LANGUAGE_FARSI = _gdi_.LANGUAGE_FARSI
2019 LANGUAGE_FIJI = _gdi_.LANGUAGE_FIJI
2020 LANGUAGE_FINNISH = _gdi_.LANGUAGE_FINNISH
2021 LANGUAGE_FRENCH = _gdi_.LANGUAGE_FRENCH
2022 LANGUAGE_FRENCH_BELGIAN = _gdi_.LANGUAGE_FRENCH_BELGIAN
2023 LANGUAGE_FRENCH_CANADIAN = _gdi_.LANGUAGE_FRENCH_CANADIAN
2024 LANGUAGE_FRENCH_LUXEMBOURG = _gdi_.LANGUAGE_FRENCH_LUXEMBOURG
2025 LANGUAGE_FRENCH_MONACO = _gdi_.LANGUAGE_FRENCH_MONACO
2026 LANGUAGE_FRENCH_SWISS = _gdi_.LANGUAGE_FRENCH_SWISS
2027 LANGUAGE_FRISIAN = _gdi_.LANGUAGE_FRISIAN
2028 LANGUAGE_GALICIAN = _gdi_.LANGUAGE_GALICIAN
2029 LANGUAGE_GEORGIAN = _gdi_.LANGUAGE_GEORGIAN
2030 LANGUAGE_GERMAN = _gdi_.LANGUAGE_GERMAN
2031 LANGUAGE_GERMAN_AUSTRIAN = _gdi_.LANGUAGE_GERMAN_AUSTRIAN
2032 LANGUAGE_GERMAN_BELGIUM = _gdi_.LANGUAGE_GERMAN_BELGIUM
2033 LANGUAGE_GERMAN_LIECHTENSTEIN = _gdi_.LANGUAGE_GERMAN_LIECHTENSTEIN
2034 LANGUAGE_GERMAN_LUXEMBOURG = _gdi_.LANGUAGE_GERMAN_LUXEMBOURG
2035 LANGUAGE_GERMAN_SWISS = _gdi_.LANGUAGE_GERMAN_SWISS
2036 LANGUAGE_GREEK = _gdi_.LANGUAGE_GREEK
2037 LANGUAGE_GREENLANDIC = _gdi_.LANGUAGE_GREENLANDIC
2038 LANGUAGE_GUARANI = _gdi_.LANGUAGE_GUARANI
2039 LANGUAGE_GUJARATI = _gdi_.LANGUAGE_GUJARATI
2040 LANGUAGE_HAUSA = _gdi_.LANGUAGE_HAUSA
2041 LANGUAGE_HEBREW = _gdi_.LANGUAGE_HEBREW
2042 LANGUAGE_HINDI = _gdi_.LANGUAGE_HINDI
2043 LANGUAGE_HUNGARIAN = _gdi_.LANGUAGE_HUNGARIAN
2044 LANGUAGE_ICELANDIC = _gdi_.LANGUAGE_ICELANDIC
2045 LANGUAGE_INDONESIAN = _gdi_.LANGUAGE_INDONESIAN
2046 LANGUAGE_INTERLINGUA = _gdi_.LANGUAGE_INTERLINGUA
2047 LANGUAGE_INTERLINGUE = _gdi_.LANGUAGE_INTERLINGUE
2048 LANGUAGE_INUKTITUT = _gdi_.LANGUAGE_INUKTITUT
2049 LANGUAGE_INUPIAK = _gdi_.LANGUAGE_INUPIAK
2050 LANGUAGE_IRISH = _gdi_.LANGUAGE_IRISH
2051 LANGUAGE_ITALIAN = _gdi_.LANGUAGE_ITALIAN
2052 LANGUAGE_ITALIAN_SWISS = _gdi_.LANGUAGE_ITALIAN_SWISS
2053 LANGUAGE_JAPANESE = _gdi_.LANGUAGE_JAPANESE
2054 LANGUAGE_JAVANESE = _gdi_.LANGUAGE_JAVANESE
2055 LANGUAGE_KANNADA = _gdi_.LANGUAGE_KANNADA
2056 LANGUAGE_KASHMIRI = _gdi_.LANGUAGE_KASHMIRI
2057 LANGUAGE_KASHMIRI_INDIA = _gdi_.LANGUAGE_KASHMIRI_INDIA
2058 LANGUAGE_KAZAKH = _gdi_.LANGUAGE_KAZAKH
2059 LANGUAGE_KERNEWEK = _gdi_.LANGUAGE_KERNEWEK
2060 LANGUAGE_KINYARWANDA = _gdi_.LANGUAGE_KINYARWANDA
2061 LANGUAGE_KIRGHIZ = _gdi_.LANGUAGE_KIRGHIZ
2062 LANGUAGE_KIRUNDI = _gdi_.LANGUAGE_KIRUNDI
2063 LANGUAGE_KONKANI = _gdi_.LANGUAGE_KONKANI
2064 LANGUAGE_KOREAN = _gdi_.LANGUAGE_KOREAN
2065 LANGUAGE_KURDISH = _gdi_.LANGUAGE_KURDISH
2066 LANGUAGE_LAOTHIAN = _gdi_.LANGUAGE_LAOTHIAN
2067 LANGUAGE_LATIN = _gdi_.LANGUAGE_LATIN
2068 LANGUAGE_LATVIAN = _gdi_.LANGUAGE_LATVIAN
2069 LANGUAGE_LINGALA = _gdi_.LANGUAGE_LINGALA
2070 LANGUAGE_LITHUANIAN = _gdi_.LANGUAGE_LITHUANIAN
2071 LANGUAGE_MACEDONIAN = _gdi_.LANGUAGE_MACEDONIAN
2072 LANGUAGE_MALAGASY = _gdi_.LANGUAGE_MALAGASY
2073 LANGUAGE_MALAY = _gdi_.LANGUAGE_MALAY
2074 LANGUAGE_MALAYALAM = _gdi_.LANGUAGE_MALAYALAM
2075 LANGUAGE_MALAY_BRUNEI_DARUSSALAM = _gdi_.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2076 LANGUAGE_MALAY_MALAYSIA = _gdi_.LANGUAGE_MALAY_MALAYSIA
2077 LANGUAGE_MALTESE = _gdi_.LANGUAGE_MALTESE
2078 LANGUAGE_MANIPURI = _gdi_.LANGUAGE_MANIPURI
2079 LANGUAGE_MAORI = _gdi_.LANGUAGE_MAORI
2080 LANGUAGE_MARATHI = _gdi_.LANGUAGE_MARATHI
2081 LANGUAGE_MOLDAVIAN = _gdi_.LANGUAGE_MOLDAVIAN
2082 LANGUAGE_MONGOLIAN = _gdi_.LANGUAGE_MONGOLIAN
2083 LANGUAGE_NAURU = _gdi_.LANGUAGE_NAURU
2084 LANGUAGE_NEPALI = _gdi_.LANGUAGE_NEPALI
2085 LANGUAGE_NEPALI_INDIA = _gdi_.LANGUAGE_NEPALI_INDIA
2086 LANGUAGE_NORWEGIAN_BOKMAL = _gdi_.LANGUAGE_NORWEGIAN_BOKMAL
2087 LANGUAGE_NORWEGIAN_NYNORSK = _gdi_.LANGUAGE_NORWEGIAN_NYNORSK
2088 LANGUAGE_OCCITAN = _gdi_.LANGUAGE_OCCITAN
2089 LANGUAGE_ORIYA = _gdi_.LANGUAGE_ORIYA
2090 LANGUAGE_OROMO = _gdi_.LANGUAGE_OROMO
2091 LANGUAGE_PASHTO = _gdi_.LANGUAGE_PASHTO
2092 LANGUAGE_POLISH = _gdi_.LANGUAGE_POLISH
2093 LANGUAGE_PORTUGUESE = _gdi_.LANGUAGE_PORTUGUESE
2094 LANGUAGE_PORTUGUESE_BRAZILIAN = _gdi_.LANGUAGE_PORTUGUESE_BRAZILIAN
2095 LANGUAGE_PUNJABI = _gdi_.LANGUAGE_PUNJABI
2096 LANGUAGE_QUECHUA = _gdi_.LANGUAGE_QUECHUA
2097 LANGUAGE_RHAETO_ROMANCE = _gdi_.LANGUAGE_RHAETO_ROMANCE
2098 LANGUAGE_ROMANIAN = _gdi_.LANGUAGE_ROMANIAN
2099 LANGUAGE_RUSSIAN = _gdi_.LANGUAGE_RUSSIAN
2100 LANGUAGE_RUSSIAN_UKRAINE = _gdi_.LANGUAGE_RUSSIAN_UKRAINE
2101 LANGUAGE_SAMOAN = _gdi_.LANGUAGE_SAMOAN
2102 LANGUAGE_SANGHO = _gdi_.LANGUAGE_SANGHO
2103 LANGUAGE_SANSKRIT = _gdi_.LANGUAGE_SANSKRIT
2104 LANGUAGE_SCOTS_GAELIC = _gdi_.LANGUAGE_SCOTS_GAELIC
2105 LANGUAGE_SERBIAN = _gdi_.LANGUAGE_SERBIAN
2106 LANGUAGE_SERBIAN_CYRILLIC = _gdi_.LANGUAGE_SERBIAN_CYRILLIC
2107 LANGUAGE_SERBIAN_LATIN = _gdi_.LANGUAGE_SERBIAN_LATIN
2108 LANGUAGE_SERBO_CROATIAN = _gdi_.LANGUAGE_SERBO_CROATIAN
2109 LANGUAGE_SESOTHO = _gdi_.LANGUAGE_SESOTHO
2110 LANGUAGE_SETSWANA = _gdi_.LANGUAGE_SETSWANA
2111 LANGUAGE_SHONA = _gdi_.LANGUAGE_SHONA
2112 LANGUAGE_SINDHI = _gdi_.LANGUAGE_SINDHI
2113 LANGUAGE_SINHALESE = _gdi_.LANGUAGE_SINHALESE
2114 LANGUAGE_SISWATI = _gdi_.LANGUAGE_SISWATI
2115 LANGUAGE_SLOVAK = _gdi_.LANGUAGE_SLOVAK
2116 LANGUAGE_SLOVENIAN = _gdi_.LANGUAGE_SLOVENIAN
2117 LANGUAGE_SOMALI = _gdi_.LANGUAGE_SOMALI
2118 LANGUAGE_SPANISH = _gdi_.LANGUAGE_SPANISH
2119 LANGUAGE_SPANISH_ARGENTINA = _gdi_.LANGUAGE_SPANISH_ARGENTINA
2120 LANGUAGE_SPANISH_BOLIVIA = _gdi_.LANGUAGE_SPANISH_BOLIVIA
2121 LANGUAGE_SPANISH_CHILE = _gdi_.LANGUAGE_SPANISH_CHILE
2122 LANGUAGE_SPANISH_COLOMBIA = _gdi_.LANGUAGE_SPANISH_COLOMBIA
2123 LANGUAGE_SPANISH_COSTA_RICA = _gdi_.LANGUAGE_SPANISH_COSTA_RICA
2124 LANGUAGE_SPANISH_DOMINICAN_REPUBLIC = _gdi_.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2125 LANGUAGE_SPANISH_ECUADOR = _gdi_.LANGUAGE_SPANISH_ECUADOR
2126 LANGUAGE_SPANISH_EL_SALVADOR = _gdi_.LANGUAGE_SPANISH_EL_SALVADOR
2127 LANGUAGE_SPANISH_GUATEMALA = _gdi_.LANGUAGE_SPANISH_GUATEMALA
2128 LANGUAGE_SPANISH_HONDURAS = _gdi_.LANGUAGE_SPANISH_HONDURAS
2129 LANGUAGE_SPANISH_MEXICAN = _gdi_.LANGUAGE_SPANISH_MEXICAN
2130 LANGUAGE_SPANISH_MODERN = _gdi_.LANGUAGE_SPANISH_MODERN
2131 LANGUAGE_SPANISH_NICARAGUA = _gdi_.LANGUAGE_SPANISH_NICARAGUA
2132 LANGUAGE_SPANISH_PANAMA = _gdi_.LANGUAGE_SPANISH_PANAMA
2133 LANGUAGE_SPANISH_PARAGUAY = _gdi_.LANGUAGE_SPANISH_PARAGUAY
2134 LANGUAGE_SPANISH_PERU = _gdi_.LANGUAGE_SPANISH_PERU
2135 LANGUAGE_SPANISH_PUERTO_RICO = _gdi_.LANGUAGE_SPANISH_PUERTO_RICO
2136 LANGUAGE_SPANISH_URUGUAY = _gdi_.LANGUAGE_SPANISH_URUGUAY
2137 LANGUAGE_SPANISH_US = _gdi_.LANGUAGE_SPANISH_US
2138 LANGUAGE_SPANISH_VENEZUELA = _gdi_.LANGUAGE_SPANISH_VENEZUELA
2139 LANGUAGE_SUNDANESE = _gdi_.LANGUAGE_SUNDANESE
2140 LANGUAGE_SWAHILI = _gdi_.LANGUAGE_SWAHILI
2141 LANGUAGE_SWEDISH = _gdi_.LANGUAGE_SWEDISH
2142 LANGUAGE_SWEDISH_FINLAND = _gdi_.LANGUAGE_SWEDISH_FINLAND
2143 LANGUAGE_TAGALOG = _gdi_.LANGUAGE_TAGALOG
2144 LANGUAGE_TAJIK = _gdi_.LANGUAGE_TAJIK
2145 LANGUAGE_TAMIL = _gdi_.LANGUAGE_TAMIL
2146 LANGUAGE_TATAR = _gdi_.LANGUAGE_TATAR
2147 LANGUAGE_TELUGU = _gdi_.LANGUAGE_TELUGU
2148 LANGUAGE_THAI = _gdi_.LANGUAGE_THAI
2149 LANGUAGE_TIBETAN = _gdi_.LANGUAGE_TIBETAN
2150 LANGUAGE_TIGRINYA = _gdi_.LANGUAGE_TIGRINYA
2151 LANGUAGE_TONGA = _gdi_.LANGUAGE_TONGA
2152 LANGUAGE_TSONGA = _gdi_.LANGUAGE_TSONGA
2153 LANGUAGE_TURKISH = _gdi_.LANGUAGE_TURKISH
2154 LANGUAGE_TURKMEN = _gdi_.LANGUAGE_TURKMEN
2155 LANGUAGE_TWI = _gdi_.LANGUAGE_TWI
2156 LANGUAGE_UIGHUR = _gdi_.LANGUAGE_UIGHUR
2157 LANGUAGE_UKRAINIAN = _gdi_.LANGUAGE_UKRAINIAN
2158 LANGUAGE_URDU = _gdi_.LANGUAGE_URDU
2159 LANGUAGE_URDU_INDIA = _gdi_.LANGUAGE_URDU_INDIA
2160 LANGUAGE_URDU_PAKISTAN = _gdi_.LANGUAGE_URDU_PAKISTAN
2161 LANGUAGE_UZBEK = _gdi_.LANGUAGE_UZBEK
2162 LANGUAGE_UZBEK_CYRILLIC = _gdi_.LANGUAGE_UZBEK_CYRILLIC
2163 LANGUAGE_UZBEK_LATIN = _gdi_.LANGUAGE_UZBEK_LATIN
2164 LANGUAGE_VIETNAMESE = _gdi_.LANGUAGE_VIETNAMESE
2165 LANGUAGE_VOLAPUK = _gdi_.LANGUAGE_VOLAPUK
2166 LANGUAGE_WELSH = _gdi_.LANGUAGE_WELSH
2167 LANGUAGE_WOLOF = _gdi_.LANGUAGE_WOLOF
2168 LANGUAGE_XHOSA = _gdi_.LANGUAGE_XHOSA
2169 LANGUAGE_YIDDISH = _gdi_.LANGUAGE_YIDDISH
2170 LANGUAGE_YORUBA = _gdi_.LANGUAGE_YORUBA
2171 LANGUAGE_ZHUANG = _gdi_.LANGUAGE_ZHUANG
2172 LANGUAGE_ZULU = _gdi_.LANGUAGE_ZULU
2173 LANGUAGE_USER_DEFINED = _gdi_.LANGUAGE_USER_DEFINED
2174 class LanguageInfo(object):
2175 """Proxy of C++ LanguageInfo class"""
2176 def __init__(self): raise RuntimeError, "No constructor defined"
2177 def __repr__(self):
2178 return "<%s.%s; proxy of C++ wxLanguageInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2179 Language = property(_gdi_.LanguageInfo_Language_get, _gdi_.LanguageInfo_Language_set)
2180 CanonicalName = property(_gdi_.LanguageInfo_CanonicalName_get, _gdi_.LanguageInfo_CanonicalName_set)
2181 Description = property(_gdi_.LanguageInfo_Description_get, _gdi_.LanguageInfo_Description_set)
2182
2183 class LanguageInfoPtr(LanguageInfo):
2184 def __init__(self, this):
2185 self.this = this
2186 if not hasattr(self,"thisown"): self.thisown = 0
2187 self.__class__ = LanguageInfo
2188 _gdi_.LanguageInfo_swigregister(LanguageInfoPtr)
2189
2190 LOCALE_CAT_NUMBER = _gdi_.LOCALE_CAT_NUMBER
2191 LOCALE_CAT_DATE = _gdi_.LOCALE_CAT_DATE
2192 LOCALE_CAT_MONEY = _gdi_.LOCALE_CAT_MONEY
2193 LOCALE_CAT_MAX = _gdi_.LOCALE_CAT_MAX
2194 LOCALE_THOUSANDS_SEP = _gdi_.LOCALE_THOUSANDS_SEP
2195 LOCALE_DECIMAL_POINT = _gdi_.LOCALE_DECIMAL_POINT
2196 LOCALE_LOAD_DEFAULT = _gdi_.LOCALE_LOAD_DEFAULT
2197 LOCALE_CONV_ENCODING = _gdi_.LOCALE_CONV_ENCODING
2198 class Locale(object):
2199 """Proxy of C++ Locale class"""
2200 def __repr__(self):
2201 return "<%s.%s; proxy of C++ wxLocale instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2202 def __init__(self, *args, **kwargs):
2203 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
2204 newobj = _gdi_.new_Locale(*args, **kwargs)
2205 self.this = newobj.this
2206 self.thisown = 1
2207 del newobj.thisown
2208 def __del__(self, destroy=_gdi_.delete_Locale):
2209 """__del__(self)"""
2210 try:
2211 if self.thisown: destroy(self)
2212 except: pass
2213
2214 def Init1(*args, **kwargs):
2215 """
2216 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2217 bool bLoadDefault=True,
2218 bool bConvertEncoding=False) -> bool
2219 """
2220 return _gdi_.Locale_Init1(*args, **kwargs)
2221
2222 def Init2(*args, **kwargs):
2223 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2224 return _gdi_.Locale_Init2(*args, **kwargs)
2225
2226 def Init(self, *_args, **_kwargs):
2227 if type(_args[0]) in [type(''), type(u'')]:
2228 val = self.Init1(*_args, **_kwargs)
2229 else:
2230 val = self.Init2(*_args, **_kwargs)
2231 return val
2232
2233 def GetSystemLanguage(*args, **kwargs):
2234 """GetSystemLanguage() -> int"""
2235 return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
2236
2237 GetSystemLanguage = staticmethod(GetSystemLanguage)
2238 def GetSystemEncoding(*args, **kwargs):
2239 """GetSystemEncoding() -> int"""
2240 return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
2241
2242 GetSystemEncoding = staticmethod(GetSystemEncoding)
2243 def GetSystemEncodingName(*args, **kwargs):
2244 """GetSystemEncodingName() -> String"""
2245 return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
2246
2247 GetSystemEncodingName = staticmethod(GetSystemEncodingName)
2248 def IsOk(*args, **kwargs):
2249 """IsOk(self) -> bool"""
2250 return _gdi_.Locale_IsOk(*args, **kwargs)
2251
2252 def __nonzero__(self): return self.IsOk()
2253 def GetLocale(*args, **kwargs):
2254 """GetLocale(self) -> String"""
2255 return _gdi_.Locale_GetLocale(*args, **kwargs)
2256
2257 def GetLanguage(*args, **kwargs):
2258 """GetLanguage(self) -> int"""
2259 return _gdi_.Locale_GetLanguage(*args, **kwargs)
2260
2261 def GetSysName(*args, **kwargs):
2262 """GetSysName(self) -> String"""
2263 return _gdi_.Locale_GetSysName(*args, **kwargs)
2264
2265 def GetCanonicalName(*args, **kwargs):
2266 """GetCanonicalName(self) -> String"""
2267 return _gdi_.Locale_GetCanonicalName(*args, **kwargs)
2268
2269 def AddCatalogLookupPathPrefix(*args, **kwargs):
2270 """AddCatalogLookupPathPrefix(String prefix)"""
2271 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
2272
2273 AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix)
2274 def AddCatalog(*args, **kwargs):
2275 """AddCatalog(self, String szDomain) -> bool"""
2276 return _gdi_.Locale_AddCatalog(*args, **kwargs)
2277
2278 def IsLoaded(*args, **kwargs):
2279 """IsLoaded(self, String szDomain) -> bool"""
2280 return _gdi_.Locale_IsLoaded(*args, **kwargs)
2281
2282 def GetLanguageInfo(*args, **kwargs):
2283 """GetLanguageInfo(int lang) -> LanguageInfo"""
2284 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
2285
2286 GetLanguageInfo = staticmethod(GetLanguageInfo)
2287 def GetLanguageName(*args, **kwargs):
2288 """GetLanguageName(int lang) -> String"""
2289 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
2290
2291 GetLanguageName = staticmethod(GetLanguageName)
2292 def FindLanguageInfo(*args, **kwargs):
2293 """FindLanguageInfo(String locale) -> LanguageInfo"""
2294 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
2295
2296 FindLanguageInfo = staticmethod(FindLanguageInfo)
2297 def AddLanguage(*args, **kwargs):
2298 """AddLanguage(LanguageInfo info)"""
2299 return _gdi_.Locale_AddLanguage(*args, **kwargs)
2300
2301 AddLanguage = staticmethod(AddLanguage)
2302 def GetString(*args, **kwargs):
2303 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2304 return _gdi_.Locale_GetString(*args, **kwargs)
2305
2306 def GetName(*args, **kwargs):
2307 """GetName(self) -> String"""
2308 return _gdi_.Locale_GetName(*args, **kwargs)
2309
2310
2311 class LocalePtr(Locale):
2312 def __init__(self, this):
2313 self.this = this
2314 if not hasattr(self,"thisown"): self.thisown = 0
2315 self.__class__ = Locale
2316 _gdi_.Locale_swigregister(LocalePtr)
2317
2318 def Locale_GetSystemLanguage(*args, **kwargs):
2319 """Locale_GetSystemLanguage() -> int"""
2320 return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
2321
2322 def Locale_GetSystemEncoding(*args, **kwargs):
2323 """Locale_GetSystemEncoding() -> int"""
2324 return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
2325
2326 def Locale_GetSystemEncodingName(*args, **kwargs):
2327 """Locale_GetSystemEncodingName() -> String"""
2328 return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
2329
2330 def Locale_AddCatalogLookupPathPrefix(*args, **kwargs):
2331 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2332 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
2333
2334 def Locale_GetLanguageInfo(*args, **kwargs):
2335 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2336 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
2337
2338 def Locale_GetLanguageName(*args, **kwargs):
2339 """Locale_GetLanguageName(int lang) -> String"""
2340 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
2341
2342 def Locale_FindLanguageInfo(*args, **kwargs):
2343 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2344 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
2345
2346 def Locale_AddLanguage(*args, **kwargs):
2347 """Locale_AddLanguage(LanguageInfo info)"""
2348 return _gdi_.Locale_AddLanguage(*args, **kwargs)
2349
2350
2351 def GetLocale(*args, **kwargs):
2352 """GetLocale() -> Locale"""
2353 return _gdi_.GetLocale(*args, **kwargs)
2354 #---------------------------------------------------------------------------
2355
2356 CONVERT_STRICT = _gdi_.CONVERT_STRICT
2357 CONVERT_SUBSTITUTE = _gdi_.CONVERT_SUBSTITUTE
2358 PLATFORM_CURRENT = _gdi_.PLATFORM_CURRENT
2359 PLATFORM_UNIX = _gdi_.PLATFORM_UNIX
2360 PLATFORM_WINDOWS = _gdi_.PLATFORM_WINDOWS
2361 PLATFORM_OS2 = _gdi_.PLATFORM_OS2
2362 PLATFORM_MAC = _gdi_.PLATFORM_MAC
2363 class EncodingConverter(_core.Object):
2364 """Proxy of C++ EncodingConverter class"""
2365 def __repr__(self):
2366 return "<%s.%s; proxy of C++ wxEncodingConverter instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2367 def __init__(self, *args, **kwargs):
2368 """__init__(self) -> EncodingConverter"""
2369 newobj = _gdi_.new_EncodingConverter(*args, **kwargs)
2370 self.this = newobj.this
2371 self.thisown = 1
2372 del newobj.thisown
2373 def __del__(self, destroy=_gdi_.delete_EncodingConverter):
2374 """__del__(self)"""
2375 try:
2376 if self.thisown: destroy(self)
2377 except: pass
2378
2379 def Init(*args, **kwargs):
2380 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2381 return _gdi_.EncodingConverter_Init(*args, **kwargs)
2382
2383 def Convert(*args, **kwargs):
2384 """Convert(self, String input) -> String"""
2385 return _gdi_.EncodingConverter_Convert(*args, **kwargs)
2386
2387 def GetPlatformEquivalents(*args, **kwargs):
2388 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2389 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
2390
2391 GetPlatformEquivalents = staticmethod(GetPlatformEquivalents)
2392 def GetAllEquivalents(*args, **kwargs):
2393 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2394 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
2395
2396 GetAllEquivalents = staticmethod(GetAllEquivalents)
2397 def CanConvert(*args, **kwargs):
2398 """CanConvert(int encIn, int encOut) -> bool"""
2399 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
2400
2401 CanConvert = staticmethod(CanConvert)
2402 def __nonzero__(self): return self.IsOk()
2403
2404 class EncodingConverterPtr(EncodingConverter):
2405 def __init__(self, this):
2406 self.this = this
2407 if not hasattr(self,"thisown"): self.thisown = 0
2408 self.__class__ = EncodingConverter
2409 _gdi_.EncodingConverter_swigregister(EncodingConverterPtr)
2410
2411 def GetTranslation(*args):
2412 """
2413 GetTranslation(String str) -> String
2414 GetTranslation(String str, String strPlural, size_t n) -> String
2415 """
2416 return _gdi_.GetTranslation(*args)
2417
2418 def EncodingConverter_GetPlatformEquivalents(*args, **kwargs):
2419 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2420 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
2421
2422 def EncodingConverter_GetAllEquivalents(*args, **kwargs):
2423 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2424 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
2425
2426 def EncodingConverter_CanConvert(*args, **kwargs):
2427 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2428 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
2429
2430 #----------------------------------------------------------------------------
2431 # On MSW add the directory where the wxWidgets catalogs were installed
2432 # to the default catalog path.
2433 if wx.Platform == "__WXMSW__":
2434 import os
2435 _localedir = os.path.join(os.path.split(__file__)[0], "locale")
2436 Locale.AddCatalogLookupPathPrefix(_localedir)
2437 del os
2438
2439 #----------------------------------------------------------------------------
2440
2441 #---------------------------------------------------------------------------
2442
2443 class DC(_core.Object):
2444 """
2445 A wx.DC is a device context onto which graphics and text can be
2446 drawn. It is intended to represent a number of output devices in a
2447 generic way, so a window can have a device context associated with it,
2448 and a printer also has a device context. In this way, the same piece
2449 of code may write to a number of different devices, if the device
2450 context is used as a parameter.
2451
2452 Derived types of wxDC have documentation for specific features only,
2453 so refer to this section for most device context information.
2454
2455 The wx.DC class is abstract and can not be instantiated, you must use
2456 one of the derived classes instead. Which one will depend on the
2457 situation in which it is used.
2458 """
2459 def __init__(self): raise RuntimeError, "No constructor defined"
2460 def __repr__(self):
2461 return "<%s.%s; proxy of C++ wxDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2462 def __del__(self, destroy=_gdi_.delete_DC):
2463 """__del__(self)"""
2464 try:
2465 if self.thisown: destroy(self)
2466 except: pass
2467
2468 def BeginDrawing(*args, **kwargs):
2469 """
2470 BeginDrawing(self)
2471
2472 Allows for optimization of drawing code on platforms that need it. On
2473 other platforms this is just an empty function and is harmless. To
2474 take advantage of this postential optimization simply enclose each
2475 group of calls to the drawing primitives within calls to
2476 `BeginDrawing` and `EndDrawing`.
2477 """
2478 return _gdi_.DC_BeginDrawing(*args, **kwargs)
2479
2480 def EndDrawing(*args, **kwargs):
2481 """
2482 EndDrawing(self)
2483
2484 Ends the group of drawing primitives started with `BeginDrawing`, and
2485 invokes whatever optimization is available for this DC type on the
2486 current platform.
2487 """
2488 return _gdi_.DC_EndDrawing(*args, **kwargs)
2489
2490 def FloodFill(*args, **kwargs):
2491 """
2492 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2493
2494 Flood fills the device context starting from the given point, using
2495 the current brush colour, and using a style:
2496
2497 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2498 the given colour is encountered.
2499
2500 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2501 colour.
2502
2503 Returns False if the operation failed.
2504
2505 Note: The present implementation for non-Windows platforms may fail to
2506 find colour borders if the pixels do not match the colour
2507 exactly. However the function will still return true.
2508 """
2509 return _gdi_.DC_FloodFill(*args, **kwargs)
2510
2511 def FloodFillPoint(*args, **kwargs):
2512 """
2513 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2514
2515 Flood fills the device context starting from the given point, using
2516 the current brush colour, and using a style:
2517
2518 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2519 the given colour is encountered.
2520
2521 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2522 colour.
2523
2524 Returns False if the operation failed.
2525
2526 Note: The present implementation for non-Windows platforms may fail to
2527 find colour borders if the pixels do not match the colour
2528 exactly. However the function will still return true.
2529 """
2530 return _gdi_.DC_FloodFillPoint(*args, **kwargs)
2531
2532 def GetPixel(*args, **kwargs):
2533 """
2534 GetPixel(self, int x, int y) -> Colour
2535
2536 Gets the colour at the specified location on the DC.
2537 """
2538 return _gdi_.DC_GetPixel(*args, **kwargs)
2539
2540 def GetPixelPoint(*args, **kwargs):
2541 """GetPixelPoint(self, Point pt) -> Colour"""
2542 return _gdi_.DC_GetPixelPoint(*args, **kwargs)
2543
2544 def DrawLine(*args, **kwargs):
2545 """
2546 DrawLine(self, int x1, int y1, int x2, int y2)
2547
2548 Draws a line from the first point to the second. The current pen is
2549 used for drawing the line. Note that the second point is *not* part of
2550 the line and is not drawn by this function (this is consistent with
2551 the behaviour of many other toolkits).
2552 """
2553 return _gdi_.DC_DrawLine(*args, **kwargs)
2554
2555 def DrawLinePoint(*args, **kwargs):
2556 """
2557 DrawLinePoint(self, Point pt1, Point pt2)
2558
2559 Draws a line from the first point to the second. The current pen is
2560 used for drawing the line. Note that the second point is *not* part of
2561 the line and is not drawn by this function (this is consistent with
2562 the behaviour of many other toolkits).
2563 """
2564 return _gdi_.DC_DrawLinePoint(*args, **kwargs)
2565
2566 def CrossHair(*args, **kwargs):
2567 """
2568 CrossHair(self, int x, int y)
2569
2570 Displays a cross hair using the current pen. This is a vertical and
2571 horizontal line the height and width of the window, centred on the
2572 given point.
2573 """
2574 return _gdi_.DC_CrossHair(*args, **kwargs)
2575
2576 def CrossHairPoint(*args, **kwargs):
2577 """
2578 CrossHairPoint(self, Point pt)
2579
2580 Displays a cross hair using the current pen. This is a vertical and
2581 horizontal line the height and width of the window, centred on the
2582 given point.
2583 """
2584 return _gdi_.DC_CrossHairPoint(*args, **kwargs)
2585
2586 def DrawArc(*args, **kwargs):
2587 """
2588 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2589
2590 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2591 the first point to the second. The current pen is used for the outline
2592 and the current brush for filling the shape.
2593
2594 The arc is drawn in an anticlockwise direction from the start point to
2595 the end point.
2596 """
2597 return _gdi_.DC_DrawArc(*args, **kwargs)
2598
2599 def DrawArcPoint(*args, **kwargs):
2600 """
2601 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2602
2603 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2604 the first point to the second. The current pen is used for the outline
2605 and the current brush for filling the shape.
2606
2607 The arc is drawn in an anticlockwise direction from the start point to
2608 the end point.
2609 """
2610 return _gdi_.DC_DrawArcPoint(*args, **kwargs)
2611
2612 def DrawCheckMark(*args, **kwargs):
2613 """
2614 DrawCheckMark(self, int x, int y, int width, int height)
2615
2616 Draws a check mark inside the given rectangle.
2617 """
2618 return _gdi_.DC_DrawCheckMark(*args, **kwargs)
2619
2620 def DrawCheckMarkRect(*args, **kwargs):
2621 """
2622 DrawCheckMarkRect(self, Rect rect)
2623
2624 Draws a check mark inside the given rectangle.
2625 """
2626 return _gdi_.DC_DrawCheckMarkRect(*args, **kwargs)
2627
2628 def DrawEllipticArc(*args, **kwargs):
2629 """
2630 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
2631
2632 Draws an arc of an ellipse, with the given rectangle defining the
2633 bounds of the ellipse. The current pen is used for drawing the arc and
2634 the current brush is used for drawing the pie.
2635
2636 The *start* and *end* parameters specify the start and end of the arc
2637 relative to the three-o'clock position from the center of the
2638 rectangle. Angles are specified in degrees (360 is a complete
2639 circle). Positive values mean counter-clockwise motion. If start is
2640 equal to end, a complete ellipse will be drawn.
2641 """
2642 return _gdi_.DC_DrawEllipticArc(*args, **kwargs)
2643
2644 def DrawEllipticArcPointSize(*args, **kwargs):
2645 """
2646 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
2647
2648 Draws an arc of an ellipse, with the given rectangle defining the
2649 bounds of the ellipse. The current pen is used for drawing the arc and
2650 the current brush is used for drawing the pie.
2651
2652 The *start* and *end* parameters specify the start and end of the arc
2653 relative to the three-o'clock position from the center of the
2654 rectangle. Angles are specified in degrees (360 is a complete
2655 circle). Positive values mean counter-clockwise motion. If start is
2656 equal to end, a complete ellipse will be drawn.
2657 """
2658 return _gdi_.DC_DrawEllipticArcPointSize(*args, **kwargs)
2659
2660 def DrawPoint(*args, **kwargs):
2661 """
2662 DrawPoint(self, int x, int y)
2663
2664 Draws a point using the current pen.
2665 """
2666 return _gdi_.DC_DrawPoint(*args, **kwargs)
2667
2668 def DrawPointPoint(*args, **kwargs):
2669 """
2670 DrawPointPoint(self, Point pt)
2671
2672 Draws a point using the current pen.
2673 """
2674 return _gdi_.DC_DrawPointPoint(*args, **kwargs)
2675
2676 def DrawRectangle(*args, **kwargs):
2677 """
2678 DrawRectangle(self, int x, int y, int width, int height)
2679
2680 Draws a rectangle with the given top left corner, and with the given
2681 size. The current pen is used for the outline and the current brush
2682 for filling the shape.
2683 """
2684 return _gdi_.DC_DrawRectangle(*args, **kwargs)
2685
2686 def DrawRectangleRect(*args, **kwargs):
2687 """
2688 DrawRectangleRect(self, Rect rect)
2689
2690 Draws a rectangle with the given top left corner, and with the given
2691 size. The current pen is used for the outline and the current brush
2692 for filling the shape.
2693 """
2694 return _gdi_.DC_DrawRectangleRect(*args, **kwargs)
2695
2696 def DrawRectanglePointSize(*args, **kwargs):
2697 """
2698 DrawRectanglePointSize(self, Point pt, Size sz)
2699
2700 Draws a rectangle with the given top left corner, and with the given
2701 size. The current pen is used for the outline and the current brush
2702 for filling the shape.
2703 """
2704 return _gdi_.DC_DrawRectanglePointSize(*args, **kwargs)
2705
2706 def DrawRoundedRectangle(*args, **kwargs):
2707 """
2708 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
2709
2710 Draws a rectangle with the given top left corner, and with the given
2711 size. The corners are quarter-circles using the given radius. The
2712 current pen is used for the outline and the current brush for filling
2713 the shape.
2714
2715 If radius is positive, the value is assumed to be the radius of the
2716 rounded corner. If radius is negative, the absolute value is assumed
2717 to be the proportion of the smallest dimension of the rectangle. This
2718 means that the corner can be a sensible size relative to the size of
2719 the rectangle, and also avoids the strange effects X produces when the
2720 corners are too big for the rectangle.
2721 """
2722 return _gdi_.DC_DrawRoundedRectangle(*args, **kwargs)
2723
2724 def DrawRoundedRectangleRect(*args, **kwargs):
2725 """
2726 DrawRoundedRectangleRect(self, Rect r, double radius)
2727
2728 Draws a rectangle with the given top left corner, and with the given
2729 size. The corners are quarter-circles using the given radius. The
2730 current pen is used for the outline and the current brush for filling
2731 the shape.
2732
2733 If radius is positive, the value is assumed to be the radius of the
2734 rounded corner. If radius is negative, the absolute value is assumed
2735 to be the proportion of the smallest dimension of the rectangle. This
2736 means that the corner can be a sensible size relative to the size of
2737 the rectangle, and also avoids the strange effects X produces when the
2738 corners are too big for the rectangle.
2739 """
2740 return _gdi_.DC_DrawRoundedRectangleRect(*args, **kwargs)
2741
2742 def DrawRoundedRectanglePointSize(*args, **kwargs):
2743 """
2744 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
2745
2746 Draws a rectangle with the given top left corner, and with the given
2747 size. The corners are quarter-circles using the given radius. The
2748 current pen is used for the outline and the current brush for filling
2749 the shape.
2750
2751 If radius is positive, the value is assumed to be the radius of the
2752 rounded corner. If radius is negative, the absolute value is assumed
2753 to be the proportion of the smallest dimension of the rectangle. This
2754 means that the corner can be a sensible size relative to the size of
2755 the rectangle, and also avoids the strange effects X produces when the
2756 corners are too big for the rectangle.
2757 """
2758 return _gdi_.DC_DrawRoundedRectanglePointSize(*args, **kwargs)
2759
2760 def DrawCircle(*args, **kwargs):
2761 """
2762 DrawCircle(self, int x, int y, int radius)
2763
2764 Draws a circle with the given center point and radius. The current
2765 pen is used for the outline and the current brush for filling the
2766 shape.
2767 """
2768 return _gdi_.DC_DrawCircle(*args, **kwargs)
2769
2770 def DrawCirclePoint(*args, **kwargs):
2771 """
2772 DrawCirclePoint(self, Point pt, int radius)
2773
2774 Draws a circle with the given center point and radius. The current
2775 pen is used for the outline and the current brush for filling the
2776 shape.
2777 """
2778 return _gdi_.DC_DrawCirclePoint(*args, **kwargs)
2779
2780 def DrawEllipse(*args, **kwargs):
2781 """
2782 DrawEllipse(self, int x, int y, int width, int height)
2783
2784 Draws an ellipse contained in the specified rectangle. The current pen
2785 is used for the outline and the current brush for filling the shape.
2786 """
2787 return _gdi_.DC_DrawEllipse(*args, **kwargs)
2788
2789 def DrawEllipseRect(*args, **kwargs):
2790 """
2791 DrawEllipseRect(self, Rect rect)
2792
2793 Draws an ellipse contained in the specified rectangle. The current pen
2794 is used for the outline and the current brush for filling the shape.
2795 """
2796 return _gdi_.DC_DrawEllipseRect(*args, **kwargs)
2797
2798 def DrawEllipsePointSize(*args, **kwargs):
2799 """
2800 DrawEllipsePointSize(self, Point pt, Size sz)
2801
2802 Draws an ellipse contained in the specified rectangle. The current pen
2803 is used for the outline and the current brush for filling the shape.
2804 """
2805 return _gdi_.DC_DrawEllipsePointSize(*args, **kwargs)
2806
2807 def DrawIcon(*args, **kwargs):
2808 """
2809 DrawIcon(self, Icon icon, int x, int y)
2810
2811 Draw an icon on the display (does nothing if the device context is
2812 PostScript). This can be the simplest way of drawing bitmaps on a
2813 window.
2814 """
2815 return _gdi_.DC_DrawIcon(*args, **kwargs)
2816
2817 def DrawIconPoint(*args, **kwargs):
2818 """
2819 DrawIconPoint(self, Icon icon, Point pt)
2820
2821 Draw an icon on the display (does nothing if the device context is
2822 PostScript). This can be the simplest way of drawing bitmaps on a
2823 window.
2824 """
2825 return _gdi_.DC_DrawIconPoint(*args, **kwargs)
2826
2827 def DrawBitmap(*args, **kwargs):
2828 """
2829 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
2830
2831 Draw a bitmap on the device context at the specified point. If
2832 *transparent* is true and the bitmap has a transparency mask, (or
2833 alpha channel on the platforms that support it) then the bitmap will
2834 be drawn transparently.
2835 """
2836 return _gdi_.DC_DrawBitmap(*args, **kwargs)
2837
2838 def DrawBitmapPoint(*args, **kwargs):
2839 """
2840 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
2841
2842 Draw a bitmap on the device context at the specified point. If
2843 *transparent* is true and the bitmap has a transparency mask, (or
2844 alpha channel on the platforms that support it) then the bitmap will
2845 be drawn transparently.
2846 """
2847 return _gdi_.DC_DrawBitmapPoint(*args, **kwargs)
2848
2849 def DrawText(*args, **kwargs):
2850 """
2851 DrawText(self, String text, int x, int y)
2852
2853 Draws a text string at the specified point, using the current text
2854 font, and the current text foreground and background colours.
2855
2856 The coordinates refer to the top-left corner of the rectangle bounding
2857 the string. See `GetTextExtent` for how to get the dimensions of a
2858 text string, which can be used to position the text more precisely.
2859
2860 **NOTE**: under wxGTK the current logical function is used by this
2861 function but it is ignored by wxMSW. Thus, you should avoid using
2862 logical functions with this function in portable programs.
2863 """
2864 return _gdi_.DC_DrawText(*args, **kwargs)
2865
2866 def DrawTextPoint(*args, **kwargs):
2867 """
2868 DrawTextPoint(self, String text, Point pt)
2869
2870 Draws a text string at the specified point, using the current text
2871 font, and the current text foreground and background colours.
2872
2873 The coordinates refer to the top-left corner of the rectangle bounding
2874 the string. See `GetTextExtent` for how to get the dimensions of a
2875 text string, which can be used to position the text more precisely.
2876
2877 **NOTE**: under wxGTK the current logical function is used by this
2878 function but it is ignored by wxMSW. Thus, you should avoid using
2879 logical functions with this function in portable programs.
2880 """
2881 return _gdi_.DC_DrawTextPoint(*args, **kwargs)
2882
2883 def DrawRotatedText(*args, **kwargs):
2884 """
2885 DrawRotatedText(self, String text, int x, int y, double angle)
2886
2887 Draws the text rotated by *angle* degrees, if supported by the platform.
2888
2889 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
2890 function. In particular, a font different from ``wx.NORMAL_FONT``
2891 should be used as the it is not normally a TrueType
2892 font. ``wx.SWISS_FONT`` is an example of a font which is.
2893 """
2894 return _gdi_.DC_DrawRotatedText(*args, **kwargs)
2895
2896 def DrawRotatedTextPoint(*args, **kwargs):
2897 """
2898 DrawRotatedTextPoint(self, String text, Point pt, double angle)
2899
2900 Draws the text rotated by *angle* degrees, if supported by the platform.
2901
2902 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
2903 function. In particular, a font different from ``wx.NORMAL_FONT``
2904 should be used as the it is not normally a TrueType
2905 font. ``wx.SWISS_FONT`` is an example of a font which is.
2906 """
2907 return _gdi_.DC_DrawRotatedTextPoint(*args, **kwargs)
2908
2909 def Blit(*args, **kwargs):
2910 """
2911 Blit(self, int xdest, int ydest, int width, int height, DC source,
2912 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
2913 int xsrcMask=-1, int ysrcMask=-1) -> bool
2914
2915 Copy from a source DC to this DC. Parameters specify the destination
2916 coordinates, size of area to copy, source DC, source coordinates,
2917 logical function, whether to use a bitmap mask, and mask source
2918 position.
2919 """
2920 return _gdi_.DC_Blit(*args, **kwargs)
2921
2922 def BlitPointSize(*args, **kwargs):
2923 """
2924 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
2925 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
2926
2927 Copy from a source DC to this DC. Parameters specify the destination
2928 coordinates, size of area to copy, source DC, source coordinates,
2929 logical function, whether to use a bitmap mask, and mask source
2930 position.
2931 """
2932 return _gdi_.DC_BlitPointSize(*args, **kwargs)
2933
2934 def SetClippingRegion(*args, **kwargs):
2935 """
2936 SetClippingRegion(self, int x, int y, int width, int height)
2937
2938 Sets the clipping region for this device context to the intersection
2939 of the given region described by the parameters of this method and the
2940 previously set clipping region. You should call `DestroyClippingRegion`
2941 if you want to set the clipping region exactly to the region
2942 specified.
2943
2944 The clipping region is an area to which drawing is
2945 restricted. Possible uses for the clipping region are for clipping
2946 text or for speeding up window redraws when only a known area of the
2947 screen is damaged.
2948 """
2949 return _gdi_.DC_SetClippingRegion(*args, **kwargs)
2950
2951 def SetClippingRegionPointSize(*args, **kwargs):
2952 """
2953 SetClippingRegionPointSize(self, Point pt, Size sz)
2954
2955 Sets the clipping region for this device context to the intersection
2956 of the given region described by the parameters of this method and the
2957 previously set clipping region. You should call `DestroyClippingRegion`
2958 if you want to set the clipping region exactly to the region
2959 specified.
2960
2961 The clipping region is an area to which drawing is
2962 restricted. Possible uses for the clipping region are for clipping
2963 text or for speeding up window redraws when only a known area of the
2964 screen is damaged.
2965 """
2966 return _gdi_.DC_SetClippingRegionPointSize(*args, **kwargs)
2967
2968 def SetClippingRegionAsRegion(*args, **kwargs):
2969 """
2970 SetClippingRegionAsRegion(self, Region region)
2971
2972 Sets the clipping region for this device context to the intersection
2973 of the given region described by the parameters of this method and the
2974 previously set clipping region. You should call `DestroyClippingRegion`
2975 if you want to set the clipping region exactly to the region
2976 specified.
2977
2978 The clipping region is an area to which drawing is
2979 restricted. Possible uses for the clipping region are for clipping
2980 text or for speeding up window redraws when only a known area of the
2981 screen is damaged.
2982 """
2983 return _gdi_.DC_SetClippingRegionAsRegion(*args, **kwargs)
2984
2985 def SetClippingRect(*args, **kwargs):
2986 """
2987 SetClippingRect(self, Rect rect)
2988
2989 Sets the clipping region for this device context to the intersection
2990 of the given region described by the parameters of this method and the
2991 previously set clipping region. You should call `DestroyClippingRegion`
2992 if you want to set the clipping region exactly to the region
2993 specified.
2994
2995 The clipping region is an area to which drawing is
2996 restricted. Possible uses for the clipping region are for clipping
2997 text or for speeding up window redraws when only a known area of the
2998 screen is damaged.
2999 """
3000 return _gdi_.DC_SetClippingRect(*args, **kwargs)
3001
3002 def DrawLines(*args, **kwargs):
3003 """
3004 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3005
3006 Draws lines using a sequence of `wx.Point` objects, adding the
3007 optional offset coordinate. The current pen is used for drawing the
3008 lines.
3009 """
3010 return _gdi_.DC_DrawLines(*args, **kwargs)
3011
3012 def DrawPolygon(*args, **kwargs):
3013 """
3014 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
3015 int fillStyle=ODDEVEN_RULE)
3016
3017 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3018 the optional offset coordinate. The last argument specifies the fill
3019 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3020
3021 The current pen is used for drawing the outline, and the current brush
3022 for filling the shape. Using a transparent brush suppresses
3023 filling. Note that wxWidgets automatically closes the first and last
3024 points.
3025 """
3026 return _gdi_.DC_DrawPolygon(*args, **kwargs)
3027
3028 def DrawLabel(*args, **kwargs):
3029 """
3030 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3031 int indexAccel=-1)
3032
3033 Draw *text* within the specified rectangle, abiding by the alignment
3034 flags. Will additionally emphasize the character at *indexAccel* if
3035 it is not -1.
3036 """
3037 return _gdi_.DC_DrawLabel(*args, **kwargs)
3038
3039 def DrawImageLabel(*args, **kwargs):
3040 """
3041 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3042 int indexAccel=-1) -> Rect
3043
3044 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3045 drawing it) within the specified rectangle, abiding by the alignment
3046 flags. Will additionally emphasize the character at *indexAccel* if
3047 it is not -1. Returns the bounding rectangle.
3048 """
3049 return _gdi_.DC_DrawImageLabel(*args, **kwargs)
3050
3051 def DrawSpline(*args, **kwargs):
3052 """
3053 DrawSpline(self, List points)
3054
3055 Draws a spline between all given control points, (a list of `wx.Point`
3056 objects) using the current pen. The spline is drawn using a series of
3057 lines, using an algorithm taken from the X drawing program 'XFIG'.
3058 """
3059 return _gdi_.DC_DrawSpline(*args, **kwargs)
3060
3061 def Clear(*args, **kwargs):
3062 """
3063 Clear(self)
3064
3065 Clears the device context using the current background brush.
3066 """
3067 return _gdi_.DC_Clear(*args, **kwargs)
3068
3069 def StartDoc(*args, **kwargs):
3070 """
3071 StartDoc(self, String message) -> bool
3072
3073 Starts a document (only relevant when outputting to a
3074 printer). *Message* is a message to show whilst printing.
3075 """
3076 return _gdi_.DC_StartDoc(*args, **kwargs)
3077
3078 def EndDoc(*args, **kwargs):
3079 """
3080 EndDoc(self)
3081
3082 Ends a document (only relevant when outputting to a printer).
3083 """
3084 return _gdi_.DC_EndDoc(*args, **kwargs)
3085
3086 def StartPage(*args, **kwargs):
3087 """
3088 StartPage(self)
3089
3090 Starts a document page (only relevant when outputting to a printer).
3091 """
3092 return _gdi_.DC_StartPage(*args, **kwargs)
3093
3094 def EndPage(*args, **kwargs):
3095 """
3096 EndPage(self)
3097
3098 Ends a document page (only relevant when outputting to a printer).
3099 """
3100 return _gdi_.DC_EndPage(*args, **kwargs)
3101
3102 def SetFont(*args, **kwargs):
3103 """
3104 SetFont(self, Font font)
3105
3106 Sets the current font for the DC. It must be a valid font, in
3107 particular you should not pass ``wx.NullFont`` to this method.
3108 """
3109 return _gdi_.DC_SetFont(*args, **kwargs)
3110
3111 def SetPen(*args, **kwargs):
3112 """
3113 SetPen(self, Pen pen)
3114
3115 Sets the current pen for the DC.
3116
3117 If the argument is ``wx.NullPen``, the current pen is selected out of the
3118 device context, and the original pen restored.
3119 """
3120 return _gdi_.DC_SetPen(*args, **kwargs)
3121
3122 def SetBrush(*args, **kwargs):
3123 """
3124 SetBrush(self, Brush brush)
3125
3126 Sets the current brush for the DC.
3127
3128 If the argument is ``wx.NullBrush``, the current brush is selected out
3129 of the device context, and the original brush restored, allowing the
3130 current brush to be destroyed safely.
3131 """
3132 return _gdi_.DC_SetBrush(*args, **kwargs)
3133
3134 def SetBackground(*args, **kwargs):
3135 """
3136 SetBackground(self, Brush brush)
3137
3138 Sets the current background brush for the DC.
3139 """
3140 return _gdi_.DC_SetBackground(*args, **kwargs)
3141
3142 def SetBackgroundMode(*args, **kwargs):
3143 """
3144 SetBackgroundMode(self, int mode)
3145
3146 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3147 determines whether text will be drawn with a background colour or
3148 not.
3149 """
3150 return _gdi_.DC_SetBackgroundMode(*args, **kwargs)
3151
3152 def SetPalette(*args, **kwargs):
3153 """
3154 SetPalette(self, Palette palette)
3155
3156 If this is a window DC or memory DC, assigns the given palette to the
3157 window or bitmap associated with the DC. If the argument is
3158 ``wx.NullPalette``, the current palette is selected out of the device
3159 context, and the original palette restored.
3160 """
3161 return _gdi_.DC_SetPalette(*args, **kwargs)
3162
3163 def DestroyClippingRegion(*args, **kwargs):
3164 """
3165 DestroyClippingRegion(self)
3166
3167 Destroys the current clipping region so that none of the DC is
3168 clipped.
3169 """
3170 return _gdi_.DC_DestroyClippingRegion(*args, **kwargs)
3171
3172 def GetClippingBox(*args, **kwargs):
3173 """
3174 GetClippingBox() -> (x, y, width, height)
3175
3176 Gets the rectangle surrounding the current clipping region.
3177 """
3178 return _gdi_.DC_GetClippingBox(*args, **kwargs)
3179
3180 def GetClippingRect(*args, **kwargs):
3181 """
3182 GetClippingRect(self) -> Rect
3183
3184 Gets the rectangle surrounding the current clipping region.
3185 """
3186 return _gdi_.DC_GetClippingRect(*args, **kwargs)
3187
3188 def GetCharHeight(*args, **kwargs):
3189 """
3190 GetCharHeight(self) -> int
3191
3192 Gets the character height of the currently set font.
3193 """
3194 return _gdi_.DC_GetCharHeight(*args, **kwargs)
3195
3196 def GetCharWidth(*args, **kwargs):
3197 """
3198 GetCharWidth(self) -> int
3199
3200 Gets the average character width of the currently set font.
3201 """
3202 return _gdi_.DC_GetCharWidth(*args, **kwargs)
3203
3204 def GetTextExtent(*args, **kwargs):
3205 """
3206 GetTextExtent(wxString string) -> (width, height)
3207
3208 Get the width and height of the text using the current font. Only
3209 works for single line strings.
3210 """
3211 return _gdi_.DC_GetTextExtent(*args, **kwargs)
3212
3213 def GetFullTextExtent(*args, **kwargs):
3214 """
3215 GetFullTextExtent(wxString string, Font font=None) ->
3216 (width, height, descent, externalLeading)
3217
3218 Get the width, height, decent and leading of the text using the
3219 current or specified font. Only works for single line strings.
3220 """
3221 return _gdi_.DC_GetFullTextExtent(*args, **kwargs)
3222
3223 def GetMultiLineTextExtent(*args, **kwargs):
3224 """
3225 GetMultiLineTextExtent(wxString string, Font font=None) ->
3226 (width, height, descent, externalLeading)
3227
3228 Get the width, height, decent and leading of the text using the
3229 current or specified font. Works for single as well as multi-line
3230 strings.
3231 """
3232 return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
3233
3234 def GetPartialTextExtents(*args, **kwargs):
3235 """
3236 GetPartialTextExtents(self, text) -> [widths]
3237
3238 Returns a list of integers such that each value is the distance in
3239 pixels from the begining of text to the coresponding character of
3240 *text*. The generic version simply builds a running total of the widths
3241 of each character using GetTextExtent, however if the various
3242 platforms have a native API function that is faster or more accurate
3243 than the generic implementation then it will be used instead.
3244 """
3245 return _gdi_.DC_GetPartialTextExtents(*args, **kwargs)
3246
3247 def GetSize(*args, **kwargs):
3248 """
3249 GetSize(self) -> Size
3250
3251 This gets the horizontal and vertical resolution in device units. It
3252 can be used to scale graphics to fit the page. For example, if *maxX*
3253 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3254 used in your application, the following code will scale the graphic to
3255 fit on the printer page::
3256
3257 w, h = dc.GetSize()
3258 scaleX = maxX*1.0 / w
3259 scaleY = maxY*1.0 / h
3260 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3261
3262 """
3263 return _gdi_.DC_GetSize(*args, **kwargs)
3264
3265 def GetSizeTuple(*args, **kwargs):
3266 """
3267 GetSizeTuple() -> (width, height)
3268
3269 This gets the horizontal and vertical resolution in device units. It
3270 can be used to scale graphics to fit the page. For example, if *maxX*
3271 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3272 used in your application, the following code will scale the graphic to
3273 fit on the printer page::
3274
3275 w, h = dc.GetSize()
3276 scaleX = maxX*1.0 / w
3277 scaleY = maxY*1.0 / h
3278 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3279
3280 """
3281 return _gdi_.DC_GetSizeTuple(*args, **kwargs)
3282
3283 def GetSizeMM(*args, **kwargs):
3284 """
3285 GetSizeMM(self) -> Size
3286
3287 Get the DC size in milimeters.
3288 """
3289 return _gdi_.DC_GetSizeMM(*args, **kwargs)
3290
3291 def GetSizeMMTuple(*args, **kwargs):
3292 """
3293 GetSizeMMTuple() -> (width, height)
3294
3295 Get the DC size in milimeters.
3296 """
3297 return _gdi_.DC_GetSizeMMTuple(*args, **kwargs)
3298
3299 def DeviceToLogicalX(*args, **kwargs):
3300 """
3301 DeviceToLogicalX(self, int x) -> int
3302
3303 Convert device X coordinate to logical coordinate, using the current
3304 mapping mode.
3305 """
3306 return _gdi_.DC_DeviceToLogicalX(*args, **kwargs)
3307
3308 def DeviceToLogicalY(*args, **kwargs):
3309 """
3310 DeviceToLogicalY(self, int y) -> int
3311
3312 Converts device Y coordinate to logical coordinate, using the current
3313 mapping mode.
3314 """
3315 return _gdi_.DC_DeviceToLogicalY(*args, **kwargs)
3316
3317 def DeviceToLogicalXRel(*args, **kwargs):
3318 """
3319 DeviceToLogicalXRel(self, int x) -> int
3320
3321 Convert device X coordinate to relative logical coordinate, using the
3322 current mapping mode but ignoring the x axis orientation. Use this
3323 function for converting a width, for example.
3324 """
3325 return _gdi_.DC_DeviceToLogicalXRel(*args, **kwargs)
3326
3327 def DeviceToLogicalYRel(*args, **kwargs):
3328 """
3329 DeviceToLogicalYRel(self, int y) -> int
3330
3331 Convert device Y coordinate to relative logical coordinate, using the
3332 current mapping mode but ignoring the y axis orientation. Use this
3333 function for converting a height, for example.
3334 """
3335 return _gdi_.DC_DeviceToLogicalYRel(*args, **kwargs)
3336
3337 def LogicalToDeviceX(*args, **kwargs):
3338 """
3339 LogicalToDeviceX(self, int x) -> int
3340
3341 Converts logical X coordinate to device coordinate, using the current
3342 mapping mode.
3343 """
3344 return _gdi_.DC_LogicalToDeviceX(*args, **kwargs)
3345
3346 def LogicalToDeviceY(*args, **kwargs):
3347 """
3348 LogicalToDeviceY(self, int y) -> int
3349
3350 Converts logical Y coordinate to device coordinate, using the current
3351 mapping mode.
3352 """
3353 return _gdi_.DC_LogicalToDeviceY(*args, **kwargs)
3354
3355 def LogicalToDeviceXRel(*args, **kwargs):
3356 """
3357 LogicalToDeviceXRel(self, int x) -> int
3358
3359 Converts logical X coordinate to relative device coordinate, using the
3360 current mapping mode but ignoring the x axis orientation. Use this for
3361 converting a width, for example.
3362 """
3363 return _gdi_.DC_LogicalToDeviceXRel(*args, **kwargs)
3364
3365 def LogicalToDeviceYRel(*args, **kwargs):
3366 """
3367 LogicalToDeviceYRel(self, int y) -> int
3368
3369 Converts logical Y coordinate to relative device coordinate, using the
3370 current mapping mode but ignoring the y axis orientation. Use this for
3371 converting a height, for example.
3372 """
3373 return _gdi_.DC_LogicalToDeviceYRel(*args, **kwargs)
3374
3375 def CanDrawBitmap(*args, **kwargs):
3376 """CanDrawBitmap(self) -> bool"""
3377 return _gdi_.DC_CanDrawBitmap(*args, **kwargs)
3378
3379 def CanGetTextExtent(*args, **kwargs):
3380 """CanGetTextExtent(self) -> bool"""
3381 return _gdi_.DC_CanGetTextExtent(*args, **kwargs)
3382
3383 def GetDepth(*args, **kwargs):
3384 """
3385 GetDepth(self) -> int
3386
3387 Returns the colour depth of the DC.
3388 """
3389 return _gdi_.DC_GetDepth(*args, **kwargs)
3390
3391 def GetPPI(*args, **kwargs):
3392 """
3393 GetPPI(self) -> Size
3394
3395 Resolution in Pixels per inch
3396 """
3397 return _gdi_.DC_GetPPI(*args, **kwargs)
3398
3399 def Ok(*args, **kwargs):
3400 """
3401 Ok(self) -> bool
3402
3403 Returns true if the DC is ok to use.
3404 """
3405 return _gdi_.DC_Ok(*args, **kwargs)
3406
3407 def GetBackgroundMode(*args, **kwargs):
3408 """
3409 GetBackgroundMode(self) -> int
3410
3411 Returns the current background mode, either ``wx.SOLID`` or
3412 ``wx.TRANSPARENT``.
3413 """
3414 return _gdi_.DC_GetBackgroundMode(*args, **kwargs)
3415
3416 def GetBackground(*args, **kwargs):
3417 """
3418 GetBackground(self) -> Brush
3419
3420 Gets the brush used for painting the background.
3421 """
3422 return _gdi_.DC_GetBackground(*args, **kwargs)
3423
3424 def GetBrush(*args, **kwargs):
3425 """
3426 GetBrush(self) -> Brush
3427
3428 Gets the current brush
3429 """
3430 return _gdi_.DC_GetBrush(*args, **kwargs)
3431
3432 def GetFont(*args, **kwargs):
3433 """
3434 GetFont(self) -> Font
3435
3436 Gets the current font
3437 """
3438 return _gdi_.DC_GetFont(*args, **kwargs)
3439
3440 def GetPen(*args, **kwargs):
3441 """
3442 GetPen(self) -> Pen
3443
3444 Gets the current pen
3445 """
3446 return _gdi_.DC_GetPen(*args, **kwargs)
3447
3448 def GetTextBackground(*args, **kwargs):
3449 """
3450 GetTextBackground(self) -> Colour
3451
3452 Gets the current text background colour
3453 """
3454 return _gdi_.DC_GetTextBackground(*args, **kwargs)
3455
3456 def GetTextForeground(*args, **kwargs):
3457 """
3458 GetTextForeground(self) -> Colour
3459
3460 Gets the current text foreground colour
3461 """
3462 return _gdi_.DC_GetTextForeground(*args, **kwargs)
3463
3464 def SetTextForeground(*args, **kwargs):
3465 """
3466 SetTextForeground(self, Colour colour)
3467
3468 Sets the current text foreground colour for the DC.
3469 """
3470 return _gdi_.DC_SetTextForeground(*args, **kwargs)
3471
3472 def SetTextBackground(*args, **kwargs):
3473 """
3474 SetTextBackground(self, Colour colour)
3475
3476 Sets the current text background colour for the DC.
3477 """
3478 return _gdi_.DC_SetTextBackground(*args, **kwargs)
3479
3480 def GetMapMode(*args, **kwargs):
3481 """
3482 GetMapMode(self) -> int
3483
3484 Gets the current *mapping mode* for the device context
3485 """
3486 return _gdi_.DC_GetMapMode(*args, **kwargs)
3487
3488 def SetMapMode(*args, **kwargs):
3489 """
3490 SetMapMode(self, int mode)
3491
3492 The *mapping mode* of the device context defines the unit of
3493 measurement used to convert logical units to device units. The
3494 mapping mode can be one of the following:
3495
3496 ================ =============================================
3497 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3498 of an inch.
3499 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3500 wx.MM_METRIC Each logical unit is 1 mm.
3501 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3502 wx.MM_TEXT Each logical unit is 1 pixel.
3503 ================ =============================================
3504
3505 """
3506 return _gdi_.DC_SetMapMode(*args, **kwargs)
3507
3508 def GetUserScale(*args, **kwargs):
3509 """
3510 GetUserScale(self) -> (xScale, yScale)
3511
3512 Gets the current user scale factor (set by `SetUserScale`).
3513 """
3514 return _gdi_.DC_GetUserScale(*args, **kwargs)
3515
3516 def SetUserScale(*args, **kwargs):
3517 """
3518 SetUserScale(self, double x, double y)
3519
3520 Sets the user scaling factor, useful for applications which require
3521 'zooming'.
3522 """
3523 return _gdi_.DC_SetUserScale(*args, **kwargs)
3524
3525 def GetLogicalScale(*args, **kwargs):
3526 """GetLogicalScale() -> (xScale, yScale)"""
3527 return _gdi_.DC_GetLogicalScale(*args, **kwargs)
3528
3529 def SetLogicalScale(*args, **kwargs):
3530 """SetLogicalScale(self, double x, double y)"""
3531 return _gdi_.DC_SetLogicalScale(*args, **kwargs)
3532
3533 def GetLogicalOrigin(*args, **kwargs):
3534 """GetLogicalOrigin(self) -> Point"""
3535 return _gdi_.DC_GetLogicalOrigin(*args, **kwargs)
3536
3537 def GetLogicalOriginTuple(*args, **kwargs):
3538 """GetLogicalOriginTuple() -> (x,y)"""
3539 return _gdi_.DC_GetLogicalOriginTuple(*args, **kwargs)
3540
3541 def SetLogicalOrigin(*args, **kwargs):
3542 """SetLogicalOrigin(self, int x, int y)"""
3543 return _gdi_.DC_SetLogicalOrigin(*args, **kwargs)
3544
3545 def SetLogicalOriginPoint(*args, **kwargs):
3546 """SetLogicalOriginPoint(self, Point point)"""
3547 return _gdi_.DC_SetLogicalOriginPoint(*args, **kwargs)
3548
3549 def GetDeviceOrigin(*args, **kwargs):
3550 """GetDeviceOrigin(self) -> Point"""
3551 return _gdi_.DC_GetDeviceOrigin(*args, **kwargs)
3552
3553 def GetDeviceOriginTuple(*args, **kwargs):
3554 """GetDeviceOriginTuple() -> (x,y)"""
3555 return _gdi_.DC_GetDeviceOriginTuple(*args, **kwargs)
3556
3557 def SetDeviceOrigin(*args, **kwargs):
3558 """SetDeviceOrigin(self, int x, int y)"""
3559 return _gdi_.DC_SetDeviceOrigin(*args, **kwargs)
3560
3561 def SetDeviceOriginPoint(*args, **kwargs):
3562 """SetDeviceOriginPoint(self, Point point)"""
3563 return _gdi_.DC_SetDeviceOriginPoint(*args, **kwargs)
3564
3565 def SetAxisOrientation(*args, **kwargs):
3566 """
3567 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3568
3569 Sets the x and y axis orientation (i.e., the direction from lowest to
3570 highest values on the axis). The default orientation is the natural
3571 orientation, e.g. x axis from left to right and y axis from bottom up.
3572 """
3573 return _gdi_.DC_SetAxisOrientation(*args, **kwargs)
3574
3575 def GetLogicalFunction(*args, **kwargs):
3576 """
3577 GetLogicalFunction(self) -> int
3578
3579 Gets the current logical function (set by `SetLogicalFunction`).
3580 """
3581 return _gdi_.DC_GetLogicalFunction(*args, **kwargs)
3582
3583 def SetLogicalFunction(*args, **kwargs):
3584 """
3585 SetLogicalFunction(self, int function)
3586
3587 Sets the current logical function for the device context. This
3588 determines how a source pixel (from a pen or brush colour, or source
3589 device context if using `Blit`) combines with a destination pixel in
3590 the current device context.
3591
3592 The possible values and their meaning in terms of source and
3593 destination pixel values are as follows:
3594
3595 ================ ==========================
3596 wx.AND src AND dst
3597 wx.AND_INVERT (NOT src) AND dst
3598 wx.AND_REVERSE src AND (NOT dst)
3599 wx.CLEAR 0
3600 wx.COPY src
3601 wx.EQUIV (NOT src) XOR dst
3602 wx.INVERT NOT dst
3603 wx.NAND (NOT src) OR (NOT dst)
3604 wx.NOR (NOT src) AND (NOT dst)
3605 wx.NO_OP dst
3606 wx.OR src OR dst
3607 wx.OR_INVERT (NOT src) OR dst
3608 wx.OR_REVERSE src OR (NOT dst)
3609 wx.SET 1
3610 wx.SRC_INVERT NOT src
3611 wx.XOR src XOR dst
3612 ================ ==========================
3613
3614 The default is wx.COPY, which simply draws with the current
3615 colour. The others combine the current colour and the background using
3616 a logical operation. wx.INVERT is commonly used for drawing rubber
3617 bands or moving outlines, since drawing twice reverts to the original
3618 colour.
3619
3620 """
3621 return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
3622
3623 def ComputeScaleAndOrigin(*args, **kwargs):
3624 """
3625 ComputeScaleAndOrigin(self)
3626
3627 Performs all necessary computations for given platform and context
3628 type after each change of scale and origin parameters. Usually called
3629 automatically internally after such changes.
3630
3631 """
3632 return _gdi_.DC_ComputeScaleAndOrigin(*args, **kwargs)
3633
3634 def SetOptimization(self, optimize):
3635 pass
3636 def GetOptimization(self):
3637 return False
3638
3639 SetOptimization = wx._deprecated(SetOptimization)
3640 GetOptimization = wx._deprecated(GetOptimization)
3641
3642 def CalcBoundingBox(*args, **kwargs):
3643 """
3644 CalcBoundingBox(self, int x, int y)
3645
3646 Adds the specified point to the bounding box which can be retrieved
3647 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3648 """
3649 return _gdi_.DC_CalcBoundingBox(*args, **kwargs)
3650
3651 def CalcBoundingBoxPoint(*args, **kwargs):
3652 """
3653 CalcBoundingBoxPoint(self, Point point)
3654
3655 Adds the specified point to the bounding box which can be retrieved
3656 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3657 """
3658 return _gdi_.DC_CalcBoundingBoxPoint(*args, **kwargs)
3659
3660 def ResetBoundingBox(*args, **kwargs):
3661 """
3662 ResetBoundingBox(self)
3663
3664 Resets the bounding box: after a call to this function, the bounding
3665 box doesn't contain anything.
3666 """
3667 return _gdi_.DC_ResetBoundingBox(*args, **kwargs)
3668
3669 def MinX(*args, **kwargs):
3670 """
3671 MinX(self) -> int
3672
3673 Gets the minimum horizontal extent used in drawing commands so far.
3674 """
3675 return _gdi_.DC_MinX(*args, **kwargs)
3676
3677 def MaxX(*args, **kwargs):
3678 """
3679 MaxX(self) -> int
3680
3681 Gets the maximum horizontal extent used in drawing commands so far.
3682 """
3683 return _gdi_.DC_MaxX(*args, **kwargs)
3684
3685 def MinY(*args, **kwargs):
3686 """
3687 MinY(self) -> int
3688
3689 Gets the minimum vertical extent used in drawing commands so far.
3690 """
3691 return _gdi_.DC_MinY(*args, **kwargs)
3692
3693 def MaxY(*args, **kwargs):
3694 """
3695 MaxY(self) -> int
3696
3697 Gets the maximum vertical extent used in drawing commands so far.
3698 """
3699 return _gdi_.DC_MaxY(*args, **kwargs)
3700
3701 def GetBoundingBox(*args, **kwargs):
3702 """
3703 GetBoundingBox() -> (x1,y1, x2,y2)
3704
3705 Returns the min and max points used in drawing commands so far.
3706 """
3707 return _gdi_.DC_GetBoundingBox(*args, **kwargs)
3708
3709 def __nonzero__(self): return self.Ok()
3710 def _DrawPointList(*args, **kwargs):
3711 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3712 return _gdi_.DC__DrawPointList(*args, **kwargs)
3713
3714 def _DrawLineList(*args, **kwargs):
3715 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3716 return _gdi_.DC__DrawLineList(*args, **kwargs)
3717
3718 def _DrawRectangleList(*args, **kwargs):
3719 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3720 return _gdi_.DC__DrawRectangleList(*args, **kwargs)
3721
3722 def _DrawEllipseList(*args, **kwargs):
3723 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3724 return _gdi_.DC__DrawEllipseList(*args, **kwargs)
3725
3726 def _DrawPolygonList(*args, **kwargs):
3727 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3728 return _gdi_.DC__DrawPolygonList(*args, **kwargs)
3729
3730 def _DrawTextList(*args, **kwargs):
3731 """
3732 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
3733 PyObject backgroundList) -> PyObject
3734 """
3735 return _gdi_.DC__DrawTextList(*args, **kwargs)
3736
3737 def DrawPointList(self, points, pens=None):
3738 """
3739 Draw a list of points as quickly as possible.
3740
3741 :param points: A sequence of 2-element sequences representing
3742 each point to draw, (x,y).
3743 :param pens: If None, then the current pen is used. If a
3744 single pen then it will be used for all points. If
3745 a list of pens then there should be one for each point
3746 in points.
3747 """
3748 if pens is None:
3749 pens = []
3750 elif isinstance(pens, wx.Pen):
3751 pens = [pens]
3752 elif len(pens) != len(points):
3753 raise ValueError('points and pens must have same length')
3754 return self._DrawPointList(points, pens, [])
3755
3756
3757 def DrawLineList(self, lines, pens=None):
3758 """
3759 Draw a list of lines as quickly as possible.
3760
3761 :param lines: A sequence of 4-element sequences representing
3762 each line to draw, (x1,y1, x2,y2).
3763 :param pens: If None, then the current pen is used. If a
3764 single pen then it will be used for all lines. If
3765 a list of pens then there should be one for each line
3766 in lines.
3767 """
3768 if pens is None:
3769 pens = []
3770 elif isinstance(pens, wx.Pen):
3771 pens = [pens]
3772 elif len(pens) != len(lines):
3773 raise ValueError('lines and pens must have same length')
3774 return self._DrawLineList(lines, pens, [])
3775
3776
3777 def DrawRectangleList(self, rectangles, pens=None, brushes=None):
3778 """
3779 Draw a list of rectangles as quickly as possible.
3780
3781 :param rectangles: A sequence of 4-element sequences representing
3782 each rectangle to draw, (x,y, w,h).
3783 :param pens: If None, then the current pen is used. If a
3784 single pen then it will be used for all rectangles.
3785 If a list of pens then there should be one for each
3786 rectangle in rectangles.
3787 :param brushes: A brush or brushes to be used to fill the rectagles,
3788 with similar semantics as the pens parameter.
3789 """
3790 if pens is None:
3791 pens = []
3792 elif isinstance(pens, wx.Pen):
3793 pens = [pens]
3794 elif len(pens) != len(rectangles):
3795 raise ValueError('rectangles and pens must have same length')
3796 if brushes is None:
3797 brushes = []
3798 elif isinstance(brushes, wx.Brush):
3799 brushes = [brushes]
3800 elif len(brushes) != len(rectangles):
3801 raise ValueError('rectangles and brushes must have same length')
3802 return self._DrawRectangleList(rectangles, pens, brushes)
3803
3804
3805 def DrawEllipseList(self, ellipses, pens=None, brushes=None):
3806 """
3807 Draw a list of ellipses as quickly as possible.
3808
3809 :param ellipses: A sequence of 4-element sequences representing
3810 each ellipse to draw, (x,y, w,h).
3811 :param pens: If None, then the current pen is used. If a
3812 single pen then it will be used for all ellipses.
3813 If a list of pens then there should be one for each
3814 ellipse in ellipses.
3815 :param brushes: A brush or brushes to be used to fill the ellipses,
3816 with similar semantics as the pens parameter.
3817 """
3818 if pens is None:
3819 pens = []
3820 elif isinstance(pens, wx.Pen):
3821 pens = [pens]
3822 elif len(pens) != len(ellipses):
3823 raise ValueError('ellipses and pens must have same length')
3824 if brushes is None:
3825 brushes = []
3826 elif isinstance(brushes, wx.Brush):
3827 brushes = [brushes]
3828 elif len(brushes) != len(ellipses):
3829 raise ValueError('ellipses and brushes must have same length')
3830 return self._DrawEllipseList(ellipses, pens, brushes)
3831
3832
3833 def DrawPolygonList(self, polygons, pens=None, brushes=None):
3834 """
3835 Draw a list of polygons, each of which is a list of points.
3836
3837 :param polygons: A sequence of sequences of sequences.
3838 [[(x1,y1),(x2,y2),(x3,y3)...],
3839 [(x1,y1),(x2,y2),(x3,y3)...]]
3840
3841 :param pens: If None, then the current pen is used. If a
3842 single pen then it will be used for all polygons.
3843 If a list of pens then there should be one for each
3844 polygon.
3845 :param brushes: A brush or brushes to be used to fill the polygons,
3846 with similar semantics as the pens parameter.
3847 """
3848 if pens is None:
3849 pens = []
3850 elif isinstance(pens, wx.Pen):
3851 pens = [pens]
3852 elif len(pens) != len(polygons):
3853 raise ValueError('polygons and pens must have same length')
3854 if brushes is None:
3855 brushes = []
3856 elif isinstance(brushes, wx.Brush):
3857 brushes = [brushes]
3858 elif len(brushes) != len(polygons):
3859 raise ValueError('polygons and brushes must have same length')
3860 return self._DrawPolygonList(polygons, pens, brushes)
3861
3862
3863 def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None):
3864 """
3865 Draw a list of strings using a list of coordinants for positioning each string.
3866
3867 :param textList: A list of strings
3868 :param coords: A list of (x,y) positions
3869 :param foregrounds: A list of `wx.Colour` objects to use for the
3870 foregrounds of the strings.
3871 :param backgrounds: A list of `wx.Colour` objects to use for the
3872 backgrounds of the strings.
3873
3874 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
3875 If you want backgrounds to do anything.
3876 """
3877 if type(textList) == type(''):
3878 textList = [textList]
3879 elif len(textList) != len(coords):
3880 raise ValueError('textlist and coords must have same length')
3881 if foregrounds is None:
3882 foregrounds = []
3883 elif isinstance(foregrounds, wx.Colour):
3884 foregrounds = [foregrounds]
3885 elif len(foregrounds) != len(coords):
3886 raise ValueError('foregrounds and coords must have same length')
3887 if backgrounds is None:
3888 backgrounds = []
3889 elif isinstance(backgrounds, wx.Colour):
3890 backgrounds = [backgrounds]
3891 elif len(backgrounds) != len(coords):
3892 raise ValueError('backgrounds and coords must have same length')
3893 return self._DrawTextList(textList, coords, foregrounds, backgrounds)
3894
3895
3896 class DCPtr(DC):
3897 def __init__(self, this):
3898 self.this = this
3899 if not hasattr(self,"thisown"): self.thisown = 0
3900 self.__class__ = DC
3901 _gdi_.DC_swigregister(DCPtr)
3902
3903 #---------------------------------------------------------------------------
3904
3905 class MemoryDC(DC):
3906 """
3907 A memory device context provides a means to draw graphics onto a
3908 bitmap. A bitmap must be selected into the new memory DC before it may
3909 be used for anything. Typical usage is as follows::
3910
3911 dc = wx.MemoryDC()
3912 dc.SelectObject(bitmap)
3913 # draw on the dc usign any of the Draw methods
3914 dc.SelectObject(wx.NullBitmap)
3915 # the bitmap now contains wahtever was drawn upon it
3916
3917 Note that the memory DC *must* be deleted (or the bitmap selected out
3918 of it) before a bitmap can be reselected into another memory DC.
3919
3920 """
3921 def __repr__(self):
3922 return "<%s.%s; proxy of C++ wxMemoryDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3923 def __init__(self, *args, **kwargs):
3924 """
3925 __init__(self) -> MemoryDC
3926
3927 Constructs a new memory device context.
3928
3929 Use the Ok member to test whether the constructor was successful in
3930 creating a usable device context. Don't forget to select a bitmap into
3931 the DC before drawing on it.
3932 """
3933 newobj = _gdi_.new_MemoryDC(*args, **kwargs)
3934 self.this = newobj.this
3935 self.thisown = 1
3936 del newobj.thisown
3937 def SelectObject(*args, **kwargs):
3938 """
3939 SelectObject(self, Bitmap bitmap)
3940
3941 Selects the bitmap into the device context, to use as the memory
3942 bitmap. Selecting the bitmap into a memory DC allows you to draw into
3943 the DC, and therefore the bitmap, and also to use Blit to copy the
3944 bitmap to a window.
3945
3946 If the argument is wx.NullBitmap (or some other uninitialised
3947 `wx.Bitmap`) the current bitmap is selected out of the device context,
3948 and the original bitmap restored, allowing the current bitmap to be
3949 destroyed safely.
3950 """
3951 return _gdi_.MemoryDC_SelectObject(*args, **kwargs)
3952
3953
3954 class MemoryDCPtr(MemoryDC):
3955 def __init__(self, this):
3956 self.this = this
3957 if not hasattr(self,"thisown"): self.thisown = 0
3958 self.__class__ = MemoryDC
3959 _gdi_.MemoryDC_swigregister(MemoryDCPtr)
3960
3961 def MemoryDCFromDC(*args, **kwargs):
3962 """
3963 MemoryDCFromDC(DC oldDC) -> MemoryDC
3964
3965 Creates a DC that is compatible with the oldDC.
3966 """
3967 val = _gdi_.new_MemoryDCFromDC(*args, **kwargs)
3968 val.thisown = 1
3969 return val
3970
3971 #---------------------------------------------------------------------------
3972
3973 BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
3974 BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
3975 class BufferedDC(MemoryDC):
3976 """
3977 This simple class provides a simple way to avoid flicker: when drawing
3978 on it, everything is in fact first drawn on an in-memory buffer (a
3979 `wx.Bitmap`) and then copied to the screen only once, when this object
3980 is destroyed.
3981
3982 It can be used in the same way as any other device
3983 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
3984 want to use it in your EVT_PAINT handler, you should look at
3985 `wx.BufferedPaintDC`.
3986
3987 """
3988 def __repr__(self):
3989 return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3990 def __init__(self, *args):
3991 """
3992 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
3993 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
3994
3995 Constructs a buffered DC.
3996 """
3997 newobj = _gdi_.new_BufferedDC(*args)
3998 self.this = newobj.this
3999 self.thisown = 1
4000 del newobj.thisown
4001 self.__dc = args[0] # save a ref so the other dc will not be deleted before self
4002
4003 def __del__(self, destroy=_gdi_.delete_BufferedDC):
4004 """
4005 __del__(self)
4006
4007 Copies everything drawn on the DC so far to the underlying DC
4008 associated with this object, if any.
4009 """
4010 try:
4011 if self.thisown: destroy(self)
4012 except: pass
4013
4014 def UnMask(*args, **kwargs):
4015 """
4016 UnMask(self)
4017
4018 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4019 can be effectively used once only). This is usually only called in
4020 the destructor.
4021 """
4022 return _gdi_.BufferedDC_UnMask(*args, **kwargs)
4023
4024
4025 class BufferedDCPtr(BufferedDC):
4026 def __init__(self, this):
4027 self.this = this
4028 if not hasattr(self,"thisown"): self.thisown = 0
4029 self.__class__ = BufferedDC
4030 _gdi_.BufferedDC_swigregister(BufferedDCPtr)
4031
4032 class BufferedPaintDC(BufferedDC):
4033 """
4034 This is a subclass of `wx.BufferedDC` which can be used inside of an
4035 EVT_PAINT event handler. Just create an object of this class instead
4036 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4037 flicker. The only thing to watch out for is that if you are using this
4038 class together with `wx.ScrolledWindow`, you probably do **not** want
4039 to call `wx.Window.PrepareDC` on it as it already does this internally
4040 for the real underlying `wx.PaintDC`.
4041
4042 If your window is already fully buffered in a `wx.Bitmap` then your
4043 EVT_PAINT handler can be as simple as just creating a
4044 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4045 automatically when it is destroyed. For example::
4046
4047 def OnPaint(self, event):
4048 dc = wx.BufferedPaintDC(self, self.buffer)
4049
4050
4051
4052
4053
4054 """
4055 def __repr__(self):
4056 return "<%s.%s; proxy of C++ wxBufferedPaintDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4057 def __init__(self, *args, **kwargs):
4058 """
4059 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
4060
4061 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4062 provide the bitmap to be used for buffering or let this object create
4063 one internally (in the latter case, the size of the client part of the
4064 window is automatically used).
4065
4066
4067 """
4068 newobj = _gdi_.new_BufferedPaintDC(*args, **kwargs)
4069 self.this = newobj.this
4070 self.thisown = 1
4071 del newobj.thisown
4072
4073 class BufferedPaintDCPtr(BufferedPaintDC):
4074 def __init__(self, this):
4075 self.this = this
4076 if not hasattr(self,"thisown"): self.thisown = 0
4077 self.__class__ = BufferedPaintDC
4078 _gdi_.BufferedPaintDC_swigregister(BufferedPaintDCPtr)
4079
4080 #---------------------------------------------------------------------------
4081
4082 class ScreenDC(DC):
4083 """
4084 A wxScreenDC can be used to paint anywhere on the screen. This should
4085 normally be constructed as a temporary stack object; don't store a
4086 wxScreenDC object.
4087
4088 """
4089 def __repr__(self):
4090 return "<%s.%s; proxy of C++ wxScreenDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4091 def __init__(self, *args, **kwargs):
4092 """
4093 __init__(self) -> ScreenDC
4094
4095 A wxScreenDC can be used to paint anywhere on the screen. This should
4096 normally be constructed as a temporary stack object; don't store a
4097 wxScreenDC object.
4098
4099 """
4100 newobj = _gdi_.new_ScreenDC(*args, **kwargs)
4101 self.this = newobj.this
4102 self.thisown = 1
4103 del newobj.thisown
4104 def StartDrawingOnTopWin(*args, **kwargs):
4105 """
4106 StartDrawingOnTopWin(self, Window window) -> bool
4107
4108 Specify that the area of the screen to be drawn upon coincides with
4109 the given window.
4110
4111 :see: `EndDrawingOnTop`
4112 """
4113 return _gdi_.ScreenDC_StartDrawingOnTopWin(*args, **kwargs)
4114
4115 def StartDrawingOnTop(*args, **kwargs):
4116 """
4117 StartDrawingOnTop(self, Rect rect=None) -> bool
4118
4119 Specify that the area is the given rectangle, or the whole screen if
4120 ``None`` is passed.
4121
4122 :see: `EndDrawingOnTop`
4123 """
4124 return _gdi_.ScreenDC_StartDrawingOnTop(*args, **kwargs)
4125
4126 def EndDrawingOnTop(*args, **kwargs):
4127 """
4128 EndDrawingOnTop(self) -> bool
4129
4130 Use this in conjunction with `StartDrawingOnTop` or
4131 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4132 top of existing windows. Without this, some window systems (such as X)
4133 only allow drawing to take place underneath other windows.
4134
4135 You might use this pair of functions when implementing a drag feature,
4136 for example as in the `wx.SplitterWindow` implementation.
4137
4138 These functions are probably obsolete since the X implementations
4139 allow drawing directly on the screen now. However, the fact that this
4140 function allows the screen to be refreshed afterwards may be useful
4141 to some applications.
4142 """
4143 return _gdi_.ScreenDC_EndDrawingOnTop(*args, **kwargs)
4144
4145
4146 class ScreenDCPtr(ScreenDC):
4147 def __init__(self, this):
4148 self.this = this
4149 if not hasattr(self,"thisown"): self.thisown = 0
4150 self.__class__ = ScreenDC
4151 _gdi_.ScreenDC_swigregister(ScreenDCPtr)
4152
4153 #---------------------------------------------------------------------------
4154
4155 class ClientDC(DC):
4156 """
4157 A wx.ClientDC must be constructed if an application wishes to paint on
4158 the client area of a window from outside an EVT_PAINT event. This should
4159 normally be constructed as a temporary stack object; don't store a
4160 wx.ClientDC object long term.
4161
4162 To draw on a window from within an EVT_PAINT handler, construct a
4163 `wx.PaintDC` object.
4164
4165 To draw on the whole window including decorations, construct a
4166 `wx.WindowDC` object (Windows only).
4167
4168 """
4169 def __repr__(self):
4170 return "<%s.%s; proxy of C++ wxClientDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4171 def __init__(self, *args, **kwargs):
4172 """
4173 __init__(self, Window win) -> ClientDC
4174
4175 Constructor. Pass the window on which you wish to paint.
4176 """
4177 newobj = _gdi_.new_ClientDC(*args, **kwargs)
4178 self.this = newobj.this
4179 self.thisown = 1
4180 del newobj.thisown
4181
4182 class ClientDCPtr(ClientDC):
4183 def __init__(self, this):
4184 self.this = this
4185 if not hasattr(self,"thisown"): self.thisown = 0
4186 self.__class__ = ClientDC
4187 _gdi_.ClientDC_swigregister(ClientDCPtr)
4188
4189 #---------------------------------------------------------------------------
4190
4191 class PaintDC(DC):
4192 """
4193 A wx.PaintDC must be constructed if an application wishes to paint on
4194 the client area of a window from within an EVT_PAINT event
4195 handler. This should normally be constructed as a temporary stack
4196 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4197 handler, you **must** create a wx.PaintDC object within it even if you
4198 don't actually use it.
4199
4200 Using wx.PaintDC within EVT_PAINT handlers is important because it
4201 automatically sets the clipping area to the damaged area of the
4202 window. Attempts to draw outside this area do not appear.
4203
4204 To draw on a window from outside EVT_PAINT handlers, construct a
4205 `wx.ClientDC` object.
4206
4207 """
4208 def __repr__(self):
4209 return "<%s.%s; proxy of C++ wxPaintDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4210 def __init__(self, *args, **kwargs):
4211 """
4212 __init__(self, Window win) -> PaintDC
4213
4214 Constructor. Pass the window on which you wish to paint.
4215 """
4216 newobj = _gdi_.new_PaintDC(*args, **kwargs)
4217 self.this = newobj.this
4218 self.thisown = 1
4219 del newobj.thisown
4220
4221 class PaintDCPtr(PaintDC):
4222 def __init__(self, this):
4223 self.this = this
4224 if not hasattr(self,"thisown"): self.thisown = 0
4225 self.__class__ = PaintDC
4226 _gdi_.PaintDC_swigregister(PaintDCPtr)
4227
4228 #---------------------------------------------------------------------------
4229
4230 class WindowDC(DC):
4231 """
4232 A wx.WindowDC must be constructed if an application wishes to paint on
4233 the whole area of a window (client and decorations). This should
4234 normally be constructed as a temporary stack object; don't store a
4235 wx.WindowDC object.
4236 """
4237 def __repr__(self):
4238 return "<%s.%s; proxy of C++ wxWindowDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4239 def __init__(self, *args, **kwargs):
4240 """
4241 __init__(self, Window win) -> WindowDC
4242
4243 Constructor. Pass the window on which you wish to paint.
4244 """
4245 newobj = _gdi_.new_WindowDC(*args, **kwargs)
4246 self.this = newobj.this
4247 self.thisown = 1
4248 del newobj.thisown
4249
4250 class WindowDCPtr(WindowDC):
4251 def __init__(self, this):
4252 self.this = this
4253 if not hasattr(self,"thisown"): self.thisown = 0
4254 self.__class__ = WindowDC
4255 _gdi_.WindowDC_swigregister(WindowDCPtr)
4256
4257 #---------------------------------------------------------------------------
4258
4259 class MirrorDC(DC):
4260 """
4261 wx.MirrorDC is a simple wrapper class which is always associated with a
4262 real `wx.DC` object and either forwards all of its operations to it
4263 without changes (no mirroring takes place) or exchanges x and y
4264 coordinates which makes it possible to reuse the same code to draw a
4265 figure and its mirror -- i.e. reflection related to the diagonal line
4266 x == y.
4267 """
4268 def __repr__(self):
4269 return "<%s.%s; proxy of C++ wxMirrorDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4270 def __init__(self, *args, **kwargs):
4271 """
4272 __init__(self, DC dc, bool mirror) -> MirrorDC
4273
4274 Creates a mirrored DC associated with the real *dc*. Everything drawn
4275 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4276 *mirror* is True.
4277 """
4278 newobj = _gdi_.new_MirrorDC(*args, **kwargs)
4279 self.this = newobj.this
4280 self.thisown = 1
4281 del newobj.thisown
4282
4283 class MirrorDCPtr(MirrorDC):
4284 def __init__(self, this):
4285 self.this = this
4286 if not hasattr(self,"thisown"): self.thisown = 0
4287 self.__class__ = MirrorDC
4288 _gdi_.MirrorDC_swigregister(MirrorDCPtr)
4289
4290 #---------------------------------------------------------------------------
4291
4292 class PostScriptDC(DC):
4293 """This is a `wx.DC` that can write to PostScript files on any platform."""
4294 def __repr__(self):
4295 return "<%s.%s; proxy of C++ wxPostScriptDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4296 def __init__(self, *args, **kwargs):
4297 """
4298 __init__(self, wxPrintData printData) -> PostScriptDC
4299
4300 Constructs a PostScript printer device context from a `wx.PrintData`
4301 object.
4302 """
4303 newobj = _gdi_.new_PostScriptDC(*args, **kwargs)
4304 self.this = newobj.this
4305 self.thisown = 1
4306 del newobj.thisown
4307 def GetPrintData(*args, **kwargs):
4308 """GetPrintData(self) -> wxPrintData"""
4309 return _gdi_.PostScriptDC_GetPrintData(*args, **kwargs)
4310
4311 def SetPrintData(*args, **kwargs):
4312 """SetPrintData(self, wxPrintData data)"""
4313 return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs)
4314
4315 def SetResolution(*args, **kwargs):
4316 """
4317 SetResolution(int ppi)
4318
4319 Set resolution (in pixels per inch) that will be used in PostScript
4320 output. Default is 720ppi.
4321 """
4322 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
4323
4324 SetResolution = staticmethod(SetResolution)
4325 def GetResolution(*args, **kwargs):
4326 """
4327 GetResolution() -> int
4328
4329 Return resolution used in PostScript output.
4330 """
4331 return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
4332
4333 GetResolution = staticmethod(GetResolution)
4334
4335 class PostScriptDCPtr(PostScriptDC):
4336 def __init__(self, this):
4337 self.this = this
4338 if not hasattr(self,"thisown"): self.thisown = 0
4339 self.__class__ = PostScriptDC
4340 _gdi_.PostScriptDC_swigregister(PostScriptDCPtr)
4341
4342 def PostScriptDC_SetResolution(*args, **kwargs):
4343 """
4344 PostScriptDC_SetResolution(int ppi)
4345
4346 Set resolution (in pixels per inch) that will be used in PostScript
4347 output. Default is 720ppi.
4348 """
4349 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
4350
4351 def PostScriptDC_GetResolution(*args, **kwargs):
4352 """
4353 PostScriptDC_GetResolution() -> int
4354
4355 Return resolution used in PostScript output.
4356 """
4357 return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
4358
4359 #---------------------------------------------------------------------------
4360
4361 class MetaFile(_core.Object):
4362 """Proxy of C++ MetaFile class"""
4363 def __repr__(self):
4364 return "<%s.%s; proxy of C++ wxMetaFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4365 def __init__(self, *args, **kwargs):
4366 """__init__(self, String filename=EmptyString) -> MetaFile"""
4367 newobj = _gdi_.new_MetaFile(*args, **kwargs)
4368 self.this = newobj.this
4369 self.thisown = 1
4370 del newobj.thisown
4371
4372 class MetaFilePtr(MetaFile):
4373 def __init__(self, this):
4374 self.this = this
4375 if not hasattr(self,"thisown"): self.thisown = 0
4376 self.__class__ = MetaFile
4377 _gdi_.MetaFile_swigregister(MetaFilePtr)
4378
4379 class MetaFileDC(DC):
4380 """Proxy of C++ MetaFileDC class"""
4381 def __repr__(self):
4382 return "<%s.%s; proxy of C++ wxMetaFileDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4383 def __init__(self, *args, **kwargs):
4384 """
4385 __init__(self, String filename=EmptyString, int width=0, int height=0,
4386 String description=EmptyString) -> MetaFileDC
4387 """
4388 newobj = _gdi_.new_MetaFileDC(*args, **kwargs)
4389 self.this = newobj.this
4390 self.thisown = 1
4391 del newobj.thisown
4392
4393 class MetaFileDCPtr(MetaFileDC):
4394 def __init__(self, this):
4395 self.this = this
4396 if not hasattr(self,"thisown"): self.thisown = 0
4397 self.__class__ = MetaFileDC
4398 _gdi_.MetaFileDC_swigregister(MetaFileDCPtr)
4399
4400 class PrinterDC(DC):
4401 """Proxy of C++ PrinterDC class"""
4402 def __repr__(self):
4403 return "<%s.%s; proxy of C++ wxPrinterDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4404 def __init__(self, *args, **kwargs):
4405 """__init__(self, wxPrintData printData) -> PrinterDC"""
4406 newobj = _gdi_.new_PrinterDC(*args, **kwargs)
4407 self.this = newobj.this
4408 self.thisown = 1
4409 del newobj.thisown
4410
4411 class PrinterDCPtr(PrinterDC):
4412 def __init__(self, this):
4413 self.this = this
4414 if not hasattr(self,"thisown"): self.thisown = 0
4415 self.__class__ = PrinterDC
4416 _gdi_.PrinterDC_swigregister(PrinterDCPtr)
4417
4418 #---------------------------------------------------------------------------
4419
4420 IMAGELIST_DRAW_NORMAL = _gdi_.IMAGELIST_DRAW_NORMAL
4421 IMAGELIST_DRAW_TRANSPARENT = _gdi_.IMAGELIST_DRAW_TRANSPARENT
4422 IMAGELIST_DRAW_SELECTED = _gdi_.IMAGELIST_DRAW_SELECTED
4423 IMAGELIST_DRAW_FOCUSED = _gdi_.IMAGELIST_DRAW_FOCUSED
4424 IMAGE_LIST_NORMAL = _gdi_.IMAGE_LIST_NORMAL
4425 IMAGE_LIST_SMALL = _gdi_.IMAGE_LIST_SMALL
4426 IMAGE_LIST_STATE = _gdi_.IMAGE_LIST_STATE
4427 class ImageList(_core.Object):
4428 """Proxy of C++ ImageList class"""
4429 def __repr__(self):
4430 return "<%s.%s; proxy of C++ wxImageList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4431 def __init__(self, *args, **kwargs):
4432 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4433 newobj = _gdi_.new_ImageList(*args, **kwargs)
4434 self.this = newobj.this
4435 self.thisown = 1
4436 del newobj.thisown
4437 def __del__(self, destroy=_gdi_.delete_ImageList):
4438 """__del__(self)"""
4439 try:
4440 if self.thisown: destroy(self)
4441 except: pass
4442
4443 def Add(*args, **kwargs):
4444 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4445 return _gdi_.ImageList_Add(*args, **kwargs)
4446
4447 def AddWithColourMask(*args, **kwargs):
4448 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4449 return _gdi_.ImageList_AddWithColourMask(*args, **kwargs)
4450
4451 def AddIcon(*args, **kwargs):
4452 """AddIcon(self, Icon icon) -> int"""
4453 return _gdi_.ImageList_AddIcon(*args, **kwargs)
4454
4455 def GetBitmap(*args, **kwargs):
4456 """GetBitmap(self, int index) -> Bitmap"""
4457 return _gdi_.ImageList_GetBitmap(*args, **kwargs)
4458
4459 def GetIcon(*args, **kwargs):
4460 """GetIcon(self, int index) -> Icon"""
4461 return _gdi_.ImageList_GetIcon(*args, **kwargs)
4462
4463 def Replace(*args, **kwargs):
4464 """Replace(self, int index, Bitmap bitmap) -> bool"""
4465 return _gdi_.ImageList_Replace(*args, **kwargs)
4466
4467 def Draw(*args, **kwargs):
4468 """
4469 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4470 bool solidBackground=False) -> bool
4471 """
4472 return _gdi_.ImageList_Draw(*args, **kwargs)
4473
4474 def GetImageCount(*args, **kwargs):
4475 """GetImageCount(self) -> int"""
4476 return _gdi_.ImageList_GetImageCount(*args, **kwargs)
4477
4478 def Remove(*args, **kwargs):
4479 """Remove(self, int index) -> bool"""
4480 return _gdi_.ImageList_Remove(*args, **kwargs)
4481
4482 def RemoveAll(*args, **kwargs):
4483 """RemoveAll(self) -> bool"""
4484 return _gdi_.ImageList_RemoveAll(*args, **kwargs)
4485
4486 def GetSize(*args, **kwargs):
4487 """GetSize() -> (width,height)"""
4488 return _gdi_.ImageList_GetSize(*args, **kwargs)
4489
4490
4491 class ImageListPtr(ImageList):
4492 def __init__(self, this):
4493 self.this = this
4494 if not hasattr(self,"thisown"): self.thisown = 0
4495 self.__class__ = ImageList
4496 _gdi_.ImageList_swigregister(ImageListPtr)
4497
4498 #---------------------------------------------------------------------------
4499
4500 class PenList(_core.Object):
4501 """Proxy of C++ PenList class"""
4502 def __init__(self): raise RuntimeError, "No constructor defined"
4503 def __repr__(self):
4504 return "<%s.%s; proxy of C++ wxPenList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4505 def AddPen(*args, **kwargs):
4506 """AddPen(self, Pen pen)"""
4507 return _gdi_.PenList_AddPen(*args, **kwargs)
4508
4509 def FindOrCreatePen(*args, **kwargs):
4510 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
4511 return _gdi_.PenList_FindOrCreatePen(*args, **kwargs)
4512
4513 def RemovePen(*args, **kwargs):
4514 """RemovePen(self, Pen pen)"""
4515 return _gdi_.PenList_RemovePen(*args, **kwargs)
4516
4517 def GetCount(*args, **kwargs):
4518 """GetCount(self) -> int"""
4519 return _gdi_.PenList_GetCount(*args, **kwargs)
4520
4521
4522 class PenListPtr(PenList):
4523 def __init__(self, this):
4524 self.this = this
4525 if not hasattr(self,"thisown"): self.thisown = 0
4526 self.__class__ = PenList
4527 _gdi_.PenList_swigregister(PenListPtr)
4528 cvar = _gdi_.cvar
4529 NORMAL_FONT = cvar.NORMAL_FONT
4530 SMALL_FONT = cvar.SMALL_FONT
4531 ITALIC_FONT = cvar.ITALIC_FONT
4532 SWISS_FONT = cvar.SWISS_FONT
4533 RED_PEN = cvar.RED_PEN
4534 CYAN_PEN = cvar.CYAN_PEN
4535 GREEN_PEN = cvar.GREEN_PEN
4536 BLACK_PEN = cvar.BLACK_PEN
4537 WHITE_PEN = cvar.WHITE_PEN
4538 TRANSPARENT_PEN = cvar.TRANSPARENT_PEN
4539 BLACK_DASHED_PEN = cvar.BLACK_DASHED_PEN
4540 GREY_PEN = cvar.GREY_PEN
4541 MEDIUM_GREY_PEN = cvar.MEDIUM_GREY_PEN
4542 LIGHT_GREY_PEN = cvar.LIGHT_GREY_PEN
4543 BLUE_BRUSH = cvar.BLUE_BRUSH
4544 GREEN_BRUSH = cvar.GREEN_BRUSH
4545 WHITE_BRUSH = cvar.WHITE_BRUSH
4546 BLACK_BRUSH = cvar.BLACK_BRUSH
4547 TRANSPARENT_BRUSH = cvar.TRANSPARENT_BRUSH
4548 CYAN_BRUSH = cvar.CYAN_BRUSH
4549 RED_BRUSH = cvar.RED_BRUSH
4550 GREY_BRUSH = cvar.GREY_BRUSH
4551 MEDIUM_GREY_BRUSH = cvar.MEDIUM_GREY_BRUSH
4552 LIGHT_GREY_BRUSH = cvar.LIGHT_GREY_BRUSH
4553 BLACK = cvar.BLACK
4554 WHITE = cvar.WHITE
4555 RED = cvar.RED
4556 BLUE = cvar.BLUE
4557 GREEN = cvar.GREEN
4558 CYAN = cvar.CYAN
4559 LIGHT_GREY = cvar.LIGHT_GREY
4560 STANDARD_CURSOR = cvar.STANDARD_CURSOR
4561 HOURGLASS_CURSOR = cvar.HOURGLASS_CURSOR
4562 CROSS_CURSOR = cvar.CROSS_CURSOR
4563 NullBitmap = cvar.NullBitmap
4564 NullIcon = cvar.NullIcon
4565 NullCursor = cvar.NullCursor
4566 NullPen = cvar.NullPen
4567 NullBrush = cvar.NullBrush
4568 NullPalette = cvar.NullPalette
4569 NullFont = cvar.NullFont
4570 NullColour = cvar.NullColour
4571
4572 class BrushList(_core.Object):
4573 """Proxy of C++ BrushList class"""
4574 def __init__(self): raise RuntimeError, "No constructor defined"
4575 def __repr__(self):
4576 return "<%s.%s; proxy of C++ wxBrushList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4577 def AddBrush(*args, **kwargs):
4578 """AddBrush(self, Brush brush)"""
4579 return _gdi_.BrushList_AddBrush(*args, **kwargs)
4580
4581 def FindOrCreateBrush(*args, **kwargs):
4582 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
4583 return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs)
4584
4585 def RemoveBrush(*args, **kwargs):
4586 """RemoveBrush(self, Brush brush)"""
4587 return _gdi_.BrushList_RemoveBrush(*args, **kwargs)
4588
4589 def GetCount(*args, **kwargs):
4590 """GetCount(self) -> int"""
4591 return _gdi_.BrushList_GetCount(*args, **kwargs)
4592
4593
4594 class BrushListPtr(BrushList):
4595 def __init__(self, this):
4596 self.this = this
4597 if not hasattr(self,"thisown"): self.thisown = 0
4598 self.__class__ = BrushList
4599 _gdi_.BrushList_swigregister(BrushListPtr)
4600
4601 class ColourDatabase(_core.Object):
4602 """Proxy of C++ ColourDatabase class"""
4603 def __repr__(self):
4604 return "<%s.%s; proxy of C++ wxColourDatabase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4605 def __init__(self, *args, **kwargs):
4606 """__init__(self) -> ColourDatabase"""
4607 newobj = _gdi_.new_ColourDatabase(*args, **kwargs)
4608 self.this = newobj.this
4609 self.thisown = 1
4610 del newobj.thisown
4611 def __del__(self, destroy=_gdi_.delete_ColourDatabase):
4612 """__del__(self)"""
4613 try:
4614 if self.thisown: destroy(self)
4615 except: pass
4616
4617 def Find(*args, **kwargs):
4618 """Find(self, String name) -> Colour"""
4619 return _gdi_.ColourDatabase_Find(*args, **kwargs)
4620
4621 def FindName(*args, **kwargs):
4622 """FindName(self, Colour colour) -> String"""
4623 return _gdi_.ColourDatabase_FindName(*args, **kwargs)
4624
4625 FindColour = Find
4626 def AddColour(*args, **kwargs):
4627 """AddColour(self, String name, Colour colour)"""
4628 return _gdi_.ColourDatabase_AddColour(*args, **kwargs)
4629
4630 def Append(*args, **kwargs):
4631 """Append(self, String name, int red, int green, int blue)"""
4632 return _gdi_.ColourDatabase_Append(*args, **kwargs)
4633
4634
4635 class ColourDatabasePtr(ColourDatabase):
4636 def __init__(self, this):
4637 self.this = this
4638 if not hasattr(self,"thisown"): self.thisown = 0
4639 self.__class__ = ColourDatabase
4640 _gdi_.ColourDatabase_swigregister(ColourDatabasePtr)
4641
4642 class FontList(_core.Object):
4643 """Proxy of C++ FontList class"""
4644 def __init__(self): raise RuntimeError, "No constructor defined"
4645 def __repr__(self):
4646 return "<%s.%s; proxy of C++ wxFontList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4647 def AddFont(*args, **kwargs):
4648 """AddFont(self, Font font)"""
4649 return _gdi_.FontList_AddFont(*args, **kwargs)
4650
4651 def FindOrCreateFont(*args, **kwargs):
4652 """
4653 FindOrCreateFont(self, int point_size, int family, int style, int weight,
4654 bool underline=False, String facename=EmptyString,
4655 int encoding=FONTENCODING_DEFAULT) -> Font
4656 """
4657 return _gdi_.FontList_FindOrCreateFont(*args, **kwargs)
4658
4659 def RemoveFont(*args, **kwargs):
4660 """RemoveFont(self, Font font)"""
4661 return _gdi_.FontList_RemoveFont(*args, **kwargs)
4662
4663 def GetCount(*args, **kwargs):
4664 """GetCount(self) -> int"""
4665 return _gdi_.FontList_GetCount(*args, **kwargs)
4666
4667
4668 class FontListPtr(FontList):
4669 def __init__(self, this):
4670 self.this = this
4671 if not hasattr(self,"thisown"): self.thisown = 0
4672 self.__class__ = FontList
4673 _gdi_.FontList_swigregister(FontListPtr)
4674
4675 #---------------------------------------------------------------------------
4676
4677 NullColor = NullColour
4678 #---------------------------------------------------------------------------
4679
4680 class Effects(_core.Object):
4681 """Proxy of C++ Effects class"""
4682 def __repr__(self):
4683 return "<%s.%s; proxy of C++ wxEffects instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4684 def __init__(self, *args, **kwargs):
4685 """__init__(self) -> Effects"""
4686 newobj = _gdi_.new_Effects(*args, **kwargs)
4687 self.this = newobj.this
4688 self.thisown = 1
4689 del newobj.thisown
4690 def GetHighlightColour(*args, **kwargs):
4691 """GetHighlightColour(self) -> Colour"""
4692 return _gdi_.Effects_GetHighlightColour(*args, **kwargs)
4693
4694 def GetLightShadow(*args, **kwargs):
4695 """GetLightShadow(self) -> Colour"""
4696 return _gdi_.Effects_GetLightShadow(*args, **kwargs)
4697
4698 def GetFaceColour(*args, **kwargs):
4699 """GetFaceColour(self) -> Colour"""
4700 return _gdi_.Effects_GetFaceColour(*args, **kwargs)
4701
4702 def GetMediumShadow(*args, **kwargs):
4703 """GetMediumShadow(self) -> Colour"""
4704 return _gdi_.Effects_GetMediumShadow(*args, **kwargs)
4705
4706 def GetDarkShadow(*args, **kwargs):
4707 """GetDarkShadow(self) -> Colour"""
4708 return _gdi_.Effects_GetDarkShadow(*args, **kwargs)
4709
4710 def SetHighlightColour(*args, **kwargs):
4711 """SetHighlightColour(self, Colour c)"""
4712 return _gdi_.Effects_SetHighlightColour(*args, **kwargs)
4713
4714 def SetLightShadow(*args, **kwargs):
4715 """SetLightShadow(self, Colour c)"""
4716 return _gdi_.Effects_SetLightShadow(*args, **kwargs)
4717
4718 def SetFaceColour(*args, **kwargs):
4719 """SetFaceColour(self, Colour c)"""
4720 return _gdi_.Effects_SetFaceColour(*args, **kwargs)
4721
4722 def SetMediumShadow(*args, **kwargs):
4723 """SetMediumShadow(self, Colour c)"""
4724 return _gdi_.Effects_SetMediumShadow(*args, **kwargs)
4725
4726 def SetDarkShadow(*args, **kwargs):
4727 """SetDarkShadow(self, Colour c)"""
4728 return _gdi_.Effects_SetDarkShadow(*args, **kwargs)
4729
4730 def Set(*args, **kwargs):
4731 """
4732 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
4733 Colour mediumShadow, Colour darkShadow)
4734 """
4735 return _gdi_.Effects_Set(*args, **kwargs)
4736
4737 def DrawSunkenEdge(*args, **kwargs):
4738 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
4739 return _gdi_.Effects_DrawSunkenEdge(*args, **kwargs)
4740
4741 def TileBitmap(*args, **kwargs):
4742 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
4743 return _gdi_.Effects_TileBitmap(*args, **kwargs)
4744
4745
4746 class EffectsPtr(Effects):
4747 def __init__(self, this):
4748 self.this = this
4749 if not hasattr(self,"thisown"): self.thisown = 0
4750 self.__class__ = Effects
4751 _gdi_.Effects_swigregister(EffectsPtr)
4752 TheFontList = cvar.TheFontList
4753 ThePenList = cvar.ThePenList
4754 TheBrushList = cvar.TheBrushList
4755 TheColourDatabase = cvar.TheColourDatabase
4756
4757