]>
Commit | Line | Data |
---|---|---|
a660d684 KB |
1 | \section{\class{wxFocusEvent}}\label{wxfocusevent} |
2 | ||
8204abde VZ |
3 | A focus event is sent when a window's focus changes. The window losing focus |
4 | receives a ``kill focus'' event while the window gaining it gets a ``set | |
5 | focus'' one. | |
6 | ||
7 | Notice that the set focus event happens both when the user gives focus to the | |
8 | window (whether using the mouse or keyboard) and when it is done from the | |
9 | program itself using \helpref{SetFocus}{wxwindowsetfocus}. | |
a660d684 KB |
10 | |
11 | \wxheading{Derived from} | |
12 | ||
13 | \helpref{wxEvent}{wxevent}\\ | |
14 | \helpref{wxObject}{wxobject} | |
15 | ||
954b8ae6 JS |
16 | \wxheading{Include files} |
17 | ||
18 | <wx/event.h> | |
19 | ||
a7af285d VZ |
20 | \wxheading{Library} |
21 | ||
22 | \helpref{wxCore}{librarieslist} | |
23 | ||
a660d684 KB |
24 | \wxheading{Event table macros} |
25 | ||
26 | To process a focus event, use these event handler macros to direct input to a member | |
27 | function that takes a wxFocusEvent argument. | |
28 | ||
29 | \twocolwidtha{7cm} | |
30 | \begin{twocollist}\itemsep=0pt | |
31 | \twocolitem{{\bf EVT\_SET\_FOCUS(func)}}{Process a wxEVT\_SET\_FOCUS event.} | |
32 | \twocolitem{{\bf EVT\_KILL\_FOCUS(func)}}{Process a wxEVT\_KILL\_FOCUS event.} | |
33 | \end{twocollist}% | |
34 | ||
35 | \wxheading{See also} | |
36 | ||
a660d684 KB |
37 | \helpref{Event handling overview}{eventhandlingoverview} |
38 | ||
39 | \latexignore{\rtfignore{\wxheading{Members}}} | |
40 | ||
35b92f05 | 41 | |
b236c10f | 42 | \membersection{wxFocusEvent::wxFocusEvent}\label{wxfocuseventctor} |
a660d684 KB |
43 | |
44 | \func{}{wxFocusEvent}{\param{WXTYPE }{eventType = 0}, \param{int }{id = 0}} | |
45 | ||
46 | Constructor. | |
47 | ||
35b92f05 VZ |
48 | |
49 | \membersection{wxFocusEvent::GetWindow}\label{wxfocuseventgetwindow} | |
50 | ||
51 | Returns the window associated with this event, that is the window which had the | |
52 | focus before for the \texttt{wxEVT\_SET\_FOCUS} event and the window which is | |
53 | going to receive focus for the \texttt{wxEVT\_KILL\_FOCUS} one. | |
54 | ||
55 | Warning: the window pointer may be \texttt{NULL}! | |
56 |