X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d156af3247c862e51a7c62f569a3fd302052a42..43c42c18d36c703a88b1b7b697bac27fe5608eca:/include/wx/accel.h?ds=sidebyside diff --git a/include/wx/accel.h b/include/wx/accel.h index ca2d8dfb0e..562b257d92 100644 --- a/include/wx/accel.h +++ b/include/wx/accel.h @@ -118,7 +118,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 +131,8 @@ public: private: + wxString AsPossiblyLocalizedString(bool localized) const; + // common part of Create() and FromString() static bool ParseAccel(const wxString& str, int *flags, int *keycode);