X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eb6fa4b4257897e4e9655b05e4105e8b47f67476..3aabb24c0881db85a8f2c6b4dd6691b717577307:/src/motif/utils.cpp diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index c43fe3189b..44cf0a4c56 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -40,6 +40,8 @@ #include "wx/unix/execute.h" #include +#include + #include "wx/motif/private.h" #if wxUSE_RESOURCES @@ -1211,3 +1213,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; +}