X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7d27b6263c7400185e74f76870c68e5886de583f..12b5f4b4d2d8a07962da7ba3b78c8c1ec2634a67:/src/common/ctrlcmn.cpp diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp index b9e57a8eec..8cb01a3adb 100644 --- a/src/common/ctrlcmn.cpp +++ b/src/common/ctrlcmn.cpp @@ -29,6 +29,7 @@ #include "wx/control.h" #ifndef WX_PRECOMP + #include "wx/dc.h" #include "wx/log.h" #include "wx/radiobut.h" #include "wx/statbmp.h" @@ -158,6 +159,14 @@ wxString wxControlBase::RemoveMnemonics(const wxString& str) return wxStripMenuCodes(str, wxStrip_Mnemonics); } +/* static */ +wxString wxControlBase::EscapeMnemonics(const wxString& text) +{ + wxString label(text); + label.Replace("&", "&&"); + return label; +} + /* static */ int wxControlBase::FindAccelIndex(const wxString& label, wxString *labelOnly) { @@ -369,9 +378,9 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc, } } - // this return would generate a + // this return would generate a // warning C4702: unreachable code - // with MSVC since the function always exits from inside the loop + // with MSVC since the function always exits from inside the loop //return ret; }