summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
diff options
context:
space:
mode:
authorDuong Nguyen <dnguyen>2008-03-18 20:13:42 +0000
committerDuong Nguyen <dnguyen>2008-03-18 20:13:42 +0000
commitea04a7d63092f986d9ef13e1176bbf20948aaf63 (patch)
tree7bc2ccae2df982df515c12181df8d567bbcba32d /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
parent4a4417034b51467d72ce679e22104a8c745bac30 (diff)
downloadeclipse.platform.swt-ea04a7d63092f986d9ef13e1176bbf20948aaf63.tar.gz
eclipse.platform.swt-ea04a7d63092f986d9ef13e1176bbf20948aaf63.tar.xz
eclipse.platform.swt-ea04a7d63092f986d9ef13e1176bbf20948aaf63.zip
Bug 222120 - DND - how to detect which tab item is involved in a DropTargetEvent
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
index cb28b71f8b..f58b340c50 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TabItem.java
@@ -131,6 +131,16 @@ void destroyWidget () {
releaseHandle ();
}
+public Rectangle getBounds () {
+ checkWidget();
+ int x = OS.GTK_WIDGET_X (handle);
+ int y = OS.GTK_WIDGET_Y (handle);
+ int width = (state & ZERO_WIDTH) != 0 ? 0 : OS.GTK_WIDGET_WIDTH (handle);
+ int height = (state & ZERO_HEIGHT) != 0 ? 0 : OS.GTK_WIDGET_HEIGHT (handle);
+ if ((parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - width - x;
+ return new Rectangle (x, y, width, height);
+}
+
/**
* Returns the control that is used to fill the client area of
* the tab folder when the user selects the tab item. If no