build fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -43,7 +43,7 @@ class WXDLLEXPORT wxFontRefData: public wxGDIRefData
|
|||||||
public:
|
public:
|
||||||
wxFontRefData()
|
wxFontRefData()
|
||||||
{
|
{
|
||||||
Init(10, wxDEFAULT, wxNORMAL, wxNORMAL,
|
Init(10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
|
||||||
false, wxT("applicationfont"), wxFONTENCODING_DEFAULT);
|
false, wxT("applicationfont"), wxFONTENCODING_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int GetFamily() const { return m_family; }
|
wxFontFamily GetFamily() const { return m_family; }
|
||||||
|
|
||||||
void SetStyle( wxFontStyle style )
|
void SetStyle( wxFontStyle style )
|
||||||
{
|
{
|
||||||
@@ -100,7 +100,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int GetStyle() const { return m_style; }
|
wxFontStyle GetStyle() const { return m_style; }
|
||||||
|
|
||||||
void SetWeight( wxFontWeight weight )
|
void SetWeight( wxFontWeight weight )
|
||||||
{
|
{
|
||||||
@@ -109,7 +109,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int GetWeight() const { return m_weight; }
|
wxFontWeight GetWeight() const { return m_weight; }
|
||||||
|
|
||||||
void SetUnderlined( bool u )
|
void SetUnderlined( bool u )
|
||||||
{
|
{
|
||||||
@@ -345,7 +345,7 @@ wxFontRefData::wxFontRefData( CTFontDescriptorRef fontdescriptor, int size )
|
|||||||
|
|
||||||
void wxFontRefData::Init( CTFontRef font )
|
void wxFontRefData::Init( CTFontRef font )
|
||||||
{
|
{
|
||||||
Init(10, wxDEFAULT, wxNORMAL, wxNORMAL,
|
Init(10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
|
||||||
false, wxT("applicationfont"), wxFONTENCODING_DEFAULT);
|
false, wxT("applicationfont"), wxFONTENCODING_DEFAULT);
|
||||||
|
|
||||||
m_ctFont.reset( font );
|
m_ctFont.reset( font );
|
||||||
@@ -359,7 +359,7 @@ void wxFontRefData::MacFindFont()
|
|||||||
#if wxOSX_USE_CORE_TEXT
|
#if wxOSX_USE_CORE_TEXT
|
||||||
if ( UMAGetSystemVersion() >= 0x1050 )
|
if ( UMAGetSystemVersion() >= 0x1050 )
|
||||||
{
|
{
|
||||||
if ( m_faceName.empty() && m_family == wxDEFAULT )
|
if ( m_faceName.empty() && m_family == wxFONTFAMILY_DEFAULT )
|
||||||
{
|
{
|
||||||
m_ctFont.reset(CTFontCreateUIFontForLanguage( kCTFontSystemFontType, 0.0, NULL ));
|
m_ctFont.reset(CTFontCreateUIFontForLanguage( kCTFontSystemFontType, 0.0, NULL ));
|
||||||
}
|
}
|
||||||
@@ -371,9 +371,9 @@ void wxFontRefData::MacFindFont()
|
|||||||
m_pointSize = CTFontGetSize(m_ctFont) ;
|
m_pointSize = CTFontGetSize(m_ctFont) ;
|
||||||
CTFontSymbolicTraits traits = CTFontGetSymbolicTraits( m_ctFont );
|
CTFontSymbolicTraits traits = CTFontGetSymbolicTraits( m_ctFont );
|
||||||
if ( traits & kCTFontItalicTrait )
|
if ( traits & kCTFontItalicTrait )
|
||||||
m_style = wxITALIC;
|
m_style = wxFONTSTYLE_ITALIC;
|
||||||
if ( traits & kCTFontBoldTrait )
|
if ( traits & kCTFontBoldTrait )
|
||||||
m_weight = wxBOLD ;
|
m_weight = wxFONTWEIGHT_BOLD ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -381,22 +381,22 @@ void wxFontRefData::MacFindFont()
|
|||||||
{
|
{
|
||||||
switch ( m_family )
|
switch ( m_family )
|
||||||
{
|
{
|
||||||
case wxSCRIPT :
|
case wxFONTFAMILY_SCRIPT :
|
||||||
case wxROMAN :
|
case wxFONTFAMILY_ROMAN :
|
||||||
case wxDECORATIVE :
|
case wxFONTFAMILY_DECORATIVE :
|
||||||
m_faceName = wxT("Times");
|
m_faceName = wxT("Times");
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxSWISS :
|
case wxFONTFAMILY_SWISS :
|
||||||
m_faceName = wxT("Helvetica");
|
m_faceName = wxT("Helvetica");
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxMODERN :
|
case wxFONTFAMILY_MODERN :
|
||||||
case wxTELETYPE:
|
case wxFONTFAMILY_TELETYPE:
|
||||||
m_faceName = wxT("Courier");
|
m_faceName = wxT("Courier");
|
||||||
if ( m_style == wxITALIC && m_weight == wxNORMAL )
|
if ( m_style == wxFONTFAMILY_ITALIC && m_weight == wxFONTFAMILY_NORMAL )
|
||||||
{
|
{
|
||||||
m_style = wxITALIC;
|
m_style = wxFONTFAMILY_ITALIC;
|
||||||
}
|
}
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
@@ -409,9 +409,9 @@ void wxFontRefData::MacFindFont()
|
|||||||
|
|
||||||
CTFontSymbolicTraits traits = 0;
|
CTFontSymbolicTraits traits = 0;
|
||||||
|
|
||||||
if (m_weight == wxBOLD)
|
if (m_weight == wxFONTWEIGHT_BOLD)
|
||||||
traits |= kCTFontBoldTrait;
|
traits |= kCTFontBoldTrait;
|
||||||
if (m_style == wxITALIC || m_style == wxSLANT)
|
if (m_style == wxFONTSTYLE_ITALIC || m_style == wxFONTSTYLE_SLANT)
|
||||||
traits |= kCTFontItalicTrait;
|
traits |= kCTFontItalicTrait;
|
||||||
|
|
||||||
// use font caching
|
// use font caching
|
||||||
@@ -425,9 +425,9 @@ void wxFontRefData::MacFindFont()
|
|||||||
if ( m_faceName.IsAscii() )
|
if ( m_faceName.IsAscii() )
|
||||||
{
|
{
|
||||||
uint8 qdstyle = 0;
|
uint8 qdstyle = 0;
|
||||||
if (m_weight == wxBOLD)
|
if (m_weight == wxFONTWEIGHT_BOLD)
|
||||||
qdstyle |= bold;
|
qdstyle |= bold;
|
||||||
if (m_style == wxITALIC || m_style == wxSLANT)
|
if (m_style == wxFONTSTYLE_ITALIC || m_style == wxFONTSTYLE_SLANT)
|
||||||
qdstyle |= italic;
|
qdstyle |= italic;
|
||||||
|
|
||||||
Str255 qdFontName ;
|
Str255 qdFontName ;
|
||||||
@@ -509,8 +509,8 @@ void wxFontRefData::MacFindFont()
|
|||||||
&fmfont ,
|
&fmfont ,
|
||||||
&atsuSize ,
|
&atsuSize ,
|
||||||
&kHorizontal,
|
&kHorizontal,
|
||||||
(m_weight == wxBOLD) ? &kTrue : &kFalse ,
|
(m_weight == wxFONTWEIGHT_BOLD) ? &kTrue : &kFalse ,
|
||||||
(m_style == wxITALIC || m_style == wxSLANT) ? &kTrue : &kFalse ,
|
(m_style == wxFONTSTYLE_ITALIC || m_style == wxFONTSTYLE_SLANT) ? &kTrue : &kFalse ,
|
||||||
(m_underlined) ? &kTrue : &kFalse ,
|
(m_underlined) ? &kTrue : &kFalse ,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -541,11 +541,11 @@ void wxFontRefData::MacFindFont()
|
|||||||
m_macFontStyle = style ;
|
m_macFontStyle = style ;
|
||||||
m_faceName = wxMacMakeStringFromPascal( qdFontName );
|
m_faceName = wxMacMakeStringFromPascal( qdFontName );
|
||||||
if ( m_macFontStyle & bold )
|
if ( m_macFontStyle & bold )
|
||||||
m_weight = wxBOLD ;
|
m_weight = wxFONTWEIGHT_BOLD ;
|
||||||
else
|
else
|
||||||
m_weight = wxNORMAL ;
|
m_weight = wxFONTWEIGHT_NORMAL ;
|
||||||
if ( m_macFontStyle & italic )
|
if ( m_macFontStyle & italic )
|
||||||
m_style = wxITALIC ;
|
m_style = wxFONTSTYLE_ITALIC ;
|
||||||
if ( m_macFontStyle & underline )
|
if ( m_macFontStyle & underline )
|
||||||
m_underlined = true ;
|
m_underlined = true ;
|
||||||
m_pointSize = m_macFontSize ;
|
m_pointSize = m_macFontSize ;
|
||||||
@@ -555,7 +555,7 @@ void wxFontRefData::MacFindFont()
|
|||||||
{
|
{
|
||||||
if ( m_faceName.empty() )
|
if ( m_faceName.empty() )
|
||||||
{
|
{
|
||||||
if ( m_family == wxDEFAULT )
|
if ( m_family == wxFONTFAMILY_DEFAULT )
|
||||||
{
|
{
|
||||||
m_macFontFamily = GetAppFont();
|
m_macFontFamily = GetAppFont();
|
||||||
FMGetFontFamilyName(m_macFontFamily,qdFontName);
|
FMGetFontFamilyName(m_macFontFamily,qdFontName);
|
||||||
@@ -565,18 +565,18 @@ void wxFontRefData::MacFindFont()
|
|||||||
{
|
{
|
||||||
switch ( m_family )
|
switch ( m_family )
|
||||||
{
|
{
|
||||||
case wxSCRIPT :
|
case wxFONTFAMILY_SCRIPT :
|
||||||
case wxROMAN :
|
case wxFONTFAMILY_ROMAN :
|
||||||
case wxDECORATIVE :
|
case wxFONTFAMILY_DECORATIVE :
|
||||||
m_faceName = wxT("Times");
|
m_faceName = wxT("Times");
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxSWISS :
|
case wxFONTFAMILY_SWISS :
|
||||||
m_faceName = wxT("Helvetica");
|
m_faceName = wxT("Helvetica");
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
case wxMODERN :
|
case wxFONTFAMILY_MODERN :
|
||||||
case wxTELETYPE:
|
case wxFONTFAMILY_TELETYPE:
|
||||||
m_faceName = wxT("Courier");
|
m_faceName = wxT("Courier");
|
||||||
break ;
|
break ;
|
||||||
|
|
||||||
@@ -614,9 +614,9 @@ void wxFontRefData::MacFindFont()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_macFontStyle = 0;
|
m_macFontStyle = 0;
|
||||||
if (m_weight == wxBOLD)
|
if (m_weight == wxFONTWEIGHT_BOLD)
|
||||||
m_macFontStyle |= bold;
|
m_macFontStyle |= bold;
|
||||||
if (m_style == wxITALIC || m_style == wxSLANT)
|
if (m_style == wxFONTSTYLE_ITALIC || m_style == wxFONTSTYLE_SLANT)
|
||||||
m_macFontStyle |= italic;
|
m_macFontStyle |= italic;
|
||||||
if (m_underlined)
|
if (m_underlined)
|
||||||
m_macFontStyle |= underline;
|
m_macFontStyle |= underline;
|
||||||
@@ -768,7 +768,7 @@ bool wxFont::MacCreateFromThemeFont(wxUint16 themeFontID)
|
|||||||
UnRef();
|
UnRef();
|
||||||
|
|
||||||
m_refData = new wxFontRefData(
|
m_refData = new wxFontRefData(
|
||||||
12, wxDEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
|
12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL,
|
||||||
false, wxEmptyString, wxFONTENCODING_DEFAULT );
|
false, wxEmptyString, wxFONTENCODING_DEFAULT );
|
||||||
|
|
||||||
M_FONTDATA->m_macThemeFontID = themeFontID ;
|
M_FONTDATA->m_macThemeFontID = themeFontID ;
|
||||||
|
Reference in New Issue
Block a user