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