X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/551fe9528a2c08886a48a8e13234a4f2228f7b4c..472eec8a0391538e4dcf7f7c6c4f4d44c8383616:/include/wx/motif/private.h diff --git a/include/wx/motif/private.h b/include/wx/motif/private.h index c19974fbe4..3301bbfc39 100644 --- a/include/wx/motif/private.h +++ b/include/wx/motif/private.h @@ -14,12 +14,13 @@ #include "wx/defs.h" #include "X11/Xlib.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" @@ -106,6 +107,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 @@ -124,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 wxCharBuffer& 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) @@ -142,6 +149,11 @@ public: Init(str); } + wxXmString(const wchar_t* str) + { + Init(wxConvLibc.cWC2MB(str)); + } + wxXmString(const wxString& str) { Init(str.mb_str()); @@ -182,11 +194,9 @@ wxSize wxDoGetSingleTextCtrlBestSize( Widget textWidget, // event-related functions // ---------------------------------------------------------------------------- -class wxEventLoop; - // executes one main loop iteration (implemented in src/motif/evtloop.cpp) // returns true if the loop should be exited -bool wxDoEventLoopIteration( wxEventLoop& evtLoop ); +bool wxDoEventLoopIteration( wxGUIEventLoop& evtLoop ); // Consume all events until no more left void wxFlushEvents(WXDisplay* display);