aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Lam2011-11-25 12:11:14 (EST)
committerFelipe Heidrich2011-12-05 10:26:21 (EST)
commit0748aaad9afe20d4a1e568e8b6bdd9eacd347409 (patch)
treeca02dabb4d956cbe9b7bac211a72a20de4782b9c
parent092a2269ca277410b54736129c2ad6cee19fe1eb (diff)
downloadeclipse.platform.swt-0748aaad9afe20d4a1e568e8b6bdd9eacd347409.zip
eclipse.platform.swt-0748aaad9afe20d4a1e568e8b6bdd9eacd347409.tar.gz
eclipse.platform.swt-0748aaad9afe20d4a1e568e8b6bdd9eacd347409.tar.bz2
Define non-glass regions through Shell#setData.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/common/org/eclipse/swt/SWT.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Shell.java10
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 c2ba5fe..4db18b2 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 2035677..b3353ff 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];