]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/focusevt.tex
GetCurrentSelection() was documented but not present in all ports (just MSW and GTK...
[wxWidgets.git] / docs / latex / wx / focusevt.tex
index e47b55d138d765fd0e40a6acb5ae48420dc14ad8..84fb596719ee6c9d6893bad0197fd24ab1420078 100644 (file)
@@ -1,12 +1,22 @@
 \section{\class{wxFocusEvent}}\label{wxfocusevent}
 
-A focus event is sent when a window's focus changes.
+A focus event is sent when a window's focus changes. The window losing focus
+receives a ``kill focus'' event while the window gaining it gets a ``set
+focus'' one.
+
+Notice that the set focus event happens both when the user gives focus to the
+window (whether using the mouse or keyboard) and when it is done from the
+program itself using \helpref{SetFocus}{wxwindowsetfocus}.
 
 \wxheading{Derived from}
 
 \helpref{wxEvent}{wxevent}\\
 \helpref{wxObject}{wxobject}
 
+\wxheading{Include files}
+
+<wx/event.h>
+
 \wxheading{Event table macros}
 
 To process a focus event, use these event handler macros to direct input to a member
@@ -20,15 +30,23 @@ function that takes a wxFocusEvent argument.
 
 \wxheading{See also}
 
-\helpref{wxWindow::OnSetFocus}{wxwindowonsetfocus},\rtfsp
-\helpref{wxWindow::OnKillFocus}{wxwindowonkillfocus},\rtfsp
 \helpref{Event handling overview}{eventhandlingoverview}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
-\membersection{wxFocusEvent::wxFocusEvent}
+
+\membersection{wxFocusEvent::wxFocusEvent}\label{wxfocuseventctor}
 
 \func{}{wxFocusEvent}{\param{WXTYPE }{eventType = 0}, \param{int }{id = 0}}
 
 Constructor.
 
+
+\membersection{wxFocusEvent::GetWindow}\label{wxfocuseventgetwindow}
+
+Returns the window associated with this event, that is the window which had the
+focus before for the \texttt{wxEVT\_SET\_FOCUS} event and the window which is
+going to receive focus for the \texttt{wxEVT\_KILL\_FOCUS} one.
+
+Warning: the window pointer may be \texttt{NULL}!
+