Implement strike-through support in wxFont in wxOSX.
Implement support for this attribute in wxOSX too. Closes #16547. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -103,6 +103,15 @@ public:
|
||||
|
||||
wxFontWeight GetWeight() const { return m_info.GetWeight(); }
|
||||
|
||||
void SetStrikethrough( bool s )
|
||||
{
|
||||
if ( m_info.m_strikethrough != s )
|
||||
{
|
||||
m_info.SetStrikethrough( s );
|
||||
Free();
|
||||
}
|
||||
}
|
||||
|
||||
void SetUnderlined( bool u )
|
||||
{
|
||||
if ( m_info.m_underlined != u )
|
||||
@@ -113,6 +122,7 @@ public:
|
||||
}
|
||||
|
||||
bool GetUnderlined() const { return m_info.GetUnderlined(); }
|
||||
bool GetStrikethrough() const { return m_info.GetStrikethrough(); }
|
||||
|
||||
void SetFaceName( const wxString& facename )
|
||||
{
|
||||
@@ -719,6 +729,13 @@ void wxFont::SetUnderlined(bool underlined)
|
||||
M_FONTDATA->SetUnderlined( underlined );
|
||||
}
|
||||
|
||||
void wxFont::SetStrikethrough(bool strikethrough)
|
||||
{
|
||||
AllocExclusive();
|
||||
|
||||
M_FONTDATA->SetStrikethrough( strikethrough );
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// accessors
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -783,6 +800,13 @@ bool wxFont::GetUnderlined() const
|
||||
return M_FONTDATA->GetUnderlined();
|
||||
}
|
||||
|
||||
bool wxFont::GetStrikethrough() const
|
||||
{
|
||||
wxCHECK_MSG( M_FONTDATA != NULL, false, wxT("invalid font") );
|
||||
|
||||
return M_FONTDATA->GetStrikethrough();
|
||||
}
|
||||
|
||||
wxString wxFont::GetFaceName() const
|
||||
{
|
||||
wxCHECK_MSG( M_FONTDATA != NULL , wxEmptyString , wxT("invalid font") );
|
||||
@@ -1248,7 +1272,7 @@ wxFontEncoding wxNativeFontInfo::GetEncoding() const
|
||||
|
||||
bool wxNativeFontInfo::GetStrikethrough() const
|
||||
{
|
||||
return false;
|
||||
return m_strikethrough;
|
||||
}
|
||||
|
||||
|
||||
@@ -1317,8 +1341,9 @@ void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding_)
|
||||
// not reflected in native descriptors
|
||||
}
|
||||
|
||||
void wxNativeFontInfo::SetStrikethrough(bool WXUNUSED(strikethrough))
|
||||
void wxNativeFontInfo::SetStrikethrough(bool strikethrough)
|
||||
{
|
||||
m_strikethrough = strikethrough;
|
||||
}
|
||||
|
||||
void wxNativeFontInfo::UpdateNamesMap(const wxString& familyName, CTFontDescriptorRef descr)
|
||||
|
Reference in New Issue
Block a user