]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/menuevt.tex
Applied patch [ 1042241 ] Fixes print setup problem (MSW UNICODE build)
[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.
23
24\twocolwidtha{7cm}
25\begin{twocollist}\itemsep=0pt
26\twocolitem{{\bf EVT\_MENU\_OPEN(func)}}{A menu is about to be opened. On Windows,
27this is only sent once for each navigation of the menubar (up until all menus have closed).}
28\twocolitem{{\bf EVT\_MENU\_CLOSE(func)}}{A menu has been just closed.}
29\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT(id, func)}}{The menu item with the
30specified id has been highlighted: used to show help prompts in the status bar
31by \helpref{wxFrame}{wxframe}}
32\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT\_ALL(func)}}{A menu item has been
33highlighted, i.e. the currently selected menu item has changed.}
34\end{twocollist}
35
36\wxheading{See also}
37
38\helpref{Command events}{wxcommandevent},\\
39\helpref{Event handling overview}{eventhandlingoverview}
40
41\latexignore{\rtfignore{\wxheading{Members}}}
42
43
44\membersection{wxMenuEvent::wxMenuEvent}\label{wxmenueventctor}
45
46\func{}{wxMenuEvent}{\param{WXTYPE }{id = 0}, \param{int }{id = 0}, \param{wxDC* }{dc = NULL}}
47
48Constructor.
49
50
51\membersection{wxMenuEvent::m\_menuId}\label{wxmenueventmmenuid}
52
53\member{int}{m\_menuId}
54
55The relevant menu identifier.
56
57
58\membersection{wxMenuEvent::GetMenu}\label{wxmenueventgetmenu}
59
60\constfunc{wxMenu *}{GetMenu}{\void}
61
62Returns the menu which is being opened or closed. This method should be only
63used with the \texttt{OPEN} and \texttt{CLOSE} events.
64
65
66\membersection{wxMenuEvent::GetMenuId}\label{wxmenueventgetmenuid}
67
68\constfunc{int}{GetMenuId}{\void}
69
70Returns the menu identifier associated with the event. This method should be
71only used with the {\tt HIGHLIGHT} events.
72
73
74\membersection{wxMenuEvent::IsPopup}\label{wxmenueventispopup}
75
76\constfunc{bool}{IsPopup}{\void}
77
78Returns {\tt true} if the menu which is being opened or closed is a popup menu,
79{\tt false} if it is a normal one.
80
81This method should be only used with the {\tt OPEN} and {\tt CLOSE} events.
82
83