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