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