conditials for TARGET_CARBON when drawing using appearance text box
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1462,9 +1462,9 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
|
||||
long xx = XLOG2DEVMAC(x);
|
||||
long yy = YLOG2DEVMAC(y);
|
||||
|
||||
#if TARGET_CARBON
|
||||
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
||||
|
||||
#endif
|
||||
MacInstallFont() ;
|
||||
if ( 0 )
|
||||
{
|
||||
@@ -1476,7 +1476,9 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
FontInfo fi ;
|
||||
::GetFontInfo( &fi ) ;
|
||||
|
||||
#if TARGET_CARBON
|
||||
if ( !useDrawThemeText )
|
||||
#endif
|
||||
yy += fi.ascent ;
|
||||
|
||||
::MoveTo( xx , yy );
|
||||
@@ -1515,6 +1517,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
{
|
||||
if( text[i] == 13 || text[i] == 10)
|
||||
{
|
||||
#if TARGET_CARBON
|
||||
if ( useDrawThemeText )
|
||||
{
|
||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 1000 } ;
|
||||
@@ -1530,6 +1533,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
line++ ;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
::DrawText( text , laststop , i - laststop ) ;
|
||||
line++ ;
|
||||
@@ -1539,6 +1543,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
}
|
||||
i++ ;
|
||||
}
|
||||
#if TARGET_CARBON
|
||||
if ( useDrawThemeText )
|
||||
{
|
||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 1000 } ;
|
||||
@@ -1553,6 +1558,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
CFRelease( mString ) ;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
::DrawText( text , laststop , i - laststop ) ;
|
||||
}
|
||||
|
@@ -1462,9 +1462,9 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
|
||||
long xx = XLOG2DEVMAC(x);
|
||||
long yy = YLOG2DEVMAC(y);
|
||||
|
||||
#if TARGET_CARBON
|
||||
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
||||
|
||||
#endif
|
||||
MacInstallFont() ;
|
||||
if ( 0 )
|
||||
{
|
||||
@@ -1476,7 +1476,9 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
FontInfo fi ;
|
||||
::GetFontInfo( &fi ) ;
|
||||
|
||||
#if TARGET_CARBON
|
||||
if ( !useDrawThemeText )
|
||||
#endif
|
||||
yy += fi.ascent ;
|
||||
|
||||
::MoveTo( xx , yy );
|
||||
@@ -1515,6 +1517,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
{
|
||||
if( text[i] == 13 || text[i] == 10)
|
||||
{
|
||||
#if TARGET_CARBON
|
||||
if ( useDrawThemeText )
|
||||
{
|
||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 1000 } ;
|
||||
@@ -1530,6 +1533,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
line++ ;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
::DrawText( text , laststop , i - laststop ) ;
|
||||
line++ ;
|
||||
@@ -1539,6 +1543,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
}
|
||||
i++ ;
|
||||
}
|
||||
#if TARGET_CARBON
|
||||
if ( useDrawThemeText )
|
||||
{
|
||||
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 1000 } ;
|
||||
@@ -1553,6 +1558,7 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
|
||||
CFRelease( mString ) ;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
::DrawText( text , laststop , i - laststop ) ;
|
||||
}
|
||||
|
Reference in New Issue
Block a user