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