diff options
| author | Raymond Lam | 2011-11-25 17:11:14 +0000 |
|---|---|---|
| committer | Felipe Heidrich | 2011-12-05 15:26:21 +0000 |
| commit | 0748aaad9afe20d4a1e568e8b6bdd9eacd347409 (patch) | |
| tree | ca02dabb4d956cbe9b7bac211a72a20de4782b9c | |
| parent | 092a2269ca277410b54736129c2ad6cee19fe1eb (diff) | |
| download | eclipse.platform.swt-0748aaad9afe20d4a1e568e8b6bdd9eacd347409.tar.gz eclipse.platform.swt-0748aaad9afe20d4a1e568e8b6bdd9eacd347409.tar.xz eclipse.platform.swt-0748aaad9afe20d4a1e568e8b6bdd9eacd347409.zip | |
Define non-glass regions through Shell#setData.
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java | 8 | ||||
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java index c2ba5fe5d9..4db18b262e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java @@ -4072,6 +4072,14 @@ public class SWT { */ public static final String SKIN_ID = "org.eclipse.swt.skin.id"; + /** + * Key value for setting and getting the MARGINS that define the area of the glass region on a Shell. + * + * @see org.eclipse.swt.widgets.Widget#getData(String) + * @see org.eclipse.swt.widgets.Widget#setData(String, Object) + * + */ + public static final String GLASS_MARGINS = "GlassMargins"; //$NON-NLS-1$ /** * Answers a concise, human readable description of the error code. diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java index 2035677330..b3353ffa66 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java @@ -646,6 +646,16 @@ void createHandle () { } } +public void setData (String key, Object value) { + super.setData(key, value); + if (key.equals(SWT.GLASS_MARGINS)) { + Object marginData = getData(SWT.GLASS_MARGINS); + if (marginData != null && marginData instanceof MARGINS) { + OS.DwmExtendFrameIntoClientArea (handle, (MARGINS) marginData); + } + } +} + void createToolTip (ToolTip toolTip) { int id = 0; if (toolTips == null) toolTips = new ToolTip [4]; |
