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