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