]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/menuevt.tex
no changes, just come cleanup and more comments
[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
684761db 7The default handler for wxEVT\_MENU\_HIGHLIGHT displays help
f4fcc291 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
a7af285d
VZ
19\wxheading{Library}
20
21\helpref{wxCore}{librarieslist}
22
a660d684
KB
23\wxheading{Event table macros}
24
25To process a menu event, use these event handler macros to direct input to member
5cb1ae8b
JS
26functions that take a wxMenuEvent argument. They can only be processed by
27a menubar's frame.
a660d684
KB
28
29\twocolwidtha{7cm}
30\begin{twocollist}\itemsep=0pt
2f930c85
JS
31\twocolitem{{\bf EVT\_MENU\_OPEN(func)}}{A menu is about to be opened. On Windows,
32this is only sent once for each navigation of the menubar (up until all menus have closed).}
ccef86c7
VZ
33\twocolitem{{\bf EVT\_MENU\_CLOSE(func)}}{A menu has been just closed.}
34\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT(id, func)}}{The menu item with the
2edb0bde 35specified id has been highlighted: used to show help prompts in the status bar
ccef86c7
VZ
36by \helpref{wxFrame}{wxframe}}
37\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT\_ALL(func)}}{A menu item has been
38highlighted, i.e. the currently selected menu item has changed.}
d2c2afc9 39\end{twocollist}
a660d684
KB
40
41\wxheading{See also}
42
ccef86c7
VZ
43\helpref{Command events}{wxcommandevent},\\
44\helpref{Event handling overview}{eventhandlingoverview}
a660d684
KB
45
46\latexignore{\rtfignore{\wxheading{Members}}}
47
71c749e1 48
dcbd177f 49\membersection{wxMenuEvent::wxMenuEvent}\label{wxmenueventctor}
a660d684 50
f6e9a818 51\func{}{wxMenuEvent}{\param{WXTYPE }{id = 0}, \param{int }{id = 0}, \param{wxMenu* }{menu = NULL}}
a660d684
KB
52
53Constructor.
54
71c749e1 55
71c749e1
VZ
56\membersection{wxMenuEvent::GetMenu}\label{wxmenueventgetmenu}
57
58\constfunc{wxMenu *}{GetMenu}{\void}
59
3980000c 60Returns the menu which is being opened or closed. This method should only be
6f86c8af
VZ
61used with the \texttt{OPEN} and \texttt{CLOSE} events and even for them the
62returned pointer may be \NULL in some ports.
71c749e1
VZ
63
64
a660d684
KB
65\membersection{wxMenuEvent::GetMenuId}\label{wxmenueventgetmenuid}
66
67\constfunc{int}{GetMenuId}{\void}
68
ccef86c7
VZ
69Returns the menu identifier associated with the event. This method should be
70only used with the {\tt HIGHLIGHT} events.
71
71c749e1 72
ccef86c7
VZ
73\membersection{wxMenuEvent::IsPopup}\label{wxmenueventispopup}
74
75\constfunc{bool}{IsPopup}{\void}
76
cc81d32f
VS
77Returns {\tt true} if the menu which is being opened or closed is a popup menu,
78{\tt false} if it is a normal one.
ccef86c7 79
3980000c 80This method should only be used with the {\tt OPEN} and {\tt CLOSE} events.
ccef86c7 81
a660d684 82