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