1 \section{\class{wxMenuEvent
}}\label{wxmenuevent
}
3 This class is used for a variety of menu-related events. Note that
4 these do not include menu command events, which are
5 handled using
\helpref{wxCommandEvent
}{wxcommandevent
} objects.
7 The handler
\helpref{wxFrame::OnMenuHighlight
}{wxframeonmenuhighlight
} displays help
8 text in the first field of the status bar.
10 \wxheading{Derived from
}
12 \helpref{wxEvent
}{wxevent
}\\
13 \helpref{wxObject
}{wxobject
}
15 \wxheading{Include files
}
19 \wxheading{Event table macros
}
21 To process a menu event, use these event handler macros to direct input to member
22 functions that take a wxMenuEvent argument.
25 \begin{twocollist
}\itemsep=
0pt
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
29 speicifed id has been highlighted: used to show help prompts in the status bar
30 by
\helpref{wxFrame
}{wxframe
}}
31 \twocolitem{{\bf EVT
\_MENU\_HIGHLIGHT\_ALL(func)
}}{A menu item has been
32 highlighted, i.e. the currently selected menu item has changed.
}
37 \helpref{Command events
}{wxcommandevent
},\\
38 \helpref{Event handling overview
}{eventhandlingoverview
}
40 \latexignore{\rtfignore{\wxheading{Members
}}}
42 \membersection{wxMenuEvent::wxMenuEvent
}
44 \func{}{wxMenuEvent
}{\param{WXTYPE
}{id =
0},
\param{int
}{id =
0},
\param{wxDC*
}{dc = NULL
}}
48 \membersection{wxMenuEvent::m
\_menuId}
50 \member{int
}{m
\_menuId}
52 The relevant menu identifier.
54 \membersection{wxMenuEvent::GetMenuId
}\label{wxmenueventgetmenuid
}
56 \constfunc{int
}{GetMenuId
}{\void}
58 Returns the menu identifier associated with the event. This method should be
59 only used with the
{\tt HIGHLIGHT
} events.
61 \membersection{wxMenuEvent::IsPopup
}\label{wxmenueventispopup
}
63 \constfunc{bool
}{IsPopup
}{\void}
65 Returns
{\tt TRUE
} if the menu which is being opened or closed is a popup menu,
66 {\tt FALSE
} if it is a normal one.
68 This method should be only used with the
{\tt OPEN
} and
{\tt CLOSE
} events.