From beb2638a997914bd12c55e81589adebd90af9ed2 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 22 Mar 2009 09:49:28 +0000 Subject: [PATCH] simpler define handling git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/osx/carbon/chkconf.h | 3 ++- include/wx/osx/font.h | 2 +- src/osx/carbon/font.cpp | 12 ++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/wx/osx/carbon/chkconf.h b/include/wx/osx/carbon/chkconf.h index 14673bf987..b88b06c73b 100644 --- a/include/wx/osx/carbon/chkconf.h +++ b/include/wx/osx/carbon/chkconf.h @@ -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 diff --git a/include/wx/osx/font.h b/include/wx/osx/font.h index 25691b12a4..0d449c9c2d 100644 --- a/include/wx/osx/font.h +++ b/include/wx/osx/font.h @@ -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 diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index 6f69cb358c..de2fbe7024 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -170,7 +170,7 @@ public: #if wxOSX_USE_CORE_TEXT wxCFRef m_ctFont; #endif -#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT +#if wxOSX_USE_ATSU_TEXT ATSUStyle m_macATSUStyle ; #endif wxCFRef m_cgFont; @@ -196,9 +196,9 @@ wxFontRefData::wxFontRefData(const wxFontRefData& data) #endif #if wxOSX_USE_CORE_TEXT m_ctFont = data.m_ctFont; -#endif +#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") ); -- 2.45.2