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