X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fc2171bd4c660b8554dae2a1cbf34ff09f3032a6..066f3611df971be93b2ec46b82c2f05f3ff9a422:/docs/latex/wx/evthand.tex diff --git a/docs/latex/wx/evthand.tex b/docs/latex/wx/evthand.tex index 60d9ee90e3..a52f29a4eb 100644 --- a/docs/latex/wx/evthand.tex +++ b/docs/latex/wx/evthand.tex @@ -18,19 +18,23 @@ will be identical to the "this" pointer for the wxEvtHandler portion. +\wxheading{Library} + +\helpref{wxBase}{librarieslist} + \wxheading{See also} \overview{Event handling overview}{eventhandlingoverview} \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxEvtHandler::wxEvtHandler} +\membersection{wxEvtHandler::wxEvtHandler}\label{wxevthandlerctor} \func{}{wxEvtHandler}{\void} Constructor. -\membersection{wxEvtHandler::\destruct{wxEvtHandler}} +\membersection{wxEvtHandler::\destruct{wxEvtHandler}}\label{wxevthandlerdtor} \func{}{\destruct{wxEvtHandler}}{\void} @@ -40,7 +44,7 @@ each other. \membersection{wxEvtHandler::AddPendingEvent}\label{wxevthandleraddpendingevent} -\func{void}{AddPendingEvent}{\param{wxEvent\& }{event}} +\func{virtual void}{AddPendingEvent}{\param{const wxEvent\& }{event}} This function posts an event to be processed later. @@ -74,38 +78,45 @@ up idle handling is done calling \helpref{::wxWakeUpIdle}{wxwakeupidle}.) \membersection{wxEvtHandler::Connect}\label{wxevthandlerconnect} -\func{void}{Connect}{\param{int}{ id}, +\func{void}{Connect}{\param{int}{ id}, \param{int}{ lastId}, \param{wxEventType }{eventType}, \param{wxObjectEventFunction}{ function}, \param{wxObject*}{ userData = NULL}, \param{wxEvtHandler*}{ eventSink = NULL}} -\func{void}{Connect}{\param{int}{ id}, \param{int}{ lastId}, +\func{void}{Connect}{\param{int}{ id}, \param{wxEventType }{eventType}, \param{wxObjectEventFunction}{ function}, \param{wxObject*}{ userData = NULL}, \param{wxEvtHandler*}{ eventSink = NULL}} +\func{void}{Connect}{\param{wxEventType }{eventType}, \param{wxObjectEventFunction}{ function}, + \param{wxObject*}{ userData = NULL}, \param{wxEvtHandler*}{ eventSink = NULL}} + Connects the given function dynamically with the event handler, id and event type. This -is an alternative to the use of static event tables. See the 'dynamic' sample for usage. +is an alternative to the use of static event tables. See the 'event' or the old 'dynamic' sample for usage. \wxheading{Parameters} -\docparam{id}{The identifier (or first of the identifier range) to be associated with the event handler function.} +\docparam{id}{The identifier (or first of the identifier range) to be +associated with the event handler function. For the version not taking this +argument, it defaults to \texttt{wxID\_ANY}.} \docparam{lastId}{The second part of the identifier range to be associated with the event handler function.} \docparam{eventType}{The event type to be associated with this event handler.} -\docparam{function}{The event handler function.} +\docparam{function}{The event handler function. Note that this function should +be explicitly converted to the correct type which can be done using a macro +called \texttt{wxFooHandler} for the handler for any \texttt{wxFooEvent}.} \docparam{userData}{Data to be associated with the event table entry.} \docparam{eventSink}{Object whose member function should be called. If this is NULL, -'this' will be used.} +\textit{this} will be used.} \wxheading{Example} \begin{verbatim} frame->Connect( wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, - (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) MyFrame::OnQuit ); + wxCommandEventHandler(MyFrame::OnQuit) ); \end{verbatim} \perlnote{In wxPerl this function takes 4 arguments: \texttt{id, @@ -114,11 +125,14 @@ handler is disconnected.} \membersection{wxEvtHandler::Disconnect}\label{wxevthandlerdisconnect} -\func{bool}{Disconnect}{\param{int}{ id}, +\func{bool}{Disconnect}{\param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL}, + \param{wxObject*}{ userData = NULL}, \param{wxEvtHandler*}{ eventSink = NULL}} + +\func{bool}{Disconnect}{\param{int}{ id = \texttt{wxID\_ANY}}, \param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL}, \param{wxObject*}{ userData = NULL}, \param{wxEvtHandler*}{ eventSink = NULL}} -\func{bool}{Disconnect}{\param{int}{ id}, \param{int}{ lastId = -1}, +\func{bool}{Disconnect}{\param{int}{ id}, \param{int}{ lastId = \texttt{wxID\_ANY}}, \param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL}, \param{wxObject*}{ userData = NULL}, \param{wxEvtHandler*}{ eventSink = NULL}} @@ -262,7 +276,7 @@ recursively applied to the parent window's event handler. If this returns true, \membersection{wxEvtHandler::SearchEventTable}\label{wxevthandlersearcheventtable} -\func{bool}{SearchEventTable}{\param{wxEventTable\& }{table}, \param{wxEvent\& }{event}} +\func{virtual bool}{SearchEventTable}{\param{wxEventTable\& }{table}, \param{wxEvent\& }{event}} Searches the event table, executing an event handler function if an appropriate one is found.