]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/menuevt.tex
mention Watcom makefile for wxBase
[wxWidgets.git] / docs / latex / wx / menuevt.tex
CommitLineData
a660d684
KB
1\section{\class{wxMenuEvent}}\label{wxmenuevent}
2
3This class is used for a variety of menu-related events. Note that
f4fcc291
JS
4these do not include menu command events, which are
5handled using \helpref{wxCommandEvent}{wxcommandevent} objects.
6
7The handler \helpref{wxFrame::OnMenuHighlight}{wxframeonmenuhighlight} displays help
8text in the first field of the status bar.
a660d684
KB
9
10\wxheading{Derived from}
11
12\helpref{wxEvent}{wxevent}\\
13\helpref{wxObject}{wxobject}
14
954b8ae6
JS
15\wxheading{Include files}
16
17<wx/event.h>
18
a660d684
KB
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.
23
24\twocolwidtha{7cm}
25\begin{twocollist}\itemsep=0pt
ccef86c7
VZ
26\twocolitem{{\bf EVT\_MENU\_OPEN(func)}}{A menu is about to be opened.}
27\twocolitem{{\bf EVT\_MENU\_CLOSE(func)}}{A menu has been just closed.}
28\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT(id, func)}}{The menu item with the
2edb0bde 29specified id has been highlighted: used to show help prompts in the status bar
ccef86c7
VZ
30by \helpref{wxFrame}{wxframe}}
31\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT\_ALL(func)}}{A menu item has been
32highlighted, i.e. the currently selected menu item has changed.}
a660d684
KB
33\end{twocollist}%
34
35\wxheading{See also}
36
ccef86c7
VZ
37\helpref{Command events}{wxcommandevent},\\
38\helpref{Event handling overview}{eventhandlingoverview}
a660d684
KB
39
40\latexignore{\rtfignore{\wxheading{Members}}}
41
42\membersection{wxMenuEvent::wxMenuEvent}
43
44\func{}{wxMenuEvent}{\param{WXTYPE }{id = 0}, \param{int }{id = 0}, \param{wxDC* }{dc = NULL}}
45
46Constructor.
47
48\membersection{wxMenuEvent::m\_menuId}
49
50\member{int}{m\_menuId}
51
52The relevant menu identifier.
53
54\membersection{wxMenuEvent::GetMenuId}\label{wxmenueventgetmenuid}
55
56\constfunc{int}{GetMenuId}{\void}
57
ccef86c7
VZ
58Returns the menu identifier associated with the event. This method should be
59only used with the {\tt HIGHLIGHT} events.
60
61\membersection{wxMenuEvent::IsPopup}\label{wxmenueventispopup}
62
63\constfunc{bool}{IsPopup}{\void}
64
cc81d32f
VS
65Returns {\tt true} if the menu which is being opened or closed is a popup menu,
66{\tt false} if it is a normal one.
ccef86c7
VZ
67
68This method should be only used with the {\tt OPEN} and {\tt CLOSE} events.
69
a660d684 70