// Author: Julian Smart
// Modified by:
// Created: 17/09/98
-// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/tokenzr.h"
#include "wx/motif/private.h"
-IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
-
// ----------------------------------------------------------------------------
// private classes
// ----------------------------------------------------------------------------
int wxFont::GetPointSize() const
{
- wxCHECK_MSG( Ok(), 0, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), 0, wxT("invalid font") );
return M_FONTDATA->m_pointSize;
}
wxString wxFont::GetFaceName() const
{
- wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), wxEmptyString, wxT("invalid font") );
return M_FONTDATA->m_faceName ;
}
-wxFontFamily wxFont::GetFamily() const
+wxFontFamily wxFont::DoGetFamily() const
{
- wxCHECK_MSG( Ok(), wxFONTFAMILY_MAX, wxT("invalid font") );
-
return M_FONTDATA->m_family;
}
wxFontStyle wxFont::GetStyle() const
{
- wxCHECK_MSG( Ok(), wxFONTSTYLE_MAX, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), wxFONTSTYLE_MAX, wxT("invalid font") );
return M_FONTDATA->m_style;
}
wxFontWeight wxFont::GetWeight() const
{
- wxCHECK_MSG( Ok(), wxFONTWEIGHT_MAX, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), wxFONTWEIGHT_MAX, wxT("invalid font") );
return M_FONTDATA->m_weight;
}
bool wxFont::GetUnderlined() const
{
- wxCHECK_MSG( Ok(), false, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), false, wxT("invalid font") );
return M_FONTDATA->m_underlined;
}
wxFontEncoding wxFont::GetEncoding() const
{
- wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), wxFONTENCODING_DEFAULT, wxT("invalid font") );
return M_FONTDATA->m_encoding;
}
const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
{
- wxCHECK_MSG( Ok(), NULL, wxT("invalid font") );
+ wxCHECK_MSG( IsOk(), NULL, wxT("invalid font") );
if(M_FONTDATA->m_nativeFontInfo.GetXFontName().empty())
GetInternalFont();
// font to list in the private data for future reference.
wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const
{
- if ( !Ok() )
+ if ( !IsOk() )
return NULL;
long intScale = long(scale * 100.0 + 0.5); // key for wxXFont
WXFontType wxFont::GetFontType(WXDisplay* display) const
{
#if wxMOTIF_USE_RENDER_TABLE
- return Ok() ? GetRenderTable(display) : NULL;
+ return IsOk() ? GetRenderTable(display) : NULL;
#else
- return Ok() ? GetFontList(1.0, display) : NULL;
+ return IsOk() ? GetFontList(1.0, display) : NULL;
#endif
}
WXFontType wxFont::GetFontTypeC(WXDisplay* display) const
{
#if wxMOTIF_USE_RENDER_TABLE
- return Ok() ? GetRenderTable(display) : NULL;
+ return IsOk() ? GetRenderTable(display) : NULL;
#else
- return Ok() ? XmFontListCopy( (XmFontList)GetFontList(1.0, display) ) : NULL;
+ return IsOk() ? XmFontListCopy( (XmFontList)GetFontList(1.0, display) ) : NULL;
#endif
}