X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a015b8917bd71878cbf096b3c09f4faad3e3856..82008f15b709fd4544468aec286663be1b24fc69:/include/wx/motif/private.h diff --git a/include/wx/motif/private.h b/include/wx/motif/private.h index 4f87d491ee..8bee9f9bf7 100644 --- a/include/wx/motif/private.h +++ b/include/wx/motif/private.h @@ -106,6 +106,9 @@ extern void wxGetTextExtent(WXDisplay* display, const wxFont& font, double scale, const wxString& string, int* width, int* height, int* ascent, int* descent); +extern void wxGetTextExtent(const wxWindow* window, const wxString& str, + int* width, int* height, + int* ascent, int* descent); #define wxNO_COLORS 0x00 #define wxBACK_COLORS 0x01 @@ -131,16 +134,25 @@ XmString wxStringToXmString( const char* string ); // cleaning up automatically) class wxXmString { + void Init(const char *str) + { + m_string = XmStringCreateLtoR((char *)str, XmSTRING_DEFAULT_CHARSET); + } + public: wxXmString(const char* str) { - m_string = XmStringCreateLtoR((char *)str, XmSTRING_DEFAULT_CHARSET); + Init(str); } wxXmString(const wxString& str) { - m_string = XmStringCreateLtoR((char *)str.mb_str(), - XmSTRING_DEFAULT_CHARSET); + Init(str.mb_str()); + } + + wxXmString(const wxCStrData& str) + { + Init(str); } // just to avoid calling XmStringFree()