]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_gdi.py
Fixed getting OS version information.
[wxWidgets.git] / wxPython / src / gtk / _gdi.py
CommitLineData
0085ce49 1# This file was created automatically by SWIG 1.3.29.
d14a1e28 2# Don't modify this file, modify the SWIG interface instead.
70551f47 3
54f9ee45 4import _gdi_
0085ce49
RD
5import new
6new_instancemethod = new.instancemethod
093d3ff1 7def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
0085ce49 8 if (name == "thisown"): return self.this.own(value)
093d3ff1 9 if (name == "this"):
0085ce49
RD
10 if type(value).__name__ == 'PySwigObject':
11 self.__dict__[name] = value
093d3ff1
RD
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
0085ce49 15 if (not static) or hasattr(self,name):
093d3ff1
RD
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23def _swig_getattr(self,class_type,name):
0085ce49 24 if (name == "thisown"): return self.this.own()
093d3ff1
RD
25 method = class_type.__swig_getmethods__.get(name,None)
26 if method: return method(self)
27 raise AttributeError,name
28
0085ce49
RD
29def _swig_repr(self):
30 try: strthis = "proxy of " + self.this.__repr__()
31 except: strthis = ""
32 return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
33
093d3ff1
RD
34import types
35try:
36 _object = types.ObjectType
37 _newclass = 1
38except AttributeError:
39 class _object : pass
40 _newclass = 0
41del types
42
43
44def _swig_setattr_nondynamic_method(set):
45 def set_attr(self,name,value):
0085ce49
RD
46 if (name == "thisown"): return self.this.own(value)
47 if hasattr(self,name) or (name == "this"):
093d3ff1
RD
48 set(self,name,value)
49 else:
50 raise AttributeError("You cannot add attributes to %s" % self)
51 return set_attr
52
53
54f9ee45
RD
54import _core
55wx = _core
d14a1e28
RD
56#---------------------------------------------------------------------------
57
54f9ee45 58class GDIObject(_core.Object):
093d3ff1 59 """Proxy of C++ GDIObject class"""
0085ce49
RD
60 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
61 __repr__ = _swig_repr
62 def __init__(self, *args, **kwargs):
a95a7133 63 """__init__(self) -> GDIObject"""
0085ce49
RD
64 _gdi_.GDIObject_swiginit(self,_gdi_.new_GDIObject(*args, **kwargs))
65 __swig_destroy__ = _gdi_.delete_GDIObject
66 __del__ = lambda self : None;
e811c8ce 67 def IsNull(*args, **kwargs):
a95a7133 68 """IsNull(self) -> bool"""
54f9ee45 69 return _gdi_.GDIObject_IsNull(*args, **kwargs)
e811c8ce 70
2131d850 71_gdi_.GDIObject_swigregister(GDIObject)
9df61a29 72
d14a1e28
RD
73#---------------------------------------------------------------------------
74
01f6b6d3
RD
75C2S_NAME = _gdi_.C2S_NAME
76C2S_CSS_SYNTAX = _gdi_.C2S_CSS_SYNTAX
77C2S_HTML_SYNTAX = _gdi_.C2S_HTML_SYNTAX
fc46b7f3
RD
78ALPHA_TRANSPARENT = _gdi_.ALPHA_TRANSPARENT
79ALPHA_OPAQUE = _gdi_.ALPHA_OPAQUE
54f9ee45 80class Colour(_core.Object):
b88bce5f 81 """
41e2b43e
RD
82 A colour is an object representing a combination of Red, Green, and
83 Blue (RGB) intensity values, and is used to determine drawing colours,
84 window colours, etc. Valid RGB values are in the range 0 to 255.
b88bce5f 85
41e2b43e 86 In wxPython there are typemaps that will automatically convert from a
32fe5131
RD
87 colour name, from a '#RRGGBB' colour hex value string, or from a 3
88 integer tuple to a wx.Colour object when calling C++ methods that
89 expect a wxColour. This means that the following are all
90 equivallent::
b88bce5f
RD
91
92 win.SetBackgroundColour(wxColour(0,0,255))
b2df227b
RD
93 win.SetBackgroundColour('BLUE')
94 win.SetBackgroundColour('#0000FF')
32fe5131 95 win.SetBackgroundColour((0,0,255))
b88bce5f 96
41e2b43e
RD
97 Additional colour names and their coresponding values can be added
98 using `wx.ColourDatabase`. Various system colours (as set in the
99 user's system preferences) can be retrieved with
100 `wx.SystemSettings.GetColour`.
101
b88bce5f 102 """
0085ce49
RD
103 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
104 __repr__ = _swig_repr
105 def __init__(self, *args, **kwargs):
b88bce5f 106 """
fc46b7f3 107 __init__(self, byte red=0, byte green=0, byte blue=0, byte alpha=ALPHA_OPAQUE) -> Colour
b88bce5f
RD
108
109 Constructs a colour from red, green and blue values.
41e2b43e
RD
110
111 :see: Alternate constructors `wx.NamedColour` and `wx.ColourRGB`.
112
b88bce5f 113 """
0085ce49
RD
114 _gdi_.Colour_swiginit(self,_gdi_.new_Colour(*args, **kwargs))
115 __swig_destroy__ = _gdi_.delete_Colour
116 __del__ = lambda self : None;
e811c8ce 117 def Red(*args, **kwargs):
b88bce5f 118 """
41e2b43e 119 Red(self) -> byte
b88bce5f
RD
120
121 Returns the red intensity.
122 """
54f9ee45 123 return _gdi_.Colour_Red(*args, **kwargs)
e811c8ce
RD
124
125 def Green(*args, **kwargs):
b88bce5f 126 """
41e2b43e 127 Green(self) -> byte
b88bce5f
RD
128
129 Returns the green intensity.
130 """
54f9ee45 131 return _gdi_.Colour_Green(*args, **kwargs)
e811c8ce
RD
132
133 def Blue(*args, **kwargs):
b88bce5f 134 """
41e2b43e 135 Blue(self) -> byte
b88bce5f
RD
136
137 Returns the blue intensity.
138 """
54f9ee45 139 return _gdi_.Colour_Blue(*args, **kwargs)
e811c8ce 140
fc46b7f3
RD
141 def Alpha(*args, **kwargs):
142 """
143 Alpha(self) -> byte
144
145 Returns the Alpha value.
146 """
147 return _gdi_.Colour_Alpha(*args, **kwargs)
148
e811c8ce 149 def Ok(*args, **kwargs):
b88bce5f 150 """
a95a7133 151 Ok(self) -> bool
b88bce5f
RD
152
153 Returns True if the colour object is valid (the colour has been
154 initialised with RGB values).
155 """
54f9ee45 156 return _gdi_.Colour_Ok(*args, **kwargs)
e811c8ce
RD
157
158 def Set(*args, **kwargs):
b88bce5f 159 """
fc46b7f3 160 Set(self, byte red, byte green, byte blue, byte alpha=ALPHA_OPAQUE)
b88bce5f
RD
161
162 Sets the RGB intensity values.
163 """
54f9ee45 164 return _gdi_.Colour_Set(*args, **kwargs)
e811c8ce 165
c9c7117a 166 def SetRGB(*args, **kwargs):
b88bce5f 167 """
a95a7133 168 SetRGB(self, unsigned long colRGB)
b88bce5f
RD
169
170 Sets the RGB intensity values from a packed RGB value.
171 """
54f9ee45 172 return _gdi_.Colour_SetRGB(*args, **kwargs)
e811c8ce 173
b88bce5f
RD
174 def SetFromName(*args, **kwargs):
175 """
a95a7133 176 SetFromName(self, String colourName)
b88bce5f 177
41e2b43e
RD
178 Sets the RGB intensity values using a colour name listed in
179 ``wx.TheColourDatabase``.
b88bce5f 180 """
54f9ee45 181 return _gdi_.Colour_SetFromName(*args, **kwargs)
b88bce5f 182
01f6b6d3
RD
183 def GetAsString(*args, **kwargs):
184 """
185 GetAsString(self, long flags=wxC2S_NAME|wxC2S_CSS_SYNTAX) -> String
186
187 Return the colour as a string. Acceptable flags are:
188
189 =================== ==================================
190 wx.C2S_NAME return colour name, when possible
191 wx.C2S_CSS_SYNTAX return colour in rgb(r,g,b) syntax
192 wx.C2S_HTML_SYNTAX return colour in #rrggbb syntax
193 =================== ==================================
194 """
195 return _gdi_.Colour_GetAsString(*args, **kwargs)
196
b88bce5f
RD
197 def GetPixel(*args, **kwargs):
198 """
a95a7133 199 GetPixel(self) -> long
b88bce5f
RD
200
201 Returns a pixel value which is platform-dependent. On Windows, a
41e2b43e
RD
202 COLORREF is returned. On X, an allocated pixel value is returned. -1
203 is returned if the pixel is invalid (on X, unallocated).
b88bce5f 204 """
54f9ee45 205 return _gdi_.Colour_GetPixel(*args, **kwargs)
b88bce5f 206
e811c8ce 207 def __eq__(*args, **kwargs):
b88bce5f 208 """
e9d6f3a4 209 __eq__(self, PyObject other) -> bool
b88bce5f 210
e9d6f3a4 211 Compare colours for equality.
b88bce5f 212 """
54f9ee45 213 return _gdi_.Colour___eq__(*args, **kwargs)
e811c8ce
RD
214
215 def __ne__(*args, **kwargs):
b88bce5f 216 """
e9d6f3a4 217 __ne__(self, PyObject other) -> bool
e811c8ce 218
e9d6f3a4 219 Compare colours for inequality.
b88bce5f 220 """
54f9ee45 221 return _gdi_.Colour___ne__(*args, **kwargs)
c9c7117a 222
e811c8ce 223 def Get(*args, **kwargs):
b88bce5f
RD
224 """
225 Get() -> (r, g, b)
226
227 Returns the RGB intensity values as a tuple.
228 """
54f9ee45 229 return _gdi_.Colour_Get(*args, **kwargs)
e811c8ce 230
b88bce5f
RD
231 def GetRGB(*args, **kwargs):
232 """
a95a7133 233 GetRGB(self) -> unsigned long
b88bce5f
RD
234
235 Return the colour as a packed RGB value
236 """
54f9ee45 237 return _gdi_.Colour_GetRGB(*args, **kwargs)
b88bce5f 238
41e2b43e 239 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
fc46b7f3
RD
240 def __str__(self): return str(self.Get(True))
241 def __repr__(self): return 'wx.Colour' + str(self.Get(True))
d14a1e28 242 def __nonzero__(self): return self.Ok()
74e96f3d 243 __safe_for_unpickling__ = True
fc46b7f3 244 def __reduce__(self): return (Colour, self.Get(True))
9df61a29 245
2131d850 246_gdi_.Colour_swigregister(Colour)
70551f47 247
d14a1e28 248def NamedColour(*args, **kwargs):
b88bce5f
RD
249 """
250 NamedColour(String colorName) -> Colour
251
41e2b43e
RD
252 Constructs a colour object using a colour name listed in
253 ``wx.TheColourDatabase``.
b88bce5f 254 """
54f9ee45 255 val = _gdi_.new_NamedColour(*args, **kwargs)
d14a1e28 256 return val
70551f47 257
d14a1e28 258def ColourRGB(*args, **kwargs):
b88bce5f
RD
259 """
260 ColourRGB(unsigned long colRGB) -> Colour
261
262 Constructs a colour from a packed RGB value.
263 """
54f9ee45 264 val = _gdi_.new_ColourRGB(*args, **kwargs)
d14a1e28 265 return val
70551f47 266
994141e6
RD
267Color = Colour
268NamedColor = NamedColour
269ColorRGB = ColourRGB
270
d14a1e28 271class Palette(GDIObject):
093d3ff1 272 """Proxy of C++ Palette class"""
0085ce49
RD
273 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
274 __repr__ = _swig_repr
275 def __init__(self, *args, **kwargs):
a95a7133 276 """__init__(self, int n, unsigned char red, unsigned char green, unsigned char blue) -> Palette"""
0085ce49
RD
277 _gdi_.Palette_swiginit(self,_gdi_.new_Palette(*args, **kwargs))
278 __swig_destroy__ = _gdi_.delete_Palette
279 __del__ = lambda self : None;
e811c8ce 280 def GetPixel(*args, **kwargs):
a95a7133 281 """GetPixel(self, byte red, byte green, byte blue) -> int"""
54f9ee45 282 return _gdi_.Palette_GetPixel(*args, **kwargs)
e811c8ce
RD
283
284 def GetRGB(*args, **kwargs):
d3b6e4ff 285 """GetRGB(self, int pixel) -> (R,G,B)"""
54f9ee45 286 return _gdi_.Palette_GetRGB(*args, **kwargs)
e811c8ce 287
5cbf236d
RD
288 def GetColoursCount(*args, **kwargs):
289 """GetColoursCount(self) -> int"""
290 return _gdi_.Palette_GetColoursCount(*args, **kwargs)
291
e811c8ce 292 def Ok(*args, **kwargs):
a95a7133 293 """Ok(self) -> bool"""
54f9ee45 294 return _gdi_.Palette_Ok(*args, **kwargs)
e811c8ce 295
322913ce 296 def __nonzero__(self): return self.Ok()
2131d850 297_gdi_.Palette_swigregister(Palette)
d14a1e28
RD
298
299#---------------------------------------------------------------------------
300
301class Pen(GDIObject):
093d3ff1 302 """Proxy of C++ Pen class"""
0085ce49
RD
303 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
304 __repr__ = _swig_repr
305 def __init__(self, *args, **kwargs):
a95a7133 306 """__init__(self, Colour colour, int width=1, int style=SOLID) -> Pen"""
0085ce49
RD
307 _gdi_.Pen_swiginit(self,_gdi_.new_Pen(*args, **kwargs))
308 __swig_destroy__ = _gdi_.delete_Pen
309 __del__ = lambda self : None;
e811c8ce 310 def GetCap(*args, **kwargs):
a95a7133 311 """GetCap(self) -> int"""
54f9ee45 312 return _gdi_.Pen_GetCap(*args, **kwargs)
e811c8ce
RD
313
314 def GetColour(*args, **kwargs):
a95a7133 315 """GetColour(self) -> Colour"""
54f9ee45 316 return _gdi_.Pen_GetColour(*args, **kwargs)
e811c8ce
RD
317
318 def GetJoin(*args, **kwargs):
a95a7133 319 """GetJoin(self) -> int"""
54f9ee45 320 return _gdi_.Pen_GetJoin(*args, **kwargs)
e811c8ce
RD
321
322 def GetStyle(*args, **kwargs):
a95a7133 323 """GetStyle(self) -> int"""
54f9ee45 324 return _gdi_.Pen_GetStyle(*args, **kwargs)
e811c8ce
RD
325
326 def GetWidth(*args, **kwargs):
a95a7133 327 """GetWidth(self) -> int"""
54f9ee45 328 return _gdi_.Pen_GetWidth(*args, **kwargs)
e811c8ce
RD
329
330 def Ok(*args, **kwargs):
a95a7133 331 """Ok(self) -> bool"""
54f9ee45 332 return _gdi_.Pen_Ok(*args, **kwargs)
e811c8ce
RD
333
334 def SetCap(*args, **kwargs):
a95a7133 335 """SetCap(self, int cap_style)"""
54f9ee45 336 return _gdi_.Pen_SetCap(*args, **kwargs)
e811c8ce
RD
337
338 def SetColour(*args, **kwargs):
a95a7133 339 """SetColour(self, Colour colour)"""
54f9ee45 340 return _gdi_.Pen_SetColour(*args, **kwargs)
e811c8ce
RD
341
342 def SetJoin(*args, **kwargs):
a95a7133 343 """SetJoin(self, int join_style)"""
54f9ee45 344 return _gdi_.Pen_SetJoin(*args, **kwargs)
e811c8ce
RD
345
346 def SetStyle(*args, **kwargs):
a95a7133 347 """SetStyle(self, int style)"""
54f9ee45 348 return _gdi_.Pen_SetStyle(*args, **kwargs)
e811c8ce
RD
349
350 def SetWidth(*args, **kwargs):
a95a7133 351 """SetWidth(self, int width)"""
54f9ee45 352 return _gdi_.Pen_SetWidth(*args, **kwargs)
e811c8ce
RD
353
354 def SetDashes(*args, **kwargs):
093d3ff1 355 """SetDashes(self, int dashes)"""
54f9ee45 356 return _gdi_.Pen_SetDashes(*args, **kwargs)
e811c8ce
RD
357
358 def GetDashes(*args, **kwargs):
a95a7133 359 """GetDashes(self) -> PyObject"""
54f9ee45 360 return _gdi_.Pen_GetDashes(*args, **kwargs)
e811c8ce 361
66c033b4
RD
362 def _SetDashes(*args, **kwargs):
363 """_SetDashes(self, PyObject _self, PyObject pyDashes)"""
364 return _gdi_.Pen__SetDashes(*args, **kwargs)
365
366 def SetDashes(self, dashes):
367 """
368 Associate a list of dash lengths with the Pen.
369 """
370 self._SetDashes(self, dashes)
371
372 def GetDashCount(*args, **kwargs):
373 """GetDashCount(self) -> int"""
374 return _gdi_.Pen_GetDashCount(*args, **kwargs)
375
3adfb63b 376 def __eq__(*args, **kwargs):
a95a7133 377 """__eq__(self, Pen other) -> bool"""
54f9ee45 378 return _gdi_.Pen___eq__(*args, **kwargs)
3adfb63b 379
22faec7d 380 def __ne__(*args, **kwargs):
a95a7133 381 """__ne__(self, Pen other) -> bool"""
54f9ee45 382 return _gdi_.Pen___ne__(*args, **kwargs)
22faec7d 383
d14a1e28 384 def __nonzero__(self): return self.Ok()
2131d850 385_gdi_.Pen_swigregister(Pen)
d14a1e28 386
66c033b4 387#---------------------------------------------------------------------------
e811c8ce 388
66c033b4
RD
389class Brush(GDIObject):
390 """
391 A brush is a drawing tool for filling in areas. It is used for
392 painting the background of rectangles, ellipses, etc. when drawing on
393 a `wx.DC`. It has a colour and a style.
0df68c9f 394 """
0085ce49
RD
395 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
396 __repr__ = _swig_repr
397 def __init__(self, *args, **kwargs):
0df68c9f 398 """
a95a7133 399 __init__(self, Colour colour, int style=SOLID) -> Brush
1e0c8722 400
41e2b43e 401 Constructs a brush from a `wx.Colour` object and a style.
0df68c9f 402 """
0085ce49
RD
403 _gdi_.Brush_swiginit(self,_gdi_.new_Brush(*args, **kwargs))
404 __swig_destroy__ = _gdi_.delete_Brush
405 __del__ = lambda self : None;
e811c8ce 406 def SetColour(*args, **kwargs):
66c033b4
RD
407 """
408 SetColour(self, Colour col)
409
410 Set the brush's `wx.Colour`.
411 """
54f9ee45 412 return _gdi_.Brush_SetColour(*args, **kwargs)
e811c8ce
RD
413
414 def SetStyle(*args, **kwargs):
66c033b4
RD
415 """
416 SetStyle(self, int style)
417
418 Sets the style of the brush. See `__init__` for a listing of styles.
419 """
54f9ee45 420 return _gdi_.Brush_SetStyle(*args, **kwargs)
e811c8ce
RD
421
422 def SetStipple(*args, **kwargs):
66c033b4
RD
423 """
424 SetStipple(self, Bitmap stipple)
425
426 Sets the stipple `wx.Bitmap`.
427 """
54f9ee45 428 return _gdi_.Brush_SetStipple(*args, **kwargs)
e811c8ce
RD
429
430 def GetColour(*args, **kwargs):
66c033b4
RD
431 """
432 GetColour(self) -> Colour
433
434 Returns the `wx.Colour` of the brush.
435 """
54f9ee45 436 return _gdi_.Brush_GetColour(*args, **kwargs)
e811c8ce
RD
437
438 def GetStyle(*args, **kwargs):
66c033b4
RD
439 """
440 GetStyle(self) -> int
441
442 Returns the style of the brush. See `__init__` for a listing of
443 styles.
444 """
54f9ee45 445 return _gdi_.Brush_GetStyle(*args, **kwargs)
e811c8ce
RD
446
447 def GetStipple(*args, **kwargs):
66c033b4
RD
448 """
449 GetStipple(self) -> Bitmap
450
451 Returns the stiple `wx.Bitmap` of the brush. If the brush does not
452 have a wx.STIPPLE style, then the return value may be non-None but an
453 uninitialised bitmap (`wx.Bitmap.Ok` returns False).
454 """
54f9ee45 455 return _gdi_.Brush_GetStipple(*args, **kwargs)
e811c8ce 456
f78cc896
RD
457 def IsHatch(*args, **kwargs):
458 """
459 IsHatch(self) -> bool
460
461 Is the current style a hatch type?
462 """
463 return _gdi_.Brush_IsHatch(*args, **kwargs)
464
e811c8ce 465 def Ok(*args, **kwargs):
66c033b4
RD
466 """
467 Ok(self) -> bool
468
469 Returns True if the brush is initialised and valid.
470 """
54f9ee45 471 return _gdi_.Brush_Ok(*args, **kwargs)
e811c8ce 472
d14a1e28 473 def __nonzero__(self): return self.Ok()
2131d850 474_gdi_.Brush_swigregister(Brush)
d14a1e28 475
d04418a7
RD
476def BrushFromBitmap(*args, **kwargs):
477 """
478 BrushFromBitmap(Bitmap stippleBitmap) -> Brush
479
480 Constructs a stippled brush using a bitmap.
481 """
482 val = _gdi_.new_BrushFromBitmap(*args, **kwargs)
d04418a7
RD
483 return val
484
d14a1e28 485class Bitmap(GDIObject):
66c033b4
RD
486 """
487 The wx.Bitmap class encapsulates the concept of a platform-dependent
488 bitmap. It can be either monochrome or colour, and either loaded from
489 a file or created dynamically. A bitmap can be selected into a memory
490 device context (instance of `wx.MemoryDC`). This enables the bitmap to
491 be copied to a window or memory device context using `wx.DC.Blit`, or
492 to be used as a drawing surface.
66c033b4 493 """
0085ce49
RD
494 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
495 __repr__ = _swig_repr
496 def __init__(self, *args, **kwargs):
0df68c9f 497 """
a95a7133 498 __init__(self, String name, int type=BITMAP_TYPE_ANY) -> Bitmap
1e0c8722 499
0df68c9f
RD
500 Loads a bitmap from a file.
501 """
0085ce49
RD
502 _gdi_.Bitmap_swiginit(self,_gdi_.new_Bitmap(*args, **kwargs))
503 __swig_destroy__ = _gdi_.delete_Bitmap
504 __del__ = lambda self : None;
e811c8ce 505 def Ok(*args, **kwargs):
a95a7133 506 """Ok(self) -> bool"""
54f9ee45 507 return _gdi_.Bitmap_Ok(*args, **kwargs)
e811c8ce
RD
508
509 def GetWidth(*args, **kwargs):
0df68c9f 510 """
a95a7133 511 GetWidth(self) -> int
1e0c8722 512
0df68c9f
RD
513 Gets the width of the bitmap in pixels.
514 """
54f9ee45 515 return _gdi_.Bitmap_GetWidth(*args, **kwargs)
e811c8ce
RD
516
517 def GetHeight(*args, **kwargs):
0df68c9f 518 """
a95a7133 519 GetHeight(self) -> int
1e0c8722 520
0df68c9f
RD
521 Gets the height of the bitmap in pixels.
522 """
54f9ee45 523 return _gdi_.Bitmap_GetHeight(*args, **kwargs)
e811c8ce
RD
524
525 def GetDepth(*args, **kwargs):
0df68c9f 526 """
a95a7133 527 GetDepth(self) -> int
1e0c8722 528
0df68c9f
RD
529 Gets the colour depth of the bitmap. A value of 1 indicates a
530 monochrome bitmap.
531 """
54f9ee45 532 return _gdi_.Bitmap_GetDepth(*args, **kwargs)
e811c8ce 533
b2df227b
RD
534 def GetSize(*args, **kwargs):
535 """
a95a7133 536 GetSize(self) -> Size
b2df227b
RD
537
538 Get the size of the bitmap.
539 """
54f9ee45 540 return _gdi_.Bitmap_GetSize(*args, **kwargs)
b2df227b 541
e811c8ce 542 def ConvertToImage(*args, **kwargs):
0df68c9f 543 """
a95a7133 544 ConvertToImage(self) -> Image
1e0c8722 545
66c033b4
RD
546 Creates a platform-independent image from a platform-dependent
547 bitmap. This preserves mask information so that bitmaps and images can
548 be converted back and forth without loss in that respect.
0df68c9f 549 """
54f9ee45 550 return _gdi_.Bitmap_ConvertToImage(*args, **kwargs)
e811c8ce
RD
551
552 def GetMask(*args, **kwargs):
0df68c9f 553 """
a95a7133 554 GetMask(self) -> Mask
1e0c8722 555
66c033b4
RD
556 Gets the associated mask (if any) which may have been loaded from a
557 file or explpicitly set for the bitmap.
558
559 :see: `SetMask`, `wx.Mask`
560
0df68c9f 561 """
54f9ee45 562 return _gdi_.Bitmap_GetMask(*args, **kwargs)
e811c8ce
RD
563
564 def SetMask(*args, **kwargs):
0df68c9f 565 """
a95a7133 566 SetMask(self, Mask mask)
1e0c8722 567
0df68c9f 568 Sets the mask for this bitmap.
66c033b4
RD
569
570 :see: `GetMask`, `wx.Mask`
571
0df68c9f 572 """
54f9ee45 573 return _gdi_.Bitmap_SetMask(*args, **kwargs)
e811c8ce
RD
574
575 def SetMaskColour(*args, **kwargs):
0df68c9f 576 """
a95a7133 577 SetMaskColour(self, Colour colour)
1e0c8722 578
0df68c9f
RD
579 Create a Mask based on a specified colour in the Bitmap.
580 """
54f9ee45 581 return _gdi_.Bitmap_SetMaskColour(*args, **kwargs)
e811c8ce
RD
582
583 def GetSubBitmap(*args, **kwargs):
0df68c9f 584 """
a95a7133 585 GetSubBitmap(self, Rect rect) -> Bitmap
1e0c8722 586
66c033b4
RD
587 Returns a sub-bitmap of the current one as long as the rect belongs
588 entirely to the bitmap. This function preserves bit depth and mask
589 information.
0df68c9f 590 """
54f9ee45 591 return _gdi_.Bitmap_GetSubBitmap(*args, **kwargs)
e811c8ce
RD
592
593 def SaveFile(*args, **kwargs):
0df68c9f 594 """
66c033b4 595 SaveFile(self, String name, int type, Palette palette=None) -> bool
1e0c8722 596
66c033b4
RD
597 Saves a bitmap in the named file. See `__init__` for a description of
598 the ``type`` parameter.
0df68c9f 599 """
54f9ee45 600 return _gdi_.Bitmap_SaveFile(*args, **kwargs)
e811c8ce
RD
601
602 def LoadFile(*args, **kwargs):
0df68c9f 603 """
a95a7133 604 LoadFile(self, String name, int type) -> bool
1e0c8722 605
66c033b4
RD
606 Loads a bitmap from a file. See `__init__` for a description of the
607 ``type`` parameter.
0df68c9f 608 """
54f9ee45 609 return _gdi_.Bitmap_LoadFile(*args, **kwargs)
e811c8ce 610
d3b6e4ff
RD
611 def GetPalette(*args, **kwargs):
612 """GetPalette(self) -> Palette"""
613 return _gdi_.Bitmap_GetPalette(*args, **kwargs)
614
e811c8ce 615 def CopyFromIcon(*args, **kwargs):
a95a7133 616 """CopyFromIcon(self, Icon icon) -> bool"""
54f9ee45 617 return _gdi_.Bitmap_CopyFromIcon(*args, **kwargs)
e811c8ce
RD
618
619 def SetHeight(*args, **kwargs):
0df68c9f 620 """
a95a7133 621 SetHeight(self, int height)
1e0c8722 622
66c033b4 623 Set the height property (does not affect the existing bitmap data).
0df68c9f 624 """
54f9ee45 625 return _gdi_.Bitmap_SetHeight(*args, **kwargs)
e811c8ce
RD
626
627 def SetWidth(*args, **kwargs):
0df68c9f 628 """
a95a7133 629 SetWidth(self, int width)
1e0c8722 630
66c033b4 631 Set the width property (does not affect the existing bitmap data).
0df68c9f 632 """
54f9ee45 633 return _gdi_.Bitmap_SetWidth(*args, **kwargs)
e811c8ce
RD
634
635 def SetDepth(*args, **kwargs):
0df68c9f 636 """
a95a7133 637 SetDepth(self, int depth)
1e0c8722 638
66c033b4 639 Set the depth property (does not affect the existing bitmap data).
0df68c9f 640 """
54f9ee45 641 return _gdi_.Bitmap_SetDepth(*args, **kwargs)
e811c8ce 642
b2df227b
RD
643 def SetSize(*args, **kwargs):
644 """
a95a7133 645 SetSize(self, Size size)
b2df227b 646
66c033b4 647 Set the bitmap size (does not affect the existing bitmap data).
b2df227b 648 """
54f9ee45 649 return _gdi_.Bitmap_SetSize(*args, **kwargs)
b2df227b 650
d14a1e28 651 def __nonzero__(self): return self.Ok()
4276dc52 652 def __eq__(*args, **kwargs):
a95a7133 653 """__eq__(self, Bitmap other) -> bool"""
54f9ee45 654 return _gdi_.Bitmap___eq__(*args, **kwargs)
4276dc52
RD
655
656 def __ne__(*args, **kwargs):
a95a7133 657 """__ne__(self, Bitmap other) -> bool"""
54f9ee45 658 return _gdi_.Bitmap___ne__(*args, **kwargs)
4276dc52 659
2131d850 660_gdi_.Bitmap_swigregister(Bitmap)
70551f47 661
66c033b4
RD
662def EmptyBitmap(*args, **kwargs):
663 """
664 EmptyBitmap(int width, int height, int depth=-1) -> Bitmap
665
666 Creates a new bitmap of the given size. A depth of -1 indicates the
667 depth of the current screen or visual. Some platforms only support 1
0085ce49 668 for monochrome and -1 for the current display depth.
66c033b4
RD
669 """
670 val = _gdi_.new_EmptyBitmap(*args, **kwargs)
66c033b4
RD
671 return val
672
d14a1e28 673def BitmapFromIcon(*args, **kwargs):
0df68c9f
RD
674 """
675 BitmapFromIcon(Icon icon) -> Bitmap
1e0c8722 676
66c033b4 677 Create a new bitmap from a `wx.Icon` object.
0df68c9f 678 """
54f9ee45 679 val = _gdi_.new_BitmapFromIcon(*args, **kwargs)
d14a1e28 680 return val
70551f47 681
d14a1e28 682def BitmapFromImage(*args, **kwargs):
0df68c9f
RD
683 """
684 BitmapFromImage(Image image, int depth=-1) -> Bitmap
685
66c033b4
RD
686 Creates bitmap object from a `wx.Image`. This has to be done to
687 actually display a `wx.Image` as you cannot draw an image directly on
688 a window. The resulting bitmap will use the provided colour depth (or
689 that of the current screen colour depth if depth is -1) which entails
690 that a colour reduction may have to take place.
0df68c9f 691 """
54f9ee45 692 val = _gdi_.new_BitmapFromImage(*args, **kwargs)
d14a1e28 693 return val
3ef86e32 694
d14a1e28 695def BitmapFromXPMData(*args, **kwargs):
0df68c9f
RD
696 """
697 BitmapFromXPMData(PyObject listOfStrings) -> Bitmap
1e0c8722 698
0df68c9f
RD
699 Construct a Bitmap from a list of strings formatted as XPM data.
700 """
54f9ee45 701 val = _gdi_.new_BitmapFromXPMData(*args, **kwargs)
d14a1e28 702 return val
3ef86e32 703
d14a1e28 704def BitmapFromBits(*args, **kwargs):
0df68c9f
RD
705 """
706 BitmapFromBits(PyObject bits, int width, int height, int depth=1) -> Bitmap
707
66c033b4
RD
708 Creates a bitmap from an array of bits. You should only use this
709 function for monochrome bitmaps (depth 1) in portable programs: in
710 this case the bits parameter should contain an XBM image. For other
711 bit depths, the behaviour is platform dependent.
0df68c9f 712 """
54f9ee45 713 val = _gdi_.new_BitmapFromBits(*args, **kwargs)
d14a1e28 714 return val
3ef86e32 715
fc46b7f3
RD
716
717def _BitmapFromBufferAlpha(*args, **kwargs):
718 """_BitmapFromBufferAlpha(int width, int height, buffer data, buffer alpha) -> Bitmap"""
719 return _gdi_._BitmapFromBufferAlpha(*args, **kwargs)
720
721def _BitmapFromBuffer(*args, **kwargs):
722 """_BitmapFromBuffer(int width, int height, buffer data) -> Bitmap"""
723 return _gdi_._BitmapFromBuffer(*args, **kwargs)
724def BitmapFromBuffer(width, height, dataBuffer, alphaBuffer=None):
725 """
726 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
eec1c382
RD
727 parameter must be a Python object that implements the buffer
728 interface, such as a string, array, etc. The dataBuffer object is
729 expected to contain a series of RGB bytes and be width*height*3
730 bytes long. A buffer object can optionally be supplied for the
731 image's alpha channel data, and it is expected to be width*height
732 bytes long. On Windows the RGB values are 'premultiplied' by the
733 alpha values. (The other platforms do the multiplication
734 themselves.)
735
736 Unlike `wx.ImageFromBuffer` the bitmap created with this function
737 does not share the memory buffer with the buffer object. This is
738 because the native pixel buffer format varies on different
739 platforms, and so instead an efficient as possible copy of the
740 data is made from the buffer objects to the bitmap's native pixel
741 buffer. For direct access to a bitmap's pixel buffer see
742 `wx.NativePixelData` and `wx.AlphaPixelData`.
fc46b7f3
RD
743
744 :see: `wx.Bitmap`, `wx.BitmapFromBufferRGBA`, `wx.NativePixelData`,
745 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
746 """
fc46b7f3
RD
747 if alphaBuffer is not None:
748 return _gdi_._BitmapFromBufferAlpha(width, height, dataBuffer, alphaBuffer)
749 else:
750 return _gdi_._BitmapFromBuffer(width, height, dataBuffer)
751
752
753def _BitmapFromBufferRGBA(*args, **kwargs):
754 """_BitmapFromBufferRGBA(int width, int height, buffer data) -> Bitmap"""
755 return _gdi_._BitmapFromBufferRGBA(*args, **kwargs)
756def BitmapFromBufferRGBA(width, height, dataBuffer):
757 """
758 Creates a `wx.Bitmap` from the data in dataBuffer. The dataBuffer
eec1c382
RD
759 parameter must be a Python object that implements the buffer
760 interface, such as a string, array, etc. The dataBuffer object is
761 expected to contain a series of RGBA bytes (red, green, blue and
762 alpha) and be width*height*4 bytes long. On Windows the RGB
763 values are 'premultiplied' by the alpha values. (The other
764 platforms do the multiplication themselves.)
765
766 Unlike `wx.ImageFromBuffer` the bitmap created with this function
767 does not share the memory buffer with the buffer object. This is
768 because the native pixel buffer format varies on different
769 platforms, and so instead an efficient as possible copy of the
770 data is made from the buffer object to the bitmap's native pixel
771 buffer. For direct access to a bitmap's pixel buffer see
772 `wx.NativePixelData` and `wx.AlphaPixelData`.
fc46b7f3
RD
773
774 :see: `wx.Bitmap`, `wx.BitmapFromBuffer`, `wx.NativePixelData`,
775 `wx.AlphaPixelData`, `wx.ImageFromBuffer`
776 """
fc46b7f3
RD
777 return _gdi_._BitmapFromBufferRGBA(width, height, dataBuffer)
778
779class PixelDataBase(object):
780 """Proxy of C++ PixelDataBase class"""
781 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
782 def __init__(self): raise AttributeError, "No constructor defined"
783 __repr__ = _swig_repr
784 def GetOrigin(*args, **kwargs):
785 """GetOrigin(self) -> Point"""
786 return _gdi_.PixelDataBase_GetOrigin(*args, **kwargs)
787
788 def GetWidth(*args, **kwargs):
789 """GetWidth(self) -> int"""
790 return _gdi_.PixelDataBase_GetWidth(*args, **kwargs)
791
792 def GetHeight(*args, **kwargs):
793 """GetHeight(self) -> int"""
794 return _gdi_.PixelDataBase_GetHeight(*args, **kwargs)
795
796 def GetSize(*args, **kwargs):
797 """GetSize(self) -> Size"""
798 return _gdi_.PixelDataBase_GetSize(*args, **kwargs)
799
800 def GetRowStride(*args, **kwargs):
801 """GetRowStride(self) -> int"""
802 return _gdi_.PixelDataBase_GetRowStride(*args, **kwargs)
803
804_gdi_.PixelDataBase_swigregister(PixelDataBase)
805
806class NativePixelData(PixelDataBase):
807 """Proxy of C++ NativePixelData class"""
808 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
809 __repr__ = _swig_repr
810 def __init__(self, *args):
811 """
812 __init__(self, Bitmap bmp) -> NativePixelData
813 __init__(self, Bitmap bmp, Rect rect) -> NativePixelData
814 __init__(self, Bitmap bmp, Point pt, Size sz) -> NativePixelData
815 """
816 _gdi_.NativePixelData_swiginit(self,_gdi_.new_NativePixelData(*args))
817 __swig_destroy__ = _gdi_.delete_NativePixelData
818 __del__ = lambda self : None;
819 def GetPixels(*args, **kwargs):
820 """GetPixels(self) -> NativePixelData_Accessor"""
821 return _gdi_.NativePixelData_GetPixels(*args, **kwargs)
822
823 def UseAlpha(*args, **kwargs):
824 """UseAlpha(self)"""
825 return _gdi_.NativePixelData_UseAlpha(*args, **kwargs)
826
827 def __nonzero__(*args, **kwargs):
828 """__nonzero__(self) -> bool"""
829 return _gdi_.NativePixelData___nonzero__(*args, **kwargs)
830
831 def __iter__(self):
832 """Create and return an iterator object for this pixel data object."""
833 return self.PixelIterator(self)
834
835 class PixelIterator(object):
836 """
837 Sequential iterator which returns pixel accessor objects starting at the
838 the top-left corner, and going row-by-row until the bottom-right
839 corner is reached.
840 """
841
842 class PixelAccessor(object):
843 """
844 This class is what is returned by the iterator and allows the pixel
845 to be Get or Set.
846 """
847 def __init__(self, data, pixels, x, y):
848 self.data = data
849 self.pixels = pixels
850 self.x = x
851 self.y = y
852 def Set(self, *args, **kw):
853 self.pixels.MoveTo(self.data, self.x, self.y)
854 return self.pixels.Set(*args, **kw)
855 def Get(self):
856 self.pixels.MoveTo(self.data, self.x, self.y)
857 return self.pixels.Get()
858
859 def __init__(self, pixelData):
860 self.x = self.y = 0
861 self.w = pixelData.GetWidth()
862 self.h = pixelData.GetHeight()
863 self.data = pixelData
864 self.pixels = pixelData.GetPixels()
865
866 def __iter__(self):
867 return self
868
869 def next(self):
870 if self.y >= self.h:
871 raise StopIteration
872 p = self.PixelAccessor(self.data, self.pixels, self.x, self.y)
873 self.x += 1
874 if self.x >= self.w:
875 self.x = 0
876 self.y += 1
877 return p
878
879_gdi_.NativePixelData_swigregister(NativePixelData)
880
881class NativePixelData_Accessor(object):
882 """Proxy of C++ NativePixelData_Accessor class"""
883 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
884 __repr__ = _swig_repr
885 def __init__(self, *args):
886 """
887 __init__(self, NativePixelData data) -> NativePixelData_Accessor
888 __init__(self, Bitmap bmp, NativePixelData data) -> NativePixelData_Accessor
889 __init__(self) -> NativePixelData_Accessor
890 """
891 _gdi_.NativePixelData_Accessor_swiginit(self,_gdi_.new_NativePixelData_Accessor(*args))
892 __swig_destroy__ = _gdi_.delete_NativePixelData_Accessor
893 __del__ = lambda self : None;
894 def Reset(*args, **kwargs):
895 """Reset(self, NativePixelData data)"""
896 return _gdi_.NativePixelData_Accessor_Reset(*args, **kwargs)
897
898 def IsOk(*args, **kwargs):
899 """IsOk(self) -> bool"""
900 return _gdi_.NativePixelData_Accessor_IsOk(*args, **kwargs)
901
902 def nextPixel(*args, **kwargs):
903 """nextPixel(self)"""
904 return _gdi_.NativePixelData_Accessor_nextPixel(*args, **kwargs)
905
906 def Offset(*args, **kwargs):
907 """Offset(self, NativePixelData data, int x, int y)"""
908 return _gdi_.NativePixelData_Accessor_Offset(*args, **kwargs)
909
910 def OffsetX(*args, **kwargs):
911 """OffsetX(self, NativePixelData data, int x)"""
912 return _gdi_.NativePixelData_Accessor_OffsetX(*args, **kwargs)
913
914 def OffsetY(*args, **kwargs):
915 """OffsetY(self, NativePixelData data, int y)"""
916 return _gdi_.NativePixelData_Accessor_OffsetY(*args, **kwargs)
917
918 def MoveTo(*args, **kwargs):
919 """MoveTo(self, NativePixelData data, int x, int y)"""
920 return _gdi_.NativePixelData_Accessor_MoveTo(*args, **kwargs)
921
922 def Set(*args, **kwargs):
923 """Set(self, byte red, byte green, byte blue)"""
924 return _gdi_.NativePixelData_Accessor_Set(*args, **kwargs)
925
926 def Get(*args, **kwargs):
927 """Get(self) -> PyObject"""
928 return _gdi_.NativePixelData_Accessor_Get(*args, **kwargs)
929
930_gdi_.NativePixelData_Accessor_swigregister(NativePixelData_Accessor)
931
932class AlphaPixelData(PixelDataBase):
933 """Proxy of C++ AlphaPixelData class"""
934 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
935 __repr__ = _swig_repr
936 def __init__(self, *args):
937 """
938 __init__(self, Bitmap bmp) -> AlphaPixelData
939 __init__(self, Bitmap bmp, Rect rect) -> AlphaPixelData
940 __init__(self, Bitmap bmp, Point pt, Size sz) -> AlphaPixelData
941 """
942 _gdi_.AlphaPixelData_swiginit(self,_gdi_.new_AlphaPixelData(*args))
943 self.UseAlpha()
944
945 __swig_destroy__ = _gdi_.delete_AlphaPixelData
946 __del__ = lambda self : None;
947 def GetPixels(*args, **kwargs):
948 """GetPixels(self) -> AlphaPixelData_Accessor"""
949 return _gdi_.AlphaPixelData_GetPixels(*args, **kwargs)
950
951 def UseAlpha(*args, **kwargs):
952 """UseAlpha(self)"""
953 return _gdi_.AlphaPixelData_UseAlpha(*args, **kwargs)
954
955 def __nonzero__(*args, **kwargs):
956 """__nonzero__(self) -> bool"""
957 return _gdi_.AlphaPixelData___nonzero__(*args, **kwargs)
958
959 def __iter__(self):
960 """Create and return an iterator object for this pixel data object."""
961 return self.PixelIterator(self)
962
963 class PixelIterator(object):
964 """
965 Sequential iterator which returns pixel accessor objects starting at the
966 the top-left corner, and going row-by-row until the bottom-right
967 corner is reached.
968 """
969
970 class PixelAccessor(object):
971 """
972 This class is what is returned by the iterator and allows the pixel
973 to be Get or Set.
974 """
975 def __init__(self, data, pixels, x, y):
976 self.data = data
977 self.pixels = pixels
978 self.x = x
979 self.y = y
980 def Set(self, *args, **kw):
981 self.pixels.MoveTo(self.data, self.x, self.y)
982 return self.pixels.Set(*args, **kw)
983 def Get(self):
984 self.pixels.MoveTo(self.data, self.x, self.y)
985 return self.pixels.Get()
986
987 def __init__(self, pixelData):
988 self.x = self.y = 0
989 self.w = pixelData.GetWidth()
990 self.h = pixelData.GetHeight()
991 self.data = pixelData
992 self.pixels = pixelData.GetPixels()
993
994 def __iter__(self):
995 return self
996
997 def next(self):
998 if self.y >= self.h:
999 raise StopIteration
1000 p = self.PixelAccessor(self.data, self.pixels, self.x, self.y)
1001 self.x += 1
1002 if self.x >= self.w:
1003 self.x = 0
1004 self.y += 1
1005 return p
1006
1007_gdi_.AlphaPixelData_swigregister(AlphaPixelData)
1008
1009class AlphaPixelData_Accessor(object):
1010 """Proxy of C++ AlphaPixelData_Accessor class"""
1011 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1012 __repr__ = _swig_repr
1013 def __init__(self, *args):
1014 """
1015 __init__(self, AlphaPixelData data) -> AlphaPixelData_Accessor
1016 __init__(self, Bitmap bmp, AlphaPixelData data) -> AlphaPixelData_Accessor
1017 __init__(self) -> AlphaPixelData_Accessor
1018 """
1019 _gdi_.AlphaPixelData_Accessor_swiginit(self,_gdi_.new_AlphaPixelData_Accessor(*args))
1020 __swig_destroy__ = _gdi_.delete_AlphaPixelData_Accessor
1021 __del__ = lambda self : None;
1022 def Reset(*args, **kwargs):
1023 """Reset(self, AlphaPixelData data)"""
1024 return _gdi_.AlphaPixelData_Accessor_Reset(*args, **kwargs)
1025
1026 def IsOk(*args, **kwargs):
1027 """IsOk(self) -> bool"""
1028 return _gdi_.AlphaPixelData_Accessor_IsOk(*args, **kwargs)
1029
1030 def nextPixel(*args, **kwargs):
1031 """nextPixel(self)"""
1032 return _gdi_.AlphaPixelData_Accessor_nextPixel(*args, **kwargs)
1033
1034 def Offset(*args, **kwargs):
1035 """Offset(self, AlphaPixelData data, int x, int y)"""
1036 return _gdi_.AlphaPixelData_Accessor_Offset(*args, **kwargs)
1037
1038 def OffsetX(*args, **kwargs):
1039 """OffsetX(self, AlphaPixelData data, int x)"""
1040 return _gdi_.AlphaPixelData_Accessor_OffsetX(*args, **kwargs)
1041
1042 def OffsetY(*args, **kwargs):
1043 """OffsetY(self, AlphaPixelData data, int y)"""
1044 return _gdi_.AlphaPixelData_Accessor_OffsetY(*args, **kwargs)
1045
1046 def MoveTo(*args, **kwargs):
1047 """MoveTo(self, AlphaPixelData data, int x, int y)"""
1048 return _gdi_.AlphaPixelData_Accessor_MoveTo(*args, **kwargs)
1049
1050 def Set(*args, **kwargs):
1051 """Set(self, byte red, byte green, byte blue, byte alpha)"""
1052 return _gdi_.AlphaPixelData_Accessor_Set(*args, **kwargs)
1053
1054 def Get(*args, **kwargs):
1055 """Get(self) -> PyObject"""
1056 return _gdi_.AlphaPixelData_Accessor_Get(*args, **kwargs)
1057
1058_gdi_.AlphaPixelData_Accessor_swigregister(AlphaPixelData_Accessor)
1059
66c033b4 1060class Mask(_core.Object):
b2df227b 1061 """
66c033b4
RD
1062 This class encapsulates a monochrome mask bitmap, where the masked
1063 area is black and the unmasked area is white. When associated with a
1064 bitmap and drawn in a device context, the unmasked area of the bitmap
1065 will be drawn, and the masked area will not be drawn.
b2df227b 1066
66c033b4
RD
1067 A mask may be associated with a `wx.Bitmap`. It is used in
1068 `wx.DC.DrawBitmap` or `wx.DC.Blit` when the source device context is a
1069 `wx.MemoryDC` with a `wx.Bitmap` selected into it that contains a
1070 mask.
0df68c9f 1071 """
0085ce49
RD
1072 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1073 __repr__ = _swig_repr
1074 def __init__(self, *args, **kwargs):
0df68c9f 1075 """
a95a7133 1076 __init__(self, Bitmap bitmap, Colour colour=NullColour) -> Mask
1e0c8722 1077
66c033b4
RD
1078 Constructs a mask from a `wx.Bitmap` and a `wx.Colour` in that bitmap
1079 that indicates the transparent portions of the mask. In other words,
1080 the pixels in ``bitmap`` that match ``colour`` will be the transparent
1081 portions of the mask. If no ``colour`` or an invalid ``colour`` is
1082 passed then BLACK is used.
1083
1084 :see: `wx.Bitmap`, `wx.Colour`
0df68c9f 1085 """
0085ce49
RD
1086 _gdi_.Mask_swiginit(self,_gdi_.new_Mask(*args, **kwargs))
1087 __swig_destroy__ = _gdi_.delete_Mask
1088 __del__ = lambda self : None;
2131d850 1089_gdi_.Mask_swigregister(Mask)
d14a1e28 1090
66c033b4 1091MaskColour = wx._deprecated(Mask, "wx.MaskColour is deprecated, use `wx.Mask` instead.")
d14a1e28 1092class Icon(GDIObject):
093d3ff1 1093 """Proxy of C++ Icon class"""
0085ce49
RD
1094 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1095 __repr__ = _swig_repr
1096 def __init__(self, *args, **kwargs):
a95a7133 1097 """__init__(self, String name, int type, int desiredWidth=-1, int desiredHeight=-1) -> Icon"""
0085ce49
RD
1098 _gdi_.Icon_swiginit(self,_gdi_.new_Icon(*args, **kwargs))
1099 __swig_destroy__ = _gdi_.delete_Icon
1100 __del__ = lambda self : None;
e811c8ce 1101 def LoadFile(*args, **kwargs):
a95a7133 1102 """LoadFile(self, String name, int type) -> bool"""
54f9ee45 1103 return _gdi_.Icon_LoadFile(*args, **kwargs)
e811c8ce
RD
1104
1105 def Ok(*args, **kwargs):
a95a7133 1106 """Ok(self) -> bool"""
54f9ee45 1107 return _gdi_.Icon_Ok(*args, **kwargs)
e811c8ce
RD
1108
1109 def GetWidth(*args, **kwargs):
a95a7133 1110 """GetWidth(self) -> int"""
54f9ee45 1111 return _gdi_.Icon_GetWidth(*args, **kwargs)
e811c8ce
RD
1112
1113 def GetHeight(*args, **kwargs):
a95a7133 1114 """GetHeight(self) -> int"""
54f9ee45 1115 return _gdi_.Icon_GetHeight(*args, **kwargs)
e811c8ce
RD
1116
1117 def GetDepth(*args, **kwargs):
a95a7133 1118 """GetDepth(self) -> int"""
54f9ee45 1119 return _gdi_.Icon_GetDepth(*args, **kwargs)
e811c8ce
RD
1120
1121 def SetWidth(*args, **kwargs):
a95a7133 1122 """SetWidth(self, int w)"""
54f9ee45 1123 return _gdi_.Icon_SetWidth(*args, **kwargs)
e811c8ce
RD
1124
1125 def SetHeight(*args, **kwargs):
a95a7133 1126 """SetHeight(self, int h)"""
54f9ee45 1127 return _gdi_.Icon_SetHeight(*args, **kwargs)
e811c8ce
RD
1128
1129 def SetDepth(*args, **kwargs):
a95a7133 1130 """SetDepth(self, int d)"""
54f9ee45 1131 return _gdi_.Icon_SetDepth(*args, **kwargs)
e811c8ce
RD
1132
1133 def CopyFromBitmap(*args, **kwargs):
a95a7133 1134 """CopyFromBitmap(self, Bitmap bmp)"""
54f9ee45 1135 return _gdi_.Icon_CopyFromBitmap(*args, **kwargs)
e811c8ce 1136
d14a1e28 1137 def __nonzero__(self): return self.Ok()
2131d850 1138_gdi_.Icon_swigregister(Icon)
059a841c 1139
d14a1e28 1140def EmptyIcon(*args, **kwargs):
e811c8ce 1141 """EmptyIcon() -> Icon"""
54f9ee45 1142 val = _gdi_.new_EmptyIcon(*args, **kwargs)
d14a1e28 1143 return val
059a841c 1144
d14a1e28 1145def IconFromLocation(*args, **kwargs):
e811c8ce 1146 """IconFromLocation(IconLocation loc) -> Icon"""
54f9ee45 1147 val = _gdi_.new_IconFromLocation(*args, **kwargs)
a323d3bd 1148 return val
059a841c 1149
d14a1e28 1150def IconFromBitmap(*args, **kwargs):
e811c8ce 1151 """IconFromBitmap(Bitmap bmp) -> Icon"""
54f9ee45 1152 val = _gdi_.new_IconFromBitmap(*args, **kwargs)
a323d3bd 1153 return val
059a841c 1154
d14a1e28 1155def IconFromXPMData(*args, **kwargs):
e811c8ce 1156 """IconFromXPMData(PyObject listOfStrings) -> Icon"""
54f9ee45 1157 val = _gdi_.new_IconFromXPMData(*args, **kwargs)
d14a1e28 1158 return val
059a841c 1159
d14a1e28 1160class IconLocation(object):
093d3ff1 1161 """Proxy of C++ IconLocation class"""
0085ce49
RD
1162 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1163 __repr__ = _swig_repr
1164 def __init__(self, *args, **kwargs):
a95a7133 1165 """__init__(self, String filename=&wxPyEmptyString, int num=0) -> IconLocation"""
0085ce49
RD
1166 _gdi_.IconLocation_swiginit(self,_gdi_.new_IconLocation(*args, **kwargs))
1167 __swig_destroy__ = _gdi_.delete_IconLocation
1168 __del__ = lambda self : None;
e811c8ce 1169 def IsOk(*args, **kwargs):
a95a7133 1170 """IsOk(self) -> bool"""
54f9ee45 1171 return _gdi_.IconLocation_IsOk(*args, **kwargs)
e811c8ce 1172
d14a1e28 1173 def __nonzero__(self): return self.Ok()
e811c8ce 1174 def SetFileName(*args, **kwargs):
a95a7133 1175 """SetFileName(self, String filename)"""
54f9ee45 1176 return _gdi_.IconLocation_SetFileName(*args, **kwargs)
e811c8ce
RD
1177
1178 def GetFileName(*args, **kwargs):
a95a7133 1179 """GetFileName(self) -> String"""
54f9ee45 1180 return _gdi_.IconLocation_GetFileName(*args, **kwargs)
e811c8ce
RD
1181
1182 def SetIndex(*args, **kwargs):
a95a7133 1183 """SetIndex(self, int num)"""
54f9ee45 1184 return _gdi_.IconLocation_SetIndex(*args, **kwargs)
e811c8ce
RD
1185
1186 def GetIndex(*args, **kwargs):
a95a7133 1187 """GetIndex(self) -> int"""
54f9ee45 1188 return _gdi_.IconLocation_GetIndex(*args, **kwargs)
e811c8ce 1189
2131d850 1190_gdi_.IconLocation_swigregister(IconLocation)
d14a1e28
RD
1191
1192class IconBundle(object):
093d3ff1 1193 """Proxy of C++ IconBundle class"""
0085ce49
RD
1194 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1195 __repr__ = _swig_repr
1196 def __init__(self, *args, **kwargs):
a95a7133 1197 """__init__(self) -> IconBundle"""
0085ce49
RD
1198 _gdi_.IconBundle_swiginit(self,_gdi_.new_IconBundle(*args, **kwargs))
1199 __swig_destroy__ = _gdi_.delete_IconBundle
1200 __del__ = lambda self : None;
e811c8ce 1201 def AddIcon(*args, **kwargs):
a95a7133 1202 """AddIcon(self, Icon icon)"""
54f9ee45 1203 return _gdi_.IconBundle_AddIcon(*args, **kwargs)
e811c8ce
RD
1204
1205 def AddIconFromFile(*args, **kwargs):
a95a7133 1206 """AddIconFromFile(self, String file, long type)"""
54f9ee45 1207 return _gdi_.IconBundle_AddIconFromFile(*args, **kwargs)
e811c8ce
RD
1208
1209 def GetIcon(*args, **kwargs):
a95a7133 1210 """GetIcon(self, Size size) -> Icon"""
54f9ee45 1211 return _gdi_.IconBundle_GetIcon(*args, **kwargs)
e811c8ce 1212
2131d850 1213_gdi_.IconBundle_swigregister(IconBundle)
5e40f9dd 1214
d14a1e28 1215def IconBundleFromFile(*args, **kwargs):
196addbf 1216 """IconBundleFromFile(String file, long type) -> IconBundle"""
54f9ee45 1217 val = _gdi_.new_IconBundleFromFile(*args, **kwargs)
d14a1e28 1218 return val
5e40f9dd 1219
d14a1e28 1220def IconBundleFromIcon(*args, **kwargs):
e811c8ce 1221 """IconBundleFromIcon(Icon icon) -> IconBundle"""
54f9ee45 1222 val = _gdi_.new_IconBundleFromIcon(*args, **kwargs)
d14a1e28 1223 return val
5e40f9dd 1224
d14a1e28 1225class Cursor(GDIObject):
15afbcd0 1226 """
41e2b43e
RD
1227 A cursor is a small bitmap usually used for denoting where the mouse
1228 pointer is, with a picture that might indicate the interpretation of a
1229 mouse click.
15afbcd0
RD
1230
1231 A single cursor object may be used in many windows (any subwindow
41e2b43e
RD
1232 type). The wxWindows convention is to set the cursor for a window, as
1233 in X, rather than to set it globally as in MS Windows, although a
1234 global `wx.SetCursor` function is also available for use on MS Windows.
1235
15afbcd0 1236 """
0085ce49
RD
1237 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1238 __repr__ = _swig_repr
1239 def __init__(self, *args, **kwargs):
15afbcd0 1240 """
a95a7133 1241 __init__(self, String cursorName, long type, int hotSpotX=0, int hotSpotY=0) -> Cursor
15afbcd0
RD
1242
1243 Construct a Cursor from a file. Specify the type of file using
7557b9b5 1244 wx.BITAMP_TYPE* constants, and specify the hotspot if not using a .cur
41e2b43e 1245 file.
15afbcd0 1246 """
0085ce49
RD
1247 _gdi_.Cursor_swiginit(self,_gdi_.new_Cursor(*args, **kwargs))
1248 __swig_destroy__ = _gdi_.delete_Cursor
1249 __del__ = lambda self : None;
e811c8ce 1250 def Ok(*args, **kwargs):
a95a7133 1251 """Ok(self) -> bool"""
54f9ee45 1252 return _gdi_.Cursor_Ok(*args, **kwargs)
e811c8ce 1253
d14a1e28 1254 def __nonzero__(self): return self.Ok()
2131d850 1255_gdi_.Cursor_swigregister(Cursor)
70551f47 1256
d14a1e28 1257def StockCursor(*args, **kwargs):
15afbcd0
RD
1258 """
1259 StockCursor(int id) -> Cursor
1260
41e2b43e 1261 Create a cursor using one of the stock cursors. Note that not all
7557b9b5 1262 stock cursors are available on all platforms.
15afbcd0 1263 """
54f9ee45 1264 val = _gdi_.new_StockCursor(*args, **kwargs)
d14a1e28 1265 return val
70551f47 1266
d14a1e28 1267def CursorFromImage(*args, **kwargs):
0df68c9f 1268 """
15afbcd0
RD
1269 CursorFromImage(Image image) -> Cursor
1270
7557b9b5 1271 Constructs a cursor from a `wx.Image`. The mask (if any) will be used
53aa7709 1272 for setting the transparent portions of the cursor.
0df68c9f 1273 """
54f9ee45 1274 val = _gdi_.new_CursorFromImage(*args, **kwargs)
d14a1e28 1275 return val
70551f47 1276
d14a1e28
RD
1277#---------------------------------------------------------------------------
1278
54f9ee45
RD
1279OutRegion = _gdi_.OutRegion
1280PartRegion = _gdi_.PartRegion
1281InRegion = _gdi_.InRegion
d14a1e28 1282class Region(GDIObject):
093d3ff1 1283 """Proxy of C++ Region class"""
0085ce49
RD
1284 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1285 __repr__ = _swig_repr
1286 def __init__(self, *args, **kwargs):
a95a7133 1287 """__init__(self, int x=0, int y=0, int width=0, int height=0) -> Region"""
0085ce49
RD
1288 _gdi_.Region_swiginit(self,_gdi_.new_Region(*args, **kwargs))
1289 __swig_destroy__ = _gdi_.delete_Region
1290 __del__ = lambda self : None;
e811c8ce 1291 def Clear(*args, **kwargs):
a95a7133 1292 """Clear(self)"""
54f9ee45 1293 return _gdi_.Region_Clear(*args, **kwargs)
e811c8ce
RD
1294
1295 def Offset(*args, **kwargs):
a95a7133 1296 """Offset(self, int x, int y) -> bool"""
54f9ee45 1297 return _gdi_.Region_Offset(*args, **kwargs)
e811c8ce
RD
1298
1299 def Contains(*args, **kwargs):
a95a7133 1300 """Contains(self, int x, int y) -> int"""
54f9ee45 1301 return _gdi_.Region_Contains(*args, **kwargs)
e811c8ce
RD
1302
1303 def ContainsPoint(*args, **kwargs):
a95a7133 1304 """ContainsPoint(self, Point pt) -> int"""
54f9ee45 1305 return _gdi_.Region_ContainsPoint(*args, **kwargs)
e811c8ce
RD
1306
1307 def ContainsRect(*args, **kwargs):
a95a7133 1308 """ContainsRect(self, Rect rect) -> int"""
54f9ee45 1309 return _gdi_.Region_ContainsRect(*args, **kwargs)
e811c8ce
RD
1310
1311 def ContainsRectDim(*args, **kwargs):
a95a7133 1312 """ContainsRectDim(self, int x, int y, int w, int h) -> int"""
54f9ee45 1313 return _gdi_.Region_ContainsRectDim(*args, **kwargs)
e811c8ce
RD
1314
1315 def GetBox(*args, **kwargs):
a95a7133 1316 """GetBox(self) -> Rect"""
54f9ee45 1317 return _gdi_.Region_GetBox(*args, **kwargs)
e811c8ce
RD
1318
1319 def Intersect(*args, **kwargs):
a95a7133 1320 """Intersect(self, int x, int y, int width, int height) -> bool"""
54f9ee45 1321 return _gdi_.Region_Intersect(*args, **kwargs)
e811c8ce
RD
1322
1323 def IntersectRect(*args, **kwargs):
a95a7133 1324 """IntersectRect(self, Rect rect) -> bool"""
54f9ee45 1325 return _gdi_.Region_IntersectRect(*args, **kwargs)
e811c8ce
RD
1326
1327 def IntersectRegion(*args, **kwargs):
a95a7133 1328 """IntersectRegion(self, Region region) -> bool"""
54f9ee45 1329 return _gdi_.Region_IntersectRegion(*args, **kwargs)
e811c8ce
RD
1330
1331 def IsEmpty(*args, **kwargs):
a95a7133 1332 """IsEmpty(self) -> bool"""
54f9ee45 1333 return _gdi_.Region_IsEmpty(*args, **kwargs)
e811c8ce
RD
1334
1335 def Union(*args, **kwargs):
a95a7133 1336 """Union(self, int x, int y, int width, int height) -> bool"""
54f9ee45 1337 return _gdi_.Region_Union(*args, **kwargs)
e811c8ce
RD
1338
1339 def UnionRect(*args, **kwargs):
a95a7133 1340 """UnionRect(self, Rect rect) -> bool"""
54f9ee45 1341 return _gdi_.Region_UnionRect(*args, **kwargs)
e811c8ce
RD
1342
1343 def UnionRegion(*args, **kwargs):
a95a7133 1344 """UnionRegion(self, Region region) -> bool"""
54f9ee45 1345 return _gdi_.Region_UnionRegion(*args, **kwargs)
e811c8ce
RD
1346
1347 def Subtract(*args, **kwargs):
a95a7133 1348 """Subtract(self, int x, int y, int width, int height) -> bool"""
54f9ee45 1349 return _gdi_.Region_Subtract(*args, **kwargs)
e811c8ce
RD
1350
1351 def SubtractRect(*args, **kwargs):
a95a7133 1352 """SubtractRect(self, Rect rect) -> bool"""
54f9ee45 1353 return _gdi_.Region_SubtractRect(*args, **kwargs)
e811c8ce
RD
1354
1355 def SubtractRegion(*args, **kwargs):
a95a7133 1356 """SubtractRegion(self, Region region) -> bool"""
54f9ee45 1357 return _gdi_.Region_SubtractRegion(*args, **kwargs)
e811c8ce
RD
1358
1359 def Xor(*args, **kwargs):
a95a7133 1360 """Xor(self, int x, int y, int width, int height) -> bool"""
54f9ee45 1361 return _gdi_.Region_Xor(*args, **kwargs)
e811c8ce
RD
1362
1363 def XorRect(*args, **kwargs):
a95a7133 1364 """XorRect(self, Rect rect) -> bool"""
54f9ee45 1365 return _gdi_.Region_XorRect(*args, **kwargs)
e811c8ce
RD
1366
1367 def XorRegion(*args, **kwargs):
a95a7133 1368 """XorRegion(self, Region region) -> bool"""
54f9ee45 1369 return _gdi_.Region_XorRegion(*args, **kwargs)
e811c8ce
RD
1370
1371 def ConvertToBitmap(*args, **kwargs):
a95a7133 1372 """ConvertToBitmap(self) -> Bitmap"""
54f9ee45 1373 return _gdi_.Region_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
1374
1375 def UnionBitmap(*args, **kwargs):
e6ffcedd 1376 """UnionBitmap(self, Bitmap bmp) -> bool"""
54f9ee45 1377 return _gdi_.Region_UnionBitmap(*args, **kwargs)
e811c8ce 1378
e6ffcedd
RD
1379 def UnionBitmapColour(*args, **kwargs):
1380 """UnionBitmapColour(self, Bitmap bmp, Colour transColour, int tolerance=0) -> bool"""
1381 return _gdi_.Region_UnionBitmapColour(*args, **kwargs)
1382
2131d850 1383_gdi_.Region_swigregister(Region)
5e40f9dd 1384
d14a1e28 1385def RegionFromBitmap(*args, **kwargs):
e6ffcedd 1386 """RegionFromBitmap(Bitmap bmp) -> Region"""
54f9ee45 1387 val = _gdi_.new_RegionFromBitmap(*args, **kwargs)
d14a1e28 1388 return val
5e40f9dd 1389
e6ffcedd
RD
1390def RegionFromBitmapColour(*args, **kwargs):
1391 """RegionFromBitmapColour(Bitmap bmp, Colour transColour, int tolerance=0) -> Region"""
1392 val = _gdi_.new_RegionFromBitmapColour(*args, **kwargs)
e6ffcedd
RD
1393 return val
1394
d14a1e28 1395def RegionFromPoints(*args, **kwargs):
093d3ff1 1396 """RegionFromPoints(int points, int fillStyle=WINDING_RULE) -> Region"""
54f9ee45 1397 val = _gdi_.new_RegionFromPoints(*args, **kwargs)
d14a1e28 1398 return val
5e40f9dd 1399
54f9ee45 1400class RegionIterator(_core.Object):
093d3ff1 1401 """Proxy of C++ RegionIterator class"""
0085ce49
RD
1402 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1403 __repr__ = _swig_repr
1404 def __init__(self, *args, **kwargs):
a95a7133 1405 """__init__(self, Region region) -> RegionIterator"""
0085ce49
RD
1406 _gdi_.RegionIterator_swiginit(self,_gdi_.new_RegionIterator(*args, **kwargs))
1407 __swig_destroy__ = _gdi_.delete_RegionIterator
1408 __del__ = lambda self : None;
e811c8ce 1409 def GetX(*args, **kwargs):
a95a7133 1410 """GetX(self) -> int"""
54f9ee45 1411 return _gdi_.RegionIterator_GetX(*args, **kwargs)
e811c8ce
RD
1412
1413 def GetY(*args, **kwargs):
a95a7133 1414 """GetY(self) -> int"""
54f9ee45 1415 return _gdi_.RegionIterator_GetY(*args, **kwargs)
e811c8ce
RD
1416
1417 def GetW(*args, **kwargs):
a95a7133 1418 """GetW(self) -> int"""
54f9ee45 1419 return _gdi_.RegionIterator_GetW(*args, **kwargs)
e811c8ce
RD
1420
1421 def GetWidth(*args, **kwargs):
a95a7133 1422 """GetWidth(self) -> int"""
54f9ee45 1423 return _gdi_.RegionIterator_GetWidth(*args, **kwargs)
e811c8ce
RD
1424
1425 def GetH(*args, **kwargs):
a95a7133 1426 """GetH(self) -> int"""
54f9ee45 1427 return _gdi_.RegionIterator_GetH(*args, **kwargs)
e811c8ce
RD
1428
1429 def GetHeight(*args, **kwargs):
a95a7133 1430 """GetHeight(self) -> int"""
54f9ee45 1431 return _gdi_.RegionIterator_GetHeight(*args, **kwargs)
e811c8ce
RD
1432
1433 def GetRect(*args, **kwargs):
a95a7133 1434 """GetRect(self) -> Rect"""
54f9ee45 1435 return _gdi_.RegionIterator_GetRect(*args, **kwargs)
e811c8ce
RD
1436
1437 def HaveRects(*args, **kwargs):
a95a7133 1438 """HaveRects(self) -> bool"""
54f9ee45 1439 return _gdi_.RegionIterator_HaveRects(*args, **kwargs)
e811c8ce
RD
1440
1441 def Reset(*args, **kwargs):
a95a7133 1442 """Reset(self)"""
54f9ee45 1443 return _gdi_.RegionIterator_Reset(*args, **kwargs)
e811c8ce
RD
1444
1445 def Next(*args, **kwargs):
a95a7133 1446 """Next(self)"""
54f9ee45 1447 return _gdi_.RegionIterator_Next(*args, **kwargs)
e811c8ce
RD
1448
1449 def __nonzero__(*args, **kwargs):
a95a7133 1450 """__nonzero__(self) -> bool"""
54f9ee45 1451 return _gdi_.RegionIterator___nonzero__(*args, **kwargs)
e811c8ce 1452
2131d850 1453_gdi_.RegionIterator_swigregister(RegionIterator)
d14a1e28
RD
1454
1455#---------------------------------------------------------------------------
1456
54f9ee45
RD
1457FONTFAMILY_DEFAULT = _gdi_.FONTFAMILY_DEFAULT
1458FONTFAMILY_DECORATIVE = _gdi_.FONTFAMILY_DECORATIVE
1459FONTFAMILY_ROMAN = _gdi_.FONTFAMILY_ROMAN
1460FONTFAMILY_SCRIPT = _gdi_.FONTFAMILY_SCRIPT
1461FONTFAMILY_SWISS = _gdi_.FONTFAMILY_SWISS
1462FONTFAMILY_MODERN = _gdi_.FONTFAMILY_MODERN
1463FONTFAMILY_TELETYPE = _gdi_.FONTFAMILY_TELETYPE
1464FONTFAMILY_MAX = _gdi_.FONTFAMILY_MAX
1465FONTFAMILY_UNKNOWN = _gdi_.FONTFAMILY_UNKNOWN
1466FONTSTYLE_NORMAL = _gdi_.FONTSTYLE_NORMAL
1467FONTSTYLE_ITALIC = _gdi_.FONTSTYLE_ITALIC
1468FONTSTYLE_SLANT = _gdi_.FONTSTYLE_SLANT
1469FONTSTYLE_MAX = _gdi_.FONTSTYLE_MAX
1470FONTWEIGHT_NORMAL = _gdi_.FONTWEIGHT_NORMAL
1471FONTWEIGHT_LIGHT = _gdi_.FONTWEIGHT_LIGHT
1472FONTWEIGHT_BOLD = _gdi_.FONTWEIGHT_BOLD
1473FONTWEIGHT_MAX = _gdi_.FONTWEIGHT_MAX
1474FONTFLAG_DEFAULT = _gdi_.FONTFLAG_DEFAULT
1475FONTFLAG_ITALIC = _gdi_.FONTFLAG_ITALIC
1476FONTFLAG_SLANT = _gdi_.FONTFLAG_SLANT
1477FONTFLAG_LIGHT = _gdi_.FONTFLAG_LIGHT
1478FONTFLAG_BOLD = _gdi_.FONTFLAG_BOLD
1479FONTFLAG_ANTIALIASED = _gdi_.FONTFLAG_ANTIALIASED
1480FONTFLAG_NOT_ANTIALIASED = _gdi_.FONTFLAG_NOT_ANTIALIASED
1481FONTFLAG_UNDERLINED = _gdi_.FONTFLAG_UNDERLINED
1482FONTFLAG_STRIKETHROUGH = _gdi_.FONTFLAG_STRIKETHROUGH
1483FONTFLAG_MASK = _gdi_.FONTFLAG_MASK
1484FONTENCODING_SYSTEM = _gdi_.FONTENCODING_SYSTEM
1485FONTENCODING_DEFAULT = _gdi_.FONTENCODING_DEFAULT
1486FONTENCODING_ISO8859_1 = _gdi_.FONTENCODING_ISO8859_1
1487FONTENCODING_ISO8859_2 = _gdi_.FONTENCODING_ISO8859_2
1488FONTENCODING_ISO8859_3 = _gdi_.FONTENCODING_ISO8859_3
1489FONTENCODING_ISO8859_4 = _gdi_.FONTENCODING_ISO8859_4
1490FONTENCODING_ISO8859_5 = _gdi_.FONTENCODING_ISO8859_5
1491FONTENCODING_ISO8859_6 = _gdi_.FONTENCODING_ISO8859_6
1492FONTENCODING_ISO8859_7 = _gdi_.FONTENCODING_ISO8859_7
1493FONTENCODING_ISO8859_8 = _gdi_.FONTENCODING_ISO8859_8
1494FONTENCODING_ISO8859_9 = _gdi_.FONTENCODING_ISO8859_9
1495FONTENCODING_ISO8859_10 = _gdi_.FONTENCODING_ISO8859_10
1496FONTENCODING_ISO8859_11 = _gdi_.FONTENCODING_ISO8859_11
1497FONTENCODING_ISO8859_12 = _gdi_.FONTENCODING_ISO8859_12
1498FONTENCODING_ISO8859_13 = _gdi_.FONTENCODING_ISO8859_13
1499FONTENCODING_ISO8859_14 = _gdi_.FONTENCODING_ISO8859_14
1500FONTENCODING_ISO8859_15 = _gdi_.FONTENCODING_ISO8859_15
1501FONTENCODING_ISO8859_MAX = _gdi_.FONTENCODING_ISO8859_MAX
1502FONTENCODING_KOI8 = _gdi_.FONTENCODING_KOI8
1503FONTENCODING_KOI8_U = _gdi_.FONTENCODING_KOI8_U
1504FONTENCODING_ALTERNATIVE = _gdi_.FONTENCODING_ALTERNATIVE
1505FONTENCODING_BULGARIAN = _gdi_.FONTENCODING_BULGARIAN
1506FONTENCODING_CP437 = _gdi_.FONTENCODING_CP437
1507FONTENCODING_CP850 = _gdi_.FONTENCODING_CP850
1508FONTENCODING_CP852 = _gdi_.FONTENCODING_CP852
1509FONTENCODING_CP855 = _gdi_.FONTENCODING_CP855
1510FONTENCODING_CP866 = _gdi_.FONTENCODING_CP866
1511FONTENCODING_CP874 = _gdi_.FONTENCODING_CP874
1512FONTENCODING_CP932 = _gdi_.FONTENCODING_CP932
1513FONTENCODING_CP936 = _gdi_.FONTENCODING_CP936
1514FONTENCODING_CP949 = _gdi_.FONTENCODING_CP949
1515FONTENCODING_CP950 = _gdi_.FONTENCODING_CP950
1516FONTENCODING_CP1250 = _gdi_.FONTENCODING_CP1250
1517FONTENCODING_CP1251 = _gdi_.FONTENCODING_CP1251
1518FONTENCODING_CP1252 = _gdi_.FONTENCODING_CP1252
1519FONTENCODING_CP1253 = _gdi_.FONTENCODING_CP1253
1520FONTENCODING_CP1254 = _gdi_.FONTENCODING_CP1254
1521FONTENCODING_CP1255 = _gdi_.FONTENCODING_CP1255
1522FONTENCODING_CP1256 = _gdi_.FONTENCODING_CP1256
1523FONTENCODING_CP1257 = _gdi_.FONTENCODING_CP1257
1524FONTENCODING_CP12_MAX = _gdi_.FONTENCODING_CP12_MAX
1525FONTENCODING_UTF7 = _gdi_.FONTENCODING_UTF7
1526FONTENCODING_UTF8 = _gdi_.FONTENCODING_UTF8
1527FONTENCODING_EUC_JP = _gdi_.FONTENCODING_EUC_JP
1528FONTENCODING_UTF16BE = _gdi_.FONTENCODING_UTF16BE
1529FONTENCODING_UTF16LE = _gdi_.FONTENCODING_UTF16LE
1530FONTENCODING_UTF32BE = _gdi_.FONTENCODING_UTF32BE
1531FONTENCODING_UTF32LE = _gdi_.FONTENCODING_UTF32LE
1532FONTENCODING_MACROMAN = _gdi_.FONTENCODING_MACROMAN
1533FONTENCODING_MACJAPANESE = _gdi_.FONTENCODING_MACJAPANESE
1534FONTENCODING_MACCHINESETRAD = _gdi_.FONTENCODING_MACCHINESETRAD
1535FONTENCODING_MACKOREAN = _gdi_.FONTENCODING_MACKOREAN
1536FONTENCODING_MACARABIC = _gdi_.FONTENCODING_MACARABIC
1537FONTENCODING_MACHEBREW = _gdi_.FONTENCODING_MACHEBREW
1538FONTENCODING_MACGREEK = _gdi_.FONTENCODING_MACGREEK
1539FONTENCODING_MACCYRILLIC = _gdi_.FONTENCODING_MACCYRILLIC
1540FONTENCODING_MACDEVANAGARI = _gdi_.FONTENCODING_MACDEVANAGARI
1541FONTENCODING_MACGURMUKHI = _gdi_.FONTENCODING_MACGURMUKHI
1542FONTENCODING_MACGUJARATI = _gdi_.FONTENCODING_MACGUJARATI
1543FONTENCODING_MACORIYA = _gdi_.FONTENCODING_MACORIYA
1544FONTENCODING_MACBENGALI = _gdi_.FONTENCODING_MACBENGALI
1545FONTENCODING_MACTAMIL = _gdi_.FONTENCODING_MACTAMIL
1546FONTENCODING_MACTELUGU = _gdi_.FONTENCODING_MACTELUGU
1547FONTENCODING_MACKANNADA = _gdi_.FONTENCODING_MACKANNADA
1548FONTENCODING_MACMALAJALAM = _gdi_.FONTENCODING_MACMALAJALAM
1549FONTENCODING_MACSINHALESE = _gdi_.FONTENCODING_MACSINHALESE
1550FONTENCODING_MACBURMESE = _gdi_.FONTENCODING_MACBURMESE
1551FONTENCODING_MACKHMER = _gdi_.FONTENCODING_MACKHMER
1552FONTENCODING_MACTHAI = _gdi_.FONTENCODING_MACTHAI
1553FONTENCODING_MACLAOTIAN = _gdi_.FONTENCODING_MACLAOTIAN
1554FONTENCODING_MACGEORGIAN = _gdi_.FONTENCODING_MACGEORGIAN
1555FONTENCODING_MACARMENIAN = _gdi_.FONTENCODING_MACARMENIAN
1556FONTENCODING_MACCHINESESIMP = _gdi_.FONTENCODING_MACCHINESESIMP
1557FONTENCODING_MACTIBETAN = _gdi_.FONTENCODING_MACTIBETAN
1558FONTENCODING_MACMONGOLIAN = _gdi_.FONTENCODING_MACMONGOLIAN
1559FONTENCODING_MACETHIOPIC = _gdi_.FONTENCODING_MACETHIOPIC
1560FONTENCODING_MACCENTRALEUR = _gdi_.FONTENCODING_MACCENTRALEUR
1561FONTENCODING_MACVIATNAMESE = _gdi_.FONTENCODING_MACVIATNAMESE
1562FONTENCODING_MACARABICEXT = _gdi_.FONTENCODING_MACARABICEXT
1563FONTENCODING_MACSYMBOL = _gdi_.FONTENCODING_MACSYMBOL
1564FONTENCODING_MACDINGBATS = _gdi_.FONTENCODING_MACDINGBATS
1565FONTENCODING_MACTURKISH = _gdi_.FONTENCODING_MACTURKISH
1566FONTENCODING_MACCROATIAN = _gdi_.FONTENCODING_MACCROATIAN
1567FONTENCODING_MACICELANDIC = _gdi_.FONTENCODING_MACICELANDIC
1568FONTENCODING_MACROMANIAN = _gdi_.FONTENCODING_MACROMANIAN
1569FONTENCODING_MACCELTIC = _gdi_.FONTENCODING_MACCELTIC
1570FONTENCODING_MACGAELIC = _gdi_.FONTENCODING_MACGAELIC
1571FONTENCODING_MACKEYBOARD = _gdi_.FONTENCODING_MACKEYBOARD
1572FONTENCODING_MACMIN = _gdi_.FONTENCODING_MACMIN
1573FONTENCODING_MACMAX = _gdi_.FONTENCODING_MACMAX
1574FONTENCODING_MAX = _gdi_.FONTENCODING_MAX
1575FONTENCODING_UTF16 = _gdi_.FONTENCODING_UTF16
1576FONTENCODING_UTF32 = _gdi_.FONTENCODING_UTF32
1577FONTENCODING_UNICODE = _gdi_.FONTENCODING_UNICODE
1578FONTENCODING_GB2312 = _gdi_.FONTENCODING_GB2312
1579FONTENCODING_BIG5 = _gdi_.FONTENCODING_BIG5
1580FONTENCODING_SHIFT_JIS = _gdi_.FONTENCODING_SHIFT_JIS
d14a1e28
RD
1581#---------------------------------------------------------------------------
1582
1583class NativeFontInfo(object):
093d3ff1 1584 """Proxy of C++ NativeFontInfo class"""
0085ce49
RD
1585 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1586 __repr__ = _swig_repr
1587 def __init__(self, *args, **kwargs):
a95a7133 1588 """__init__(self) -> NativeFontInfo"""
0085ce49
RD
1589 _gdi_.NativeFontInfo_swiginit(self,_gdi_.new_NativeFontInfo(*args, **kwargs))
1590 __swig_destroy__ = _gdi_.delete_NativeFontInfo
1591 __del__ = lambda self : None;
e811c8ce 1592 def Init(*args, **kwargs):
a95a7133 1593 """Init(self)"""
54f9ee45 1594 return _gdi_.NativeFontInfo_Init(*args, **kwargs)
e811c8ce
RD
1595
1596 def InitFromFont(*args, **kwargs):
a95a7133 1597 """InitFromFont(self, Font font)"""
54f9ee45 1598 return _gdi_.NativeFontInfo_InitFromFont(*args, **kwargs)
e811c8ce
RD
1599
1600 def GetPointSize(*args, **kwargs):
a95a7133 1601 """GetPointSize(self) -> int"""
54f9ee45 1602 return _gdi_.NativeFontInfo_GetPointSize(*args, **kwargs)
e811c8ce
RD
1603
1604 def GetStyle(*args, **kwargs):
a95a7133 1605 """GetStyle(self) -> int"""
54f9ee45 1606 return _gdi_.NativeFontInfo_GetStyle(*args, **kwargs)
e811c8ce
RD
1607
1608 def GetWeight(*args, **kwargs):
a95a7133 1609 """GetWeight(self) -> int"""
54f9ee45 1610 return _gdi_.NativeFontInfo_GetWeight(*args, **kwargs)
e811c8ce
RD
1611
1612 def GetUnderlined(*args, **kwargs):
a95a7133 1613 """GetUnderlined(self) -> bool"""
54f9ee45 1614 return _gdi_.NativeFontInfo_GetUnderlined(*args, **kwargs)
e811c8ce
RD
1615
1616 def GetFaceName(*args, **kwargs):
a95a7133 1617 """GetFaceName(self) -> String"""
54f9ee45 1618 return _gdi_.NativeFontInfo_GetFaceName(*args, **kwargs)
e811c8ce
RD
1619
1620 def GetFamily(*args, **kwargs):
a95a7133 1621 """GetFamily(self) -> int"""
54f9ee45 1622 return _gdi_.NativeFontInfo_GetFamily(*args, **kwargs)
e811c8ce
RD
1623
1624 def GetEncoding(*args, **kwargs):
a95a7133 1625 """GetEncoding(self) -> int"""
54f9ee45 1626 return _gdi_.NativeFontInfo_GetEncoding(*args, **kwargs)
e811c8ce
RD
1627
1628 def SetPointSize(*args, **kwargs):
a95a7133 1629 """SetPointSize(self, int pointsize)"""
54f9ee45 1630 return _gdi_.NativeFontInfo_SetPointSize(*args, **kwargs)
e811c8ce
RD
1631
1632 def SetStyle(*args, **kwargs):
a95a7133 1633 """SetStyle(self, int style)"""
54f9ee45 1634 return _gdi_.NativeFontInfo_SetStyle(*args, **kwargs)
e811c8ce
RD
1635
1636 def SetWeight(*args, **kwargs):
a95a7133 1637 """SetWeight(self, int weight)"""
54f9ee45 1638 return _gdi_.NativeFontInfo_SetWeight(*args, **kwargs)
e811c8ce
RD
1639
1640 def SetUnderlined(*args, **kwargs):
a95a7133 1641 """SetUnderlined(self, bool underlined)"""
54f9ee45 1642 return _gdi_.NativeFontInfo_SetUnderlined(*args, **kwargs)
e811c8ce
RD
1643
1644 def SetFaceName(*args, **kwargs):
704eda0c 1645 """SetFaceName(self, String facename) -> bool"""
54f9ee45 1646 return _gdi_.NativeFontInfo_SetFaceName(*args, **kwargs)
e811c8ce
RD
1647
1648 def SetFamily(*args, **kwargs):
a95a7133 1649 """SetFamily(self, int family)"""
54f9ee45 1650 return _gdi_.NativeFontInfo_SetFamily(*args, **kwargs)
e811c8ce
RD
1651
1652 def SetEncoding(*args, **kwargs):
a95a7133 1653 """SetEncoding(self, int encoding)"""
54f9ee45 1654 return _gdi_.NativeFontInfo_SetEncoding(*args, **kwargs)
e811c8ce
RD
1655
1656 def FromString(*args, **kwargs):
a95a7133 1657 """FromString(self, String s) -> bool"""
54f9ee45 1658 return _gdi_.NativeFontInfo_FromString(*args, **kwargs)
e811c8ce
RD
1659
1660 def ToString(*args, **kwargs):
a95a7133 1661 """ToString(self) -> String"""
54f9ee45 1662 return _gdi_.NativeFontInfo_ToString(*args, **kwargs)
e811c8ce
RD
1663
1664 def __str__(*args, **kwargs):
a95a7133 1665 """__str__(self) -> String"""
54f9ee45 1666 return _gdi_.NativeFontInfo___str__(*args, **kwargs)
e811c8ce
RD
1667
1668 def FromUserString(*args, **kwargs):
a95a7133 1669 """FromUserString(self, String s) -> bool"""
54f9ee45 1670 return _gdi_.NativeFontInfo_FromUserString(*args, **kwargs)
e811c8ce
RD
1671
1672 def ToUserString(*args, **kwargs):
a95a7133 1673 """ToUserString(self) -> String"""
54f9ee45 1674 return _gdi_.NativeFontInfo_ToUserString(*args, **kwargs)
e811c8ce 1675
2131d850 1676_gdi_.NativeFontInfo_swigregister(NativeFontInfo)
d14a1e28
RD
1677
1678class NativeEncodingInfo(object):
093d3ff1 1679 """Proxy of C++ NativeEncodingInfo class"""
0085ce49
RD
1680 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1681 __repr__ = _swig_repr
54f9ee45
RD
1682 facename = property(_gdi_.NativeEncodingInfo_facename_get, _gdi_.NativeEncodingInfo_facename_set)
1683 encoding = property(_gdi_.NativeEncodingInfo_encoding_get, _gdi_.NativeEncodingInfo_encoding_set)
0085ce49 1684 def __init__(self, *args, **kwargs):
a95a7133 1685 """__init__(self) -> NativeEncodingInfo"""
0085ce49
RD
1686 _gdi_.NativeEncodingInfo_swiginit(self,_gdi_.new_NativeEncodingInfo(*args, **kwargs))
1687 __swig_destroy__ = _gdi_.delete_NativeEncodingInfo
1688 __del__ = lambda self : None;
e811c8ce 1689 def FromString(*args, **kwargs):
a95a7133 1690 """FromString(self, String s) -> bool"""
54f9ee45 1691 return _gdi_.NativeEncodingInfo_FromString(*args, **kwargs)
e811c8ce
RD
1692
1693 def ToString(*args, **kwargs):
a95a7133 1694 """ToString(self) -> String"""
54f9ee45 1695 return _gdi_.NativeEncodingInfo_ToString(*args, **kwargs)
e811c8ce 1696
2131d850 1697_gdi_.NativeEncodingInfo_swigregister(NativeEncodingInfo)
70551f47
RD
1698
1699
e811c8ce 1700def GetNativeFontEncoding(*args, **kwargs):
0085ce49
RD
1701 """GetNativeFontEncoding(int encoding) -> NativeEncodingInfo"""
1702 return _gdi_.GetNativeFontEncoding(*args, **kwargs)
70551f47 1703
e811c8ce 1704def TestFontEncoding(*args, **kwargs):
0085ce49
RD
1705 """TestFontEncoding(NativeEncodingInfo info) -> bool"""
1706 return _gdi_.TestFontEncoding(*args, **kwargs)
d14a1e28
RD
1707#---------------------------------------------------------------------------
1708
1709class FontMapper(object):
093d3ff1 1710 """Proxy of C++ FontMapper class"""
0085ce49
RD
1711 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1712 __repr__ = _swig_repr
1713 def __init__(self, *args, **kwargs):
a95a7133 1714 """__init__(self) -> FontMapper"""
0085ce49
RD
1715 _gdi_.FontMapper_swiginit(self,_gdi_.new_FontMapper(*args, **kwargs))
1716 __swig_destroy__ = _gdi_.delete_FontMapper
1717 __del__ = lambda self : None;
e811c8ce 1718 def Get(*args, **kwargs):
66c033b4 1719 """Get() -> FontMapper"""
54f9ee45 1720 return _gdi_.FontMapper_Get(*args, **kwargs)
e811c8ce
RD
1721
1722 Get = staticmethod(Get)
1723 def Set(*args, **kwargs):
66c033b4 1724 """Set(FontMapper mapper) -> FontMapper"""
54f9ee45 1725 return _gdi_.FontMapper_Set(*args, **kwargs)
e811c8ce
RD
1726
1727 Set = staticmethod(Set)
1728 def CharsetToEncoding(*args, **kwargs):
a95a7133 1729 """CharsetToEncoding(self, String charset, bool interactive=True) -> int"""
54f9ee45 1730 return _gdi_.FontMapper_CharsetToEncoding(*args, **kwargs)
e811c8ce
RD
1731
1732 def GetSupportedEncodingsCount(*args, **kwargs):
66c033b4 1733 """GetSupportedEncodingsCount() -> size_t"""
54f9ee45 1734 return _gdi_.FontMapper_GetSupportedEncodingsCount(*args, **kwargs)
e811c8ce
RD
1735
1736 GetSupportedEncodingsCount = staticmethod(GetSupportedEncodingsCount)
1737 def GetEncoding(*args, **kwargs):
66c033b4 1738 """GetEncoding(size_t n) -> int"""
54f9ee45 1739 return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
e811c8ce
RD
1740
1741 GetEncoding = staticmethod(GetEncoding)
1742 def GetEncodingName(*args, **kwargs):
66c033b4 1743 """GetEncodingName(int encoding) -> String"""
54f9ee45 1744 return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
e811c8ce
RD
1745
1746 GetEncodingName = staticmethod(GetEncodingName)
1747 def GetEncodingDescription(*args, **kwargs):
66c033b4 1748 """GetEncodingDescription(int encoding) -> String"""
54f9ee45 1749 return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
e811c8ce
RD
1750
1751 GetEncodingDescription = staticmethod(GetEncodingDescription)
b2df227b 1752 def GetEncodingFromName(*args, **kwargs):
66c033b4 1753 """GetEncodingFromName(String name) -> int"""
54f9ee45 1754 return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
b2df227b
RD
1755
1756 GetEncodingFromName = staticmethod(GetEncodingFromName)
e811c8ce 1757 def SetConfigPath(*args, **kwargs):
a95a7133 1758 """SetConfigPath(self, String prefix)"""
54f9ee45 1759 return _gdi_.FontMapper_SetConfigPath(*args, **kwargs)
e811c8ce
RD
1760
1761 def GetDefaultConfigPath(*args, **kwargs):
66c033b4 1762 """GetDefaultConfigPath() -> String"""
54f9ee45 1763 return _gdi_.FontMapper_GetDefaultConfigPath(*args, **kwargs)
e811c8ce
RD
1764
1765 GetDefaultConfigPath = staticmethod(GetDefaultConfigPath)
1766 def GetAltForEncoding(*args, **kwargs):
a95a7133 1767 """GetAltForEncoding(self, int encoding, String facename=EmptyString, bool interactive=True) -> PyObject"""
54f9ee45 1768 return _gdi_.FontMapper_GetAltForEncoding(*args, **kwargs)
e811c8ce
RD
1769
1770 def IsEncodingAvailable(*args, **kwargs):
a95a7133 1771 """IsEncodingAvailable(self, int encoding, String facename=EmptyString) -> bool"""
54f9ee45 1772 return _gdi_.FontMapper_IsEncodingAvailable(*args, **kwargs)
e811c8ce
RD
1773
1774 def SetDialogParent(*args, **kwargs):
a95a7133 1775 """SetDialogParent(self, Window parent)"""
54f9ee45 1776 return _gdi_.FontMapper_SetDialogParent(*args, **kwargs)
e811c8ce
RD
1777
1778 def SetDialogTitle(*args, **kwargs):
a95a7133 1779 """SetDialogTitle(self, String title)"""
54f9ee45 1780 return _gdi_.FontMapper_SetDialogTitle(*args, **kwargs)
e811c8ce 1781
2131d850 1782_gdi_.FontMapper_swigregister(FontMapper)
65191ae8 1783
0085ce49
RD
1784def FontMapper_Get(*args):
1785 """FontMapper_Get() -> FontMapper"""
1786 return _gdi_.FontMapper_Get(*args)
65191ae8 1787
e811c8ce 1788def FontMapper_Set(*args, **kwargs):
0085ce49
RD
1789 """FontMapper_Set(FontMapper mapper) -> FontMapper"""
1790 return _gdi_.FontMapper_Set(*args, **kwargs)
65191ae8 1791
0085ce49
RD
1792def FontMapper_GetSupportedEncodingsCount(*args):
1793 """FontMapper_GetSupportedEncodingsCount() -> size_t"""
1794 return _gdi_.FontMapper_GetSupportedEncodingsCount(*args)
d14a1e28 1795
e811c8ce 1796def FontMapper_GetEncoding(*args, **kwargs):
0085ce49
RD
1797 """FontMapper_GetEncoding(size_t n) -> int"""
1798 return _gdi_.FontMapper_GetEncoding(*args, **kwargs)
d14a1e28 1799
e811c8ce 1800def FontMapper_GetEncodingName(*args, **kwargs):
0085ce49
RD
1801 """FontMapper_GetEncodingName(int encoding) -> String"""
1802 return _gdi_.FontMapper_GetEncodingName(*args, **kwargs)
d14a1e28 1803
e811c8ce 1804def FontMapper_GetEncodingDescription(*args, **kwargs):
0085ce49
RD
1805 """FontMapper_GetEncodingDescription(int encoding) -> String"""
1806 return _gdi_.FontMapper_GetEncodingDescription(*args, **kwargs)
d14a1e28 1807
b2df227b 1808def FontMapper_GetEncodingFromName(*args, **kwargs):
0085ce49
RD
1809 """FontMapper_GetEncodingFromName(String name) -> int"""
1810 return _gdi_.FontMapper_GetEncodingFromName(*args, **kwargs)
b2df227b 1811
0085ce49
RD
1812def FontMapper_GetDefaultConfigPath(*args):
1813 """FontMapper_GetDefaultConfigPath() -> String"""
1814 return _gdi_.FontMapper_GetDefaultConfigPath(*args)
d14a1e28
RD
1815
1816#---------------------------------------------------------------------------
1817
1818class Font(GDIObject):
a97cefba
RD
1819 """
1820 A font is an object which determines the appearance of text. Fonts are
1821 used for drawing text to a device context, and setting the appearance
1822 of a window's text.
1823
1824 You can retrieve the current system font settings with `wx.SystemSettings`.
1825 """
0085ce49
RD
1826 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1827 __repr__ = _swig_repr
1828 def __init__(self, *args, **kwargs):
0df68c9f 1829 """
a95a7133 1830 __init__(self, int pointSize, int family, int style, int weight, bool underline=False,
196addbf
RD
1831 String face=EmptyString,
1832 int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
1833
1834 Creates a font object with the specified attributes.
1835
1836 :param pointSize: The size of the font in points.
1837
1838 :param family: Font family. A generic way of referring to fonts
1839 without specifying actual facename. It can be One of
1840 the ``wx.FONTFAMILY_xxx`` constants.
1841
1842 :param style: One of the ``wx.FONTSTYLE_xxx`` constants.
1843
1844 :param weight: Font weight, sometimes also referred to as font
1845 boldness. One of the ``wx.FONTWEIGHT_xxx`` constants.
1846
1847 :param underline: The value can be ``True`` or ``False`` and
1848 indicates whether the font will include an underline. This
1849 may not be supported on all platforms.
1850
1851 :param face: An optional string specifying the actual typeface to
1852 be used. If it is an empty string, a default typeface will be
1853 chosen based on the family.
1854
1855 :param encoding: An encoding which may be one of the
1856 ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't
1857 available, no font is created.
1858
1859 :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`,
1860 `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo`
1861
0df68c9f 1862 """
db3e571a 1863 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
0085ce49
RD
1864 _gdi_.Font_swiginit(self,_gdi_.new_Font(*args, **kwargs))
1865 __swig_destroy__ = _gdi_.delete_Font
1866 __del__ = lambda self : None;
e811c8ce 1867 def Ok(*args, **kwargs):
a97cefba
RD
1868 """
1869 Ok(self) -> bool
1870
1871 Returns ``True`` if this font was successfully created.
1872 """
54f9ee45 1873 return _gdi_.Font_Ok(*args, **kwargs)
e811c8ce 1874
d14a1e28 1875 def __nonzero__(self): return self.Ok()
e811c8ce 1876 def __eq__(*args, **kwargs):
a95a7133 1877 """__eq__(self, Font other) -> bool"""
54f9ee45 1878 return _gdi_.Font___eq__(*args, **kwargs)
e811c8ce
RD
1879
1880 def __ne__(*args, **kwargs):
a95a7133 1881 """__ne__(self, Font other) -> bool"""
54f9ee45 1882 return _gdi_.Font___ne__(*args, **kwargs)
e811c8ce
RD
1883
1884 def GetPointSize(*args, **kwargs):
a97cefba
RD
1885 """
1886 GetPointSize(self) -> int
1887
1888 Gets the point size.
1889 """
54f9ee45 1890 return _gdi_.Font_GetPointSize(*args, **kwargs)
e811c8ce 1891
b6294124 1892 def GetPixelSize(*args, **kwargs):
a97cefba
RD
1893 """
1894 GetPixelSize(self) -> Size
1895
1896 Returns the size in pixels if the font was constructed with a pixel
1897 size.
1898 """
b6294124
RD
1899 return _gdi_.Font_GetPixelSize(*args, **kwargs)
1900
1901 def IsUsingSizeInPixels(*args, **kwargs):
a97cefba
RD
1902 """
1903 IsUsingSizeInPixels(self) -> bool
1904
1905 Returns ``True`` if the font is using a pixelSize.
1906 """
b6294124
RD
1907 return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs)
1908
e811c8ce 1909 def GetFamily(*args, **kwargs):
a97cefba
RD
1910 """
1911 GetFamily(self) -> int
1912
1913 Gets the font family.
1914 """
54f9ee45 1915 return _gdi_.Font_GetFamily(*args, **kwargs)
e811c8ce
RD
1916
1917 def GetStyle(*args, **kwargs):
a97cefba
RD
1918 """
1919 GetStyle(self) -> int
1920
1921 Gets the font style.
1922 """
54f9ee45 1923 return _gdi_.Font_GetStyle(*args, **kwargs)
e811c8ce
RD
1924
1925 def GetWeight(*args, **kwargs):
a97cefba
RD
1926 """
1927 GetWeight(self) -> int
1928
1929 Gets the font weight.
1930 """
54f9ee45 1931 return _gdi_.Font_GetWeight(*args, **kwargs)
e811c8ce
RD
1932
1933 def GetUnderlined(*args, **kwargs):
a97cefba
RD
1934 """
1935 GetUnderlined(self) -> bool
1936
1937 Returns ``True`` if the font is underlined, ``False`` otherwise.
1938 """
54f9ee45 1939 return _gdi_.Font_GetUnderlined(*args, **kwargs)
e811c8ce
RD
1940
1941 def GetFaceName(*args, **kwargs):
a97cefba
RD
1942 """
1943 GetFaceName(self) -> String
1944
1945 Returns the typeface name associated with the font, or the empty
1946 string if there is no typeface information.
1947 """
54f9ee45 1948 return _gdi_.Font_GetFaceName(*args, **kwargs)
e811c8ce
RD
1949
1950 def GetEncoding(*args, **kwargs):
a97cefba
RD
1951 """
1952 GetEncoding(self) -> int
1953
1954 Get the font's encoding.
1955 """
54f9ee45 1956 return _gdi_.Font_GetEncoding(*args, **kwargs)
e811c8ce
RD
1957
1958 def GetNativeFontInfo(*args, **kwargs):
a97cefba
RD
1959 """
1960 GetNativeFontInfo(self) -> NativeFontInfo
1961
1962 Constructs a `wx.NativeFontInfo` object from this font.
1963 """
54f9ee45 1964 return _gdi_.Font_GetNativeFontInfo(*args, **kwargs)
e811c8ce
RD
1965
1966 def IsFixedWidth(*args, **kwargs):
a97cefba
RD
1967 """
1968 IsFixedWidth(self) -> bool
1969
1970 Returns true if the font is a fixed width (or monospaced) font, false
1971 if it is a proportional one or font is invalid.
1972 """
54f9ee45 1973 return _gdi_.Font_IsFixedWidth(*args, **kwargs)
e811c8ce
RD
1974
1975 def GetNativeFontInfoDesc(*args, **kwargs):
a97cefba
RD
1976 """
1977 GetNativeFontInfoDesc(self) -> String
1978
1979 Returns the platform-dependent string completely describing this font
1980 or an empty string if the font isn't valid.
1981 """
54f9ee45 1982 return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs)
e811c8ce
RD
1983
1984 def GetNativeFontInfoUserDesc(*args, **kwargs):
a97cefba
RD
1985 """
1986 GetNativeFontInfoUserDesc(self) -> String
1987
1988 Returns a human readable version of `GetNativeFontInfoDesc`.
1989 """
54f9ee45 1990 return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs)
e811c8ce
RD
1991
1992 def SetPointSize(*args, **kwargs):
a97cefba
RD
1993 """
1994 SetPointSize(self, int pointSize)
1995
1996 Sets the point size.
1997 """
54f9ee45 1998 return _gdi_.Font_SetPointSize(*args, **kwargs)
e811c8ce 1999
b6294124 2000 def SetPixelSize(*args, **kwargs):
a97cefba
RD
2001 """
2002 SetPixelSize(self, Size pixelSize)
2003
2004 Sets the size in pixels rather than points. If there is platform API
2005 support for this then it is used, otherwise a font with the closest
2006 size is found using a binary search.
2007 """
b6294124
RD
2008 return _gdi_.Font_SetPixelSize(*args, **kwargs)
2009
e811c8ce 2010 def SetFamily(*args, **kwargs):
a97cefba
RD
2011 """
2012 SetFamily(self, int family)
2013
2014 Sets the font family.
2015 """
54f9ee45 2016 return _gdi_.Font_SetFamily(*args, **kwargs)
e811c8ce
RD
2017
2018 def SetStyle(*args, **kwargs):
a97cefba
RD
2019 """
2020 SetStyle(self, int style)
2021
2022 Sets the font style.
2023 """
54f9ee45 2024 return _gdi_.Font_SetStyle(*args, **kwargs)
e811c8ce
RD
2025
2026 def SetWeight(*args, **kwargs):
a97cefba
RD
2027 """
2028 SetWeight(self, int weight)
2029
2030 Sets the font weight.
2031 """
54f9ee45 2032 return _gdi_.Font_SetWeight(*args, **kwargs)
e811c8ce
RD
2033
2034 def SetFaceName(*args, **kwargs):
a97cefba 2035 """
704eda0c 2036 SetFaceName(self, String faceName) -> bool
a97cefba
RD
2037
2038 Sets the facename for the font. The facename, which should be a valid
2039 font installed on the end-user's system.
2040
2041 To avoid portability problems, don't rely on a specific face, but
2042 specify the font family instead or as well. A suitable font will be
2043 found on the end-user's system. If both the family and the facename
2044 are specified, wxWidgets will first search for the specific face, and
2045 then for a font belonging to the same family.
2046 """
54f9ee45 2047 return _gdi_.Font_SetFaceName(*args, **kwargs)
e811c8ce
RD
2048
2049 def SetUnderlined(*args, **kwargs):
a97cefba
RD
2050 """
2051 SetUnderlined(self, bool underlined)
2052
2053 Sets underlining.
2054 """
54f9ee45 2055 return _gdi_.Font_SetUnderlined(*args, **kwargs)
e811c8ce
RD
2056
2057 def SetEncoding(*args, **kwargs):
a97cefba
RD
2058 """
2059 SetEncoding(self, int encoding)
2060
2061 Set the font encoding.
2062 """
54f9ee45 2063 return _gdi_.Font_SetEncoding(*args, **kwargs)
e811c8ce
RD
2064
2065 def SetNativeFontInfo(*args, **kwargs):
a97cefba
RD
2066 """
2067 SetNativeFontInfo(self, NativeFontInfo info)
2068
2069 Set the font's attributes from a `wx.NativeFontInfo` object.
2070 """
54f9ee45 2071 return _gdi_.Font_SetNativeFontInfo(*args, **kwargs)
e811c8ce
RD
2072
2073 def SetNativeFontInfoFromString(*args, **kwargs):
a97cefba 2074 """
704eda0c 2075 SetNativeFontInfoFromString(self, String info) -> bool
a97cefba
RD
2076
2077 Set the font's attributes from string representation of a
2078 `wx.NativeFontInfo` object.
2079 """
54f9ee45 2080 return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs)
e811c8ce
RD
2081
2082 def SetNativeFontInfoUserDesc(*args, **kwargs):
a97cefba 2083 """
704eda0c 2084 SetNativeFontInfoUserDesc(self, String info) -> bool
a97cefba
RD
2085
2086 Set the font's attributes from a string formerly returned from
2087 `GetNativeFontInfoDesc`.
2088 """
54f9ee45 2089 return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs)
e811c8ce
RD
2090
2091 def GetFamilyString(*args, **kwargs):
a97cefba
RD
2092 """
2093 GetFamilyString(self) -> String
2094
2095 Returns a string representation of the font family.
2096 """
54f9ee45 2097 return _gdi_.Font_GetFamilyString(*args, **kwargs)
e811c8ce
RD
2098
2099 def GetStyleString(*args, **kwargs):
a97cefba
RD
2100 """
2101 GetStyleString(self) -> String
2102
2103 Returns a string representation of the font style.
2104 """
54f9ee45 2105 return _gdi_.Font_GetStyleString(*args, **kwargs)
e811c8ce
RD
2106
2107 def GetWeightString(*args, **kwargs):
a97cefba
RD
2108 """
2109 GetWeightString(self) -> String
2110
2111 Return a string representation of the font weight.
2112 """
54f9ee45 2113 return _gdi_.Font_GetWeightString(*args, **kwargs)
e811c8ce
RD
2114
2115 def SetNoAntiAliasing(*args, **kwargs):
a95a7133 2116 """SetNoAntiAliasing(self, bool no=True)"""
54f9ee45 2117 return _gdi_.Font_SetNoAntiAliasing(*args, **kwargs)
e811c8ce
RD
2118
2119 def GetNoAntiAliasing(*args, **kwargs):
a95a7133 2120 """GetNoAntiAliasing(self) -> bool"""
54f9ee45 2121 return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs)
e811c8ce
RD
2122
2123 def GetDefaultEncoding(*args, **kwargs):
a97cefba
RD
2124 """
2125 GetDefaultEncoding() -> int
2126
2127 Returns the encoding used for all fonts created with an encoding of
2128 ``wx.FONTENCODING_DEFAULT``.
2129 """
54f9ee45 2130 return _gdi_.Font_GetDefaultEncoding(*args, **kwargs)
e811c8ce
RD
2131
2132 GetDefaultEncoding = staticmethod(GetDefaultEncoding)
2133 def SetDefaultEncoding(*args, **kwargs):
a97cefba
RD
2134 """
2135 SetDefaultEncoding(int encoding)
2136
2137 Sets the default font encoding.
2138 """
54f9ee45 2139 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
e811c8ce
RD
2140
2141 SetDefaultEncoding = staticmethod(SetDefaultEncoding)
2131d850 2142_gdi_.Font_swigregister(Font)
5e40f9dd 2143
d14a1e28 2144def FontFromNativeInfo(*args, **kwargs):
a97cefba
RD
2145 """
2146 FontFromNativeInfo(NativeFontInfo info) -> Font
2147
2148 Construct a `wx.Font` from a `wx.NativeFontInfo` object.
2149 """
db3e571a 2150 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
54f9ee45 2151 val = _gdi_.new_FontFromNativeInfo(*args, **kwargs)
d14a1e28 2152 return val
5e40f9dd 2153
d14a1e28 2154def FontFromNativeInfoString(*args, **kwargs):
a97cefba
RD
2155 """
2156 FontFromNativeInfoString(String info) -> Font
2157
2158 Construct a `wx.Font` from the string representation of a
2159 `wx.NativeFontInfo` object.
2160 """
db3e571a 2161 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
54f9ee45 2162 val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs)
d14a1e28 2163 return val
5e40f9dd 2164
73c8ef6a 2165def FFont(*args, **kwargs):
0df68c9f 2166 """
73c8ef6a 2167 FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT,
196addbf 2168 String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
2169
2170 A bit of a simpler way to create a `wx.Font` using flags instead of
2171 individual attribute settings. The value of flags can be a
2172 combination of the following:
2173
2174 ============================ ==
2175 wx.FONTFLAG_DEFAULT
2176 wx.FONTFLAG_ITALIC
2177 wx.FONTFLAG_SLANT
2178 wx.FONTFLAG_LIGHT
2179 wx.FONTFLAG_BOLD
2180 wx.FONTFLAG_ANTIALIASED
2181 wx.FONTFLAG_NOT_ANTIALIASED
2182 wx.FONTFLAG_UNDERLINED
2183 wx.FONTFLAG_STRIKETHROUGH
2184 ============================ ==
2185
2186 :see: `wx.Font.__init__`
0df68c9f 2187 """
db3e571a 2188 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
73c8ef6a 2189 val = _gdi_.new_FFont(*args, **kwargs)
d14a1e28 2190 return val
5e40f9dd 2191
b6294124
RD
2192def FontFromPixelSize(*args, **kwargs):
2193 """
2194 FontFromPixelSize(Size pixelSize, int family, int style, int weight,
2195 bool underlined=False, String face=wxEmptyString,
2196 int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
2197
2198 Creates a font using a size in pixels rather than points. If there is
2199 platform API support for this then it is used, otherwise a font with
2200 the closest size is found using a binary search.
2201
2202 :see: `wx.Font.__init__`
b6294124
RD
2203 """
2204 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2205 val = _gdi_.new_FontFromPixelSize(*args, **kwargs)
b6294124
RD
2206 return val
2207
73c8ef6a
RD
2208def FFontFromPixelSize(*args, **kwargs):
2209 """
2210 FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT,
2211 String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font
a97cefba
RD
2212
2213 Creates a font using a size in pixels rather than points. If there is
2214 platform API support for this then it is used, otherwise a font with
2215 the closest size is found using a binary search.
2216
2217 :see: `wx.Font.__init__`, `wx.FFont`
73c8ef6a
RD
2218 """
2219 if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']
2220 val = _gdi_.new_FFontFromPixelSize(*args, **kwargs)
73c8ef6a
RD
2221 return val
2222
0085ce49
RD
2223def Font_GetDefaultEncoding(*args):
2224 """
a97cefba
RD
2225 Font_GetDefaultEncoding() -> int
2226
2227 Returns the encoding used for all fonts created with an encoding of
2228 ``wx.FONTENCODING_DEFAULT``.
2229 """
0085ce49 2230 return _gdi_.Font_GetDefaultEncoding(*args)
70551f47 2231
e811c8ce 2232def Font_SetDefaultEncoding(*args, **kwargs):
0085ce49 2233 """
a97cefba
RD
2234 Font_SetDefaultEncoding(int encoding)
2235
2236 Sets the default font encoding.
2237 """
0085ce49 2238 return _gdi_.Font_SetDefaultEncoding(*args, **kwargs)
70551f47 2239
a97cefba 2240Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.")
d14a1e28 2241#---------------------------------------------------------------------------
70551f47 2242
d14a1e28 2243class FontEnumerator(object):
093d3ff1 2244 """Proxy of C++ FontEnumerator class"""
0085ce49
RD
2245 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2246 __repr__ = _swig_repr
2247 def __init__(self, *args, **kwargs):
a95a7133 2248 """__init__(self) -> FontEnumerator"""
0085ce49 2249 _gdi_.FontEnumerator_swiginit(self,_gdi_.new_FontEnumerator(*args, **kwargs))
d14a1e28 2250 self._setCallbackInfo(self, FontEnumerator, 0)
e811c8ce 2251
0085ce49
RD
2252 __swig_destroy__ = _gdi_.delete_FontEnumerator
2253 __del__ = lambda self : None;
e811c8ce 2254 def _setCallbackInfo(*args, **kwargs):
a95a7133 2255 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
54f9ee45 2256 return _gdi_.FontEnumerator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
2257
2258 def EnumerateFacenames(*args, **kwargs):
a95a7133 2259 """EnumerateFacenames(self, int encoding=FONTENCODING_SYSTEM, bool fixedWidthOnly=False) -> bool"""
54f9ee45 2260 return _gdi_.FontEnumerator_EnumerateFacenames(*args, **kwargs)
e811c8ce
RD
2261
2262 def EnumerateEncodings(*args, **kwargs):
a95a7133 2263 """EnumerateEncodings(self, String facename=EmptyString) -> bool"""
54f9ee45 2264 return _gdi_.FontEnumerator_EnumerateEncodings(*args, **kwargs)
e811c8ce
RD
2265
2266 def GetEncodings(*args, **kwargs):
704eda0c 2267 """GetEncodings() -> PyObject"""
54f9ee45 2268 return _gdi_.FontEnumerator_GetEncodings(*args, **kwargs)
e811c8ce 2269
704eda0c 2270 GetEncodings = staticmethod(GetEncodings)
e811c8ce 2271 def GetFacenames(*args, **kwargs):
704eda0c 2272 """GetFacenames() -> PyObject"""
54f9ee45 2273 return _gdi_.FontEnumerator_GetFacenames(*args, **kwargs)
e811c8ce 2274
704eda0c
RD
2275 GetFacenames = staticmethod(GetFacenames)
2276 def IsValidFacename(*args, **kwargs):
2277 """
2278 IsValidFacename(String str) -> bool
2279
2280 Convenience function that returns true if the given face name exist in
2281 the user's system
2282 """
2283 return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2284
2285 IsValidFacename = staticmethod(IsValidFacename)
2131d850 2286_gdi_.FontEnumerator_swigregister(FontEnumerator)
d14a1e28 2287
704eda0c
RD
2288def FontEnumerator_GetEncodings(*args):
2289 """FontEnumerator_GetEncodings() -> PyObject"""
2290 return _gdi_.FontEnumerator_GetEncodings(*args)
2291
2292def FontEnumerator_GetFacenames(*args):
2293 """FontEnumerator_GetFacenames() -> PyObject"""
2294 return _gdi_.FontEnumerator_GetFacenames(*args)
2295
2296def FontEnumerator_IsValidFacename(*args, **kwargs):
2297 """
2298 FontEnumerator_IsValidFacename(String str) -> bool
2299
2300 Convenience function that returns true if the given face name exist in
2301 the user's system
2302 """
2303 return _gdi_.FontEnumerator_IsValidFacename(*args, **kwargs)
2304
d14a1e28
RD
2305#---------------------------------------------------------------------------
2306
54f9ee45
RD
2307LANGUAGE_DEFAULT = _gdi_.LANGUAGE_DEFAULT
2308LANGUAGE_UNKNOWN = _gdi_.LANGUAGE_UNKNOWN
2309LANGUAGE_ABKHAZIAN = _gdi_.LANGUAGE_ABKHAZIAN
2310LANGUAGE_AFAR = _gdi_.LANGUAGE_AFAR
2311LANGUAGE_AFRIKAANS = _gdi_.LANGUAGE_AFRIKAANS
2312LANGUAGE_ALBANIAN = _gdi_.LANGUAGE_ALBANIAN
2313LANGUAGE_AMHARIC = _gdi_.LANGUAGE_AMHARIC
2314LANGUAGE_ARABIC = _gdi_.LANGUAGE_ARABIC
2315LANGUAGE_ARABIC_ALGERIA = _gdi_.LANGUAGE_ARABIC_ALGERIA
2316LANGUAGE_ARABIC_BAHRAIN = _gdi_.LANGUAGE_ARABIC_BAHRAIN
2317LANGUAGE_ARABIC_EGYPT = _gdi_.LANGUAGE_ARABIC_EGYPT
2318LANGUAGE_ARABIC_IRAQ = _gdi_.LANGUAGE_ARABIC_IRAQ
2319LANGUAGE_ARABIC_JORDAN = _gdi_.LANGUAGE_ARABIC_JORDAN
2320LANGUAGE_ARABIC_KUWAIT = _gdi_.LANGUAGE_ARABIC_KUWAIT
2321LANGUAGE_ARABIC_LEBANON = _gdi_.LANGUAGE_ARABIC_LEBANON
2322LANGUAGE_ARABIC_LIBYA = _gdi_.LANGUAGE_ARABIC_LIBYA
2323LANGUAGE_ARABIC_MOROCCO = _gdi_.LANGUAGE_ARABIC_MOROCCO
2324LANGUAGE_ARABIC_OMAN = _gdi_.LANGUAGE_ARABIC_OMAN
2325LANGUAGE_ARABIC_QATAR = _gdi_.LANGUAGE_ARABIC_QATAR
2326LANGUAGE_ARABIC_SAUDI_ARABIA = _gdi_.LANGUAGE_ARABIC_SAUDI_ARABIA
2327LANGUAGE_ARABIC_SUDAN = _gdi_.LANGUAGE_ARABIC_SUDAN
2328LANGUAGE_ARABIC_SYRIA = _gdi_.LANGUAGE_ARABIC_SYRIA
2329LANGUAGE_ARABIC_TUNISIA = _gdi_.LANGUAGE_ARABIC_TUNISIA
2330LANGUAGE_ARABIC_UAE = _gdi_.LANGUAGE_ARABIC_UAE
2331LANGUAGE_ARABIC_YEMEN = _gdi_.LANGUAGE_ARABIC_YEMEN
2332LANGUAGE_ARMENIAN = _gdi_.LANGUAGE_ARMENIAN
2333LANGUAGE_ASSAMESE = _gdi_.LANGUAGE_ASSAMESE
2334LANGUAGE_AYMARA = _gdi_.LANGUAGE_AYMARA
2335LANGUAGE_AZERI = _gdi_.LANGUAGE_AZERI
2336LANGUAGE_AZERI_CYRILLIC = _gdi_.LANGUAGE_AZERI_CYRILLIC
2337LANGUAGE_AZERI_LATIN = _gdi_.LANGUAGE_AZERI_LATIN
2338LANGUAGE_BASHKIR = _gdi_.LANGUAGE_BASHKIR
2339LANGUAGE_BASQUE = _gdi_.LANGUAGE_BASQUE
2340LANGUAGE_BELARUSIAN = _gdi_.LANGUAGE_BELARUSIAN
2341LANGUAGE_BENGALI = _gdi_.LANGUAGE_BENGALI
2342LANGUAGE_BHUTANI = _gdi_.LANGUAGE_BHUTANI
2343LANGUAGE_BIHARI = _gdi_.LANGUAGE_BIHARI
2344LANGUAGE_BISLAMA = _gdi_.LANGUAGE_BISLAMA
2345LANGUAGE_BRETON = _gdi_.LANGUAGE_BRETON
2346LANGUAGE_BULGARIAN = _gdi_.LANGUAGE_BULGARIAN
2347LANGUAGE_BURMESE = _gdi_.LANGUAGE_BURMESE
2348LANGUAGE_CAMBODIAN = _gdi_.LANGUAGE_CAMBODIAN
2349LANGUAGE_CATALAN = _gdi_.LANGUAGE_CATALAN
2350LANGUAGE_CHINESE = _gdi_.LANGUAGE_CHINESE
2351LANGUAGE_CHINESE_SIMPLIFIED = _gdi_.LANGUAGE_CHINESE_SIMPLIFIED
2352LANGUAGE_CHINESE_TRADITIONAL = _gdi_.LANGUAGE_CHINESE_TRADITIONAL
2353LANGUAGE_CHINESE_HONGKONG = _gdi_.LANGUAGE_CHINESE_HONGKONG
2354LANGUAGE_CHINESE_MACAU = _gdi_.LANGUAGE_CHINESE_MACAU
2355LANGUAGE_CHINESE_SINGAPORE = _gdi_.LANGUAGE_CHINESE_SINGAPORE
2356LANGUAGE_CHINESE_TAIWAN = _gdi_.LANGUAGE_CHINESE_TAIWAN
2357LANGUAGE_CORSICAN = _gdi_.LANGUAGE_CORSICAN
2358LANGUAGE_CROATIAN = _gdi_.LANGUAGE_CROATIAN
2359LANGUAGE_CZECH = _gdi_.LANGUAGE_CZECH
2360LANGUAGE_DANISH = _gdi_.LANGUAGE_DANISH
2361LANGUAGE_DUTCH = _gdi_.LANGUAGE_DUTCH
2362LANGUAGE_DUTCH_BELGIAN = _gdi_.LANGUAGE_DUTCH_BELGIAN
2363LANGUAGE_ENGLISH = _gdi_.LANGUAGE_ENGLISH
2364LANGUAGE_ENGLISH_UK = _gdi_.LANGUAGE_ENGLISH_UK
2365LANGUAGE_ENGLISH_US = _gdi_.LANGUAGE_ENGLISH_US
2366LANGUAGE_ENGLISH_AUSTRALIA = _gdi_.LANGUAGE_ENGLISH_AUSTRALIA
2367LANGUAGE_ENGLISH_BELIZE = _gdi_.LANGUAGE_ENGLISH_BELIZE
2368LANGUAGE_ENGLISH_BOTSWANA = _gdi_.LANGUAGE_ENGLISH_BOTSWANA
2369LANGUAGE_ENGLISH_CANADA = _gdi_.LANGUAGE_ENGLISH_CANADA
2370LANGUAGE_ENGLISH_CARIBBEAN = _gdi_.LANGUAGE_ENGLISH_CARIBBEAN
2371LANGUAGE_ENGLISH_DENMARK = _gdi_.LANGUAGE_ENGLISH_DENMARK
2372LANGUAGE_ENGLISH_EIRE = _gdi_.LANGUAGE_ENGLISH_EIRE
2373LANGUAGE_ENGLISH_JAMAICA = _gdi_.LANGUAGE_ENGLISH_JAMAICA
2374LANGUAGE_ENGLISH_NEW_ZEALAND = _gdi_.LANGUAGE_ENGLISH_NEW_ZEALAND
2375LANGUAGE_ENGLISH_PHILIPPINES = _gdi_.LANGUAGE_ENGLISH_PHILIPPINES
2376LANGUAGE_ENGLISH_SOUTH_AFRICA = _gdi_.LANGUAGE_ENGLISH_SOUTH_AFRICA
2377LANGUAGE_ENGLISH_TRINIDAD = _gdi_.LANGUAGE_ENGLISH_TRINIDAD
2378LANGUAGE_ENGLISH_ZIMBABWE = _gdi_.LANGUAGE_ENGLISH_ZIMBABWE
2379LANGUAGE_ESPERANTO = _gdi_.LANGUAGE_ESPERANTO
2380LANGUAGE_ESTONIAN = _gdi_.LANGUAGE_ESTONIAN
2381LANGUAGE_FAEROESE = _gdi_.LANGUAGE_FAEROESE
2382LANGUAGE_FARSI = _gdi_.LANGUAGE_FARSI
2383LANGUAGE_FIJI = _gdi_.LANGUAGE_FIJI
2384LANGUAGE_FINNISH = _gdi_.LANGUAGE_FINNISH
2385LANGUAGE_FRENCH = _gdi_.LANGUAGE_FRENCH
2386LANGUAGE_FRENCH_BELGIAN = _gdi_.LANGUAGE_FRENCH_BELGIAN
2387LANGUAGE_FRENCH_CANADIAN = _gdi_.LANGUAGE_FRENCH_CANADIAN
2388LANGUAGE_FRENCH_LUXEMBOURG = _gdi_.LANGUAGE_FRENCH_LUXEMBOURG
2389LANGUAGE_FRENCH_MONACO = _gdi_.LANGUAGE_FRENCH_MONACO
2390LANGUAGE_FRENCH_SWISS = _gdi_.LANGUAGE_FRENCH_SWISS
2391LANGUAGE_FRISIAN = _gdi_.LANGUAGE_FRISIAN
2392LANGUAGE_GALICIAN = _gdi_.LANGUAGE_GALICIAN
2393LANGUAGE_GEORGIAN = _gdi_.LANGUAGE_GEORGIAN
2394LANGUAGE_GERMAN = _gdi_.LANGUAGE_GERMAN
2395LANGUAGE_GERMAN_AUSTRIAN = _gdi_.LANGUAGE_GERMAN_AUSTRIAN
2396LANGUAGE_GERMAN_BELGIUM = _gdi_.LANGUAGE_GERMAN_BELGIUM
2397LANGUAGE_GERMAN_LIECHTENSTEIN = _gdi_.LANGUAGE_GERMAN_LIECHTENSTEIN
2398LANGUAGE_GERMAN_LUXEMBOURG = _gdi_.LANGUAGE_GERMAN_LUXEMBOURG
2399LANGUAGE_GERMAN_SWISS = _gdi_.LANGUAGE_GERMAN_SWISS
2400LANGUAGE_GREEK = _gdi_.LANGUAGE_GREEK
2401LANGUAGE_GREENLANDIC = _gdi_.LANGUAGE_GREENLANDIC
2402LANGUAGE_GUARANI = _gdi_.LANGUAGE_GUARANI
2403LANGUAGE_GUJARATI = _gdi_.LANGUAGE_GUJARATI
2404LANGUAGE_HAUSA = _gdi_.LANGUAGE_HAUSA
2405LANGUAGE_HEBREW = _gdi_.LANGUAGE_HEBREW
2406LANGUAGE_HINDI = _gdi_.LANGUAGE_HINDI
2407LANGUAGE_HUNGARIAN = _gdi_.LANGUAGE_HUNGARIAN
2408LANGUAGE_ICELANDIC = _gdi_.LANGUAGE_ICELANDIC
2409LANGUAGE_INDONESIAN = _gdi_.LANGUAGE_INDONESIAN
2410LANGUAGE_INTERLINGUA = _gdi_.LANGUAGE_INTERLINGUA
2411LANGUAGE_INTERLINGUE = _gdi_.LANGUAGE_INTERLINGUE
2412LANGUAGE_INUKTITUT = _gdi_.LANGUAGE_INUKTITUT
2413LANGUAGE_INUPIAK = _gdi_.LANGUAGE_INUPIAK
2414LANGUAGE_IRISH = _gdi_.LANGUAGE_IRISH
2415LANGUAGE_ITALIAN = _gdi_.LANGUAGE_ITALIAN
2416LANGUAGE_ITALIAN_SWISS = _gdi_.LANGUAGE_ITALIAN_SWISS
2417LANGUAGE_JAPANESE = _gdi_.LANGUAGE_JAPANESE
2418LANGUAGE_JAVANESE = _gdi_.LANGUAGE_JAVANESE
2419LANGUAGE_KANNADA = _gdi_.LANGUAGE_KANNADA
2420LANGUAGE_KASHMIRI = _gdi_.LANGUAGE_KASHMIRI
2421LANGUAGE_KASHMIRI_INDIA = _gdi_.LANGUAGE_KASHMIRI_INDIA
2422LANGUAGE_KAZAKH = _gdi_.LANGUAGE_KAZAKH
2423LANGUAGE_KERNEWEK = _gdi_.LANGUAGE_KERNEWEK
2424LANGUAGE_KINYARWANDA = _gdi_.LANGUAGE_KINYARWANDA
2425LANGUAGE_KIRGHIZ = _gdi_.LANGUAGE_KIRGHIZ
2426LANGUAGE_KIRUNDI = _gdi_.LANGUAGE_KIRUNDI
2427LANGUAGE_KONKANI = _gdi_.LANGUAGE_KONKANI
2428LANGUAGE_KOREAN = _gdi_.LANGUAGE_KOREAN
2429LANGUAGE_KURDISH = _gdi_.LANGUAGE_KURDISH
2430LANGUAGE_LAOTHIAN = _gdi_.LANGUAGE_LAOTHIAN
2431LANGUAGE_LATIN = _gdi_.LANGUAGE_LATIN
2432LANGUAGE_LATVIAN = _gdi_.LANGUAGE_LATVIAN
2433LANGUAGE_LINGALA = _gdi_.LANGUAGE_LINGALA
2434LANGUAGE_LITHUANIAN = _gdi_.LANGUAGE_LITHUANIAN
2435LANGUAGE_MACEDONIAN = _gdi_.LANGUAGE_MACEDONIAN
2436LANGUAGE_MALAGASY = _gdi_.LANGUAGE_MALAGASY
2437LANGUAGE_MALAY = _gdi_.LANGUAGE_MALAY
2438LANGUAGE_MALAYALAM = _gdi_.LANGUAGE_MALAYALAM
2439LANGUAGE_MALAY_BRUNEI_DARUSSALAM = _gdi_.LANGUAGE_MALAY_BRUNEI_DARUSSALAM
2440LANGUAGE_MALAY_MALAYSIA = _gdi_.LANGUAGE_MALAY_MALAYSIA
2441LANGUAGE_MALTESE = _gdi_.LANGUAGE_MALTESE
2442LANGUAGE_MANIPURI = _gdi_.LANGUAGE_MANIPURI
2443LANGUAGE_MAORI = _gdi_.LANGUAGE_MAORI
2444LANGUAGE_MARATHI = _gdi_.LANGUAGE_MARATHI
2445LANGUAGE_MOLDAVIAN = _gdi_.LANGUAGE_MOLDAVIAN
2446LANGUAGE_MONGOLIAN = _gdi_.LANGUAGE_MONGOLIAN
2447LANGUAGE_NAURU = _gdi_.LANGUAGE_NAURU
2448LANGUAGE_NEPALI = _gdi_.LANGUAGE_NEPALI
2449LANGUAGE_NEPALI_INDIA = _gdi_.LANGUAGE_NEPALI_INDIA
2450LANGUAGE_NORWEGIAN_BOKMAL = _gdi_.LANGUAGE_NORWEGIAN_BOKMAL
2451LANGUAGE_NORWEGIAN_NYNORSK = _gdi_.LANGUAGE_NORWEGIAN_NYNORSK
2452LANGUAGE_OCCITAN = _gdi_.LANGUAGE_OCCITAN
2453LANGUAGE_ORIYA = _gdi_.LANGUAGE_ORIYA
2454LANGUAGE_OROMO = _gdi_.LANGUAGE_OROMO
2455LANGUAGE_PASHTO = _gdi_.LANGUAGE_PASHTO
2456LANGUAGE_POLISH = _gdi_.LANGUAGE_POLISH
2457LANGUAGE_PORTUGUESE = _gdi_.LANGUAGE_PORTUGUESE
2458LANGUAGE_PORTUGUESE_BRAZILIAN = _gdi_.LANGUAGE_PORTUGUESE_BRAZILIAN
2459LANGUAGE_PUNJABI = _gdi_.LANGUAGE_PUNJABI
2460LANGUAGE_QUECHUA = _gdi_.LANGUAGE_QUECHUA
2461LANGUAGE_RHAETO_ROMANCE = _gdi_.LANGUAGE_RHAETO_ROMANCE
2462LANGUAGE_ROMANIAN = _gdi_.LANGUAGE_ROMANIAN
2463LANGUAGE_RUSSIAN = _gdi_.LANGUAGE_RUSSIAN
2464LANGUAGE_RUSSIAN_UKRAINE = _gdi_.LANGUAGE_RUSSIAN_UKRAINE
2465LANGUAGE_SAMOAN = _gdi_.LANGUAGE_SAMOAN
2466LANGUAGE_SANGHO = _gdi_.LANGUAGE_SANGHO
2467LANGUAGE_SANSKRIT = _gdi_.LANGUAGE_SANSKRIT
2468LANGUAGE_SCOTS_GAELIC = _gdi_.LANGUAGE_SCOTS_GAELIC
2469LANGUAGE_SERBIAN = _gdi_.LANGUAGE_SERBIAN
2470LANGUAGE_SERBIAN_CYRILLIC = _gdi_.LANGUAGE_SERBIAN_CYRILLIC
2471LANGUAGE_SERBIAN_LATIN = _gdi_.LANGUAGE_SERBIAN_LATIN
2472LANGUAGE_SERBO_CROATIAN = _gdi_.LANGUAGE_SERBO_CROATIAN
2473LANGUAGE_SESOTHO = _gdi_.LANGUAGE_SESOTHO
2474LANGUAGE_SETSWANA = _gdi_.LANGUAGE_SETSWANA
2475LANGUAGE_SHONA = _gdi_.LANGUAGE_SHONA
2476LANGUAGE_SINDHI = _gdi_.LANGUAGE_SINDHI
2477LANGUAGE_SINHALESE = _gdi_.LANGUAGE_SINHALESE
2478LANGUAGE_SISWATI = _gdi_.LANGUAGE_SISWATI
2479LANGUAGE_SLOVAK = _gdi_.LANGUAGE_SLOVAK
2480LANGUAGE_SLOVENIAN = _gdi_.LANGUAGE_SLOVENIAN
2481LANGUAGE_SOMALI = _gdi_.LANGUAGE_SOMALI
2482LANGUAGE_SPANISH = _gdi_.LANGUAGE_SPANISH
2483LANGUAGE_SPANISH_ARGENTINA = _gdi_.LANGUAGE_SPANISH_ARGENTINA
2484LANGUAGE_SPANISH_BOLIVIA = _gdi_.LANGUAGE_SPANISH_BOLIVIA
2485LANGUAGE_SPANISH_CHILE = _gdi_.LANGUAGE_SPANISH_CHILE
2486LANGUAGE_SPANISH_COLOMBIA = _gdi_.LANGUAGE_SPANISH_COLOMBIA
2487LANGUAGE_SPANISH_COSTA_RICA = _gdi_.LANGUAGE_SPANISH_COSTA_RICA
2488LANGUAGE_SPANISH_DOMINICAN_REPUBLIC = _gdi_.LANGUAGE_SPANISH_DOMINICAN_REPUBLIC
2489LANGUAGE_SPANISH_ECUADOR = _gdi_.LANGUAGE_SPANISH_ECUADOR
2490LANGUAGE_SPANISH_EL_SALVADOR = _gdi_.LANGUAGE_SPANISH_EL_SALVADOR
2491LANGUAGE_SPANISH_GUATEMALA = _gdi_.LANGUAGE_SPANISH_GUATEMALA
2492LANGUAGE_SPANISH_HONDURAS = _gdi_.LANGUAGE_SPANISH_HONDURAS
2493LANGUAGE_SPANISH_MEXICAN = _gdi_.LANGUAGE_SPANISH_MEXICAN
2494LANGUAGE_SPANISH_MODERN = _gdi_.LANGUAGE_SPANISH_MODERN
2495LANGUAGE_SPANISH_NICARAGUA = _gdi_.LANGUAGE_SPANISH_NICARAGUA
2496LANGUAGE_SPANISH_PANAMA = _gdi_.LANGUAGE_SPANISH_PANAMA
2497LANGUAGE_SPANISH_PARAGUAY = _gdi_.LANGUAGE_SPANISH_PARAGUAY
2498LANGUAGE_SPANISH_PERU = _gdi_.LANGUAGE_SPANISH_PERU
2499LANGUAGE_SPANISH_PUERTO_RICO = _gdi_.LANGUAGE_SPANISH_PUERTO_RICO
2500LANGUAGE_SPANISH_URUGUAY = _gdi_.LANGUAGE_SPANISH_URUGUAY
2501LANGUAGE_SPANISH_US = _gdi_.LANGUAGE_SPANISH_US
2502LANGUAGE_SPANISH_VENEZUELA = _gdi_.LANGUAGE_SPANISH_VENEZUELA
2503LANGUAGE_SUNDANESE = _gdi_.LANGUAGE_SUNDANESE
2504LANGUAGE_SWAHILI = _gdi_.LANGUAGE_SWAHILI
2505LANGUAGE_SWEDISH = _gdi_.LANGUAGE_SWEDISH
2506LANGUAGE_SWEDISH_FINLAND = _gdi_.LANGUAGE_SWEDISH_FINLAND
2507LANGUAGE_TAGALOG = _gdi_.LANGUAGE_TAGALOG
2508LANGUAGE_TAJIK = _gdi_.LANGUAGE_TAJIK
2509LANGUAGE_TAMIL = _gdi_.LANGUAGE_TAMIL
2510LANGUAGE_TATAR = _gdi_.LANGUAGE_TATAR
2511LANGUAGE_TELUGU = _gdi_.LANGUAGE_TELUGU
2512LANGUAGE_THAI = _gdi_.LANGUAGE_THAI
2513LANGUAGE_TIBETAN = _gdi_.LANGUAGE_TIBETAN
2514LANGUAGE_TIGRINYA = _gdi_.LANGUAGE_TIGRINYA
2515LANGUAGE_TONGA = _gdi_.LANGUAGE_TONGA
2516LANGUAGE_TSONGA = _gdi_.LANGUAGE_TSONGA
2517LANGUAGE_TURKISH = _gdi_.LANGUAGE_TURKISH
2518LANGUAGE_TURKMEN = _gdi_.LANGUAGE_TURKMEN
2519LANGUAGE_TWI = _gdi_.LANGUAGE_TWI
2520LANGUAGE_UIGHUR = _gdi_.LANGUAGE_UIGHUR
2521LANGUAGE_UKRAINIAN = _gdi_.LANGUAGE_UKRAINIAN
2522LANGUAGE_URDU = _gdi_.LANGUAGE_URDU
2523LANGUAGE_URDU_INDIA = _gdi_.LANGUAGE_URDU_INDIA
2524LANGUAGE_URDU_PAKISTAN = _gdi_.LANGUAGE_URDU_PAKISTAN
2525LANGUAGE_UZBEK = _gdi_.LANGUAGE_UZBEK
2526LANGUAGE_UZBEK_CYRILLIC = _gdi_.LANGUAGE_UZBEK_CYRILLIC
2527LANGUAGE_UZBEK_LATIN = _gdi_.LANGUAGE_UZBEK_LATIN
2528LANGUAGE_VIETNAMESE = _gdi_.LANGUAGE_VIETNAMESE
2529LANGUAGE_VOLAPUK = _gdi_.LANGUAGE_VOLAPUK
2530LANGUAGE_WELSH = _gdi_.LANGUAGE_WELSH
2531LANGUAGE_WOLOF = _gdi_.LANGUAGE_WOLOF
2532LANGUAGE_XHOSA = _gdi_.LANGUAGE_XHOSA
2533LANGUAGE_YIDDISH = _gdi_.LANGUAGE_YIDDISH
2534LANGUAGE_YORUBA = _gdi_.LANGUAGE_YORUBA
2535LANGUAGE_ZHUANG = _gdi_.LANGUAGE_ZHUANG
2536LANGUAGE_ZULU = _gdi_.LANGUAGE_ZULU
2537LANGUAGE_USER_DEFINED = _gdi_.LANGUAGE_USER_DEFINED
d14a1e28 2538class LanguageInfo(object):
093d3ff1 2539 """Proxy of C++ LanguageInfo class"""
0085ce49
RD
2540 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2541 def __init__(self): raise AttributeError, "No constructor defined"
2542 __repr__ = _swig_repr
54f9ee45
RD
2543 Language = property(_gdi_.LanguageInfo_Language_get, _gdi_.LanguageInfo_Language_set)
2544 CanonicalName = property(_gdi_.LanguageInfo_CanonicalName_get, _gdi_.LanguageInfo_CanonicalName_set)
2545 Description = property(_gdi_.LanguageInfo_Description_get, _gdi_.LanguageInfo_Description_set)
2131d850 2546_gdi_.LanguageInfo_swigregister(LanguageInfo)
54f9ee45
RD
2547
2548LOCALE_CAT_NUMBER = _gdi_.LOCALE_CAT_NUMBER
2549LOCALE_CAT_DATE = _gdi_.LOCALE_CAT_DATE
2550LOCALE_CAT_MONEY = _gdi_.LOCALE_CAT_MONEY
2551LOCALE_CAT_MAX = _gdi_.LOCALE_CAT_MAX
2552LOCALE_THOUSANDS_SEP = _gdi_.LOCALE_THOUSANDS_SEP
2553LOCALE_DECIMAL_POINT = _gdi_.LOCALE_DECIMAL_POINT
2554LOCALE_LOAD_DEFAULT = _gdi_.LOCALE_LOAD_DEFAULT
2555LOCALE_CONV_ENCODING = _gdi_.LOCALE_CONV_ENCODING
d14a1e28 2556class Locale(object):
093d3ff1 2557 """Proxy of C++ Locale class"""
0085ce49
RD
2558 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2559 __repr__ = _swig_repr
2560 def __init__(self, *args, **kwargs):
41e2b43e 2561 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> Locale"""
0085ce49
RD
2562 _gdi_.Locale_swiginit(self,_gdi_.new_Locale(*args, **kwargs))
2563 __swig_destroy__ = _gdi_.delete_Locale
2564 __del__ = lambda self : None;
e811c8ce 2565 def Init1(*args, **kwargs):
0df68c9f 2566 """
a95a7133 2567 Init1(self, String szName, String szShort=EmptyString, String szLocale=EmptyString,
196addbf 2568 bool bLoadDefault=True,
0df68c9f
RD
2569 bool bConvertEncoding=False) -> bool
2570 """
54f9ee45 2571 return _gdi_.Locale_Init1(*args, **kwargs)
e811c8ce
RD
2572
2573 def Init2(*args, **kwargs):
a95a7133 2574 """Init2(self, int language=LANGUAGE_DEFAULT, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> bool"""
54f9ee45 2575 return _gdi_.Locale_Init2(*args, **kwargs)
e811c8ce 2576
d14a1e28
RD
2577 def Init(self, *_args, **_kwargs):
2578 if type(_args[0]) in [type(''), type(u'')]:
2579 val = self.Init1(*_args, **_kwargs)
2580 else:
2581 val = self.Init2(*_args, **_kwargs)
2582 return val
2583
e811c8ce 2584 def GetSystemLanguage(*args, **kwargs):
66c033b4 2585 """GetSystemLanguage() -> int"""
54f9ee45 2586 return _gdi_.Locale_GetSystemLanguage(*args, **kwargs)
e811c8ce
RD
2587
2588 GetSystemLanguage = staticmethod(GetSystemLanguage)
2589 def GetSystemEncoding(*args, **kwargs):
66c033b4 2590 """GetSystemEncoding() -> int"""
54f9ee45 2591 return _gdi_.Locale_GetSystemEncoding(*args, **kwargs)
e811c8ce
RD
2592
2593 GetSystemEncoding = staticmethod(GetSystemEncoding)
2594 def GetSystemEncodingName(*args, **kwargs):
66c033b4 2595 """GetSystemEncodingName() -> String"""
54f9ee45 2596 return _gdi_.Locale_GetSystemEncodingName(*args, **kwargs)
e811c8ce
RD
2597
2598 GetSystemEncodingName = staticmethod(GetSystemEncodingName)
2599 def IsOk(*args, **kwargs):
a95a7133 2600 """IsOk(self) -> bool"""
54f9ee45 2601 return _gdi_.Locale_IsOk(*args, **kwargs)
e811c8ce 2602
d14a1e28 2603 def __nonzero__(self): return self.IsOk()
e811c8ce 2604 def GetLocale(*args, **kwargs):
a95a7133 2605 """GetLocale(self) -> String"""
54f9ee45 2606 return _gdi_.Locale_GetLocale(*args, **kwargs)
e811c8ce
RD
2607
2608 def GetLanguage(*args, **kwargs):
a95a7133 2609 """GetLanguage(self) -> int"""
54f9ee45 2610 return _gdi_.Locale_GetLanguage(*args, **kwargs)
e811c8ce
RD
2611
2612 def GetSysName(*args, **kwargs):
a95a7133 2613 """GetSysName(self) -> String"""
54f9ee45 2614 return _gdi_.Locale_GetSysName(*args, **kwargs)
e811c8ce
RD
2615
2616 def GetCanonicalName(*args, **kwargs):
a95a7133 2617 """GetCanonicalName(self) -> String"""
54f9ee45 2618 return _gdi_.Locale_GetCanonicalName(*args, **kwargs)
e811c8ce
RD
2619
2620 def AddCatalogLookupPathPrefix(*args, **kwargs):
66c033b4 2621 """AddCatalogLookupPathPrefix(String prefix)"""
54f9ee45 2622 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
e811c8ce
RD
2623
2624 AddCatalogLookupPathPrefix = staticmethod(AddCatalogLookupPathPrefix)
2625 def AddCatalog(*args, **kwargs):
a95a7133 2626 """AddCatalog(self, String szDomain) -> bool"""
54f9ee45 2627 return _gdi_.Locale_AddCatalog(*args, **kwargs)
e811c8ce
RD
2628
2629 def IsLoaded(*args, **kwargs):
a95a7133 2630 """IsLoaded(self, String szDomain) -> bool"""
54f9ee45 2631 return _gdi_.Locale_IsLoaded(*args, **kwargs)
e811c8ce
RD
2632
2633 def GetLanguageInfo(*args, **kwargs):
66c033b4 2634 """GetLanguageInfo(int lang) -> LanguageInfo"""
54f9ee45 2635 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
e811c8ce
RD
2636
2637 GetLanguageInfo = staticmethod(GetLanguageInfo)
2638 def GetLanguageName(*args, **kwargs):
66c033b4 2639 """GetLanguageName(int lang) -> String"""
54f9ee45 2640 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
e811c8ce
RD
2641
2642 GetLanguageName = staticmethod(GetLanguageName)
2643 def FindLanguageInfo(*args, **kwargs):
66c033b4 2644 """FindLanguageInfo(String locale) -> LanguageInfo"""
54f9ee45 2645 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
e811c8ce
RD
2646
2647 FindLanguageInfo = staticmethod(FindLanguageInfo)
2648 def AddLanguage(*args, **kwargs):
66c033b4 2649 """AddLanguage(LanguageInfo info)"""
54f9ee45 2650 return _gdi_.Locale_AddLanguage(*args, **kwargs)
e811c8ce
RD
2651
2652 AddLanguage = staticmethod(AddLanguage)
2653 def GetString(*args, **kwargs):
a95a7133 2654 """GetString(self, String szOrigString, String szDomain=EmptyString) -> String"""
54f9ee45 2655 return _gdi_.Locale_GetString(*args, **kwargs)
e811c8ce
RD
2656
2657 def GetName(*args, **kwargs):
a95a7133 2658 """GetName(self) -> String"""
54f9ee45 2659 return _gdi_.Locale_GetName(*args, **kwargs)
e811c8ce 2660
2131d850 2661_gdi_.Locale_swigregister(Locale)
5e40f9dd 2662
0085ce49
RD
2663def Locale_GetSystemLanguage(*args):
2664 """Locale_GetSystemLanguage() -> int"""
2665 return _gdi_.Locale_GetSystemLanguage(*args)
5e40f9dd 2666
0085ce49
RD
2667def Locale_GetSystemEncoding(*args):
2668 """Locale_GetSystemEncoding() -> int"""
2669 return _gdi_.Locale_GetSystemEncoding(*args)
5e40f9dd 2670
0085ce49
RD
2671def Locale_GetSystemEncodingName(*args):
2672 """Locale_GetSystemEncodingName() -> String"""
2673 return _gdi_.Locale_GetSystemEncodingName(*args)
d14a1e28 2674
e811c8ce 2675def Locale_AddCatalogLookupPathPrefix(*args, **kwargs):
0085ce49
RD
2676 """Locale_AddCatalogLookupPathPrefix(String prefix)"""
2677 return _gdi_.Locale_AddCatalogLookupPathPrefix(*args, **kwargs)
d14a1e28 2678
e811c8ce 2679def Locale_GetLanguageInfo(*args, **kwargs):
0085ce49
RD
2680 """Locale_GetLanguageInfo(int lang) -> LanguageInfo"""
2681 return _gdi_.Locale_GetLanguageInfo(*args, **kwargs)
d14a1e28 2682
e811c8ce 2683def Locale_GetLanguageName(*args, **kwargs):
0085ce49
RD
2684 """Locale_GetLanguageName(int lang) -> String"""
2685 return _gdi_.Locale_GetLanguageName(*args, **kwargs)
d14a1e28 2686
e811c8ce 2687def Locale_FindLanguageInfo(*args, **kwargs):
0085ce49
RD
2688 """Locale_FindLanguageInfo(String locale) -> LanguageInfo"""
2689 return _gdi_.Locale_FindLanguageInfo(*args, **kwargs)
d14a1e28 2690
e811c8ce 2691def Locale_AddLanguage(*args, **kwargs):
0085ce49
RD
2692 """Locale_AddLanguage(LanguageInfo info)"""
2693 return _gdi_.Locale_AddLanguage(*args, **kwargs)
d14a1e28 2694
fc46b7f3
RD
2695class PyLocale(Locale):
2696 """Proxy of C++ PyLocale class"""
2697 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2698 __repr__ = _swig_repr
2699 def __init__(self, *args, **kwargs):
2700 """__init__(self, int language=-1, int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING) -> PyLocale"""
2701 _gdi_.PyLocale_swiginit(self,_gdi_.new_PyLocale(*args, **kwargs))
2702 self._setCallbackInfo(self, PyLocale)
2703
2704 __swig_destroy__ = _gdi_.delete_PyLocale
2705 __del__ = lambda self : None;
2706 def _setCallbackInfo(*args, **kwargs):
2707 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
2708 return _gdi_.PyLocale__setCallbackInfo(*args, **kwargs)
2709
2710 def GetSingularString(*args, **kwargs):
2711 """GetSingularString(self, wxChar szOrigString, wxChar szDomain=None) -> wxChar"""
2712 return _gdi_.PyLocale_GetSingularString(*args, **kwargs)
2713
2714 def GetPluralString(*args, **kwargs):
2715 """
2716 GetPluralString(self, wxChar szOrigString, wxChar szOrigString2, size_t n,
2717 wxChar szDomain=None) -> wxChar
2718 """
2719 return _gdi_.PyLocale_GetPluralString(*args, **kwargs)
2720
2721_gdi_.PyLocale_swigregister(PyLocale)
2722
d14a1e28 2723
0085ce49
RD
2724def GetLocale(*args):
2725 """GetLocale() -> Locale"""
2726 return _gdi_.GetLocale(*args)
d14a1e28
RD
2727#---------------------------------------------------------------------------
2728
54f9ee45
RD
2729CONVERT_STRICT = _gdi_.CONVERT_STRICT
2730CONVERT_SUBSTITUTE = _gdi_.CONVERT_SUBSTITUTE
2731PLATFORM_CURRENT = _gdi_.PLATFORM_CURRENT
2732PLATFORM_UNIX = _gdi_.PLATFORM_UNIX
2733PLATFORM_WINDOWS = _gdi_.PLATFORM_WINDOWS
2734PLATFORM_OS2 = _gdi_.PLATFORM_OS2
2735PLATFORM_MAC = _gdi_.PLATFORM_MAC
2736class EncodingConverter(_core.Object):
093d3ff1 2737 """Proxy of C++ EncodingConverter class"""
0085ce49
RD
2738 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2739 __repr__ = _swig_repr
2740 def __init__(self, *args, **kwargs):
a95a7133 2741 """__init__(self) -> EncodingConverter"""
0085ce49
RD
2742 _gdi_.EncodingConverter_swiginit(self,_gdi_.new_EncodingConverter(*args, **kwargs))
2743 __swig_destroy__ = _gdi_.delete_EncodingConverter
2744 __del__ = lambda self : None;
e811c8ce 2745 def Init(*args, **kwargs):
a95a7133 2746 """Init(self, int input_enc, int output_enc, int method=CONVERT_STRICT) -> bool"""
54f9ee45 2747 return _gdi_.EncodingConverter_Init(*args, **kwargs)
e811c8ce
RD
2748
2749 def Convert(*args, **kwargs):
a95a7133 2750 """Convert(self, String input) -> String"""
54f9ee45 2751 return _gdi_.EncodingConverter_Convert(*args, **kwargs)
e811c8ce
RD
2752
2753 def GetPlatformEquivalents(*args, **kwargs):
66c033b4 2754 """GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
54f9ee45 2755 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
e811c8ce
RD
2756
2757 GetPlatformEquivalents = staticmethod(GetPlatformEquivalents)
2758 def GetAllEquivalents(*args, **kwargs):
66c033b4 2759 """GetAllEquivalents(int enc) -> wxFontEncodingArray"""
54f9ee45 2760 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
e811c8ce
RD
2761
2762 GetAllEquivalents = staticmethod(GetAllEquivalents)
2763 def CanConvert(*args, **kwargs):
66c033b4 2764 """CanConvert(int encIn, int encOut) -> bool"""
54f9ee45 2765 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
e811c8ce
RD
2766
2767 CanConvert = staticmethod(CanConvert)
d14a1e28 2768 def __nonzero__(self): return self.IsOk()
2131d850 2769_gdi_.EncodingConverter_swigregister(EncodingConverter)
d14a1e28 2770
e811c8ce 2771def GetTranslation(*args):
0085ce49 2772 """
3adfb63b 2773 GetTranslation(String str) -> String
fc46b7f3 2774 GetTranslation(String str, String domain) -> String
3adfb63b 2775 GetTranslation(String str, String strPlural, size_t n) -> String
fc46b7f3 2776 GetTranslation(String str, String strPlural, size_t n, String domain) -> String
0df68c9f 2777 """
0085ce49 2778 return _gdi_.GetTranslation(*args)
d14a1e28 2779
e811c8ce 2780def EncodingConverter_GetPlatformEquivalents(*args, **kwargs):
0085ce49
RD
2781 """EncodingConverter_GetPlatformEquivalents(int enc, int platform=PLATFORM_CURRENT) -> wxFontEncodingArray"""
2782 return _gdi_.EncodingConverter_GetPlatformEquivalents(*args, **kwargs)
d14a1e28 2783
e811c8ce 2784def EncodingConverter_GetAllEquivalents(*args, **kwargs):
0085ce49
RD
2785 """EncodingConverter_GetAllEquivalents(int enc) -> wxFontEncodingArray"""
2786 return _gdi_.EncodingConverter_GetAllEquivalents(*args, **kwargs)
d14a1e28 2787
e811c8ce 2788def EncodingConverter_CanConvert(*args, **kwargs):
0085ce49
RD
2789 """EncodingConverter_CanConvert(int encIn, int encOut) -> bool"""
2790 return _gdi_.EncodingConverter_CanConvert(*args, **kwargs)
d14a1e28
RD
2791
2792#----------------------------------------------------------------------------
89c876de 2793# On MSW add the directory where the wxWidgets catalogs were installed
d14a1e28
RD
2794# to the default catalog path.
2795if wx.Platform == "__WXMSW__":
2796 import os
8fb0e70a
RD
2797 _localedir = os.path.join(os.path.split(__file__)[0], "locale")
2798 Locale.AddCatalogLookupPathPrefix(_localedir)
d14a1e28
RD
2799 del os
2800
2801#----------------------------------------------------------------------------
2802
2803#---------------------------------------------------------------------------
2804
54f9ee45 2805class DC(_core.Object):
f5b96ee1
RD
2806 """
2807 A wx.DC is a device context onto which graphics and text can be
2808 drawn. It is intended to represent a number of output devices in a
2809 generic way, so a window can have a device context associated with it,
2810 and a printer also has a device context. In this way, the same piece
2811 of code may write to a number of different devices, if the device
2812 context is used as a parameter.
2813
2814 Derived types of wxDC have documentation for specific features only,
2815 so refer to this section for most device context information.
2816
2817 The wx.DC class is abstract and can not be instantiated, you must use
2818 one of the derived classes instead. Which one will depend on the
2819 situation in which it is used.
2820 """
0085ce49
RD
2821 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2822 def __init__(self): raise AttributeError, "No constructor defined"
2823 __repr__ = _swig_repr
2824 __swig_destroy__ = _gdi_.delete_DC
2825 __del__ = lambda self : None;
c26d9ab4
RD
2826 # These have been deprecated in wxWidgets. Since they never
2827 # really did anything to begin with, just make them be NOPs.
2828 def BeginDrawing(self): pass
2829 def EndDrawing(self): pass
e811c8ce 2830
e811c8ce 2831 def FloodFill(*args, **kwargs):
f5b96ee1
RD
2832 """
2833 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE) -> bool
2834
2835 Flood fills the device context starting from the given point, using
2836 the current brush colour, and using a style:
2837
2838 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2839 the given colour is encountered.
2840
2841 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2842 colour.
2843
2844 Returns False if the operation failed.
2845
2846 Note: The present implementation for non-Windows platforms may fail to
2847 find colour borders if the pixels do not match the colour
2848 exactly. However the function will still return true.
2849 """
54f9ee45 2850 return _gdi_.DC_FloodFill(*args, **kwargs)
e811c8ce 2851
03e37cd5 2852 def FloodFillPoint(*args, **kwargs):
f5b96ee1
RD
2853 """
2854 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE) -> bool
2855
2856 Flood fills the device context starting from the given point, using
2857 the current brush colour, and using a style:
2858
2859 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
2860 the given colour is encountered.
2861
2862 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
2863 colour.
2864
2865 Returns False if the operation failed.
2866
2867 Note: The present implementation for non-Windows platforms may fail to
2868 find colour borders if the pixels do not match the colour
2869 exactly. However the function will still return true.
2870 """
03e37cd5 2871 return _gdi_.DC_FloodFillPoint(*args, **kwargs)
e811c8ce 2872
b1fcee84
RD
2873 def GradientFillConcentric(*args, **kwargs):
2874 """
2875 GradientFillConcentric(self, Rect rect, Colour initialColour, Colour destColour,
2876 Point circleCenter)
2877
2878 Fill the area specified by rect with a radial gradient, starting from
2879 initialColour in the center of the circle and fading to destColour on
2880 the outside of the circle. The circleCenter argument is the relative
2881 coordinants of the center of the circle in the specified rect.
2882
2883 Note: Currently this function is very slow, don't use it for real-time
2884 drawing.
2885 """
2886 return _gdi_.DC_GradientFillConcentric(*args, **kwargs)
2887
2888 def GradientFillLinear(*args, **kwargs):
2889 """
2890 GradientFillLinear(self, Rect rect, Colour initialColour, Colour destColour,
2891 int nDirection=EAST)
2892
2893 Fill the area specified by rect with a linear gradient, starting from
2894 initialColour and eventually fading to destColour. The nDirection
2895 parameter specifies the direction of the colour change, default is to
2896 use initialColour on the left part of the rectangle and destColour on
2897 the right side.
2898 """
2899 return _gdi_.DC_GradientFillLinear(*args, **kwargs)
2900
e811c8ce 2901 def GetPixel(*args, **kwargs):
f5b96ee1
RD
2902 """
2903 GetPixel(self, int x, int y) -> Colour
2904
2905 Gets the colour at the specified location on the DC.
2906 """
54f9ee45 2907 return _gdi_.DC_GetPixel(*args, **kwargs)
e811c8ce 2908
03e37cd5
RD
2909 def GetPixelPoint(*args, **kwargs):
2910 """GetPixelPoint(self, Point pt) -> Colour"""
2911 return _gdi_.DC_GetPixelPoint(*args, **kwargs)
e811c8ce
RD
2912
2913 def DrawLine(*args, **kwargs):
f5b96ee1
RD
2914 """
2915 DrawLine(self, int x1, int y1, int x2, int y2)
2916
2917 Draws a line from the first point to the second. The current pen is
2918 used for drawing the line. Note that the second point is *not* part of
2919 the line and is not drawn by this function (this is consistent with
2920 the behaviour of many other toolkits).
2921 """
54f9ee45 2922 return _gdi_.DC_DrawLine(*args, **kwargs)
e811c8ce 2923
03e37cd5 2924 def DrawLinePoint(*args, **kwargs):
f5b96ee1
RD
2925 """
2926 DrawLinePoint(self, Point pt1, Point pt2)
2927
2928 Draws a line from the first point to the second. The current pen is
2929 used for drawing the line. Note that the second point is *not* part of
2930 the line and is not drawn by this function (this is consistent with
2931 the behaviour of many other toolkits).
2932 """
03e37cd5 2933 return _gdi_.DC_DrawLinePoint(*args, **kwargs)
e811c8ce
RD
2934
2935 def CrossHair(*args, **kwargs):
f5b96ee1
RD
2936 """
2937 CrossHair(self, int x, int y)
2938
2939 Displays a cross hair using the current pen. This is a vertical and
2940 horizontal line the height and width of the window, centred on the
2941 given point.
2942 """
54f9ee45 2943 return _gdi_.DC_CrossHair(*args, **kwargs)
e811c8ce 2944
03e37cd5 2945 def CrossHairPoint(*args, **kwargs):
f5b96ee1
RD
2946 """
2947 CrossHairPoint(self, Point pt)
2948
2949 Displays a cross hair using the current pen. This is a vertical and
2950 horizontal line the height and width of the window, centred on the
2951 given point.
2952 """
03e37cd5 2953 return _gdi_.DC_CrossHairPoint(*args, **kwargs)
e811c8ce
RD
2954
2955 def DrawArc(*args, **kwargs):
f5b96ee1
RD
2956 """
2957 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
2958
2959 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2960 the first point to the second. The current pen is used for the outline
2961 and the current brush for filling the shape.
2962
2963 The arc is drawn in an anticlockwise direction from the start point to
2964 the end point.
2965 """
54f9ee45 2966 return _gdi_.DC_DrawArc(*args, **kwargs)
e811c8ce 2967
03e37cd5 2968 def DrawArcPoint(*args, **kwargs):
f5b96ee1
RD
2969 """
2970 DrawArcPoint(self, Point pt1, Point pt2, Point center)
2971
2972 Draws an arc of a circle, centred on the *center* point (xc, yc), from
2973 the first point to the second. The current pen is used for the outline
2974 and the current brush for filling the shape.
2975
2976 The arc is drawn in an anticlockwise direction from the start point to
2977 the end point.
2978 """
03e37cd5 2979 return _gdi_.DC_DrawArcPoint(*args, **kwargs)
e811c8ce
RD
2980
2981 def DrawCheckMark(*args, **kwargs):
f5b96ee1
RD
2982 """
2983 DrawCheckMark(self, int x, int y, int width, int height)
2984
2985 Draws a check mark inside the given rectangle.
2986 """
54f9ee45 2987 return _gdi_.DC_DrawCheckMark(*args, **kwargs)
e811c8ce 2988
03e37cd5 2989 def DrawCheckMarkRect(*args, **kwargs):
f5b96ee1
RD
2990 """
2991 DrawCheckMarkRect(self, Rect rect)
2992
2993 Draws a check mark inside the given rectangle.
2994 """
03e37cd5 2995 return _gdi_.DC_DrawCheckMarkRect(*args, **kwargs)
e811c8ce
RD
2996
2997 def DrawEllipticArc(*args, **kwargs):
f5b96ee1
RD
2998 """
2999 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
3000
3001 Draws an arc of an ellipse, with the given rectangle defining the
3002 bounds of the ellipse. The current pen is used for drawing the arc and
3003 the current brush is used for drawing the pie.
3004
3005 The *start* and *end* parameters specify the start and end of the arc
3006 relative to the three-o'clock position from the center of the
3007 rectangle. Angles are specified in degrees (360 is a complete
3008 circle). Positive values mean counter-clockwise motion. If start is
3009 equal to end, a complete ellipse will be drawn.
3010 """
54f9ee45 3011 return _gdi_.DC_DrawEllipticArc(*args, **kwargs)
e811c8ce 3012
03e37cd5 3013 def DrawEllipticArcPointSize(*args, **kwargs):
f5b96ee1
RD
3014 """
3015 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
3016
3017 Draws an arc of an ellipse, with the given rectangle defining the
3018 bounds of the ellipse. The current pen is used for drawing the arc and
3019 the current brush is used for drawing the pie.
3020
3021 The *start* and *end* parameters specify the start and end of the arc
3022 relative to the three-o'clock position from the center of the
3023 rectangle. Angles are specified in degrees (360 is a complete
3024 circle). Positive values mean counter-clockwise motion. If start is
3025 equal to end, a complete ellipse will be drawn.
3026 """
03e37cd5 3027 return _gdi_.DC_DrawEllipticArcPointSize(*args, **kwargs)
e811c8ce
RD
3028
3029 def DrawPoint(*args, **kwargs):
f5b96ee1
RD
3030 """
3031 DrawPoint(self, int x, int y)
3032
3033 Draws a point using the current pen.
3034 """
54f9ee45 3035 return _gdi_.DC_DrawPoint(*args, **kwargs)
e811c8ce 3036
03e37cd5 3037 def DrawPointPoint(*args, **kwargs):
f5b96ee1
RD
3038 """
3039 DrawPointPoint(self, Point pt)
3040
3041 Draws a point using the current pen.
3042 """
03e37cd5 3043 return _gdi_.DC_DrawPointPoint(*args, **kwargs)
e811c8ce
RD
3044
3045 def DrawRectangle(*args, **kwargs):
f5b96ee1
RD
3046 """
3047 DrawRectangle(self, int x, int y, int width, int height)
3048
3049 Draws a rectangle with the given top left corner, and with the given
3050 size. The current pen is used for the outline and the current brush
3051 for filling the shape.
3052 """
54f9ee45 3053 return _gdi_.DC_DrawRectangle(*args, **kwargs)
e811c8ce
RD
3054
3055 def DrawRectangleRect(*args, **kwargs):
f5b96ee1
RD
3056 """
3057 DrawRectangleRect(self, Rect rect)
3058
3059 Draws a rectangle with the given top left corner, and with the given
3060 size. The current pen is used for the outline and the current brush
3061 for filling the shape.
3062 """
54f9ee45 3063 return _gdi_.DC_DrawRectangleRect(*args, **kwargs)
e811c8ce 3064
03e37cd5 3065 def DrawRectanglePointSize(*args, **kwargs):
f5b96ee1
RD
3066 """
3067 DrawRectanglePointSize(self, Point pt, Size sz)
3068
3069 Draws a rectangle with the given top left corner, and with the given
3070 size. The current pen is used for the outline and the current brush
3071 for filling the shape.
3072 """
03e37cd5 3073 return _gdi_.DC_DrawRectanglePointSize(*args, **kwargs)
e811c8ce
RD
3074
3075 def DrawRoundedRectangle(*args, **kwargs):
f5b96ee1
RD
3076 """
3077 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
3078
3079 Draws a rectangle with the given top left corner, and with the given
3080 size. The corners are quarter-circles using the given radius. The
3081 current pen is used for the outline and the current brush for filling
3082 the shape.
3083
3084 If radius is positive, the value is assumed to be the radius of the
3085 rounded corner. If radius is negative, the absolute value is assumed
3086 to be the proportion of the smallest dimension of the rectangle. This
3087 means that the corner can be a sensible size relative to the size of
3088 the rectangle, and also avoids the strange effects X produces when the
3089 corners are too big for the rectangle.
3090 """
54f9ee45 3091 return _gdi_.DC_DrawRoundedRectangle(*args, **kwargs)
e811c8ce
RD
3092
3093 def DrawRoundedRectangleRect(*args, **kwargs):
f5b96ee1
RD
3094 """
3095 DrawRoundedRectangleRect(self, Rect r, double radius)
3096
3097 Draws a rectangle with the given top left corner, and with the given
3098 size. The corners are quarter-circles using the given radius. The
3099 current pen is used for the outline and the current brush for filling
3100 the shape.
3101
3102 If radius is positive, the value is assumed to be the radius of the
3103 rounded corner. If radius is negative, the absolute value is assumed
3104 to be the proportion of the smallest dimension of the rectangle. This
3105 means that the corner can be a sensible size relative to the size of
3106 the rectangle, and also avoids the strange effects X produces when the
3107 corners are too big for the rectangle.
3108 """
54f9ee45 3109 return _gdi_.DC_DrawRoundedRectangleRect(*args, **kwargs)
e811c8ce 3110
03e37cd5 3111 def DrawRoundedRectanglePointSize(*args, **kwargs):
f5b96ee1
RD
3112 """
3113 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
3114
3115 Draws a rectangle with the given top left corner, and with the given
3116 size. The corners are quarter-circles using the given radius. The
3117 current pen is used for the outline and the current brush for filling
3118 the shape.
3119
3120 If radius is positive, the value is assumed to be the radius of the
3121 rounded corner. If radius is negative, the absolute value is assumed
3122 to be the proportion of the smallest dimension of the rectangle. This
3123 means that the corner can be a sensible size relative to the size of
3124 the rectangle, and also avoids the strange effects X produces when the
3125 corners are too big for the rectangle.
3126 """
03e37cd5 3127 return _gdi_.DC_DrawRoundedRectanglePointSize(*args, **kwargs)
e811c8ce
RD
3128
3129 def DrawCircle(*args, **kwargs):
f5b96ee1
RD
3130 """
3131 DrawCircle(self, int x, int y, int radius)
3132
3133 Draws a circle with the given center point and radius. The current
3134 pen is used for the outline and the current brush for filling the
3135 shape.
3136 """
54f9ee45 3137 return _gdi_.DC_DrawCircle(*args, **kwargs)
e811c8ce 3138
03e37cd5 3139 def DrawCirclePoint(*args, **kwargs):
f5b96ee1
RD
3140 """
3141 DrawCirclePoint(self, Point pt, int radius)
3142
3143 Draws a circle with the given center point and radius. The current
3144 pen is used for the outline and the current brush for filling the
3145 shape.
3146 """
03e37cd5 3147 return _gdi_.DC_DrawCirclePoint(*args, **kwargs)
e811c8ce
RD
3148
3149 def DrawEllipse(*args, **kwargs):
f5b96ee1
RD
3150 """
3151 DrawEllipse(self, int x, int y, int width, int height)
3152
3153 Draws an ellipse contained in the specified rectangle. The current pen
3154 is used for the outline and the current brush for filling the shape.
3155 """
54f9ee45 3156 return _gdi_.DC_DrawEllipse(*args, **kwargs)
e811c8ce
RD
3157
3158 def DrawEllipseRect(*args, **kwargs):
f5b96ee1
RD
3159 """
3160 DrawEllipseRect(self, Rect rect)
3161
3162 Draws an ellipse contained in the specified rectangle. The current pen
3163 is used for the outline and the current brush for filling the shape.
3164 """
54f9ee45 3165 return _gdi_.DC_DrawEllipseRect(*args, **kwargs)
e811c8ce 3166
03e37cd5 3167 def DrawEllipsePointSize(*args, **kwargs):
f5b96ee1
RD
3168 """
3169 DrawEllipsePointSize(self, Point pt, Size sz)
3170
3171 Draws an ellipse contained in the specified rectangle. The current pen
3172 is used for the outline and the current brush for filling the shape.
3173 """
03e37cd5 3174 return _gdi_.DC_DrawEllipsePointSize(*args, **kwargs)
e811c8ce
RD
3175
3176 def DrawIcon(*args, **kwargs):
f5b96ee1
RD
3177 """
3178 DrawIcon(self, Icon icon, int x, int y)
3179
3180 Draw an icon on the display (does nothing if the device context is
3181 PostScript). This can be the simplest way of drawing bitmaps on a
3182 window.
3183 """
54f9ee45 3184 return _gdi_.DC_DrawIcon(*args, **kwargs)
e811c8ce 3185
03e37cd5 3186 def DrawIconPoint(*args, **kwargs):
f5b96ee1
RD
3187 """
3188 DrawIconPoint(self, Icon icon, Point pt)
3189
3190 Draw an icon on the display (does nothing if the device context is
3191 PostScript). This can be the simplest way of drawing bitmaps on a
3192 window.
3193 """
03e37cd5 3194 return _gdi_.DC_DrawIconPoint(*args, **kwargs)
e811c8ce
RD
3195
3196 def DrawBitmap(*args, **kwargs):
f5b96ee1
RD
3197 """
3198 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
3199
3200 Draw a bitmap on the device context at the specified point. If
3201 *transparent* is true and the bitmap has a transparency mask, (or
3202 alpha channel on the platforms that support it) then the bitmap will
3203 be drawn transparently.
3204 """
54f9ee45 3205 return _gdi_.DC_DrawBitmap(*args, **kwargs)
e811c8ce 3206
03e37cd5 3207 def DrawBitmapPoint(*args, **kwargs):
f5b96ee1
RD
3208 """
3209 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
3210
3211 Draw a bitmap on the device context at the specified point. If
3212 *transparent* is true and the bitmap has a transparency mask, (or
3213 alpha channel on the platforms that support it) then the bitmap will
3214 be drawn transparently.
3215 """
03e37cd5 3216 return _gdi_.DC_DrawBitmapPoint(*args, **kwargs)
e811c8ce
RD
3217
3218 def DrawText(*args, **kwargs):
f5b96ee1
RD
3219 """
3220 DrawText(self, String text, int x, int y)
3221
3222 Draws a text string at the specified point, using the current text
3223 font, and the current text foreground and background colours.
3224
3225 The coordinates refer to the top-left corner of the rectangle bounding
3226 the string. See `GetTextExtent` for how to get the dimensions of a
3227 text string, which can be used to position the text more precisely.
3228
3229 **NOTE**: under wxGTK the current logical function is used by this
3230 function but it is ignored by wxMSW. Thus, you should avoid using
3231 logical functions with this function in portable programs.
3232 """
54f9ee45 3233 return _gdi_.DC_DrawText(*args, **kwargs)
e811c8ce 3234
03e37cd5 3235 def DrawTextPoint(*args, **kwargs):
f5b96ee1
RD
3236 """
3237 DrawTextPoint(self, String text, Point pt)
3238
3239 Draws a text string at the specified point, using the current text
3240 font, and the current text foreground and background colours.
3241
3242 The coordinates refer to the top-left corner of the rectangle bounding
3243 the string. See `GetTextExtent` for how to get the dimensions of a
3244 text string, which can be used to position the text more precisely.
3245
3246 **NOTE**: under wxGTK the current logical function is used by this
3247 function but it is ignored by wxMSW. Thus, you should avoid using
3248 logical functions with this function in portable programs.
3249 """
03e37cd5 3250 return _gdi_.DC_DrawTextPoint(*args, **kwargs)
e811c8ce
RD
3251
3252 def DrawRotatedText(*args, **kwargs):
f5b96ee1
RD
3253 """
3254 DrawRotatedText(self, String text, int x, int y, double angle)
3255
3256 Draws the text rotated by *angle* degrees, if supported by the platform.
3257
3258 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3259 function. In particular, a font different from ``wx.NORMAL_FONT``
3260 should be used as the it is not normally a TrueType
3261 font. ``wx.SWISS_FONT`` is an example of a font which is.
3262 """
54f9ee45 3263 return _gdi_.DC_DrawRotatedText(*args, **kwargs)
e811c8ce 3264
03e37cd5 3265 def DrawRotatedTextPoint(*args, **kwargs):
f5b96ee1
RD
3266 """
3267 DrawRotatedTextPoint(self, String text, Point pt, double angle)
3268
3269 Draws the text rotated by *angle* degrees, if supported by the platform.
3270
3271 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
3272 function. In particular, a font different from ``wx.NORMAL_FONT``
3273 should be used as the it is not normally a TrueType
3274 font. ``wx.SWISS_FONT`` is an example of a font which is.
3275 """
03e37cd5
RD
3276 return _gdi_.DC_DrawRotatedTextPoint(*args, **kwargs)
3277
3278 def Blit(*args, **kwargs):
0df68c9f 3279 """
03e37cd5 3280 Blit(self, int xdest, int ydest, int width, int height, DC source,
0df68c9f
RD
3281 int xsrc, int ysrc, int rop=COPY, bool useMask=False,
3282 int xsrcMask=-1, int ysrcMask=-1) -> bool
f5b96ee1
RD
3283
3284 Copy from a source DC to this DC. Parameters specify the destination
3285 coordinates, size of area to copy, source DC, source coordinates,
3286 logical function, whether to use a bitmap mask, and mask source
3287 position.
0df68c9f 3288 """
03e37cd5 3289 return _gdi_.DC_Blit(*args, **kwargs)
e811c8ce 3290
03e37cd5 3291 def BlitPointSize(*args, **kwargs):
0df68c9f 3292 """
03e37cd5 3293 BlitPointSize(self, Point destPt, Size sz, DC source, Point srcPt, int rop=COPY,
0df68c9f 3294 bool useMask=False, Point srcPtMask=DefaultPosition) -> bool
f5b96ee1
RD
3295
3296 Copy from a source DC to this DC. Parameters specify the destination
3297 coordinates, size of area to copy, source DC, source coordinates,
3298 logical function, whether to use a bitmap mask, and mask source
3299 position.
0df68c9f 3300 """
03e37cd5
RD
3301 return _gdi_.DC_BlitPointSize(*args, **kwargs)
3302
3303 def SetClippingRegion(*args, **kwargs):
f5b96ee1
RD
3304 """
3305 SetClippingRegion(self, int x, int y, int width, int height)
3306
3307 Sets the clipping region for this device context to the intersection
3308 of the given region described by the parameters of this method and the
3309 previously set clipping region. You should call `DestroyClippingRegion`
3310 if you want to set the clipping region exactly to the region
3311 specified.
3312
3313 The clipping region is an area to which drawing is
3314 restricted. Possible uses for the clipping region are for clipping
3315 text or for speeding up window redraws when only a known area of the
3316 screen is damaged.
3317 """
03e37cd5
RD
3318 return _gdi_.DC_SetClippingRegion(*args, **kwargs)
3319
3320 def SetClippingRegionPointSize(*args, **kwargs):
f5b96ee1
RD
3321 """
3322 SetClippingRegionPointSize(self, Point pt, Size sz)
3323
3324 Sets the clipping region for this device context to the intersection
3325 of the given region described by the parameters of this method and the
3326 previously set clipping region. You should call `DestroyClippingRegion`
3327 if you want to set the clipping region exactly to the region
3328 specified.
3329
3330 The clipping region is an area to which drawing is
3331 restricted. Possible uses for the clipping region are for clipping
3332 text or for speeding up window redraws when only a known area of the
3333 screen is damaged.
3334 """
03e37cd5
RD
3335 return _gdi_.DC_SetClippingRegionPointSize(*args, **kwargs)
3336
3337 def SetClippingRegionAsRegion(*args, **kwargs):
f5b96ee1
RD
3338 """
3339 SetClippingRegionAsRegion(self, Region region)
3340
3341 Sets the clipping region for this device context to the intersection
3342 of the given region described by the parameters of this method and the
3343 previously set clipping region. You should call `DestroyClippingRegion`
3344 if you want to set the clipping region exactly to the region
3345 specified.
3346
3347 The clipping region is an area to which drawing is
3348 restricted. Possible uses for the clipping region are for clipping
3349 text or for speeding up window redraws when only a known area of the
3350 screen is damaged.
3351 """
03e37cd5
RD
3352 return _gdi_.DC_SetClippingRegionAsRegion(*args, **kwargs)
3353
3354 def SetClippingRect(*args, **kwargs):
f5b96ee1
RD
3355 """
3356 SetClippingRect(self, Rect rect)
3357
3358 Sets the clipping region for this device context to the intersection
3359 of the given region described by the parameters of this method and the
3360 previously set clipping region. You should call `DestroyClippingRegion`
3361 if you want to set the clipping region exactly to the region
3362 specified.
3363
3364 The clipping region is an area to which drawing is
3365 restricted. Possible uses for the clipping region are for clipping
3366 text or for speeding up window redraws when only a known area of the
3367 screen is damaged.
3368 """
03e37cd5 3369 return _gdi_.DC_SetClippingRect(*args, **kwargs)
e811c8ce
RD
3370
3371 def DrawLines(*args, **kwargs):
f5b96ee1
RD
3372 """
3373 DrawLines(self, List points, int xoffset=0, int yoffset=0)
3374
3375 Draws lines using a sequence of `wx.Point` objects, adding the
3376 optional offset coordinate. The current pen is used for drawing the
3377 lines.
3378 """
54f9ee45 3379 return _gdi_.DC_DrawLines(*args, **kwargs)
e811c8ce
RD
3380
3381 def DrawPolygon(*args, **kwargs):
0df68c9f 3382 """
f5b96ee1 3383 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
0df68c9f 3384 int fillStyle=ODDEVEN_RULE)
f5b96ee1
RD
3385
3386 Draws a filled polygon using a sequence of `wx.Point` objects, adding
3387 the optional offset coordinate. The last argument specifies the fill
3388 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
3389
3390 The current pen is used for drawing the outline, and the current brush
3391 for filling the shape. Using a transparent brush suppresses
3392 filling. Note that wxWidgets automatically closes the first and last
3393 points.
0df68c9f 3394 """
54f9ee45 3395 return _gdi_.DC_DrawPolygon(*args, **kwargs)
e811c8ce
RD
3396
3397 def DrawLabel(*args, **kwargs):
0df68c9f 3398 """
a95a7133 3399 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
0df68c9f 3400 int indexAccel=-1)
f5b96ee1
RD
3401
3402 Draw *text* within the specified rectangle, abiding by the alignment
3403 flags. Will additionally emphasize the character at *indexAccel* if
3404 it is not -1.
0df68c9f 3405 """
54f9ee45 3406 return _gdi_.DC_DrawLabel(*args, **kwargs)
e811c8ce
RD
3407
3408 def DrawImageLabel(*args, **kwargs):
0df68c9f 3409 """
a95a7133 3410 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
0df68c9f 3411 int indexAccel=-1) -> Rect
f5b96ee1
RD
3412
3413 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
3414 drawing it) within the specified rectangle, abiding by the alignment
3415 flags. Will additionally emphasize the character at *indexAccel* if
3416 it is not -1. Returns the bounding rectangle.
0df68c9f 3417 """
54f9ee45 3418 return _gdi_.DC_DrawImageLabel(*args, **kwargs)
e811c8ce
RD
3419
3420 def DrawSpline(*args, **kwargs):
f5b96ee1
RD
3421 """
3422 DrawSpline(self, List points)
3423
3424 Draws a spline between all given control points, (a list of `wx.Point`
3425 objects) using the current pen. The spline is drawn using a series of
3426 lines, using an algorithm taken from the X drawing program 'XFIG'.
3427 """
54f9ee45 3428 return _gdi_.DC_DrawSpline(*args, **kwargs)
e811c8ce
RD
3429
3430 def Clear(*args, **kwargs):
f5b96ee1
RD
3431 """
3432 Clear(self)
3433
3434 Clears the device context using the current background brush.
3435 """
54f9ee45 3436 return _gdi_.DC_Clear(*args, **kwargs)
e811c8ce
RD
3437
3438 def StartDoc(*args, **kwargs):
f5b96ee1
RD
3439 """
3440 StartDoc(self, String message) -> bool
3441
3442 Starts a document (only relevant when outputting to a
3443 printer). *Message* is a message to show whilst printing.
3444 """
54f9ee45 3445 return _gdi_.DC_StartDoc(*args, **kwargs)
e811c8ce
RD
3446
3447 def EndDoc(*args, **kwargs):
f5b96ee1
RD
3448 """
3449 EndDoc(self)
3450
3451 Ends a document (only relevant when outputting to a printer).
3452 """
54f9ee45 3453 return _gdi_.DC_EndDoc(*args, **kwargs)
e811c8ce
RD
3454
3455 def StartPage(*args, **kwargs):
f5b96ee1
RD
3456 """
3457 StartPage(self)
3458
3459 Starts a document page (only relevant when outputting to a printer).
3460 """
54f9ee45 3461 return _gdi_.DC_StartPage(*args, **kwargs)
e811c8ce
RD
3462
3463 def EndPage(*args, **kwargs):
f5b96ee1
RD
3464 """
3465 EndPage(self)
3466
3467 Ends a document page (only relevant when outputting to a printer).
3468 """
54f9ee45 3469 return _gdi_.DC_EndPage(*args, **kwargs)
e811c8ce
RD
3470
3471 def SetFont(*args, **kwargs):
f5b96ee1
RD
3472 """
3473 SetFont(self, Font font)
3474
3475 Sets the current font for the DC. It must be a valid font, in
3476 particular you should not pass ``wx.NullFont`` to this method.
3477 """
54f9ee45 3478 return _gdi_.DC_SetFont(*args, **kwargs)
e811c8ce
RD
3479
3480 def SetPen(*args, **kwargs):
f5b96ee1
RD
3481 """
3482 SetPen(self, Pen pen)
3483
3484 Sets the current pen for the DC.
3485
3486 If the argument is ``wx.NullPen``, the current pen is selected out of the
3487 device context, and the original pen restored.
3488 """
54f9ee45 3489 return _gdi_.DC_SetPen(*args, **kwargs)
e811c8ce
RD
3490
3491 def SetBrush(*args, **kwargs):
f5b96ee1
RD
3492 """
3493 SetBrush(self, Brush brush)
3494
3495 Sets the current brush for the DC.
3496
3497 If the argument is ``wx.NullBrush``, the current brush is selected out
3498 of the device context, and the original brush restored, allowing the
3499 current brush to be destroyed safely.
3500 """
54f9ee45 3501 return _gdi_.DC_SetBrush(*args, **kwargs)
e811c8ce
RD
3502
3503 def SetBackground(*args, **kwargs):
f5b96ee1
RD
3504 """
3505 SetBackground(self, Brush brush)
3506
3507 Sets the current background brush for the DC.
3508 """
54f9ee45 3509 return _gdi_.DC_SetBackground(*args, **kwargs)
e811c8ce
RD
3510
3511 def SetBackgroundMode(*args, **kwargs):
f5b96ee1
RD
3512 """
3513 SetBackgroundMode(self, int mode)
3514
3515 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
3516 determines whether text will be drawn with a background colour or
3517 not.
3518 """
54f9ee45 3519 return _gdi_.DC_SetBackgroundMode(*args, **kwargs)
e811c8ce
RD
3520
3521 def SetPalette(*args, **kwargs):
f5b96ee1
RD
3522 """
3523 SetPalette(self, Palette palette)
3524
3525 If this is a window DC or memory DC, assigns the given palette to the
3526 window or bitmap associated with the DC. If the argument is
3527 ``wx.NullPalette``, the current palette is selected out of the device
3528 context, and the original palette restored.
3529 """
54f9ee45 3530 return _gdi_.DC_SetPalette(*args, **kwargs)
e811c8ce 3531
e811c8ce 3532 def DestroyClippingRegion(*args, **kwargs):
f5b96ee1
RD
3533 """
3534 DestroyClippingRegion(self)
3535
3536 Destroys the current clipping region so that none of the DC is
3537 clipped.
3538 """
54f9ee45 3539 return _gdi_.DC_DestroyClippingRegion(*args, **kwargs)
e811c8ce
RD
3540
3541 def GetClippingBox(*args, **kwargs):
f5b96ee1
RD
3542 """
3543 GetClippingBox() -> (x, y, width, height)
3544
3545 Gets the rectangle surrounding the current clipping region.
3546 """
54f9ee45 3547 return _gdi_.DC_GetClippingBox(*args, **kwargs)
e811c8ce
RD
3548
3549 def GetClippingRect(*args, **kwargs):
f5b96ee1
RD
3550 """
3551 GetClippingRect(self) -> Rect
3552
3553 Gets the rectangle surrounding the current clipping region.
3554 """
54f9ee45 3555 return _gdi_.DC_GetClippingRect(*args, **kwargs)
e811c8ce
RD
3556
3557 def GetCharHeight(*args, **kwargs):
f5b96ee1
RD
3558 """
3559 GetCharHeight(self) -> int
3560
3561 Gets the character height of the currently set font.
3562 """
54f9ee45 3563 return _gdi_.DC_GetCharHeight(*args, **kwargs)
e811c8ce
RD
3564
3565 def GetCharWidth(*args, **kwargs):
f5b96ee1
RD
3566 """
3567 GetCharWidth(self) -> int
3568
3569 Gets the average character width of the currently set font.
3570 """
54f9ee45 3571 return _gdi_.DC_GetCharWidth(*args, **kwargs)
e811c8ce
RD
3572
3573 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
3574 """
3575 GetTextExtent(wxString string) -> (width, height)
3576
3577 Get the width and height of the text using the current font. Only
3578 works for single line strings.
3579 """
54f9ee45 3580 return _gdi_.DC_GetTextExtent(*args, **kwargs)
e811c8ce
RD
3581
3582 def GetFullTextExtent(*args, **kwargs):
0df68c9f
RD
3583 """
3584 GetFullTextExtent(wxString string, Font font=None) ->
3585 (width, height, descent, externalLeading)
322913ce 3586
41e2b43e
RD
3587 Get the width, height, decent and leading of the text using the
3588 current or specified font. Only works for single line strings.
0df68c9f 3589 """
54f9ee45 3590 return _gdi_.DC_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
3591
3592 def GetMultiLineTextExtent(*args, **kwargs):
0df68c9f
RD
3593 """
3594 GetMultiLineTextExtent(wxString string, Font font=None) ->
fc46b7f3 3595 (width, height, lineHeight)
fd2dc343
RD
3596
3597 Get the width, height, decent and leading of the text using the
3598 current or specified font. Works for single as well as multi-line
3599 strings.
0df68c9f 3600 """
54f9ee45 3601 return _gdi_.DC_GetMultiLineTextExtent(*args, **kwargs)
e811c8ce 3602
db914595 3603 def GetPartialTextExtents(*args, **kwargs):
f5b96ee1
RD
3604 """
3605 GetPartialTextExtents(self, text) -> [widths]
3606
3607 Returns a list of integers such that each value is the distance in
3608 pixels from the begining of text to the coresponding character of
3609 *text*. The generic version simply builds a running total of the widths
3610 of each character using GetTextExtent, however if the various
3611 platforms have a native API function that is faster or more accurate
43e8916f 3612 than the generic implementation then it will be used instead.
f5b96ee1 3613 """
54f9ee45 3614 return _gdi_.DC_GetPartialTextExtents(*args, **kwargs)
db914595 3615
e811c8ce 3616 def GetSize(*args, **kwargs):
0df68c9f 3617 """
a95a7133 3618 GetSize(self) -> Size
322913ce 3619
f5b96ee1
RD
3620 This gets the horizontal and vertical resolution in device units. It
3621 can be used to scale graphics to fit the page. For example, if *maxX*
3622 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3623 used in your application, the following code will scale the graphic to
3624 fit on the printer page::
3625
3626 w, h = dc.GetSize()
3627 scaleX = maxX*1.0 / w
3628 scaleY = maxY*1.0 / h
3629 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3630
0df68c9f 3631 """
54f9ee45 3632 return _gdi_.DC_GetSize(*args, **kwargs)
e811c8ce 3633
322913ce 3634 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
3635 """
3636 GetSizeTuple() -> (width, height)
322913ce 3637
f5b96ee1
RD
3638 This gets the horizontal and vertical resolution in device units. It
3639 can be used to scale graphics to fit the page. For example, if *maxX*
3640 and *maxY* represent the maximum horizontal and vertical 'pixel' values
3641 used in your application, the following code will scale the graphic to
3642 fit on the printer page::
3643
3644 w, h = dc.GetSize()
3645 scaleX = maxX*1.0 / w
3646 scaleY = maxY*1.0 / h
3647 dc.SetUserScale(min(scaleX,scaleY),min(scaleX,scaleY))
3648
0df68c9f 3649 """
54f9ee45 3650 return _gdi_.DC_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
3651
3652 def GetSizeMM(*args, **kwargs):
0df68c9f 3653 """
a95a7133 3654 GetSizeMM(self) -> Size
322913ce 3655
0df68c9f
RD
3656 Get the DC size in milimeters.
3657 """
54f9ee45 3658 return _gdi_.DC_GetSizeMM(*args, **kwargs)
e811c8ce 3659
322913ce 3660 def GetSizeMMTuple(*args, **kwargs):
0df68c9f
RD
3661 """
3662 GetSizeMMTuple() -> (width, height)
322913ce 3663
0df68c9f
RD
3664 Get the DC size in milimeters.
3665 """
54f9ee45 3666 return _gdi_.DC_GetSizeMMTuple(*args, **kwargs)
322913ce 3667
e811c8ce 3668 def DeviceToLogicalX(*args, **kwargs):
f5b96ee1
RD
3669 """
3670 DeviceToLogicalX(self, int x) -> int
3671
3672 Convert device X coordinate to logical coordinate, using the current
3673 mapping mode.
3674 """
54f9ee45 3675 return _gdi_.DC_DeviceToLogicalX(*args, **kwargs)
e811c8ce
RD
3676
3677 def DeviceToLogicalY(*args, **kwargs):
f5b96ee1
RD
3678 """
3679 DeviceToLogicalY(self, int y) -> int
3680
3681 Converts device Y coordinate to logical coordinate, using the current
3682 mapping mode.
3683 """
54f9ee45 3684 return _gdi_.DC_DeviceToLogicalY(*args, **kwargs)
e811c8ce
RD
3685
3686 def DeviceToLogicalXRel(*args, **kwargs):
f5b96ee1
RD
3687 """
3688 DeviceToLogicalXRel(self, int x) -> int
3689
3690 Convert device X coordinate to relative logical coordinate, using the
3691 current mapping mode but ignoring the x axis orientation. Use this
3692 function for converting a width, for example.
3693 """
54f9ee45 3694 return _gdi_.DC_DeviceToLogicalXRel(*args, **kwargs)
e811c8ce
RD
3695
3696 def DeviceToLogicalYRel(*args, **kwargs):
f5b96ee1
RD
3697 """
3698 DeviceToLogicalYRel(self, int y) -> int
3699
3700 Convert device Y coordinate to relative logical coordinate, using the
3701 current mapping mode but ignoring the y axis orientation. Use this
3702 function for converting a height, for example.
3703 """
54f9ee45 3704 return _gdi_.DC_DeviceToLogicalYRel(*args, **kwargs)
e811c8ce
RD
3705
3706 def LogicalToDeviceX(*args, **kwargs):
f5b96ee1
RD
3707 """
3708 LogicalToDeviceX(self, int x) -> int
3709
3710 Converts logical X coordinate to device coordinate, using the current
3711 mapping mode.
3712 """
54f9ee45 3713 return _gdi_.DC_LogicalToDeviceX(*args, **kwargs)
e811c8ce
RD
3714
3715 def LogicalToDeviceY(*args, **kwargs):
f5b96ee1
RD
3716 """
3717 LogicalToDeviceY(self, int y) -> int
3718
3719 Converts logical Y coordinate to device coordinate, using the current
3720 mapping mode.
3721 """
54f9ee45 3722 return _gdi_.DC_LogicalToDeviceY(*args, **kwargs)
e811c8ce
RD
3723
3724 def LogicalToDeviceXRel(*args, **kwargs):
f5b96ee1
RD
3725 """
3726 LogicalToDeviceXRel(self, int x) -> int
3727
3728 Converts logical X coordinate to relative device coordinate, using the
3729 current mapping mode but ignoring the x axis orientation. Use this for
3730 converting a width, for example.
3731 """
54f9ee45 3732 return _gdi_.DC_LogicalToDeviceXRel(*args, **kwargs)
e811c8ce
RD
3733
3734 def LogicalToDeviceYRel(*args, **kwargs):
f5b96ee1
RD
3735 """
3736 LogicalToDeviceYRel(self, int y) -> int
3737
3738 Converts logical Y coordinate to relative device coordinate, using the
3739 current mapping mode but ignoring the y axis orientation. Use this for
3740 converting a height, for example.
3741 """
54f9ee45 3742 return _gdi_.DC_LogicalToDeviceYRel(*args, **kwargs)
e811c8ce
RD
3743
3744 def CanDrawBitmap(*args, **kwargs):
a95a7133 3745 """CanDrawBitmap(self) -> bool"""
54f9ee45 3746 return _gdi_.DC_CanDrawBitmap(*args, **kwargs)
e811c8ce
RD
3747
3748 def CanGetTextExtent(*args, **kwargs):
a95a7133 3749 """CanGetTextExtent(self) -> bool"""
54f9ee45 3750 return _gdi_.DC_CanGetTextExtent(*args, **kwargs)
e811c8ce
RD
3751
3752 def GetDepth(*args, **kwargs):
f5b96ee1
RD
3753 """
3754 GetDepth(self) -> int
3755
3756 Returns the colour depth of the DC.
3757 """
54f9ee45 3758 return _gdi_.DC_GetDepth(*args, **kwargs)
e811c8ce
RD
3759
3760 def GetPPI(*args, **kwargs):
f5b96ee1
RD
3761 """
3762 GetPPI(self) -> Size
3763
453fb36b 3764 Resolution in pixels per inch
f5b96ee1 3765 """
54f9ee45 3766 return _gdi_.DC_GetPPI(*args, **kwargs)
e811c8ce
RD
3767
3768 def Ok(*args, **kwargs):
f5b96ee1
RD
3769 """
3770 Ok(self) -> bool
3771
3772 Returns true if the DC is ok to use.
3773 """
54f9ee45 3774 return _gdi_.DC_Ok(*args, **kwargs)
e811c8ce
RD
3775
3776 def GetBackgroundMode(*args, **kwargs):
f5b96ee1
RD
3777 """
3778 GetBackgroundMode(self) -> int
3779
3780 Returns the current background mode, either ``wx.SOLID`` or
3781 ``wx.TRANSPARENT``.
3782 """
54f9ee45 3783 return _gdi_.DC_GetBackgroundMode(*args, **kwargs)
e811c8ce
RD
3784
3785 def GetBackground(*args, **kwargs):
f5b96ee1
RD
3786 """
3787 GetBackground(self) -> Brush
3788
3789 Gets the brush used for painting the background.
3790 """
54f9ee45 3791 return _gdi_.DC_GetBackground(*args, **kwargs)
e811c8ce
RD
3792
3793 def GetBrush(*args, **kwargs):
f5b96ee1
RD
3794 """
3795 GetBrush(self) -> Brush
3796
3797 Gets the current brush
3798 """
54f9ee45 3799 return _gdi_.DC_GetBrush(*args, **kwargs)
e811c8ce
RD
3800
3801 def GetFont(*args, **kwargs):
f5b96ee1
RD
3802 """
3803 GetFont(self) -> Font
3804
3805 Gets the current font
3806 """
54f9ee45 3807 return _gdi_.DC_GetFont(*args, **kwargs)
e811c8ce
RD
3808
3809 def GetPen(*args, **kwargs):
f5b96ee1
RD
3810 """
3811 GetPen(self) -> Pen
3812
3813 Gets the current pen
3814 """
54f9ee45 3815 return _gdi_.DC_GetPen(*args, **kwargs)
e811c8ce
RD
3816
3817 def GetTextBackground(*args, **kwargs):
f5b96ee1
RD
3818 """
3819 GetTextBackground(self) -> Colour
3820
3821 Gets the current text background colour
3822 """
54f9ee45 3823 return _gdi_.DC_GetTextBackground(*args, **kwargs)
e811c8ce
RD
3824
3825 def GetTextForeground(*args, **kwargs):
f5b96ee1
RD
3826 """
3827 GetTextForeground(self) -> Colour
3828
3829 Gets the current text foreground colour
3830 """
54f9ee45 3831 return _gdi_.DC_GetTextForeground(*args, **kwargs)
e811c8ce
RD
3832
3833 def SetTextForeground(*args, **kwargs):
f5b96ee1
RD
3834 """
3835 SetTextForeground(self, Colour colour)
3836
3837 Sets the current text foreground colour for the DC.
3838 """
54f9ee45 3839 return _gdi_.DC_SetTextForeground(*args, **kwargs)
e811c8ce
RD
3840
3841 def SetTextBackground(*args, **kwargs):
f5b96ee1
RD
3842 """
3843 SetTextBackground(self, Colour colour)
3844
3845 Sets the current text background colour for the DC.
3846 """
54f9ee45 3847 return _gdi_.DC_SetTextBackground(*args, **kwargs)
e811c8ce
RD
3848
3849 def GetMapMode(*args, **kwargs):
f5b96ee1
RD
3850 """
3851 GetMapMode(self) -> int
3852
3853 Gets the current *mapping mode* for the device context
3854 """
54f9ee45 3855 return _gdi_.DC_GetMapMode(*args, **kwargs)
e811c8ce
RD
3856
3857 def SetMapMode(*args, **kwargs):
f5b96ee1
RD
3858 """
3859 SetMapMode(self, int mode)
3860
3861 The *mapping mode* of the device context defines the unit of
3862 measurement used to convert logical units to device units. The
3863 mapping mode can be one of the following:
3864
3865 ================ =============================================
3866 wx.MM_TWIPS Each logical unit is 1/20 of a point, or 1/1440
3867 of an inch.
3868 wx.MM_POINTS Each logical unit is a point, or 1/72 of an inch.
3869 wx.MM_METRIC Each logical unit is 1 mm.
3870 wx.MM_LOMETRIC Each logical unit is 1/10 of a mm.
3871 wx.MM_TEXT Each logical unit is 1 pixel.
3872 ================ =============================================
3873
3874 """
54f9ee45 3875 return _gdi_.DC_SetMapMode(*args, **kwargs)
e811c8ce
RD
3876
3877 def GetUserScale(*args, **kwargs):
f5b96ee1
RD
3878 """
3879 GetUserScale(self) -> (xScale, yScale)
3880
3881 Gets the current user scale factor (set by `SetUserScale`).
3882 """
54f9ee45 3883 return _gdi_.DC_GetUserScale(*args, **kwargs)
e811c8ce
RD
3884
3885 def SetUserScale(*args, **kwargs):
f5b96ee1
RD
3886 """
3887 SetUserScale(self, double x, double y)
3888
3889 Sets the user scaling factor, useful for applications which require
3890 'zooming'.
3891 """
54f9ee45 3892 return _gdi_.DC_SetUserScale(*args, **kwargs)
e811c8ce
RD
3893
3894 def GetLogicalScale(*args, **kwargs):
322913ce 3895 """GetLogicalScale() -> (xScale, yScale)"""
54f9ee45 3896 return _gdi_.DC_GetLogicalScale(*args, **kwargs)
e811c8ce
RD
3897
3898 def SetLogicalScale(*args, **kwargs):
a95a7133 3899 """SetLogicalScale(self, double x, double y)"""
54f9ee45 3900 return _gdi_.DC_SetLogicalScale(*args, **kwargs)
e811c8ce 3901
e811c8ce 3902 def GetLogicalOrigin(*args, **kwargs):
a95a7133 3903 """GetLogicalOrigin(self) -> Point"""
54f9ee45 3904 return _gdi_.DC_GetLogicalOrigin(*args, **kwargs)
e811c8ce 3905
322913ce
RD
3906 def GetLogicalOriginTuple(*args, **kwargs):
3907 """GetLogicalOriginTuple() -> (x,y)"""
54f9ee45 3908 return _gdi_.DC_GetLogicalOriginTuple(*args, **kwargs)
322913ce 3909
e811c8ce 3910 def SetLogicalOrigin(*args, **kwargs):
a95a7133 3911 """SetLogicalOrigin(self, int x, int y)"""
54f9ee45 3912 return _gdi_.DC_SetLogicalOrigin(*args, **kwargs)
e811c8ce 3913
03e37cd5
RD
3914 def SetLogicalOriginPoint(*args, **kwargs):
3915 """SetLogicalOriginPoint(self, Point point)"""
3916 return _gdi_.DC_SetLogicalOriginPoint(*args, **kwargs)
3917
e811c8ce 3918 def GetDeviceOrigin(*args, **kwargs):
a95a7133 3919 """GetDeviceOrigin(self) -> Point"""
54f9ee45 3920 return _gdi_.DC_GetDeviceOrigin(*args, **kwargs)
e811c8ce 3921
322913ce
RD
3922 def GetDeviceOriginTuple(*args, **kwargs):
3923 """GetDeviceOriginTuple() -> (x,y)"""
54f9ee45 3924 return _gdi_.DC_GetDeviceOriginTuple(*args, **kwargs)
322913ce 3925
e811c8ce 3926 def SetDeviceOrigin(*args, **kwargs):
a95a7133 3927 """SetDeviceOrigin(self, int x, int y)"""
54f9ee45 3928 return _gdi_.DC_SetDeviceOrigin(*args, **kwargs)
e811c8ce 3929
03e37cd5
RD
3930 def SetDeviceOriginPoint(*args, **kwargs):
3931 """SetDeviceOriginPoint(self, Point point)"""
3932 return _gdi_.DC_SetDeviceOriginPoint(*args, **kwargs)
3933
e811c8ce 3934 def SetAxisOrientation(*args, **kwargs):
f5b96ee1
RD
3935 """
3936 SetAxisOrientation(self, bool xLeftRight, bool yBottomUp)
3937
3938 Sets the x and y axis orientation (i.e., the direction from lowest to
3939 highest values on the axis). The default orientation is the natural
3940 orientation, e.g. x axis from left to right and y axis from bottom up.
3941 """
54f9ee45 3942 return _gdi_.DC_SetAxisOrientation(*args, **kwargs)
e811c8ce
RD
3943
3944 def GetLogicalFunction(*args, **kwargs):
f5b96ee1
RD
3945 """
3946 GetLogicalFunction(self) -> int
3947
3948 Gets the current logical function (set by `SetLogicalFunction`).
3949 """
54f9ee45 3950 return _gdi_.DC_GetLogicalFunction(*args, **kwargs)
e811c8ce
RD
3951
3952 def SetLogicalFunction(*args, **kwargs):
f5b96ee1
RD
3953 """
3954 SetLogicalFunction(self, int function)
3955
3956 Sets the current logical function for the device context. This
3957 determines how a source pixel (from a pen or brush colour, or source
3958 device context if using `Blit`) combines with a destination pixel in
3959 the current device context.
3960
3961 The possible values and their meaning in terms of source and
3962 destination pixel values are as follows:
3963
3964 ================ ==========================
3965 wx.AND src AND dst
3966 wx.AND_INVERT (NOT src) AND dst
3967 wx.AND_REVERSE src AND (NOT dst)
3968 wx.CLEAR 0
3969 wx.COPY src
3970 wx.EQUIV (NOT src) XOR dst
3971 wx.INVERT NOT dst
3972 wx.NAND (NOT src) OR (NOT dst)
3973 wx.NOR (NOT src) AND (NOT dst)
3974 wx.NO_OP dst
3975 wx.OR src OR dst
3976 wx.OR_INVERT (NOT src) OR dst
3977 wx.OR_REVERSE src OR (NOT dst)
3978 wx.SET 1
3979 wx.SRC_INVERT NOT src
3980 wx.XOR src XOR dst
3981 ================ ==========================
3982
3983 The default is wx.COPY, which simply draws with the current
3984 colour. The others combine the current colour and the background using
3985 a logical operation. wx.INVERT is commonly used for drawing rubber
3986 bands or moving outlines, since drawing twice reverts to the original
3987 colour.
3988
3989 """
54f9ee45 3990 return _gdi_.DC_SetLogicalFunction(*args, **kwargs)
e811c8ce 3991
5cbf236d 3992 def ComputeScaleAndOrigin(*args, **kwargs):
f5b96ee1 3993 """
5cbf236d 3994 ComputeScaleAndOrigin(self)
f5b96ee1 3995
5cbf236d
RD
3996 Performs all necessary computations for given platform and context
3997 type after each change of scale and origin parameters. Usually called
3998 automatically internally after such changes.
f5b96ee1 3999
f5b96ee1 4000 """
5cbf236d 4001 return _gdi_.DC_ComputeScaleAndOrigin(*args, **kwargs)
e811c8ce 4002
5cbf236d
RD
4003 def SetOptimization(self, optimize):
4004 pass
4005 def GetOptimization(self):
4006 return False
f5b96ee1 4007
5cbf236d
RD
4008 SetOptimization = wx._deprecated(SetOptimization)
4009 GetOptimization = wx._deprecated(GetOptimization)
e811c8ce
RD
4010
4011 def CalcBoundingBox(*args, **kwargs):
f5b96ee1
RD
4012 """
4013 CalcBoundingBox(self, int x, int y)
4014
4015 Adds the specified point to the bounding box which can be retrieved
4016 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4017 """
54f9ee45 4018 return _gdi_.DC_CalcBoundingBox(*args, **kwargs)
e811c8ce 4019
03e37cd5 4020 def CalcBoundingBoxPoint(*args, **kwargs):
f5b96ee1
RD
4021 """
4022 CalcBoundingBoxPoint(self, Point point)
4023
4024 Adds the specified point to the bounding box which can be retrieved
4025 with `MinX`, `MaxX` and `MinY`, `MaxY` or `GetBoundingBox` functions.
4026 """
03e37cd5
RD
4027 return _gdi_.DC_CalcBoundingBoxPoint(*args, **kwargs)
4028
e811c8ce 4029 def ResetBoundingBox(*args, **kwargs):
f5b96ee1
RD
4030 """
4031 ResetBoundingBox(self)
4032
4033 Resets the bounding box: after a call to this function, the bounding
4034 box doesn't contain anything.
4035 """
54f9ee45 4036 return _gdi_.DC_ResetBoundingBox(*args, **kwargs)
e811c8ce
RD
4037
4038 def MinX(*args, **kwargs):
f5b96ee1
RD
4039 """
4040 MinX(self) -> int
4041
4042 Gets the minimum horizontal extent used in drawing commands so far.
4043 """
54f9ee45 4044 return _gdi_.DC_MinX(*args, **kwargs)
e811c8ce
RD
4045
4046 def MaxX(*args, **kwargs):
f5b96ee1
RD
4047 """
4048 MaxX(self) -> int
4049
4050 Gets the maximum horizontal extent used in drawing commands so far.
4051 """
54f9ee45 4052 return _gdi_.DC_MaxX(*args, **kwargs)
e811c8ce
RD
4053
4054 def MinY(*args, **kwargs):
f5b96ee1
RD
4055 """
4056 MinY(self) -> int
4057
4058 Gets the minimum vertical extent used in drawing commands so far.
4059 """
54f9ee45 4060 return _gdi_.DC_MinY(*args, **kwargs)
e811c8ce
RD
4061
4062 def MaxY(*args, **kwargs):
f5b96ee1
RD
4063 """
4064 MaxY(self) -> int
4065
4066 Gets the maximum vertical extent used in drawing commands so far.
4067 """
54f9ee45 4068 return _gdi_.DC_MaxY(*args, **kwargs)
e811c8ce
RD
4069
4070 def GetBoundingBox(*args, **kwargs):
f5b96ee1
RD
4071 """
4072 GetBoundingBox() -> (x1,y1, x2,y2)
4073
4074 Returns the min and max points used in drawing commands so far.
4075 """
54f9ee45 4076 return _gdi_.DC_GetBoundingBox(*args, **kwargs)
e811c8ce 4077
d14a1e28 4078 def __nonzero__(self): return self.Ok()
e811c8ce 4079 def _DrawPointList(*args, **kwargs):
a95a7133 4080 """_DrawPointList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4081 return _gdi_.DC__DrawPointList(*args, **kwargs)
e811c8ce
RD
4082
4083 def _DrawLineList(*args, **kwargs):
a95a7133 4084 """_DrawLineList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4085 return _gdi_.DC__DrawLineList(*args, **kwargs)
e811c8ce
RD
4086
4087 def _DrawRectangleList(*args, **kwargs):
a95a7133 4088 """_DrawRectangleList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4089 return _gdi_.DC__DrawRectangleList(*args, **kwargs)
e811c8ce
RD
4090
4091 def _DrawEllipseList(*args, **kwargs):
a95a7133 4092 """_DrawEllipseList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4093 return _gdi_.DC__DrawEllipseList(*args, **kwargs)
e811c8ce
RD
4094
4095 def _DrawPolygonList(*args, **kwargs):
a95a7133 4096 """_DrawPolygonList(self, PyObject pyCoords, PyObject pyPens, PyObject pyBrushes) -> PyObject"""
54f9ee45 4097 return _gdi_.DC__DrawPolygonList(*args, **kwargs)
e811c8ce
RD
4098
4099 def _DrawTextList(*args, **kwargs):
0df68c9f 4100 """
a95a7133 4101 _DrawTextList(self, PyObject textList, PyObject pyPoints, PyObject foregroundList,
0df68c9f
RD
4102 PyObject backgroundList) -> PyObject
4103 """
54f9ee45 4104 return _gdi_.DC__DrawTextList(*args, **kwargs)
e811c8ce 4105
3bcd5e1c 4106 def DrawPointList(self, points, pens=None):
f5b96ee1
RD
4107 """
4108 Draw a list of points as quickly as possible.
4109
4110 :param points: A sequence of 2-element sequences representing
4111 each point to draw, (x,y).
4112 :param pens: If None, then the current pen is used. If a
4113 single pen then it will be used for all points. If
4114 a list of pens then there should be one for each point
4115 in points.
4116 """
3bcd5e1c
RD
4117 if pens is None:
4118 pens = []
d14a1e28 4119 elif isinstance(pens, wx.Pen):
3bcd5e1c
RD
4120 pens = [pens]
4121 elif len(pens) != len(points):
4122 raise ValueError('points and pens must have same length')
b67a9327
RD
4123 return self._DrawPointList(points, pens, [])
4124
3bcd5e1c
RD
4125
4126 def DrawLineList(self, lines, pens=None):
f5b96ee1
RD
4127 """
4128 Draw a list of lines as quickly as possible.
4129
4130 :param lines: A sequence of 4-element sequences representing
4131 each line to draw, (x1,y1, x2,y2).
4132 :param pens: If None, then the current pen is used. If a
4133 single pen then it will be used for all lines. If
4134 a list of pens then there should be one for each line
4135 in lines.
4136 """
3bcd5e1c
RD
4137 if pens is None:
4138 pens = []
d14a1e28 4139 elif isinstance(pens, wx.Pen):
3bcd5e1c
RD
4140 pens = [pens]
4141 elif len(pens) != len(lines):
4142 raise ValueError('lines and pens must have same length')
b67a9327
RD
4143 return self._DrawLineList(lines, pens, [])
4144
4145
4146 def DrawRectangleList(self, rectangles, pens=None, brushes=None):
f5b96ee1
RD
4147 """
4148 Draw a list of rectangles as quickly as possible.
4149
4150 :param rectangles: A sequence of 4-element sequences representing
4151 each rectangle to draw, (x,y, w,h).
4152 :param pens: If None, then the current pen is used. If a
4153 single pen then it will be used for all rectangles.
4154 If a list of pens then there should be one for each
4155 rectangle in rectangles.
4156 :param brushes: A brush or brushes to be used to fill the rectagles,
4157 with similar semantics as the pens parameter.
4158 """
b67a9327
RD
4159 if pens is None:
4160 pens = []
d14a1e28 4161 elif isinstance(pens, wx.Pen):
b67a9327
RD
4162 pens = [pens]
4163 elif len(pens) != len(rectangles):
4164 raise ValueError('rectangles and pens must have same length')
4165 if brushes is None:
4166 brushes = []
d14a1e28 4167 elif isinstance(brushes, wx.Brush):
b67a9327
RD
4168 brushes = [brushes]
4169 elif len(brushes) != len(rectangles):
4170 raise ValueError('rectangles and brushes must have same length')
4171 return self._DrawRectangleList(rectangles, pens, brushes)
4172
4173
4174 def DrawEllipseList(self, ellipses, pens=None, brushes=None):
f5b96ee1
RD
4175 """
4176 Draw a list of ellipses as quickly as possible.
4177
4178 :param ellipses: A sequence of 4-element sequences representing
4179 each ellipse to draw, (x,y, w,h).
4180 :param pens: If None, then the current pen is used. If a
4181 single pen then it will be used for all ellipses.
4182 If a list of pens then there should be one for each
4183 ellipse in ellipses.
4184 :param brushes: A brush or brushes to be used to fill the ellipses,
4185 with similar semantics as the pens parameter.
4186 """
b67a9327
RD
4187 if pens is None:
4188 pens = []
d14a1e28 4189 elif isinstance(pens, wx.Pen):
b67a9327
RD
4190 pens = [pens]
4191 elif len(pens) != len(ellipses):
4192 raise ValueError('ellipses and pens must have same length')
4193 if brushes is None:
4194 brushes = []
d14a1e28 4195 elif isinstance(brushes, wx.Brush):
b67a9327
RD
4196 brushes = [brushes]
4197 elif len(brushes) != len(ellipses):
4198 raise ValueError('ellipses and brushes must have same length')
4199 return self._DrawEllipseList(ellipses, pens, brushes)
4200
4201
4202 def DrawPolygonList(self, polygons, pens=None, brushes=None):
f5b96ee1
RD
4203 """
4204 Draw a list of polygons, each of which is a list of points.
4205
4206 :param polygons: A sequence of sequences of sequences.
4207 [[(x1,y1),(x2,y2),(x3,y3)...],
4208 [(x1,y1),(x2,y2),(x3,y3)...]]
4209
4210 :param pens: If None, then the current pen is used. If a
4211 single pen then it will be used for all polygons.
4212 If a list of pens then there should be one for each
4213 polygon.
4214 :param brushes: A brush or brushes to be used to fill the polygons,
4215 with similar semantics as the pens parameter.
4216 """
b67a9327
RD
4217 if pens is None:
4218 pens = []
d14a1e28 4219 elif isinstance(pens, wx.Pen):
b67a9327
RD
4220 pens = [pens]
4221 elif len(pens) != len(polygons):
4222 raise ValueError('polygons and pens must have same length')
4223 if brushes is None:
4224 brushes = []
d14a1e28 4225 elif isinstance(brushes, wx.Brush):
b67a9327
RD
4226 brushes = [brushes]
4227 elif len(brushes) != len(polygons):
4228 raise ValueError('polygons and brushes must have same length')
4229 return self._DrawPolygonList(polygons, pens, brushes)
4230
4231
f5b96ee1
RD
4232 def DrawTextList(self, textList, coords, foregrounds = None, backgrounds = None):
4233 """
4234 Draw a list of strings using a list of coordinants for positioning each string.
4235
4236 :param textList: A list of strings
4237 :param coords: A list of (x,y) positions
4238 :param foregrounds: A list of `wx.Colour` objects to use for the
4239 foregrounds of the strings.
4240 :param backgrounds: A list of `wx.Colour` objects to use for the
4241 backgrounds of the strings.
4242
4243 NOTE: Make sure you set Background mode to wx.Solid (DC.SetBackgroundMode)
4244 If you want backgrounds to do anything.
4245 """
b67a9327
RD
4246 if type(textList) == type(''):
4247 textList = [textList]
4248 elif len(textList) != len(coords):
4249 raise ValueError('textlist and coords must have same length')
4250 if foregrounds is None:
4251 foregrounds = []
fd3f2efe 4252 elif isinstance(foregrounds, wx.Colour):
b67a9327
RD
4253 foregrounds = [foregrounds]
4254 elif len(foregrounds) != len(coords):
4255 raise ValueError('foregrounds and coords must have same length')
4256 if backgrounds is None:
4257 backgrounds = []
fd3f2efe 4258 elif isinstance(backgrounds, wx.Colour):
b67a9327
RD
4259 backgrounds = [backgrounds]
4260 elif len(backgrounds) != len(coords):
4261 raise ValueError('backgrounds and coords must have same length')
4262 return self._DrawTextList(textList, coords, foregrounds, backgrounds)
3bcd5e1c 4263
2131d850 4264_gdi_.DC_swigregister(DC)
70551f47 4265
d14a1e28 4266#---------------------------------------------------------------------------
70551f47 4267
d14a1e28 4268class MemoryDC(DC):
f5b96ee1
RD
4269 """
4270 A memory device context provides a means to draw graphics onto a
4271 bitmap. A bitmap must be selected into the new memory DC before it may
4272 be used for anything. Typical usage is as follows::
4273
4274 dc = wx.MemoryDC()
4275 dc.SelectObject(bitmap)
4276 # draw on the dc usign any of the Draw methods
4277 dc.SelectObject(wx.NullBitmap)
4278 # the bitmap now contains wahtever was drawn upon it
4279
4280 Note that the memory DC *must* be deleted (or the bitmap selected out
4281 of it) before a bitmap can be reselected into another memory DC.
4282
4283 """
0085ce49
RD
4284 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4285 __repr__ = _swig_repr
4286 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4287 """
4288 __init__(self) -> MemoryDC
4289
4290 Constructs a new memory device context.
4291
4292 Use the Ok member to test whether the constructor was successful in
4293 creating a usable device context. Don't forget to select a bitmap into
4294 the DC before drawing on it.
4295 """
0085ce49 4296 _gdi_.MemoryDC_swiginit(self,_gdi_.new_MemoryDC(*args, **kwargs))
e811c8ce 4297 def SelectObject(*args, **kwargs):
f5b96ee1
RD
4298 """
4299 SelectObject(self, Bitmap bitmap)
4300
4301 Selects the bitmap into the device context, to use as the memory
4302 bitmap. Selecting the bitmap into a memory DC allows you to draw into
4303 the DC, and therefore the bitmap, and also to use Blit to copy the
4304 bitmap to a window.
4305
4306 If the argument is wx.NullBitmap (or some other uninitialised
4307 `wx.Bitmap`) the current bitmap is selected out of the device context,
4308 and the original bitmap restored, allowing the current bitmap to be
4309 destroyed safely.
4310 """
54f9ee45 4311 return _gdi_.MemoryDC_SelectObject(*args, **kwargs)
e811c8ce 4312
2131d850 4313_gdi_.MemoryDC_swigregister(MemoryDC)
70551f47 4314
d14a1e28 4315def MemoryDCFromDC(*args, **kwargs):
f5b96ee1
RD
4316 """
4317 MemoryDCFromDC(DC oldDC) -> MemoryDC
4318
4319 Creates a DC that is compatible with the oldDC.
4320 """
54f9ee45 4321 val = _gdi_.new_MemoryDCFromDC(*args, **kwargs)
d14a1e28 4322 return val
70551f47 4323
d14a1e28 4324#---------------------------------------------------------------------------
70551f47 4325
e2950dbb
RD
4326BUFFER_VIRTUAL_AREA = _gdi_.BUFFER_VIRTUAL_AREA
4327BUFFER_CLIENT_AREA = _gdi_.BUFFER_CLIENT_AREA
d14a1e28 4328class BufferedDC(MemoryDC):
f5b96ee1
RD
4329 """
4330 This simple class provides a simple way to avoid flicker: when drawing
4331 on it, everything is in fact first drawn on an in-memory buffer (a
4332 `wx.Bitmap`) and then copied to the screen only once, when this object
4333 is destroyed.
4334
4335 It can be used in the same way as any other device
4336 context. wx.BufferedDC itself typically replaces `wx.ClientDC`, if you
4337 want to use it in your EVT_PAINT handler, you should look at
4338 `wx.BufferedPaintDC`.
4339
4340 """
0085ce49
RD
4341 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4342 __repr__ = _swig_repr
4343 def __init__(self, *args):
3adfb63b 4344 """
8f4d7c19 4345 __init__(self, DC dc, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedDC
e2950dbb 4346 __init__(self, DC dc, Size area, int style=BUFFER_CLIENT_AREA) -> BufferedDC
f5b96ee1
RD
4347
4348 Constructs a buffered DC.
3adfb63b 4349 """
0085ce49 4350 _gdi_.BufferedDC_swiginit(self,_gdi_.new_BufferedDC(*args))
f5b96ee1 4351 self.__dc = args[0] # save a ref so the other dc will not be deleted before self
e811c8ce 4352
0085ce49
RD
4353 __swig_destroy__ = _gdi_.delete_BufferedDC
4354 __del__ = lambda self : None;
e811c8ce 4355 def UnMask(*args, **kwargs):
f5b96ee1
RD
4356 """
4357 UnMask(self)
4358
4359 Blits the buffer to the dc, and detaches the dc from the buffer (so it
4360 can be effectively used once only). This is usually only called in
4361 the destructor.
4362 """
54f9ee45 4363 return _gdi_.BufferedDC_UnMask(*args, **kwargs)
e811c8ce 4364
2131d850 4365_gdi_.BufferedDC_swigregister(BufferedDC)
a884bee5 4366
d14a1e28 4367class BufferedPaintDC(BufferedDC):
f5b96ee1
RD
4368 """
4369 This is a subclass of `wx.BufferedDC` which can be used inside of an
4370 EVT_PAINT event handler. Just create an object of this class instead
4371 of `wx.PaintDC` and that's all you have to do to (mostly) avoid
4372 flicker. The only thing to watch out for is that if you are using this
4373 class together with `wx.ScrolledWindow`, you probably do **not** want
4374 to call `wx.Window.PrepareDC` on it as it already does this internally
4375 for the real underlying `wx.PaintDC`.
4376
4377 If your window is already fully buffered in a `wx.Bitmap` then your
4378 EVT_PAINT handler can be as simple as just creating a
4379 ``wx.BufferedPaintDC`` as it will `Blit` the buffer to the window
4380 automatically when it is destroyed. For example::
4381
4382 def OnPaint(self, event):
4383 dc = wx.BufferedPaintDC(self, self.buffer)
4384
4385
4386
e2950dbb
RD
4387
4388
f5b96ee1 4389 """
0085ce49
RD
4390 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4391 __repr__ = _swig_repr
4392 def __init__(self, *args, **kwargs):
f5b96ee1 4393 """
e2950dbb 4394 __init__(self, Window window, Bitmap buffer=NullBitmap, int style=BUFFER_CLIENT_AREA) -> BufferedPaintDC
f5b96ee1
RD
4395
4396 Create a buffered paint DC. As with `wx.BufferedDC`, you may either
4397 provide the bitmap to be used for buffering or let this object create
4398 one internally (in the latter case, the size of the client part of the
4399 window is automatically used).
4400
4401
4402 """
0085ce49 4403 _gdi_.BufferedPaintDC_swiginit(self,_gdi_.new_BufferedPaintDC(*args, **kwargs))
2131d850 4404_gdi_.BufferedPaintDC_swigregister(BufferedPaintDC)
a884bee5 4405
d14a1e28 4406#---------------------------------------------------------------------------
a884bee5 4407
d14a1e28 4408class ScreenDC(DC):
f5b96ee1
RD
4409 """
4410 A wxScreenDC can be used to paint anywhere on the screen. This should
4411 normally be constructed as a temporary stack object; don't store a
4412 wxScreenDC object.
4413
4414 """
0085ce49
RD
4415 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4416 __repr__ = _swig_repr
4417 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4418 """
4419 __init__(self) -> ScreenDC
4420
4421 A wxScreenDC can be used to paint anywhere on the screen. This should
4422 normally be constructed as a temporary stack object; don't store a
4423 wxScreenDC object.
4424
4425 """
0085ce49 4426 _gdi_.ScreenDC_swiginit(self,_gdi_.new_ScreenDC(*args, **kwargs))
e811c8ce 4427 def StartDrawingOnTopWin(*args, **kwargs):
f5b96ee1
RD
4428 """
4429 StartDrawingOnTopWin(self, Window window) -> bool
4430
4431 Specify that the area of the screen to be drawn upon coincides with
4432 the given window.
4433
4434 :see: `EndDrawingOnTop`
4435 """
54f9ee45 4436 return _gdi_.ScreenDC_StartDrawingOnTopWin(*args, **kwargs)
e811c8ce
RD
4437
4438 def StartDrawingOnTop(*args, **kwargs):
f5b96ee1
RD
4439 """
4440 StartDrawingOnTop(self, Rect rect=None) -> bool
4441
4442 Specify that the area is the given rectangle, or the whole screen if
4443 ``None`` is passed.
4444
4445 :see: `EndDrawingOnTop`
4446 """
54f9ee45 4447 return _gdi_.ScreenDC_StartDrawingOnTop(*args, **kwargs)
e811c8ce
RD
4448
4449 def EndDrawingOnTop(*args, **kwargs):
f5b96ee1
RD
4450 """
4451 EndDrawingOnTop(self) -> bool
4452
4453 Use this in conjunction with `StartDrawingOnTop` or
4454 `StartDrawingOnTopWin` to ensure that drawing to the screen occurs on
4455 top of existing windows. Without this, some window systems (such as X)
4456 only allow drawing to take place underneath other windows.
4457
4458 You might use this pair of functions when implementing a drag feature,
4459 for example as in the `wx.SplitterWindow` implementation.
4460
4461 These functions are probably obsolete since the X implementations
4462 allow drawing directly on the screen now. However, the fact that this
4463 function allows the screen to be refreshed afterwards may be useful
4464 to some applications.
4465 """
54f9ee45 4466 return _gdi_.ScreenDC_EndDrawingOnTop(*args, **kwargs)
e811c8ce 4467
2131d850 4468_gdi_.ScreenDC_swigregister(ScreenDC)
70551f47 4469
d14a1e28 4470#---------------------------------------------------------------------------
70551f47 4471
d14a1e28 4472class ClientDC(DC):
f5b96ee1
RD
4473 """
4474 A wx.ClientDC must be constructed if an application wishes to paint on
4475 the client area of a window from outside an EVT_PAINT event. This should
4476 normally be constructed as a temporary stack object; don't store a
4477 wx.ClientDC object long term.
4478
4479 To draw on a window from within an EVT_PAINT handler, construct a
4480 `wx.PaintDC` object.
4481
4482 To draw on the whole window including decorations, construct a
4483 `wx.WindowDC` object (Windows only).
4484
4485 """
0085ce49
RD
4486 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4487 __repr__ = _swig_repr
4488 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4489 """
4490 __init__(self, Window win) -> ClientDC
4491
4492 Constructor. Pass the window on which you wish to paint.
4493 """
0085ce49 4494 _gdi_.ClientDC_swiginit(self,_gdi_.new_ClientDC(*args, **kwargs))
2131d850 4495_gdi_.ClientDC_swigregister(ClientDC)
70551f47 4496
d14a1e28 4497#---------------------------------------------------------------------------
70551f47 4498
d14a1e28 4499class PaintDC(DC):
f5b96ee1
RD
4500 """
4501 A wx.PaintDC must be constructed if an application wishes to paint on
4502 the client area of a window from within an EVT_PAINT event
4503 handler. This should normally be constructed as a temporary stack
4504 object; don't store a wx.PaintDC object. If you have an EVT_PAINT
4505 handler, you **must** create a wx.PaintDC object within it even if you
4506 don't actually use it.
4507
4508 Using wx.PaintDC within EVT_PAINT handlers is important because it
4509 automatically sets the clipping area to the damaged area of the
4510 window. Attempts to draw outside this area do not appear.
4511
4512 To draw on a window from outside EVT_PAINT handlers, construct a
4513 `wx.ClientDC` object.
4514
4515 """
0085ce49
RD
4516 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4517 __repr__ = _swig_repr
4518 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4519 """
4520 __init__(self, Window win) -> PaintDC
4521
4522 Constructor. Pass the window on which you wish to paint.
4523 """
0085ce49 4524 _gdi_.PaintDC_swiginit(self,_gdi_.new_PaintDC(*args, **kwargs))
2131d850 4525_gdi_.PaintDC_swigregister(PaintDC)
70551f47 4526
d14a1e28 4527#---------------------------------------------------------------------------
70551f47 4528
d14a1e28 4529class WindowDC(DC):
f5b96ee1
RD
4530 """
4531 A wx.WindowDC must be constructed if an application wishes to paint on
4532 the whole area of a window (client and decorations). This should
4533 normally be constructed as a temporary stack object; don't store a
4534 wx.WindowDC object.
4535 """
0085ce49
RD
4536 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4537 __repr__ = _swig_repr
4538 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4539 """
4540 __init__(self, Window win) -> WindowDC
4541
4542 Constructor. Pass the window on which you wish to paint.
4543 """
0085ce49 4544 _gdi_.WindowDC_swiginit(self,_gdi_.new_WindowDC(*args, **kwargs))
2131d850 4545_gdi_.WindowDC_swigregister(WindowDC)
c95e68d8 4546
d14a1e28 4547#---------------------------------------------------------------------------
c95e68d8 4548
d14a1e28 4549class MirrorDC(DC):
f5b96ee1
RD
4550 """
4551 wx.MirrorDC is a simple wrapper class which is always associated with a
4552 real `wx.DC` object and either forwards all of its operations to it
4553 without changes (no mirroring takes place) or exchanges x and y
4554 coordinates which makes it possible to reuse the same code to draw a
4555 figure and its mirror -- i.e. reflection related to the diagonal line
4556 x == y.
4557 """
0085ce49
RD
4558 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4559 __repr__ = _swig_repr
4560 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4561 """
4562 __init__(self, DC dc, bool mirror) -> MirrorDC
4563
4564 Creates a mirrored DC associated with the real *dc*. Everything drawn
4565 on the wx.MirrorDC will appear on the *dc*, and will be mirrored if
4566 *mirror* is True.
4567 """
0085ce49 4568 _gdi_.MirrorDC_swiginit(self,_gdi_.new_MirrorDC(*args, **kwargs))
2131d850 4569_gdi_.MirrorDC_swigregister(MirrorDC)
3ef86e32 4570
d14a1e28 4571#---------------------------------------------------------------------------
3ef86e32 4572
d14a1e28 4573class PostScriptDC(DC):
f5b96ee1 4574 """This is a `wx.DC` that can write to PostScript files on any platform."""
0085ce49
RD
4575 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4576 __repr__ = _swig_repr
4577 def __init__(self, *args, **kwargs):
f5b96ee1
RD
4578 """
4579 __init__(self, wxPrintData printData) -> PostScriptDC
4580
4581 Constructs a PostScript printer device context from a `wx.PrintData`
4582 object.
4583 """
0085ce49 4584 _gdi_.PostScriptDC_swiginit(self,_gdi_.new_PostScriptDC(*args, **kwargs))
e811c8ce 4585 def GetPrintData(*args, **kwargs):
a95a7133 4586 """GetPrintData(self) -> wxPrintData"""
54f9ee45 4587 return _gdi_.PostScriptDC_GetPrintData(*args, **kwargs)
e811c8ce
RD
4588
4589 def SetPrintData(*args, **kwargs):
a95a7133 4590 """SetPrintData(self, wxPrintData data)"""
54f9ee45 4591 return _gdi_.PostScriptDC_SetPrintData(*args, **kwargs)
e811c8ce
RD
4592
4593 def SetResolution(*args, **kwargs):
f5b96ee1
RD
4594 """
4595 SetResolution(int ppi)
4596
4597 Set resolution (in pixels per inch) that will be used in PostScript
4598 output. Default is 720ppi.
4599 """
54f9ee45 4600 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
e811c8ce
RD
4601
4602 SetResolution = staticmethod(SetResolution)
4603 def GetResolution(*args, **kwargs):
f5b96ee1
RD
4604 """
4605 GetResolution() -> int
4606
4607 Return resolution used in PostScript output.
4608 """
54f9ee45 4609 return _gdi_.PostScriptDC_GetResolution(*args, **kwargs)
e811c8ce
RD
4610
4611 GetResolution = staticmethod(GetResolution)
2131d850 4612_gdi_.PostScriptDC_swigregister(PostScriptDC)
105e45b9 4613
e811c8ce 4614def PostScriptDC_SetResolution(*args, **kwargs):
0085ce49 4615 """
f5b96ee1
RD
4616 PostScriptDC_SetResolution(int ppi)
4617
4618 Set resolution (in pixels per inch) that will be used in PostScript
4619 output. Default is 720ppi.
4620 """
0085ce49 4621 return _gdi_.PostScriptDC_SetResolution(*args, **kwargs)
105e45b9 4622
0085ce49
RD
4623def PostScriptDC_GetResolution(*args):
4624 """
f5b96ee1
RD
4625 PostScriptDC_GetResolution() -> int
4626
4627 Return resolution used in PostScript output.
4628 """
0085ce49 4629 return _gdi_.PostScriptDC_GetResolution(*args)
105e45b9 4630
d14a1e28 4631#---------------------------------------------------------------------------
105e45b9 4632
54f9ee45 4633class MetaFile(_core.Object):
093d3ff1 4634 """Proxy of C++ MetaFile class"""
0085ce49
RD
4635 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4636 __repr__ = _swig_repr
4637 def __init__(self, *args, **kwargs):
a95a7133 4638 """__init__(self, String filename=EmptyString) -> MetaFile"""
0085ce49 4639 _gdi_.MetaFile_swiginit(self,_gdi_.new_MetaFile(*args, **kwargs))
2131d850 4640_gdi_.MetaFile_swigregister(MetaFile)
d14a1e28
RD
4641
4642class MetaFileDC(DC):
093d3ff1 4643 """Proxy of C++ MetaFileDC class"""
0085ce49
RD
4644 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4645 __repr__ = _swig_repr
4646 def __init__(self, *args, **kwargs):
0df68c9f 4647 """
a95a7133 4648 __init__(self, String filename=EmptyString, int width=0, int height=0,
196addbf 4649 String description=EmptyString) -> MetaFileDC
0df68c9f 4650 """
0085ce49 4651 _gdi_.MetaFileDC_swiginit(self,_gdi_.new_MetaFileDC(*args, **kwargs))
2131d850 4652_gdi_.MetaFileDC_swigregister(MetaFileDC)
d14a1e28
RD
4653
4654class PrinterDC(DC):
093d3ff1 4655 """Proxy of C++ PrinterDC class"""
0085ce49
RD
4656 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4657 __repr__ = _swig_repr
4658 def __init__(self, *args, **kwargs):
a95a7133 4659 """__init__(self, wxPrintData printData) -> PrinterDC"""
0085ce49 4660 _gdi_.PrinterDC_swiginit(self,_gdi_.new_PrinterDC(*args, **kwargs))
2131d850 4661_gdi_.PrinterDC_swigregister(PrinterDC)
d14a1e28
RD
4662
4663#---------------------------------------------------------------------------
4664
54f9ee45
RD
4665IMAGELIST_DRAW_NORMAL = _gdi_.IMAGELIST_DRAW_NORMAL
4666IMAGELIST_DRAW_TRANSPARENT = _gdi_.IMAGELIST_DRAW_TRANSPARENT
4667IMAGELIST_DRAW_SELECTED = _gdi_.IMAGELIST_DRAW_SELECTED
4668IMAGELIST_DRAW_FOCUSED = _gdi_.IMAGELIST_DRAW_FOCUSED
4669IMAGE_LIST_NORMAL = _gdi_.IMAGE_LIST_NORMAL
4670IMAGE_LIST_SMALL = _gdi_.IMAGE_LIST_SMALL
4671IMAGE_LIST_STATE = _gdi_.IMAGE_LIST_STATE
4672class ImageList(_core.Object):
093d3ff1 4673 """Proxy of C++ ImageList class"""
0085ce49
RD
4674 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4675 __repr__ = _swig_repr
4676 def __init__(self, *args, **kwargs):
a95a7133 4677 """__init__(self, int width, int height, int mask=True, int initialCount=1) -> ImageList"""
0085ce49
RD
4678 _gdi_.ImageList_swiginit(self,_gdi_.new_ImageList(*args, **kwargs))
4679 __swig_destroy__ = _gdi_.delete_ImageList
4680 __del__ = lambda self : None;
e811c8ce 4681 def Add(*args, **kwargs):
a95a7133 4682 """Add(self, Bitmap bitmap, Bitmap mask=NullBitmap) -> int"""
54f9ee45 4683 return _gdi_.ImageList_Add(*args, **kwargs)
e811c8ce
RD
4684
4685 def AddWithColourMask(*args, **kwargs):
a95a7133 4686 """AddWithColourMask(self, Bitmap bitmap, Colour maskColour) -> int"""
54f9ee45 4687 return _gdi_.ImageList_AddWithColourMask(*args, **kwargs)
e811c8ce
RD
4688
4689 def AddIcon(*args, **kwargs):
a95a7133 4690 """AddIcon(self, Icon icon) -> int"""
54f9ee45 4691 return _gdi_.ImageList_AddIcon(*args, **kwargs)
e811c8ce 4692
b9d6a5f3
RD
4693 def GetBitmap(*args, **kwargs):
4694 """GetBitmap(self, int index) -> Bitmap"""
4695 return _gdi_.ImageList_GetBitmap(*args, **kwargs)
4696
4697 def GetIcon(*args, **kwargs):
4698 """GetIcon(self, int index) -> Icon"""
4699 return _gdi_.ImageList_GetIcon(*args, **kwargs)
4700
e811c8ce 4701 def Replace(*args, **kwargs):
01f6b6d3 4702 """Replace(self, int index, Bitmap bitmap, Bitmap mask=NullBitmap) -> bool"""
54f9ee45 4703 return _gdi_.ImageList_Replace(*args, **kwargs)
e811c8ce
RD
4704
4705 def Draw(*args, **kwargs):
0df68c9f 4706 """
a95a7133 4707 Draw(self, int index, DC dc, int x, int x, int flags=IMAGELIST_DRAW_NORMAL,
0df68c9f
RD
4708 bool solidBackground=False) -> bool
4709 """
54f9ee45 4710 return _gdi_.ImageList_Draw(*args, **kwargs)
e811c8ce
RD
4711
4712 def GetImageCount(*args, **kwargs):
a95a7133 4713 """GetImageCount(self) -> int"""
54f9ee45 4714 return _gdi_.ImageList_GetImageCount(*args, **kwargs)
e811c8ce
RD
4715
4716 def Remove(*args, **kwargs):
a95a7133 4717 """Remove(self, int index) -> bool"""
54f9ee45 4718 return _gdi_.ImageList_Remove(*args, **kwargs)
e811c8ce
RD
4719
4720 def RemoveAll(*args, **kwargs):
a95a7133 4721 """RemoveAll(self) -> bool"""
54f9ee45 4722 return _gdi_.ImageList_RemoveAll(*args, **kwargs)
e811c8ce
RD
4723
4724 def GetSize(*args, **kwargs):
b850e7f3 4725 """GetSize(index) -> (width,height)"""
54f9ee45 4726 return _gdi_.ImageList_GetSize(*args, **kwargs)
e811c8ce 4727
2131d850 4728_gdi_.ImageList_swigregister(ImageList)
d14a1e28
RD
4729
4730#---------------------------------------------------------------------------
4731
50efceee
RD
4732class StockGDI(object):
4733 """Proxy of C++ StockGDI class"""
0085ce49 4734 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
0085ce49 4735 __repr__ = _swig_repr
50efceee
RD
4736 BRUSH_BLACK = _gdi_.StockGDI_BRUSH_BLACK
4737 BRUSH_BLUE = _gdi_.StockGDI_BRUSH_BLUE
4738 BRUSH_CYAN = _gdi_.StockGDI_BRUSH_CYAN
4739 BRUSH_GREEN = _gdi_.StockGDI_BRUSH_GREEN
4740 BRUSH_GREY = _gdi_.StockGDI_BRUSH_GREY
4741 BRUSH_LIGHTGREY = _gdi_.StockGDI_BRUSH_LIGHTGREY
4742 BRUSH_MEDIUMGREY = _gdi_.StockGDI_BRUSH_MEDIUMGREY
4743 BRUSH_RED = _gdi_.StockGDI_BRUSH_RED
4744 BRUSH_TRANSPARENT = _gdi_.StockGDI_BRUSH_TRANSPARENT
4745 BRUSH_WHITE = _gdi_.StockGDI_BRUSH_WHITE
4746 COLOUR_BLACK = _gdi_.StockGDI_COLOUR_BLACK
4747 COLOUR_BLUE = _gdi_.StockGDI_COLOUR_BLUE
4748 COLOUR_CYAN = _gdi_.StockGDI_COLOUR_CYAN
4749 COLOUR_GREEN = _gdi_.StockGDI_COLOUR_GREEN
4750 COLOUR_LIGHTGREY = _gdi_.StockGDI_COLOUR_LIGHTGREY
4751 COLOUR_RED = _gdi_.StockGDI_COLOUR_RED
4752 COLOUR_WHITE = _gdi_.StockGDI_COLOUR_WHITE
4753 CURSOR_CROSS = _gdi_.StockGDI_CURSOR_CROSS
4754 CURSOR_HOURGLASS = _gdi_.StockGDI_CURSOR_HOURGLASS
4755 CURSOR_STANDARD = _gdi_.StockGDI_CURSOR_STANDARD
4756 FONT_ITALIC = _gdi_.StockGDI_FONT_ITALIC
4757 FONT_NORMAL = _gdi_.StockGDI_FONT_NORMAL
4758 FONT_SMALL = _gdi_.StockGDI_FONT_SMALL
4759 FONT_SWISS = _gdi_.StockGDI_FONT_SWISS
4760 PEN_BLACK = _gdi_.StockGDI_PEN_BLACK
4761 PEN_BLACKDASHED = _gdi_.StockGDI_PEN_BLACKDASHED
4762 PEN_CYAN = _gdi_.StockGDI_PEN_CYAN
4763 PEN_GREEN = _gdi_.StockGDI_PEN_GREEN
4764 PEN_GREY = _gdi_.StockGDI_PEN_GREY
4765 PEN_LIGHTGREY = _gdi_.StockGDI_PEN_LIGHTGREY
4766 PEN_MEDIUMGREY = _gdi_.StockGDI_PEN_MEDIUMGREY
4767 PEN_RED = _gdi_.StockGDI_PEN_RED
4768 PEN_TRANSPARENT = _gdi_.StockGDI_PEN_TRANSPARENT
4769 PEN_WHITE = _gdi_.StockGDI_PEN_WHITE
4770 ITEMCOUNT = _gdi_.StockGDI_ITEMCOUNT
4771 def __init__(self, *args, **kwargs):
4772 """__init__(self) -> StockGDI"""
4773 _gdi_.StockGDI_swiginit(self,_gdi_.new_StockGDI(*args, **kwargs))
4774 __swig_destroy__ = _gdi_.delete_StockGDI
4775 __del__ = lambda self : None;
4776 def DeleteAll(*args, **kwargs):
4777 """DeleteAll()"""
4778 return _gdi_.StockGDI_DeleteAll(*args, **kwargs)
e811c8ce 4779
50efceee
RD
4780 DeleteAll = staticmethod(DeleteAll)
4781 def instance(*args, **kwargs):
4782 """instance() -> StockGDI"""
4783 return _gdi_.StockGDI_instance(*args, **kwargs)
e811c8ce 4784
50efceee
RD
4785 instance = staticmethod(instance)
4786 def GetBrush(*args, **kwargs):
4787 """GetBrush(int item) -> Brush"""
4788 return _gdi_.StockGDI_GetBrush(*args, **kwargs)
e811c8ce 4789
50efceee
RD
4790 GetBrush = staticmethod(GetBrush)
4791 def GetColour(*args, **kwargs):
4792 """GetColour(int item) -> Colour"""
4793 return _gdi_.StockGDI_GetColour(*args, **kwargs)
e811c8ce 4794
50efceee
RD
4795 GetColour = staticmethod(GetColour)
4796 def GetCursor(*args, **kwargs):
4797 """GetCursor(int item) -> Cursor"""
4798 return _gdi_.StockGDI_GetCursor(*args, **kwargs)
4799
4800 GetCursor = staticmethod(GetCursor)
4801 def GetPen(*args, **kwargs):
4802 """GetPen(int item) -> Pen"""
4803 return _gdi_.StockGDI_GetPen(*args, **kwargs)
4804
4805 GetPen = staticmethod(GetPen)
4806 def GetFont(*args, **kwargs):
4807 """GetFont(self, int item) -> Font"""
4808 return _gdi_.StockGDI_GetFont(*args, **kwargs)
4809
01f6b6d3
RD
4810 def _initStockObjects():
4811 import wx
704eda0c
RD
4812 wx.ITALIC_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_ITALIC).this
4813 wx.NORMAL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_NORMAL).this
4814 wx.SMALL_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SMALL).this
4815 wx.SWISS_FONT.this = StockGDI.instance().GetFont(StockGDI.FONT_SWISS).this
01f6b6d3 4816
704eda0c
RD
4817 wx.BLACK_DASHED_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACKDASHED).this
4818 wx.BLACK_PEN.this = StockGDI.GetPen(StockGDI.PEN_BLACK).this
4819 wx.CYAN_PEN.this = StockGDI.GetPen(StockGDI.PEN_CYAN).this
4820 wx.GREEN_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREEN).this
4821 wx.GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_GREY).this
4822 wx.LIGHT_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_LIGHTGREY).this
4823 wx.MEDIUM_GREY_PEN.this = StockGDI.GetPen(StockGDI.PEN_MEDIUMGREY).this
4824 wx.RED_PEN.this = StockGDI.GetPen(StockGDI.PEN_RED).this
4825 wx.TRANSPARENT_PEN.this = StockGDI.GetPen(StockGDI.PEN_TRANSPARENT).this
4826 wx.WHITE_PEN.this = StockGDI.GetPen(StockGDI.PEN_WHITE).this
4827
4828 wx.BLACK_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLACK).this
4829 wx.BLUE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_BLUE).this
4830 wx.CYAN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_CYAN).this
4831 wx.GREEN_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREEN).this
4832 wx.GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_GREY).this
4833 wx.LIGHT_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_LIGHTGREY).this
4834 wx.MEDIUM_GREY_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_MEDIUMGREY).this
4835 wx.RED_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_RED).this
4836 wx.TRANSPARENT_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_TRANSPARENT).this
4837 wx.WHITE_BRUSH.this = StockGDI.GetBrush(StockGDI.BRUSH_WHITE).this
4838
4839 wx.BLACK.this = StockGDI.GetColour(StockGDI.COLOUR_BLACK).this
4840 wx.BLUE.this = StockGDI.GetColour(StockGDI.COLOUR_BLUE).this
4841 wx.CYAN.this = StockGDI.GetColour(StockGDI.COLOUR_CYAN).this
4842 wx.GREEN.this = StockGDI.GetColour(StockGDI.COLOUR_GREEN).this
4843 wx.LIGHT_GREY.this = StockGDI.GetColour(StockGDI.COLOUR_LIGHTGREY).this
4844 wx.RED.this = StockGDI.GetColour(StockGDI.COLOUR_RED).this
4845 wx.WHITE.this = StockGDI.GetColour(StockGDI.COLOUR_WHITE).this
4846
4847 wx.CROSS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_CROSS).this
4848 wx.HOURGLASS_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_HOURGLASS).this
4849 wx.STANDARD_CURSOR.this = StockGDI.GetCursor(StockGDI.CURSOR_STANDARD).this
4850
4851 wx.TheFontList.this = _wxPyInitTheFontList().this
4852 wx.ThePenList.this = _wxPyInitThePenList().this
4853 wx.TheBrushList.this = _wxPyInitTheBrushList().this
4854 wx.TheColourDatabase.this = _wxPyInitTheColourDatabase().this
4855
01f6b6d3
RD
4856
4857 _initStockObjects = staticmethod(_initStockObjects)
4858
2131d850 4859_gdi_.StockGDI_swigregister(StockGDI)
50efceee
RD
4860
4861def StockGDI_DeleteAll(*args):
4862 """StockGDI_DeleteAll()"""
4863 return _gdi_.StockGDI_DeleteAll(*args)
4864
4865def StockGDI_instance(*args):
4866 """StockGDI_instance() -> StockGDI"""
4867 return _gdi_.StockGDI_instance(*args)
4868
4869def StockGDI_GetBrush(*args, **kwargs):
4870 """StockGDI_GetBrush(int item) -> Brush"""
4871 return _gdi_.StockGDI_GetBrush(*args, **kwargs)
4872
4873def StockGDI_GetColour(*args, **kwargs):
4874 """StockGDI_GetColour(int item) -> Colour"""
4875 return _gdi_.StockGDI_GetColour(*args, **kwargs)
4876
4877def StockGDI_GetCursor(*args, **kwargs):
4878 """StockGDI_GetCursor(int item) -> Cursor"""
4879 return _gdi_.StockGDI_GetCursor(*args, **kwargs)
4880
4881def StockGDI_GetPen(*args, **kwargs):
4882 """StockGDI_GetPen(int item) -> Pen"""
4883 return _gdi_.StockGDI_GetPen(*args, **kwargs)
4884
704eda0c
RD
4885# Create an uninitialized instance for the stock objects, they will
4886# be initialized later when the wx.App object is created.
4887ITALIC_FONT = Font.__new__(Font)
4888NORMAL_FONT = Font.__new__(Font)
4889SMALL_FONT = Font.__new__(Font)
4890SWISS_FONT = Font.__new__(Font)
4891
4892BLACK_DASHED_PEN = Pen.__new__(Pen)
4893BLACK_PEN = Pen.__new__(Pen)
4894CYAN_PEN = Pen.__new__(Pen)
4895GREEN_PEN = Pen.__new__(Pen)
4896GREY_PEN = Pen.__new__(Pen)
4897LIGHT_GREY_PEN = Pen.__new__(Pen)
4898MEDIUM_GREY_PEN = Pen.__new__(Pen)
4899RED_PEN = Pen.__new__(Pen)
4900TRANSPARENT_PEN = Pen.__new__(Pen)
4901WHITE_PEN = Pen.__new__(Pen)
4902
4903BLACK_BRUSH = Brush.__new__(Brush)
4904BLUE_BRUSH = Brush.__new__(Brush)
4905CYAN_BRUSH = Brush.__new__(Brush)
4906GREEN_BRUSH = Brush.__new__(Brush)
4907GREY_BRUSH = Brush.__new__(Brush)
4908LIGHT_GREY_BRUSH = Brush.__new__(Brush)
4909MEDIUM_GREY_BRUSH = Brush.__new__(Brush)
4910RED_BRUSH = Brush.__new__(Brush)
4911TRANSPARENT_BRUSH = Brush.__new__(Brush)
4912WHITE_BRUSH = Brush.__new__(Brush)
4913
4914BLACK = Colour.__new__(Colour)
4915BLUE = Colour.__new__(Colour)
4916CYAN = Colour.__new__(Colour)
4917GREEN = Colour.__new__(Colour)
4918LIGHT_GREY = Colour.__new__(Colour)
4919RED = Colour.__new__(Colour)
4920WHITE = Colour.__new__(Colour)
4921
4922CROSS_CURSOR = Cursor.__new__(Cursor)
4923HOURGLASS_CURSOR = Cursor.__new__(Cursor)
4924STANDARD_CURSOR = Cursor.__new__(Cursor)
4925
50efceee
RD
4926class GDIObjListBase(object):
4927 """Proxy of C++ GDIObjListBase class"""
4928 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4929 __repr__ = _swig_repr
4930 def __init__(self, *args, **kwargs):
4931 """__init__(self) -> GDIObjListBase"""
4932 _gdi_.GDIObjListBase_swiginit(self,_gdi_.new_GDIObjListBase(*args, **kwargs))
4933 __swig_destroy__ = _gdi_.delete_GDIObjListBase
4934 __del__ = lambda self : None;
2131d850 4935_gdi_.GDIObjListBase_swigregister(GDIObjListBase)
54f9ee45 4936cvar = _gdi_.cvar
994141e6
RD
4937NullBitmap = cvar.NullBitmap
4938NullIcon = cvar.NullIcon
4939NullCursor = cvar.NullCursor
4940NullPen = cvar.NullPen
4941NullBrush = cvar.NullBrush
4942NullPalette = cvar.NullPalette
4943NullFont = cvar.NullFont
4944NullColour = cvar.NullColour
d14a1e28 4945
50efceee
RD
4946class PenList(GDIObjListBase):
4947 """Proxy of C++ PenList class"""
0085ce49
RD
4948 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4949 def __init__(self): raise AttributeError, "No constructor defined"
4950 __repr__ = _swig_repr
50efceee
RD
4951 def FindOrCreatePen(*args, **kwargs):
4952 """FindOrCreatePen(self, Colour colour, int width, int style) -> Pen"""
4953 return _gdi_.PenList_FindOrCreatePen(*args, **kwargs)
4954
4955 def AddPen(*args, **kwargs):
4956 """AddPen(self, Pen pen)"""
4957 return _gdi_.PenList_AddPen(*args, **kwargs)
e811c8ce 4958
50efceee
RD
4959 def RemovePen(*args, **kwargs):
4960 """RemovePen(self, Pen pen)"""
4961 return _gdi_.PenList_RemovePen(*args, **kwargs)
4962
4963 AddPen = wx._deprecated(AddPen)
4964 RemovePen = wx._deprecated(RemovePen)
4965
2131d850 4966_gdi_.PenList_swigregister(PenList)
50efceee
RD
4967
4968class BrushList(GDIObjListBase):
4969 """Proxy of C++ BrushList class"""
4970 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4971 def __init__(self): raise AttributeError, "No constructor defined"
4972 __repr__ = _swig_repr
e811c8ce 4973 def FindOrCreateBrush(*args, **kwargs):
61d07ac7 4974 """FindOrCreateBrush(self, Colour colour, int style=SOLID) -> Brush"""
54f9ee45 4975 return _gdi_.BrushList_FindOrCreateBrush(*args, **kwargs)
e811c8ce 4976
50efceee
RD
4977 def AddBrush(*args, **kwargs):
4978 """AddBrush(self, Brush brush)"""
4979 return _gdi_.BrushList_AddBrush(*args, **kwargs)
4980
e811c8ce 4981 def RemoveBrush(*args, **kwargs):
a95a7133 4982 """RemoveBrush(self, Brush brush)"""
54f9ee45 4983 return _gdi_.BrushList_RemoveBrush(*args, **kwargs)
e811c8ce 4984
50efceee
RD
4985 AddBrush = wx._deprecated(AddBrush)
4986 RemoveBrush = wx._deprecated(RemoveBrush)
e811c8ce 4987
2131d850 4988_gdi_.BrushList_swigregister(BrushList)
d14a1e28 4989
50efceee
RD
4990class FontList(GDIObjListBase):
4991 """Proxy of C++ FontList class"""
4992 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4993 def __init__(self): raise AttributeError, "No constructor defined"
4994 __repr__ = _swig_repr
4995 def FindOrCreateFont(*args, **kwargs):
4996 """
4997 FindOrCreateFont(self, int point_size, int family, int style, int weight,
4998 bool underline=False, String facename=EmptyString,
4999 int encoding=FONTENCODING_DEFAULT) -> Font
5000 """
5001 return _gdi_.FontList_FindOrCreateFont(*args, **kwargs)
5002
5003 def AddFont(*args, **kwargs):
5004 """AddFont(self, Font font)"""
5005 return _gdi_.FontList_AddFont(*args, **kwargs)
5006
5007 def RemoveFont(*args, **kwargs):
5008 """RemoveFont(self, Font font)"""
5009 return _gdi_.FontList_RemoveFont(*args, **kwargs)
5010
5011 AddFont = wx._deprecated(AddFont)
5012 RemoveFont = wx._deprecated(RemoveFont)
5013
2131d850 5014_gdi_.FontList_swigregister(FontList)
50efceee
RD
5015
5016class ColourDatabase(object):
093d3ff1 5017 """Proxy of C++ ColourDatabase class"""
0085ce49
RD
5018 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5019 __repr__ = _swig_repr
5020 def __init__(self, *args, **kwargs):
a95a7133 5021 """__init__(self) -> ColourDatabase"""
0085ce49
RD
5022 _gdi_.ColourDatabase_swiginit(self,_gdi_.new_ColourDatabase(*args, **kwargs))
5023 __swig_destroy__ = _gdi_.delete_ColourDatabase
5024 __del__ = lambda self : None;
e811c8ce 5025 def Find(*args, **kwargs):
a95a7133 5026 """Find(self, String name) -> Colour"""
54f9ee45 5027 return _gdi_.ColourDatabase_Find(*args, **kwargs)
e811c8ce
RD
5028
5029 def FindName(*args, **kwargs):
a95a7133 5030 """FindName(self, Colour colour) -> String"""
54f9ee45 5031 return _gdi_.ColourDatabase_FindName(*args, **kwargs)
e811c8ce 5032
d14a1e28 5033 FindColour = Find
e811c8ce 5034 def AddColour(*args, **kwargs):
a95a7133 5035 """AddColour(self, String name, Colour colour)"""
54f9ee45 5036 return _gdi_.ColourDatabase_AddColour(*args, **kwargs)
e811c8ce
RD
5037
5038 def Append(*args, **kwargs):
a95a7133 5039 """Append(self, String name, int red, int green, int blue)"""
54f9ee45 5040 return _gdi_.ColourDatabase_Append(*args, **kwargs)
e811c8ce 5041
2131d850 5042_gdi_.ColourDatabase_swigregister(ColourDatabase)
d14a1e28 5043
50efceee 5044#---------------------------------------------------------------------------
e811c8ce 5045
e811c8ce 5046
50efceee
RD
5047def _wxPyInitTheFontList(*args):
5048 """_wxPyInitTheFontList() -> FontList"""
5049 return _gdi_._wxPyInitTheFontList(*args)
e811c8ce 5050
50efceee
RD
5051def _wxPyInitThePenList(*args):
5052 """_wxPyInitThePenList() -> PenList"""
5053 return _gdi_._wxPyInitThePenList(*args)
e811c8ce 5054
50efceee
RD
5055def _wxPyInitTheBrushList(*args):
5056 """_wxPyInitTheBrushList() -> BrushList"""
5057 return _gdi_._wxPyInitTheBrushList(*args)
70551f47 5058
50efceee
RD
5059def _wxPyInitTheColourDatabase(*args):
5060 """_wxPyInitTheColourDatabase() -> ColourDatabase"""
5061 return _gdi_._wxPyInitTheColourDatabase(*args)
704eda0c
RD
5062# Create an uninitialized instance for the stock objects, they will
5063# be initialized later when the wx.App object is created.
5064TheFontList = FontList.__new__(FontList)
5065ThePenList = PenList.__new__(PenList)
5066TheBrushList = BrushList.__new__(BrushList)
5067TheColourDatabase = ColourDatabase.__new__(ColourDatabase)
fbcadfca 5068
994141e6 5069NullColor = NullColour
d14a1e28 5070#---------------------------------------------------------------------------
fbcadfca 5071
54f9ee45 5072class Effects(_core.Object):
093d3ff1 5073 """Proxy of C++ Effects class"""
0085ce49
RD
5074 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5075 __repr__ = _swig_repr
5076 def __init__(self, *args, **kwargs):
a95a7133 5077 """__init__(self) -> Effects"""
0085ce49 5078 _gdi_.Effects_swiginit(self,_gdi_.new_Effects(*args, **kwargs))
e811c8ce 5079 def GetHighlightColour(*args, **kwargs):
a95a7133 5080 """GetHighlightColour(self) -> Colour"""
54f9ee45 5081 return _gdi_.Effects_GetHighlightColour(*args, **kwargs)
e811c8ce
RD
5082
5083 def GetLightShadow(*args, **kwargs):
a95a7133 5084 """GetLightShadow(self) -> Colour"""
54f9ee45 5085 return _gdi_.Effects_GetLightShadow(*args, **kwargs)
e811c8ce
RD
5086
5087 def GetFaceColour(*args, **kwargs):
a95a7133 5088 """GetFaceColour(self) -> Colour"""
54f9ee45 5089 return _gdi_.Effects_GetFaceColour(*args, **kwargs)
e811c8ce
RD
5090
5091 def GetMediumShadow(*args, **kwargs):
a95a7133 5092 """GetMediumShadow(self) -> Colour"""
54f9ee45 5093 return _gdi_.Effects_GetMediumShadow(*args, **kwargs)
e811c8ce
RD
5094
5095 def GetDarkShadow(*args, **kwargs):
a95a7133 5096 """GetDarkShadow(self) -> Colour"""
54f9ee45 5097 return _gdi_.Effects_GetDarkShadow(*args, **kwargs)
e811c8ce
RD
5098
5099 def SetHighlightColour(*args, **kwargs):
a95a7133 5100 """SetHighlightColour(self, Colour c)"""
54f9ee45 5101 return _gdi_.Effects_SetHighlightColour(*args, **kwargs)
e811c8ce
RD
5102
5103 def SetLightShadow(*args, **kwargs):
a95a7133 5104 """SetLightShadow(self, Colour c)"""
54f9ee45 5105 return _gdi_.Effects_SetLightShadow(*args, **kwargs)
e811c8ce
RD
5106
5107 def SetFaceColour(*args, **kwargs):
a95a7133 5108 """SetFaceColour(self, Colour c)"""
54f9ee45 5109 return _gdi_.Effects_SetFaceColour(*args, **kwargs)
e811c8ce
RD
5110
5111 def SetMediumShadow(*args, **kwargs):
a95a7133 5112 """SetMediumShadow(self, Colour c)"""
54f9ee45 5113 return _gdi_.Effects_SetMediumShadow(*args, **kwargs)
e811c8ce
RD
5114
5115 def SetDarkShadow(*args, **kwargs):
a95a7133 5116 """SetDarkShadow(self, Colour c)"""
54f9ee45 5117 return _gdi_.Effects_SetDarkShadow(*args, **kwargs)
e811c8ce
RD
5118
5119 def Set(*args, **kwargs):
0df68c9f 5120 """
a95a7133 5121 Set(self, Colour highlightColour, Colour lightShadow, Colour faceColour,
0df68c9f
RD
5122 Colour mediumShadow, Colour darkShadow)
5123 """
54f9ee45 5124 return _gdi_.Effects_Set(*args, **kwargs)
e811c8ce
RD
5125
5126 def DrawSunkenEdge(*args, **kwargs):
a95a7133 5127 """DrawSunkenEdge(self, DC dc, Rect rect, int borderSize=1)"""
54f9ee45 5128 return _gdi_.Effects_DrawSunkenEdge(*args, **kwargs)
4be61064 5129
e811c8ce 5130 def TileBitmap(*args, **kwargs):
a95a7133 5131 """TileBitmap(self, Rect rect, DC dc, Bitmap bitmap) -> bool"""
54f9ee45 5132 return _gdi_.Effects_TileBitmap(*args, **kwargs)
e811c8ce 5133
2131d850 5134_gdi_.Effects_swigregister(Effects)
d14a1e28 5135
8d38bd1d
RD
5136#---------------------------------------------------------------------------
5137
5138CONTROL_DISABLED = _gdi_.CONTROL_DISABLED
5139CONTROL_FOCUSED = _gdi_.CONTROL_FOCUSED
5140CONTROL_PRESSED = _gdi_.CONTROL_PRESSED
5141CONTROL_ISDEFAULT = _gdi_.CONTROL_ISDEFAULT
5142CONTROL_ISSUBMENU = _gdi_.CONTROL_ISSUBMENU
5143CONTROL_EXPANDED = _gdi_.CONTROL_EXPANDED
5144CONTROL_CURRENT = _gdi_.CONTROL_CURRENT
5145CONTROL_SELECTED = _gdi_.CONTROL_SELECTED
5146CONTROL_CHECKED = _gdi_.CONTROL_CHECKED
5147CONTROL_CHECKABLE = _gdi_.CONTROL_CHECKABLE
5148CONTROL_UNDETERMINED = _gdi_.CONTROL_UNDETERMINED
5149CONTROL_FLAGS_MASK = _gdi_.CONTROL_FLAGS_MASK
5150CONTROL_DIRTY = _gdi_.CONTROL_DIRTY
5151class SplitterRenderParams(object):
5152 """
5153 This is just a simple struct used as a return value of
5154 `wx.RendererNative.GetSplitterParams` and contains some platform
5155 specific metrics about splitters.
5156
5157 * widthSash: the width of the splitter sash.
5158 * border: the width of the border of the splitter window.
5159 * isHotSensitive: ``True`` if the splitter changes its
5160 appearance when the mouse is over it.
5161
5162
5163 """
0085ce49
RD
5164 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5165 __repr__ = _swig_repr
5166 def __init__(self, *args, **kwargs):
8d38bd1d
RD
5167 """
5168 __init__(self, int widthSash_, int border_, bool isSens_) -> SplitterRenderParams
5169
5170 This is just a simple struct used as a return value of
5171 `wx.RendererNative.GetSplitterParams` and contains some platform
5172 specific metrics about splitters.
5173
5174 * widthSash: the width of the splitter sash.
5175 * border: the width of the border of the splitter window.
5176 * isHotSensitive: ``True`` if the splitter changes its
5177 appearance when the mouse is over it.
5178
5179
5180 """
0085ce49
RD
5181 _gdi_.SplitterRenderParams_swiginit(self,_gdi_.new_SplitterRenderParams(*args, **kwargs))
5182 __swig_destroy__ = _gdi_.delete_SplitterRenderParams
5183 __del__ = lambda self : None;
8d38bd1d
RD
5184 widthSash = property(_gdi_.SplitterRenderParams_widthSash_get)
5185 border = property(_gdi_.SplitterRenderParams_border_get)
5186 isHotSensitive = property(_gdi_.SplitterRenderParams_isHotSensitive_get)
2131d850 5187_gdi_.SplitterRenderParams_swigregister(SplitterRenderParams)
8d38bd1d
RD
5188
5189class RendererVersion(object):
5190 """
5191 This simple struct represents the `wx.RendererNative` interface
5192 version and is only used as the return value of
5193 `wx.RendererNative.GetVersion`.
5194 """
0085ce49
RD
5195 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5196 __repr__ = _swig_repr
5197 def __init__(self, *args, **kwargs):
8d38bd1d
RD
5198 """
5199 __init__(self, int version_, int age_) -> RendererVersion
5200
5201 This simple struct represents the `wx.RendererNative` interface
5202 version and is only used as the return value of
5203 `wx.RendererNative.GetVersion`.
5204 """
0085ce49
RD
5205 _gdi_.RendererVersion_swiginit(self,_gdi_.new_RendererVersion(*args, **kwargs))
5206 __swig_destroy__ = _gdi_.delete_RendererVersion
5207 __del__ = lambda self : None;
8d38bd1d
RD
5208 Current_Version = _gdi_.RendererVersion_Current_Version
5209 Current_Age = _gdi_.RendererVersion_Current_Age
5210 def IsCompatible(*args, **kwargs):
5211 """IsCompatible(RendererVersion ver) -> bool"""
5212 return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
5213
5214 IsCompatible = staticmethod(IsCompatible)
5215 version = property(_gdi_.RendererVersion_version_get)
5216 age = property(_gdi_.RendererVersion_age_get)
2131d850 5217_gdi_.RendererVersion_swigregister(RendererVersion)
8d38bd1d
RD
5218
5219def RendererVersion_IsCompatible(*args, **kwargs):
0085ce49
RD
5220 """RendererVersion_IsCompatible(RendererVersion ver) -> bool"""
5221 return _gdi_.RendererVersion_IsCompatible(*args, **kwargs)
8d38bd1d
RD
5222
5223class RendererNative(object):
5224 """
5225 One of the design principles of wxWidgets is to use the native widgets
5226 on every platform in order to be as close to the native look and feel
5227 on every platform. However there are still cases when some generic
5228 widgets are needed for various reasons, but it can sometimes take a
5229 lot of messy work to make them conform to the native LnF.
5230
5231 The wx.RendererNative class is a collection of functions that have
5232 platform-specific implementations for drawing certain parts of
5233 genereic controls in ways that are as close to the native look as
5234 possible.
5235
f05326ba
RD
5236 Note that each drawing function restores the `wx.DC` attributes if it
5237 changes them, so it is safe to assume that the same pen, brush and
5238 colours that were active before the call to this function are still in
5239 effect after it.
5240
8d38bd1d 5241 """
0085ce49
RD
5242 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5243 def __init__(self): raise AttributeError, "No constructor defined"
5244 __repr__ = _swig_repr
8d38bd1d
RD
5245 def DrawHeaderButton(*args, **kwargs):
5246 """
5247 DrawHeaderButton(self, Window win, DC dc, Rect rect, int flags=0)
5248
75219dcb 5249 Draw the header control button (such as what is used by `wx.ListCtrl`
8d38bd1d
RD
5250 in report mode.)
5251 """
5252 return _gdi_.RendererNative_DrawHeaderButton(*args, **kwargs)
5253
5254 def DrawTreeItemButton(*args, **kwargs):
5255 """
5256 DrawTreeItemButton(self, Window win, DC dc, Rect rect, int flags=0)
5257
5258 Draw the expanded/collapsed icon for a tree control item.
5259 """
5260 return _gdi_.RendererNative_DrawTreeItemButton(*args, **kwargs)
5261
5262 def DrawSplitterBorder(*args, **kwargs):
5263 """
5264 DrawSplitterBorder(self, Window win, DC dc, Rect rect, int flags=0)
5265
5266 Draw the border for a sash window: this border must be such that the
5267 sash drawn by `DrawSplitterSash` blends into it well.
5268 """
5269 return _gdi_.RendererNative_DrawSplitterBorder(*args, **kwargs)
5270
5271 def DrawSplitterSash(*args, **kwargs):
5272 """
5273 DrawSplitterSash(self, Window win, DC dc, Size size, int position, int orient,
5274 int flags=0)
5275
5276 Draw a sash. The orient parameter defines whether the sash should be
5277 vertical or horizontal and how the position should be interpreted.
5278 """
5279 return _gdi_.RendererNative_DrawSplitterSash(*args, **kwargs)
5280
5281 def DrawComboBoxDropButton(*args, **kwargs):
5282 """
5283 DrawComboBoxDropButton(self, Window win, DC dc, Rect rect, int flags=0)
5284
5285 Draw a button like the one used by `wx.ComboBox` to show a drop down
5286 window. The usual appearance is a downwards pointing arrow.
5287
5288 The ``flags`` parameter may have the ``wx.CONTROL_PRESSED`` or
5289 ``wx.CONTROL_CURRENT`` bits set.
5290 """
5291 return _gdi_.RendererNative_DrawComboBoxDropButton(*args, **kwargs)
5292
5293 def DrawDropArrow(*args, **kwargs):
5294 """
5295 DrawDropArrow(self, Window win, DC dc, Rect rect, int flags=0)
5296
5297 Draw a drop down arrow that is suitable for use outside a combo
5298 box. Arrow will have a transparent background.
5299
5300 ``rect`` is not entirely filled by the arrow. Instead, you should use
5301 bounding rectangle of a drop down button which arrow matches the size
5302 you need. ``flags`` may have the ``wx.CONTROL_PRESSED`` or
5303 ``wx.CONTROL_CURRENT`` bit set.
5304 """
5305 return _gdi_.RendererNative_DrawDropArrow(*args, **kwargs)
5306
01f6b6d3 5307 def DrawCheckBox(*args, **kwargs):
50efceee 5308 """
01f6b6d3 5309 DrawCheckBox(self, Window win, DC dc, Rect rect, int flags=0)
50efceee
RD
5310
5311 Draw a check button. Flags may use wx.CONTROL_CHECKED,
5312 wx.CONTROL_UNDETERMINED and wx.CONTROL_CURRENT.
5313 """
01f6b6d3
RD
5314 return _gdi_.RendererNative_DrawCheckBox(*args, **kwargs)
5315
5316 def DrawPushButton(*args, **kwargs):
5317 """
5318 DrawPushButton(self, Window win, DC dc, Rect rect, int flags=0)
5319
5320 Draw a blank button. Flags may be wx.CONTROL_PRESSED, wx.CONTROL_CURRENT and
5321 wx.CONTROL_ISDEFAULT
5322 """
5323 return _gdi_.RendererNative_DrawPushButton(*args, **kwargs)
5324
5325 def DrawItemSelectionRect(*args, **kwargs):
5326 """
5327 DrawItemSelectionRect(self, Window win, DC dc, Rect rect, int flags=0)
5328
5329 Draw rectangle indicating that an item in e.g. a list control has been
5330 selected or focused
5331
5332 The flags parameter may be:
5333
5334 ==================== ============================================
5335 wx.CONTROL_SELECTED item is selected, e.g. draw background
5336 wx.CONTROL_CURRENT item is the current item, e.g. dotted border
5337 wx.CONTROL_FOCUSED the whole control has focus, e.g. blue
5338 background vs. grey otherwise
5339 ==================== ============================================
5340
5341 """
5342 return _gdi_.RendererNative_DrawItemSelectionRect(*args, **kwargs)
50efceee 5343
8d38bd1d
RD
5344 def GetSplitterParams(*args, **kwargs):
5345 """
5346 GetSplitterParams(self, Window win) -> SplitterRenderParams
5347
5348 Get the splitter parameters, see `wx.SplitterRenderParams`.
5349 """
5350 return _gdi_.RendererNative_GetSplitterParams(*args, **kwargs)
5351
5352 def Get(*args, **kwargs):
5353 """
5354 Get() -> RendererNative
5355
5356 Return the currently used renderer
5357 """
5358 return _gdi_.RendererNative_Get(*args, **kwargs)
5359
5360 Get = staticmethod(Get)
5361 def GetGeneric(*args, **kwargs):
5362 """
5363 GetGeneric() -> RendererNative
5364
5365 Return the generic implementation of the renderer. Under some
5366 platforms, this is the default renderer implementation, others have
5367 platform-specific default renderer which can be retrieved by calling
1d5ee749 5368 `wx.RendererNative.GetDefault`.
8d38bd1d
RD
5369 """
5370 return _gdi_.RendererNative_GetGeneric(*args, **kwargs)
5371
5372 GetGeneric = staticmethod(GetGeneric)
5373 def GetDefault(*args, **kwargs):
5374 """
5375 GetDefault() -> RendererNative
5376
5377 Return the default (native) implementation for this platform -- this
1d5ee749
RD
5378 is also the one used by default but this may be changed by calling
5379 `wx.RendererNative.Set` in which case the return value of this method
5380 may be different from the return value of `wx.RendererNative.Get`.
8d38bd1d
RD
5381 """
5382 return _gdi_.RendererNative_GetDefault(*args, **kwargs)
5383
5384 GetDefault = staticmethod(GetDefault)
5385 def Set(*args, **kwargs):
5386 """
5387 Set(RendererNative renderer) -> RendererNative
5388
5389 Set the renderer to use, passing None reverts to using the default
5390 renderer. Returns the previous renderer used with Set or None.
5391 """
5392 return _gdi_.RendererNative_Set(*args, **kwargs)
5393
5394 Set = staticmethod(Set)
5395 def GetVersion(*args, **kwargs):
5396 """
5397 GetVersion(self) -> RendererVersion
5398
5399 Returns the version of the renderer. Will be used for ensuring
5400 compatibility of dynamically loaded renderers.
5401 """
5402 return _gdi_.RendererNative_GetVersion(*args, **kwargs)
5403
2131d850 5404_gdi_.RendererNative_swigregister(RendererNative)
8d38bd1d 5405
0085ce49
RD
5406def RendererNative_Get(*args):
5407 """
8d38bd1d
RD
5408 RendererNative_Get() -> RendererNative
5409
5410 Return the currently used renderer
5411 """
0085ce49 5412 return _gdi_.RendererNative_Get(*args)
8d38bd1d 5413
0085ce49
RD
5414def RendererNative_GetGeneric(*args):
5415 """
8d38bd1d
RD
5416 RendererNative_GetGeneric() -> RendererNative
5417
5418 Return the generic implementation of the renderer. Under some
5419 platforms, this is the default renderer implementation, others have
5420 platform-specific default renderer which can be retrieved by calling
1d5ee749 5421 `wx.RendererNative.GetDefault`.
8d38bd1d 5422 """
0085ce49 5423 return _gdi_.RendererNative_GetGeneric(*args)
8d38bd1d 5424
0085ce49
RD
5425def RendererNative_GetDefault(*args):
5426 """
8d38bd1d
RD
5427 RendererNative_GetDefault() -> RendererNative
5428
5429 Return the default (native) implementation for this platform -- this
1d5ee749
RD
5430 is also the one used by default but this may be changed by calling
5431 `wx.RendererNative.Set` in which case the return value of this method
5432 may be different from the return value of `wx.RendererNative.Get`.
8d38bd1d 5433 """
0085ce49 5434 return _gdi_.RendererNative_GetDefault(*args)
8d38bd1d
RD
5435
5436def RendererNative_Set(*args, **kwargs):
0085ce49 5437 """
8d38bd1d
RD
5438 RendererNative_Set(RendererNative renderer) -> RendererNative
5439
5440 Set the renderer to use, passing None reverts to using the default
5441 renderer. Returns the previous renderer used with Set or None.
5442 """
0085ce49 5443 return _gdi_.RendererNative_Set(*args, **kwargs)
8d38bd1d 5444
27e45892
RD
5445#---------------------------------------------------------------------------
5446
5447class PseudoDC(_core.Object):
5448 """
5449 A PseudoDC is an object that can be used as if it were a `wx.DC`. All
5450 commands issued to the PseudoDC are stored in a list. You can then
5451 play these commands back to a real DC object using the DrawToDC
5452 method. Commands in the command list are indexed by ID. You can use
5453 this to clear the operations associated with a single ID and then
5454 re-draw the object associated with that ID.
5455 """
5456 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5457 __repr__ = _swig_repr
5458 def __init__(self, *args, **kwargs):
5459 """
5460 __init__(self) -> PseudoDC
5461
5462 Constructs a new Pseudo device context for recording dc operations
5463 """
5464 _gdi_.PseudoDC_swiginit(self,_gdi_.new_PseudoDC(*args, **kwargs))
5465 def BeginDrawing(*args, **kwargs):
5466 """
5467 BeginDrawing(self)
5468
5469 Allows for optimization of drawing code on platforms that need it. On
5470 other platforms this is just an empty function and is harmless. To
5471 take advantage of this postential optimization simply enclose each
5472 group of calls to the drawing primitives within calls to
5473 `BeginDrawing` and `EndDrawing`.
5474 """
5475 return _gdi_.PseudoDC_BeginDrawing(*args, **kwargs)
5476
5477 def EndDrawing(*args, **kwargs):
5478 """
5479 EndDrawing(self)
5480
5481 Ends the group of drawing primitives started with `BeginDrawing`, and
5482 invokes whatever optimization is available for this DC type on the
5483 current platform.
5484 """
5485 return _gdi_.PseudoDC_EndDrawing(*args, **kwargs)
5486
5487 __swig_destroy__ = _gdi_.delete_PseudoDC
5488 __del__ = lambda self : None;
5489 def RemoveAll(*args, **kwargs):
5490 """
5491 RemoveAll(self)
5492
5493 Removes all objects and operations from the recorded list.
5494 """
5495 return _gdi_.PseudoDC_RemoveAll(*args, **kwargs)
5496
5497 def GetLen(*args, **kwargs):
5498 """
5499 GetLen(self) -> int
5500
5501 Returns the number of operations in the recorded list.
5502 """
5503 return _gdi_.PseudoDC_GetLen(*args, **kwargs)
5504
5505 def SetId(*args, **kwargs):
5506 """
5507 SetId(self, int id)
5508
5509 Sets the id to be associated with subsequent operations.
5510 """
5511 return _gdi_.PseudoDC_SetId(*args, **kwargs)
5512
5513 def ClearId(*args, **kwargs):
5514 """
5515 ClearId(self, int id)
5516
5517 Removes all operations associated with id so the object can be redrawn.
5518 """
5519 return _gdi_.PseudoDC_ClearId(*args, **kwargs)
5520
5521 def RemoveId(*args, **kwargs):
5522 """
5523 RemoveId(self, int id)
5524
5525 Remove the object node (and all operations) associated with an id.
5526 """
5527 return _gdi_.PseudoDC_RemoveId(*args, **kwargs)
5528
5529 def TranslateId(*args, **kwargs):
5530 """
5531 TranslateId(self, int id, int dx, int dy)
5532
5533 Translate the operations of id by dx,dy.
5534 """
5535 return _gdi_.PseudoDC_TranslateId(*args, **kwargs)
5536
5537 def DrawIdToDC(*args, **kwargs):
5538 """
5539 DrawIdToDC(self, int id, DC dc)
5540
5541 Draw recorded operations of id to dc.
5542 """
5543 return _gdi_.PseudoDC_DrawIdToDC(*args, **kwargs)
5544
5545 def SetIdBounds(*args, **kwargs):
5546 """
5547 SetIdBounds(self, int id, Rect rect)
5548
5549 Set the bounding rect of a given object. This will create
5550 an object node if one doesn't exist.
5551 """
5552 return _gdi_.PseudoDC_SetIdBounds(*args, **kwargs)
5553
5554 def GetIdBounds(*args, **kwargs):
5555 """
5556 GetIdBounds(self, int id) -> Rect
5557
5558 Returns the bounding rectangle previouly set with SetIdBounds. If
5559 no bounds have been set, it returns wx.Rect(0,0,0,0).
5560 """
5561 return _gdi_.PseudoDC_GetIdBounds(*args, **kwargs)
5562
5563 def DrawToDCClipped(*args, **kwargs):
5564 """
5565 DrawToDCClipped(self, DC dc, Rect rect)
5566
5567 Draws the recorded operations to dc unless the operation is known to
5568 be outside rect.
5569 """
5570 return _gdi_.PseudoDC_DrawToDCClipped(*args, **kwargs)
5571
5572 def DrawToDCClippedRgn(*args, **kwargs):
5573 """
5574 DrawToDCClippedRgn(self, DC dc, Region region)
5575
5576 Draws the recorded operations to dc unless the operation is known to
5577 be outside rect.
5578 """
5579 return _gdi_.PseudoDC_DrawToDCClippedRgn(*args, **kwargs)
5580
5581 def DrawToDC(*args, **kwargs):
5582 """
5583 DrawToDC(self, DC dc)
5584
5585 Draws the recorded operations to dc.
5586 """
5587 return _gdi_.PseudoDC_DrawToDC(*args, **kwargs)
5588
5589 def FloodFill(*args, **kwargs):
5590 """
5591 FloodFill(self, int x, int y, Colour col, int style=FLOOD_SURFACE)
5592
5593 Flood fills the device context starting from the given point, using
5594 the current brush colour, and using a style:
5595
5596 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
5597 the given colour is encountered.
5598
5599 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
5600 colour.
5601
5602 Returns False if the operation failed.
5603
5604 Note: The present implementation for non-Windows platforms may fail to
5605 find colour borders if the pixels do not match the colour
5606 exactly. However the function will still return true.
5607 """
5608 return _gdi_.PseudoDC_FloodFill(*args, **kwargs)
5609
5610 def FloodFillPoint(*args, **kwargs):
5611 """
5612 FloodFillPoint(self, Point pt, Colour col, int style=FLOOD_SURFACE)
5613
5614 Flood fills the device context starting from the given point, using
5615 the current brush colour, and using a style:
5616
5617 - **wxFLOOD_SURFACE**: the flooding occurs until a colour other than
5618 the given colour is encountered.
5619
5620 - **wxFLOOD_BORDER**: the area to be flooded is bounded by the given
5621 colour.
5622
5623 Returns False if the operation failed.
5624
5625 Note: The present implementation for non-Windows platforms may fail to
5626 find colour borders if the pixels do not match the colour
5627 exactly. However the function will still return true.
5628 """
5629 return _gdi_.PseudoDC_FloodFillPoint(*args, **kwargs)
5630
5631 def DrawLine(*args, **kwargs):
5632 """
5633 DrawLine(self, int x1, int y1, int x2, int y2)
5634
5635 Draws a line from the first point to the second. The current pen is
5636 used for drawing the line. Note that the second point is *not* part of
5637 the line and is not drawn by this function (this is consistent with
5638 the behaviour of many other toolkits).
5639 """
5640 return _gdi_.PseudoDC_DrawLine(*args, **kwargs)
5641
5642 def DrawLinePoint(*args, **kwargs):
5643 """
5644 DrawLinePoint(self, Point pt1, Point pt2)
5645
5646 Draws a line from the first point to the second. The current pen is
5647 used for drawing the line. Note that the second point is *not* part of
5648 the line and is not drawn by this function (this is consistent with
5649 the behaviour of many other toolkits).
5650 """
5651 return _gdi_.PseudoDC_DrawLinePoint(*args, **kwargs)
5652
5653 def CrossHair(*args, **kwargs):
5654 """
5655 CrossHair(self, int x, int y)
5656
5657 Displays a cross hair using the current pen. This is a vertical and
5658 horizontal line the height and width of the window, centred on the
5659 given point.
5660 """
5661 return _gdi_.PseudoDC_CrossHair(*args, **kwargs)
5662
5663 def CrossHairPoint(*args, **kwargs):
5664 """
5665 CrossHairPoint(self, Point pt)
5666
5667 Displays a cross hair using the current pen. This is a vertical and
5668 horizontal line the height and width of the window, centred on the
5669 given point.
5670 """
5671 return _gdi_.PseudoDC_CrossHairPoint(*args, **kwargs)
5672
5673 def DrawArc(*args, **kwargs):
5674 """
5675 DrawArc(self, int x1, int y1, int x2, int y2, int xc, int yc)
5676
5677 Draws an arc of a circle, centred on the *center* point (xc, yc), from
5678 the first point to the second. The current pen is used for the outline
5679 and the current brush for filling the shape.
5680
5681 The arc is drawn in an anticlockwise direction from the start point to
5682 the end point.
5683 """
5684 return _gdi_.PseudoDC_DrawArc(*args, **kwargs)
5685
5686 def DrawArcPoint(*args, **kwargs):
5687 """
5688 DrawArcPoint(self, Point pt1, Point pt2, Point center)
5689
5690 Draws an arc of a circle, centred on the *center* point (xc, yc), from
5691 the first point to the second. The current pen is used for the outline
5692 and the current brush for filling the shape.
5693
5694 The arc is drawn in an anticlockwise direction from the start point to
5695 the end point.
5696 """
5697 return _gdi_.PseudoDC_DrawArcPoint(*args, **kwargs)
5698
5699 def DrawCheckMark(*args, **kwargs):
5700 """
5701 DrawCheckMark(self, int x, int y, int width, int height)
5702
5703 Draws a check mark inside the given rectangle.
5704 """
5705 return _gdi_.PseudoDC_DrawCheckMark(*args, **kwargs)
5706
5707 def DrawCheckMarkRect(*args, **kwargs):
5708 """
5709 DrawCheckMarkRect(self, Rect rect)
5710
5711 Draws a check mark inside the given rectangle.
5712 """
5713 return _gdi_.PseudoDC_DrawCheckMarkRect(*args, **kwargs)
5714
5715 def DrawEllipticArc(*args, **kwargs):
5716 """
5717 DrawEllipticArc(self, int x, int y, int w, int h, double start, double end)
5718
5719 Draws an arc of an ellipse, with the given rectangle defining the
5720 bounds of the ellipse. The current pen is used for drawing the arc and
5721 the current brush is used for drawing the pie.
5722
5723 The *start* and *end* parameters specify the start and end of the arc
5724 relative to the three-o'clock position from the center of the
5725 rectangle. Angles are specified in degrees (360 is a complete
5726 circle). Positive values mean counter-clockwise motion. If start is
5727 equal to end, a complete ellipse will be drawn.
5728 """
5729 return _gdi_.PseudoDC_DrawEllipticArc(*args, **kwargs)
5730
5731 def DrawEllipticArcPointSize(*args, **kwargs):
5732 """
5733 DrawEllipticArcPointSize(self, Point pt, Size sz, double start, double end)
5734
5735 Draws an arc of an ellipse, with the given rectangle defining the
5736 bounds of the ellipse. The current pen is used for drawing the arc and
5737 the current brush is used for drawing the pie.
5738
5739 The *start* and *end* parameters specify the start and end of the arc
5740 relative to the three-o'clock position from the center of the
5741 rectangle. Angles are specified in degrees (360 is a complete
5742 circle). Positive values mean counter-clockwise motion. If start is
5743 equal to end, a complete ellipse will be drawn.
5744 """
5745 return _gdi_.PseudoDC_DrawEllipticArcPointSize(*args, **kwargs)
5746
5747 def DrawPoint(*args, **kwargs):
5748 """
5749 DrawPoint(self, int x, int y)
5750
5751 Draws a point using the current pen.
5752 """
5753 return _gdi_.PseudoDC_DrawPoint(*args, **kwargs)
5754
5755 def DrawPointPoint(*args, **kwargs):
5756 """
5757 DrawPointPoint(self, Point pt)
5758
5759 Draws a point using the current pen.
5760 """
5761 return _gdi_.PseudoDC_DrawPointPoint(*args, **kwargs)
5762
5763 def DrawRectangle(*args, **kwargs):
5764 """
5765 DrawRectangle(self, int x, int y, int width, int height)
5766
5767 Draws a rectangle with the given top left corner, and with the given
5768 size. The current pen is used for the outline and the current brush
5769 for filling the shape.
5770 """
5771 return _gdi_.PseudoDC_DrawRectangle(*args, **kwargs)
5772
5773 def DrawRectangleRect(*args, **kwargs):
5774 """
5775 DrawRectangleRect(self, Rect rect)
5776
5777 Draws a rectangle with the given top left corner, and with the given
5778 size. The current pen is used for the outline and the current brush
5779 for filling the shape.
5780 """
5781 return _gdi_.PseudoDC_DrawRectangleRect(*args, **kwargs)
5782
5783 def DrawRectanglePointSize(*args, **kwargs):
5784 """
5785 DrawRectanglePointSize(self, Point pt, Size sz)
5786
5787 Draws a rectangle with the given top left corner, and with the given
5788 size. The current pen is used for the outline and the current brush
5789 for filling the shape.
5790 """
5791 return _gdi_.PseudoDC_DrawRectanglePointSize(*args, **kwargs)
5792
5793 def DrawRoundedRectangle(*args, **kwargs):
5794 """
5795 DrawRoundedRectangle(self, int x, int y, int width, int height, double radius)
5796
5797 Draws a rectangle with the given top left corner, and with the given
5798 size. The corners are quarter-circles using the given radius. The
5799 current pen is used for the outline and the current brush for filling
5800 the shape.
5801
5802 If radius is positive, the value is assumed to be the radius of the
5803 rounded corner. If radius is negative, the absolute value is assumed
5804 to be the proportion of the smallest dimension of the rectangle. This
5805 means that the corner can be a sensible size relative to the size of
5806 the rectangle, and also avoids the strange effects X produces when the
5807 corners are too big for the rectangle.
5808 """
5809 return _gdi_.PseudoDC_DrawRoundedRectangle(*args, **kwargs)
5810
5811 def DrawRoundedRectangleRect(*args, **kwargs):
5812 """
5813 DrawRoundedRectangleRect(self, Rect r, double radius)
5814
5815 Draws a rectangle with the given top left corner, and with the given
5816 size. The corners are quarter-circles using the given radius. The
5817 current pen is used for the outline and the current brush for filling
5818 the shape.
5819
5820 If radius is positive, the value is assumed to be the radius of the
5821 rounded corner. If radius is negative, the absolute value is assumed
5822 to be the proportion of the smallest dimension of the rectangle. This
5823 means that the corner can be a sensible size relative to the size of
5824 the rectangle, and also avoids the strange effects X produces when the
5825 corners are too big for the rectangle.
5826 """
5827 return _gdi_.PseudoDC_DrawRoundedRectangleRect(*args, **kwargs)
5828
5829 def DrawRoundedRectanglePointSize(*args, **kwargs):
5830 """
5831 DrawRoundedRectanglePointSize(self, Point pt, Size sz, double radius)
5832
5833 Draws a rectangle with the given top left corner, and with the given
5834 size. The corners are quarter-circles using the given radius. The
5835 current pen is used for the outline and the current brush for filling
5836 the shape.
5837
5838 If radius is positive, the value is assumed to be the radius of the
5839 rounded corner. If radius is negative, the absolute value is assumed
5840 to be the proportion of the smallest dimension of the rectangle. This
5841 means that the corner can be a sensible size relative to the size of
5842 the rectangle, and also avoids the strange effects X produces when the
5843 corners are too big for the rectangle.
5844 """
5845 return _gdi_.PseudoDC_DrawRoundedRectanglePointSize(*args, **kwargs)
5846
5847 def DrawCircle(*args, **kwargs):
5848 """
5849 DrawCircle(self, int x, int y, int radius)
5850
5851 Draws a circle with the given center point and radius. The current
5852 pen is used for the outline and the current brush for filling the
5853 shape.
5854 """
5855 return _gdi_.PseudoDC_DrawCircle(*args, **kwargs)
5856
5857 def DrawCirclePoint(*args, **kwargs):
5858 """
5859 DrawCirclePoint(self, Point pt, int radius)
5860
5861 Draws a circle with the given center point and radius. The current
5862 pen is used for the outline and the current brush for filling the
5863 shape.
5864 """
5865 return _gdi_.PseudoDC_DrawCirclePoint(*args, **kwargs)
5866
5867 def DrawEllipse(*args, **kwargs):
5868 """
5869 DrawEllipse(self, int x, int y, int width, int height)
5870
5871 Draws an ellipse contained in the specified rectangle. The current pen
5872 is used for the outline and the current brush for filling the shape.
5873 """
5874 return _gdi_.PseudoDC_DrawEllipse(*args, **kwargs)
5875
5876 def DrawEllipseRect(*args, **kwargs):
5877 """
5878 DrawEllipseRect(self, Rect rect)
5879
5880 Draws an ellipse contained in the specified rectangle. The current pen
5881 is used for the outline and the current brush for filling the shape.
5882 """
5883 return _gdi_.PseudoDC_DrawEllipseRect(*args, **kwargs)
5884
5885 def DrawEllipsePointSize(*args, **kwargs):
5886 """
5887 DrawEllipsePointSize(self, Point pt, Size sz)
5888
5889 Draws an ellipse contained in the specified rectangle. The current pen
5890 is used for the outline and the current brush for filling the shape.
5891 """
5892 return _gdi_.PseudoDC_DrawEllipsePointSize(*args, **kwargs)
5893
5894 def DrawIcon(*args, **kwargs):
5895 """
5896 DrawIcon(self, Icon icon, int x, int y)
5897
5898 Draw an icon on the display (does nothing if the device context is
5899 PostScript). This can be the simplest way of drawing bitmaps on a
5900 window.
5901 """
5902 return _gdi_.PseudoDC_DrawIcon(*args, **kwargs)
5903
5904 def DrawIconPoint(*args, **kwargs):
5905 """
5906 DrawIconPoint(self, Icon icon, Point pt)
5907
5908 Draw an icon on the display (does nothing if the device context is
5909 PostScript). This can be the simplest way of drawing bitmaps on a
5910 window.
5911 """
5912 return _gdi_.PseudoDC_DrawIconPoint(*args, **kwargs)
5913
5914 def DrawBitmap(*args, **kwargs):
5915 """
5916 DrawBitmap(self, Bitmap bmp, int x, int y, bool useMask=False)
5917
5918 Draw a bitmap on the device context at the specified point. If
5919 *transparent* is true and the bitmap has a transparency mask, (or
5920 alpha channel on the platforms that support it) then the bitmap will
5921 be drawn transparently.
5922 """
5923 return _gdi_.PseudoDC_DrawBitmap(*args, **kwargs)
5924
5925 def DrawBitmapPoint(*args, **kwargs):
5926 """
5927 DrawBitmapPoint(self, Bitmap bmp, Point pt, bool useMask=False)
5928
5929 Draw a bitmap on the device context at the specified point. If
5930 *transparent* is true and the bitmap has a transparency mask, (or
5931 alpha channel on the platforms that support it) then the bitmap will
5932 be drawn transparently.
5933 """
5934 return _gdi_.PseudoDC_DrawBitmapPoint(*args, **kwargs)
5935
5936 def DrawText(*args, **kwargs):
5937 """
5938 DrawText(self, String text, int x, int y)
5939
5940 Draws a text string at the specified point, using the current text
5941 font, and the current text foreground and background colours.
5942
5943 The coordinates refer to the top-left corner of the rectangle bounding
1d5ee749
RD
5944 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
5945 a text string, which can be used to position the text more precisely,
5946 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
5947 not implement it.)
27e45892
RD
5948
5949 **NOTE**: under wxGTK the current logical function is used by this
5950 function but it is ignored by wxMSW. Thus, you should avoid using
5951 logical functions with this function in portable programs.
5952 """
5953 return _gdi_.PseudoDC_DrawText(*args, **kwargs)
5954
5955 def DrawTextPoint(*args, **kwargs):
5956 """
5957 DrawTextPoint(self, String text, Point pt)
5958
5959 Draws a text string at the specified point, using the current text
5960 font, and the current text foreground and background colours.
5961
5962 The coordinates refer to the top-left corner of the rectangle bounding
1d5ee749
RD
5963 the string. See `wx.DC.GetTextExtent` for how to get the dimensions of
5964 a text string, which can be used to position the text more precisely,
5965 (you will need to use a real DC with GetTextExtent as wx.PseudoDC does
5966 not implement it.)
27e45892
RD
5967
5968 **NOTE**: under wxGTK the current logical function is used by this
5969 function but it is ignored by wxMSW. Thus, you should avoid using
5970 logical functions with this function in portable programs.
5971 """
5972 return _gdi_.PseudoDC_DrawTextPoint(*args, **kwargs)
5973
5974 def DrawRotatedText(*args, **kwargs):
5975 """
5976 DrawRotatedText(self, String text, int x, int y, double angle)
5977
5978 Draws the text rotated by *angle* degrees, if supported by the platform.
5979
5980 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
5981 function. In particular, a font different from ``wx.NORMAL_FONT``
5982 should be used as the it is not normally a TrueType
5983 font. ``wx.SWISS_FONT`` is an example of a font which is.
5984 """
5985 return _gdi_.PseudoDC_DrawRotatedText(*args, **kwargs)
5986
5987 def DrawRotatedTextPoint(*args, **kwargs):
5988 """
5989 DrawRotatedTextPoint(self, String text, Point pt, double angle)
5990
5991 Draws the text rotated by *angle* degrees, if supported by the platform.
5992
5993 **NOTE**: Under Win9x only TrueType fonts can be drawn by this
5994 function. In particular, a font different from ``wx.NORMAL_FONT``
5995 should be used as the it is not normally a TrueType
5996 font. ``wx.SWISS_FONT`` is an example of a font which is.
5997 """
5998 return _gdi_.PseudoDC_DrawRotatedTextPoint(*args, **kwargs)
5999
6000 def DrawLines(*args, **kwargs):
6001 """
6002 DrawLines(self, List points, int xoffset=0, int yoffset=0)
6003
6004 Draws lines using a sequence of `wx.Point` objects, adding the
6005 optional offset coordinate. The current pen is used for drawing the
6006 lines.
6007 """
6008 return _gdi_.PseudoDC_DrawLines(*args, **kwargs)
6009
6010 def DrawPolygon(*args, **kwargs):
6011 """
6012 DrawPolygon(self, List points, int xoffset=0, int yoffset=0,
6013 int fillStyle=ODDEVEN_RULE)
6014
6015 Draws a filled polygon using a sequence of `wx.Point` objects, adding
6016 the optional offset coordinate. The last argument specifies the fill
6017 rule: ``wx.ODDEVEN_RULE`` (the default) or ``wx.WINDING_RULE``.
6018
6019 The current pen is used for drawing the outline, and the current brush
6020 for filling the shape. Using a transparent brush suppresses
6021 filling. Note that wxWidgets automatically closes the first and last
6022 points.
6023 """
6024 return _gdi_.PseudoDC_DrawPolygon(*args, **kwargs)
6025
6026 def DrawLabel(*args, **kwargs):
6027 """
6028 DrawLabel(self, String text, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6029 int indexAccel=-1)
6030
6031 Draw *text* within the specified rectangle, abiding by the alignment
6032 flags. Will additionally emphasize the character at *indexAccel* if
6033 it is not -1.
6034 """
6035 return _gdi_.PseudoDC_DrawLabel(*args, **kwargs)
6036
6037 def DrawImageLabel(*args, **kwargs):
6038 """
6039 DrawImageLabel(self, String text, Bitmap image, Rect rect, int alignment=wxALIGN_LEFT|wxALIGN_TOP,
6040 int indexAccel=-1)
6041
6042 Draw *text* and an image (which may be ``wx.NullBitmap`` to skip
6043 drawing it) within the specified rectangle, abiding by the alignment
6044 flags. Will additionally emphasize the character at *indexAccel* if
6045 it is not -1.
6046 """
6047 return _gdi_.PseudoDC_DrawImageLabel(*args, **kwargs)
6048
6049 def DrawSpline(*args, **kwargs):
6050 """
6051 DrawSpline(self, List points)
6052
6053 Draws a spline between all given control points, (a list of `wx.Point`
6054 objects) using the current pen. The spline is drawn using a series of
6055 lines, using an algorithm taken from the X drawing program 'XFIG'.
6056 """
6057 return _gdi_.PseudoDC_DrawSpline(*args, **kwargs)
6058
6059 def Clear(*args, **kwargs):
6060 """
6061 Clear(self)
6062
6063 Clears the device context using the current background brush.
6064 """
6065 return _gdi_.PseudoDC_Clear(*args, **kwargs)
6066
6067 def SetFont(*args, **kwargs):
6068 """
6069 SetFont(self, Font font)
6070
6071 Sets the current font for the DC. It must be a valid font, in
6072 particular you should not pass ``wx.NullFont`` to this method.
6073 """
6074 return _gdi_.PseudoDC_SetFont(*args, **kwargs)
6075
6076 def SetPen(*args, **kwargs):
6077 """
6078 SetPen(self, Pen pen)
6079
6080 Sets the current pen for the DC.
6081
6082 If the argument is ``wx.NullPen``, the current pen is selected out of the
6083 device context, and the original pen restored.
6084 """
6085 return _gdi_.PseudoDC_SetPen(*args, **kwargs)
6086
6087 def SetBrush(*args, **kwargs):
6088 """
6089 SetBrush(self, Brush brush)
6090
6091 Sets the current brush for the DC.
6092
6093 If the argument is ``wx.NullBrush``, the current brush is selected out
6094 of the device context, and the original brush restored, allowing the
6095 current brush to be destroyed safely.
6096 """
6097 return _gdi_.PseudoDC_SetBrush(*args, **kwargs)
6098
6099 def SetBackground(*args, **kwargs):
6100 """
6101 SetBackground(self, Brush brush)
6102
6103 Sets the current background brush for the DC.
6104 """
6105 return _gdi_.PseudoDC_SetBackground(*args, **kwargs)
6106
6107 def SetBackgroundMode(*args, **kwargs):
6108 """
6109 SetBackgroundMode(self, int mode)
6110
6111 *mode* may be one of ``wx.SOLID`` and ``wx.TRANSPARENT``. This setting
6112 determines whether text will be drawn with a background colour or
6113 not.
6114 """
6115 return _gdi_.PseudoDC_SetBackgroundMode(*args, **kwargs)
6116
6117 def SetPalette(*args, **kwargs):
6118 """
6119 SetPalette(self, Palette palette)
6120
6121 If this is a window DC or memory DC, assigns the given palette to the
6122 window or bitmap associated with the DC. If the argument is
6123 ``wx.NullPalette``, the current palette is selected out of the device
6124 context, and the original palette restored.
6125 """
6126 return _gdi_.PseudoDC_SetPalette(*args, **kwargs)
6127
6128 def SetTextForeground(*args, **kwargs):
6129 """
6130 SetTextForeground(self, Colour colour)
6131
6132 Sets the current text foreground colour for the DC.
6133 """
6134 return _gdi_.PseudoDC_SetTextForeground(*args, **kwargs)
6135
6136 def SetTextBackground(*args, **kwargs):
6137 """
6138 SetTextBackground(self, Colour colour)
6139
6140 Sets the current text background colour for the DC.
6141 """
6142 return _gdi_.PseudoDC_SetTextBackground(*args, **kwargs)
6143
6144 def SetLogicalFunction(*args, **kwargs):
6145 """
6146 SetLogicalFunction(self, int function)
6147
6148 Sets the current logical function for the device context. This
1d5ee749
RD
6149 determines how a source pixel (from a pen or brush colour, combines
6150 with a destination pixel in the current device context.
27e45892
RD
6151
6152 The possible values and their meaning in terms of source and
6153 destination pixel values are as follows:
6154
6155 ================ ==========================
6156 wx.AND src AND dst
6157 wx.AND_INVERT (NOT src) AND dst
6158 wx.AND_REVERSE src AND (NOT dst)
6159 wx.CLEAR 0
6160 wx.COPY src
6161 wx.EQUIV (NOT src) XOR dst
6162 wx.INVERT NOT dst
6163 wx.NAND (NOT src) OR (NOT dst)
6164 wx.NOR (NOT src) AND (NOT dst)
6165 wx.NO_OP dst
6166 wx.OR src OR dst
6167 wx.OR_INVERT (NOT src) OR dst
6168 wx.OR_REVERSE src OR (NOT dst)
6169 wx.SET 1
6170 wx.SRC_INVERT NOT src
6171 wx.XOR src XOR dst
6172 ================ ==========================
6173
6174 The default is wx.COPY, which simply draws with the current
6175 colour. The others combine the current colour and the background using
6176 a logical operation. wx.INVERT is commonly used for drawing rubber
6177 bands or moving outlines, since drawing twice reverts to the original
6178 colour.
6179
6180 """
6181 return _gdi_.PseudoDC_SetLogicalFunction(*args, **kwargs)
6182
6183_gdi_.PseudoDC_swigregister(PseudoDC)
6184
70551f47 6185
32fe5131 6186