X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d0e2ede057148772415ee526344f1a1597db3ae7..59ccbf7fec7543fb2629f195592cb8aa67aa143b:/wxPython/src/_font.i diff --git a/wxPython/src/_font.i b/wxPython/src/_font.i index 81149f9bbc..ac507526bc 100644 --- a/wxPython/src/_font.i +++ b/wxPython/src/_font.i @@ -278,6 +278,14 @@ public: // hopefully be understood by the user) bool FromUserString(const wxString& s); wxString ToUserString() const; + + %property(Encoding, GetEncoding, SetEncoding, doc="See `GetEncoding` and `SetEncoding`"); + %property(FaceName, GetFaceName, SetFaceName, doc="See `GetFaceName` and `SetFaceName`"); + %property(Family, GetFamily, SetFamily, doc="See `GetFamily` and `SetFamily`"); + %property(PointSize, GetPointSize, SetPointSize, doc="See `GetPointSize` and `SetPointSize`"); + %property(Style, GetStyle, SetStyle, doc="See `GetStyle` and `SetStyle`"); + %property(Underlined, GetUnderlined, SetUnderlined, doc="See `GetUnderlined` and `SetUnderlined`"); + %property(Weight, GetWeight, SetWeight, doc="See `GetWeight` and `SetWeight`"); }; @@ -429,6 +437,8 @@ public: // the title for the dialogs (note that default is quite reasonable) void SetDialogTitle(const wxString& title); + + %property(AltForEncoding, GetAltForEncoding, doc="See `GetAltForEncoding`"); }; @@ -646,9 +656,10 @@ the closest size is found using a binary search. // was the font successfully created? DocDeclStr( - bool , Ok() const, + bool , IsOk() const, "Returns ``True`` if this font was successfully created.", ""); - %pythoncode { def __nonzero__(self): return self.Ok() } + %pythoncode { Ok = IsOk } + %pythoncode { def __nonzero__(self): return self.IsOk() } // comparison @@ -803,6 +814,22 @@ then for a font belonging to the same family.", ""); DocDeclStr( static void , SetDefaultEncoding(wxFontEncoding encoding), "Sets the default font encoding.", ""); + + %property(Encoding, GetEncoding, SetEncoding, doc="See `GetEncoding` and `SetEncoding`"); + %property(FaceName, GetFaceName, SetFaceName, doc="See `GetFaceName` and `SetFaceName`"); + %property(Family, GetFamily, SetFamily, doc="See `GetFamily` and `SetFamily`"); + %property(FamilyString, GetFamilyString, doc="See `GetFamilyString`"); + %property(NativeFontInfo, GetNativeFontInfo, SetNativeFontInfo, doc="See `GetNativeFontInfo` and `SetNativeFontInfo`"); + %property(NativeFontInfoDesc, GetNativeFontInfoDesc, doc="See `GetNativeFontInfoDesc`"); + %property(NativeFontInfoUserDesc, GetNativeFontInfoUserDesc, SetNativeFontInfoUserDesc, doc="See `GetNativeFontInfoUserDesc` and `SetNativeFontInfoUserDesc`"); + %property(NoAntiAliasing, GetNoAntiAliasing, SetNoAntiAliasing, doc="See `GetNoAntiAliasing` and `SetNoAntiAliasing`"); + %property(PixelSize, GetPixelSize, SetPixelSize, doc="See `GetPixelSize` and `SetPixelSize`"); + %property(PointSize, GetPointSize, SetPointSize, doc="See `GetPointSize` and `SetPointSize`"); + %property(Style, GetStyle, SetStyle, doc="See `GetStyle` and `SetStyle`"); + %property(StyleString, GetStyleString, doc="See `GetStyleString`"); + %property(Underlined, GetUnderlined, SetUnderlined, doc="See `GetUnderlined` and `SetUnderlined`"); + %property(Weight, GetWeight, SetWeight, doc="See `GetWeight` and `SetWeight`"); + %property(WeightString, GetWeightString, doc="See `GetWeightString`"); }; @@ -834,11 +861,11 @@ MustHaveApp(wxPyFontEnumerator); %rename(FontEnumerator) wxPyFontEnumerator; class wxPyFontEnumerator { public: - %pythonAppend wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)" + %pythonAppend wxPyFontEnumerator setCallbackInfo(FontEnumerator) wxPyFontEnumerator(); ~wxPyFontEnumerator(); - void _setCallbackInfo(PyObject* self, PyObject* _class, bool incref); + void _setCallbackInfo(PyObject* self, PyObject* _class, int incref=0); bool EnumerateFacenames( wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all