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