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