X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb6fa4b4257897e4e9655b05e4105e8b47f67476..a1a816f8ccbcdd119aa17bcdcd7094d6bf1ceee0:/src/motif/utils.cpp?ds=sidebyside diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index c43fe3189b..01c0719c0c 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -22,6 +22,7 @@ #endif #include "wx/setup.h" #include "wx/utils.h" +#include "wx/apptrait.h" #include "wx/app.h" #include "wx/dcmemory.h" #include "wx/bitmap.h" @@ -40,6 +41,8 @@ #include "wx/unix/execute.h" #include +#include + #include "wx/motif/private.h" #if wxUSE_RESOURCES @@ -130,7 +133,7 @@ void wxBell() XBell (wxGlobalDisplay(), 0); } -int wxGetOsVersion(int *majorVsn, int *minorVsn) +int wxGUIAppTraits::GetOSVersion(int *majorVsn, int *minorVsn) { // FIXME TODO // This code is WRONG!! Does NOT return the @@ -1211,3 +1214,46 @@ wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, wxColour& colour) return newBitmap; } + +// ---------------------------------------------------------------------------- +// Miscellaneous functions +// ---------------------------------------------------------------------------- + +WXWidget wxCreateBorderWidget( WXWidget parent, long style ) +{ + Widget borderWidget = (Widget)NULL, parentWidget = (Widget)parent; + + if (style & wxSIMPLE_BORDER) + { + borderWidget = XtVaCreateManagedWidget + ( + "simpleBorder", + xmFrameWidgetClass, parentWidget, + XmNshadowType, XmSHADOW_ETCHED_IN, + XmNshadowThickness, 1, + NULL + ); + } + else if (style & wxSUNKEN_BORDER) + { + borderWidget = XtVaCreateManagedWidget + ( + "sunkenBorder", + xmFrameWidgetClass, parentWidget, + XmNshadowType, XmSHADOW_IN, + NULL + ); + } + else if (style & wxRAISED_BORDER) + { + borderWidget = XtVaCreateManagedWidget + ( + "raisedBorder", + xmFrameWidgetClass, parentWidget, + XmNshadowType, XmSHADOW_OUT, + NULL + ); + } + + return borderWidget; +}