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