diff dwt/widgets/Dialog.d @ 213:36f5cb12e1a2

Update to SWT 3.4M7
author Frank Benoit <benoit@tionex.de>
date Sat, 17 May 2008 17:34:28 +0200
parents ab60f3309436
children 43b41c7fe84a
line wrap: on
line diff
--- a/dwt/widgets/Dialog.d	Mon May 05 00:12:38 2008 +0200
+++ b/dwt/widgets/Dialog.d	Sat May 17 17:34:28 2008 +0200
@@ -17,6 +17,7 @@
 import dwt.DWTException;
 import dwt.widgets.Shell;
 import dwt.widgets.Display;
+import dwt.widgets.Widget;
 import dwt.dwthelper.utils;
 
 /**
@@ -170,6 +171,20 @@
     parent.checkWidget ();
 }
 
+static int checkStyle (Shell parent, int style) {
+    if ((style & (DWT.PRIMARY_MODAL | DWT.APPLICATION_MODAL | DWT.SYSTEM_MODAL)) is 0) {
+        style |= DWT.APPLICATION_MODAL;
+    }
+    style &= ~DWT.MIRRORED;
+    if ((style & (DWT.LEFT_TO_RIGHT | DWT.RIGHT_TO_LEFT)) is 0) {
+        if (parent !is null) {
+            if ((parent.style & DWT.LEFT_TO_RIGHT) !is 0) style |= DWT.LEFT_TO_RIGHT;
+            if ((parent.style & DWT.RIGHT_TO_LEFT) !is 0) style |= DWT.RIGHT_TO_LEFT;
+        }
+    }
+    return Widget.checkBits (style, DWT.LEFT_TO_RIGHT, DWT.RIGHT_TO_LEFT, 0, 0, 0, 0);
+}
+
 /**
  * Does whatever dialog specific cleanup is required, and then
  * uses the code in <code>DWTError.error</code> to handle the error.