// utility classes
// ----------------------------------------------------------------------------
+wxString wxXmStringToString( const XmString& xmString );
+XmString wxStringToXmString( const wxString& string );
+XmString wxStringToXmString( const char* string );
+
// XmString made easy to use in wxWindows (and has an added benefit of
// cleaning up automatically)
class wxXmString
m_string = XmStringCreateLtoR((char *)str.c_str(),
XmSTRING_DEFAULT_CHARSET);
}
-
+
+ // just to avoid calling XmStringFree()
+ wxXmString(const XmString& string) { m_string = string; }
+
~wxXmString() { XmStringFree(m_string); }
// semi-implicit conversion to XmString (shouldn't rely on implicit
XmString m_string;
};
-wxString wxXmStringToString( const XmString& xmString );
-
// ----------------------------------------------------------------------------
// Routines used in both wxTextCtrl/wxListBox and nativa wxComboBox
// (defined in src/motif/listbox.cpp or src/motif/textctrl.cpp