]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/mac/_gdi.py
wxCheckListBox doesn't require wxUSE_OWNER_DRAWN when using WXUNIVERSAL
[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):
a97cefba
RD
1672 """
1673 A font is an object which determines the appearance of text. Fonts are
1674 used for drawing text to a device context, and setting the appearance
1675 of a window's text.
1676
1677 You can retrieve the current system font settings with `wx.SystemSettings`.
1678 """
d55e5bfc
RD
1679 def __repr__(self):
1680 return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1681 def __init__(self, *args, **kwargs):
1682 """
1683 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
1684 String face=EmptyString,
1685 int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
1686
1687 Creates a font object with the specified attributes.
1688
1689 :param pointSize: The size of the font in points.
1690
1691 :param family: Font family. A generic way of referring to fonts
1692 without specifying actual facename. It can be One of
1693 the ``wx.FONTFAMILY_xxx`` constants.
1694
1695 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1696
1697 :param weight: Font weight, sometimes also referred to as font
1698 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1699
1700 :param underline: The value can be ``True`` or ``False`` and
1701 indicates whether the font will include an underline. This
1702 may not be supported on all platforms.
1703
1704 :param face: An optional string specifying the actual typeface to
1705 be used. If it is an empty string, a default typeface will be
1706 chosen based on the family.
1707
1708 :param encoding: An encoding which may be one of the
1709 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1710 available, no font is created.
1711
1712 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1713 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1714
d55e5bfc 1715 """
a5ee0656 1716 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
d55e5bfc
RD
1717 newobj = _gdi_.new_Font(*args, **kwargs)
1718 self.this = newobj.this
1719 self.thisown = 1
1720 del newobj.thisown
1721 def __del__(self, destroy=_gdi_.delete_Font):
1722 """__del__(self)"""
1723 try:
1724 if self.thisown: destroy(self)
1725 except: pass
1726
1727 def Ok(*args, **kwargs):
a97cefba
RD
1728 """
1729 Ok(self) -> bool
1730
1731 Returns ``True`` if this font was successfully created.
1732 """
d55e5bfc
RD
1733 return _gdi_.Font_Ok(*args, **kwargs)
1734
1735 def __nonzero__(self): return self.Ok()
1736 def __eq__(*args, **kwargs):
1737 """__eq__(self, Font other) -> bool"""
1738 return _gdi_.Font___eq__(*args, **kwargs)
1739
1740 def __ne__(*args, **kwargs):
1741 """__ne__(self, Font other) -> bool"""
1742 return _gdi_.Font___ne__(*args, **kwargs)
1743
1744 def GetPointSize(*args, **kwargs):
a97cefba
RD
1745 """
1746 GetPointSize(self) -> int
1747
1748 Gets the point size.
1749 """
d55e5bfc
RD
1750 return _gdi_.Font_GetPointSize(*args, **kwargs)
1751
5e483524 1752 def GetPixelSize(*args, **kwargs):
a97cefba
RD
1753 """
1754 GetPixelSize(self) -> Size
1755
1756 Returns the size in pixels if the font was constructed with a pixel
1757 size.
1758 """
5e483524
RD
1759 return _gdi_.Font_GetPixelSize(*args, **kwargs)
1760
1761 def IsUsingSizeInPixels(*args, **kwargs):
a97cefba
RD
1762 """
1763 IsUsingSizeInPixels(self) -> bool
1764
1765 Returns ``True`` if the font is using a pixelSize.
1766 """
5e483524
RD
1767 return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs)
1768
d55e5bfc 1769 def GetFamily(*args, **kwargs):
a97cefba
RD
1770 """
1771 GetFamily(self) -> int
1772
1773 Gets the font family.
1774 """
d55e5bfc
RD
1775 return _gdi_.Font_GetFamily(*args, **kwargs)
1776
1777 def GetStyle(*args, **kwargs):
a97cefba
RD
1778 """
1779 GetStyle(self) -> int
1780
1781 Gets the font style.
1782 """
d55e5bfc
RD
1783 return _gdi_.Font_GetStyle(*args, **kwargs)
1784
1785 def GetWeight(*args, **kwargs):
a97cefba
RD
1786 """
1787 GetWeight(self) -> int
1788
1789 Gets the font weight.
1790 """
d55e5bfc
RD
1791 return _gdi_.Font_GetWeight(*args, **kwargs)
1792
1793 def GetUnderlined(*args, **kwargs):
a97cefba
RD
1794 """
1795 GetUnderlined(self) -> bool
1796
1797 Returns ``True`` if the font is underlined, ``False`` otherwise.
1798 """
d55e5bfc
RD
1799 return _gdi_.Font_GetUnderlined(*args, **kwargs)
1800
1801 def GetFaceName(*args, **kwargs):
a97cefba
RD
1802 """
1803 GetFaceName(self) -> String
1804
1805 Returns the typeface name associated with the font, or the empty
1806 string if there is no typeface information.
1807 """
d55e5bfc
RD
1808 return _gdi_.Font_GetFaceName(*args, **kwargs)
1809
1810 def GetEncoding(*args, **kwargs):
a97cefba
RD
1811 """
1812 GetEncoding(self) -> int
1813
1814 Get the font's encoding.
1815 """
d55e5bfc
RD
1816 return _gdi_.Font_GetEncoding(*args, **kwargs)
1817
1818 def GetNativeFontInfo(*args, **kwargs):
a97cefba
RD
1819 """
1820 GetNativeFontInfo(self) -> NativeFontInfo
1821
1822 Constructs a `wx.NativeFontInfo` object from this font.
1823 """
d55e5bfc
RD
1824 return _gdi_.Font_GetNativeFontInfo(*args, **kwargs)
1825
1826 def IsFixedWidth(*args, **kwargs):
a97cefba
RD
1827 """
1828 IsFixedWidth(self) -> bool
1829
1830 Returns true if the font is a fixed width (or monospaced) font, false
1831 if it is a proportional one or font is invalid.
1832 """
d55e5bfc
RD
1833 return _gdi_.Font_IsFixedWidth(*args, **kwargs)
1834
1835 def GetNativeFontInfoDesc(*args, **kwargs):
a97cefba
RD
1836 """
1837 GetNativeFontInfoDesc(self) -> String
1838
1839 Returns the platform-dependent string completely describing this font
1840 or an empty string if the font isn't valid.
1841 """
d55e5bfc
RD
1842 return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs)
1843
1844 def GetNativeFontInfoUserDesc(*args, **kwargs):
a97cefba
RD
1845 """
1846 GetNativeFontInfoUserDesc(self) -> String
1847
1848 Returns a human readable version of `GetNativeFontInfoDesc`.
1849 """
d55e5bfc
RD
1850 return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs)
1851
1852 def SetPointSize(*args, **kwargs):
a97cefba
RD
1853 """
1854 SetPointSize(self, int pointSize)
1855
1856 Sets the point size.
1857 """
d55e5bfc
RD
1858 return _gdi_.Font_SetPointSize(*args, **kwargs)
1859
5e483524 1860 def SetPixelSize(*args, **kwargs):
a97cefba
RD
1861 """
1862 SetPixelSize(self, Size pixelSize)
1863
1864 Sets the size in pixels rather than points. If there is platform API
1865 support for this then it is used, otherwise a font with the closest
1866 size is found using a binary search.
1867 """
5e483524
RD
1868 return _gdi_.Font_SetPixelSize(*args, **kwargs)
1869
d55e5bfc 1870 def SetFamily(*args, **kwargs):
a97cefba
RD
1871 """
1872 SetFamily(self, int family)
1873
1874 Sets the font family.
1875 """
d55e5bfc
RD
1876 return _gdi_.Font_SetFamily(*args, **kwargs)
1877
1878 def SetStyle(*args, **kwargs):
a97cefba
RD
1879 """
1880 SetStyle(self, int style)
1881
1882 Sets the font style.
1883 """
d55e5bfc
RD
1884 return _gdi_.Font_SetStyle(*args, **kwargs)
1885
1886 def SetWeight(*args, **kwargs):
a97cefba
RD
1887 """
1888 SetWeight(self, int weight)
1889
1890 Sets the font weight.
1891 """
d55e5bfc
RD
1892 return _gdi_.Font_SetWeight(*args, **kwargs)
1893
1894 def SetFaceName(*args, **kwargs):
a97cefba
RD
1895 """
1896 SetFaceName(self, String faceName)
1897
1898 Sets the facename for the font. The facename, which should be a valid
1899 font installed on the end-user's system.
1900
1901 To avoid portability problems, don't rely on a specific face, but
1902 specify the font family instead or as well. A suitable font will be
1903 found on the end-user's system. If both the family and the facename
1904 are specified, wxWidgets will first search for the specific face, and
1905 then for a font belonging to the same family.
1906 """
d55e5bfc
RD
1907 return _gdi_.Font_SetFaceName(*args, **kwargs)
1908
1909 def SetUnderlined(*args, **kwargs):
a97cefba
RD
1910 """
1911 SetUnderlined(self, bool underlined)
1912
1913 Sets underlining.
1914 """
d55e5bfc
RD
1915 return _gdi_.Font_SetUnderlined(*args, **kwargs)
1916
1917 def SetEncoding(*args, **kwargs):
a97cefba
RD
1918 """
1919 SetEncoding(self, int encoding)
1920
1921 Set the font encoding.
1922 """
d55e5bfc
RD
1923 return _gdi_.Font_SetEncoding(*args, **kwargs)
1924
1925 def SetNativeFontInfo(*args, **kwargs):
a97cefba
RD
1926 """
1927 SetNativeFontInfo(self, NativeFontInfo info)
1928
1929 Set the font's attributes from a `wx.NativeFontInfo` object.
1930 """
d55e5bfc
RD
1931 return _gdi_.Font_SetNativeFontInfo(*args, **kwargs)
1932
1933 def SetNativeFontInfoFromString(*args, **kwargs):
a97cefba
RD
1934 """
1935 SetNativeFontInfoFromString(self, String info)
1936
1937 Set the font's attributes from string representation of a
1938 `wx.NativeFontInfo` object.
1939 """
d55e5bfc
RD
1940 return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs)
1941
1942 def SetNativeFontInfoUserDesc(*args, **kwargs):
a97cefba
RD
1943 """
1944 SetNativeFontInfoUserDesc(self, String info)
1945
1946 Set the font's attributes from a string formerly returned from
1947 `GetNativeFontInfoDesc`.
1948 """
d55e5bfc
RD
1949 return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs)
1950
1951 def GetFamilyString(*args, **kwargs):
a97cefba
RD
1952 """
1953 GetFamilyString(self) -> String
1954
1955 Returns a string representation of the font family.
1956 """
d55e5bfc
RD
1957 return _gdi_.Font_GetFamilyString(*args, **kwargs)
1958
1959 def GetStyleString(*args, **kwargs):
a97cefba
RD
1960 """
1961 GetStyleString(self) -> String
1962
1963 Returns a string representation of the font style.
1964 """
d55e5bfc
RD
1965 return _gdi_.Font_GetStyleString(*args, **kwargs)
1966
1967 def GetWeightString(*args, **kwargs):
a97cefba
RD
1968 """
1969 GetWeightString(self) -> String
1970
1971 Return a string representation of the font weight.
1972 """
d55e5bfc
RD
1973 return _gdi_.Font_GetWeightString(*args, **kwargs)
1974
1975 def SetNoAntiAliasing(*args, **kwargs):
1976 """SetNoAntiAliasing(self, bool no=True)"""
1977 return _gdi_.Font_SetNoAntiAliasing(*args, **kwargs)
1978
1979 def GetNoAntiAliasing(*args, **kwargs):
1980 """GetNoAntiAliasing(self) -> bool"""
1981 return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs)
1982
1983 def GetDefaultEncoding(*args, **kwargs):
a97cefba
RD
1984 """
1985 GetDefaultEncoding() -> int
1986
1987 Returns the encoding used for all fonts created with an encoding of
1988 ``wx.FONTENCODING_DEFAULT``.
1989 """
d55e5bfc
RD
1990 return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
1991
1992 GetDefaultEncoding = staticmethod(GetDefaultEncoding)
1993 def SetDefaultEncoding(*args, **kwargs):
a97cefba
RD
1994 """
1995 SetDefaultEncoding(int encoding)
1996
1997 Sets the default font encoding.
1998 """
d55e5bfc
RD
1999 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
2000
2001 SetDefaultEncoding = staticmethod(SetDefaultEncoding)
2002
2003class FontPtr(Font):
2004 def __init__(self, this):
2005 self.this = this
2006 if not hasattr(self,"thisown"): self.thisown = 0
2007 self.__class__ = Font
2008_gdi_.Font_swigregister(FontPtr)
2009
2010def FontFromNativeInfo(*args, **kwargs):
a97cefba
RD
2011 """
2012 FontFromNativeInfo(NativeFontInfo info) -> Font
2013
2014 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2015 """
a5ee0656 2016 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
d55e5bfc
RD
2017 val = _gdi_.new_FontFromNativeInfo(*args, **kwargs)
2018 val.thisown = 1
2019 return val
2020
2021def FontFromNativeInfoString(*args, **kwargs):
a97cefba
RD
2022 """
2023 FontFromNativeInfoString(String info) -> Font
2024
2025 Construct a `wx.Font` from the string representation of a
2026 `wx.NativeFontInfo` object.
2027 """
a5ee0656 2028 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
d55e5bfc
RD
2029 val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs)
2030 val.thisown = 1
2031 return val
2032
a97cefba 2033def FFont(*args, **kwargs):
d55e5bfc 2034 """
a97cefba 2035 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
d55e5bfc 2036 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
2037
2038 A bit of a simpler way to create a `wx.Font` using flags instead of
2039 individual attribute settings. The value of flags can be a
2040 combination of the following:
2041
2042 ============================ ==
2043 wx.FONTFLAG_DEFAULT
2044 wx.FONTFLAG_ITALIC
2045 wx.FONTFLAG_SLANT
2046 wx.FONTFLAG_LIGHT
2047 wx.FONTFLAG_BOLD
2048 wx.FONTFLAG_ANTIALIASED
2049 wx.FONTFLAG_NOT_ANTIALIASED
2050 wx.FONTFLAG_UNDERLINED
2051 wx.FONTFLAG_STRIKETHROUGH
2052 ============================ ==
2053
2054 :see: `wx.Font.__init__`
d55e5bfc 2055 """
a5ee0656 2056 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
a97cefba 2057 val = _gdi_.new_FFont(*args, **kwargs)
d55e5bfc
RD
2058 val.thisown = 1
2059 return val
2060
5e483524
RD
2061def FontFromPixelSize(*args, **kwargs):
2062 """
2063 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2064 bool underlined=False, String face=wxEmptyString,
2065 int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
2066
2067 Creates a font using a size in pixels rather than points. If there is
2068 platform API support for this then it is used, otherwise a font with
2069 the closest size is found using a binary search.
2070
2071 :see: `wx.Font.__init__`
5e483524
RD
2072 """
2073 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2074 val = _gdi_.new_FontFromPixelSize(*args, **kwargs)
2075 val.thisown = 1
2076 return val
2077
a97cefba
RD
2078def FFontFromPixelSize(*args, **kwargs):
2079 """
2080 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2081 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
2082
2083 Creates a font using a size in pixels rather than points. If there is
2084 platform API support for this then it is used, otherwise a font with
2085 the closest size is found using a binary search.
2086
2087 :see: `wx.Font.__init__`, `wx.FFont`
2088 """
2089 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2090 val = _gdi_.new_FFontFromPixelSize(*args, **kwargs)
2091 val.thisown = 1
2092 return val
2093
d55e5bfc 2094def Font_GetDefaultEncoding(*args, **kwargs):
a97cefba
RD
2095 """
2096 Font_GetDefaultEncoding() -> int
2097
2098 Returns the encoding used for all fonts created with an encoding of
2099 ``wx.FONTENCODING_DEFAULT``.
2100 """
d55e5bfc
RD
2101 return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
2102
2103def Font_SetDefaultEncoding(*args, **kwargs):
a97cefba
RD
2104 """
2105 Font_SetDefaultEncoding(int encoding)
2106
2107 Sets the default font encoding.
2108 """
d55e5bfc
RD
2109 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
2110
a97cefba 2111Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.")
d55e5bfc
RD
2112#---------------------------------------------------------------------------
2113
2114class FontEnumerator(object):
36ed4f51 2115 """Proxy of C++ FontEnumerator class"""
d55e5bfc
RD
2116 def __repr__(self):
2117 return "<%s.%s; proxy of C++ wxPyFontEnumerator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2118 def __init__(self, *args, **kwargs):
2119 """__init__(self) -> FontEnumerator"""
2120 newobj = _gdi_.new_FontEnumerator(*args, **kwargs)
2121 self.this = newobj.this
2122 self.thisown = 1
2123 del newobj.thisown
2124 self._setCallbackInfo(self, FontEnumerator, 0)
2125
2126 def __del__(self, destroy=_gdi_.delete_FontEnumerator):
2127 """__del__(self)"""
2128 try:
2129 if self.thisown: destroy(self)
2130 except: pass
2131
2132 def _setCallbackInfo(*args, **kwargs):
2133 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
2134 return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs)
2135
2136 def EnumerateFacenames(*args, **kwargs):
2137 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
2138 return _gdi_.FontEnumerator_EnumerateFacenames(*args, **kwargs)
2139
2140 def EnumerateEncodings(*args, **kwargs):
2141 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
2142 return _gdi_.FontEnumerator_EnumerateEncodings(*args, **kwargs)
2143
2144 def GetEncodings(*args, **kwargs):
2145 """GetEncodings(self) -> PyObject"""
2146 return _gdi_.FontEnumerator_GetEncodings(*args, **kwargs)
2147
2148 def GetFacenames(*args, **kwargs):
2149 """GetFacenames(self) -> PyObject"""
2150 return _gdi_.FontEnumerator_GetFacenames(*args, **kwargs)
2151
2152
2153class FontEnumeratorPtr(FontEnumerator):
2154 def __init__(self, this):
2155 self.this = this
2156 if not hasattr(self,"thisown"): self.thisown = 0
2157 self.__class__ = FontEnumerator
2158_gdi_.FontEnumerator_swigregister(FontEnumeratorPtr)
2159
2160#---------------------------------------------------------------------------
2161
2162LANGUAGE_DEFAULT = _gdi_.LANGUAGE_DEFAULT
2163LANGUAGE_UNKNOWN = _gdi_.LANGUAGE_UNKNOWN
2164LANGUAGE_ABKHAZIAN = _gdi_.LANGUAGE_ABKHAZIAN
2165LANGUAGE_AFAR = _gdi_.LANGUAGE_AFAR
2166LANGUAGE_AFRIKAANS = _gdi_.LANGUAGE_AFRIKAANS
2167LANGUAGE_ALBANIAN = _gdi_.LANGUAGE_ALBANIAN
2168LANGUAGE_AMHARIC = _gdi_.LANGUAGE_AMHARIC
2169LANGUAGE_ARABIC = _gdi_.LANGUAGE_ARABIC
2170LANGUAGE_ARABIC_ALGERIA = _gdi_.LANGUAGE_ARABIC_ALGERIA
2171LANGUAGE_ARABIC_BAHRAIN = _gdi_.LANGUAGE_ARABIC_BAHRAIN
2172LANGUAGE_ARABIC_EGYPT = _gdi_.LANGUAGE_ARABIC_EGYPT
2173LANGUAGE_ARABIC_IRAQ = _gdi_.LANGUAGE_ARABIC_IRAQ
2174LANGUAGE_ARABIC_JORDAN = _gdi_.LANGUAGE_ARABIC_JORDAN
2175LANGUAGE_ARABIC_KUWAIT = _gdi_.LANGUAGE_ARABIC_KUWAIT
2176LANGUAGE_ARABIC_LEBANON = _gdi_.LANGUAGE_ARABIC_LEBANON
2177LANGUAGE_ARABIC_LIBYA = _gdi_.LANGUAGE_ARABIC_LIBYA
2178LANGUAGE_ARABIC_MOROCCO = _gdi_.LANGUAGE_ARABIC_MOROCCO
2179LANGUAGE_ARABIC_OMAN = _gdi_.LANGUAGE_ARABIC_OMAN
2180LANGUAGE_ARABIC_QATAR = _gdi_.LANGUAGE_ARABIC_QATAR
2181LANGUAGE_ARABIC_SAUDI_ARABIA = _gdi_.LANGUAGE_ARABIC_SAUDI_ARABIA
2182LANGUAGE_ARABIC_SUDAN = _gdi_.LANGUAGE_ARABIC_SUDAN
2183LANGUAGE_ARABIC_SYRIA = _gdi_.LANGUAGE_ARABIC_SYRIA
2184LANGUAGE_ARABIC_TUNISIA = _gdi_.LANGUAGE_ARABIC_TUNISIA
2185LANGUAGE_ARABIC_UAE = _gdi_.LANGUAGE_ARABIC_UAE
2186LANGUAGE_ARABIC_YEMEN = _gdi_.LANGUAGE_ARABIC_YEMEN
2187LANGUAGE_ARMENIAN = _gdi_.LANGUAGE_ARMENIAN
2188LANGUAGE_ASSAMESE = _gdi_.LANGUAGE_ASSAMESE
2189LANGUAGE_AYMARA = _gdi_.LANGUAGE_AYMARA
2190LANGUAGE_AZERI = _gdi_.LANGUAGE_AZERI
2191LANGUAGE_AZERI_CYRILLIC = _gdi_.LANGUAGE_AZERI_CYRILLIC
2192LANGUAGE_AZERI_LATIN = _gdi_.LANGUAGE_AZERI_LATIN
2193LANGUAGE_BASHKIR = _gdi_.LANGUAGE_BASHKIR
2194LANGUAGE_BASQUE = _gdi_.LANGUAGE_BASQUE
2195LANGUAGE_BELARUSIAN = _gdi_.LANGUAGE_BELARUSIAN
2196LANGUAGE_BENGALI = _gdi_.LANGUAGE_BENGALI
2197LANGUAGE_BHUTANI = _gdi_.LANGUAGE_BHUTANI
2198LANGUAGE_BIHARI = _gdi_.LANGUAGE_BIHARI
2199LANGUAGE_BISLAMA = _gdi_.LANGUAGE_BISLAMA
2200LANGUAGE_BRETON = _gdi_.LANGUAGE_BRETON
2201LANGUAGE_BULGARIAN = _gdi_.LANGUAGE_BULGARIAN
2202LANGUAGE_BURMESE = _gdi_.LANGUAGE_BURMESE
2203LANGUAGE_CAMBODIAN = _gdi_.LANGUAGE_CAMBODIAN
2204LANGUAGE_CATALAN = _gdi_.LANGUAGE_CATALAN
2205LANGUAGE_CHINESE = _gdi_.LANGUAGE_CHINESE
2206LANGUAGE_CHINESE_SIMPLIFIED = _gdi_.LANGUAGE_CHINESE_SIMPLIFIED
2207LANGUAGE_CHINESE_TRADITIONAL = _gdi_.LANGUAGE_CHINESE_TRADITIONAL
2208LANGUAGE_CHINESE_HONGKONG = _gdi_.LANGUAGE_CHINESE_HONGKONG
2209LANGUAGE_CHINESE_MACAU = _gdi_.LANGUAGE_CHINESE_MACAU
2210LANGUAGE_CHINESE_SINGAPORE = _gdi_.LANGUAGE_CHINESE_SINGAPORE
2211LANGUAGE_CHINESE_TAIWAN = _gdi_.LANGUAGE_CHINESE_TAIWAN
2212LANGUAGE_CORSICAN = _gdi_.LANGUAGE_CORSICAN
2213LANGUAGE_CROATIAN = _gdi_.LANGUAGE_CROATIAN
2214LANGUAGE_CZECH = _gdi_.LANGUAGE_CZECH
2215LANGUAGE_DANISH = _gdi_.LANGUAGE_DANISH
2216LANGUAGE_DUTCH = _gdi_.LANGUAGE_DUTCH
2217LANGUAGE_DUTCH_BELGIAN = _gdi_.LANGUAGE_DUTCH_BELGIAN
2218LANGUAGE_ENGLISH = _gdi_.LANGUAGE_ENGLISH
2219LANGUAGE_ENGLISH_UK = _gdi_.LANGUAGE_ENGLISH_UK
2220LANGUAGE_ENGLISH_US = _gdi_.LANGUAGE_ENGLISH_US
2221LANGUAGE_ENGLISH_AUSTRALIA = _gdi_.LANGUAGE_ENGLISH_AUSTRALIA
2222LANGUAGE_ENGLISH_BELIZE = _gdi_.LANGUAGE_ENGLISH_BELIZE
2223LANGUAGE_ENGLISH_BOTSWANA = _gdi_.LANGUAGE_ENGLISH_BOTSWANA
2224LANGUAGE_ENGLISH_CANADA = _gdi_.LANGUAGE_ENGLISH_CANADA
2225LANGUAGE_ENGLISH_CARIBBEAN = _gdi_.LANGUAGE_ENGLISH_CARIBBEAN
2226LANGUAGE_ENGLISH_DENMARK = _gdi_.LANGUAGE_ENGLISH_DENMARK
2227LANGUAGE_ENGLISH_EIRE = _gdi_.LANGUAGE_ENGLISH_EIRE
2228LANGUAGE_ENGLISH_JAMAICA = _gdi_.LANGUAGE_ENGLISH_JAMAICA
2229LANGUAGE_ENGLISH_NEW_ZEALAND = _gdi_.LANGUAGE_ENGLISH_NEW_ZEALAND
2230LANGUAGE_ENGLISH_PHILIPPINES = _gdi_.LANGUAGE_ENGLISH_PHILIPPINES
2231LANGUAGE_ENGLISH_SOUTH_AFRICA = _gdi_.LANGUAGE_ENGLISH_SOUTH_AFRICA
2232LANGUAGE_ENGLISH_TRINIDAD = _gdi_.LANGUAGE_ENGLISH_TRINIDAD
2233LANGUAGE_ENGLISH_ZIMBABWE = _gdi_.LANGUAGE_ENGLISH_ZIMBABWE
2234LANGUAGE_ESPERANTO = _gdi_.LANGUAGE_ESPERANTO
2235LANGUAGE_ESTONIAN = _gdi_.LANGUAGE_ESTONIAN
2236LANGUAGE_FAEROESE = _gdi_.LANGUAGE_FAEROESE
2237LANGUAGE_FARSI = _gdi_.LANGUAGE_FARSI
2238LANGUAGE_FIJI = _gdi_.LANGUAGE_FIJI
2239LANGUAGE_FINNISH = _gdi_.LANGUAGE_FINNISH
2240LANGUAGE_FRENCH = _gdi_.LANGUAGE_FRENCH
2241LANGUAGE_FRENCH_BELGIAN = _gdi_.LANGUAGE_FRENCH_BELGIAN
2242LANGUAGE_FRENCH_CANADIAN = _gdi_.LANGUAGE_FRENCH_CANADIAN
2243LANGUAGE_FRENCH_LUXEMBOURG = _gdi_.LANGUAGE_FRENCH_LUXEMBOURG
2244LANGUAGE_FRENCH_MONACO = _gdi_.LANGUAGE_FRENCH_MONACO
2245LANGUAGE_FRENCH_SWISS = _gdi_.LANGUAGE_FRENCH_SWISS
2246LANGUAGE_FRISIAN = _gdi_.LANGUAGE_FRISIAN
2247LANGUAGE_GALICIAN = _gdi_.LANGUAGE_GALICIAN
2248LANGUAGE_GEORGIAN = _gdi_.LANGUAGE_GEORGIAN
2249LANGUAGE_GERMAN = _gdi_.LANGUAGE_GERMAN
2250LANGUAGE_GERMAN_AUSTRIAN = _gdi_.LANGUAGE_GERMAN_AUSTRIAN
2251LANGUAGE_GERMAN_BELGIUM = _gdi_.LANGUAGE_GERMAN_BELGIUM
2252LANGUAGE_GERMAN_LIECHTENSTEIN = _gdi_.LANGUAGE_GERMAN_LIECHTENSTEIN
2253LANGUAGE_GERMAN_LUXEMBOURG = _gdi_.LANGUAGE_GERMAN_LUXEMBOURG
2254LANGUAGE_GERMAN_SWISS = _gdi_.LANGUAGE_GERMAN_SWISS
2255LANGUAGE_GREEK = _gdi_.LANGUAGE_GREEK
2256LANGUAGE_GREENLANDIC = _gdi_.LANGUAGE_GREENLANDIC
2257LANGUAGE_GUARANI = _gdi_.LANGUAGE_GUARANI
2258LANGUAGE_GUJARATI = _gdi_.LANGUAGE_GUJARATI
2259LANGUAGE_HAUSA = _gdi_.LANGUAGE_HAUSA
2260LANGUAGE_HEBREW = _gdi_.LANGUAGE_HEBREW
2261LANGUAGE_HINDI = _gdi_.LANGUAGE_HINDI
2262LANGUAGE_HUNGARIAN = _gdi_.LANGUAGE_HUNGARIAN
2263LANGUAGE_ICELANDIC = _gdi_.LANGUAGE_ICELANDIC
2264LANGUAGE_INDONESIAN = _gdi_.LANGUAGE_INDONESIAN
2265LANGUAGE_INTERLINGUA = _gdi_.LANGUAGE_INTERLINGUA
2266LANGUAGE_INTERLINGUE = _gdi_.LANGUAGE_INTERLINGUE
2267LANGUAGE_INUKTITUT = _gdi_.LANGUAGE_INUKTITUT
2268LANGUAGE_INUPIAK = _gdi_.LANGUAGE_INUPIAK
2269LANGUAGE_IRISH = _gdi_.LANGUAGE_IRISH
2270LANGUAGE_ITALIAN = _gdi_.LANGUAGE_ITALIAN
2271LANGUAGE_ITALIAN_SWISS = _gdi_.LANGUAGE_ITALIAN_SWISS
2272LANGUAGE_JAPANESE = _gdi_.LANGUAGE_JAPANESE
2273LANGUAGE_JAVANESE = _gdi_.LANGUAGE_JAVANESE
2274LANGUAGE_KANNADA = _gdi_.LANGUAGE_KANNADA
2275LANGUAGE_KASHMIRI = _gdi_.LANGUAGE_KASHMIRI
2276LANGUAGE_KASHMIRI_INDIA = _gdi_.LANGUAGE_KASHMIRI_INDIA
2277LANGUAGE_KAZAKH = _gdi_.LANGUAGE_KAZAKH
2278LANGUAGE_KERNEWEK = _gdi_.LANGUAGE_KERNEWEK
2279LANGUAGE_KINYARWANDA = _gdi_.LANGUAGE_KINYARWANDA
2280LANGUAGE_KIRGHIZ = _gdi_.LANGUAGE_KIRGHIZ
2281LANGUAGE_KIRUNDI = _gdi_.LANGUAGE_KIRUNDI
2282LANGUAGE_KONKANI = _gdi_.LANGUAGE_KONKANI
2283LANGUAGE_KOREAN = _gdi_.LANGUAGE_KOREAN
2284LANGUAGE_KURDISH = _gdi_.LANGUAGE_KURDISH
2285LANGUAGE_LAOTHIAN = _gdi_.LANGUAGE_LAOTHIAN
2286LANGUAGE_LATIN = _gdi_.LANGUAGE_LATIN
2287LANGUAGE_LATVIAN = _gdi_.LANGUAGE_LATVIAN
2288LANGUAGE_LINGALA = _gdi_.LANGUAGE_LINGALA
2289LANGUAGE_LITHUANIAN = _gdi_.LANGUAGE_LITHUANIAN
2290LANGUAGE_MACEDONIAN = _gdi_.LANGUAGE_MACEDONIAN
2291LANGUAGE_MALAGASY = _gdi_.LANGUAGE_MALAGASY
2292LANGUAGE_MALAY = _gdi_.LANGUAGE_MALAY
2293LANGUAGE_MALAYALAM = _gdi_.LANGUAGE_MALAYALAM
2294LANGUAGE_MALAY_BRUNEI_DARUSSALAM = _gdi_.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2295LANGUAGE_MALAY_MALAYSIA = _gdi_.LANGUAGE_MALAY_MALAYSIA
2296LANGUAGE_MALTESE = _gdi_.LANGUAGE_MALTESE
2297LANGUAGE_MANIPURI = _gdi_.LANGUAGE_MANIPURI
2298LANGUAGE_MAORI = _gdi_.LANGUAGE_MAORI
2299LANGUAGE_MARATHI = _gdi_.LANGUAGE_MARATHI
2300LANGUAGE_MOLDAVIAN = _gdi_.LANGUAGE_MOLDAVIAN
2301LANGUAGE_MONGOLIAN = _gdi_.LANGUAGE_MONGOLIAN
2302LANGUAGE_NAURU = _gdi_.LANGUAGE_NAURU
2303LANGUAGE_NEPALI = _gdi_.LANGUAGE_NEPALI
2304LANGUAGE_NEPALI_INDIA = _gdi_.LANGUAGE_NEPALI_INDIA
2305LANGUAGE_NORWEGIAN_BOKMAL = _gdi_.LANGUAGE_NORWEGIAN_BOKMAL
2306LANGUAGE_NORWEGIAN_NYNORSK = _gdi_.LANGUAGE_NORWEGIAN_NYNORSK
2307LANGUAGE_OCCITAN = _gdi_.LANGUAGE_OCCITAN
2308LANGUAGE_ORIYA = _gdi_.LANGUAGE_ORIYA
2309LANGUAGE_OROMO = _gdi_.LANGUAGE_OROMO
2310LANGUAGE_PASHTO = _gdi_.LANGUAGE_PASHTO
2311LANGUAGE_POLISH = _gdi_.LANGUAGE_POLISH
2312LANGUAGE_PORTUGUESE = _gdi_.LANGUAGE_PORTUGUESE
2313LANGUAGE_PORTUGUESE_BRAZILIAN = _gdi_.LANGUAGE_PORTUGUESE_BRAZILIAN
2314LANGUAGE_PUNJABI = _gdi_.LANGUAGE_PUNJABI
2315LANGUAGE_QUECHUA = _gdi_.LANGUAGE_QUECHUA
2316LANGUAGE_RHAETO_ROMANCE = _gdi_.LANGUAGE_RHAETO_ROMANCE
2317LANGUAGE_ROMANIAN = _gdi_.LANGUAGE_ROMANIAN
2318LANGUAGE_RUSSIAN = _gdi_.LANGUAGE_RUSSIAN
2319LANGUAGE_RUSSIAN_UKRAINE = _gdi_.LANGUAGE_RUSSIAN_UKRAINE
2320LANGUAGE_SAMOAN = _gdi_.LANGUAGE_SAMOAN
2321LANGUAGE_SANGHO = _gdi_.LANGUAGE_SANGHO
2322LANGUAGE_SANSKRIT = _gdi_.LANGUAGE_SANSKRIT
2323LANGUAGE_SCOTS_GAELIC = _gdi_.LANGUAGE_SCOTS_GAELIC
2324LANGUAGE_SERBIAN = _gdi_.LANGUAGE_SERBIAN
2325LANGUAGE_SERBIAN_CYRILLIC = _gdi_.LANGUAGE_SERBIAN_CYRILLIC
2326LANGUAGE_SERBIAN_LATIN = _gdi_.LANGUAGE_SERBIAN_LATIN
2327LANGUAGE_SERBO_CROATIAN = _gdi_.LANGUAGE_SERBO_CROATIAN
2328LANGUAGE_SESOTHO = _gdi_.LANGUAGE_SESOTHO
2329LANGUAGE_SETSWANA = _gdi_.LANGUAGE_SETSWANA
2330LANGUAGE_SHONA = _gdi_.LANGUAGE_SHONA
2331LANGUAGE_SINDHI = _gdi_.LANGUAGE_SINDHI
2332LANGUAGE_SINHALESE = _gdi_.LANGUAGE_SINHALESE
2333LANGUAGE_SISWATI = _gdi_.LANGUAGE_SISWATI
2334LANGUAGE_SLOVAK = _gdi_.LANGUAGE_SLOVAK
2335LANGUAGE_SLOVENIAN = _gdi_.LANGUAGE_SLOVENIAN
2336LANGUAGE_SOMALI = _gdi_.LANGUAGE_SOMALI
2337LANGUAGE_SPANISH = _gdi_.LANGUAGE_SPANISH
2338LANGUAGE_SPANISH_ARGENTINA = _gdi_.LANGUAGE_SPANISH_ARGENTINA
2339LANGUAGE_SPANISH_BOLIVIA = _gdi_.LANGUAGE_SPANISH_BOLIVIA
2340LANGUAGE_SPANISH_CHILE = _gdi_.LANGUAGE_SPANISH_CHILE
2341LANGUAGE_SPANISH_COLOMBIA = _gdi_.LANGUAGE_SPANISH_COLOMBIA
2342LANGUAGE_SPANISH_COSTA_RICA = _gdi_.LANGUAGE_SPANISH_COSTA_RICA
2343LANGUAGE_SPANISH_DOMINICAN_REPUBLIC = _gdi_.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2344LANGUAGE_SPANISH_ECUADOR = _gdi_.LANGUAGE_SPANISH_ECUADOR
2345LANGUAGE_SPANISH_EL_SALVADOR = _gdi_.LANGUAGE_SPANISH_EL_SALVADOR
2346LANGUAGE_SPANISH_GUATEMALA = _gdi_.LANGUAGE_SPANISH_GUATEMALA
2347LANGUAGE_SPANISH_HONDURAS = _gdi_.LANGUAGE_SPANISH_HONDURAS
2348LANGUAGE_SPANISH_MEXICAN = _gdi_.LANGUAGE_SPANISH_MEXICAN
2349LANGUAGE_SPANISH_MODERN = _gdi_.LANGUAGE_SPANISH_MODERN
2350LANGUAGE_SPANISH_NICARAGUA = _gdi_.LANGUAGE_SPANISH_NICARAGUA
2351LANGUAGE_SPANISH_PANAMA = _gdi_.LANGUAGE_SPANISH_PANAMA
2352LANGUAGE_SPANISH_PARAGUAY = _gdi_.LANGUAGE_SPANISH_PARAGUAY
2353LANGUAGE_SPANISH_PERU = _gdi_.LANGUAGE_SPANISH_PERU
2354LANGUAGE_SPANISH_PUERTO_RICO = _gdi_.LANGUAGE_SPANISH_PUERTO_RICO
2355LANGUAGE_SPANISH_URUGUAY = _gdi_.LANGUAGE_SPANISH_URUGUAY
2356LANGUAGE_SPANISH_US = _gdi_.LANGUAGE_SPANISH_US
2357LANGUAGE_SPANISH_VENEZUELA = _gdi_.LANGUAGE_SPANISH_VENEZUELA
2358LANGUAGE_SUNDANESE = _gdi_.LANGUAGE_SUNDANESE
2359LANGUAGE_SWAHILI = _gdi_.LANGUAGE_SWAHILI
2360LANGUAGE_SWEDISH = _gdi_.LANGUAGE_SWEDISH
2361LANGUAGE_SWEDISH_FINLAND = _gdi_.LANGUAGE_SWEDISH_FINLAND
2362LANGUAGE_TAGALOG = _gdi_.LANGUAGE_TAGALOG
2363LANGUAGE_TAJIK = _gdi_.LANGUAGE_TAJIK
2364LANGUAGE_TAMIL = _gdi_.LANGUAGE_TAMIL
2365LANGUAGE_TATAR = _gdi_.LANGUAGE_TATAR
2366LANGUAGE_TELUGU = _gdi_.LANGUAGE_TELUGU
2367LANGUAGE_THAI = _gdi_.LANGUAGE_THAI
2368LANGUAGE_TIBETAN = _gdi_.LANGUAGE_TIBETAN
2369LANGUAGE_TIGRINYA = _gdi_.LANGUAGE_TIGRINYA
2370LANGUAGE_TONGA = _gdi_.LANGUAGE_TONGA
2371LANGUAGE_TSONGA = _gdi_.LANGUAGE_TSONGA
2372LANGUAGE_TURKISH = _gdi_.LANGUAGE_TURKISH
2373LANGUAGE_TURKMEN = _gdi_.LANGUAGE_TURKMEN
2374LANGUAGE_TWI = _gdi_.LANGUAGE_TWI
2375LANGUAGE_UIGHUR = _gdi_.LANGUAGE_UIGHUR
2376LANGUAGE_UKRAINIAN = _gdi_.LANGUAGE_UKRAINIAN
2377LANGUAGE_URDU = _gdi_.LANGUAGE_URDU
2378LANGUAGE_URDU_INDIA = _gdi_.LANGUAGE_URDU_INDIA
2379LANGUAGE_URDU_PAKISTAN = _gdi_.LANGUAGE_URDU_PAKISTAN
2380LANGUAGE_UZBEK = _gdi_.LANGUAGE_UZBEK
2381LANGUAGE_UZBEK_CYRILLIC = _gdi_.LANGUAGE_UZBEK_CYRILLIC
2382LANGUAGE_UZBEK_LATIN = _gdi_.LANGUAGE_UZBEK_LATIN
2383LANGUAGE_VIETNAMESE = _gdi_.LANGUAGE_VIETNAMESE
2384LANGUAGE_VOLAPUK = _gdi_.LANGUAGE_VOLAPUK
2385LANGUAGE_WELSH = _gdi_.LANGUAGE_WELSH
2386LANGUAGE_WOLOF = _gdi_.LANGUAGE_WOLOF
2387LANGUAGE_XHOSA = _gdi_.LANGUAGE_XHOSA
2388LANGUAGE_YIDDISH = _gdi_.LANGUAGE_YIDDISH
2389LANGUAGE_YORUBA = _gdi_.LANGUAGE_YORUBA
2390LANGUAGE_ZHUANG = _gdi_.LANGUAGE_ZHUANG
2391LANGUAGE_ZULU = _gdi_.LANGUAGE_ZULU
2392LANGUAGE_USER_DEFINED = _gdi_.LANGUAGE_USER_DEFINED
2393class LanguageInfo(object):
36ed4f51 2394 """Proxy of C++ LanguageInfo class"""
d55e5bfc
RD
2395 def __init__(self): raise RuntimeError, "No constructor defined"
2396 def __repr__(self):
2397 return "<%s.%s; proxy of C++ wxLanguageInfo instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2398 Language = property(_gdi_.LanguageInfo_Language_get, _gdi_.LanguageInfo_Language_set)
2399 CanonicalName = property(_gdi_.LanguageInfo_CanonicalName_get, _gdi_.LanguageInfo_CanonicalName_set)
2400 Description = property(_gdi_.LanguageInfo_Description_get, _gdi_.LanguageInfo_Description_set)
2401
2402class LanguageInfoPtr(LanguageInfo):
2403 def __init__(self, this):
2404 self.this = this
2405 if not hasattr(self,"thisown"): self.thisown = 0
2406 self.__class__ = LanguageInfo
2407_gdi_.LanguageInfo_swigregister(LanguageInfoPtr)
2408
2409LOCALE_CAT_NUMBER = _gdi_.LOCALE_CAT_NUMBER
2410LOCALE_CAT_DATE = _gdi_.LOCALE_CAT_DATE
2411LOCALE_CAT_MONEY = _gdi_.LOCALE_CAT_MONEY
2412LOCALE_CAT_MAX = _gdi_.LOCALE_CAT_MAX
2413LOCALE_THOUSANDS_SEP = _gdi_.LOCALE_THOUSANDS_SEP
2414LOCALE_DECIMAL_POINT = _gdi_.LOCALE_DECIMAL_POINT
2415LOCALE_LOAD_DEFAULT = _gdi_.LOCALE_LOAD_DEFAULT
2416LOCALE_CONV_ENCODING = _gdi_.LOCALE_CONV_ENCODING
2417class Locale(object):
36ed4f51 2418 """Proxy of C++ Locale class"""
d55e5bfc
RD
2419 def __repr__(self):
2420 return "<%s.%s; proxy of C++ wxLocale instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2421 def __init__(self, *args, **kwargs):
15817c7e 2422 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
d55e5bfc
RD
2423 newobj = _gdi_.new_Locale(*args, **kwargs)
2424 self.this = newobj.this
2425 self.thisown = 1
2426 del newobj.thisown
2427 def __del__(self, destroy=_gdi_.delete_Locale):
2428 """__del__(self)"""
2429 try:
2430 if self.thisown: destroy(self)
2431 except: pass
2432
2433 def Init1(*args, **kwargs):
2434 """
2435 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
2436 bool bLoadDefault=True,
2437 bool bConvertEncoding=False) -> bool
2438 """
2439 return _gdi_.Locale_Init1(*args, **kwargs)
2440
2441 def Init2(*args, **kwargs):
2442 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
2443 return _gdi_.Locale_Init2(*args, **kwargs)
2444
2445 def Init(self, *_args, **_kwargs):
2446 if type(_args[0]) in [type(''), type(u'')]:
2447 val = self.Init1(*_args, **_kwargs)
2448 else:
2449 val = self.Init2(*_args, **_kwargs)
2450 return val
2451
2452 def GetSystemLanguage(*args, **kwargs):
d6c14a4c 2453 """GetSystemLanguage() -> int"""
d55e5bfc
RD
2454 return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
2455
2456 GetSystemLanguage = staticmethod(GetSystemLanguage)
2457 def GetSystemEncoding(*args, **kwargs):
d6c14a4c 2458 """GetSystemEncoding() -> int"""
d55e5bfc
RD
2459 return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
2460
2461 GetSystemEncoding = staticmethod(GetSystemEncoding)
2462 def GetSystemEncodingName(*args, **kwargs):
d6c14a4c 2463 """GetSystemEncodingName() -> String"""
d55e5bfc
RD
2464 return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
2465
2466 GetSystemEncodingName = staticmethod(GetSystemEncodingName)
2467 def IsOk(*args, **kwargs):
2468 """IsOk(self) -> bool"""
2469 return _gdi_.Locale_IsOk(*args, **kwargs)
2470
2471 def __nonzero__(self): return self.IsOk()
2472 def GetLocale(*args, **kwargs):
2473 """GetLocale(self) -> String"""
2474 return _gdi_.Locale_GetLocale(*args, **kwargs)
2475
2476 def GetLanguage(*args, **kwargs):
2477 """GetLanguage(self) -> int"""
2478 return _gdi_.Locale_GetLanguage(*args, **kwargs)
2479
2480 def GetSysName(*args, **kwargs):
2481 """GetSysName(self) -> String"""
2482 return _gdi_.Locale_GetSysName(*args, **kwargs)
2483
2484 def GetCanonicalName(*args, **kwargs):
2485 """GetCanonicalName(self) -> String"""
2486 return _gdi_.Locale_GetCanonicalName(*args, **kwargs)
2487
2488 def AddCatalogLookupPathPrefix(*args, **kwargs):
d6c14a4c 2489 """AddCatalogLookupPathPrefix(String prefix)"""
d55e5bfc
RD
2490 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
2491
2492 AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix)
2493 def AddCatalog(*args, **kwargs):
2494 """AddCatalog(self, String szDomain) -> bool"""
2495 return _gdi_.Locale_AddCatalog(*args, **kwargs)
2496
2497 def IsLoaded(*args, **kwargs):
2498 """IsLoaded(self, String szDomain) -> bool"""
2499 return _gdi_.Locale_IsLoaded(*args, **kwargs)
2500
2501 def GetLanguageInfo(*args, **kwargs):
d6c14a4c 2502 """GetLanguageInfo(int lang) -> LanguageInfo"""
d55e5bfc
RD
2503 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
2504
2505 GetLanguageInfo = staticmethod(GetLanguageInfo)
2506 def GetLanguageName(*args, **kwargs):
d6c14a4c 2507 """GetLanguageName(int lang) -> String"""
d55e5bfc
RD
2508 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
2509
2510 GetLanguageName = staticmethod(GetLanguageName)
2511 def FindLanguageInfo(*args, **kwargs):
d6c14a4c 2512 """FindLanguageInfo(String locale) -> LanguageInfo"""
d55e5bfc
RD
2513 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
2514
2515 FindLanguageInfo = staticmethod(FindLanguageInfo)
2516 def AddLanguage(*args, **kwargs):
d6c14a4c 2517 """AddLanguage(LanguageInfo info)"""
d55e5bfc
RD
2518 return _gdi_.Locale_AddLanguage(*args, **kwargs)
2519
2520 AddLanguage = staticmethod(AddLanguage)
2521 def GetString(*args, **kwargs):
2522 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
2523 return _gdi_.Locale_GetString(*args, **kwargs)
2524
2525 def GetName(*args, **kwargs):
2526 """GetName(self) -> String"""
2527 return _gdi_.Locale_GetName(*args, **kwargs)
2528
2529
2530class LocalePtr(Locale):
2531 def __init__(self, this):
2532 self.this = this
2533 if not hasattr(self,"thisown"): self.thisown = 0
2534 self.__class__ = Locale
2535_gdi_.Locale_swigregister(LocalePtr)
2536
2537def Locale_GetSystemLanguage(*args, **kwargs):
2538 """Locale_GetSystemLanguage() -> int"""
2539 return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
2540
2541def Locale_GetSystemEncoding(*args, **kwargs):
2542 """Locale_GetSystemEncoding() -> int"""
2543 return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
2544
2545def Locale_GetSystemEncodingName(*args, **kwargs):
2546 """Locale_GetSystemEncodingName() -> String"""
2547 return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
2548
2549def Locale_AddCatalogLookupPathPrefix(*args, **kwargs):
2550 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2551 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
2552
2553def Locale_GetLanguageInfo(*args, **kwargs):
2554 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2555 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
2556
2557def Locale_GetLanguageName(*args, **kwargs):
2558 """Locale_GetLanguageName(int lang) -> String"""
2559 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
2560
2561def Locale_FindLanguageInfo(*args, **kwargs):
2562 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2563 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
2564
2565def Locale_AddLanguage(*args, **kwargs):
2566 """Locale_AddLanguage(LanguageInfo info)"""
2567 return _gdi_.Locale_AddLanguage(*args, **kwargs)
2568
2569
2570def GetLocale(*args, **kwargs):
2571 """GetLocale() -> Locale"""
2572 return _gdi_.GetLocale(*args, **kwargs)
2573#---------------------------------------------------------------------------
2574
2575CONVERT_STRICT = _gdi_.CONVERT_STRICT
2576CONVERT_SUBSTITUTE = _gdi_.CONVERT_SUBSTITUTE
2577PLATFORM_CURRENT = _gdi_.PLATFORM_CURRENT
2578PLATFORM_UNIX = _gdi_.PLATFORM_UNIX
2579PLATFORM_WINDOWS = _gdi_.PLATFORM_WINDOWS
2580PLATFORM_OS2 = _gdi_.PLATFORM_OS2
2581PLATFORM_MAC = _gdi_.PLATFORM_MAC
2582class EncodingConverter(_core.Object):
36ed4f51 2583 """Proxy of C++ EncodingConverter class"""
d55e5bfc
RD
2584 def __repr__(self):
2585 return "<%s.%s; proxy of C++ wxEncodingConverter instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2586 def __init__(self, *args, **kwargs):
2587 """__init__(self) -> EncodingConverter"""
2588 newobj = _gdi_.new_EncodingConverter(*args, **kwargs)
2589 self.this = newobj.this
2590 self.thisown = 1
2591 del newobj.thisown
2592 def __del__(self, destroy=_gdi_.delete_EncodingConverter):
2593 """__del__(self)"""
2594 try:
2595 if self.thisown: destroy(self)
2596 except: pass
2597
2598 def Init(*args, **kwargs):
2599 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
2600 return _gdi_.EncodingConverter_Init(*args, **kwargs)
2601
2602 def Convert(*args, **kwargs):
2603 """Convert(self, String input) -> String"""
2604 return _gdi_.EncodingConverter_Convert(*args, **kwargs)
2605
2606 def GetPlatformEquivalents(*args, **kwargs):
d6c14a4c 2607 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
d55e5bfc
RD
2608 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
2609
2610 GetPlatformEquivalents = staticmethod(GetPlatformEquivalents)
2611 def GetAllEquivalents(*args, **kwargs):
d6c14a4c 2612 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
d55e5bfc
RD
2613 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
2614
2615 GetAllEquivalents = staticmethod(GetAllEquivalents)
2616 def CanConvert(*args, **kwargs):
d6c14a4c 2617 """CanConvert(int encIn, int encOut) -> bool"""
d55e5bfc
RD
2618 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
2619
2620 CanConvert = staticmethod(CanConvert)
2621 def __nonzero__(self): return self.IsOk()
2622
2623class EncodingConverterPtr(EncodingConverter):
2624 def __init__(self, this):
2625 self.this = this
2626 if not hasattr(self,"thisown"): self.thisown = 0
2627 self.__class__ = EncodingConverter
2628_gdi_.EncodingConverter_swigregister(EncodingConverterPtr)
2629
2630def GetTranslation(*args):
2631 """
2632 GetTranslation(String str) -> String
2633 GetTranslation(String str, String strPlural, size_t n) -> String
2634 """
2635 return _gdi_.GetTranslation(*args)
2636
2637def EncodingConverter_GetPlatformEquivalents(*args, **kwargs):
2638 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2639 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
2640
2641def EncodingConverter_GetAllEquivalents(*args, **kwargs):
2642 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2643 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
2644
2645def EncodingConverter_CanConvert(*args, **kwargs):
2646 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2647 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
2648
2649#----------------------------------------------------------------------------
68e533f8 2650# On MSW add the directory where the wxWidgets catalogs were installed
d55e5bfc
RD
2651# to the default catalog path.
2652if wx.Platform == "__WXMSW__":
2653 import os
8fb0e70a
RD
2654 _localedir = os.path.join(os.path.split(__file__)[0], "locale")
2655 Locale.AddCatalogLookupPathPrefix(_localedir)
d55e5bfc
RD
2656 del os
2657
2658#----------------------------------------------------------------------------
2659
2660#---------------------------------------------------------------------------
2661
2662class DC(_core.Object):
f5b96ee1
RD
2663 """
2664 A wx.DC is a device context onto which graphics and text can be
2665 drawn. It is intended to represent a number of output devices in a
2666 generic way, so a window can have a device context associated with it,
2667 and a printer also has a device context. In this way, the same piece
2668 of code may write to a number of different devices, if the device
2669 context is used as a parameter.
2670
2671 Derived types of wxDC have documentation for specific features only,
2672 so refer to this section for most device context information.
2673
2674 The wx.DC class is abstract and can not be instantiated, you must use
2675 one of the derived classes instead. Which one will depend on the
2676 situation in which it is used.
2677 """
d55e5bfc
RD
2678 def __init__(self): raise RuntimeError, "No constructor defined"
2679 def __repr__(self):
2680 return "<%s.%s; proxy of C++ wxDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2681 def __del__(self, destroy=_gdi_.delete_DC):
2682 """__del__(self)"""
2683 try:
2684 if self.thisown: destroy(self)
2685 except: pass
2686
2687 def BeginDrawing(*args, **kwargs):
f5b96ee1
RD
2688 """
2689 BeginDrawing(self)
2690
2691 Allows for optimization of drawing code on platforms that need it. On
2692 other platforms this is just an empty function and is harmless. To
2693 take advantage of this postential optimization simply enclose each
2694 group of calls to the drawing primitives within calls to
2695 `BeginDrawing` and `EndDrawing`.
2696 """
d55e5bfc
RD
2697 return _gdi_.DC_BeginDrawing(*args, **kwargs)
2698
2699 def EndDrawing(*args, **kwargs):
f5b96ee1
RD
2700 """
2701 EndDrawing(self)
2702
2703 Ends the group of drawing primitives started with `BeginDrawing`, and
2704 invokes whatever optimization is available for this DC type on the
2705 current platform.
2706 """
d55e5bfc
RD
2707 return _gdi_.DC_EndDrawing(*args, **kwargs)
2708
d55e5bfc 2709 def FloodFill(*args, **kwargs):
f5b96ee1
RD
2710 """
2711 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2712
2713 Flood fills the device context starting from the given point, using
2714 the current brush colour, and using a style:
2715
2716 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2717 the given colour is encountered.
2718
2719 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2720 colour.
2721
2722 Returns False if the operation failed.
2723
2724 Note: The present implementation for non-Windows platforms may fail to
2725 find colour borders if the pixels do not match the colour
2726 exactly. However the function will still return true.
2727 """
d55e5bfc
RD
2728 return _gdi_.DC_FloodFill(*args, **kwargs)
2729
d6c14a4c 2730 def FloodFillPoint(*args, **kwargs):
f5b96ee1
RD
2731 """
2732 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2733
2734 Flood fills the device context starting from the given point, using
2735 the current brush colour, and using a style:
2736
2737 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2738 the given colour is encountered.
2739
2740 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2741 colour.
2742
2743 Returns False if the operation failed.
2744
2745 Note: The present implementation for non-Windows platforms may fail to
2746 find colour borders if the pixels do not match the colour
2747 exactly. However the function will still return true.
2748 """
d6c14a4c 2749 return _gdi_.DC_FloodFillPoint(*args, **kwargs)
d55e5bfc
RD
2750
2751 def GetPixel(*args, **kwargs):
f5b96ee1
RD
2752 """
2753 GetPixel(self, int x, int y) -> Colour
2754
2755 Gets the colour at the specified location on the DC.
2756 """
d55e5bfc
RD
2757 return _gdi_.DC_GetPixel(*args, **kwargs)
2758
d6c14a4c
RD
2759 def GetPixelPoint(*args, **kwargs):
2760 """GetPixelPoint(self, Point pt) -> Colour"""
2761 return _gdi_.DC_GetPixelPoint(*args, **kwargs)
d55e5bfc
RD
2762
2763 def DrawLine(*args, **kwargs):
f5b96ee1
RD
2764 """
2765 DrawLine(self, int x1, int y1, int x2, int y2)
2766
2767 Draws a line from the first point to the second. The current pen is
2768 used for drawing the line. Note that the second point is *not* part of
2769 the line and is not drawn by this function (this is consistent with
2770 the behaviour of many other toolkits).
2771 """
d55e5bfc
RD
2772 return _gdi_.DC_DrawLine(*args, **kwargs)
2773
d6c14a4c 2774 def DrawLinePoint(*args, **kwargs):
f5b96ee1
RD
2775 """
2776 DrawLinePoint(self, Point pt1, Point pt2)
2777
2778 Draws a line from the first point to the second. The current pen is
2779 used for drawing the line. Note that the second point is *not* part of
2780 the line and is not drawn by this function (this is consistent with
2781 the behaviour of many other toolkits).
2782 """
d6c14a4c 2783 return _gdi_.DC_DrawLinePoint(*args, **kwargs)
d55e5bfc
RD
2784
2785 def CrossHair(*args, **kwargs):
f5b96ee1
RD
2786 """
2787 CrossHair(self, int x, int y)
2788
2789 Displays a cross hair using the current pen. This is a vertical and
2790 horizontal line the height and width of the window, centred on the
2791 given point.
2792 """
d55e5bfc
RD
2793 return _gdi_.DC_CrossHair(*args, **kwargs)
2794
d6c14a4c 2795 def CrossHairPoint(*args, **kwargs):
f5b96ee1
RD
2796 """
2797 CrossHairPoint(self, Point pt)
2798
2799 Displays a cross hair using the current pen. This is a vertical and
2800 horizontal line the height and width of the window, centred on the
2801 given point.
2802 """
d6c14a4c 2803 return _gdi_.DC_CrossHairPoint(*args, **kwargs)
d55e5bfc
RD
2804
2805 def DrawArc(*args, **kwargs):
f5b96ee1
RD
2806 """
2807 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2808
2809 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2810 the first point to the second. The current pen is used for the outline
2811 and the current brush for filling the shape.
2812
2813 The arc is drawn in an anticlockwise direction from the start point to
2814 the end point.
2815 """
d55e5bfc
RD
2816 return _gdi_.DC_DrawArc(*args, **kwargs)
2817
d6c14a4c 2818 def DrawArcPoint(*args, **kwargs):
f5b96ee1
RD
2819 """
2820 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2821
2822 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2823 the first point to the second. The current pen is used for the outline
2824 and the current brush for filling the shape.
2825
2826 The arc is drawn in an anticlockwise direction from the start point to
2827 the end point.
2828 """
d6c14a4c 2829 return _gdi_.DC_DrawArcPoint(*args, **kwargs)
d55e5bfc
RD
2830
2831 def DrawCheckMark(*args, **kwargs):
f5b96ee1
RD
2832 """
2833 DrawCheckMark(self, int x, int y, int width, int height)
2834
2835 Draws a check mark inside the given rectangle.
2836 """
d55e5bfc
RD
2837 return _gdi_.DC_DrawCheckMark(*args, **kwargs)
2838
d6c14a4c 2839 def DrawCheckMarkRect(*args, **kwargs):
f5b96ee1
RD
2840 """
2841 DrawCheckMarkRect(self, Rect rect)
2842
2843 Draws a check mark inside the given rectangle.
2844 """
d6c14a4c 2845 return _gdi_.DC_DrawCheckMarkRect(*args, **kwargs)
d55e5bfc
RD
2846
2847 def DrawEllipticArc(*args, **kwargs):
f5b96ee1
RD
2848 """
2849 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
2850
2851 Draws an arc of an ellipse, with the given rectangle defining the
2852 bounds of the ellipse. The current pen is used for drawing the arc and
2853 the current brush is used for drawing the pie.
2854
2855 The *start* and *end* parameters specify the start and end of the arc
2856 relative to the three-o'clock position from the center of the
2857 rectangle. Angles are specified in degrees (360 is a complete
2858 circle). Positive values mean counter-clockwise motion. If start is
2859 equal to end, a complete ellipse will be drawn.
2860 """
d55e5bfc
RD
2861 return _gdi_.DC_DrawEllipticArc(*args, **kwargs)
2862
d6c14a4c 2863 def DrawEllipticArcPointSize(*args, **kwargs):
f5b96ee1
RD
2864 """
2865 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
2866
2867 Draws an arc of an ellipse, with the given rectangle defining the
2868 bounds of the ellipse. The current pen is used for drawing the arc and
2869 the current brush is used for drawing the pie.
2870
2871 The *start* and *end* parameters specify the start and end of the arc
2872 relative to the three-o'clock position from the center of the
2873 rectangle. Angles are specified in degrees (360 is a complete
2874 circle). Positive values mean counter-clockwise motion. If start is
2875 equal to end, a complete ellipse will be drawn.
2876 """
d6c14a4c 2877 return _gdi_.DC_DrawEllipticArcPointSize(*args, **kwargs)
d55e5bfc
RD
2878
2879 def DrawPoint(*args, **kwargs):
f5b96ee1
RD
2880 """
2881 DrawPoint(self, int x, int y)
2882
2883 Draws a point using the current pen.
2884 """
d55e5bfc
RD
2885 return _gdi_.DC_DrawPoint(*args, **kwargs)
2886
d6c14a4c 2887 def DrawPointPoint(*args, **kwargs):
f5b96ee1
RD
2888 """
2889 DrawPointPoint(self, Point pt)
2890
2891 Draws a point using the current pen.
2892 """
d6c14a4c 2893 return _gdi_.DC_DrawPointPoint(*args, **kwargs)
d55e5bfc
RD
2894
2895 def DrawRectangle(*args, **kwargs):
f5b96ee1
RD
2896 """
2897 DrawRectangle(self, int x, int y, int width, int height)
2898
2899 Draws a rectangle with the given top left corner, and with the given
2900 size. The current pen is used for the outline and the current brush
2901 for filling the shape.
2902 """
d55e5bfc
RD
2903 return _gdi_.DC_DrawRectangle(*args, **kwargs)
2904
2905 def DrawRectangleRect(*args, **kwargs):
f5b96ee1
RD
2906 """
2907 DrawRectangleRect(self, Rect rect)
2908
2909 Draws a rectangle with the given top left corner, and with the given
2910 size. The current pen is used for the outline and the current brush
2911 for filling the shape.
2912 """
d55e5bfc
RD
2913 return _gdi_.DC_DrawRectangleRect(*args, **kwargs)
2914
d6c14a4c 2915 def DrawRectanglePointSize(*args, **kwargs):
f5b96ee1
RD
2916 """
2917 DrawRectanglePointSize(self, Point pt, Size sz)
2918
2919 Draws a rectangle with the given top left corner, and with the given
2920 size. The current pen is used for the outline and the current brush
2921 for filling the shape.
2922 """
d6c14a4c 2923 return _gdi_.DC_DrawRectanglePointSize(*args, **kwargs)
d55e5bfc
RD
2924
2925 def DrawRoundedRectangle(*args, **kwargs):
f5b96ee1
RD
2926 """
2927 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
2928
2929 Draws a rectangle with the given top left corner, and with the given
2930 size. The corners are quarter-circles using the given radius. The
2931 current pen is used for the outline and the current brush for filling
2932 the shape.
2933
2934 If radius is positive, the value is assumed to be the radius of the
2935 rounded corner. If radius is negative, the absolute value is assumed
2936 to be the proportion of the smallest dimension of the rectangle. This
2937 means that the corner can be a sensible size relative to the size of
2938 the rectangle, and also avoids the strange effects X produces when the
2939 corners are too big for the rectangle.
2940 """
d55e5bfc
RD
2941 return _gdi_.DC_DrawRoundedRectangle(*args, **kwargs)
2942
2943 def DrawRoundedRectangleRect(*args, **kwargs):
f5b96ee1
RD
2944 """
2945 DrawRoundedRectangleRect(self, Rect r, double radius)
2946
2947 Draws a rectangle with the given top left corner, and with the given
2948 size. The corners are quarter-circles using the given radius. The
2949 current pen is used for the outline and the current brush for filling
2950 the shape.
2951
2952 If radius is positive, the value is assumed to be the radius of the
2953 rounded corner. If radius is negative, the absolute value is assumed
2954 to be the proportion of the smallest dimension of the rectangle. This
2955 means that the corner can be a sensible size relative to the size of
2956 the rectangle, and also avoids the strange effects X produces when the
2957 corners are too big for the rectangle.
2958 """
d55e5bfc
RD
2959 return _gdi_.DC_DrawRoundedRectangleRect(*args, **kwargs)
2960
d6c14a4c 2961 def DrawRoundedRectanglePointSize(*args, **kwargs):
f5b96ee1
RD
2962 """
2963 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
2964
2965 Draws a rectangle with the given top left corner, and with the given
2966 size. The corners are quarter-circles using the given radius. The
2967 current pen is used for the outline and the current brush for filling
2968 the shape.
2969
2970 If radius is positive, the value is assumed to be the radius of the
2971 rounded corner. If radius is negative, the absolute value is assumed
2972 to be the proportion of the smallest dimension of the rectangle. This
2973 means that the corner can be a sensible size relative to the size of
2974 the rectangle, and also avoids the strange effects X produces when the
2975 corners are too big for the rectangle.
2976 """
d6c14a4c 2977 return _gdi_.DC_DrawRoundedRectanglePointSize(*args, **kwargs)
d55e5bfc
RD
2978
2979 def DrawCircle(*args, **kwargs):
f5b96ee1
RD
2980 """
2981 DrawCircle(self, int x, int y, int radius)
2982
2983 Draws a circle with the given center point and radius. The current
2984 pen is used for the outline and the current brush for filling the
2985 shape.
2986 """
d55e5bfc
RD
2987 return _gdi_.DC_DrawCircle(*args, **kwargs)
2988
d6c14a4c 2989 def DrawCirclePoint(*args, **kwargs):
f5b96ee1
RD
2990 """
2991 DrawCirclePoint(self, Point pt, int radius)
2992
2993 Draws a circle with the given center point and radius. The current
2994 pen is used for the outline and the current brush for filling the
2995 shape.
2996 """
d6c14a4c 2997 return _gdi_.DC_DrawCirclePoint(*args, **kwargs)
d55e5bfc
RD
2998
2999 def DrawEllipse(*args, **kwargs):
f5b96ee1
RD
3000 """
3001 DrawEllipse(self, int x, int y, int width, int height)
3002
3003 Draws an ellipse contained in the specified rectangle. The current pen
3004 is used for the outline and the current brush for filling the shape.
3005 """
d55e5bfc
RD
3006 return _gdi_.DC_DrawEllipse(*args, **kwargs)
3007
3008 def DrawEllipseRect(*args, **kwargs):
f5b96ee1
RD
3009 """
3010 DrawEllipseRect(self, Rect rect)
3011
3012 Draws an ellipse contained in the specified rectangle. The current pen
3013 is used for the outline and the current brush for filling the shape.
3014 """
d55e5bfc
RD
3015 return _gdi_.DC_DrawEllipseRect(*args, **kwargs)
3016
d6c14a4c 3017 def DrawEllipsePointSize(*args, **kwargs):
f5b96ee1
RD
3018 """
3019 DrawEllipsePointSize(self, Point pt, Size sz)
3020
3021 Draws an ellipse contained in the specified rectangle. The current pen
3022 is used for the outline and the current brush for filling the shape.
3023 """
d6c14a4c 3024 return _gdi_.DC_DrawEllipsePointSize(*args, **kwargs)
d55e5bfc
RD
3025
3026 def DrawIcon(*args, **kwargs):
f5b96ee1
RD
3027 """
3028 DrawIcon(self, Icon icon, int x, int y)
3029
3030 Draw an icon on the display (does nothing if the device context is
3031 PostScript). This can be the simplest way of drawing bitmaps on a
3032 window.
3033 """
d55e5bfc
RD
3034 return _gdi_.DC_DrawIcon(*args, **kwargs)
3035
d6c14a4c 3036 def DrawIconPoint(*args, **kwargs):
f5b96ee1
RD
3037 """
3038 DrawIconPoint(self, Icon icon, Point pt)
3039
3040 Draw an icon on the display (does nothing if the device context is
3041 PostScript). This can be the simplest way of drawing bitmaps on a
3042 window.
3043 """
d6c14a4c 3044 return _gdi_.DC_DrawIconPoint(*args, **kwargs)
d55e5bfc
RD
3045
3046 def DrawBitmap(*args, **kwargs):
f5b96ee1
RD
3047 """
3048 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3049
3050 Draw a bitmap on the device context at the specified point. If
3051 *transparent* is true and the bitmap has a transparency mask, (or
3052 alpha channel on the platforms that support it) then the bitmap will
3053 be drawn transparently.
3054 """
d55e5bfc
RD
3055 return _gdi_.DC_DrawBitmap(*args, **kwargs)
3056
d6c14a4c 3057 def DrawBitmapPoint(*args, **kwargs):
f5b96ee1
RD
3058 """
3059 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3060
3061 Draw a bitmap on the device context at the specified point. If
3062 *transparent* is true and the bitmap has a transparency mask, (or
3063 alpha channel on the platforms that support it) then the bitmap will
3064 be drawn transparently.
3065 """
d6c14a4c 3066 return _gdi_.DC_DrawBitmapPoint(*args, **kwargs)
d55e5bfc
RD
3067
3068 def DrawText(*args, **kwargs):
f5b96ee1
RD
3069 """
3070 DrawText(self, String text, int x, int y)
3071
3072 Draws a text string at the specified point, using the current text
3073 font, and the current text foreground and background colours.
3074
3075 The coordinates refer to the top-left corner of the rectangle bounding
3076 the string. See `GetTextExtent` for how to get the dimensions of a
3077 text string, which can be used to position the text more precisely.
3078
3079 **NOTE**: under wxGTK the current logical function is used by this
3080 function but it is ignored by wxMSW. Thus, you should avoid using
3081 logical functions with this function in portable programs.
3082 """
d55e5bfc
RD
3083 return _gdi_.DC_DrawText(*args, **kwargs)
3084
d6c14a4c 3085 def DrawTextPoint(*args, **kwargs):
f5b96ee1
RD
3086 """
3087 DrawTextPoint(self, String text, Point pt)
3088
3089 Draws a text string at the specified point, using the current text
3090 font, and the current text foreground and background colours.
3091
3092 The coordinates refer to the top-left corner of the rectangle bounding
3093 the string. See `GetTextExtent` for how to get the dimensions of a
3094 text string, which can be used to position the text more precisely.
3095
3096 **NOTE**: under wxGTK the current logical function is used by this
3097 function but it is ignored by wxMSW. Thus, you should avoid using
3098 logical functions with this function in portable programs.
3099 """
d6c14a4c 3100 return _gdi_.DC_DrawTextPoint(*args, **kwargs)
d55e5bfc
RD
3101
3102 def DrawRotatedText(*args, **kwargs):
f5b96ee1
RD
3103 """
3104 DrawRotatedText(self, String text, int x, int y, double angle)
3105
3106 Draws the text rotated by *angle* degrees, if supported by the platform.
3107
3108 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3109 function. In particular, a font different from ``wx.NORMAL_FONT``
3110 should be used as the it is not normally a TrueType
3111 font. ``wx.SWISS_FONT`` is an example of a font which is.
3112 """
d55e5bfc
RD
3113 return _gdi_.DC_DrawRotatedText(*args, **kwargs)
3114
d6c14a4c 3115 def DrawRotatedTextPoint(*args, **kwargs):
f5b96ee1
RD
3116 """
3117 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3118
3119 Draws the text rotated by *angle* degrees, if supported by the platform.
3120
3121 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3122 function. In particular, a font different from ``wx.NORMAL_FONT``
3123 should be used as the it is not normally a TrueType
3124 font. ``wx.SWISS_FONT`` is an example of a font which is.
3125 """
d6c14a4c
RD
3126 return _gdi_.DC_DrawRotatedTextPoint(*args, **kwargs)
3127
3128 def Blit(*args, **kwargs):
d55e5bfc 3129 """
d6c14a4c 3130 Blit(self, int xdest, int ydest, int width, int height, DC source,
d55e5bfc
RD
3131 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3132 int xsrcMask=-1, int ysrcMask=-1) -> bool
f5b96ee1
RD
3133
3134 Copy from a source DC to this DC. Parameters specify the destination
3135 coordinates, size of area to copy, source DC, source coordinates,
3136 logical function, whether to use a bitmap mask, and mask source
3137 position.
d55e5bfc 3138 """
d6c14a4c 3139 return _gdi_.DC_Blit(*args, **kwargs)
d55e5bfc 3140
d6c14a4c 3141 def BlitPointSize(*args, **kwargs):
d55e5bfc 3142 """
d6c14a4c 3143 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
d55e5bfc 3144 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
f5b96ee1
RD
3145
3146 Copy from a source DC to this DC. Parameters specify the destination
3147 coordinates, size of area to copy, source DC, source coordinates,
3148 logical function, whether to use a bitmap mask, and mask source
3149 position.
d55e5bfc 3150 """
d6c14a4c
RD
3151 return _gdi_.DC_BlitPointSize(*args, **kwargs)
3152
3153 def SetClippingRegion(*args, **kwargs):
f5b96ee1
RD
3154 """
3155 SetClippingRegion(self, int x, int y, int width, int height)
3156
3157 Sets the clipping region for this device context to the intersection
3158 of the given region described by the parameters of this method and the
3159 previously set clipping region. You should call `DestroyClippingRegion`
3160 if you want to set the clipping region exactly to the region
3161 specified.
3162
3163 The clipping region is an area to which drawing is
3164 restricted. Possible uses for the clipping region are for clipping
3165 text or for speeding up window redraws when only a known area of the
3166 screen is damaged.
3167 """
d6c14a4c
RD
3168 return _gdi_.DC_SetClippingRegion(*args, **kwargs)
3169
3170 def SetClippingRegionPointSize(*args, **kwargs):
f5b96ee1
RD
3171 """
3172 SetClippingRegionPointSize(self, Point pt, Size sz)
3173
3174 Sets the clipping region for this device context to the intersection
3175 of the given region described by the parameters of this method and the
3176 previously set clipping region. You should call `DestroyClippingRegion`
3177 if you want to set the clipping region exactly to the region
3178 specified.
3179
3180 The clipping region is an area to which drawing is
3181 restricted. Possible uses for the clipping region are for clipping
3182 text or for speeding up window redraws when only a known area of the
3183 screen is damaged.
3184 """
d6c14a4c
RD
3185 return _gdi_.DC_SetClippingRegionPointSize(*args, **kwargs)
3186
3187 def SetClippingRegionAsRegion(*args, **kwargs):
f5b96ee1
RD
3188 """
3189 SetClippingRegionAsRegion(self, Region region)
3190
3191 Sets the clipping region for this device context to the intersection
3192 of the given region described by the parameters of this method and the
3193 previously set clipping region. You should call `DestroyClippingRegion`
3194 if you want to set the clipping region exactly to the region
3195 specified.
3196
3197 The clipping region is an area to which drawing is
3198 restricted. Possible uses for the clipping region are for clipping
3199 text or for speeding up window redraws when only a known area of the
3200 screen is damaged.
3201 """
d6c14a4c
RD
3202 return _gdi_.DC_SetClippingRegionAsRegion(*args, **kwargs)
3203
3204 def SetClippingRect(*args, **kwargs):
f5b96ee1
RD
3205 """
3206 SetClippingRect(self, Rect rect)
3207
3208 Sets the clipping region for this device context to the intersection
3209 of the given region described by the parameters of this method and the
3210 previously set clipping region. You should call `DestroyClippingRegion`
3211 if you want to set the clipping region exactly to the region
3212 specified.
3213
3214 The clipping region is an area to which drawing is
3215 restricted. Possible uses for the clipping region are for clipping
3216 text or for speeding up window redraws when only a known area of the
3217 screen is damaged.
3218 """
d6c14a4c 3219 return _gdi_.DC_SetClippingRect(*args, **kwargs)
d55e5bfc
RD
3220
3221 def DrawLines(*args, **kwargs):
f5b96ee1
RD
3222 """
3223 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3224
3225 Draws lines using a sequence of `wx.Point` objects, adding the
3226 optional offset coordinate. The current pen is used for drawing the
3227 lines.
3228 """
d55e5bfc
RD
3229 return _gdi_.DC_DrawLines(*args, **kwargs)
3230
3231 def DrawPolygon(*args, **kwargs):
3232 """
f5b96ee1 3233 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
d55e5bfc 3234 int fillStyle=ODDEVEN_RULE)
f5b96ee1
RD
3235
3236 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3237 the optional offset coordinate. The last argument specifies the fill
3238 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3239
3240 The current pen is used for drawing the outline, and the current brush
3241 for filling the shape. Using a transparent brush suppresses
3242 filling. Note that wxWidgets automatically closes the first and last
3243 points.
d55e5bfc
RD
3244 """
3245 return _gdi_.DC_DrawPolygon(*args, **kwargs)
3246
3247 def DrawLabel(*args, **kwargs):
3248 """
3249 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3250 int indexAccel=-1)
f5b96ee1
RD
3251
3252 Draw *text* within the specified rectangle, abiding by the alignment
3253 flags. Will additionally emphasize the character at *indexAccel* if
3254 it is not -1.
d55e5bfc
RD
3255 """
3256 return _gdi_.DC_DrawLabel(*args, **kwargs)
3257
3258 def DrawImageLabel(*args, **kwargs):
3259 """
3260 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
3261 int indexAccel=-1) -> Rect
f5b96ee1
RD
3262
3263 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3264 drawing it) within the specified rectangle, abiding by the alignment
3265 flags. Will additionally emphasize the character at *indexAccel* if
3266 it is not -1. Returns the bounding rectangle.
d55e5bfc
RD
3267 """
3268 return _gdi_.DC_DrawImageLabel(*args, **kwargs)
3269
3270 def DrawSpline(*args, **kwargs):
f5b96ee1
RD
3271 """
3272 DrawSpline(self, List points)
3273
3274 Draws a spline between all given control points, (a list of `wx.Point`
3275 objects) using the current pen. The spline is drawn using a series of
3276 lines, using an algorithm taken from the X drawing program 'XFIG'.
3277 """
d55e5bfc
RD
3278 return _gdi_.DC_DrawSpline(*args, **kwargs)
3279
3280 def Clear(*args, **kwargs):
f5b96ee1
RD
3281 """
3282 Clear(self)
3283
3284 Clears the device context using the current background brush.
3285 """
d55e5bfc
RD
3286 return _gdi_.DC_Clear(*args, **kwargs)
3287
3288 def StartDoc(*args, **kwargs):
f5b96ee1
RD
3289 """
3290 StartDoc(self, String message) -> bool
3291
3292 Starts a document (only relevant when outputting to a
3293 printer). *Message* is a message to show whilst printing.
3294 """
d55e5bfc
RD
3295 return _gdi_.DC_StartDoc(*args, **kwargs)
3296
3297 def EndDoc(*args, **kwargs):
f5b96ee1
RD
3298 """
3299 EndDoc(self)
3300
3301 Ends a document (only relevant when outputting to a printer).
3302 """
d55e5bfc
RD
3303 return _gdi_.DC_EndDoc(*args, **kwargs)
3304
3305 def StartPage(*args, **kwargs):
f5b96ee1
RD
3306 """
3307 StartPage(self)
3308
3309 Starts a document page (only relevant when outputting to a printer).
3310 """
d55e5bfc
RD
3311 return _gdi_.DC_StartPage(*args, **kwargs)
3312
3313 def EndPage(*args, **kwargs):
f5b96ee1
RD
3314 """
3315 EndPage(self)
3316
3317 Ends a document page (only relevant when outputting to a printer).
3318 """
d55e5bfc
RD
3319 return _gdi_.DC_EndPage(*args, **kwargs)
3320
3321 def SetFont(*args, **kwargs):
f5b96ee1
RD
3322 """
3323 SetFont(self, Font font)
3324
3325 Sets the current font for the DC. It must be a valid font, in
3326 particular you should not pass ``wx.NullFont`` to this method.
3327 """
d55e5bfc
RD
3328 return _gdi_.DC_SetFont(*args, **kwargs)
3329
3330 def SetPen(*args, **kwargs):
f5b96ee1
RD
3331 """
3332 SetPen(self, Pen pen)
3333
3334 Sets the current pen for the DC.
3335
3336 If the argument is ``wx.NullPen``, the current pen is selected out of the
3337 device context, and the original pen restored.
3338 """
d55e5bfc
RD
3339 return _gdi_.DC_SetPen(*args, **kwargs)
3340
3341 def SetBrush(*args, **kwargs):
f5b96ee1
RD
3342 """
3343 SetBrush(self, Brush brush)
3344
3345 Sets the current brush for the DC.
3346
3347 If the argument is ``wx.NullBrush``, the current brush is selected out
3348 of the device context, and the original brush restored, allowing the
3349 current brush to be destroyed safely.
3350 """
d55e5bfc
RD
3351 return _gdi_.DC_SetBrush(*args, **kwargs)
3352
3353 def SetBackground(*args, **kwargs):
f5b96ee1
RD
3354 """
3355 SetBackground(self, Brush brush)
3356
3357 Sets the current background brush for the DC.
3358 """
d55e5bfc
RD
3359 return _gdi_.DC_SetBackground(*args, **kwargs)
3360
3361 def SetBackgroundMode(*args, **kwargs):
f5b96ee1
RD
3362 """
3363 SetBackgroundMode(self, int mode)
3364
3365 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3366 determines whether text will be drawn with a background colour or
3367 not.
3368 """
d55e5bfc
RD
3369 return _gdi_.DC_SetBackgroundMode(*args, **kwargs)
3370
3371 def SetPalette(*args, **kwargs):
f5b96ee1
RD
3372 """
3373 SetPalette(self, Palette palette)
3374
3375 If this is a window DC or memory DC, assigns the given palette to the
3376 window or bitmap associated with the DC. If the argument is
3377 ``wx.NullPalette``, the current palette is selected out of the device
3378 context, and the original palette restored.
3379 """
d55e5bfc
RD
3380 return _gdi_.DC_SetPalette(*args, **kwargs)
3381
d55e5bfc 3382 def DestroyClippingRegion(*args, **kwargs):
f5b96ee1
RD
3383 """
3384 DestroyClippingRegion(self)
3385
3386 Destroys the current clipping region so that none of the DC is
3387 clipped.
3388 """
d55e5bfc
RD
3389 return _gdi_.DC_DestroyClippingRegion(*args, **kwargs)
3390
3391 def GetClippingBox(*args, **kwargs):
f5b96ee1
RD
3392 """
3393 GetClippingBox() -> (x, y, width, height)
3394
3395 Gets the rectangle surrounding the current clipping region.
3396 """
d55e5bfc
RD
3397 return _gdi_.DC_GetClippingBox(*args, **kwargs)
3398
3399 def GetClippingRect(*args, **kwargs):
f5b96ee1
RD
3400 """
3401 GetClippingRect(self) -> Rect
3402
3403 Gets the rectangle surrounding the current clipping region.
3404 """
d55e5bfc
RD
3405 return _gdi_.DC_GetClippingRect(*args, **kwargs)
3406
3407 def GetCharHeight(*args, **kwargs):
f5b96ee1
RD
3408 """
3409 GetCharHeight(self) -> int
3410
3411 Gets the character height of the currently set font.
3412 """
d55e5bfc
RD
3413 return _gdi_.DC_GetCharHeight(*args, **kwargs)
3414
3415 def GetCharWidth(*args, **kwargs):
f5b96ee1
RD
3416 """
3417 GetCharWidth(self) -> int
3418
3419 Gets the average character width of the currently set font.
3420 """
d55e5bfc
RD
3421 return _gdi_.DC_GetCharWidth(*args, **kwargs)
3422
3423 def GetTextExtent(*args, **kwargs):
a001823c
RD
3424 """
3425 GetTextExtent(wxString string) -> (width, height)
3426
3427 Get the width and height of the text using the current font. Only
3428 works for single line strings.
3429 """
d55e5bfc
RD
3430 return _gdi_.DC_GetTextExtent(*args, **kwargs)
3431
3432 def GetFullTextExtent(*args, **kwargs):
3433 """
3434 GetFullTextExtent(wxString string, Font font=None) ->
3435 (width, height, descent, externalLeading)
3436
15817c7e
RD
3437 Get the width, height, decent and leading of the text using the
3438 current or specified font. Only works for single line strings.
d55e5bfc
RD
3439 """
3440 return _gdi_.DC_GetFullTextExtent(*args, **kwargs)
3441
3442 def GetMultiLineTextExtent(*args, **kwargs):
3443 """
3444 GetMultiLineTextExtent(wxString string, Font font=None) ->
3445 (width, height, descent, externalLeading)
a001823c
RD
3446
3447 Get the width, height, decent and leading of the text using the
3448 current or specified font. Works for single as well as multi-line
3449 strings.
d55e5bfc
RD
3450 """
3451 return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
3452
3453 def GetPartialTextExtents(*args, **kwargs):
f5b96ee1
RD
3454 """
3455 GetPartialTextExtents(self, text) -> [widths]
3456
3457 Returns a list of integers such that each value is the distance in
3458 pixels from the begining of text to the coresponding character of
3459 *text*. The generic version simply builds a running total of the widths
3460 of each character using GetTextExtent, however if the various
3461 platforms have a native API function that is faster or more accurate
43e8916f 3462 than the generic implementation then it will be used instead.
f5b96ee1 3463 """
d55e5bfc
RD
3464 return _gdi_.DC_GetPartialTextExtents(*args, **kwargs)
3465
3466 def GetSize(*args, **kwargs):
3467 """
3468 GetSize(self) -> Size
3469
f5b96ee1
RD
3470 This gets the horizontal and vertical resolution in device units. It
3471 can be used to scale graphics to fit the page. For example, if *maxX*
3472 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3473 used in your application, the following code will scale the graphic to
3474 fit on the printer page::
3475
3476 w, h = dc.GetSize()
3477 scaleX = maxX*1.0 / w
3478 scaleY = maxY*1.0 / h
3479 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3480
d55e5bfc
RD
3481 """
3482 return _gdi_.DC_GetSize(*args, **kwargs)
3483
3484 def GetSizeTuple(*args, **kwargs):
3485 """
3486 GetSizeTuple() -> (width, height)
3487
f5b96ee1
RD
3488 This gets the horizontal and vertical resolution in device units. It
3489 can be used to scale graphics to fit the page. For example, if *maxX*
3490 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3491 used in your application, the following code will scale the graphic to
3492 fit on the printer page::
3493
3494 w, h = dc.GetSize()
3495 scaleX = maxX*1.0 / w
3496 scaleY = maxY*1.0 / h
3497 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3498
d55e5bfc
RD
3499 """
3500 return _gdi_.DC_GetSizeTuple(*args, **kwargs)
3501
3502 def GetSizeMM(*args, **kwargs):
3503 """
3504 GetSizeMM(self) -> Size
3505
3506 Get the DC size in milimeters.
3507 """
3508 return _gdi_.DC_GetSizeMM(*args, **kwargs)
3509
3510 def GetSizeMMTuple(*args, **kwargs):
3511 """
3512 GetSizeMMTuple() -> (width, height)
3513
3514 Get the DC size in milimeters.
3515 """
3516 return _gdi_.DC_GetSizeMMTuple(*args, **kwargs)
3517
3518 def DeviceToLogicalX(*args, **kwargs):
f5b96ee1
RD
3519 """
3520 DeviceToLogicalX(self, int x) -> int
3521
3522 Convert device X coordinate to logical coordinate, using the current
3523 mapping mode.
3524 """
d55e5bfc
RD
3525 return _gdi_.DC_DeviceToLogicalX(*args, **kwargs)
3526
3527 def DeviceToLogicalY(*args, **kwargs):
f5b96ee1
RD
3528 """
3529 DeviceToLogicalY(self, int y) -> int
3530
3531 Converts device Y coordinate to logical coordinate, using the current
3532 mapping mode.
3533 """
d55e5bfc
RD
3534 return _gdi_.DC_DeviceToLogicalY(*args, **kwargs)
3535
3536 def DeviceToLogicalXRel(*args, **kwargs):
f5b96ee1
RD
3537 """
3538 DeviceToLogicalXRel(self, int x) -> int
3539
3540 Convert device X coordinate to relative logical coordinate, using the
3541 current mapping mode but ignoring the x axis orientation. Use this
3542 function for converting a width, for example.
3543 """
d55e5bfc
RD
3544 return _gdi_.DC_DeviceToLogicalXRel(*args, **kwargs)
3545
3546 def DeviceToLogicalYRel(*args, **kwargs):
f5b96ee1
RD
3547 """
3548 DeviceToLogicalYRel(self, int y) -> int
3549
3550 Convert device Y coordinate to relative logical coordinate, using the
3551 current mapping mode but ignoring the y axis orientation. Use this
3552 function for converting a height, for example.
3553 """
d55e5bfc
RD
3554 return _gdi_.DC_DeviceToLogicalYRel(*args, **kwargs)
3555
3556 def LogicalToDeviceX(*args, **kwargs):
f5b96ee1
RD
3557 """
3558 LogicalToDeviceX(self, int x) -> int
3559
3560 Converts logical X coordinate to device coordinate, using the current
3561 mapping mode.
3562 """
d55e5bfc
RD
3563 return _gdi_.DC_LogicalToDeviceX(*args, **kwargs)
3564
3565 def LogicalToDeviceY(*args, **kwargs):
f5b96ee1
RD
3566 """
3567 LogicalToDeviceY(self, int y) -> int
3568
3569 Converts logical Y coordinate to device coordinate, using the current
3570 mapping mode.
3571 """
d55e5bfc
RD
3572 return _gdi_.DC_LogicalToDeviceY(*args, **kwargs)
3573
3574 def LogicalToDeviceXRel(*args, **kwargs):
f5b96ee1
RD
3575 """
3576 LogicalToDeviceXRel(self, int x) -> int
3577
3578 Converts logical X coordinate to relative device coordinate, using the
3579 current mapping mode but ignoring the x axis orientation. Use this for
3580 converting a width, for example.
3581 """
d55e5bfc
RD
3582 return _gdi_.DC_LogicalToDeviceXRel(*args, **kwargs)
3583
3584 def LogicalToDeviceYRel(*args, **kwargs):
f5b96ee1
RD
3585 """
3586 LogicalToDeviceYRel(self, int y) -> int
3587
3588 Converts logical Y coordinate to relative device coordinate, using the
3589 current mapping mode but ignoring the y axis orientation. Use this for
3590 converting a height, for example.
3591 """
d55e5bfc
RD
3592 return _gdi_.DC_LogicalToDeviceYRel(*args, **kwargs)
3593
3594 def CanDrawBitmap(*args, **kwargs):
3595 """CanDrawBitmap(self) -> bool"""
3596 return _gdi_.DC_CanDrawBitmap(*args, **kwargs)
3597
3598 def CanGetTextExtent(*args, **kwargs):
3599 """CanGetTextExtent(self) -> bool"""
3600 return _gdi_.DC_CanGetTextExtent(*args, **kwargs)
3601
3602 def GetDepth(*args, **kwargs):
f5b96ee1
RD
3603 """
3604 GetDepth(self) -> int
3605
3606 Returns the colour depth of the DC.
3607 """
d55e5bfc
RD
3608 return _gdi_.DC_GetDepth(*args, **kwargs)
3609
3610 def GetPPI(*args, **kwargs):
f5b96ee1
RD
3611 """
3612 GetPPI(self) -> Size
3613
3614 Resolution in Pixels per inch
3615 """
d55e5bfc
RD
3616 return _gdi_.DC_GetPPI(*args, **kwargs)
3617
3618 def Ok(*args, **kwargs):
f5b96ee1
RD
3619 """
3620 Ok(self) -> bool
3621
3622 Returns true if the DC is ok to use.
3623 """
d55e5bfc
RD
3624 return _gdi_.DC_Ok(*args, **kwargs)
3625
3626 def GetBackgroundMode(*args, **kwargs):
f5b96ee1
RD
3627 """
3628 GetBackgroundMode(self) -> int
3629
3630 Returns the current background mode, either ``wx.SOLID`` or
3631 ``wx.TRANSPARENT``.
3632 """
d55e5bfc
RD
3633 return _gdi_.DC_GetBackgroundMode(*args, **kwargs)
3634
3635 def GetBackground(*args, **kwargs):
f5b96ee1
RD
3636 """
3637 GetBackground(self) -> Brush
3638
3639 Gets the brush used for painting the background.
3640 """
d55e5bfc
RD
3641 return _gdi_.DC_GetBackground(*args, **kwargs)
3642
3643 def GetBrush(*args, **kwargs):
f5b96ee1
RD
3644 """
3645 GetBrush(self) -> Brush
3646
3647 Gets the current brush
3648 """
d55e5bfc
RD
3649 return _gdi_.DC_GetBrush(*args, **kwargs)
3650
3651 def GetFont(*args, **kwargs):
f5b96ee1
RD
3652 """
3653 GetFont(self) -> Font
3654
3655 Gets the current font
3656 """
d55e5bfc
RD
3657 return _gdi_.DC_GetFont(*args, **kwargs)
3658
3659 def GetPen(*args, **kwargs):
f5b96ee1
RD
3660 """
3661 GetPen(self) -> Pen
3662
3663 Gets the current pen
3664 """
d55e5bfc
RD
3665 return _gdi_.DC_GetPen(*args, **kwargs)
3666
3667 def GetTextBackground(*args, **kwargs):
f5b96ee1
RD
3668 """
3669 GetTextBackground(self) -> Colour
3670
3671 Gets the current text background colour
3672 """
d55e5bfc
RD
3673 return _gdi_.DC_GetTextBackground(*args, **kwargs)
3674
3675 def GetTextForeground(*args, **kwargs):
f5b96ee1
RD
3676 """
3677 GetTextForeground(self) -> Colour
3678
3679 Gets the current text foreground colour
3680 """
d55e5bfc
RD
3681 return _gdi_.DC_GetTextForeground(*args, **kwargs)
3682
3683 def SetTextForeground(*args, **kwargs):
f5b96ee1
RD
3684 """
3685 SetTextForeground(self, Colour colour)
3686
3687 Sets the current text foreground colour for the DC.
3688 """
d55e5bfc
RD
3689 return _gdi_.DC_SetTextForeground(*args, **kwargs)
3690
3691 def SetTextBackground(*args, **kwargs):
f5b96ee1
RD
3692 """
3693 SetTextBackground(self, Colour colour)
3694
3695 Sets the current text background colour for the DC.
3696 """
d55e5bfc
RD
3697 return _gdi_.DC_SetTextBackground(*args, **kwargs)
3698
3699 def GetMapMode(*args, **kwargs):
f5b96ee1
RD
3700 """
3701 GetMapMode(self) -> int
3702
3703 Gets the current *mapping mode* for the device context
3704 """
d55e5bfc
RD
3705 return _gdi_.DC_GetMapMode(*args, **kwargs)
3706
3707 def SetMapMode(*args, **kwargs):
f5b96ee1
RD
3708 """
3709 SetMapMode(self, int mode)
3710
3711 The *mapping mode* of the device context defines the unit of
3712 measurement used to convert logical units to device units. The
3713 mapping mode can be one of the following:
3714
3715 ================ =============================================
3716 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3717 of an inch.
3718 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3719 wx.MM_METRIC Each logical unit is 1 mm.
3720 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3721 wx.MM_TEXT Each logical unit is 1 pixel.
3722 ================ =============================================
3723
3724 """
d55e5bfc
RD
3725 return _gdi_.DC_SetMapMode(*args, **kwargs)
3726
3727 def GetUserScale(*args, **kwargs):
f5b96ee1
RD
3728 """
3729 GetUserScale(self) -> (xScale, yScale)
3730
3731 Gets the current user scale factor (set by `SetUserScale`).
3732 """
d55e5bfc
RD
3733 return _gdi_.DC_GetUserScale(*args, **kwargs)
3734
3735 def SetUserScale(*args, **kwargs):
f5b96ee1
RD
3736 """
3737 SetUserScale(self, double x, double y)
3738
3739 Sets the user scaling factor, useful for applications which require
3740 'zooming'.
3741 """
d55e5bfc
RD
3742 return _gdi_.DC_SetUserScale(*args, **kwargs)
3743
3744 def GetLogicalScale(*args, **kwargs):
3745 """GetLogicalScale() -> (xScale, yScale)"""
3746 return _gdi_.DC_GetLogicalScale(*args, **kwargs)
3747
3748 def SetLogicalScale(*args, **kwargs):
3749 """SetLogicalScale(self, double x, double y)"""
3750 return _gdi_.DC_SetLogicalScale(*args, **kwargs)
3751
3752 def GetLogicalOrigin(*args, **kwargs):
3753 """GetLogicalOrigin(self) -> Point"""
3754 return _gdi_.DC_GetLogicalOrigin(*args, **kwargs)
3755
3756 def GetLogicalOriginTuple(*args, **kwargs):
3757 """GetLogicalOriginTuple() -> (x,y)"""
3758 return _gdi_.DC_GetLogicalOriginTuple(*args, **kwargs)
3759
3760 def SetLogicalOrigin(*args, **kwargs):
3761 """SetLogicalOrigin(self, int x, int y)"""
3762 return _gdi_.DC_SetLogicalOrigin(*args, **kwargs)
3763
d6c14a4c
RD
3764 def SetLogicalOriginPoint(*args, **kwargs):
3765 """SetLogicalOriginPoint(self, Point point)"""
3766 return _gdi_.DC_SetLogicalOriginPoint(*args, **kwargs)
3767
d55e5bfc
RD
3768 def GetDeviceOrigin(*args, **kwargs):
3769 """GetDeviceOrigin(self) -> Point"""
3770 return _gdi_.DC_GetDeviceOrigin(*args, **kwargs)
3771
3772 def GetDeviceOriginTuple(*args, **kwargs):
3773 """GetDeviceOriginTuple() -> (x,y)"""
3774 return _gdi_.DC_GetDeviceOriginTuple(*args, **kwargs)
3775
3776 def SetDeviceOrigin(*args, **kwargs):
3777 """SetDeviceOrigin(self, int x, int y)"""
3778 return _gdi_.DC_SetDeviceOrigin(*args, **kwargs)
3779
d6c14a4c
RD
3780 def SetDeviceOriginPoint(*args, **kwargs):
3781 """SetDeviceOriginPoint(self, Point point)"""
3782 return _gdi_.DC_SetDeviceOriginPoint(*args, **kwargs)
3783
d55e5bfc 3784 def SetAxisOrientation(*args, **kwargs):
f5b96ee1
RD
3785 """
3786 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3787
3788 Sets the x and y axis orientation (i.e., the direction from lowest to
3789 highest values on the axis). The default orientation is the natural
3790 orientation, e.g. x axis from left to right and y axis from bottom up.
3791 """
d55e5bfc
RD
3792 return _gdi_.DC_SetAxisOrientation(*args, **kwargs)
3793
3794 def GetLogicalFunction(*args, **kwargs):
f5b96ee1
RD
3795 """
3796 GetLogicalFunction(self) -> int
3797
3798 Gets the current logical function (set by `SetLogicalFunction`).
3799 """
d55e5bfc
RD
3800 return _gdi_.DC_GetLogicalFunction(*args, **kwargs)
3801
3802 def SetLogicalFunction(*args, **kwargs):
f5b96ee1
RD
3803 """
3804 SetLogicalFunction(self, int function)
3805
3806 Sets the current logical function for the device context. This
3807 determines how a source pixel (from a pen or brush colour, or source
3808 device context if using `Blit`) combines with a destination pixel in
3809 the current device context.
3810
3811 The possible values and their meaning in terms of source and
3812 destination pixel values are as follows:
3813
3814 ================ ==========================
3815 wx.AND src AND dst
3816 wx.AND_INVERT (NOT src) AND dst
3817 wx.AND_REVERSE src AND (NOT dst)
3818 wx.CLEAR 0
3819 wx.COPY src
3820 wx.EQUIV (NOT src) XOR dst
3821 wx.INVERT NOT dst
3822 wx.NAND (NOT src) OR (NOT dst)
3823 wx.NOR (NOT src) AND (NOT dst)
3824 wx.NO_OP dst
3825 wx.OR src OR dst
3826 wx.OR_INVERT (NOT src) OR dst
3827 wx.OR_REVERSE src OR (NOT dst)
3828 wx.SET 1
3829 wx.SRC_INVERT NOT src
3830 wx.XOR src XOR dst
3831 ================ ==========================
3832
3833 The default is wx.COPY, which simply draws with the current
3834 colour. The others combine the current colour and the background using
3835 a logical operation. wx.INVERT is commonly used for drawing rubber
3836 bands or moving outlines, since drawing twice reverts to the original
3837 colour.
3838
3839 """
d55e5bfc
RD
3840 return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
3841
5cbf236d 3842 def ComputeScaleAndOrigin(*args, **kwargs):
f5b96ee1 3843 """
5cbf236d 3844 ComputeScaleAndOrigin(self)
f5b96ee1 3845
5cbf236d
RD
3846 Performs all necessary computations for given platform and context
3847 type after each change of scale and origin parameters. Usually called
3848 automatically internally after such changes.
f5b96ee1 3849
f5b96ee1 3850 """
5cbf236d 3851 return _gdi_.DC_ComputeScaleAndOrigin(*args, **kwargs)
d55e5bfc 3852
5cbf236d
RD
3853 def SetOptimization(self, optimize):
3854 pass
3855 def GetOptimization(self):
3856 return False
f5b96ee1 3857
5cbf236d
RD
3858 SetOptimization = wx._deprecated(SetOptimization)
3859 GetOptimization = wx._deprecated(GetOptimization)
d55e5bfc
RD
3860
3861 def CalcBoundingBox(*args, **kwargs):
f5b96ee1
RD
3862 """
3863 CalcBoundingBox(self, int x, int y)
3864
3865 Adds the specified point to the bounding box which can be retrieved
3866 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3867 """
d55e5bfc
RD
3868 return _gdi_.DC_CalcBoundingBox(*args, **kwargs)
3869
d6c14a4c 3870 def CalcBoundingBoxPoint(*args, **kwargs):
f5b96ee1
RD
3871 """
3872 CalcBoundingBoxPoint(self, Point point)
3873
3874 Adds the specified point to the bounding box which can be retrieved
3875 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
3876 """
d6c14a4c
RD
3877 return _gdi_.DC_CalcBoundingBoxPoint(*args, **kwargs)
3878
d55e5bfc 3879 def ResetBoundingBox(*args, **kwargs):
f5b96ee1
RD
3880 """
3881 ResetBoundingBox(self)
3882
3883 Resets the bounding box: after a call to this function, the bounding
3884 box doesn't contain anything.
3885 """
d55e5bfc
RD
3886 return _gdi_.DC_ResetBoundingBox(*args, **kwargs)
3887
3888 def MinX(*args, **kwargs):
f5b96ee1
RD
3889 """
3890 MinX(self) -> int
3891
3892 Gets the minimum horizontal extent used in drawing commands so far.
3893 """
d55e5bfc
RD
3894 return _gdi_.DC_MinX(*args, **kwargs)
3895
3896 def MaxX(*args, **kwargs):
f5b96ee1
RD
3897 """
3898 MaxX(self) -> int
3899
3900 Gets the maximum horizontal extent used in drawing commands so far.
3901 """
d55e5bfc
RD
3902 return _gdi_.DC_MaxX(*args, **kwargs)
3903
3904 def MinY(*args, **kwargs):
f5b96ee1
RD
3905 """
3906 MinY(self) -> int
3907
3908 Gets the minimum vertical extent used in drawing commands so far.
3909 """
d55e5bfc
RD
3910 return _gdi_.DC_MinY(*args, **kwargs)
3911
3912 def MaxY(*args, **kwargs):
f5b96ee1
RD
3913 """
3914 MaxY(self) -> int
3915
3916 Gets the maximum vertical extent used in drawing commands so far.
3917 """
d55e5bfc
RD
3918 return _gdi_.DC_MaxY(*args, **kwargs)
3919
3920 def GetBoundingBox(*args, **kwargs):
f5b96ee1
RD
3921 """
3922 GetBoundingBox() -> (x1,y1, x2,y2)
3923
3924 Returns the min and max points used in drawing commands so far.
3925 """
d55e5bfc
RD
3926 return _gdi_.DC_GetBoundingBox(*args, **kwargs)
3927
3928 def __nonzero__(self): return self.Ok()
3929 def _DrawPointList(*args, **kwargs):
3930 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3931 return _gdi_.DC__DrawPointList(*args, **kwargs)
3932
3933 def _DrawLineList(*args, **kwargs):
3934 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3935 return _gdi_.DC__DrawLineList(*args, **kwargs)
3936
3937 def _DrawRectangleList(*args, **kwargs):
3938 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3939 return _gdi_.DC__DrawRectangleList(*args, **kwargs)
3940
3941 def _DrawEllipseList(*args, **kwargs):
3942 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3943 return _gdi_.DC__DrawEllipseList(*args, **kwargs)
3944
3945 def _DrawPolygonList(*args, **kwargs):
3946 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
3947 return _gdi_.DC__DrawPolygonList(*args, **kwargs)
3948
3949 def _DrawTextList(*args, **kwargs):
3950 """
3951 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
3952 PyObject backgroundList) -> PyObject
3953 """
3954 return _gdi_.DC__DrawTextList(*args, **kwargs)
3955
3956 def DrawPointList(self, points, pens=None):
f5b96ee1
RD
3957 """
3958 Draw a list of points as quickly as possible.
3959
3960 :param points: A sequence of 2-element sequences representing
3961 each point to draw, (x,y).
3962 :param pens: If None, then the current pen is used. If a
3963 single pen then it will be used for all points. If
3964 a list of pens then there should be one for each point
3965 in points.
3966 """
d55e5bfc
RD
3967 if pens is None:
3968 pens = []
3969 elif isinstance(pens, wx.Pen):
3970 pens = [pens]
3971 elif len(pens) != len(points):
3972 raise ValueError('points and pens must have same length')
3973 return self._DrawPointList(points, pens, [])
3974
3975
3976 def DrawLineList(self, lines, pens=None):
f5b96ee1
RD
3977 """
3978 Draw a list of lines as quickly as possible.
3979
3980 :param lines: A sequence of 4-element sequences representing
3981 each line to draw, (x1,y1, x2,y2).
3982 :param pens: If None, then the current pen is used. If a
3983 single pen then it will be used for all lines. If
3984 a list of pens then there should be one for each line
3985 in lines.
3986 """
d55e5bfc
RD
3987 if pens is None:
3988 pens = []
3989 elif isinstance(pens, wx.Pen):
3990 pens = [pens]
3991 elif len(pens) != len(lines):
3992 raise ValueError('lines and pens must have same length')
3993 return self._DrawLineList(lines, pens, [])
3994
3995
3996 def DrawRectangleList(self, rectangles, pens=None, brushes=None):
f5b96ee1
RD
3997 """
3998 Draw a list of rectangles as quickly as possible.
3999
4000 :param rectangles: A sequence of 4-element sequences representing
4001 each rectangle to draw, (x,y, w,h).
4002 :param pens: If None, then the current pen is used. If a
4003 single pen then it will be used for all rectangles.
4004 If a list of pens then there should be one for each
4005 rectangle in rectangles.
4006 :param brushes: A brush or brushes to be used to fill the rectagles,
4007 with similar semantics as the pens parameter.
4008 """
d55e5bfc
RD
4009 if pens is None:
4010 pens = []
4011 elif isinstance(pens, wx.Pen):
4012 pens = [pens]
4013 elif len(pens) != len(rectangles):
4014 raise ValueError('rectangles and pens must have same length')
4015 if brushes is None:
4016 brushes = []
4017 elif isinstance(brushes, wx.Brush):
4018 brushes = [brushes]
4019 elif len(brushes) != len(rectangles):
4020 raise ValueError('rectangles and brushes must have same length')
4021 return self._DrawRectangleList(rectangles, pens, brushes)
4022
4023
4024 def DrawEllipseList(self, ellipses, pens=None, brushes=None):
f5b96ee1
RD
4025 """
4026 Draw a list of ellipses as quickly as possible.
4027
4028 :param ellipses: A sequence of 4-element sequences representing
4029 each ellipse to draw, (x,y, w,h).
4030 :param pens: If None, then the current pen is used. If a
4031 single pen then it will be used for all ellipses.
4032 If a list of pens then there should be one for each
4033 ellipse in ellipses.
4034 :param brushes: A brush or brushes to be used to fill the ellipses,
4035 with similar semantics as the pens parameter.
4036 """
d55e5bfc
RD
4037 if pens is None:
4038 pens = []
4039 elif isinstance(pens, wx.Pen):
4040 pens = [pens]
4041 elif len(pens) != len(ellipses):
4042 raise ValueError('ellipses and pens must have same length')
4043 if brushes is None:
4044 brushes = []
4045 elif isinstance(brushes, wx.Brush):
4046 brushes = [brushes]
4047 elif len(brushes) != len(ellipses):
4048 raise ValueError('ellipses and brushes must have same length')
4049 return self._DrawEllipseList(ellipses, pens, brushes)
4050
4051
4052 def DrawPolygonList(self, polygons, pens=None, brushes=None):
f5b96ee1
RD
4053 """
4054 Draw a list of polygons, each of which is a list of points.
4055
4056 :param polygons: A sequence of sequences of sequences.
4057 [[(x1,y1),(x2,y2),(x3,y3)...],
4058 [(x1,y1),(x2,y2),(x3,y3)...]]
4059
4060 :param pens: If None, then the current pen is used. If a
4061 single pen then it will be used for all polygons.
4062 If a list of pens then there should be one for each
4063 polygon.
4064 :param brushes: A brush or brushes to be used to fill the polygons,
4065 with similar semantics as the pens parameter.
4066 """
d55e5bfc
RD
4067 if pens is None:
4068 pens = []
4069 elif isinstance(pens, wx.Pen):
4070 pens = [pens]
4071 elif len(pens) != len(polygons):
4072 raise ValueError('polygons and pens must have same length')
4073 if brushes is None:
4074 brushes = []
4075 elif isinstance(brushes, wx.Brush):
4076 brushes = [brushes]
4077 elif len(brushes) != len(polygons):
4078 raise ValueError('polygons and brushes must have same length')
4079 return self._DrawPolygonList(polygons, pens, brushes)
4080
4081
f5b96ee1
RD
4082 def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None):
4083 """
4084 Draw a list of strings using a list of coordinants for positioning each string.
4085
4086 :param textList: A list of strings
4087 :param coords: A list of (x,y) positions
4088 :param foregrounds: A list of `wx.Colour` objects to use for the
4089 foregrounds of the strings.
4090 :param backgrounds: A list of `wx.Colour` objects to use for the
4091 backgrounds of the strings.
4092
4093 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4094 If you want backgrounds to do anything.
4095 """
d55e5bfc
RD
4096 if type(textList) == type(''):
4097 textList = [textList]
4098 elif len(textList) != len(coords):
4099 raise ValueError('textlist and coords must have same length')
4100 if foregrounds is None:
4101 foregrounds = []
4102 elif isinstance(foregrounds, wx.Colour):
4103 foregrounds = [foregrounds]
4104 elif len(foregrounds) != len(coords):
4105 raise ValueError('foregrounds and coords must have same length')
4106 if backgrounds is None:
4107 backgrounds = []
4108 elif isinstance(backgrounds, wx.Colour):
4109 backgrounds = [backgrounds]
4110 elif len(backgrounds) != len(coords):
4111 raise ValueError('backgrounds and coords must have same length')
4112 return self._DrawTextList(textList, coords, foregrounds, backgrounds)
4113
4114
4115class DCPtr(DC):
4116 def __init__(self, this):
4117 self.this = this
4118 if not hasattr(self,"thisown"): self.thisown = 0
4119 self.__class__ = DC
4120_gdi_.DC_swigregister(DCPtr)
4121
4122#---------------------------------------------------------------------------
4123
4124class MemoryDC(DC):
f5b96ee1
RD
4125 """
4126 A memory device context provides a means to draw graphics onto a
4127 bitmap. A bitmap must be selected into the new memory DC before it may
4128 be used for anything. Typical usage is as follows::
4129
4130 dc = wx.MemoryDC()
4131 dc.SelectObject(bitmap)
4132 # draw on the dc usign any of the Draw methods
4133 dc.SelectObject(wx.NullBitmap)
4134 # the bitmap now contains wahtever was drawn upon it
4135
4136 Note that the memory DC *must* be deleted (or the bitmap selected out
4137 of it) before a bitmap can be reselected into another memory DC.
4138
4139 """
d55e5bfc
RD
4140 def __repr__(self):
4141 return "<%s.%s; proxy of C++ wxMemoryDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4142 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4143 """
4144 __init__(self) -> MemoryDC
4145
4146 Constructs a new memory device context.
4147
4148 Use the Ok member to test whether the constructor was successful in
4149 creating a usable device context. Don't forget to select a bitmap into
4150 the DC before drawing on it.
4151 """
d55e5bfc
RD
4152 newobj = _gdi_.new_MemoryDC(*args, **kwargs)
4153 self.this = newobj.this
4154 self.thisown = 1
4155 del newobj.thisown
4156 def SelectObject(*args, **kwargs):
f5b96ee1
RD
4157 """
4158 SelectObject(self, Bitmap bitmap)
4159
4160 Selects the bitmap into the device context, to use as the memory
4161 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4162 the DC, and therefore the bitmap, and also to use Blit to copy the
4163 bitmap to a window.
4164
4165 If the argument is wx.NullBitmap (or some other uninitialised
4166 `wx.Bitmap`) the current bitmap is selected out of the device context,
4167 and the original bitmap restored, allowing the current bitmap to be
4168 destroyed safely.
4169 """
d55e5bfc
RD
4170 return _gdi_.MemoryDC_SelectObject(*args, **kwargs)
4171
4172
4173class MemoryDCPtr(MemoryDC):
4174 def __init__(self, this):
4175 self.this = this
4176 if not hasattr(self,"thisown"): self.thisown = 0
4177 self.__class__ = MemoryDC
4178_gdi_.MemoryDC_swigregister(MemoryDCPtr)
4179
4180def MemoryDCFromDC(*args, **kwargs):
f5b96ee1
RD
4181 """
4182 MemoryDCFromDC(DC oldDC) -> MemoryDC
4183
4184 Creates a DC that is compatible with the oldDC.
4185 """
d55e5bfc
RD
4186 val = _gdi_.new_MemoryDCFromDC(*args, **kwargs)
4187 val.thisown = 1
4188 return val
4189
4190#---------------------------------------------------------------------------
4191
e2950dbb
RD
4192BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
4193BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
d55e5bfc 4194class BufferedDC(MemoryDC):
f5b96ee1
RD
4195 """
4196 This simple class provides a simple way to avoid flicker: when drawing
4197 on it, everything is in fact first drawn on an in-memory buffer (a
4198 `wx.Bitmap`) and then copied to the screen only once, when this object
4199 is destroyed.
4200
4201 It can be used in the same way as any other device
4202 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
4203 want to use it in your EVT_PAINT handler, you should look at
4204 `wx.BufferedPaintDC`.
4205
4206 """
d55e5bfc
RD
4207 def __repr__(self):
4208 return "<%s.%s; proxy of C++ wxBufferedDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4209 def __init__(self, *args):
4210 """
f491ed97 4211 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
e2950dbb 4212 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
f5b96ee1
RD
4213
4214 Constructs a buffered DC.
d55e5bfc
RD
4215 """
4216 newobj = _gdi_.new_BufferedDC(*args)
4217 self.this = newobj.this
4218 self.thisown = 1
4219 del newobj.thisown
f5b96ee1 4220 self.__dc = args[0] # save a ref so the other dc will not be deleted before self
d55e5bfc
RD
4221
4222 def __del__(self, destroy=_gdi_.delete_BufferedDC):
f5b96ee1
RD
4223 """
4224 __del__(self)
4225
4226 Copies everything drawn on the DC so far to the underlying DC
4227 associated with this object, if any.
4228 """
d55e5bfc
RD
4229 try:
4230 if self.thisown: destroy(self)
4231 except: pass
4232
4233 def UnMask(*args, **kwargs):
f5b96ee1
RD
4234 """
4235 UnMask(self)
4236
4237 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4238 can be effectively used once only). This is usually only called in
4239 the destructor.
4240 """
d55e5bfc
RD
4241 return _gdi_.BufferedDC_UnMask(*args, **kwargs)
4242
4243
4244class BufferedDCPtr(BufferedDC):
4245 def __init__(self, this):
4246 self.this = this
4247 if not hasattr(self,"thisown"): self.thisown = 0
4248 self.__class__ = BufferedDC
4249_gdi_.BufferedDC_swigregister(BufferedDCPtr)
4250
d55e5bfc 4251class BufferedPaintDC(BufferedDC):
f5b96ee1
RD
4252 """
4253 This is a subclass of `wx.BufferedDC` which can be used inside of an
4254 EVT_PAINT event handler. Just create an object of this class instead
4255 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4256 flicker. The only thing to watch out for is that if you are using this
4257 class together with `wx.ScrolledWindow`, you probably do **not** want
4258 to call `wx.Window.PrepareDC` on it as it already does this internally
4259 for the real underlying `wx.PaintDC`.
4260
4261 If your window is already fully buffered in a `wx.Bitmap` then your
4262 EVT_PAINT handler can be as simple as just creating a
4263 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4264 automatically when it is destroyed. For example::
4265
4266 def OnPaint(self, event):
4267 dc = wx.BufferedPaintDC(self, self.buffer)
4268
4269
4270
e2950dbb
RD
4271
4272
f5b96ee1 4273 """
d55e5bfc
RD
4274 def __repr__(self):
4275 return "<%s.%s; proxy of C++ wxBufferedPaintDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4276 def __init__(self, *args, **kwargs):
f5b96ee1 4277 """
e2950dbb 4278 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
f5b96ee1
RD
4279
4280 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4281 provide the bitmap to be used for buffering or let this object create
4282 one internally (in the latter case, the size of the client part of the
4283 window is automatically used).
4284
4285
4286 """
d55e5bfc
RD
4287 newobj = _gdi_.new_BufferedPaintDC(*args, **kwargs)
4288 self.this = newobj.this
4289 self.thisown = 1
4290 del newobj.thisown
4291
4292class BufferedPaintDCPtr(BufferedPaintDC):
4293 def __init__(self, this):
4294 self.this = this
4295 if not hasattr(self,"thisown"): self.thisown = 0
4296 self.__class__ = BufferedPaintDC
4297_gdi_.BufferedPaintDC_swigregister(BufferedPaintDCPtr)
4298
4299#---------------------------------------------------------------------------
4300
4301class ScreenDC(DC):
f5b96ee1
RD
4302 """
4303 A wxScreenDC can be used to paint anywhere on the screen. This should
4304 normally be constructed as a temporary stack object; don't store a
4305 wxScreenDC object.
4306
4307 """
d55e5bfc
RD
4308 def __repr__(self):
4309 return "<%s.%s; proxy of C++ wxScreenDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4310 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4311 """
4312 __init__(self) -> ScreenDC
4313
4314 A wxScreenDC can be used to paint anywhere on the screen. This should
4315 normally be constructed as a temporary stack object; don't store a
4316 wxScreenDC object.
4317
4318 """
d55e5bfc
RD
4319 newobj = _gdi_.new_ScreenDC(*args, **kwargs)
4320 self.this = newobj.this
4321 self.thisown = 1
4322 del newobj.thisown
4323 def StartDrawingOnTopWin(*args, **kwargs):
f5b96ee1
RD
4324 """
4325 StartDrawingOnTopWin(self, Window window) -> bool
4326
4327 Specify that the area of the screen to be drawn upon coincides with
4328 the given window.
4329
4330 :see: `EndDrawingOnTop`
4331 """
d55e5bfc
RD
4332 return _gdi_.ScreenDC_StartDrawingOnTopWin(*args, **kwargs)
4333
4334 def StartDrawingOnTop(*args, **kwargs):
f5b96ee1
RD
4335 """
4336 StartDrawingOnTop(self, Rect rect=None) -> bool
4337
4338 Specify that the area is the given rectangle, or the whole screen if
4339 ``None`` is passed.
4340
4341 :see: `EndDrawingOnTop`
4342 """
d55e5bfc
RD
4343 return _gdi_.ScreenDC_StartDrawingOnTop(*args, **kwargs)
4344
4345 def EndDrawingOnTop(*args, **kwargs):
f5b96ee1
RD
4346 """
4347 EndDrawingOnTop(self) -> bool
4348
4349 Use this in conjunction with `StartDrawingOnTop` or
4350 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4351 top of existing windows. Without this, some window systems (such as X)
4352 only allow drawing to take place underneath other windows.
4353
4354 You might use this pair of functions when implementing a drag feature,
4355 for example as in the `wx.SplitterWindow` implementation.
4356
4357 These functions are probably obsolete since the X implementations
4358 allow drawing directly on the screen now. However, the fact that this
4359 function allows the screen to be refreshed afterwards may be useful
4360 to some applications.
4361 """
d55e5bfc
RD
4362 return _gdi_.ScreenDC_EndDrawingOnTop(*args, **kwargs)
4363
4364
4365class ScreenDCPtr(ScreenDC):
4366 def __init__(self, this):
4367 self.this = this
4368 if not hasattr(self,"thisown"): self.thisown = 0
4369 self.__class__ = ScreenDC
4370_gdi_.ScreenDC_swigregister(ScreenDCPtr)
4371
4372#---------------------------------------------------------------------------
4373
4374class ClientDC(DC):
f5b96ee1
RD
4375 """
4376 A wx.ClientDC must be constructed if an application wishes to paint on
4377 the client area of a window from outside an EVT_PAINT event. This should
4378 normally be constructed as a temporary stack object; don't store a
4379 wx.ClientDC object long term.
4380
4381 To draw on a window from within an EVT_PAINT handler, construct a
4382 `wx.PaintDC` object.
4383
4384 To draw on the whole window including decorations, construct a
4385 `wx.WindowDC` object (Windows only).
4386
4387 """
d55e5bfc
RD
4388 def __repr__(self):
4389 return "<%s.%s; proxy of C++ wxClientDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4390 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4391 """
4392 __init__(self, Window win) -> ClientDC
4393
4394 Constructor. Pass the window on which you wish to paint.
4395 """
d55e5bfc
RD
4396 newobj = _gdi_.new_ClientDC(*args, **kwargs)
4397 self.this = newobj.this
4398 self.thisown = 1
4399 del newobj.thisown
4400
4401class ClientDCPtr(ClientDC):
4402 def __init__(self, this):
4403 self.this = this
4404 if not hasattr(self,"thisown"): self.thisown = 0
4405 self.__class__ = ClientDC
4406_gdi_.ClientDC_swigregister(ClientDCPtr)
4407
4408#---------------------------------------------------------------------------
4409
4410class PaintDC(DC):
f5b96ee1
RD
4411 """
4412 A wx.PaintDC must be constructed if an application wishes to paint on
4413 the client area of a window from within an EVT_PAINT event
4414 handler. This should normally be constructed as a temporary stack
4415 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4416 handler, you **must** create a wx.PaintDC object within it even if you
4417 don't actually use it.
4418
4419 Using wx.PaintDC within EVT_PAINT handlers is important because it
4420 automatically sets the clipping area to the damaged area of the
4421 window. Attempts to draw outside this area do not appear.
4422
4423 To draw on a window from outside EVT_PAINT handlers, construct a
4424 `wx.ClientDC` object.
4425
4426 """
d55e5bfc
RD
4427 def __repr__(self):
4428 return "<%s.%s; proxy of C++ wxPaintDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4429 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4430 """
4431 __init__(self, Window win) -> PaintDC
4432
4433 Constructor. Pass the window on which you wish to paint.
4434 """
d55e5bfc
RD
4435 newobj = _gdi_.new_PaintDC(*args, **kwargs)
4436 self.this = newobj.this
4437 self.thisown = 1
4438 del newobj.thisown
4439
4440class PaintDCPtr(PaintDC):
4441 def __init__(self, this):
4442 self.this = this
4443 if not hasattr(self,"thisown"): self.thisown = 0
4444 self.__class__ = PaintDC
4445_gdi_.PaintDC_swigregister(PaintDCPtr)
4446
4447#---------------------------------------------------------------------------
4448
4449class WindowDC(DC):
f5b96ee1
RD
4450 """
4451 A wx.WindowDC must be constructed if an application wishes to paint on
4452 the whole area of a window (client and decorations). This should
4453 normally be constructed as a temporary stack object; don't store a
4454 wx.WindowDC object.
4455 """
d55e5bfc
RD
4456 def __repr__(self):
4457 return "<%s.%s; proxy of C++ wxWindowDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4458 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4459 """
4460 __init__(self, Window win) -> WindowDC
4461
4462 Constructor. Pass the window on which you wish to paint.
4463 """
d55e5bfc
RD
4464 newobj = _gdi_.new_WindowDC(*args, **kwargs)
4465 self.this = newobj.this
4466 self.thisown = 1
4467 del newobj.thisown
4468
4469class WindowDCPtr(WindowDC):
4470 def __init__(self, this):
4471 self.this = this
4472 if not hasattr(self,"thisown"): self.thisown = 0
4473 self.__class__ = WindowDC
4474_gdi_.WindowDC_swigregister(WindowDCPtr)
4475
4476#---------------------------------------------------------------------------
4477
4478class MirrorDC(DC):
f5b96ee1
RD
4479 """
4480 wx.MirrorDC is a simple wrapper class which is always associated with a
4481 real `wx.DC` object and either forwards all of its operations to it
4482 without changes (no mirroring takes place) or exchanges x and y
4483 coordinates which makes it possible to reuse the same code to draw a
4484 figure and its mirror -- i.e. reflection related to the diagonal line
4485 x == y.
4486 """
d55e5bfc
RD
4487 def __repr__(self):
4488 return "<%s.%s; proxy of C++ wxMirrorDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4489 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4490 """
4491 __init__(self, DC dc, bool mirror) -> MirrorDC
4492
4493 Creates a mirrored DC associated with the real *dc*. Everything drawn
4494 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4495 *mirror* is True.
4496 """
d55e5bfc
RD
4497 newobj = _gdi_.new_MirrorDC(*args, **kwargs)
4498 self.this = newobj.this
4499 self.thisown = 1
4500 del newobj.thisown
4501
4502class MirrorDCPtr(MirrorDC):
4503 def __init__(self, this):
4504 self.this = this
4505 if not hasattr(self,"thisown"): self.thisown = 0
4506 self.__class__ = MirrorDC
4507_gdi_.MirrorDC_swigregister(MirrorDCPtr)
4508
4509#---------------------------------------------------------------------------
4510
4511class PostScriptDC(DC):
f5b96ee1 4512 """This is a `wx.DC` that can write to PostScript files on any platform."""
d55e5bfc
RD
4513 def __repr__(self):
4514 return "<%s.%s; proxy of C++ wxPostScriptDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4515 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4516 """
4517 __init__(self, wxPrintData printData) -> PostScriptDC
4518
4519 Constructs a PostScript printer device context from a `wx.PrintData`
4520 object.
4521 """
d55e5bfc
RD
4522 newobj = _gdi_.new_PostScriptDC(*args, **kwargs)
4523 self.this = newobj.this
4524 self.thisown = 1
4525 del newobj.thisown
4526 def GetPrintData(*args, **kwargs):
4527 """GetPrintData(self) -> wxPrintData"""
4528 return _gdi_.PostScriptDC_GetPrintData(*args, **kwargs)
4529
4530 def SetPrintData(*args, **kwargs):
4531 """SetPrintData(self, wxPrintData data)"""
4532 return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs)
4533
4534 def SetResolution(*args, **kwargs):
f5b96ee1
RD
4535 """
4536 SetResolution(int ppi)
4537
4538 Set resolution (in pixels per inch) that will be used in PostScript
4539 output. Default is 720ppi.
4540 """
d55e5bfc
RD
4541 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
4542
4543 SetResolution = staticmethod(SetResolution)
4544 def GetResolution(*args, **kwargs):
f5b96ee1
RD
4545 """
4546 GetResolution() -> int
4547
4548 Return resolution used in PostScript output.
4549 """
d55e5bfc
RD
4550 return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
4551
4552 GetResolution = staticmethod(GetResolution)
4553
4554class PostScriptDCPtr(PostScriptDC):
4555 def __init__(self, this):
4556 self.this = this
4557 if not hasattr(self,"thisown"): self.thisown = 0
4558 self.__class__ = PostScriptDC
4559_gdi_.PostScriptDC_swigregister(PostScriptDCPtr)
4560
4561def PostScriptDC_SetResolution(*args, **kwargs):
f5b96ee1
RD
4562 """
4563 PostScriptDC_SetResolution(int ppi)
4564
4565 Set resolution (in pixels per inch) that will be used in PostScript
4566 output. Default is 720ppi.
4567 """
d55e5bfc
RD
4568 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
4569
4570def PostScriptDC_GetResolution(*args, **kwargs):
f5b96ee1
RD
4571 """
4572 PostScriptDC_GetResolution() -> int
4573
4574 Return resolution used in PostScript output.
4575 """
d55e5bfc
RD
4576 return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
4577
4578#---------------------------------------------------------------------------
4579
4580class MetaFile(_core.Object):
36ed4f51 4581 """Proxy of C++ MetaFile class"""
d55e5bfc
RD
4582 def __repr__(self):
4583 return "<%s.%s; proxy of C++ wxMetaFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4584 def __init__(self, *args, **kwargs):
4585 """__init__(self, String filename=EmptyString) -> MetaFile"""
4586 newobj = _gdi_.new_MetaFile(*args, **kwargs)
4587 self.this = newobj.this
4588 self.thisown = 1
4589 del newobj.thisown
4590 def __del__(self, destroy=_gdi_.delete_MetaFile):
4591 """__del__(self)"""
4592 try:
4593 if self.thisown: destroy(self)
4594 except: pass
4595
4596 def Ok(*args, **kwargs):
4597 """Ok(self) -> bool"""
4598 return _gdi_.MetaFile_Ok(*args, **kwargs)
4599
4600 def SetClipboard(*args, **kwargs):
4601 """SetClipboard(self, int width=0, int height=0) -> bool"""
4602 return _gdi_.MetaFile_SetClipboard(*args, **kwargs)
4603
4604 def GetSize(*args, **kwargs):
4605 """GetSize(self) -> Size"""
4606 return _gdi_.MetaFile_GetSize(*args, **kwargs)
4607
4608 def GetWidth(*args, **kwargs):
4609 """GetWidth(self) -> int"""
4610 return _gdi_.MetaFile_GetWidth(*args, **kwargs)
4611
4612 def GetHeight(*args, **kwargs):
4613 """GetHeight(self) -> int"""
4614 return _gdi_.MetaFile_GetHeight(*args, **kwargs)
4615
4616 def __nonzero__(self): return self.Ok()
4617
4618class MetaFilePtr(MetaFile):
4619 def __init__(self, this):
4620 self.this = this
4621 if not hasattr(self,"thisown"): self.thisown = 0
4622 self.__class__ = MetaFile
4623_gdi_.MetaFile_swigregister(MetaFilePtr)
4624
4625class MetaFileDC(DC):
36ed4f51 4626 """Proxy of C++ MetaFileDC class"""
d55e5bfc
RD
4627 def __repr__(self):
4628 return "<%s.%s; proxy of C++ wxMetaFileDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4629 def __init__(self, *args, **kwargs):
4630 """
4631 __init__(self, String filename=EmptyString, int width=0, int height=0,
4632 String description=EmptyString) -> MetaFileDC
4633 """
4634 newobj = _gdi_.new_MetaFileDC(*args, **kwargs)
4635 self.this = newobj.this
4636 self.thisown = 1
4637 del newobj.thisown
4638 def Close(*args, **kwargs):
4639 """Close(self) -> MetaFile"""
4640 return _gdi_.MetaFileDC_Close(*args, **kwargs)
4641
4642
4643class MetaFileDCPtr(MetaFileDC):
4644 def __init__(self, this):
4645 self.this = this
4646 if not hasattr(self,"thisown"): self.thisown = 0
4647 self.__class__ = MetaFileDC
4648_gdi_.MetaFileDC_swigregister(MetaFileDCPtr)
4649
4650class PrinterDC(DC):
36ed4f51 4651 """Proxy of C++ PrinterDC class"""
d55e5bfc
RD
4652 def __repr__(self):
4653 return "<%s.%s; proxy of C++ wxPrinterDC instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4654 def __init__(self, *args, **kwargs):
4655 """__init__(self, wxPrintData printData) -> PrinterDC"""
4656 newobj = _gdi_.new_PrinterDC(*args, **kwargs)
4657 self.this = newobj.this
4658 self.thisown = 1
4659 del newobj.thisown
4660
4661class PrinterDCPtr(PrinterDC):
4662 def __init__(self, this):
4663 self.this = this
4664 if not hasattr(self,"thisown"): self.thisown = 0
4665 self.__class__ = PrinterDC
4666_gdi_.PrinterDC_swigregister(PrinterDCPtr)
4667
d55e5bfc
RD
4668#---------------------------------------------------------------------------
4669
4670IMAGELIST_DRAW_NORMAL = _gdi_.IMAGELIST_DRAW_NORMAL
4671IMAGELIST_DRAW_TRANSPARENT = _gdi_.IMAGELIST_DRAW_TRANSPARENT
4672IMAGELIST_DRAW_SELECTED = _gdi_.IMAGELIST_DRAW_SELECTED
4673IMAGELIST_DRAW_FOCUSED = _gdi_.IMAGELIST_DRAW_FOCUSED
4674IMAGE_LIST_NORMAL = _gdi_.IMAGE_LIST_NORMAL
4675IMAGE_LIST_SMALL = _gdi_.IMAGE_LIST_SMALL
4676IMAGE_LIST_STATE = _gdi_.IMAGE_LIST_STATE
4677class ImageList(_core.Object):
36ed4f51 4678 """Proxy of C++ ImageList class"""
d55e5bfc
RD
4679 def __repr__(self):
4680 return "<%s.%s; proxy of C++ wxImageList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4681 def __init__(self, *args, **kwargs):
4682 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
4683 newobj = _gdi_.new_ImageList(*args, **kwargs)
4684 self.this = newobj.this
4685 self.thisown = 1
4686 del newobj.thisown
4687 def __del__(self, destroy=_gdi_.delete_ImageList):
4688 """__del__(self)"""
4689 try:
4690 if self.thisown: destroy(self)
4691 except: pass
4692
4693 def Add(*args, **kwargs):
4694 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
4695 return _gdi_.ImageList_Add(*args, **kwargs)
4696
4697 def AddWithColourMask(*args, **kwargs):
4698 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
4699 return _gdi_.ImageList_AddWithColourMask(*args, **kwargs)
4700
4701 def AddIcon(*args, **kwargs):
4702 """AddIcon(self, Icon icon) -> int"""
4703 return _gdi_.ImageList_AddIcon(*args, **kwargs)
4704
7fbf8399
RD
4705 def GetBitmap(*args, **kwargs):
4706 """GetBitmap(self, int index) -> Bitmap"""
4707 return _gdi_.ImageList_GetBitmap(*args, **kwargs)
4708
4709 def GetIcon(*args, **kwargs):
4710 """GetIcon(self, int index) -> Icon"""
4711 return _gdi_.ImageList_GetIcon(*args, **kwargs)
4712
d55e5bfc
RD
4713 def Replace(*args, **kwargs):
4714 """Replace(self, int index, Bitmap bitmap) -> bool"""
4715 return _gdi_.ImageList_Replace(*args, **kwargs)
4716
4717 def Draw(*args, **kwargs):
4718 """
4719 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
4720 bool solidBackground=False) -> bool
4721 """
4722 return _gdi_.ImageList_Draw(*args, **kwargs)
4723
4724 def GetImageCount(*args, **kwargs):
4725 """GetImageCount(self) -> int"""
4726 return _gdi_.ImageList_GetImageCount(*args, **kwargs)
4727
4728 def Remove(*args, **kwargs):
4729 """Remove(self, int index) -> bool"""
4730 return _gdi_.ImageList_Remove(*args, **kwargs)
4731
4732 def RemoveAll(*args, **kwargs):
4733 """RemoveAll(self) -> bool"""
4734 return _gdi_.ImageList_RemoveAll(*args, **kwargs)
4735
4736 def GetSize(*args, **kwargs):
4737 """GetSize() -> (width,height)"""
4738 return _gdi_.ImageList_GetSize(*args, **kwargs)
4739
4740
4741class ImageListPtr(ImageList):
4742 def __init__(self, this):
4743 self.this = this
4744 if not hasattr(self,"thisown"): self.thisown = 0
4745 self.__class__ = ImageList
4746_gdi_.ImageList_swigregister(ImageListPtr)
4747
4748#---------------------------------------------------------------------------
4749
4750class PenList(_core.Object):
36ed4f51 4751 """Proxy of C++ PenList class"""
d55e5bfc
RD
4752 def __init__(self): raise RuntimeError, "No constructor defined"
4753 def __repr__(self):
4754 return "<%s.%s; proxy of C++ wxPenList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4755 def AddPen(*args, **kwargs):
4756 """AddPen(self, Pen pen)"""
4757 return _gdi_.PenList_AddPen(*args, **kwargs)
4758
4759 def FindOrCreatePen(*args, **kwargs):
4760 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
4761 return _gdi_.PenList_FindOrCreatePen(*args, **kwargs)
4762
4763 def RemovePen(*args, **kwargs):
4764 """RemovePen(self, Pen pen)"""
4765 return _gdi_.PenList_RemovePen(*args, **kwargs)
4766
4767 def GetCount(*args, **kwargs):
4768 """GetCount(self) -> int"""
4769 return _gdi_.PenList_GetCount(*args, **kwargs)
4770
4771
4772class PenListPtr(PenList):
4773 def __init__(self, this):
4774 self.this = this
4775 if not hasattr(self,"thisown"): self.thisown = 0
4776 self.__class__ = PenList
4777_gdi_.PenList_swigregister(PenListPtr)
4778cvar = _gdi_.cvar
4779NORMAL_FONT = cvar.NORMAL_FONT
4780SMALL_FONT = cvar.SMALL_FONT
4781ITALIC_FONT = cvar.ITALIC_FONT
4782SWISS_FONT = cvar.SWISS_FONT
4783RED_PEN = cvar.RED_PEN
4784CYAN_PEN = cvar.CYAN_PEN
4785GREEN_PEN = cvar.GREEN_PEN
4786BLACK_PEN = cvar.BLACK_PEN
4787WHITE_PEN = cvar.WHITE_PEN
4788TRANSPARENT_PEN = cvar.TRANSPARENT_PEN
4789BLACK_DASHED_PEN = cvar.BLACK_DASHED_PEN
4790GREY_PEN = cvar.GREY_PEN
4791MEDIUM_GREY_PEN = cvar.MEDIUM_GREY_PEN
4792LIGHT_GREY_PEN = cvar.LIGHT_GREY_PEN
4793BLUE_BRUSH = cvar.BLUE_BRUSH
4794GREEN_BRUSH = cvar.GREEN_BRUSH
4795WHITE_BRUSH = cvar.WHITE_BRUSH
4796BLACK_BRUSH = cvar.BLACK_BRUSH
4797TRANSPARENT_BRUSH = cvar.TRANSPARENT_BRUSH
4798CYAN_BRUSH = cvar.CYAN_BRUSH
4799RED_BRUSH = cvar.RED_BRUSH
4800GREY_BRUSH = cvar.GREY_BRUSH
4801MEDIUM_GREY_BRUSH = cvar.MEDIUM_GREY_BRUSH
4802LIGHT_GREY_BRUSH = cvar.LIGHT_GREY_BRUSH
4803BLACK = cvar.BLACK
4804WHITE = cvar.WHITE
4805RED = cvar.RED
4806BLUE = cvar.BLUE
4807GREEN = cvar.GREEN
4808CYAN = cvar.CYAN
4809LIGHT_GREY = cvar.LIGHT_GREY
4810STANDARD_CURSOR = cvar.STANDARD_CURSOR
4811HOURGLASS_CURSOR = cvar.HOURGLASS_CURSOR
4812CROSS_CURSOR = cvar.CROSS_CURSOR
4813NullBitmap = cvar.NullBitmap
4814NullIcon = cvar.NullIcon
4815NullCursor = cvar.NullCursor
4816NullPen = cvar.NullPen
4817NullBrush = cvar.NullBrush
4818NullPalette = cvar.NullPalette
4819NullFont = cvar.NullFont
4820NullColour = cvar.NullColour
4821
4822class BrushList(_core.Object):
36ed4f51 4823 """Proxy of C++ BrushList class"""
d55e5bfc
RD
4824 def __init__(self): raise RuntimeError, "No constructor defined"
4825 def __repr__(self):
4826 return "<%s.%s; proxy of C++ wxBrushList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4827 def AddBrush(*args, **kwargs):
4828 """AddBrush(self, Brush brush)"""
4829 return _gdi_.BrushList_AddBrush(*args, **kwargs)
4830
4831 def FindOrCreateBrush(*args, **kwargs):
bb2ef2cc 4832 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
d55e5bfc
RD
4833 return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs)
4834
4835 def RemoveBrush(*args, **kwargs):
4836 """RemoveBrush(self, Brush brush)"""
4837 return _gdi_.BrushList_RemoveBrush(*args, **kwargs)
4838
4839 def GetCount(*args, **kwargs):
4840 """GetCount(self) -> int"""
4841 return _gdi_.BrushList_GetCount(*args, **kwargs)
4842
4843
4844class BrushListPtr(BrushList):
4845 def __init__(self, this):
4846 self.this = this
4847 if not hasattr(self,"thisown"): self.thisown = 0
4848 self.__class__ = BrushList
4849_gdi_.BrushList_swigregister(BrushListPtr)
4850
4851class ColourDatabase(_core.Object):
36ed4f51 4852 """Proxy of C++ ColourDatabase class"""
d55e5bfc
RD
4853 def __repr__(self):
4854 return "<%s.%s; proxy of C++ wxColourDatabase instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4855 def __init__(self, *args, **kwargs):
4856 """__init__(self) -> ColourDatabase"""
4857 newobj = _gdi_.new_ColourDatabase(*args, **kwargs)
4858 self.this = newobj.this
4859 self.thisown = 1
4860 del newobj.thisown
4861 def __del__(self, destroy=_gdi_.delete_ColourDatabase):
4862 """__del__(self)"""
4863 try:
4864 if self.thisown: destroy(self)
4865 except: pass
4866
4867 def Find(*args, **kwargs):
4868 """Find(self, String name) -> Colour"""
4869 return _gdi_.ColourDatabase_Find(*args, **kwargs)
4870
4871 def FindName(*args, **kwargs):
4872 """FindName(self, Colour colour) -> String"""
4873 return _gdi_.ColourDatabase_FindName(*args, **kwargs)
4874
4875 FindColour = Find
4876 def AddColour(*args, **kwargs):
4877 """AddColour(self, String name, Colour colour)"""
4878 return _gdi_.ColourDatabase_AddColour(*args, **kwargs)
4879
4880 def Append(*args, **kwargs):
4881 """Append(self, String name, int red, int green, int blue)"""
4882 return _gdi_.ColourDatabase_Append(*args, **kwargs)
4883
4884
4885class ColourDatabasePtr(ColourDatabase):
4886 def __init__(self, this):
4887 self.this = this
4888 if not hasattr(self,"thisown"): self.thisown = 0
4889 self.__class__ = ColourDatabase
4890_gdi_.ColourDatabase_swigregister(ColourDatabasePtr)
4891
4892class FontList(_core.Object):
36ed4f51 4893 """Proxy of C++ FontList class"""
d55e5bfc
RD
4894 def __init__(self): raise RuntimeError, "No constructor defined"
4895 def __repr__(self):
4896 return "<%s.%s; proxy of C++ wxFontList instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4897 def AddFont(*args, **kwargs):
4898 """AddFont(self, Font font)"""
4899 return _gdi_.FontList_AddFont(*args, **kwargs)
4900
4901 def FindOrCreateFont(*args, **kwargs):
4902 """
4903 FindOrCreateFont(self, int point_size, int family, int style, int weight,
4904 bool underline=False, String facename=EmptyString,
4905 int encoding=FONTENCODING_DEFAULT) -> Font
4906 """
4907 return _gdi_.FontList_FindOrCreateFont(*args, **kwargs)
4908
4909 def RemoveFont(*args, **kwargs):
4910 """RemoveFont(self, Font font)"""
4911 return _gdi_.FontList_RemoveFont(*args, **kwargs)
4912
4913 def GetCount(*args, **kwargs):
4914 """GetCount(self) -> int"""
4915 return _gdi_.FontList_GetCount(*args, **kwargs)
4916
4917
4918class FontListPtr(FontList):
4919 def __init__(self, this):
4920 self.this = this
4921 if not hasattr(self,"thisown"): self.thisown = 0
4922 self.__class__ = FontList
4923_gdi_.FontList_swigregister(FontListPtr)
4924
4925#---------------------------------------------------------------------------
4926
4927NullColor = NullColour
4928#---------------------------------------------------------------------------
4929
4930class Effects(_core.Object):
36ed4f51 4931 """Proxy of C++ Effects class"""
d55e5bfc
RD
4932 def __repr__(self):
4933 return "<%s.%s; proxy of C++ wxEffects instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4934 def __init__(self, *args, **kwargs):
4935 """__init__(self) -> Effects"""
4936 newobj = _gdi_.new_Effects(*args, **kwargs)
4937 self.this = newobj.this
4938 self.thisown = 1
4939 del newobj.thisown
4940 def GetHighlightColour(*args, **kwargs):
4941 """GetHighlightColour(self) -> Colour"""
4942 return _gdi_.Effects_GetHighlightColour(*args, **kwargs)
4943
4944 def GetLightShadow(*args, **kwargs):
4945 """GetLightShadow(self) -> Colour"""
4946 return _gdi_.Effects_GetLightShadow(*args, **kwargs)
4947
4948 def GetFaceColour(*args, **kwargs):
4949 """GetFaceColour(self) -> Colour"""
4950 return _gdi_.Effects_GetFaceColour(*args, **kwargs)
4951
4952 def GetMediumShadow(*args, **kwargs):
4953 """GetMediumShadow(self) -> Colour"""
4954 return _gdi_.Effects_GetMediumShadow(*args, **kwargs)
4955
4956 def GetDarkShadow(*args, **kwargs):
4957 """GetDarkShadow(self) -> Colour"""
4958 return _gdi_.Effects_GetDarkShadow(*args, **kwargs)
4959
4960 def SetHighlightColour(*args, **kwargs):
4961 """SetHighlightColour(self, Colour c)"""
4962 return _gdi_.Effects_SetHighlightColour(*args, **kwargs)
4963
4964 def SetLightShadow(*args, **kwargs):
4965 """SetLightShadow(self, Colour c)"""
4966 return _gdi_.Effects_SetLightShadow(*args, **kwargs)
4967
4968 def SetFaceColour(*args, **kwargs):
4969 """SetFaceColour(self, Colour c)"""
4970 return _gdi_.Effects_SetFaceColour(*args, **kwargs)
4971
4972 def SetMediumShadow(*args, **kwargs):
4973 """SetMediumShadow(self, Colour c)"""
4974 return _gdi_.Effects_SetMediumShadow(*args, **kwargs)
4975
4976 def SetDarkShadow(*args, **kwargs):
4977 """SetDarkShadow(self, Colour c)"""
4978 return _gdi_.Effects_SetDarkShadow(*args, **kwargs)
4979
4980 def Set(*args, **kwargs):
4981 """
4982 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
4983 Colour mediumShadow, Colour darkShadow)
4984 """
4985 return _gdi_.Effects_Set(*args, **kwargs)
4986
4987 def DrawSunkenEdge(*args, **kwargs):
4988 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
4989 return _gdi_.Effects_DrawSunkenEdge(*args, **kwargs)
4990
4991 def TileBitmap(*args, **kwargs):
4992 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
4993 return _gdi_.Effects_TileBitmap(*args, **kwargs)
4994
4995
4996class EffectsPtr(Effects):
4997 def __init__(self, this):
4998 self.this = this
4999 if not hasattr(self,"thisown"): self.thisown = 0
5000 self.__class__ = Effects
5001_gdi_.Effects_swigregister(EffectsPtr)
5002TheFontList = cvar.TheFontList
5003ThePenList = cvar.ThePenList
5004TheBrushList = cvar.TheBrushList
5005TheColourDatabase = cvar.TheColourDatabase
5006
5007