1//---------------------------------------------------------------------------
2// This file is generated by wxPython's SIP generator.  Do not edit by hand.
3//
4// Copyright: (c) 2018 by Total Control Software
5// License:   wxWindows License
6//
7// This file will be included by _core.sip
8//
9//---------------------------------------------------------------------------
10
11//---------------------------------------------------------------------------
12
13enum wxFontFamily
14{
15    wxFONTFAMILY_DEFAULT,
16    wxFONTFAMILY_DECORATIVE,
17    wxFONTFAMILY_ROMAN,
18    wxFONTFAMILY_SCRIPT,
19    wxFONTFAMILY_SWISS,
20    wxFONTFAMILY_MODERN,
21    wxFONTFAMILY_TELETYPE,
22    wxFONTFAMILY_MAX,
23    wxFONTFAMILY_UNKNOWN
24};
25
26enum wxFontStyle
27{
28    wxFONTSTYLE_NORMAL,
29    wxFONTSTYLE_ITALIC,
30    wxFONTSTYLE_SLANT,
31    wxFONTSTYLE_MAX
32};
33
34enum wxFontWeight
35{
36    wxFONTWEIGHT_NORMAL,
37    wxFONTWEIGHT_LIGHT,
38    wxFONTWEIGHT_BOLD,
39    wxFONTWEIGHT_MAX
40};
41
42enum wxFontSymbolicSize
43{
44    wxFONTSIZE_XX_SMALL,
45    wxFONTSIZE_X_SMALL,
46    wxFONTSIZE_SMALL,
47    wxFONTSIZE_MEDIUM,
48    wxFONTSIZE_LARGE,
49    wxFONTSIZE_X_LARGE,
50    wxFONTSIZE_XX_LARGE
51};
52
53enum wxFontFlag
54{
55    wxFONTFLAG_DEFAULT,
56    wxFONTFLAG_ITALIC,
57    wxFONTFLAG_SLANT,
58    wxFONTFLAG_LIGHT,
59    wxFONTFLAG_BOLD,
60    wxFONTFLAG_ANTIALIASED,
61    wxFONTFLAG_NOT_ANTIALIASED,
62    wxFONTFLAG_UNDERLINED,
63    wxFONTFLAG_STRIKETHROUGH,
64    wxFONTFLAG_MASK
65};
66
67enum wxFontEncoding
68{
69    wxFONTENCODING_SYSTEM,
70    wxFONTENCODING_DEFAULT,
71    wxFONTENCODING_ISO8859_1,
72    wxFONTENCODING_ISO8859_2,
73    wxFONTENCODING_ISO8859_3,
74    wxFONTENCODING_ISO8859_4,
75    wxFONTENCODING_ISO8859_5,
76    wxFONTENCODING_ISO8859_6,
77    wxFONTENCODING_ISO8859_7,
78    wxFONTENCODING_ISO8859_8,
79    wxFONTENCODING_ISO8859_9,
80    wxFONTENCODING_ISO8859_10,
81    wxFONTENCODING_ISO8859_11,
82    wxFONTENCODING_ISO8859_12,
83    wxFONTENCODING_ISO8859_13,
84    wxFONTENCODING_ISO8859_14,
85    wxFONTENCODING_ISO8859_15,
86    wxFONTENCODING_ISO8859_MAX,
87    wxFONTENCODING_KOI8,
88    wxFONTENCODING_KOI8_U,
89    wxFONTENCODING_ALTERNATIVE,
90    wxFONTENCODING_BULGARIAN,
91    wxFONTENCODING_CP437,
92    wxFONTENCODING_CP850,
93    wxFONTENCODING_CP852,
94    wxFONTENCODING_CP855,
95    wxFONTENCODING_CP866,
96    wxFONTENCODING_CP874,
97    wxFONTENCODING_CP932,
98    wxFONTENCODING_CP936,
99    wxFONTENCODING_CP949,
100    wxFONTENCODING_CP950,
101    wxFONTENCODING_CP1250,
102    wxFONTENCODING_CP1251,
103    wxFONTENCODING_CP1252,
104    wxFONTENCODING_CP1253,
105    wxFONTENCODING_CP1254,
106    wxFONTENCODING_CP1255,
107    wxFONTENCODING_CP1256,
108    wxFONTENCODING_CP1257,
109    wxFONTENCODING_CP1258,
110    wxFONTENCODING_CP1361,
111    wxFONTENCODING_CP12_MAX,
112    wxFONTENCODING_UTF7,
113    wxFONTENCODING_UTF8,
114    wxFONTENCODING_EUC_JP,
115    wxFONTENCODING_UTF16BE,
116    wxFONTENCODING_UTF16LE,
117    wxFONTENCODING_UTF32BE,
118    wxFONTENCODING_UTF32LE,
119    wxFONTENCODING_MACROMAN,
120    wxFONTENCODING_MACJAPANESE,
121    wxFONTENCODING_MACCHINESETRAD,
122    wxFONTENCODING_MACKOREAN,
123    wxFONTENCODING_MACARABIC,
124    wxFONTENCODING_MACHEBREW,
125    wxFONTENCODING_MACGREEK,
126    wxFONTENCODING_MACCYRILLIC,
127    wxFONTENCODING_MACDEVANAGARI,
128    wxFONTENCODING_MACGURMUKHI,
129    wxFONTENCODING_MACGUJARATI,
130    wxFONTENCODING_MACORIYA,
131    wxFONTENCODING_MACBENGALI,
132    wxFONTENCODING_MACTAMIL,
133    wxFONTENCODING_MACTELUGU,
134    wxFONTENCODING_MACKANNADA,
135    wxFONTENCODING_MACMALAJALAM,
136    wxFONTENCODING_MACSINHALESE,
137    wxFONTENCODING_MACBURMESE,
138    wxFONTENCODING_MACKHMER,
139    wxFONTENCODING_MACTHAI,
140    wxFONTENCODING_MACLAOTIAN,
141    wxFONTENCODING_MACGEORGIAN,
142    wxFONTENCODING_MACARMENIAN,
143    wxFONTENCODING_MACCHINESESIMP,
144    wxFONTENCODING_MACTIBETAN,
145    wxFONTENCODING_MACMONGOLIAN,
146    wxFONTENCODING_MACETHIOPIC,
147    wxFONTENCODING_MACCENTRALEUR,
148    wxFONTENCODING_MACVIATNAMESE,
149    wxFONTENCODING_MACARABICEXT,
150    wxFONTENCODING_MACSYMBOL,
151    wxFONTENCODING_MACDINGBATS,
152    wxFONTENCODING_MACTURKISH,
153    wxFONTENCODING_MACCROATIAN,
154    wxFONTENCODING_MACICELANDIC,
155    wxFONTENCODING_MACROMANIAN,
156    wxFONTENCODING_MACCELTIC,
157    wxFONTENCODING_MACGAELIC,
158    wxFONTENCODING_MACKEYBOARD,
159    wxFONTENCODING_ISO2022_JP,
160    wxFONTENCODING_MAX,
161    wxFONTENCODING_MACMIN,
162    wxFONTENCODING_MACMAX,
163    wxFONTENCODING_UTF16,
164    wxFONTENCODING_UTF32,
165    wxFONTENCODING_UNICODE,
166    wxFONTENCODING_GB2312,
167    wxFONTENCODING_BIG5,
168    wxFONTENCODING_SHIFT_JIS,
169    wxFONTENCODING_EUC_KR,
170    wxFONTENCODING_JOHAB,
171    wxFONTENCODING_VIETNAMESE
172};
173
174class wxFontInfo
175{
176    %Docstring
177        FontInfo()
178        FontInfo(pointSize)
179        FontInfo(pixelSize)
180
181        This class is a helper used for wxFont creation using named parameter
182        idiom: it allows specifying various wxFont attributes using the
183        chained calls to its clearly named methods instead of passing them in
184        the fixed order to wxFont constructors.
185    %End
186    %TypeHeaderCode
187        #include <wx/font.h>
188    %End
189
190public:
191    wxFontInfo();
192
193    wxFontInfo(
194        int pointSize
195    );
196
197    wxFontInfo(
198        const wxSize & pixelSize
199    );
200
201    wxFontInfo & Family(
202        wxFontFamily family
203    );
204    %Docstring
205        Family(family) -> FontInfo
206
207        Set the font family.
208    %End
209
210    wxFontInfo & FaceName(
211        const wxString & faceName
212    );
213    %Docstring
214        FaceName(faceName) -> FontInfo
215
216        Set the font face name to use.
217    %End
218
219    wxFontInfo & Bold(
220        bool bold = true
221    );
222    %Docstring
223        Bold(bold=True) -> FontInfo
224
225        Use a bold version of the font.
226    %End
227
228    wxFontInfo & Light(
229        bool light = true
230    );
231    %Docstring
232        Light(light=True) -> FontInfo
233
234        Use a lighter version of the font.
235    %End
236
237    wxFontInfo & Italic(
238        bool italic = true
239    );
240    %Docstring
241        Italic(italic=True) -> FontInfo
242
243        Use an italic version of the font.
244    %End
245
246    wxFontInfo & Slant(
247        bool slant = true
248    );
249    %Docstring
250        Slant(slant=True) -> FontInfo
251
252        Use a slanted version of the font.
253    %End
254
255    wxFontInfo & AntiAliased(
256        bool antiAliased = true
257    );
258    %Docstring
259        AntiAliased(antiAliased=True) -> FontInfo
260
261        Set anti-aliasing flag.
262    %End
263
264    wxFontInfo & Underlined(
265        bool underlined = true
266    );
267    %Docstring
268        Underlined(underlined=True) -> FontInfo
269
270        Use an underlined version of the font.
271    %End
272
273    wxFontInfo & Strikethrough(
274        bool strikethrough = true
275    );
276    %Docstring
277        Strikethrough(strikethrough=True) -> FontInfo
278
279        Use a strike-through version of the font.
280    %End
281
282    wxFontInfo & Encoding(
283        wxFontEncoding encoding
284    );
285    %Docstring
286        Encoding(encoding) -> FontInfo
287
288        Set the font encoding to use.
289    %End
290
291    wxFontInfo & AllFlags(
292        int flags
293    );
294    %Docstring
295        AllFlags(flags) -> FontInfo
296
297        Set all the font attributes at once.
298    %End
299
300};  // end of class wxFontInfo
301
302
303class wxFont : wxGDIObject
304{
305    %Docstring
306        Font()
307        Font(font)
308        Font(fontInfo)
309        Font(pointSize, family, style, weight, underline=False, faceName=EmptyString, encoding=FONTENCODING_DEFAULT)
310        Font(pixelSize, family, style, weight, underline=False, faceName=EmptyString, encoding=FONTENCODING_DEFAULT)
311        Font(nativeInfoString)
312        Font(nativeInfo)
313
314        A font is an object which determines the appearance of text.
315    %End
316    %TypeHeaderCode
317        #include <wx/font.h>
318    %End
319
320public:
321    wxFont();
322
323    wxFont(
324        const wxFont & font
325    );
326    %PreMethodCode
327        if (!wxPyCheckForApp()) return NULL;
328    %End
329
330    wxFont(
331        const wxFontInfo & fontInfo
332    );
333    %PreMethodCode
334        if (!wxPyCheckForApp()) return NULL;
335    %End
336
337    wxFont(
338        int pointSize,
339        wxFontFamily family,
340        wxFontStyle style,
341        wxFontWeight weight,
342        bool underline = false,
343        const wxString & faceName = wxEmptyString,
344        wxFontEncoding encoding = wxFONTENCODING_DEFAULT
345    );
346    %PreMethodCode
347        if (!wxPyCheckForApp()) return NULL;
348    %End
349
350    wxFont(
351        const wxSize & pixelSize,
352        wxFontFamily family,
353        wxFontStyle style,
354        wxFontWeight weight,
355        bool underline = false,
356        const wxString & faceName = wxEmptyString,
357        wxFontEncoding encoding = wxFONTENCODING_DEFAULT
358    );
359    %PreMethodCode
360        if (!wxPyCheckForApp()) return NULL;
361    %End
362
363    wxFont(
364        const wxString & nativeInfoString
365    );
366    %PreMethodCode
367        if (!wxPyCheckForApp()) return NULL;
368    %End
369
370    wxFont(
371        const wxNativeFontInfo & nativeInfo
372    );
373    %PreMethodCode
374        if (!wxPyCheckForApp()) return NULL;
375    %End
376
377    ~wxFont();
378
379    wxFontEncoding GetEncoding() const;
380    %Docstring
381        GetEncoding() -> FontEncoding
382
383        Returns the encoding of this font.
384    %End
385
386    wxString GetFaceName() const;
387    %Docstring
388        GetFaceName() -> String
389
390        Returns the face name associated with the font, or the empty string if
391        there is no face information.
392    %End
393
394    wxFontFamily GetFamily() const;
395    %Docstring
396        GetFamily() -> FontFamily
397
398        Gets the font family if possible.
399    %End
400
401    wxString GetNativeFontInfoDesc() const;
402    %Docstring
403        GetNativeFontInfoDesc() -> String
404
405        Returns the platform-dependent string completely describing this font.
406    %End
407
408    wxString GetNativeFontInfoUserDesc() const;
409    %Docstring
410        GetNativeFontInfoUserDesc() -> String
411
412        Returns a user-friendly string for this font object.
413    %End
414
415    const wxNativeFontInfo * GetNativeFontInfo() const;
416    %Docstring
417        GetNativeFontInfo() -> NativeFontInfo
418
419        Returns the encoding of this font.
420    %End
421
422    int GetPointSize() const;
423    %Docstring
424        GetPointSize() -> int
425
426        Gets the point size.
427    %End
428
429    wxSize GetPixelSize() const;
430    %Docstring
431        GetPixelSize() -> Size
432
433        Gets the pixel size.
434    %End
435
436    wxFontStyle GetStyle() const;
437    %Docstring
438        GetStyle() -> FontStyle
439
440        Gets the font style.
441    %End
442
443    bool GetUnderlined() const;
444    %Docstring
445        GetUnderlined() -> bool
446
447        Returns true if the font is underlined, false otherwise.
448    %End
449
450    bool GetStrikethrough() const;
451    %Docstring
452        GetStrikethrough() -> bool
453
454        Returns true if the font is stricken-through, false otherwise.
455    %End
456
457    wxFontWeight GetWeight() const;
458    %Docstring
459        GetWeight() -> FontWeight
460
461        Gets the font weight.
462    %End
463
464    bool IsFixedWidth() const;
465    %Docstring
466        IsFixedWidth() -> bool
467
468        Returns true if the font is a fixed width (or monospaced) font, false
469        if it is a proportional one or font is invalid.
470    %End
471
472    bool IsOk() const;
473    %Docstring
474        IsOk() -> bool
475
476        Returns true if this object is a valid font, false otherwise.
477    %End
478
479    wxFont Bold() const;
480    %Docstring
481        Bold() -> Font
482
483        Returns a bold version of this font.
484    %End
485
486    wxFont Italic() const;
487    %Docstring
488        Italic() -> Font
489
490        Returns an italic version of this font.
491    %End
492
493    wxFont Larger() const;
494    %Docstring
495        Larger() -> Font
496
497        Returns a larger version of this font.
498    %End
499
500    wxFont Smaller() const;
501    %Docstring
502        Smaller() -> Font
503
504        Returns a smaller version of this font.
505    %End
506
507    wxFont Underlined() const;
508    %Docstring
509        Underlined() -> Font
510
511        Returns underlined version of this font.
512    %End
513
514    wxFont Strikethrough() const;
515    %Docstring
516        Strikethrough() -> Font
517
518        Returns stricken-through version of this font.
519    %End
520
521    wxFont & MakeBold();
522    %Docstring
523        MakeBold() -> Font
524
525        Changes this font to be bold.
526    %End
527
528    wxFont & MakeItalic();
529    %Docstring
530        MakeItalic() -> Font
531
532        Changes this font to be italic.
533    %End
534
535    wxFont & MakeLarger();
536    %Docstring
537        MakeLarger() -> Font
538
539        Changes this font to be larger.
540    %End
541
542    wxFont & MakeSmaller();
543    %Docstring
544        MakeSmaller() -> Font
545
546        Changes this font to be smaller.
547    %End
548
549    wxFont & MakeUnderlined();
550    %Docstring
551        MakeUnderlined() -> Font
552
553        Changes this font to be underlined.
554    %End
555
556    wxFont & MakeStrikethrough();
557    %Docstring
558        MakeStrikethrough() -> Font
559
560        Changes this font to be stricken-through.
561    %End
562
563    wxFont & Scale(
564        float x
565    );
566    %Docstring
567        Scale(x) -> Font
568
569        Changes the size of this font.
570    %End
571
572    wxFont Scaled(
573        float x
574    ) const;
575    %Docstring
576        Scaled(x) -> Font
577
578        Returns a scaled version of this font.
579    %End
580
581    void SetEncoding(
582        wxFontEncoding encoding
583    );
584    %Docstring
585        SetEncoding(encoding)
586
587        Sets the encoding for this font.
588    %End
589
590    bool SetFaceName(
591        const wxString & faceName
592    );
593    %Docstring
594        SetFaceName(faceName) -> bool
595
596        Sets the facename for the font.
597    %End
598
599    void SetFamily(
600        wxFontFamily family
601    );
602    %Docstring
603        SetFamily(family)
604
605        Sets the font family.
606    %End
607
608    bool SetNativeFontInfo(
609        const wxString & info
610    );
611    %Docstring
612        SetNativeFontInfo(info) -> bool
613        SetNativeFontInfo(info)
614
615        Creates the font corresponding to the given native font description
616        string which must have been previously returned by
617        GetNativeFontInfoDesc().
618    %End
619
620    void SetNativeFontInfo(
621        const wxNativeFontInfo & info
622    );
623
624    bool SetNativeFontInfoUserDesc(
625        const wxString & info
626    );
627    %Docstring
628        SetNativeFontInfoUserDesc(info) -> bool
629
630        Creates the font corresponding to the given native font description
631        string and returns true if the creation was successful.
632    %End
633
634    void SetPointSize(
635        int pointSize
636    );
637    %Docstring
638        SetPointSize(pointSize)
639
640        Sets the point size.
641    %End
642
643    void SetPixelSize(
644        const wxSize & pixelSize
645    );
646    %Docstring
647        SetPixelSize(pixelSize)
648
649        Sets the pixel size.
650    %End
651
652    void SetStyle(
653        wxFontStyle style
654    );
655    %Docstring
656        SetStyle(style)
657
658        Sets the font style.
659    %End
660
661    void SetSymbolicSize(
662        wxFontSymbolicSize size
663    );
664    %Docstring
665        SetSymbolicSize(size)
666
667        Sets the font size using a predefined symbolic size name.
668    %End
669
670    void SetSymbolicSizeRelativeTo(
671        wxFontSymbolicSize size,
672        int base
673    );
674    %Docstring
675        SetSymbolicSizeRelativeTo(size, base)
676
677        Sets the font size compared to the base font size.
678    %End
679
680    void SetUnderlined(
681        bool underlined
682    );
683    %Docstring
684        SetUnderlined(underlined)
685
686        Sets underlining.
687    %End
688
689    void SetStrikethrough(
690        bool strikethrough
691    );
692    %Docstring
693        SetStrikethrough(strikethrough)
694
695        Sets strike-through attribute of the font.
696    %End
697
698    void SetWeight(
699        wxFontWeight weight
700    );
701    %Docstring
702        SetWeight(weight)
703
704        Sets the font weight.
705    %End
706
707    static
708    wxFont * New(
709        int pointSize,
710        wxFontFamily family,
711        wxFontStyle style,
712        wxFontWeight weight,
713        bool underline = false,
714        const wxString & faceName = wxEmptyString,
715        wxFontEncoding encoding = wxFONTENCODING_DEFAULT
716    )   /Factory/;
717    %Docstring
718        New(pointSize, family, style, weight, underline=False, faceName=EmptyString, encoding=FONTENCODING_DEFAULT) -> Font
719        New(pointSize, family, flags=FONTFLAG_DEFAULT, faceName=EmptyString, encoding=FONTENCODING_DEFAULT) -> Font
720        New(pixelSize, family, style, weight, underline=False, faceName=EmptyString, encoding=FONTENCODING_DEFAULT) -> Font
721        New(pixelSize, family, flags=FONTFLAG_DEFAULT, faceName=EmptyString, encoding=FONTENCODING_DEFAULT) -> Font
722        New(nativeInfo) -> Font
723        New(nativeInfoString) -> Font
724
725        This function takes the same parameters as the relative wxFont
726        constructor and returns a new font object allocated on the heap.
727    %End
728    %PreMethodCode
729        if (!wxPyCheckForApp()) return NULL;
730    %End
731
732    static
733    wxFont * New(
734        int pointSize,
735        wxFontFamily family,
736        int flags = wxFONTFLAG_DEFAULT,
737        const wxString & faceName = wxEmptyString,
738        wxFontEncoding encoding = wxFONTENCODING_DEFAULT
739    )   /Factory/;
740    %PreMethodCode
741        if (!wxPyCheckForApp()) return NULL;
742    %End
743
744    static
745    wxFont * New(
746        const wxSize & pixelSize,
747        wxFontFamily family,
748        wxFontStyle style,
749        wxFontWeight weight,
750        bool underline = false,
751        const wxString & faceName = wxEmptyString,
752        wxFontEncoding encoding = wxFONTENCODING_DEFAULT
753    )   /Factory/;
754    %PreMethodCode
755        if (!wxPyCheckForApp()) return NULL;
756    %End
757
758    static
759    wxFont * New(
760        const wxSize & pixelSize,
761        wxFontFamily family,
762        int flags = wxFONTFLAG_DEFAULT,
763        const wxString & faceName = wxEmptyString,
764        wxFontEncoding encoding = wxFONTENCODING_DEFAULT
765    )   /Factory/;
766    %PreMethodCode
767        if (!wxPyCheckForApp()) return NULL;
768    %End
769
770    static
771    wxFont * New(
772        const wxNativeFontInfo & nativeInfo
773    )   /Factory/;
774    %PreMethodCode
775        if (!wxPyCheckForApp()) return NULL;
776    %End
777
778    static
779    wxFont * New(
780        const wxString & nativeInfoString
781    )   /Factory/;
782    %PreMethodCode
783        if (!wxPyCheckForApp()) return NULL;
784    %End
785
786    bool operator!=(
787        const wxFont & font
788    ) const;
789
790    bool operator==(
791        const wxFont & font
792    ) const;
793
794    static
795    wxFontEncoding GetDefaultEncoding();
796    %Docstring
797        GetDefaultEncoding() -> FontEncoding
798
799        Returns the current application's default encoding.
800    %End
801    %PreMethodCode
802        if (!wxPyCheckForApp()) return NULL;
803    %End
804
805    static
806    void SetDefaultEncoding(
807        wxFontEncoding encoding
808    );
809    %Docstring
810        SetDefaultEncoding(encoding)
811
812        Sets the default font encoding.
813    %End
814    %PreMethodCode
815        if (!wxPyCheckForApp()) return NULL;
816    %End
817
818    %Property(name=Encoding, get=GetEncoding, set=SetEncoding)
819    %Property(name=FaceName, get=GetFaceName, set=SetFaceName)
820    %Property(name=Family, get=GetFamily, set=SetFamily)
821    %Property(name=NativeFontInfoDesc, get=GetNativeFontInfoDesc, set=SetNativeFontInfo)
822    %Property(name=NativeFontInfoUserDesc, get=GetNativeFontInfoUserDesc, set=SetNativeFontInfoUserDesc)
823    %Property(name=PointSize, get=GetPointSize, set=SetPointSize)
824    %Property(name=PixelSize, get=GetPixelSize, set=SetPixelSize)
825    %Property(name=Style, get=GetStyle, set=SetStyle)
826    %Property(name=Weight, get=GetWeight, set=SetWeight)
827    int __nonzero__();
828    %Docstring
829        __nonzero__() -> int
830    %End
831    %MethodCode
832        PyErr_Clear();
833        Py_BEGIN_ALLOW_THREADS
834        sipRes = _wxFont___nonzero__(sipCpp);
835        Py_END_ALLOW_THREADS
836        if (PyErr_Occurred()) sipIsErr = 1;
837    %End
838    %TypeCode
839    int _wxFont___nonzero__(wxFont* self)
840    {
841        return self->IsOk();
842    }
843    %End
844
845    int __bool__();
846    %Docstring
847        __bool__() -> int
848    %End
849    %MethodCode
850        PyErr_Clear();
851        Py_BEGIN_ALLOW_THREADS
852        sipRes = _wxFont___bool__(sipCpp);
853        Py_END_ALLOW_THREADS
854        if (PyErr_Occurred()) sipIsErr = 1;
855    %End
856    %TypeCode
857    int _wxFont___bool__(wxFont* self)
858    {
859        return self->IsOk();
860    }
861    %End
862
863    void* GetHFONT();
864    %Docstring
865        GetHFONT() -> void
866
867        Returns the font's native handle.
868    %End
869    %MethodCode
870        PyErr_Clear();
871        Py_BEGIN_ALLOW_THREADS
872        sipRes = _wxFont_GetHFONT(sipCpp);
873        Py_END_ALLOW_THREADS
874        if (PyErr_Occurred()) sipIsErr = 1;
875    %End
876    %TypeCode
877    void* _wxFont_GetHFONT(wxFont* self)
878    {
879        #ifdef __WXMSW__
880            return self->GetHFONT();
881        #else
882            return 0;
883        #endif
884    }
885    %End
886
887    void* OSXGetCGFont();
888    %Docstring
889        OSXGetCGFont() -> void
890
891        Returns the font's native handle.
892    %End
893    %MethodCode
894        PyErr_Clear();
895        Py_BEGIN_ALLOW_THREADS
896        sipRes = _wxFont_OSXGetCGFont(sipCpp);
897        Py_END_ALLOW_THREADS
898        if (PyErr_Occurred()) sipIsErr = 1;
899    %End
900    %TypeCode
901    void* _wxFont_OSXGetCGFont(wxFont* self)
902    {
903        #ifdef __WXMAC__
904            return self->OSXGetCGFont();
905        #else
906            return 0;
907        #endif
908    }
909    %End
910
911    void* GetPangoFontDescription();
912    %Docstring
913        GetPangoFontDescription() -> void
914
915        Returns the font's native handle.
916    %End
917    %MethodCode
918        PyErr_Clear();
919        Py_BEGIN_ALLOW_THREADS
920        sipRes = _wxFont_GetPangoFontDescription(sipCpp);
921        Py_END_ALLOW_THREADS
922        if (PyErr_Occurred()) sipIsErr = 1;
923    %End
924    %TypeCode
925    void* _wxFont_GetPangoFontDescription(wxFont* self)
926    {
927        #ifdef __WXGTK__
928            return self->GetNativeFontInfo()->description;
929        #else
930            return 0;
931        #endif
932    }
933    %End
934
935    void _copyFrom(const wxFont* other);
936    %Docstring
937        _copyFrom(other)
938
939        For internal use only.
940    %End
941    %MethodCode
942        PyErr_Clear();
943        Py_BEGIN_ALLOW_THREADS
944        _wxFont__copyFrom(sipCpp, other);
945        Py_END_ALLOW_THREADS
946        if (PyErr_Occurred()) sipIsErr = 1;
947    %End
948    %TypeCode
949    void _wxFont__copyFrom(wxFont* self, const wxFont* other)
950    {
951        *self = *other;
952    }
953    %End
954
955};  // end of class wxFont
956
957
958%Extract(id=pycode_core)
959def _Font_SetNoAntiAliasing(self, no=True):
960    pass
961Font.SetNoAntiAliasing = wx.deprecated(_Font_SetNoAntiAliasing)
962del _Font_SetNoAntiAliasing
963%End
964
965%Extract(id=pycode_core)
966def _Font_GetNoAntiAliasing(self):
967    pass
968Font.GetNoAntiAliasing = wx.deprecated(_Font_GetNoAntiAliasing)
969del _Font_GetNoAntiAliasing
970%End
971
972class wxFontList
973{
974    %Docstring
975        FontList()
976
977        A font list is a list containing all fonts which have been created.
978    %End
979    %TypeHeaderCode
980        #include <wx/font.h>
981    %End
982
983public:
984    wxFontList();
985
986    wxFont * FindOrCreateFont(
987        int point_size,
988        wxFontFamily family,
989        wxFontStyle style,
990        wxFontWeight weight,
991        bool underline = false,
992        const wxString & facename = wxEmptyString,
993        wxFontEncoding encoding = wxFONTENCODING_DEFAULT
994    );
995    %Docstring
996        FindOrCreateFont(point_size, family, style, weight, underline=False, facename=EmptyString, encoding=FONTENCODING_DEFAULT) -> Font
997
998        Finds a font of the given specification, or creates one and adds it to
999        the list.
1000    %End
1001
1002};  // end of class wxFontList
1003
1004
1005wxFont wxNullFont;
1006
1007wxFont* FFont(int pointSize,
1008                              wxFontFamily family,
1009                              int flags = wxFONTFLAG_DEFAULT,
1010                              const wxString& faceName = wxEmptyString,
1011                              wxFontEncoding encoding = wxFONTENCODING_DEFAULT)   /Factory/;
1012%Docstring
1013    FFont(pointSize, family, flags=FONTFLAG_DEFAULT, faceName=EmptyString, encoding=FONTENCODING_DEFAULT)
1014%End
1015%MethodCode
1016    PyErr_Clear();
1017    Py_BEGIN_ALLOW_THREADS
1018    sipRes = _FFont_function(pointSize, family, flags, faceName, encoding);
1019    Py_END_ALLOW_THREADS
1020    if (PyErr_Occurred()) sipIsErr = 1;
1021%End
1022%ModuleCode
1023wxFont* _FFont_function(int pointSize, wxFontFamily family, int flags, const wxString* faceName, wxFontEncoding encoding)
1024{
1025    wxFont* font = wxFont::New(pointSize, family, flags, *faceName, encoding);
1026    return font;
1027}
1028%End
1029
1030%Extract(id=pycode_core)
1031# These stock fonts will be initialized when the wx.App object is created.
1032NORMAL_FONT = Font()
1033SMALL_FONT = Font()
1034ITALIC_FONT = Font()
1035SWISS_FONT = Font()
1036
1037%End
1038
1039%Extract(id=pycode_core)
1040wx.DEFAULT    = int(wx.FONTFAMILY_DEFAULT)
1041wx.DECORATIVE = int(wx.FONTFAMILY_DECORATIVE)
1042wx.ROMAN      = int(wx.FONTFAMILY_ROMAN)
1043wx.SCRIPT     = int(wx.FONTFAMILY_SCRIPT)
1044wx.SWISS      = int(wx.FONTFAMILY_SWISS)
1045wx.MODERN     = int(wx.FONTFAMILY_MODERN)
1046wx.TELETYPE   = int(wx.FONTFAMILY_TELETYPE)
1047
1048wx.NORMAL = int(wx.FONTWEIGHT_NORMAL)
1049wx.LIGHT  = int(wx.FONTWEIGHT_LIGHT)
1050wx.BOLD   = int(wx.FONTWEIGHT_BOLD)
1051
1052wx.NORMAL = int(wx.FONTSTYLE_NORMAL)
1053wx.ITALIC = int(wx.FONTSTYLE_ITALIC)
1054wx.SLANT  = int(wx.FONTSTYLE_SLANT)
1055
1056%End
1057
1058
1059//---------------------------------------------------------------------------
1060
1061