Added wxString::FromAscii() wxString::ToAscii().
Removed wxConvFile, made it a define wxConvLocal. Exchanged some wxConvLibc to wxConvLocal calls. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -58,19 +58,6 @@ public:
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxMBConv) wxConvLibc;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMBConvFile (for conversion to filenames)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxMBConvFile : public wxMBConv
|
||||
{
|
||||
public:
|
||||
virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const;
|
||||
virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const;
|
||||
};
|
||||
|
||||
WXDLLEXPORT_DATA(extern wxMBConvFile) wxConvFile;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxMBConvUTF7 (for conversion using UTF7 encoding)
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -146,6 +133,7 @@ private:
|
||||
bool m_deferred;
|
||||
};
|
||||
|
||||
#define wxConvFile wxConvLocal
|
||||
WXDLLEXPORT_DATA(extern wxCSConv) wxConvLocal;
|
||||
WXDLLEXPORT_DATA(extern wxMBConv *) wxConvCurrent;
|
||||
|
||||
|
@@ -480,6 +480,18 @@ public:
|
||||
// identical to c_str()
|
||||
const wxChar* GetData() const { return m_pchData; }
|
||||
|
||||
// conversion to plain ascii: this is usefull for
|
||||
// converting numbers or strings which are certain
|
||||
// not to contain special chars (typically system
|
||||
// functions, X atoms, environment variables etc.)
|
||||
#if wxUSE_UNICODE
|
||||
static wxString FromAscii( char *ascii );
|
||||
const wxCharBuffer ToAscii() const;
|
||||
#else
|
||||
static wxString FromAscii( char *ascii ) { return wxString( ascii ); }
|
||||
const char *ToAscii() const { return m_pchData; }
|
||||
#endif
|
||||
|
||||
// conversions with (possible) format convertions: have to return a
|
||||
// buffer with temporary data
|
||||
//
|
||||
|
Reference in New Issue
Block a user