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