X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e702ff0f08a54622a6b0f1e2ec39537b082c3a8e..519cb848a8f4c91c73421bb75314754284e593a4:/docs/latex/wx/menu.tex diff --git a/docs/latex/wx/menu.tex b/docs/latex/wx/menu.tex index ebaf7fb1a4..8846d7579b 100644 --- a/docs/latex/wx/menu.tex +++ b/docs/latex/wx/menu.tex @@ -41,7 +41,8 @@ this window. \membersection{wxMenu::wxMenu}\label{wxmenuconstr} -\func{}{wxMenu}{\param{const wxString\& }{title = ""}, \param{const wxFunction}{ func = NULL}} +\func{}{wxMenu}{\param{const wxString\& }{title = ""}, + \param{const wxFunction}{ func = NULL}, \param{long}{ style = 0}} Constructs a wxMenu object. @@ -51,15 +52,25 @@ Constructs a wxMenu object. \docparam{func}{A callback function if the menu is used as a popup using \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}.} +\docparam{style}{If set to \tt{wxMENU_TEAROFF}, the menu will be detachable.} + \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 +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. } +\func{}{wxMenu}{\param{long}{ style}} + +Constructs a wxMenu object. + +\wxheading{Parameters} + +\docparam{style}{If set to \tt{wxMENU_TEAROFF}, the menu will be detachable.} + \membersection{wxMenu::\destruct{wxMenu}} \func{}{\destruct{wxMenu}}{\void} @@ -117,7 +128,6 @@ creation of a menu or menubar. \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} @@ -127,7 +137,6 @@ implements the following methods:\par \end{twocollist}} } - \membersection{wxMenu::AppendSeparator}\label{wxmenuappendseparator} \func{void}{AppendSeparator}{\void} @@ -160,6 +169,24 @@ Checks or unchecks the menu item. \helpref{wxMenu::IsChecked}{wxmenuischecked} +\membersection{wxMenu::Delete}\label{wxmenudelete} + +\func{void}{Delete}{\param{int }{id}} + +Deletes the menu item from the menu. + +\wxheading{Parameters} + +\docparam{id}{Menu item to be deleted.} + +\wxheading{Remarks} + +Does not delete a sub menu, if any. + +\wxheading{See also} + +\helpref{wxMenu::FindItemForId}{wxmenufinditemforid} + \membersection{wxMenu::Enable}\label{wxmenuenable} \func{void}{Enable}{\param{int}{ id}, \param{const bool}{ enable}} @@ -188,7 +215,7 @@ Finds the menu item id for a menu item string. \wxheading{Return value} -Menu item identifier, or -1 if none is found. +Menu item identifier, or wxNOT_FOUND if none is found. \wxheading{Remarks} @@ -199,16 +226,17 @@ before matching. \helpref{wxMenu::FindItemForId}{wxmenufinditemforid} -\membersection{wxMenu::FindItemForId}\label{wxmenufinditem} +\membersection{wxMenu::FindItemForId}\label{wxmenufinditemforid} -\constfunc{wxMenuItem*}{FindItemForId}{\param{int}{ id}, \param{wxMenu **}{ menuForItem = NULL}} +\constfunc{wxMenuItem*}{FindItemForId}{\param{int}{ id}} + +\constfunc{wxMenuItem*}{FindItem}{\param{int}{ id}} 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} @@ -421,7 +449,6 @@ menu bar.} \pythonnote{Only the default constructor is supported in wxPython. Use wxMenuBar.Append instead.} - \membersection{wxMenuBar::\destruct{wxMenuBar}} \func{void}{\destruct{wxMenuBar}}{\void} @@ -505,23 +532,25 @@ Finds the menu item id for a menu name/menu item string pair. \wxheading{Return value} -The menu item identifier, or -1 if none was found. +The menu item identifier, or wxNOT_FOUND if none was found. \wxheading{Remarks} Any special menu codes are stripped out of source and target strings before matching. -\membersection{wxMenuBar::FindItemForId}\label{wxmenubarfinditemforid} +\membersection{wxMenuBar::FindItem}\label{wxmenubarfinditem} -\constfunc{wxMenuItem *}{FindItemForId}{\param{int}{ id}} +\constfunc{wxMenuItem *}{FindItem}{\param{int}{ id}, \param{wxMenu}{ **menu = NULL}} -Finds the menu item object associated with the given menu item identifier, +Finds the menu item object associated with the given menu item identifier. \wxheading{Parameters} \docparam{id}{Menu item identifier.} +\docparam{menu}{If not NULL, menu will get set to the associated menu.} + \wxheading{Return value} The found menu item object, or NULL if one was not found. @@ -625,6 +654,12 @@ Determines whether an item is enabled. TRUE if the item was found and is enabled, FALSE otherwise. +\membersection{wxMenuBar::Refresh}\label{wxmenubarrefresh} + +\func{void}{Refresh}{\void} + +Redraw the menu bar + \membersection{wxMenuBar::SetHelpString}\label{wxmenubarsethelpstring} \func{void}{SetHelpString}{\param{int}{ id}, \param{const wxString\& }{helpString}}