-
-bool wxWindowMac::MacSetPortDrawingParams( const Point & localOrigin, const Rect & clipRect, WindowRef window , wxWindowMac* win )
-{
- if ( window == NULL )
- return false ;
-
- GrafPtr currPort;
- GrafPtr port ;
- ::GetPort(&currPort);
- port = UMAGetWindowPort( window) ;
- if (currPort != port )
- ::SetPort(port);
- Rect cr = clipRect ;
- OffsetRect( &cr , localOrigin.h , localOrigin.v ) ;
- ::ClipRect(&cr);
-
- ::PenNormal() ;
- ::RGBBackColor(& win->GetBackgroundColour().GetPixel() ) ;
- ::RGBForeColor(& win->GetForegroundColour().GetPixel() ) ;
- Pattern whiteColor ;
-
- ::BackPat( GetQDGlobalsWhite( &whiteColor) ) ;
-// ::SetThemeWindowBackground( win->m_macWindowData->m_macWindow , win->m_macWindowData->m_macWindowBackgroundTheme , false ) ;
- return true;
-}
-
-void wxWindowMac::MacGetPortParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin)
-{
- wxASSERT( GetParent() != NULL ) ;
- GetParent()->MacGetPortParams( localOrigin , clipRect , window, rootwin) ;
- localOrigin->h += m_x;
- localOrigin->v += m_y;
- OffsetRect(clipRect, -m_x, -m_y);
-
- Rect myClip;
- myClip.left = 0;
- myClip.top = 0;
- myClip.right = m_width;
- myClip.bottom = m_height;
- SectRect(clipRect, &myClip, clipRect);
-}
-
-void wxWindowMac::MacGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin )
-{
- MacGetPortParams( localOrigin , clipRect, window , rootwin ) ;
-
- int width , height ;
- GetClientSize( &width , &height ) ;
- wxPoint client ;
- client = GetClientAreaOrigin( ) ;
-
- localOrigin->h += client.x;
- localOrigin->v += client.y;
- OffsetRect(clipRect, -client.x, -client.y);
-
- Rect myClip = { 0 , 0 , height , width } ;
- SectRect(clipRect, &myClip, clipRect);
-}
-