This form of the event cloning patch survived my

thorough stress testing.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12476 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2001-11-18 12:42:45 +00:00
parent d5939a20fd
commit 8e72b8b517
4 changed files with 197 additions and 338 deletions

View File

@@ -25,13 +25,6 @@ event object, and is an abstract base class for other event classes (see below).
Constructor. Should not need to be used directly by an application.
\membersection{wxEvent::m\_eventHandle}
\member{char*}{m\_eventHandle}
Handle of an underlying windowing system event handle, such as
XEvent. Not guaranteed to be instantiated.
\membersection{wxEvent::m\_eventObject}
\member{wxObject*}{m\_eventObject}
@@ -63,6 +56,26 @@ Set to TRUE by {\bf Skip} if this event should be skipped.
Timestamp for this event.
\membersection{wxEvent::Clone}\label{wxeventclone}
\func{virtual wxEvent*}{Clone}{\void} const
Returns a copy of the event.
Any event that is posted to the wxWindows event system for later action (via
\helpref{wxEvtHandler::AddPendingEvent}{wxevthandleraddpendingevent} or
\helpref{wxPostEvent}{wxpostevent}) must implement this method. All wxWindows
events fully implement this method, but any derived events implemented by the
user should also implement this method just in case they (or some event
derived from them) are ever posted.
All wxWindows events implement a copy constructor, so the easiest way of
implementing the Clone function is to implement a copy constructor for
a new event (call it MyEvent) and then define the Clone function like this:
\begin{verbatim}
wxEvent *Clone(void) const { return new MyEvent(*this); }
\end{verbatim}
\membersection{wxEvent::GetEventObject}
\func{wxObject*}{GetEventObject}{\void}