wxFontRefData(int size,
const wxSize& pixelSize,
bool sizeUsingPixels,
- int family,
- int style,
- int weight,
+ wxFontFamily family,
+ wxFontStyle style,
+ wxFontWeight weight,
bool underlined,
const wxString& faceName,
wxFontEncoding encoding)
}
}
- void SetFamily(int family)
+ void SetFamily(wxFontFamily family)
{
m_family = family;
}
- void SetStyle(int style)
+ void SetStyle(wxFontStyle style)
{
if ( m_nativeFontInfoOk )
m_nativeFontInfo.SetStyle((wxFontStyle)style);
m_style = style;
}
- void SetWeight(int weight)
+ void SetWeight(wxFontWeight weight)
{
if ( m_nativeFontInfoOk )
m_nativeFontInfo.SetWeight((wxFontWeight)weight);
void Init(int size,
const wxSize& pixelSize,
bool sizeUsingPixels,
- int family,
- int style,
- int weight,
+ wxFontFamily family,
+ wxFontStyle style,
+ wxFontWeight weight,
bool underlined,
const wxString& faceName,
wxFontEncoding encoding);
int m_pointSize;
wxSize m_pixelSize;
bool m_sizeUsingPixels;
- int m_family;
- int m_style;
- int m_weight;
+ wxFontFamily m_family;
+ wxFontStyle m_style;
+ wxFontWeight m_weight;
bool m_underlined;
wxString m_faceName;
wxFontEncoding m_encoding;
void wxFontRefData::Init(int pointSize,
const wxSize& pixelSize,
bool sizeUsingPixels,
- int family,
- int style,
- int weight,
+ wxFontFamily family,
+ wxFontStyle style,
+ wxFontWeight weight,
bool underlined,
const wxString& faceName,
wxFontEncoding encoding)
bool wxFont::DoCreate(int pointSize,
const wxSize& pixelSize,
bool sizeUsingPixels,
- int family,
- int style,
- int weight,
+ wxFontFamily family,
+ wxFontStyle style,
+ wxFontWeight weight,
bool underlined,
const wxString& faceName,
wxFontEncoding encoding)
// ----------------------------------------------------------------------------
// real implementation
// ----------------------------------------------------------------------------
+wxGDIRefData *wxFont::CreateGDIRefData() const
+{
+ return new wxFontRefData();
+}
+
+wxGDIRefData *wxFont::CloneGDIRefData(const wxGDIRefData *data) const
+{
+ return new wxFontRefData(*static_cast<const wxFontRefData *>(data));
+}
bool wxFont::RealizeResource()
{
return false;
}
-void wxFont::Unshare()
-{
-}
-
// ----------------------------------------------------------------------------
// change font attribute: we recreate font when doing it
// ----------------------------------------------------------------------------
{
}
-void wxFont::SetFamily(int family)
+void wxFont::SetFamily(wxFontFamily family)
{
}
-void wxFont::SetStyle(int style)
+void wxFont::SetStyle(wxFontStyle style)
{
}
-void wxFont::SetWeight(int weight)
+void wxFont::SetWeight(wxFontWeight weight)
{
}
return false;
}
-int wxFont::GetFamily() const
+wxFontFamily wxFont::GetFamily() const
{
return wxFONTFAMILY_ROMAN;
}
-int wxFont::GetStyle() const
+wxFontStyle wxFont::GetStyle() const
{
return wxFONTSTYLE_NORMAL;
}
-int wxFont::GetWeight() const
+wxFontWeight wxFont::GetWeight() const
{
return wxFONTWEIGHT_NORMAL;
}
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;