]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/event.tex
Reverted the warning fix since it breaks MinGW
[wxWidgets.git] / docs / latex / wx / event.tex
index d44b4b3fb874573cce562ba906efb67a62aa3090..9e542c58c9433d6a1a527e000f5ee767bcb8de90 100644 (file)
@@ -8,6 +8,10 @@ event object, and is an abstract base class for other event classes (see below).
 
 \helpref{wxObject}{wxobject}
 
 
 \helpref{wxObject}{wxobject}
 
+\wxheading{Include files}
+
+<wx/event.h>
+
 \wxheading{See also}
 
 \helpref{wxCommandEvent}{wxcommandevent},\rtfsp
 \wxheading{See also}
 
 \helpref{wxCommandEvent}{wxcommandevent},\rtfsp
@@ -17,17 +21,10 @@ event object, and is an abstract base class for other event classes (see below).
 
 \membersection{wxEvent::wxEvent}
 
 
 \membersection{wxEvent::wxEvent}
 
-\func{}{wxEvent}{\param{int }{id = 0}}
+\func{}{wxEvent}{\param{int }{id = 0}, \param{wxEventType }{eventType = {\tt wxEVT\_NULL}}}
 
 Constructor. Should not need to be used directly by an application.
 
 
 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}
 \membersection{wxEvent::m\_eventObject}
 
 \member{wxObject*}{m\_eventObject}
@@ -51,7 +48,7 @@ Identifier for the window.
 
 \member{bool}{m\_skipped}
 
 
 \member{bool}{m\_skipped}
 
-Set to TRUE by {\bf Skip} if this event should be skipped.
+Set to true by {\bf Skip} if this event should be skipped.
 
 \membersection{wxEvent::m\_timeStamp}
 
 
 \membersection{wxEvent::m\_timeStamp}
 
@@ -59,12 +56,25 @@ Set to TRUE by {\bf Skip} if this event should be skipped.
 
 Timestamp for this event.
 
 
 Timestamp for this event.
 
-\membersection{wxEvent::GetEventClass}
+\membersection{wxEvent::Clone}\label{wxeventclone}
 
 
-\func{WXTYPE}{GetEventClass}{\void}
+\constfunc{virtual wxEvent*}{Clone}{\void}
 
 
-Returns the identifier of the given event class,
-such as wxTYPE\_MOUSE\_EVENT.
+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}
 
 
 \membersection{wxEvent::GetEventObject}
 
@@ -86,18 +96,11 @@ such as wxEVENT\_TYPE\_BUTTON\_COMMAND.
 
 Returns the identifier associated with this event, such as a button command id.
 
 
 Returns the identifier associated with this event, such as a button command id.
 
-\membersection{wxEvent::GetObjectType}
-
-\func{WXTYPE}{GetObjectType}{\void}
-
-Returns the type of the object associated with the
-event, such as wxTYPE\_BUTTON.
-
 \membersection{wxEvent::GetSkipped}
 
 \func{bool}{GetSkipped}{\void}
 
 \membersection{wxEvent::GetSkipped}
 
 \func{bool}{GetSkipped}{\void}
 
-Returns TRUE if the event handler should be skipped, FALSE otherwise.
+Returns true if the event handler should be skipped, false otherwise.
 
 \membersection{wxEvent::GetTimestamp}
 
 
 \membersection{wxEvent::GetTimestamp}
 
@@ -133,7 +136,7 @@ Sets the originating object.
 
 \membersection{wxEvent::Skip}\label{wxeventskip}
 
 
 \membersection{wxEvent::Skip}\label{wxeventskip}
 
-\func{void}{Skip}{\param{bool}{ skip = TRUE}}
+\func{void}{Skip}{\param{bool}{ skip = true}}
 
 Called by an event handler to tell the event system that the
 event handler should be skipped, and the next valid handler used
 
 Called by an event handler to tell the event system that the
 event handler should be skipped, and the next valid handler used