Mercurial > projects > dwt-linux
diff dwt/widgets/Dialog.d @ 240:ce446666f5a2
Update to SWT 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 12 May 2008 19:13:01 +0200 |
parents | 380bad9f6852 |
children | 5a30aa9820f3 |
line wrap: on
line diff
--- a/dwt/widgets/Dialog.d Mon May 12 15:36:37 2008 +0200 +++ b/dwt/widgets/Dialog.d Mon May 12 19:13:01 2008 +0200 @@ -19,6 +19,7 @@ import dwt.DWTException; import dwt.widgets.Shell; import dwt.widgets.Display; +import dwt.widgets.Widget; /** * This class is the abstract superclass of the classes @@ -171,6 +172,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.