#pragma hdrstop
#endif
+#include "wx/font.h"
+
#ifndef WX_PRECOMP
#include "wx/list.h"
#include "wx/utils.h"
#include "wx/app.h"
- #include "wx/font.h"
#include "wx/log.h"
#include "wx/encinfo.h"
#endif // WX_PRECOMP
m_weight = weight;
}
- void SetFaceName(const wxString& faceName)
+ bool SetFaceName(const wxString& faceName)
{
if ( m_nativeFontInfoOk )
m_nativeFontInfo.SetFaceName(faceName);
bool m_nativeFontInfoOk;
};
+#define M_FONTDATA ((wxFontRefData*)m_refData)
+
// ============================================================================
// implementation
// ============================================================================
// wxFont
// ----------------------------------------------------------------------------
-void wxFont::Init()
-{
-}
-
bool wxFont::Create(const wxNativeFontInfo& info, WXHFONT hFont)
{
return false;
// ----------------------------------------------------------------------------
// real implementation
// ----------------------------------------------------------------------------
+wxGDIRefData *wxFont::CreateGDIRefData() const
+{
+ return new wxFontRefData();
+}
+
+wxGDIRefData *wxFont::CloneGDIRefData(const wxGDIRefData *data) const
+{
+ return new wxFontRefData(*wx_static_cast(const wxFontRefData *, data));
+}
bool wxFont::RealizeResource()
{
return false;
}
-void wxFont::Unshare()
-{
-}
-
// ----------------------------------------------------------------------------
// change font attribute: we recreate font when doing it
// ----------------------------------------------------------------------------
{
}
-void wxFont::SetFaceName(const wxString& faceName)
+bool wxFont::SetFaceName(const wxString& faceName)
{
+ return true;
}
void wxFont::SetUnderlined(bool underlined)
return NULL;
}
+wxString wxFont::GetNativeFontInfoDesc() const
+{
+ wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
+
+ // be sure we have an HFONT associated...
+ wxConstCast(this, wxFont)->RealizeResource();
+ return wxFontBase::GetNativeFontInfoDesc();
+}
+
+wxString wxFont::GetNativeFontInfoUserDesc() const
+{
+ wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") );
+
+ // be sure we have an HFONT associated...
+ wxConstCast(this, wxFont)->RealizeResource();
+ return wxFontBase::GetNativeFontInfoUserDesc();
+}
+
bool wxFont::IsFixedWidth() const
{
return false;