more wxCloseEvent changes: now the behaviour should be conforming to the one

described in the docs (i.e. like Julian wants it)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-02-05 16:12:43 +00:00
parent 818e52c201
commit fe4e9e6c14
11 changed files with 51 additions and 36 deletions

View File

@@ -1718,13 +1718,9 @@ bool wxWindow::Close( bool force )
event.SetEventObject(this);
event.SetCanVeto(!force);
(void)GetEventHandler()->ProcessEvent(event);
// when we're forced to close we do it anyhow, otherwise only if the
// application didn't forbid it (if the event wasn't processed, GetVeto()
// will return FALSE too)
if ( force || !event.GetVeto() )
Destroy();
// return FALSE if window wasn't closed because the application vetoed the
// close event
return GetEventHandler()->ProcessEvent(event) && !event.GetVeto();
}
bool wxWindow::Destroy()