if ( win )
{
+#if 0
+ // this clipping area was set to the parent window's drawing area, lead to problems
+ // with MacOSX controls drawing outside their wx' rectangle
RgnHandle insidergn = NewRgn() ;
int x = 0 , y = 0;
wxWindow *parent = win->GetParent() ;
parent->MacWindowToRootWindow( &x,&y ) ;
wxSize size = parent->GetSize() ;
SetRectRgn( insidergn , parent->MacGetLeftBorderSize() , parent->MacGetTopBorderSize() ,
- size.x - parent->MacGetLeftBorderSize() - parent->MacGetRightBorderSize(),
- size.y - parent->MacGetTopBorderSize() - parent->MacGetBottomBorderSize()) ;
+ size.x - parent->MacGetRightBorderSize(),
+ size.y - parent->MacGetBottomBorderSize()) ;
CopyRgn( (RgnHandle) parent->MacGetVisibleRegion(false).GetWXHRGN() , m_newClip ) ;
SectRgn( m_newClip , insidergn , m_newClip ) ;
OffsetRgn( m_newClip , x , y ) ;
SetClip( m_newClip ) ;
DisposeRgn( insidergn ) ;
+#endif
+ RgnHandle insidergn = NewRgn() ;
+ int x = 0 , y = 0;
+ win->MacWindowToRootWindow( &x,&y ) ;
+ CopyRgn( (RgnHandle) ((wxWindow*)win)->MacGetVisibleRegion().GetWXHRGN() , m_newClip ) ;
+ OffsetRgn( m_newClip , x , y ) ;
+ SetClip( m_newClip ) ;
}
}
wxMacWindowClipper::~wxMacWindowClipper()
{
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
CFStringRef mString = CFStringCreateWithBytes( NULL , (UInt8*) text + laststop , i - laststop , CFStringGetSystemEncoding(), false ) ;
+ if ( m_backgroundMode != wxTRANSPARENT )
+ {
+ Point bounds={0,0} ;
+ Rect background = frame ;
+ SInt16 baseline ;
+ ::GetThemeTextDimensions( mString,
+ kThemeCurrentPortFont,
+ kThemeStateActive,
+ false,
+ &bounds,
+ &baseline );
+ background.right = background.left + bounds.h ;
+ background.bottom = background.top + bounds.v ;
+ ::EraseRect( &background ) ;
+ }
::DrawThemeTextBox( mString,
kThemeCurrentPortFont,
kThemeStateActive,
{
Rect frame = { yy + line*(fi.descent + fi.ascent + fi.leading) ,xx , yy + (line+1)*(fi.descent + fi.ascent + fi.leading) , xx + 10000 } ;
CFStringRef mString = CFStringCreateWithCString( NULL , text + laststop , kCFStringEncodingMacRoman ) ;
+ if ( m_backgroundMode != wxTRANSPARENT )
+ {
+ Point bounds={0,0} ;
+ Rect background = frame ;
+ SInt16 baseline ;
+ ::GetThemeTextDimensions( mString,
+ kThemeCurrentPortFont,
+ kThemeStateActive,
+ false,
+ &bounds,
+ &baseline );
+ background.right = background.left + bounds.h ;
+ background.bottom = background.top + bounds.v ;
+ ::EraseRect( &background ) ;
+ }
::DrawThemeTextBox( mString,
kThemeCurrentPortFont,
kThemeStateActive,