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