-ControlHandle wxWindow::MacGetContainerForEmbedding()
-{
- if ( m_macWindowData )
- return m_macWindowData->m_macRootControl ;
- else
- return GetParent()->MacGetContainerForEmbedding() ;
-}
-
-void wxWindow::MacSuperChangedPosition()
-{
- // only window-absolute structures have to be moved i.e. controls
-
- wxNode *node = GetChildren().First();
- while ( node )
- {
- wxWindow *child = (wxWindow *)node->Data();
- child->MacSuperChangedPosition() ;
- node = node->Next();
- }
-}
-
-bool wxWindow::MacSetPortFocusParams( const Point & localOrigin, const Rect & clipRect, WindowRef window , wxWindow* 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 wxWindow::MacSetPortDrawingParams( const Point & localOrigin, const Rect & clipRect, WindowRef window , wxWindow* 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) ) ;
- ::UMASetThemeWindowBackground( win->m_macWindowData->m_macWindow , win->m_macWindowData->m_macWindowBackgroundTheme , false ) ;
- return true;
-}
-
-void wxWindow::MacGetPortParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindow** 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 wxWindow::MacDoGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindow** 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);
- }
-}
-
-void wxWindow::MacGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindow** rootwin )
-{
- MacDoGetPortClientParams( 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;
- myClip.left = 0;
- myClip.top = 0;
- myClip.right = width;
- myClip.bottom = height;
- SectRect(clipRect, &myClip, clipRect);
-}
-
-long wxWindow::MacGetLeftBorderSize( ) const
-{
- if( m_macWindowData )
- return 0 ;
+ControlHandle wxWindowMac::MacGetContainerForEmbedding()
+{
+ if ( m_macWindowData )
+ return m_macWindowData->m_macRootControl ;
+ else
+ return GetParent()->MacGetContainerForEmbedding() ;
+}
+
+void wxWindowMac::MacSuperChangedPosition()
+{
+ // only window-absolute structures have to be moved i.e. controls
+
+ wxNode *node = GetChildren().First();
+ while ( node )
+ {
+ wxWindowMac *child = (wxWindowMac *)node->Data();
+ child->MacSuperChangedPosition() ;
+ node = node->Next();
+ }
+}
+
+void wxWindowMac::MacTopLevelWindowChangedPosition()
+{
+ // only screen-absolute structures have to be moved i.e. glcanvas
+
+ wxNode *node = GetChildren().First();
+ while ( node )
+ {
+ wxWindowMac *child = (wxWindowMac *)node->Data();
+ child->MacTopLevelWindowChangedPosition() ;
+ 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);
+ }
+}
+
+void wxWindowMac::MacGetPortClientParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin )
+{
+ MacDoGetPortClientParams( 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;
+ myClip.left = 0;
+ myClip.top = 0;
+ myClip.right = width;
+ myClip.bottom = height;
+ SectRect(clipRect, &myClip, clipRect);
+}
+
+long wxWindowMac::MacGetLeftBorderSize( ) const
+{
+ if( m_macWindowData )
+ return 0 ;