diff options
author | Steve Northover <steve> | 2005-02-24 16:42:16 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2005-02-24 16:42:16 +0000 |
commit | 77a66a4de6f7c290a1a58a9930d8b1f1c24acc79 (patch) | |
tree | 8047b562b7c1e2fac5bae407d96d2c13183876d2 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java | |
parent | 16783300301f2fdc3ddf4b30c55e2c7e64a03227 (diff) | |
download | eclipse.platform.swt-77a66a4de6f7c290a1a58a9930d8b1f1c24acc79.tar.gz eclipse.platform.swt-77a66a4de6f7c290a1a58a9930d8b1f1c24acc79.tar.xz eclipse.platform.swt-77a66a4de6f7c290a1a58a9930d8b1f1c24acc79.zip |
38436 (not yet implemented on Mac)
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java index 2a1d1e2ef9..0d9ce77e7b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java @@ -304,6 +304,18 @@ int /*long*/ getAccelGroup () { return shell.menuBar == menu ? shell.accelGroup : 0; } +/*public*/ Rectangle getBounds () { + checkWidget(); + if (!OS.GTK_WIDGET_MAPPED (handle)) { + return new Rectangle (0, 0, 0, 0); + } + int x = OS.GTK_WIDGET_X (handle); + int y = OS.GTK_WIDGET_Y (handle); + int width = OS.GTK_WIDGET_WIDTH (handle); + int height = OS.GTK_WIDGET_HEIGHT (handle); + return new Rectangle (x, y, width, height); +} + /** * Returns <code>true</code> if the receiver is enabled, and * <code>false</code> otherwise. A disabled control is typically |