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