]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/evthand.tex
Misc documentation fixes
[wxWidgets.git] / docs / latex / wx / evthand.tex
index ad4daf7f71673be7944bfc6abe404245ce357f81..8eeb77b11a9b20c3a3a269745de5ef27a2b2856f 100644 (file)
@@ -4,6 +4,12 @@ A class that can handle events from the windowing system.
 wxWindow (and therefore all window classes) are derived from
 this class.
 
 wxWindow (and therefore all window classes) are derived from
 this class.
 
+When events are received, wxEvtHandler invokes the method listed in the
+event table using itself as the object.  When using multiple inheritance
+it is imperative that the wxEvtHandler(-derived) class be the first
+class inherited such that the "this" pointer for the overall object
+will be identical to the "this" pointer for the wxEvtHandler portion.
+
 \wxheading{Derived from}
 
 \helpref{wxObject}{wxobject}
 \wxheading{Derived from}
 
 \helpref{wxObject}{wxobject}
@@ -70,11 +76,11 @@ up idle handling is done calling \helpref{::wxWakeUpIdle}{wxwakeupidle}.)
 
 \func{void}{Connect}{\param{int}{ id},
  \param{wxEventType }{eventType}, \param{wxObjectEventFunction}{ function},
 
 \func{void}{Connect}{\param{int}{ id},
  \param{wxEventType }{eventType}, \param{wxObjectEventFunction}{ function},
- \param{wxObject*}{ userData = NULL}}
+ \param{wxObject*}{ userData = NULL}, \param{wxEvtHandler*}{ eventSink = NULL}}
 
 \func{void}{Connect}{\param{int}{ id}, \param{int}{ lastId},
  \param{wxEventType }{eventType}, \param{wxObjectEventFunction}{ function},
 
 \func{void}{Connect}{\param{int}{ id}, \param{int}{ lastId},
  \param{wxEventType }{eventType}, \param{wxObjectEventFunction}{ function},
- \param{wxObject*}{ userData = NULL}}
+ \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.
 
 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.
@@ -91,6 +97,9 @@ is an alternative to the use of static event tables. See the 'dynamic' sample fo
 
 \docparam{userData}{Data to be associated with the event table entry.}
 
 
 \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.}
+
 \wxheading{Example}
 
 \begin{verbatim}
 \wxheading{Example}
 
 \begin{verbatim}
@@ -99,15 +108,19 @@ is an alternative to the use of static event tables. See the 'dynamic' sample fo
     (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) MyFrame::OnQuit );
 \end{verbatim}
 
     (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) MyFrame::OnQuit );
 \end{verbatim}
 
+\perlnote{In wxPerl this function takes 4 arguments: \texttt{id,
+lastid, type, method}; if \texttt{method} is \texttt{undef}, the
+handler is disconnected.}
+
 \membersection{wxEvtHandler::Disconnect}\label{wxevthandlerdisconnect}
 
 \func{bool}{Disconnect}{\param{int}{ id},
  \param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL},
 \membersection{wxEvtHandler::Disconnect}\label{wxevthandlerdisconnect}
 
 \func{bool}{Disconnect}{\param{int}{ id},
  \param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL},
- \param{wxObject*}{ userData = NULL}}
+ \param{wxObject*}{ userData = NULL}, \param{wxEvtHandler*}{ eventSink = NULL}}
 
 \func{bool}{Disconnect}{\param{int}{ id}, \param{int}{ lastId = -1},
  \param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL},
 
 \func{bool}{Disconnect}{\param{int}{ id}, \param{int}{ lastId = -1},
  \param{wxEventType }{eventType = wxEVT\_NULL}, \param{wxObjectEventFunction}{ function = NULL},
- \param{wxObject*}{ userData = NULL}}
+ \param{wxObject*}{ userData = NULL}, \param{wxEvtHandler*}{ eventSink = NULL}}
 
 Disconnects the given function dynamically from the event handler, using the specified
 parameters as search criteria and returning true if a matching function has been
 
 Disconnects the given function dynamically from the event handler, using the specified
 parameters as search criteria and returning true if a matching function has been
@@ -127,6 +140,11 @@ to disconnect functions connected using the (static) event tables.
 
 \docparam{userData}{Data associated with the event table entry.}
 
 
 \docparam{userData}{Data associated with the event table entry.}
 
+\docparam{eventSink}{Object whose member function should be called.}
+
+\perlnote{In wxPerl this function takes 3 arguments: \texttt{id,
+lastid, type}.}
+
 \membersection{wxEvtHandler::GetClientData}\label{wxevthandlergetclientdata}
 
 \func{void* }{GetClientData}{\void}
 \membersection{wxEvtHandler::GetClientData}\label{wxevthandlergetclientdata}
 
 \func{void* }{GetClientData}{\void}