X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ccaaf5b08351d01b9ed1a83c0dc81764435cb4cc..cdfb1ae1bcacb8327589a09e6a67f8fc1ef5a82e:/docs/latex/wx/evthand.tex

diff --git a/docs/latex/wx/evthand.tex b/docs/latex/wx/evthand.tex
index 84bd8b92b4..45ae21f81b 100644
--- a/docs/latex/wx/evthand.tex
+++ b/docs/latex/wx/evthand.tex
@@ -36,9 +36,7 @@ each other.
 
 \func{virtual void}{AddPendingEvent}{\param{wxEvent\& }{event}}
 
-Adds an event to be processed later. The function will return immediately and the
-event will get processed in idle time using the \helpref{wxEvtHandler::ProcessEvent}{wxevthandlerprocessevent}
-method.
+This function posts an event to be processed later.
 
 \wxheading{Parameters}
 
@@ -46,24 +44,27 @@ method.
 
 \wxheading{Remarks}
 
-Note that this requires that the event has a fully implemented Clone()
-method so that the event can be duplicated and stored until it gets processed later.
-Not all events in wxWindows currently have a fully implemented Clone() method,
-so you may have to look at the source to verify this.
+The difference between sending an event (using the
+\helpref{ProcessEvent}{wxevthandlerprocessevent} method) and posting it is
+that in the first case the event is processed before the function returns,
+while in the second case, the function returns immediately and the event will
+be processed sometime later (usually during the next event loop iteration).
 
-This methods automatically wakes up idle handling even if the underlying window 
-system is currently idle anyway and thus would not send any idle events. (Waking
-up the idle handling is done calling \helpref{::wxWakeUpIdle}{wxwakeupidle}.)
+A copy of {\it event} is made by the function, so the original can be deleted
+as soon as function returns (it is common that the original is created on the
+stack).  This requires that the \helpref{wxEvent::Clone}{wxeventclone} method
+be implemented by {\it event} so that it can be duplicated and stored until
+it gets processed.
 
-This is also the method to call for inter-thread communication. In
-a multi-threaded program, you will often have to inform the main GUI thread
-about the status of other working threads and this has to be done using this
-method - which also means that this method is thread safe by means of using
-crtical sections where needed.
+This is also the method to call for inter-thread communication---it will
+post events safely between different threads which means that this method is
+thread-safe by using critical sections where needed.  In a multi-threaded
+program, you often need to inform the main GUI thread about the status of
+other working threads and such notification should be done using this method.
 
-Furthermore, it may be noted that some ports of wxWindows will probably move
-to using this method more and more in preference over calling ProcessEvent()
-directly so as to avoid problems with reentrant code.
+This method automatically wakes up idle handling if the underlying window 
+system is currently idle and thus would not send any idle events. (Waking
+up idle handling is done calling \helpref{::wxWakeUpIdle}{wxwakeupidle}.)
 
 \membersection{wxEvtHandler::Connect}\label{wxevthandlerconnect}
 
@@ -101,11 +102,11 @@ is an alternative to the use of static event tables. See the 'dynamic' sample fo
 \membersection{wxEvtHandler::Disconnect}\label{wxevthandlerdisconnect}
 
 \func{bool}{Disconnect}{\param{int}{ id},
- \param{wxEventType }{eventType = wxEVT_NULL}, \param{wxObjectEventFunction}{ function = NULL},
+ \param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL},
  \param{wxObject*}{ userData = NULL}}
 
 \func{bool}{Disconnect}{\param{int}{ id}, \param{int}{ lastId = -1},
- \param{wxEventType }{eventType = wxEVT_NULL}, \param{wxObjectEventFunction}{ function = NULL},
+ \param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL},
  \param{wxObject*}{ userData = NULL}}
 
 Disconnects the given function dynamically from the event handler, using the specified
@@ -141,6 +142,17 @@ should be made available by deriving a new class with new data members.
 
 \helpref{wxEvtHandler::SetClientData}{wxevthandlersetclientdata}
 
+\membersection{wxEvtHandler::GetClientObject}\label{wxevthandlergetclientobject}
+
+\constfunc{wxClientData*}{GetClientObject}{\void}
+
+Get a pointer to the user-supplied client data object.
+
+\wxheading{See also}
+
+\helpref{wxEvtHandler::SetClientObject}{wxevthandlersetclientobject},
+\helpref{wxClientData}{wxclientdata}
+
 \membersection{wxEvtHandler::GetEvtHandlerEnabled}\label{wxevthandlergetevthandlerenabled}
 
 \func{bool}{GetEvtHandlerEnabled}{\void}
@@ -281,12 +293,25 @@ Sets user-supplied client data.
 
 Normally, any extra data the programmer wishes to associate with 
 the object should be made available by deriving a new class
-with new data members.
+with new data members. You must not call this method and
+\helpref{SetClientObject}{wxevthandlersetclientobject} on the
+same class - only one of them.
 
 \wxheading{See also}
 
 \helpref{wxEvtHandler::GetClientData}{wxevthandlergetclientdata}
 
+\membersection{wxEvtHandler::SetClientObject}\label{wxevthandlersetclientobject}
+
+\func{void}{SetClientObject}{\param{wxClientData* }{data}}
+
+Set the client data object. Any previous object will be deleted.
+
+\wxheading{See also}
+
+\helpref{wxEvtHandler::GetClientObject}{wxevthandlergetclientobject},
+\helpref{wxClientData}{wxclientdata}
+
 \membersection{wxEvtHandler::SetEvtHandlerEnabled}\label{wxevthandlersetevthandlerenabled}
 
 \func{void}{SetEvtHandlerEnabled}{\param{bool }{enabled}}
