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