1 \section{\class{wxEvent
}}\label{wxevent
}
3 An event is a structure holding information about an event passed to a
4 callback or member function.
{\bf wxEvent
} used to be a multipurpose
5 event object, and is an abstract base class for other event classes (see below).
7 \wxheading{Derived from
}
9 \helpref{wxObject
}{wxobject
}
11 \wxheading{Include files
}
17 \helpref{wxCommandEvent
}{wxcommandevent
},
\rtfsp
18 \helpref{wxMouseEvent
}{wxmouseevent
}
20 \latexignore{\rtfignore{\wxheading{Members
}}}
22 \membersection{wxEvent::wxEvent
}
24 \func{}{wxEvent
}{\param{int
}{id =
0},
\param{wxEventType
}{eventType =
{\tt wxEVT
\_NULL}}}
26 Constructor. Should not need to be used directly by an application.
28 \membersection{wxEvent::m
\_eventObject}
30 \member{wxObject*
}{m
\_eventObject}
32 The object (usually a window) that the event was generated from,
35 \membersection{wxEvent::m
\_eventType}
37 \member{WXTYPE
}{m
\_eventType}
39 The type of the event, such as wxEVENT
\_TYPE\_BUTTON\_COMMAND.
41 \membersection{wxEvent::m
\_id}
45 Identifier for the window.
47 \membersection{wxEvent::m
\_skipped}
49 \member{bool
}{m
\_skipped}
51 Set to TRUE by
{\bf Skip
} if this event should be skipped.
53 \membersection{wxEvent::m
\_timeStamp}
55 \member{long
}{m
\_timeStamp}
57 Timestamp for this event.
59 \membersection{wxEvent::Clone
}\label{wxeventclone
}
61 \constfunc{virtual wxEvent*
}{Clone
}{\void}
63 Returns a copy of the event.
65 Any event that is posted to the wxWindows event system for later action (via
66 \helpref{wxEvtHandler::AddPendingEvent
}{wxevthandleraddpendingevent
} or
67 \helpref{wxPostEvent
}{wxpostevent
}) must implement this method. All wxWindows
68 events fully implement this method, but any derived events implemented by the
69 user should also implement this method just in case they (or some event
70 derived from them) are ever posted.
72 All wxWindows events implement a copy constructor, so the easiest way of
73 implementing the Clone function is to implement a copy constructor for
74 a new event (call it MyEvent) and then define the Clone function like this:
76 wxEvent *Clone(void) const
{ return new MyEvent
(*this); }
79 \membersection{wxEvent::GetEventObject}
81 \func{wxObject*}{GetEventObject}{\void}
83 Returns the object associated with the
86 \membersection{wxEvent::GetEventType}
88 \func{WXTYPE}{GetEventType}{\void}
90 Returns the identifier of the given event type,
91 such as wxEVENT\_TYPE\_BUTTON\_COMMAND.
93 \membersection{wxEvent::GetId}
95 \func{int}{GetId}{\void}
97 Returns the identifier associated with this event, such as a button command id.
99 \membersection{wxEvent::GetObjectType}
101 \func{WXTYPE}{GetObjectType}{\void}
103 Returns the type of the object associated with the
104 event, such as wxTYPE\_BUTTON.
106 \membersection{wxEvent::GetSkipped}
108 \func{bool}{GetSkipped}{\void}
110 Returns TRUE if the event handler should be skipped, FALSE otherwise.
112 \membersection{wxEvent::GetTimestamp}
114 \func{long}{GetTimestamp}{\void}
116 Gets the timestamp for the event.
118 \membersection{wxEvent::SetEventObject}
120 \func{void}{SetEventObject}{\param{wxObject* }{object}}
122 Sets the originating object.
124 \membersection{wxEvent::SetEventType}
126 \func{void}{SetEventType}{\param{WXTYPE }{typ}}
130 \membersection{wxEvent::SetId}
132 \func{void}{SetId}{\param{int}{ id}}
134 Sets the identifier associated with this event, such as a button command id.
136 \membersection{wxEvent::SetTimestamp}
138 \func{void}{SetTimestamp}{\param{long }{timeStamp}}
140 Sets the timestamp for the event.
142 Sets the originating object.
144 \membersection{wxEvent::Skip}\label{wxeventskip}
146 \func{void}{Skip}{\param{bool}{ skip = TRUE}}
148 Called by an event handler to tell the event system that the
149 event handler should be skipped, and the next valid handler used