1998-05-20 14:25:30 +00:00
|
|
|
\section{\class{wxMenuEvent}}\label{wxmenuevent}
|
|
|
|
|
|
|
|
This class is used for a variety of menu-related events. Note that
|
2002-04-08 16:46:27 +00:00
|
|
|
these do not include menu command events, which are
|
|
|
|
handled using \helpref{wxCommandEvent}{wxcommandevent} objects.
|
|
|
|
|
2003-08-15 16:17:40 +00:00
|
|
|
The default handler for wxEVT\_MENU\_HIGHLIGHT displays help
|
2002-04-08 16:46:27 +00:00
|
|
|
text in the first field of the status bar.
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxEvent}{wxevent}\\
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 20:41:29 +00:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/event.h>
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\wxheading{Event table macros}
|
|
|
|
|
|
|
|
To process a menu event, use these event handler macros to direct input to member
|
|
|
|
functions that take a wxMenuEvent argument.
|
|
|
|
|
|
|
|
\twocolwidtha{7cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
2003-04-28 10:37:08 +00:00
|
|
|
\twocolitem{{\bf EVT\_MENU\_OPEN(func)}}{A menu is about to be opened. On Windows,
|
|
|
|
this is only sent once for each navigation of the menubar (up until all menus have closed).}
|
2002-02-23 23:16:32 +00:00
|
|
|
\twocolitem{{\bf EVT\_MENU\_CLOSE(func)}}{A menu has been just closed.}
|
|
|
|
\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT(id, func)}}{The menu item with the
|
2002-06-07 20:15:28 +00:00
|
|
|
specified id has been highlighted: used to show help prompts in the status bar
|
2002-02-23 23:16:32 +00:00
|
|
|
by \helpref{wxFrame}{wxframe}}
|
|
|
|
\twocolitem{{\bf EVT\_MENU\_HIGHLIGHT\_ALL(func)}}{A menu item has been
|
|
|
|
highlighted, i.e. the currently selected menu item has changed.}
|
2004-02-22 01:16:32 +00:00
|
|
|
\end{twocollist}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
2002-02-23 23:16:32 +00:00
|
|
|
\helpref{Command events}{wxcommandevent},\\
|
|
|
|
\helpref{Event handling overview}{eventhandlingoverview}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
2004-09-18 09:53:20 +00:00
|
|
|
|
2004-09-28 11:54:59 +00:00
|
|
|
\membersection{wxMenuEvent::wxMenuEvent}\label{wxmenueventctor}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\func{}{wxMenuEvent}{\param{WXTYPE }{id = 0}, \param{int }{id = 0}, \param{wxDC* }{dc = NULL}}
|
|
|
|
|
|
|
|
Constructor.
|
|
|
|
|
2004-09-18 09:53:20 +00:00
|
|
|
|
2004-09-28 11:54:59 +00:00
|
|
|
\membersection{wxMenuEvent::m\_menuId}\label{wxmenueventmmenuid}
|
1998-05-20 14:25:30 +00:00
|
|
|
|
|
|
|
\member{int}{m\_menuId}
|
|
|
|
|
|
|
|
The relevant menu identifier.
|
|
|
|
|
2004-09-18 09:53:20 +00:00
|
|
|
|
|
|
|
\membersection{wxMenuEvent::GetMenu}\label{wxmenueventgetmenu}
|
|
|
|
|
|
|
|
\constfunc{wxMenu *}{GetMenu}{\void}
|
|
|
|
|
2004-12-11 21:33:17 +00:00
|
|
|
Returns the menu which is being opened or closed. This method should only be
|
2004-09-18 09:53:20 +00:00
|
|
|
used with the \texttt{OPEN} and \texttt{CLOSE} events.
|
|
|
|
|
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
\membersection{wxMenuEvent::GetMenuId}\label{wxmenueventgetmenuid}
|
|
|
|
|
|
|
|
\constfunc{int}{GetMenuId}{\void}
|
|
|
|
|
2002-02-23 23:16:32 +00:00
|
|
|
Returns the menu identifier associated with the event. This method should be
|
|
|
|
only used with the {\tt HIGHLIGHT} events.
|
|
|
|
|
2004-09-18 09:53:20 +00:00
|
|
|
|
2002-02-23 23:16:32 +00:00
|
|
|
\membersection{wxMenuEvent::IsPopup}\label{wxmenueventispopup}
|
|
|
|
|
|
|
|
\constfunc{bool}{IsPopup}{\void}
|
|
|
|
|
2003-01-18 00:16:34 +00:00
|
|
|
Returns {\tt true} if the menu which is being opened or closed is a popup menu,
|
|
|
|
{\tt false} if it is a normal one.
|
2002-02-23 23:16:32 +00:00
|
|
|
|
2004-12-11 21:33:17 +00:00
|
|
|
This method should only be used with the {\tt OPEN} and {\tt CLOSE} events.
|
2002-02-23 23:16:32 +00:00
|
|
|
|
1998-05-20 14:25:30 +00:00
|
|
|
|