]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/motif/private.h
Make wxWindow::HasScrollbar() respect wxScrolled::ShowScrollbars().
[wxWidgets.git] / include / wx / motif / private.h
index 09f072e52092b794cb01d008edf47076c8d710b7..f36fd8d6dd571d00f158c9621c8f4487b5142515 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     17/09/98
-// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 #define _WX_PRIVATE_H_
 
 #include "wx/defs.h"
-#include "X11/Xlib.h"
+#include <X11/Xlib.h>
+#include <Xm/Xm.h>
 #include "wx/evtloop.h"
 
-class WXDLLEXPORT wxFont;
-class WXDLLEXPORT wxWindow;
-class WXDLLEXPORT wxSize;
-class WXDLLEXPORT wxBitmap;
-class WXDLLEXPORT wxColour;
+class WXDLLIMPEXP_FWD_CORE wxFont;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+class WXDLLIMPEXP_FWD_CORE wxSize;
+class WXDLLIMPEXP_FWD_CORE wxBitmap;
+class WXDLLIMPEXP_FWD_CORE wxColour;
 
 #include "wx/x11/privx.h"
 
@@ -43,7 +43,7 @@ class WXDLLEXPORT wxColour;
 // (non const) "char *" but many Motif functions take "char *" parameters which
 // are really "const char *" so use this macro to suppress the warnings when we
 // know it's ok
-#define wxMOTIF_STR(x) wx_const_cast(char *, x)
+#define wxMOTIF_STR(x) const_cast<char *>(x)
 
 // ----------------------------------------------------------------------------
 // Miscellaneous functions
@@ -128,8 +128,11 @@ extern XColor itemColors[5] ;
 // ----------------------------------------------------------------------------
 
 wxString wxXmStringToString( const XmString& xmString );
-XmString wxStringToXmString( const wxString& string );
 XmString wxStringToXmString( const char* string );
+inline XmString wxStringToXmString( const wxScopedCharBuffer& string )
+    { return wxStringToXmString(string.data()); }
+inline XmString wxStringToXmString( const wxString& string )
+    { return wxStringToXmString((const char*)string.mb_str()); }
 
 // XmString made easy to use in wxWidgets (and has an added benefit of
 // cleaning up automatically)
@@ -137,7 +140,11 @@ class wxXmString
 {
     void Init(const char *str)
     {
-        m_string = XmStringCreateLtoR((char *)str, XmSTRING_DEFAULT_CHARSET);
+        m_string = XmStringCreateLtoR
+                   (
+                    const_cast<char *>(str),
+                    const_cast<char *>(XmSTRING_DEFAULT_CHARSET)
+                   );
     }
 
 public:
@@ -146,6 +153,11 @@ public:
         Init(str);
     }
 
+    wxXmString(const wchar_t* str)
+    {
+        Init(wxConvLibc.cWC2MB(str));
+    }
+
     wxXmString(const wxString& str)
     {
         Init(str.mb_str());