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