Mercurial > projects > dwt-linux
diff dwt/widgets/TabItem.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 | 34409a2fc053 |
line wrap: on
line diff
--- a/dwt/widgets/TabItem.d Mon May 12 15:36:37 2008 +0200 +++ b/dwt/widgets/TabItem.d Mon May 12 19:13:01 2008 +0200 @@ -19,6 +19,7 @@ import dwt.DWT; import dwt.DWTException; import dwt.graphics.Image; +import dwt.graphics.Rectangle; import dwt.internal.gtk.OS; import dwt.widgets.Item; import dwt.widgets.Control; @@ -145,6 +146,16 @@ releaseHandle (); } +public Rectangle getBounds () { + checkWidget(); + int x = OS.GTK_WIDGET_X (handle); + int y = OS.GTK_WIDGET_Y (handle); + int width = (state & ZERO_WIDTH) !is 0 ? 0 : OS.GTK_WIDGET_WIDTH (handle); + int height = (state & ZERO_HEIGHT) !is 0 ? 0 : OS.GTK_WIDGET_HEIGHT (handle); + if ((parent.style & DWT.MIRRORED) !is 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