\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
+\wxheading{Include files}
+
+<wx/menu.h>
+
\wxheading{Event handling}
If the menu is part of a menubar, then \helpref{wxMenuBar}{wxmenubar} event processing is used.
\docparam{func}{A callback function if the menu is used as a popup using \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}.}
+\pythonnote{The wxPython version of the \tt{wxMenu} constructor
+doesn't accept the callback argument because of reference counting
+issues. There is a specialized wxMenu constructor called
+\tt{wxPyMenu} which does and can be used for PopupMenus when callbacks
+are needed. You must retain a reference to the menu while useing it
+otherwise your callback function will get dereferenced when the menu
+does.
+}
+
\membersection{wxMenu::\destruct{wxMenu}}
\func{}{\destruct{wxMenu}}{\void}
\helpref{wxMenu::AppendSeparator}{wxmenuappendseparator}, \helpref{wxMenu::SetLabel}{wxmenusetlabel}, \helpref{wxMenu::GetHelpString}{wxmenugethelpstring},\rtfsp
\helpref{wxMenu::SetHelpString}{wxmenusethelpstring}, \helpref{wxMenuItem}{wxmenuitem}
+
+\pythonnote{In place of a single overloaded method name, wxPython
+implements the following methods:\par
+\indented{2cm}{\begin{twocollist}
+\twocolitem{\bf{Append(id, string, helpStr="", checkable=FALSE)}}{}
+\twocolitem{\bf{AppendMenu(id, string, aMenu, helpStr="")}}{}
+\twocolitem{\bf{AppendItem(aMenuItem)}}{}
+\end{twocollist}}
+}
+
+
\membersection{wxMenu::AppendSeparator}\label{wxmenuappendseparator}
\func{void}{AppendSeparator}{\void}
\membersection{wxMenu::FindItemForId}\label{wxmenufinditemforid}
-\constfunc{wxMenuItem*}{FindItemForId}{\param{int}{ id}}
+\constfunc{wxMenuItem*}{FindItemForId}{\param{int}{ id}, \param{wxMenu **}{ menuForItem = NULL}}
Finds the menu item object associated with the given menu item identifier.
\wxheading{Parameters}
\docparam{id}{Menu item identifier.}
+\docparam{menuForItem}{will be filled with the menu for this item if not NULL.}
\wxheading{Return value}
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}
+\wxheading{Include files}
+
+<wx/menu.h>
+
\wxheading{Event handling}
To respond to a menu selection, provide a handler for EVT\_MENU, in the frame
-that contains the menu bar.
+that contains the menu bar. If you have a toolbar which uses the same identifiers
+as your EVT\_MENU entries, events from the toolbar will also be processed by your
+EVT\_MENU event handlers.
+
+Note that menu commands (and UI update events for menus) are first sent to
+the focus window within the frame. If no window within the frame has the focus,
+then the events are sent directly to the frame. This allows command and UI update
+handling to be processed by specific windows and controls, and not necessarily
+by the application frame.
\wxheading{See also}
\docparam{titles}{An array of title strings. Deallocate this array after creating the menu bar.}
+\pythonnote{Only the default constructor is supported in wxPython.
+Use wxMenuBar.Append instead.}
+
+
\membersection{wxMenuBar::\destruct{wxMenuBar}}
\func{void}{\destruct{wxMenuBar}}{\void}
Any special menu codes are stripped out of source and target strings
before matching.
-\membersection{wxMenuBar::FindItemById}\label{wxmenubarfinditembyid}
+\membersection{wxMenuBar::FindItemForId}\label{wxmenubarfinditemforid}
-\constfunc{wxMenuItem *}{FindItemById}{\param{int}{ id}}
+\constfunc{wxMenuItem *}{FindItemForId}{\param{int}{ id}}
Finds the menu item object associated with the given menu item identifier,