]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/menuevt.tex
rename UpdatePulse() to Pulse() (forgot to commit with the rest of the changes)
[wxWidgets.git] / docs / latex / wx / menuevt.tex
... / ...
CommitLineData
1\section{\class{wxMenuEvent}}\label{wxmenuevent}
2
3This class is used for a variety of menu-related events. Note that
4these do not include menu command events, which are
5handled using \helpref{wxCommandEvent}{wxcommandevent} objects.
6
7The default handler for wxEVT\_MENU\_HIGHLIGHT displays help
8text in the first field of the status bar.
9
10\wxheading{Derived from}
11
12\helpref{wxEvent}{wxevent}\\
13\helpref{wxObject}{wxobject}
14
15\wxheading{Include files}
16
17<wx/event.h>
18
19\wxheading{Event table macros}
20
21To process a menu event, use these event handler macros to direct input to member
22functions that take a wxMenuEvent argument. They can only be processed by
23a menubar's frame.
24
25\twocolwidtha{7cm}
26\begin{twocollist}\itemsep=0pt
27\twocolitem{{\bf EVT\_MENU\_OPEN(func)}}{A menu is about to be opened. On Windows,
28this is only sent once for each navigation of the menubar (up until all menus have closed).}
29\twocolitem{{\bf EVT\_MENU\_CLOSE(func)}}{A menu has been just closed.}
30\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT(id, func)}}{The menu item with the
31specified id has been highlighted: used to show help prompts in the status bar
32by \helpref{wxFrame}{wxframe}}
33\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT\_ALL(func)}}{A menu item has been
34highlighted, i.e. the currently selected menu item has changed.}
35\end{twocollist}
36
37\wxheading{See also}
38
39\helpref{Command events}{wxcommandevent},\\
40\helpref{Event handling overview}{eventhandlingoverview}
41
42\latexignore{\rtfignore{\wxheading{Members}}}
43
44
45\membersection{wxMenuEvent::wxMenuEvent}\label{wxmenueventctor}
46
47\func{}{wxMenuEvent}{\param{WXTYPE }{id = 0}, \param{int }{id = 0}, \param{wxMenu* }{menu = NULL}}
48
49Constructor.
50
51
52\membersection{wxMenuEvent::GetMenu}\label{wxmenueventgetmenu}
53
54\constfunc{wxMenu *}{GetMenu}{\void}
55
56Returns the menu which is being opened or closed. This method should only be
57used with the \texttt{OPEN} and \texttt{CLOSE} events and even for them the
58returned pointer may be \NULL in some ports.
59
60
61\membersection{wxMenuEvent::GetMenuId}\label{wxmenueventgetmenuid}
62
63\constfunc{int}{GetMenuId}{\void}
64
65Returns the menu identifier associated with the event. This method should be
66only used with the {\tt HIGHLIGHT} events.
67
68
69\membersection{wxMenuEvent::IsPopup}\label{wxmenueventispopup}
70
71\constfunc{bool}{IsPopup}{\void}
72
73Returns {\tt true} if the menu which is being opened or closed is a popup menu,
74{\tt false} if it is a normal one.
75
76This method should only be used with the {\tt OPEN} and {\tt CLOSE} events.
77
78