]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/string.h
tooltips in controls in dialogs actually work now
[wxWidgets.git] / include / wx / string.h
index 9ffc9d1a04dcae43d09b5b32ef2b09f0121b33d0..d4fdb53bed6c30b349d0ff9555fac77627f277d5 100644 (file)
@@ -212,18 +212,21 @@ class type : public wxMBConv { \
 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
+#if defined(__WXGTK__) && (GTK_MINOR_VERSION > 0)
+    WXDLLEXPORT_DATA(extern wxANOTHER_MBCONV(wxMBConv_gdk)) wxConv_gdk;
+#endif // GTK > 1.0
 
 class wxCharacterSet;
 class WXDLLEXPORT wxCSConv : public wxMBConv
 {
  private:
-  wxCharacterSet *cset;
+  wxChar *m_name;
+  wxCharacterSet *m_cset;
+  bool m_deferred;
  public:
   wxCSConv(const wxChar *charset);
-  virtual ~wxCSConv(void);
+  virtual ~wxCSConv();
+  void LoadNow();
   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;
 };
@@ -359,6 +362,9 @@ public:
     // from C string (for compilers using unsigned char)
   wxString(const unsigned char* psz, size_t nLength = wxSTRING_MAXLEN)
     { InitWith((const char*)psz, 0, nLength); }
+    // from multibyte string
+  wxString(const char *psz, wxMBConv& WXUNUSED(conv), size_t nLength = wxSTRING_MAXLEN)
+    { InitWith(psz, 0, nLength); }
     // from wide (Unicode) string
   wxString(const wchar_t *pwz);
     // from wxCharBuffer
@@ -996,6 +1002,17 @@ wxString WXDLLEXPORT operator+(const wxString& string, wxChar ch);
 wxString WXDLLEXPORT operator+(wxChar ch, const wxString& string);
 wxString WXDLLEXPORT operator+(const wxString& string, const wxChar *psz);
 wxString WXDLLEXPORT operator+(const wxChar *psz, const wxString& string);
+#if wxUSE_UNICODE
+inline wxString WXDLLEXPORT operator+(const wxString& string, const wxWCharBuffer& buf)
+{ return string + (const wchar_t *)buf; }
+inline wxString WXDLLEXPORT operator+(const wxWCharBuffer& buf, const wxString& string)
+{ return (const wchar_t *)buf + string; }
+#else
+inline wxString WXDLLEXPORT operator+(const wxString& string, const wxCharBuffer& buf)
+{ return string + (const char *)buf; }
+inline wxString WXDLLEXPORT operator+(const wxCharBuffer& buf, const wxString& string)
+{ return (const char *)buf + string; }
+#endif
 
 // ---------------------------------------------------------------------------
 // Implementation only from here until the end of file