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