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