X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e01a788ee05125b4fefa01a5b11f4088915cb54e..835165d576b66441987b78519e6ef1fe74ea795a:/include/wx/filename.h?ds=inline diff --git a/include/wx/filename.h b/include/wx/filename.h index 1a6abd73eb..8f9de3bb3a 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -65,6 +65,14 @@ enum wxPathFormat wxPATH_MAX // Not a valid value for specifying path format }; +// different conventions that may be used with GetHumanReadableSize() +enum wxSizeConvention +{ + wxSIZE_CONV_TRADITIONAL, // 1024 bytes = 1 KB + wxSIZE_CONV_IEC, // 1024 bytes = 1 KiB + wxSIZE_CONV_SI // 1000 bytes = 1 KB +}; + // the kind of normalization to do with the file name: these values can be // or'd together to perform several operations at once enum wxPathNormalize @@ -540,11 +548,15 @@ public: static wxULongLong GetSize(const wxString &file); // returns the size in a human readable form - wxString GetHumanReadableSize(const wxString &nullsize = wxGetTranslation(wxT("Not available")), - int precision = 1) const; - static wxString GetHumanReadableSize(const wxULongLong &sz, - const wxString &nullsize = wxGetTranslation(wxT("Not available")), - int precision = 1); + wxString + GetHumanReadableSize(const wxString& nullsize = _("Not available"), + int precision = 1, + wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL) const; + static wxString + GetHumanReadableSize(const wxULongLong& sz, + const wxString& nullsize = _("Not available"), + int precision = 1, + wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL); #endif // wxUSE_LONGLONG