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