]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/utils.cpp
finding papersizes allows for 1 mm tolerance
[wxWidgets.git] / src / motif / utils.cpp
index c43fe3189b5573b097002ad572f2f80ed9259287..44cf0a4c56e3437e7a7634e5c0dc141c9bd5e0c2 100644 (file)
@@ -40,6 +40,8 @@
 #include "wx/unix/execute.h"
 
 #include <Xm/Xm.h>
+#include <Xm/Frame.h>
+
 #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;
+}