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