From 938ad7687f55ee6b66cf2cc8c5cc39bc18fa1ca1 Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Fri, 19 Aug 2005 13:45:11 +0000 Subject: [PATCH] Document the current behaviour of OnDestroy git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/destroyevt.tex | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/docs/latex/wx/destroyevt.tex b/docs/latex/wx/destroyevt.tex index 8934525afb..8f901ad107 100644 --- a/docs/latex/wx/destroyevt.tex +++ b/docs/latex/wx/destroyevt.tex @@ -1,8 +1,24 @@ \section{\class{wxWindowDestroyEvent}}\label{wxwindowdestroyevent} -This event is sent just before the actual window associated with a wxWindow object -is destroyed. Since it is derived from wxCommandEvent, the event propagates up -the window hierarchy. +% Note: the original description is still here commented out in case those +% semantics are restored to this event. + +%This event is sent just before the actual window associated with a wxWindow object +%is destroyed. Since it is derived from wxCommandEvent, the event propagates up +%the window hierarchy. + +This event is sent from the wxWindow destructor wxWindow::~wxWindow() when a +window is destroyed. + +When a class derived from wxWindow is destroyed its destructor will have +already run by the time this event is sent. Therefore this event will not +usually be received at all. + +To receive this event \helpref{wxEvtHandler::Connect}{wxevthandlerconnect} +must be used (using an event table macro will not work). Since it is +received after the destructor has run, an object should not handle its +own wxWindowDestroyEvent, but it can be used to get notification of the +destruction of another window. \wxheading{Derived from} @@ -16,13 +32,15 @@ the window hierarchy. \wxheading{Event table macros} -To process a window destruction event, use this event handler macro to direct input to a member -function that takes a wxWindowDestroyEvent argument. +%To process a window destruction event, use this event handler macro to direct input to a member +%function that takes a wxWindowDestroyEvent argument. +% +%\twocolwidtha{7cm} +%\begin{twocollist}\itemsep=0pt +%\twocolitem{{\bf EVT\_WINDOW\_DESTROY(func)}}{Process a wxEVT\_DESTROY event.} +%\end{twocollist}% -\twocolwidtha{7cm} -\begin{twocollist}\itemsep=0pt -\twocolitem{{\bf EVT\_WINDOW\_DESTROY(func)}}{Process a wxEVT\_DESTROY event.} -\end{twocollist}% +It is not possible to receive this event using an event table macro. \wxheading{See also} -- 2.45.2