git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44607
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void* MacGetATSUStyle() const ;
protected:
void* MacGetATSUStyle() const ;
protected:
+ virtual wxObjectRefData* CreateRefData() const;
+ virtual wxObjectRefData* CloneRefData(const wxObjectRefData* data) const;
DECLARE_DYNAMIC_CLASS(wxFont)
};
DECLARE_DYNAMIC_CLASS(wxFont)
};
m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
if ( m_macFontFamily == kInvalidFontFamily )
{
m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
if ( m_macFontFamily == kInvalidFontFamily )
{
- wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName );
+ wxLogDebug( wxT("ATSFontFamilyFindFromName failed for %s"), m_faceName.c_str() );
m_macFontFamily = GetAppFont();
}
#endif
m_macFontFamily = GetAppFont();
}
#endif
void wxFont::SetEncoding(wxFontEncoding encoding)
{
void wxFont::SetEncoding(wxFontEncoding encoding)
{
M_FONTDATA->m_encoding = encoding;
RealizeResource();
}
M_FONTDATA->m_encoding = encoding;
RealizeResource();
}
+wxObjectRefData* wxFont::CreateRefData() const
- // Don't change shared data
- if (!m_refData)
- {
- m_refData = new wxFontRefData();
- }
- else
- {
- wxFontRefData* ref = new wxFontRefData(*(wxFontRefData*)m_refData);
- UnRef();
- m_refData = ref;
- }
+ return new wxFontRefData;
+}
+
+wxObjectRefData* wxFont::CloneRefData(const wxObjectRefData* data) const
+{
+ return new wxFontRefData(*wx_static_cast(const wxFontRefData*, data));
}
void wxFont::SetPointSize(int pointSize)
{
}
void wxFont::SetPointSize(int pointSize)
{
M_FONTDATA->m_pointSize = pointSize;
M_FONTDATA->m_pointSize = pointSize;
void wxFont::SetFamily(int family)
{
void wxFont::SetFamily(int family)
{
M_FONTDATA->m_family = family;
M_FONTDATA->m_family = family;
void wxFont::SetStyle(int style)
{
void wxFont::SetStyle(int style)
{
M_FONTDATA->m_style = style;
M_FONTDATA->m_style = style;
void wxFont::SetWeight(int weight)
{
void wxFont::SetWeight(int weight)
{
M_FONTDATA->m_weight = weight;
M_FONTDATA->m_weight = weight;
bool wxFont::SetFaceName(const wxString& faceName)
{
bool wxFont::SetFaceName(const wxString& faceName)
{
M_FONTDATA->m_faceName = faceName;
M_FONTDATA->m_faceName = faceName;
void wxFont::SetUnderlined(bool underlined)
{
void wxFont::SetUnderlined(bool underlined)
{
M_FONTDATA->m_underlined = underlined;
M_FONTDATA->m_underlined = underlined;
void wxFont::SetNoAntiAliasing( bool no )
{
void wxFont::SetNoAntiAliasing( bool no )
{
M_FONTDATA->SetNoAntiAliasing( no );
M_FONTDATA->SetNoAntiAliasing( no );