}
wxFontRefData( int nSize
- ,int nFamily
- ,int nStyle
- ,int nWeight
+ ,wxFontFamily nFamily
+ ,wxFontStyle nStyle
+ ,wxFontWeight nWeight
,bool bUnderlined
,const wxString& sFaceName
,wxFontEncoding vEncoding
return m_nPointSize;
}
- inline int GetFamily(void) const
+ inline wxFontFamily GetFamily(void) const
{
return m_nFamily;
}
- inline int GetStyle(void) const
+ inline wxFontStyle GetStyle(void) const
{
return m_bNativeFontInfoOk ? m_vNativeFontInfo.GetStyle()
: m_nStyle;
}
- inline int GetWeight(void) const
+ inline wxFontWeight GetWeight(void) const
{
return m_bNativeFontInfoOk ? m_vNativeFontInfo.GetWeight()
: m_nWeight;
m_nPointSize = nPointSize;
}
- inline void SetFamily(int nFamily)
+ inline void SetFamily(wxFontFamily nFamily)
{
m_nFamily = nFamily;
}
- inline void SetStyle(int nStyle)
+ inline void SetStyle(wxFontStyle nStyle)
{
if (m_bNativeFontInfoOk)
- m_vNativeFontInfo.SetStyle((wxFontStyle)nStyle);
+ m_vNativeFontInfo.SetStyle(nStyle);
else
m_nStyle = nStyle;
}
- inline void SetWeight(int nWeight)
+ inline void SetWeight(wxFontWeight nWeight)
{
if (m_bNativeFontInfoOk)
- m_vNativeFontInfo.SetWeight((wxFontWeight)nWeight);
+ m_vNativeFontInfo.SetWeight(nWeight);
else
m_nWeight = nWeight;
}
// Common part of all ctors
//
void Init( int nSize
- ,int nFamily
- ,int nStyle
- ,int nWeight
+ ,wxFontFamily nFamily
+ ,wxFontStyle nStyle
+ ,wxFontWeight nWeight
,bool bUnderlined
,const wxString& rsFaceName
,wxFontEncoding vEncoding
void wxFontRefData::Init(
int nPointSize
-, int nFamily
-, int nStyle
-, int nWeight
+, wxFontFamily nFamily
+, wxFontStyle nStyle
+, wxFontWeight nWeight
, bool bUnderlined
, const wxString& rsFaceName
, wxFontEncoding vEncoding
switch (eStyle)
{
default:
- wxFAIL_MSG( _T("unknown font style") );
+ wxFAIL_MSG( wxT("unknown font style") );
// fall through
case wxFONTSTYLE_NORMAL:
switch (eWeight)
{
default:
- wxFAIL_MSG( _T("unknown font weight") );
+ wxFAIL_MSG( wxT("unknown font weight") );
// fall through
case wxFONTWEIGHT_NORMAL:
const wxString& sFacename
)
{
- wxStrncpy((wxChar*)fa.szFacename, sFacename, WXSIZEOF(fa.szFacename));
+ wxStrlcpy((wxChar*)fa.szFacename, sFacename, WXSIZEOF(fa.szFacename));
return true;
} // end of wxNativeFontInfo::SetFaceName
{
long lVal;
- wxStringTokenizer vTokenizer(rsStr, _T(";"));
+ wxStringTokenizer vTokenizer(rsStr, wxT(";"));
//
// First the version
//
wxString sToken = vTokenizer.GetNextToken();
- if (sToken != _T('0'))
+ if (sToken != wxT('0'))
return false;
sToken = vTokenizer.GetNextToken();
{
wxString sStr;
- sStr.Printf(_T("%d;%ld;%ld;%ld;%d;%d;%d;%d;%d;%ld;%d;%s"),
+ sStr.Printf(wxT("%d;%ld;%ld;%ld;%d;%d;%d;%d;%d;%ld;%d;%s"),
0, // version, in case we want to change the format later
fm.lEmHeight,
fa.lAveCharWidth,
} // end of wxFont::SetPointSize
void wxFont::SetFamily(
- int nFamily
+ wxFontFamily nFamily
)
{
AllocExclusive();
} // end of wxFont::SetFamily
void wxFont::SetStyle(
- int nStyle
+ wxFontStyle nStyle
)
{
AllocExclusive();
} // end of wxFont::SetStyle
void wxFont::SetWeight(
- int nWeight
+ wxFontWeight nWeight
)
{
AllocExclusive();