X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc0daf84009784af053fa265d8ad8e9e446388f4..050c9e3c90c58b05d5b3f7384d1556ca9669f13e:/src/mac/carbon/window.cpp?ds=sidebyside diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 0cd659a9f0..6c1095f8d3 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -45,7 +45,7 @@ #define wxWINDOW_VSCROLL 5997 #define MAC_SCROLLBAR_SIZE 16 -#include +#include "wx/mac/uma.h" #if wxUSE_DRAG_AND_DROP #include "wx/dnd.h" @@ -264,11 +264,9 @@ void wxWindowMac::SetFocus() } #endif // wxUSE_CARET // panel wants to track the window which was the last to have focus in it - wxPanel *panel = wxDynamicCast(GetParent(), wxPanel); - if ( panel ) - { - panel->SetLastFocus((wxWindow*)this); - } + wxChildFocusEvent eventFocus(this); + (void)GetEventHandler()->ProcessEvent(eventFocus); + #ifndef __WXUNIVERSAL__ wxControl* control = wxDynamicCast( gFocusWindow , wxControl ) ; if ( control && control->GetMacControl() ) @@ -341,20 +339,24 @@ void wxWindowMac::DragAcceptFiles(bool accept) // Get total size void wxWindowMac::DoGetSize(int *x, int *y) const { - *x = m_width ; - *y = m_height ; + if(x) *x = m_width ; + if(y) *y = m_height ; } void wxWindowMac::DoGetPosition(int *x, int *y) const { - *x = m_x ; - *y = m_y ; + int xx,yy; + + xx = m_x ; + yy = m_y ; if (GetParent()) { wxPoint pt(GetParent()->GetClientAreaOrigin()); - *x -= pt.x; - *y -= pt.y; + xx -= pt.x; + yy -= pt.y; } + if(x) *x = xx; + if(y) *y = yy; } #if wxUSE_MENUS @@ -378,9 +380,10 @@ void wxWindowMac::DoScreenToClient(int *x, int *y) const { WindowRef window = GetMacRootWindow() ; - Point localwhere ; - localwhere.h = * x ; - localwhere.v = * y ; + Point localwhere = {0,0} ; + + if(x) localwhere.h = * x ; + if(y) localwhere.v = * y ; GrafPtr port ; ::GetPort( &port ) ; @@ -388,8 +391,8 @@ void wxWindowMac::DoScreenToClient(int *x, int *y) const ::GlobalToLocal( &localwhere ) ; ::SetPort( port ) ; - *x = localwhere.h ; - *y = localwhere.v ; + if(x) *x = localwhere.h ; + if(y) *y = localwhere.v ; MacRootWindowToClient( x , y ) ; } @@ -400,9 +403,9 @@ void wxWindowMac::DoClientToScreen(int *x, int *y) const MacClientToRootWindow( x , y ) ; - Point localwhere ; - localwhere.h = * x ; - localwhere.v = * y ; + Point localwhere = { 0,0 }; + if(x) localwhere.h = * x ; + if(y) localwhere.v = * y ; GrafPtr port ; ::GetPort( &port ) ; @@ -410,32 +413,26 @@ void wxWindowMac::DoClientToScreen(int *x, int *y) const ::SetOrigin( 0 , 0 ) ; ::LocalToGlobal( &localwhere ) ; ::SetPort( port ) ; - *x = localwhere.h ; - *y = localwhere.v ; + if(x) *x = localwhere.h ; + if(y) *y = localwhere.v ; } void wxWindowMac::MacClientToRootWindow( int *x , int *y ) const { - if ( m_macWindowData ) + if ( m_macWindowData == NULL) { - } - else - { - *x += m_x ; - *y += m_y ; + if(x) *x += m_x + MacGetLeftBorderSize(); + if(y) *y += m_y + MacGetTopBorderSize(); GetParent()->MacClientToRootWindow( x , y ) ; } } void wxWindowMac::MacRootWindowToClient( int *x , int *y ) const { - if ( m_macWindowData ) - { - } - else + if ( m_macWindowData == NULL) { - *x -= m_x ; - *y -= m_y ; + if(x) *x -= m_x + MacGetLeftBorderSize(); + if(y) *y -= m_y + MacGetTopBorderSize(); GetParent()->MacRootWindowToClient( x , y ) ; } } @@ -480,11 +477,12 @@ bool wxWindowMac::SetCursor(const wxCursor& cursor) // Get size *available for subwindows* i.e. excluding menu bar etc. void wxWindowMac::DoGetClientSize(int *x, int *y) const { - *x = m_width ; - *y = m_height ; + int ww, hh; + ww = m_width ; + hh = m_height ; - *x -= MacGetLeftBorderSize( ) + MacGetRightBorderSize( ) ; - *y -= MacGetTopBorderSize( ) + MacGetBottomBorderSize( ); + ww -= MacGetLeftBorderSize( ) + MacGetRightBorderSize( ) ; + hh -= MacGetTopBorderSize( ) + MacGetBottomBorderSize( ); if ( (m_vScrollBar && m_vScrollBar->IsShown()) || (m_hScrollBar && m_hScrollBar->IsShown()) ) { @@ -496,7 +494,6 @@ void wxWindowMac::DoGetClientSize(int *x, int *y) const MacClientToRootWindow( &x1 , &y1 ) ; MacClientToRootWindow( &w , &h ) ; - WindowRef window = NULL ; wxWindowMac *iter = (wxWindowMac*)this ; int totW = 10000 , totH = 10000; @@ -514,21 +511,23 @@ void wxWindowMac::DoGetClientSize(int *x, int *y) const if (m_hScrollBar && m_hScrollBar->IsShown() ) { - (*y) -= MAC_SCROLLBAR_SIZE; + hh -= MAC_SCROLLBAR_SIZE; if ( h-y1 >= totH ) { - (*y)+= 1 ; + hh += 1 ; } } if (m_vScrollBar && m_vScrollBar->IsShown() ) { - (*x) -= MAC_SCROLLBAR_SIZE; + ww -= MAC_SCROLLBAR_SIZE; if ( w-x1 >= totW ) { - (*x) += 1 ; + ww += 1 ; } } } + if(x) *x = ww; + if(y) *y = hh; } @@ -550,73 +549,16 @@ void wxWindowMac::DoSetToolTip(wxToolTip *tooltip) void wxWindowMac::DoMoveWindow(int x, int y, int width, int height) { - DoSetSize( x,y, width, height ) ; -} - -// set the size of the window: if the dimensions are positive, just use them, -// but if any of them is equal to -1, it means that we must find the value for -// it ourselves (unless sizeFlags contains wxSIZE_ALLOW_MINUS_ONE flag, in -// which case -1 is a valid value for x and y) -// -// If sizeFlags contains wxSIZE_AUTO_WIDTH/HEIGHT flags (default), we calculate -// the width/height to best suit our contents, otherwise we reuse the current -// width/height -void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags) -{ - int former_x = m_x ; int former_y = m_y ; int former_w = m_width ; int former_h = m_height ; - int currentX, currentY; - GetPosition(¤tX, ¤tY); - int currentW,currentH; - GetSize(¤tW, ¤tH); - int actualWidth = width; int actualHeight = height; int actualX = x; int actualY = y; - if (x == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - actualX = currentX; - if (y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE)) - actualY = currentY; - - wxSize size( -1 , -1 ) ; - - if (width == -1 || height == -1 ) - { - size = DoGetBestSize() ; - } - if ( width == -1 ) - { - if ( sizeFlags & wxSIZE_AUTO_WIDTH ) - { - actualWidth = size.x ; - if ( actualWidth == -1 ) - actualWidth = 80 ; - } - else - { - actualWidth = currentW ; - } - } - if (height == -1) - { - if ( sizeFlags & wxSIZE_AUTO_HEIGHT ) - { - actualHeight = size.y ; - if ( actualHeight == -1 ) - actualHeight = 26 ; - } - else - { - actualHeight = currentH ; - } - } - if ((m_minWidth != -1) && (actualWidth < m_minWidth)) actualWidth = m_minWidth; if ((m_minHeight != -1) && (actualHeight < m_minHeight)) @@ -625,15 +567,7 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags) actualWidth = m_maxWidth; if ((m_maxHeight != -1) && (actualHeight > m_maxHeight)) actualHeight = m_maxHeight; - if ( actualX == currentX && actualY == currentY && actualWidth == currentW && actualHeight == currentH) - { - MacRepositionScrollBars() ; // we might have a real position shift - return ; - } - AdjustForParentClientOrigin(actualX, actualY, sizeFlags); - - bool doMove = false ; bool doResize = false ; @@ -683,6 +617,8 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags) frame->PositionStatusBar(); frame->PositionToolBar(); } + if ( doMove ) + wxWindowMac::MacTopLevelWindowChangedPosition() ; // like this only children will be notified } else { @@ -711,13 +647,83 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags) } if ( doResize ) { - MacRepositionScrollBars() ; - wxSize size(m_width, m_height); - wxSizeEvent event(size, m_windowId); - event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); + MacRepositionScrollBars() ; + wxSize size(m_width, m_height); + wxSizeEvent event(size, m_windowId); + event.SetEventObject(this); + GetEventHandler()->ProcessEvent(event); } } + +} + +// set the size of the window: if the dimensions are positive, just use them, +// but if any of them is equal to -1, it means that we must find the value for +// it ourselves (unless sizeFlags contains wxSIZE_ALLOW_MINUS_ONE flag, in +// which case -1 is a valid value for x and y) +// +// If sizeFlags contains wxSIZE_AUTO_WIDTH/HEIGHT flags (default), we calculate +// the width/height to best suit our contents, otherwise we reuse the current +// width/height +void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags) +{ + // get the current size and position... + int currentX, currentY; + GetPosition(¤tX, ¤tY); + int currentW,currentH; + GetSize(¤tW, ¤tH); + + // ... and don't do anything (avoiding flicker) if it's already ok + if ( x == currentX && y == currentY && + width == currentW && height == currentH ) + { + MacRepositionScrollBars() ; // we might have a real position shift + return; + } + + if ( x == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) ) + x = currentX; + if ( y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE) ) + y = currentY; + + AdjustForParentClientOrigin(x, y, sizeFlags); + + wxSize size(-1, -1); + if ( width == -1 ) + { + if ( sizeFlags & wxSIZE_AUTO_WIDTH ) + { + size = DoGetBestSize(); + width = size.x; + } + else + { + // just take the current one + width = currentW; + } + } + + if ( height == -1 ) + { + if ( sizeFlags & wxSIZE_AUTO_HEIGHT ) + { + if ( size.x == -1 ) + { + size = DoGetBestSize(); + } + //else: already called DoGetBestSize() above + + height = size.y; + } + else + { + // just take the current one + height = currentH; + } + } + + DoMoveWindow(x, y, width, height); + } // For implementation purposes - sometimes decorations make the client area // smaller @@ -770,8 +776,8 @@ bool wxWindowMac::Show(bool show) { if (show) { - UMAShowWindow( m_macWindowData->m_macWindow ) ; - UMASelectWindow( m_macWindowData->m_macWindow ) ; + ::ShowWindow( m_macWindowData->m_macWindow ) ; + ::SelectWindow( m_macWindowData->m_macWindow ) ; // no need to generate events here, they will get them triggered by macos // actually they should be , but apparently they are not wxSize size(m_width, m_height); @@ -781,7 +787,7 @@ bool wxWindowMac::Show(bool show) } else { - UMAHideWindow( m_macWindowData->m_macWindow ) ; + ::HideWindow( m_macWindowData->m_macWindow ) ; } } MacSuperShown( show ) ; @@ -789,7 +795,7 @@ bool wxWindowMac::Show(bool show) { WindowRef window = GetMacRootWindow() ; wxWindowMac* win = wxFindWinFromMacWindow( window ) ; - if ( !win->m_isBeingDeleted ) + if ( win && !win->m_isBeingDeleted ) Refresh() ; } else @@ -1175,7 +1181,7 @@ void wxWindowMac::MacCreateRealWindow( const wxString& title, attr |= kWindowCloseBoxAttribute ; } - UMACreateNewWindow( wclass , attr , &theBoundsRect , &m_macWindowData->m_macWindow ) ; + ::CreateNewWindow( wclass , attr , &theBoundsRect , &m_macWindowData->m_macWindow ) ; wxAssociateWinWithMacWindow( m_macWindowData->m_macWindow , this ) ; wxString label ; if( wxApp::s_macDefaultEncodingIsPC ) @@ -1183,7 +1189,7 @@ void wxWindowMac::MacCreateRealWindow( const wxString& title, else label = title ; UMASetWTitleC( m_macWindowData->m_macWindow , label ) ; - UMACreateRootControl( m_macWindowData->m_macWindow , &m_macWindowData->m_macRootControl ) ; + ::CreateRootControl( m_macWindowData->m_macWindow , &m_macWindowData->m_macRootControl ) ; m_macWindowData->m_macFocus = NULL ; m_macWindowData->m_macHasReceivedFirstActivate = true ; @@ -1207,33 +1213,34 @@ void wxWindowMac::MacPaintBorders( ) if (HasFlag(wxRAISED_BORDER) || HasFlag( wxSUNKEN_BORDER) || HasFlag(wxDOUBLE_BORDER) ) { bool sunken = HasFlag( wxSUNKEN_BORDER ) ; - RGBColor pen1 = sunken ? white : black ; - RGBColor pen2 = sunken ? shadow : face ; - RGBColor pen3 = sunken ? face : shadow ; - RGBColor pen4 = sunken ? black : white ; - - RGBForeColor( &pen1 ) ; - { - Rect rect = { 0 , 0 , m_height , m_width } ; - FrameRect( &rect ) ; - } - RGBForeColor( &pen2 ) ; - { - Rect rect = { 1 , 1 , m_height -1 , m_width -1} ; - FrameRect( &rect ) ; - } - RGBForeColor( &pen3 ) ; - { - Rect rect = { 0 , 0 , m_height -2 , m_width -2} ; - FrameRect( &rect ) ; - } - RGBForeColor( &pen4 ) ; - { - MoveTo( 0 , 0 ) ; - LineTo( m_width - 3 , 0 ) ; - MoveTo( 0 , 0 ) ; - LineTo( 0 , m_height - 3 ) ; - } + RGBForeColor( &face ); + MoveTo( 0 , m_height - 2 ); + LineTo( 0 , 0 ); + LineTo( m_width - 2 , 0 ); + + MoveTo( 2 , m_height - 3 ); + LineTo( m_width - 3 , m_height - 3 ); + LineTo( m_width - 3 , 2 ); + + RGBForeColor( sunken ? &face : &black ); + MoveTo( 0 , m_height - 1 ); + LineTo( m_width - 1 , m_height - 1 ); + LineTo( m_width - 1 , 0 ); + + RGBForeColor( sunken ? &shadow : &white ); + MoveTo( 1 , m_height - 3 ); + LineTo( 1, 1 ); + LineTo( m_width - 3 , 1 ); + + RGBForeColor( sunken ? &white : &shadow ); + MoveTo( 1 , m_height - 2 ); + LineTo( m_width - 2 , m_height - 2 ); + LineTo( m_width - 2 , 1 ); + + RGBForeColor( sunken ? &black : &face ); + MoveTo( 2 , m_height - 4 ); + LineTo( 2 , 2 ); + LineTo( m_width - 4 , 2 ); } else if (HasFlag(wxSIMPLE_BORDER)) { @@ -1241,69 +1248,6 @@ void wxWindowMac::MacPaintBorders( ) RGBForeColor( &black ) ; FrameRect( &rect ) ; } -/* - if ( this->GetParent() ) - { - wxPaintDC dc(GetParent()); - GetParent()->PrepareDC(dc); - - if (HasFlag(wxRAISED_BORDER) || HasFlag( wxSUNKEN_BORDER) ) - { - bool sunken = HasFlag( wxSUNKEN_BORDER ) ; - - wxPen m_penButton3DShadow( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DSHADOW ), 1, wxSOLID ) ; - wxPen m_penButton3DFace( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DFACE ), 1, wxSOLID ) ; - - wxPen wxPen1 = sunken ? *wxWHITE_PEN : *wxBLACK_PEN; - wxPen wxPen2 = sunken ? m_penButton3DShadow : m_penButton3DShadow; - wxPen wxPen3 = sunken ? m_penButton3DFace : m_penButton3DShadow; - wxPen wxPen4 = sunken ? *wxBLACK_PEN : *wxWHITE_PEN; - - dc.SetPen(wxPen1); - dc.DrawRectangle(m_x, m_y, m_width, m_height); // outer - right and button - - dc.SetPen(wxPen2); - dc.DrawRectangle(m_x+1, m_y+1, m_width-1, m_height-1); // outer - left and top - - dc.SetPen(wxPen3); - dc.DrawRectangle(m_x, m_y, m_width-2, m_height-2); // inner - right and button - - dc.SetPen(wxPen4); - dc.DrawLine(m_x, m_y, m_x + m_width-3, m_y); // inner - left and top - dc.DrawLine(m_x, m_y, m_x, m_y + m_height-3); - } - else if (HasFlag(wxDOUBLE_BORDER)) - { - bool sunken = HasFlag( wxSUNKEN_BORDER ) ; - - wxPen m_penButton3DShadow( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DSHADOW ), 1, wxSOLID ) ; - wxPen m_penButton3DFace( wxSystemSettings::GetSystemColour( wxSYS_COLOUR_3DFACE ), 1, wxSOLID ) ; - - wxPen wxPen1 = sunken ? *wxWHITE_PEN : *wxBLACK_PEN; - wxPen wxPen2 = sunken ? m_penButton3DShadow : m_penButton3DShadow; - wxPen wxPen3 = sunken ? m_penButton3DFace : m_penButton3DShadow; - wxPen wxPen4 = sunken ? *wxBLACK_PEN : *wxWHITE_PEN; - - dc.SetPen(wxPen1); - dc.DrawRectangle(m_x, m_y, m_width, m_height); // outer - right and button - - dc.SetPen(wxPen2); - dc.DrawRectangle(m_x+1, m_y+1, m_width-1, m_height-1); // outer - left and top - - dc.SetPen(wxPen3); - dc.DrawRectangle(m_x, m_y, m_width-2, m_height-2); // inner - right and button - - dc.SetPen(wxPen4); - dc.DrawLine(m_x, m_y, m_x + m_width-3, m_y); // inner - left and top - dc.DrawLine(m_x, m_y, m_x, m_y + m_height-3); - } - else if (HasFlag(wxSIMPLE_BORDER)) - { - dc.SetPen(*wxBLACK_PEN); - dc.DrawRectangle(m_x, m_y, m_width, m_height); - } - } - */ } // New function that will replace some of the above. @@ -1476,18 +1420,10 @@ void wxWindowMac::OnSetFocus(wxFocusEvent& event) // notice that it's also important to do it upwards the tree becaus // otherwise when the top level panel gets focus, it won't set it back to // us, but to some other sibling - wxWindowMac *win = this; - while ( win ) - { - wxWindowMac *parent = win->GetParent(); - wxPanel *panel = wxDynamicCast(parent, wxPanel); - if ( panel ) - { - panel->SetLastFocus(win); - } - - win = parent; - } + + // CS:don't know if this is still needed: + //wxChildFocusEvent eventFocus(this); + //(void)GetEventHandler()->ProcessEvent(eventFocus); event.Skip(); } @@ -1500,7 +1436,7 @@ void wxWindowMac::Clear() int w ,h ; wxPoint origin = GetClientAreaOrigin() ; GetClientSize( &w , &h ) ; - UMASetThemeWindowBackground( m_macWindowData->m_macWindow , m_macWindowData->m_macWindowBackgroundTheme , false ) ; + ::SetThemeWindowBackground( m_macWindowData->m_macWindow , m_macWindowData->m_macWindowBackgroundTheme , false ) ; Rect r = { origin.y , origin.x, origin.y+h , origin.x+w } ; EraseRect( &r ) ; } @@ -1547,7 +1483,7 @@ void wxWindowMac::Raise() { if ( m_macWindowData ) { - UMABringToFront( m_macWindowData->m_macWindow ) ; + ::BringToFront( m_macWindowData->m_macWindow ) ; } } @@ -1556,7 +1492,7 @@ void wxWindowMac::Lower() { if ( m_macWindowData ) { - UMASendBehind( m_macWindowData->m_macWindow , NULL ) ; + ::SendBehind( m_macWindowData->m_macWindow , NULL ) ; } } @@ -1797,7 +1733,6 @@ void wxWindowMac::MacMouseDown( EventRecord *ev , short part) void wxWindowMac::MacMouseUp( EventRecord *ev , short part) { - WindowPtr frontWindow ; switch (part) { case inContent: @@ -1810,7 +1745,6 @@ void wxWindowMac::MacMouseUp( EventRecord *ev , short part) void wxWindowMac::MacMouseMoved( EventRecord *ev , short part) { - WindowPtr frontWindow ; switch (part) { case inContent: @@ -1843,7 +1777,7 @@ void wxWindowMac::MacRedraw( RgnHandle updatergn , long time) // ownUpdateRgn is the area that this window has to invalidate i.e. its own area without its children RgnHandle ownUpdateRgn = NewRgn() ; CopyRgn( updatergn , ownUpdateRgn ) ; - wxWindowMac* win = wxFindWinFromMacWindow( window ) ; + { wxMacDrawingHelper focus( this ) ; // was client if ( focus.Ok() ) @@ -1854,7 +1788,7 @@ void wxWindowMac::MacRedraw( RgnHandle updatergn , long time) eraseBackground = true ; if ( m_backgroundColour == wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE) ) { - UMASetThemeWindowBackground( window , kThemeBrushDocumentWindowBackground , false ) ; + ::SetThemeWindowBackground( window , kThemeBrushDocumentWindowBackground , false ) ; } else if ( m_backgroundColour == wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DFACE ) ) { @@ -1886,7 +1820,7 @@ void wxWindowMac::MacRedraw( RgnHandle updatergn , long time) { Rect box ; GetRegionBounds( updatergn , &box) ; - UMAApplyThemeBackground(kThemeBackgroundTabPane, &box , kThemeStateActive,8,true); + ::ApplyThemeBackground(kThemeBackgroundTabPane, &box , kThemeStateActive,8,true); break ; } } @@ -1900,7 +1834,7 @@ void wxWindowMac::MacRedraw( RgnHandle updatergn , long time) if ( !parent ) { // if there is nothing special -> use default - UMASetThemeWindowBackground( window , kThemeBrushDialogBackgroundActive , false ) ; + ::SetThemeWindowBackground( window , kThemeBrushDialogBackgroundActive , false ) ; } } else @@ -2042,7 +1976,6 @@ void wxWindowMac::MacUpdate( EventRecord *ev ) WindowRef wxWindowMac::GetMacRootWindow() const { - WindowRef window = NULL ; wxWindowMac *iter = (wxWindowMac*)this ; while( iter ) @@ -2121,7 +2054,6 @@ void wxWindowMac::MacRepositionScrollBars() MacClientToRootWindow( &x , &y ) ; MacClientToRootWindow( &w , &h ) ; - WindowRef window = NULL ; wxWindowMac *iter = (wxWindowMac*)this ; int totW = 10000 , totH = 10000; @@ -2202,6 +2134,19 @@ void wxWindowMac::MacSuperChangedPosition() } } +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 ) @@ -2241,7 +2186,7 @@ bool wxWindowMac::MacSetPortDrawingParams( const Point & localOrigin, const Rect Pattern whiteColor ; ::BackPat( GetQDGlobalsWhite( &whiteColor) ) ; - ::UMASetThemeWindowBackground( win->m_macWindowData->m_macWindow , win->m_macWindowData->m_macWindowBackgroundTheme , false ) ; + ::SetThemeWindowBackground( win->m_macWindowData->m_macWindow , win->m_macWindowData->m_macWindowBackgroundTheme , false ) ; return true; } @@ -2338,11 +2283,11 @@ long wxWindowMac::MacGetLeftBorderSize( ) const if (m_windowStyle & wxRAISED_BORDER || m_windowStyle & wxSUNKEN_BORDER ) { - return 2 ; + return 3 ; } else if ( m_windowStyle &wxDOUBLE_BORDER) { - return 2 ; + return 3 ; } else if (m_windowStyle &wxSIMPLE_BORDER) { @@ -2366,7 +2311,7 @@ long wxWindowMac::MacGetRightBorderSize( ) const } else if (m_windowStyle &wxSIMPLE_BORDER) { - return 3 ; + return 1 ; } return 0 ; } @@ -2378,11 +2323,11 @@ long wxWindowMac::MacGetTopBorderSize( ) const if (m_windowStyle & wxRAISED_BORDER || m_windowStyle & wxSUNKEN_BORDER ) { - return 2 ; + return 3 ; } else if ( m_windowStyle &wxDOUBLE_BORDER) { - return 2 ; + return 3 ; } else if (m_windowStyle &wxSIMPLE_BORDER) { @@ -2406,7 +2351,7 @@ long wxWindowMac::MacGetBottomBorderSize( ) const } else if (m_windowStyle &wxSIMPLE_BORDER) { - return 3 ; + return 1 ; } return 0 ; }