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