X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/05cbefbfab55a1e6142bc69b1ff9c8f69c276629..2fe417e4c40f5686a37d04b0e0f57a6fa6c2ceec:/src/mac/classic/window.cpp diff --git a/src/mac/classic/window.cpp b/src/mac/classic/window.cpp index 037b9af61e..351f692cda 100644 --- a/src/mac/classic/window.cpp +++ b/src/mac/classic/window.cpp @@ -977,7 +977,7 @@ const wxBrush& wxWindowMac::MacGetBackgroundBrush() wxWindowMac* parent = GetParent() ; while( parent ) { - if ( parent->MacGetRootWindow() != window ) + if ( parent->MacGetRootWindow() != (WXWindow) window ) { // we are in a different window on the mac system parent = NULL ; @@ -1303,36 +1303,36 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) void wxWindowMac::MacOnScroll(wxScrollEvent &event ) { - if ( event.m_eventObject == m_vScrollBar || event.m_eventObject == m_hScrollBar ) + if ( event.GetEventObject() == m_vScrollBar || event.GetEventObject() == m_hScrollBar ) { wxScrollWinEvent wevent; wevent.SetPosition(event.GetPosition()); wevent.SetOrientation(event.GetOrientation()); - wevent.m_eventObject = this; - - if (event.m_eventType == wxEVT_SCROLL_TOP) - wevent.m_eventType = wxEVT_SCROLLWIN_TOP; - else if (event.m_eventType == wxEVT_SCROLL_BOTTOM) - wevent.m_eventType = wxEVT_SCROLLWIN_BOTTOM; - else if (event.m_eventType == wxEVT_SCROLL_LINEUP) - wevent.m_eventType = wxEVT_SCROLLWIN_LINEUP; - else if (event.m_eventType == wxEVT_SCROLL_LINEDOWN) - wevent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; - else if (event.m_eventType == wxEVT_SCROLL_PAGEUP) - wevent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; - else if (event.m_eventType == wxEVT_SCROLL_PAGEDOWN) - wevent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; - else if (event.m_eventType == wxEVT_SCROLL_THUMBTRACK) - wevent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; - else if (event.m_eventType == wxEVT_SCROLL_THUMBRELEASE) - wevent.m_eventType = wxEVT_SCROLLWIN_THUMBRELEASE; + wevent.SetEventObject(this); + + if (event.GetEventType() == wxEVT_SCROLL_TOP) + wevent.SetEventType( wxEVT_SCROLLWIN_TOP ); + else if (event.GetEventType() == wxEVT_SCROLL_BOTTOM) + wevent.SetEventType( wxEVT_SCROLLWIN_BOTTOM ); + else if (event.GetEventType() == wxEVT_SCROLL_LINEUP) + wevent.SetEventType( wxEVT_SCROLLWIN_LINEUP ); + else if (event.GetEventType() == wxEVT_SCROLL_LINEDOWN) + wevent.SetEventType( wxEVT_SCROLLWIN_LINEDOWN ); + else if (event.GetEventType() == wxEVT_SCROLL_PAGEUP) + wevent.SetEventType( wxEVT_SCROLLWIN_PAGEUP ); + else if (event.GetEventType() == wxEVT_SCROLL_PAGEDOWN) + wevent.SetEventType( wxEVT_SCROLLWIN_PAGEDOWN ); + else if (event.GetEventType() == wxEVT_SCROLL_THUMBTRACK) + wevent.SetEventType( wxEVT_SCROLLWIN_THUMBTRACK ); + else if (event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE) + wevent.SetEventType( wxEVT_SCROLLWIN_THUMBRELEASE ); GetEventHandler()->ProcessEvent(wevent); } } // Get the window with the focus -wxWindowMac *wxWindowBase::FindFocus() +wxWindowMac *wxWindowBase::DoFindFocus() { return gFocusWindow ; } @@ -1427,7 +1427,7 @@ bool wxWindowMac::MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** { wxWindowMac *child = node->GetData(); // added the m_isShown test --dmazzoni - if ( child->MacGetRootWindow() == window && child->m_isShown ) + if ( child->MacGetRootWindow() == (WXWindow) window && child->m_isShown ) { if (child->MacGetWindowFromPointSub(newPoint , outWin )) return TRUE; @@ -1446,7 +1446,7 @@ bool wxWindowMac::MacGetWindowFromPoint( const wxPoint &screenpoint , wxWindowMa if ( ::FindWindow( pt , &window ) == 3 ) { - wxWindowMac* win = wxFindWinFromMacWindow( window ) ; + wxWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ; if ( win ) { // No, this yields the CLIENT are, we need the whole frame. RR. @@ -1531,7 +1531,7 @@ bool wxWindowMac::MacDispatchMouseEvent(wxMouseEvent& event) for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { wxWindowMac *child = node->GetData(); - if ( child->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() ) + if ( child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && child->IsEnabled() ) { if (child->MacDispatchMouseEvent(event)) return TRUE; @@ -1634,7 +1634,7 @@ wxTopLevelWindowMac* wxWindowMac::MacGetTopLevelWindow() const WindowRef window = (WindowRef) MacGetRootWindow() ; if ( window ) { - win = wxFindWinFromMacWindow( window ) ; + win = wxFindWinFromMacWindow( (WXWindow) window ) ; } return win ; } @@ -1797,7 +1797,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) { wxControl *child = wxDynamicCast( ( wxWindow*)node->GetData() , wxControl ) ; - if ( child && child->MacGetRootWindow() == window && child->IsShown() && child->GetMacControl() ) + if ( child && child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && child->GetMacControl() ) { SetControlVisibility( (ControlHandle) child->GetMacControl() , false , false ) ; hiddenWindows.Append( child ) ; @@ -1805,7 +1805,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) } wxPaintEvent event; - event.m_timeStamp = time ; + event.SetTimestamp(time); event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); @@ -1832,7 +1832,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) SetRectRgn( childupdate , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ; SectRgn( childupdate , updatergn , childupdate ) ; OffsetRgn( childupdate , -child->m_x , -child->m_y ) ; - if ( child->MacGetRootWindow() == window && child->IsShown() && !EmptyRgn( childupdate ) ) + if ( child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && !EmptyRgn( childupdate ) ) { // because dialogs may also be children child->MacRedraw( childupdate , time , erase ) ; @@ -1843,7 +1843,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) } -WXHWND wxWindowMac::MacGetRootWindow() const +WXWindow wxWindowMac::MacGetRootWindow() const { wxWindowMac *iter = (wxWindowMac*)this ;