X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/387a3b02e02d91da6c5d4331b667d835e32c83b0..feb6cde446a73ac2fe9ea0528d6c6eb16cc040fd:/docs/latex/wx/closeevt.tex?ds=sidebyside

diff --git a/docs/latex/wx/closeevt.tex b/docs/latex/wx/closeevt.tex
index 19576f9e7f..6ea5728e48 100644
--- a/docs/latex/wx/closeevt.tex
+++ b/docs/latex/wx/closeevt.tex
@@ -2,10 +2,28 @@
 
 This event class contains information about window and session close events.
 
+The handler function for EVT\_CLOSE is called when the user has tried to close a a frame
+or dialog box using the window manager (X) or system menu (Windows). It is
+called via the \helpref{wxWindow::Close}{wxwindowclose} function, so
+that the application can also invoke the handler programmatically.
+
+You should check whether the application is forcing the deletion of the window
+using \helpref{wxCloseEvent::CanVeto}{wxcloseeventcanveto}. If this is {\tt FALSE},
+you {\it must} destroy the window using \helpref{wxWindow::Destroy}{wxwindowdestroy}.
+If the return value is TRUE, it is up to you whether you respond by destroying the window.
+
+If you don't destroy the window, you should call \helpref{wxCloseEvent::Veto}{wxcloseeventveto} to
+let the calling code know that you did not destroy the window. This allows the \helpref{wxWindow::Close}{wxwindowclose} function
+to return {\tt TRUE} or {\tt FALSE} depending on whether the close instruction was honoured or not.
+
 \wxheading{Derived from}
 
 \helpref{wxEvent}{wxevent}
 
+\wxheading{Include files}
+
+<wx/event.h>
+
 \wxheading{Event table macros}
 
 To process a close event, use these event handler macros to direct input to member
@@ -17,16 +35,16 @@ functions that take a wxCloseEvent argument.
 event applies to wxFrame and wxDialog classes.}
 \twocolitem{{\bf EVT\_QUERY\_END\_SESSION(func)}}{Process a query end session event, supplying the member function.
 This event applies to wxApp only.}
-\twocolitem{{\bf EVT\__END\_SESSION(func)}}{Process an end session event, supplying the member function.
+\twocolitem{{\bf EVT\_END\_SESSION(func)}}{Process an end session event, supplying the member function.
 This event applies to wxApp only.}
 \end{twocollist}%
 
 \wxheading{See also}
 
-\helpref{wxWindow::OnCloseWindow}{wxwindowonclosewindow},\rtfsp
 \helpref{wxWindow::Close}{wxwindowclose},\rtfsp
-\helpref{wxApp::OnQueryEndSession}{wxappqueryendsession},\rtfsp
-\helpref{wxApp::OnEndSession}{wxappendsession},\rtfsp
+\helpref{wxApp::OnQueryEndSession}{wxapponqueryendsession},\rtfsp
+%% GD: OnXXX functions are not documented
+%%\helpref{wxApp::OnEndSession}{wxapponendsession},\rtfsp
 \helpref{Window deletion overview}{windowdeletionoverview}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
