conditionalized theme box drawing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -228,9 +228,9 @@ void wxMacToolTip::Draw()
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) );
|
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) );
|
||||||
|
#if TARGET_CARBON
|
||||||
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
||||||
|
#endif
|
||||||
m_shown = true ;
|
m_shown = true ;
|
||||||
|
|
||||||
FontFamilyID fontId ;
|
FontFamilyID fontId ;
|
||||||
@@ -280,8 +280,10 @@ void wxMacToolTip::Draw()
|
|||||||
m_rect.left = m_position.x + kTipOffset;
|
m_rect.left = m_position.x + kTipOffset;
|
||||||
m_rect.top = m_position.y + kTipOffset;
|
m_rect.top = m_position.y + kTipOffset;
|
||||||
m_rect.right = m_rect.left + width + 2 * kTipBorder;
|
m_rect.right = m_rect.left + width + 2 * kTipBorder;
|
||||||
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
m_rect.right += kTipBorder ;
|
m_rect.right += kTipBorder ;
|
||||||
|
#endif
|
||||||
m_rect.bottom = m_rect.top + height + 2 * kTipBorder;
|
m_rect.bottom = m_rect.top + height + 2 * kTipBorder;
|
||||||
ClipRect( &m_rect ) ;
|
ClipRect( &m_rect ) ;
|
||||||
BackColor( whiteColor ) ;
|
BackColor( whiteColor ) ;
|
||||||
@@ -316,6 +318,7 @@ void wxMacToolTip::Draw()
|
|||||||
{
|
{
|
||||||
if( text[i] == 13 || text[i] == 10)
|
if( text[i] == 13 || text[i] == 10)
|
||||||
{
|
{
|
||||||
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
{
|
{
|
||||||
Rect frame ;
|
Rect frame ;
|
||||||
@@ -335,6 +338,7 @@ void wxMacToolTip::Draw()
|
|||||||
height += lineh ;
|
height += lineh ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
::DrawText( text , laststop , i - laststop ) ;
|
||||||
height += lineh ;
|
height += lineh ;
|
||||||
@@ -344,6 +348,7 @@ void wxMacToolTip::Draw()
|
|||||||
}
|
}
|
||||||
i++ ;
|
i++ ;
|
||||||
}
|
}
|
||||||
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
{
|
{
|
||||||
Rect frame ;
|
Rect frame ;
|
||||||
@@ -362,6 +367,7 @@ void wxMacToolTip::Draw()
|
|||||||
CFRelease( mString ) ;
|
CFRelease( mString ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
::DrawText( text , laststop , i - laststop ) ;
|
||||||
}
|
}
|
||||||
|
@@ -228,9 +228,9 @@ void wxMacToolTip::Draw()
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) );
|
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( m_window ) );
|
||||||
|
#if TARGET_CARBON
|
||||||
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
bool useDrawThemeText = ( DrawThemeTextBox != (void*) kUnresolvedCFragSymbolAddress ) ;
|
||||||
|
#endif
|
||||||
m_shown = true ;
|
m_shown = true ;
|
||||||
|
|
||||||
FontFamilyID fontId ;
|
FontFamilyID fontId ;
|
||||||
@@ -280,8 +280,10 @@ void wxMacToolTip::Draw()
|
|||||||
m_rect.left = m_position.x + kTipOffset;
|
m_rect.left = m_position.x + kTipOffset;
|
||||||
m_rect.top = m_position.y + kTipOffset;
|
m_rect.top = m_position.y + kTipOffset;
|
||||||
m_rect.right = m_rect.left + width + 2 * kTipBorder;
|
m_rect.right = m_rect.left + width + 2 * kTipBorder;
|
||||||
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
m_rect.right += kTipBorder ;
|
m_rect.right += kTipBorder ;
|
||||||
|
#endif
|
||||||
m_rect.bottom = m_rect.top + height + 2 * kTipBorder;
|
m_rect.bottom = m_rect.top + height + 2 * kTipBorder;
|
||||||
ClipRect( &m_rect ) ;
|
ClipRect( &m_rect ) ;
|
||||||
BackColor( whiteColor ) ;
|
BackColor( whiteColor ) ;
|
||||||
@@ -316,6 +318,7 @@ void wxMacToolTip::Draw()
|
|||||||
{
|
{
|
||||||
if( text[i] == 13 || text[i] == 10)
|
if( text[i] == 13 || text[i] == 10)
|
||||||
{
|
{
|
||||||
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
{
|
{
|
||||||
Rect frame ;
|
Rect frame ;
|
||||||
@@ -335,6 +338,7 @@ void wxMacToolTip::Draw()
|
|||||||
height += lineh ;
|
height += lineh ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
::DrawText( text , laststop , i - laststop ) ;
|
||||||
height += lineh ;
|
height += lineh ;
|
||||||
@@ -344,6 +348,7 @@ void wxMacToolTip::Draw()
|
|||||||
}
|
}
|
||||||
i++ ;
|
i++ ;
|
||||||
}
|
}
|
||||||
|
#if TARGET_CARBON
|
||||||
if ( useDrawThemeText )
|
if ( useDrawThemeText )
|
||||||
{
|
{
|
||||||
Rect frame ;
|
Rect frame ;
|
||||||
@@ -362,6 +367,7 @@ void wxMacToolTip::Draw()
|
|||||||
CFRelease( mString ) ;
|
CFRelease( mString ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
::DrawText( text , laststop , i - laststop ) ;
|
::DrawText( text , laststop , i - laststop ) ;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user