X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cf63f3d3ae66075641094ab03328403c7d6e74df..68ca12fef650ce4622e05ba4eb21a7aa23849107:/src/motif/utils.cpp diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index 1f5d60838a..595e14696a 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 // ---------------------------------------------------------------------------- @@ -194,18 +205,6 @@ void wxDisplaySizeMM(int *width, int *height) *height = DisplayHeightMM(dpy, DefaultScreen (dpy)); } -void wxClientDisplayRect(int *x, int *y, int *width, int *height) -{ - // This is supposed to return desktop dimensions minus any window - // manager panels, menus, taskbars, etc. If there is a way to do that - // for this platform please fix this function, otherwise it defaults - // to the entire desktop. - if (x) *x = 0; - if (y) *y = 0; - wxDisplaySize(width, height); -} - - // Configurable display in wxX11 and wxMotif static WXDisplay *gs_currentDisplay = NULL; static wxString gs_displayName; @@ -524,6 +523,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 +542,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 +589,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); @@ -639,7 +639,7 @@ WXWidget wxCreateBorderWidget( WXWidget parent, long style ) NULL ); } - else if (style & wxSUNKEN_BORDER) + else if ((style & wxSUNKEN_BORDER) || (style & wxBORDER_THEME)) { borderWidget = XtVaCreateManagedWidget (