- node = node->Next();
- }
-}
-
-bool wxWindowMac::MacSetPortFocusParams( 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);
-
-// wxASSERT( port->portRect.left == 0 && port->portRect.top == 0 ) ;
- ::SetOrigin(-localOrigin.h, -localOrigin.v);
- return true;
-}
-
-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);
-// wxASSERT( port->portRect.left == 0 && port->portRect.top == 0 ) ;
- ::SetOrigin(-localOrigin.h, -localOrigin.v);
- ::ClipRect(&clipRect);
-
- ::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)
-{
- if ( m_macWindowData )
- {
- localOrigin->h = 0;
- localOrigin->v = 0;
- clipRect->left = 0;
- clipRect->top = 0;
- clipRect->right = m_width;
- clipRect->bottom = m_height;
- *window = m_macWindowData->m_macWindow ;
- *rootwin = this ;
- }
- else
- {
- 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::MacDoGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin )
-{
-// int width , height ;
-// GetClientSize( &width , &height ) ;
-
- if ( m_macWindowData )
- {
- localOrigin->h = 0;
- localOrigin->v = 0;
- clipRect->left = 0;
- clipRect->top = 0;
- clipRect->right = m_width ;//width;
- clipRect->bottom = m_height ;// height;
- *window = m_macWindowData->m_macWindow ;
- *rootwin = this ;
- }
- else
- {
- wxASSERT( GetParent() != NULL ) ;
-
- GetParent()->MacDoGetPortClientParams( 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 ;//width;
- myClip.bottom = m_height ;// height;
- SectRect(clipRect, &myClip, clipRect);