]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/helpevt.tex
remove C++ comment
[wxWidgets.git] / docs / latex / wx / helpevt.tex
1 \section{\class{wxHelpEvent}}\label{wxhelpevent}
2
3 A help event is sent when the user has requested context-sensitive help.
4 This can either be caused by the application requesting
5 context-sensitive help mode via \helpref{wxContextHelp}{wxcontexthelp}, or
6 (on MS Windows) by the system generating a WM\_HELP message when the user pressed F1 or clicked
7 on the query button in a dialog caption.
8
9 A help event is sent to the window that the user clicked on, and is propagated up the
10 window hierarchy until the event is processed or there are no more event handlers.
11 The application should call wxEvent::GetId to check the identity of the clicked-on window,
12 and then either show some suitable help or call wxEvent::Skip if the identifier is unrecognised.
13 Calling Skip is important because it allows wxWidgets to generate further events for ancestors
14 of the clicked-on window. Otherwise it would be impossible to show help for container windows,
15 since processing would stop after the first window found.
16
17 \wxheading{Derived from}
18
19 \helpref{wxCommandEvent}{wxcommandevent}\\
20 \helpref{wxEvent}{wxevent}\\
21 \helpref{wxObject}{wxobject}
22
23 \wxheading{Include files}
24
25 <wx/event.h>
26
27 \wxheading{Library}
28
29 \helpref{wxCore}{librarieslist}
30
31 \wxheading{Event table macros}
32
33 To process an activate event, use these event handler macros to direct input to a member
34 function that takes a wxHelpEvent argument.
35
36 \twocolwidtha{7cm}
37 \begin{twocollist}\itemsep=0pt
38 \twocolitem{{\bf EVT\_HELP(id, func)}}{Process a wxEVT\_HELP event.}
39 \twocolitem{{\bf EVT\_HELP\_RANGE(id1, id2, func)}}{Process a wxEVT\_HELP event for a range of ids.}
40 \end{twocollist}%
41
42 \wxheading{See also}
43
44 \helpref{wxContextHelp}{wxcontexthelp},\rtfsp
45 \helpref{wxDialog}{wxdialog},\rtfsp
46 \helpref{Event handling overview}{eventhandlingoverview}
47
48 \latexignore{\rtfignore{\wxheading{Members}}}
49
50 \membersection{wxHelpEvent::wxHelpEvent}\label{wxhelpeventctor}
51
52 \func{}{wxHelpEvent}{\param{WXTYPE }{eventType = 0}, \param{wxWindowID }{id = 0},
53 \param{const wxPoint\& }{point}}
54
55 Constructor.
56
57 \membersection{wxHelpEvent::GetOrigin}\label{wxhelpeventgetorigin}
58
59 \constfunc{wxHelpEvent::Origin }{GetOrigin}{\void}
60
61 Returns the origin of the help event which is one of the following values:
62
63 \twocolwidtha{7cm}
64 \begin{twocollist}\itemsep=0pt
65 \twocolitem{{\bf Origin\_Unknown}}{Unrecognized event source.}
66 \twocolitem{{\bf Origin\_Keyboard}}{Event generated by \texttt{F1} key press.}
67 \twocolitem{{\bf Origin\_HelpButton}}{Event generated by
68 \helpref{wxContextHelp}{wxcontexthelp} or using the "?" title bur button under
69 MS Windows.}
70 \end{twocollist}
71
72 The application may handle events generated using the keyboard or mouse
73 differently, e.g. by using \helpref{wxGetMousePosition()}{wxgetmouseposition}
74 for the mouse events.
75
76 \wxheading{See also}
77
78 \helpref{wxHelpEvent::SetOrigin}{wxhelpeventsetorigin}
79
80
81 \membersection{wxHelpEvent::GetPosition}\label{wxhelpeventgetposition}
82
83 \constfunc{const wxPoint\&}{GetPosition}{\void}
84
85 Returns the left-click position of the mouse, in screen coordinates. This allows
86 the application to position the help appropriately.
87
88 \membersection{wxHelpEvent::SetOrigin}\label{wxhelpeventsetorigin}
89
90 \func{void}{SetOrigin}{\param{wxHelpEvent::Origin }{origin}}
91
92 Set the help event origin, only used internally by wxWidgets normally.
93
94 \wxheading{See also}
95
96 \helpref{wxHelpEvent::GetOrigin}{wxhelpeventgetorigin}
97
98
99 \membersection{wxHelpEvent::SetPosition}\label{wxhelpeventsetposition}
100
101 \func{void}{SetPosition}{\param{const wxPoint\&}{ pt}}
102
103 Sets the left-click position of the mouse, in screen coordinates.
104