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