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