- IMPLEMENT_DYNAMIC_CLASS(wxMenu, wxEvtHandler)
- IMPLEMENT_DYNAMIC_CLASS(wxMenuBar, wxEvtHandler)
-
-// ----------------------------------------------------------------------------
-// static function for translating menu labels
-// ----------------------------------------------------------------------------
-
-static wxString TextToLabel(
- const wxString& rsTitle
-)
-{
- wxString sTitle = "";
- const wxChar* zPc;
-
- if (rsTitle.IsEmpty())
- return sTitle;
- for (zPc = rsTitle.c_str(); *zPc != wxT('\0'); zPc++ )
- {
- if (*zPc == wxT('&') )
- {
- if (*(zPc + 1) == wxT('&'))
- {
- zPc++;
- sTitle << wxT('&');
- }
- else
- sTitle << wxT('~');
- }
- else
- {
- if ( *zPc == wxT('~') )
- {
- //
- // Tildes must be doubled to prevent them from being
- // interpreted as accelerator character prefix by PM ???
- //
- sTitle << *zPc;
- }
- sTitle << *zPc;
- }
- }
- return sTitle;
-} // end of TextToLabel
-