X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b8de493fbdba4c710a66f2e8aad290ce78550fc4..dbdb39b2d0b8c3359eab1693fd1fc786499f62d7:/docs/latex/wx/menu.tex?ds=sidebyside diff --git a/docs/latex/wx/menu.tex b/docs/latex/wx/menu.tex index c39660ccbf..5862f357da 100644 --- a/docs/latex/wx/menu.tex +++ b/docs/latex/wx/menu.tex @@ -12,6 +12,10 @@ identify the selection, or to change the menu item in some way. \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + \wxheading{Event handling} If the menu is part of a menubar, then \helpref{wxMenuBar}{wxmenubar} event processing is used. @@ -53,6 +57,13 @@ Constructs a wxMenu object. Destructor, destroying the menu. +Note: under Motif, a popup menu must have a valid parent (the window +it was last popped up on) when being destroyed. Therefore, make sure +you delete or re-use the popup menu {\it before} destroying the +parent window. Re-use in this context means popping up the menu on +a different window from last time, which causes an implicit destruction +and recreation of internal data structures. + \membersection{wxMenu::Append}\label{wxmenuappend} \func{void}{Append}{\param{int}{ id}, \param{const wxString\& }{ item}, \param{const wxString\& }{helpString = ""},\rtfsp @@ -323,6 +334,18 @@ This is relevant only to popup menus. \helpref{wxMenu::SetTitle}{wxmenusettitle} +\membersection{wxMenu::UpdateUI}\label{wxmenuupdateui} + +\constfunc{void}{UpdateUI}{\param{wxEvtHandler*}{ source = NULL}} + +Sends events to {\it source} (or owning window if NULL) to update the +menu UI. This is called just before the menu is popped up with \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}, but +the application may call it at other times if required. + +\wxheading{See also} + +\helpref{wxUpdateUIEvent}{wxupdateuievent} + \section{\class{wxMenuBar}}\label{wxmenubar} A menu bar is a series of menus accessible from the top of a frame. @@ -332,6 +355,10 @@ A menu bar is a series of menus accessible from the top of a frame. \helpref{wxEvtHandler}{wxevthandler}\\ \helpref{wxObject}{wxobject} +\wxheading{Include files} + + + \wxheading{Event handling} To respond to a menu selection, provide a handler for EVT\_MENU, in the frame @@ -525,6 +552,18 @@ Use only after the menubar has been associated with a frame. \helpref{wxMenuBar::SetLabelTop}{wxmenubarsetlabeltop} +\membersection{wxMenuBar::GetMenu}\label{wxmenubargetmenu} + +\constfunc{wxMenu*}{GetMenu}{\param{int}{ menuIndex}} + +Returns the menu at {\it menuIndex} (zero-based). + +\membersection{wxMenuBar::GetMenuCount}\label{wxmenubargetmenucount} + +\constfunc{int}{GetMenuCount}{\void} + +Returns the number of menus in this menubar. + \membersection{wxMenuBar::IsChecked}\label{wxmenubarischecked} \constfunc{bool}{IsChecked}{\param{int}{ id}}