X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f7946addb258a973e9da5601cf96712ed4f5c5c8..ab67e8874db324fab5223cc8d5dff8a8de3e2b77:/include/wx/osx/font.h?ds=sidebyside diff --git a/include/wx/osx/font.h b/include/wx/osx/font.h index bcd86e775a..007eaef9cf 100644 --- a/include/wx/osx/font.h +++ b/include/wx/osx/font.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: font.h +// Name: wx/osx/font.h // Purpose: wxFont class // Author: Julian Smart // Modified by: @@ -37,6 +37,8 @@ public: // ctors and such wxFont() { } + wxFont( wxOSXSystemFont systemFont ); + #if wxOSX_USE_COCOA wxFont(WX_NSFont nsfont); #endif @@ -77,6 +79,19 @@ public: SetPixelSize(pixelSize); } + wxFont(int pointSize, + wxFontFamily family, + int flags = wxFONTFLAG_DEFAULT, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(pointSize, family, + GetStyleFromFlags(flags), + GetWeightFromFlags(flags), + GetUnderlinedFromFlags(flags), + face, encoding); + } + bool Create(int size, wxFontFamily family, wxFontStyle style, @@ -94,14 +109,11 @@ public: bool Create(const wxNativeFontInfo& info); - bool CreateSystemFont(wxOSXSystemFont font); - virtual ~wxFont(); // implement base class pure virtuals virtual int GetPointSize() const; virtual wxSize GetPixelSize() const; - virtual wxFontFamily GetFamily() const; virtual wxFontStyle GetStyle() const; virtual wxFontWeight GetWeight() const; virtual bool GetUnderlined() const; @@ -109,6 +121,8 @@ public: virtual wxFontEncoding GetEncoding() const; virtual const wxNativeFontInfo *GetNativeFontInfo() const; + virtual bool IsFixedWidth() const; + virtual void SetPointSize(int pointSize); virtual void SetFamily(wxFontFamily family); virtual void SetStyle(wxFontStyle style); @@ -147,11 +161,9 @@ public: void* MacGetATSUStyle() const ; void* OSXGetATSUStyle() const { return MacGetATSUStyle() ; } -#if WXWIN_COMPATIBILITY_2_8 wxDEPRECATED( wxUint32 MacGetATSUFontID() const ); wxDEPRECATED( wxUint32 MacGetATSUAdditionalQDStyles() const ); #endif -#endif #if wxOSX_USE_COCOA WX_NSFont OSXGetNSFont() const; @@ -168,6 +180,7 @@ public: protected: virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info); + virtual wxFontFamily DoGetFamily() const; virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;