X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf63f3d3ae66075641094ab03328403c7d6e74df..858a3a7a456d362339752e320bb2e8a50610dfdc:/src/motif/utils.cpp diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index 1f5d60838a..73bbf916ea 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -34,6 +34,7 @@ #include "wx/apptrait.h" #include "wx/evtloop.h" +#include "wx/motif/private/timer.h" #include @@ -135,6 +136,16 @@ wxPortId wxGUIAppTraits::GetToolkitVersion(int *verMaj, int *verMin) const return wxPORT_MOTIF; } +wxEventLoopBase* wxGUIAppTraits::CreateEventLoop() +{ + return new wxEventLoop; +} + +wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer* timer) +{ + return new wxMotifTimerImpl(timer); +} + // ---------------------------------------------------------------------------- // display info // ---------------------------------------------------------------------------- @@ -524,6 +535,9 @@ XmString wxFindAcceleratorText (const char *s) // Change a widget's foreground and background colours. void wxDoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour) { + if (!foregroundColour.Ok()) + return; + // When should we specify the foreground, if it's calculated // by wxComputeColours? // Solution: say we start with the default (computed) foreground colour. @@ -540,6 +554,9 @@ void wxDoChangeForegroundColour(WXWidget widget, wxColour& foregroundColour) void wxDoChangeBackgroundColour(WXWidget widget, const wxColour& backgroundColour, bool changeArmColour) { + if (!backgroundColour.Ok()) + return; + wxComputeColours (XtDisplay((Widget) widget), & backgroundColour, (wxColour*) NULL); @@ -584,11 +601,6 @@ wxString wxXmStringToString( const XmString& xmString ) return wxEmptyString; } -XmString wxStringToXmString( const wxString& str ) -{ - return wxStringToXmString(str.mb_str()); -} - XmString wxStringToXmString( const char* str ) { return XmStringCreateLtoR((char *)str, XmSTRING_DEFAULT_CHARSET);