]> git.saurik.com Git - wxWidgets.git/blobdiff - docs/latex/wx/menu.tex
Minor doc & distrib file changes
[wxWidgets.git] / docs / latex / wx / menu.tex
index 4b670d93acbc27ed42cf44b3b55fce31f32fe264..136021b3ed695bda829d7bbe0bef7070fc735d51 100644 (file)
@@ -41,7 +41,8 @@ this window.
 
 \membersection{wxMenu::wxMenu}\label{wxmenuconstr}
 
 
 \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.
 
 
 Constructs a wxMenu object.
 
@@ -51,6 +52,8 @@ Constructs a wxMenu object.
 
 \docparam{func}{A callback function if the menu is used as a popup using \helpref{wxWindow::PopupMenu}{wxwindowpopupmenu}.}
 
 
 \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
 \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
@@ -60,6 +63,13 @@ otherwise your callback function will get dereferenced when the menu
 does.
 }
 
 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}
 \membersection{wxMenu::\destruct{wxMenu}}
 
 \func{}{\destruct{wxMenu}}{\void}
@@ -201,13 +211,14 @@ before matching.
 
 \membersection{wxMenu::FindItemForId}\label{wxmenufinditemforid}
 
 
 \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.}
 
 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}
 
 
 \wxheading{Return value}
 
@@ -382,7 +393,15 @@ A menu bar is a series of menus accessible from the top of a frame.
 \wxheading{Event handling}
 
 To respond to a menu selection, provide a handler for EVT\_MENU, in the frame
 \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}
 
 
 \wxheading{See also}
 
@@ -503,9 +522,9 @@ The menu item identifier, or -1 if none was found.
 Any special menu codes are stripped out of source and target strings
 before matching.
 
 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,
 
 
 Finds the menu item object associated with the given menu item identifier,
 
@@ -672,3 +691,8 @@ Use only after the menubar has been associated with a frame.
 
 \helpref{wxMenuBar::GetLabelTop}{wxmenubargetlabeltop}
 
 
 \helpref{wxMenuBar::GetLabelTop}{wxmenubargetlabeltop}
 
+
+%%% Local Variables: 
+%%% mode: latex
+%%% TeX-master: t
+%%% End: