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