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