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