wxMBConv derived classes and instances.
Added wxConv_gdk (wrapper for gdk_mbstowcs and gdk_wcstombs, which use X calls instead of libc calls), which should probably not be used, but is now there for completeness, and in case it's useful after all. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -200,15 +200,29 @@ class WXDLLEXPORT wxMBConv
|
|||||||
const wxWCharBuffer cWX2WC(const char *psz) const { return cMB2WC(psz); }
|
const wxWCharBuffer cWX2WC(const char *psz) const { return cMB2WC(psz); }
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
WXDLLEXPORT_DATA(extern wxMBConv) wxConv_libc, wxConv_UTF7, wxConv_UTF8;
|
WXDLLEXPORT_DATA(extern wxMBConv) wxConv_libc;
|
||||||
#define wxConv_file wxConv_libc
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxCSConv : wxMBConv
|
#define wxANOTHER_MBCONV(type) \
|
||||||
|
class type : 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 wxANOTHER_MBCONV(wxMBConv_file)) wxConv_file;
|
||||||
|
WXDLLEXPORT_DATA(extern wxANOTHER_MBCONV(wxMBConv_UTF7)) wxConv_UTF7;
|
||||||
|
WXDLLEXPORT_DATA(extern wxANOTHER_MBCONV(wxMBConv_UTF8)) wxConv_UTF8;
|
||||||
|
#ifdef __WXGTK__
|
||||||
|
WXDLLEXPORT_DATA(extern wxANOTHER_MBCONV(wxMBConv_gdk)) wxConv_gdk;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxCSConv : public wxMBConv
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
wxChar *data;
|
wxChar *data;
|
||||||
public:
|
public:
|
||||||
wxCSConv(const wxChar *charset);
|
wxCSConv(const wxChar *charset);
|
||||||
|
virtual ~wxCSConv(void);
|
||||||
virtual size_t MB2WC(wchar_t *buf, const char *psz, size_t n) const;
|
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;
|
virtual size_t WC2MB(char *buf, const wchar_t *psz, size_t n) const;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user