X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5266f345907f3e283169b8603c04653f0e8393f4..e91e1e3d5cab263883c1cee1689c898b8f7c4ecd:/include/wx/accel.h?ds=sidebyside diff --git a/include/wx/accel.h b/include/wx/accel.h index ca2d8dfb0e..5226b8b35a 100644 --- a/include/wx/accel.h +++ b/include/wx/accel.h @@ -4,7 +4,6 @@ // Author: Julian Smart, Robert Roebling, Vadim Zeitlin // Modified by: // Created: 31.05.01 (extracted from other files) -// RCS-ID: $Id$ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -118,7 +117,12 @@ public: // returns a wxString for the this accelerator. // this function formats it using the - format // where maybe a hyphen-separated list of "shift|alt|ctrl" - wxString ToString() const; + wxString ToString() const { return AsPossiblyLocalizedString(true); } + + // same as above but without translating, useful if the string is meant to + // be stored in a file or otherwise stored, instead of being shown to the + // user + wxString ToRawString() const { return AsPossiblyLocalizedString(false); } // returns true if the given string correctly initialized this object // (i.e. if IsOk() returns true after this call) @@ -126,6 +130,8 @@ public: private: + wxString AsPossiblyLocalizedString(bool localized) const; + // common part of Create() and FromString() static bool ParseAccel(const wxString& str, int *flags, int *keycode);