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