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