// 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
int family, // see wxFontFamily enum
int style, // see wxFontStyle enum
int weight, // see wxFontWeight enum
- bool underlined = FALSE, // not underlined by default
+ bool underlined = false, // not underlined by default
const wxString& face = wxEmptyString, // facename
wxFontEncoding encoding = wxFONTENCODING_DEFAULT); // ISO8859-X, ...
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;
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);
wxString GetWeightString() const;
// Unofficial API, don't use
- virtual void SetNoAntiAliasing( bool no = TRUE ) { }
- virtual bool GetNoAntiAliasing() { return FALSE; }
+ virtual void SetNoAntiAliasing( bool WXUNUSED(no) = true ) { }
+ virtual bool GetNoAntiAliasing() const { return false; }
// the default encoding is used for creating all fonts with default
// encoding parameter
// 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
#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
// ----------------------------------------------------------------------------