X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..43790a0d0386ba63c967545cea7487df2db6e966:/include/wx/font.h?ds=sidebyside diff --git a/include/wx/font.h b/include/wx/font.h index 0e6098ea3b..329fc58c76 100644 --- a/include/wx/font.h +++ b/include/wx/font.h @@ -5,14 +5,14 @@ // Modified by: // Created: 20.09.99 // RCS-ID: $Id$ -// Copyright: (c) wxWindows team -// Licence: wxWindows license +// Copyright: (c) wxWidgets team +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_FONT_H_BASE_ #define _WX_FONT_H_BASE_ -#if defined(__GNUG__) && !defined(__APPLE__) +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma interface "fontbase.h" #endif @@ -156,7 +156,7 @@ public: virtual bool GetUnderlined() const = 0; virtual wxString GetFaceName() const = 0; virtual wxFontEncoding GetEncoding() const = 0; - virtual wxNativeFontInfo *GetNativeFontInfo() const; + virtual const wxNativeFontInfo *GetNativeFontInfo() const = 0; virtual bool IsFixedWidth() const; @@ -171,7 +171,8 @@ public: virtual void SetFaceName( const wxString& faceName ) = 0; virtual void SetUnderlined( bool underlined ) = 0; virtual void SetEncoding(wxFontEncoding encoding) = 0; - virtual void SetNativeFontInfo(const wxNativeFontInfo& info); + void SetNativeFontInfo(const wxNativeFontInfo& info) + { DoSetNativeFontInfo(info); } void SetNativeFontInfo(const wxString& info); void SetNativeFontInfoUserDesc(const wxString& info); @@ -183,7 +184,7 @@ public: wxString GetWeightString() const; // Unofficial API, don't use - virtual void SetNoAntiAliasing( bool no = TRUE ) { } + virtual void SetNoAntiAliasing( bool WXUNUSED(no) = TRUE ) { } virtual bool GetNoAntiAliasing() { return FALSE; } // the default encoding is used for creating all fonts with default @@ -195,7 +196,10 @@ protected: // get the internal data wxFontRefData *GetFontData() const { return (wxFontRefData *)m_refData; } - + + // the function called by both overloads of SetNativeFontInfo() + virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info); + private: // the currently default encoding: by default, it's the default system // encoding, but may be changed by the application using @@ -217,10 +221,10 @@ private: #include "wx/mgl/font.h" #elif defined(__WXMAC__) #include "wx/mac/font.h" +#elif defined(__WXCOCOA__) + #include "wx/cocoa/font.h" #elif defined(__WXPM__) #include "wx/os2/font.h" -#elif defined(__WXSTUBS__) - #include "wx/stubs/font.h" #endif // ----------------------------------------------------------------------------