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