Mercurial > projects > dwt-linux
diff dwt/widgets/TabFolder.d @ 240:ce446666f5a2
Update to SWT 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 12 May 2008 19:13:01 +0200 |
parents | 08789b28bdf3 |
children | 5a30aa9820f3 |
line wrap: on
line diff
--- a/dwt/widgets/TabFolder.d Mon May 12 15:36:37 2008 +0200 +++ b/dwt/widgets/TabFolder.d Mon May 12 19:13:01 2008 +0200 @@ -298,7 +298,7 @@ } override GtkWidget* eventHandle () { - return fixedHandle; + return handle; } /** @@ -327,6 +327,21 @@ return items [index]; } +public TabItem getItem(Point point) { + checkWidget(); + if (point is null) error (DWT.ERROR_NULL_ARGUMENT); + auto list = OS.gtk_container_get_children (handle); + if (list is null) return null; + int itemCount = OS.g_list_length (list); + OS.g_list_free (list); + for (int i = 0; i < itemCount; i++) { + TabItem item = items[i]; + Rectangle rect = item.getBounds(); + if (rect.contains(point)) return item; + } + return null; +} + /** * Returns the number of items contained in the receiver. *