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