1. wxMenuBar::FindMenu() made "const"

2. documented it
3. documented recent change to wxYield()


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6206 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2000-02-22 10:17:32 +00:00
parent e5131165b0
commit 270e8b6a37
4 changed files with 19 additions and 4 deletions

View File

@ -1831,8 +1831,8 @@ See also \helpref{wxGetResource}{wxgetresource}, \helpref{wxConfigBase}{wxconfig
Yields control to pending messages in the windowing system. This can be useful, for example, when a
time-consuming process writes to a text window. Without an occasional
yield, the text window will not be updated properly, and (since Windows
multitasking is cooperative) other processes will not respond.
yield, the text window will not be updated properly, and on systems with
cooperative multitasking, such as Windows 3.1 other processes will not respond.
Caution should be exercised, however, since yielding may allow the
user to perform actions which are not compatible with the current task.
@ -1840,6 +1840,12 @@ Disabling menu items or whole menus during processing can avoid unwanted
reentrance of code: see \helpref{::wxSafeYield}{wxsafeyield} for a better
function.
Note that wxYield will not flush the message logs. This is intentional as
calling wxYield is usually done to quickly update the screen and popping up a
message box dialog may be undesirable. If you do with to flush the log
messages immediately (otherwise it will be done during the next idle loop
iteration), call \helpref{wxLog::FlushActive}{wxlogflushactive}.
\wxheading{Include files}
<wx/app.h> or <wx/utils.h>

View File

@ -584,6 +584,15 @@ Enables or disables a whole menu.
Only use this when the menu bar has been
associated with a frame.
\membersection{wxMenuBar::FindMenu}\label{wxmenubarfindmenu}
\constfunc{int}{FindMenu}{\param{const wxString\& }{title}}
Returns the index of the menu with the given {\it title} or wxNOT\_FOUND if no
such menu exists in this menubar. The {\it title} parameter may specify either
the menu title (with accelerator characters, i.e. {\tt "\&File"}) or just the
menu label ({\tt "File"}) indifferently.
\membersection{wxMenuBar::FindMenuItem}\label{wxmenubarfindmenuitem}
\constfunc{int}{FindMenuItem}{\param{const wxString\& }{menuString}, \param{const wxString\& }{itemString}}

View File

@ -298,7 +298,7 @@ public:
virtual wxMenuItem* FindItem(int id, wxMenu **menu = NULL) const = 0;
// find menu by its caption, return wxNOT_FOUND on failure
int FindMenu(const wxString& title);
int FindMenu(const wxString& title) const;
// item access
// -----------

View File

@ -544,7 +544,7 @@ wxMenu *wxMenuBarBase::Remove(size_t pos)
return menu;
}
int wxMenuBarBase::FindMenu(const wxString& title)
int wxMenuBarBase::FindMenu(const wxString& title) const
{
wxString label = wxMenuItem::GetLabelFromText(title);