simpler define handling

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2009-03-22 09:49:28 +00:00
parent 7e4952db83
commit beb2638a99
3 changed files with 9 additions and 8 deletions

View File

@ -34,7 +34,8 @@
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
#define wxOSX_USE_CORE_TEXT 1
#define wxOSX_USE_ATSU_TEXT 0
// MLTE-TextControl uses ATSU
#define wxOSX_USE_ATSU_TEXT 1
#else // platform < 10.5

View File

@ -141,7 +141,7 @@ public:
CTFontRef GetCTFont() const;
#endif
#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
#if wxOSX_USE_ATSU_TEXT
// Returns an ATSUStyle not ATSUStyle*
void* MacGetATSUStyle() const ;
#endif

View File

@ -170,7 +170,7 @@ public:
#if wxOSX_USE_CORE_TEXT
wxCFRef<CTFontRef> m_ctFont;
#endif
#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
#if wxOSX_USE_ATSU_TEXT
ATSUStyle m_macATSUStyle ;
#endif
wxCFRef<CGFontRef> m_cgFont;
@ -198,7 +198,7 @@ wxFontRefData::wxFontRefData(const wxFontRefData& data)
m_ctFont = data.m_ctFont;
#endif
m_cgFont = data.m_cgFont;
#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
#if wxOSX_USE_ATSU_TEXT
if ( data.m_macATSUStyle != NULL )
{
ATSUCreateStyle(&m_macATSUStyle) ;
@ -228,7 +228,7 @@ void wxFontRefData::Init()
#if wxOSX_USE_CARBON && wxOSX_USE_ATSU_TEXT
m_macThemeFontID = kThemeCurrentPortFont ;
#endif
#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
#if wxOSX_USE_ATSU_TEXT
m_macATSUStyle = NULL ;
#endif
#if wxOSX_USE_COCOA
@ -251,7 +251,7 @@ void wxFontRefData::Free()
m_ctFont.reset();
#endif
m_cgFont.reset();
#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
#if wxOSX_USE_ATSU_TEXT
if ( m_macATSUStyle )
{
::ATSUDisposeStyle((ATSUStyle)m_macATSUStyle);
@ -762,7 +762,7 @@ wxUint16 wxFont::MacGetThemeFontID() const
#endif
#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
#if wxOSX_USE_ATSU_TEXT
void * wxFont::MacGetATSUStyle() const
{
wxCHECK_MSG( M_FONTDATA != NULL , NULL, wxT("invalid font") );