toplevel adaptions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13105 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2001-12-19 21:37:53 +00:00
parent 5dafa778e7
commit a3722eeb81
2 changed files with 18 additions and 18 deletions

View File

@ -978,7 +978,7 @@ void wxApp::MacSuspend( bool convertClipboard )
{ {
// we have to deactive the window manually // we have to deactive the window manually
wxWindow* window = GetTopWindow() ; wxTopLevelWindow* window = (wxTopLevelWindow*) GetTopWindow() ;
if ( window ) if ( window )
window->MacActivate( MacGetCurrentEvent() , false ) ; window->MacActivate( MacGetCurrentEvent() , false ) ;
@ -1111,7 +1111,7 @@ void wxApp::MacHandleMouseDownEvent( EventRecord *ev )
::GetWindowAttributes( frontWindow , &frontWindowAttributes ) ; ::GetWindowAttributes( frontWindow , &frontWindowAttributes ) ;
short windowPart = ::FindWindow(ev->where, &window); short windowPart = ::FindWindow(ev->where, &window);
wxWindow* win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( wxPendingDelete.Member(win) ) if ( wxPendingDelete.Member(win) )
return ; return ;
@ -1274,7 +1274,7 @@ void wxApp::MacHandleMouseUpEvent( EventRecord *ev )
break ; break ;
default: default:
{ {
wxWindow* win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( win ) if ( win )
win->MacMouseUp( ev , windowPart ) ; win->MacMouseUp( ev , windowPart ) ;
} }
@ -1556,7 +1556,7 @@ void wxApp::MacHandleActivateEvent( EventRecord *ev )
// if it is a floater we activate/deactivate the front non-floating window instead // if it is a floater we activate/deactivate the front non-floating window instead
window = ::FrontNonFloatingWindow() ; window = ::FrontNonFloatingWindow() ;
} }
wxWindow* win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( win ) if ( win )
win->MacActivate( ev , activate ) ; win->MacActivate( ev , activate ) ;
} }
@ -1565,11 +1565,11 @@ void wxApp::MacHandleActivateEvent( EventRecord *ev )
void wxApp::MacHandleUpdateEvent( EventRecord *ev ) void wxApp::MacHandleUpdateEvent( EventRecord *ev )
{ {
WindowRef window = (WindowRef) ev->message ; WindowRef window = (WindowRef) ev->message ;
wxWindow * win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac * win = wxFindWinFromMacWindow( window ) ;
if ( win ) if ( win )
{ {
if ( !wxPendingDelete.Member(win) ) if ( !wxPendingDelete.Member(win) )
win->MacUpdate( ev ) ; win->MacUpdate( ev->when ) ;
} }
else else
{ {
@ -1626,13 +1626,13 @@ void wxApp::MacHandleOSEvent( EventRecord *ev )
if ( oldFrontWindow ) if ( oldFrontWindow )
{ {
wxWindow* win = wxFindWinFromMacWindow( oldFrontWindow ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( oldFrontWindow ) ;
if ( win ) if ( win )
win->MacActivate( ev , false ) ; win->MacActivate( ev , false ) ;
} }
if ( newFrontWindow ) if ( newFrontWindow )
{ {
wxWindow* win = wxFindWinFromMacWindow( newFrontWindow ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( newFrontWindow ) ;
if ( win ) if ( win )
win->MacActivate( ev , true ) ; win->MacActivate( ev , true ) ;
} }
@ -1726,7 +1726,7 @@ void wxApp::MacHandleOSEvent( EventRecord *ev )
::GetNextEvent(0, &tmp); ::GetNextEvent(0, &tmp);
ev->modifiers = tmp.modifiers; ev->modifiers = tmp.modifiers;
wxWindow* win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( win ) if ( win )
win->MacMouseMoved( ev , windowPart ) ; win->MacMouseMoved( ev , windowPart ) ;
else else

View File

@ -978,7 +978,7 @@ void wxApp::MacSuspend( bool convertClipboard )
{ {
// we have to deactive the window manually // we have to deactive the window manually
wxWindow* window = GetTopWindow() ; wxTopLevelWindow* window = (wxTopLevelWindow*) GetTopWindow() ;
if ( window ) if ( window )
window->MacActivate( MacGetCurrentEvent() , false ) ; window->MacActivate( MacGetCurrentEvent() , false ) ;
@ -1111,7 +1111,7 @@ void wxApp::MacHandleMouseDownEvent( EventRecord *ev )
::GetWindowAttributes( frontWindow , &frontWindowAttributes ) ; ::GetWindowAttributes( frontWindow , &frontWindowAttributes ) ;
short windowPart = ::FindWindow(ev->where, &window); short windowPart = ::FindWindow(ev->where, &window);
wxWindow* win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( wxPendingDelete.Member(win) ) if ( wxPendingDelete.Member(win) )
return ; return ;
@ -1274,7 +1274,7 @@ void wxApp::MacHandleMouseUpEvent( EventRecord *ev )
break ; break ;
default: default:
{ {
wxWindow* win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( win ) if ( win )
win->MacMouseUp( ev , windowPart ) ; win->MacMouseUp( ev , windowPart ) ;
} }
@ -1556,7 +1556,7 @@ void wxApp::MacHandleActivateEvent( EventRecord *ev )
// if it is a floater we activate/deactivate the front non-floating window instead // if it is a floater we activate/deactivate the front non-floating window instead
window = ::FrontNonFloatingWindow() ; window = ::FrontNonFloatingWindow() ;
} }
wxWindow* win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( win ) if ( win )
win->MacActivate( ev , activate ) ; win->MacActivate( ev , activate ) ;
} }
@ -1565,11 +1565,11 @@ void wxApp::MacHandleActivateEvent( EventRecord *ev )
void wxApp::MacHandleUpdateEvent( EventRecord *ev ) void wxApp::MacHandleUpdateEvent( EventRecord *ev )
{ {
WindowRef window = (WindowRef) ev->message ; WindowRef window = (WindowRef) ev->message ;
wxWindow * win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac * win = wxFindWinFromMacWindow( window ) ;
if ( win ) if ( win )
{ {
if ( !wxPendingDelete.Member(win) ) if ( !wxPendingDelete.Member(win) )
win->MacUpdate( ev ) ; win->MacUpdate( ev->when ) ;
} }
else else
{ {
@ -1626,13 +1626,13 @@ void wxApp::MacHandleOSEvent( EventRecord *ev )
if ( oldFrontWindow ) if ( oldFrontWindow )
{ {
wxWindow* win = wxFindWinFromMacWindow( oldFrontWindow ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( oldFrontWindow ) ;
if ( win ) if ( win )
win->MacActivate( ev , false ) ; win->MacActivate( ev , false ) ;
} }
if ( newFrontWindow ) if ( newFrontWindow )
{ {
wxWindow* win = wxFindWinFromMacWindow( newFrontWindow ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( newFrontWindow ) ;
if ( win ) if ( win )
win->MacActivate( ev , true ) ; win->MacActivate( ev , true ) ;
} }
@ -1726,7 +1726,7 @@ void wxApp::MacHandleOSEvent( EventRecord *ev )
::GetNextEvent(0, &tmp); ::GetNextEvent(0, &tmp);
ev->modifiers = tmp.modifiers; ev->modifiers = tmp.modifiers;
wxWindow* win = wxFindWinFromMacWindow( window ) ; wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ;
if ( win ) if ( win )
win->MacMouseMoved( ev , windowPart ) ; win->MacMouseMoved( ev , windowPart ) ;
else else