comparison dwt/widgets/TabItem.d @ 259:c0d810de7093

Update SWT 3.4M7 to 3.4
author Frank Benoit <benoit@tionex.de>
date Sun, 29 Jun 2008 14:33:38 +0200
parents 5a30aa9820f3
children
comparison
equal deleted inserted replaced
257:cc1d3de0e80b 259:c0d810de7093
1 /******************************************************************************* 1 /*******************************************************************************
2 * Copyright (c) 2000, 2007 IBM Corporation and others. 2 * Copyright (c) 2000, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
36 * <dd>(none)</dd> 36 * <dd>(none)</dd>
37 * </dl> 37 * </dl>
38 * <p> 38 * <p>
39 * IMPORTANT: This class is <em>not</em> intended to be subclassed. 39 * IMPORTANT: This class is <em>not</em> intended to be subclassed.
40 * </p> 40 * </p>
41 *
42 * @see <a href="http://www.eclipse.org/swt/snippets/#tabfolder">TabFolder, TabItem snippets</a>
43 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
41 */ 44 */
42 public class TabItem : Item { 45 public class TabItem : Item {
43 46
44 alias Item.setForegroundColor setForegroundColor; 47 alias Item.setForegroundColor setForegroundColor;
45 48
142 override void destroyWidget () { 145 override void destroyWidget () {
143 parent.destroyItem (this); 146 parent.destroyItem (this);
144 releaseHandle (); 147 releaseHandle ();
145 } 148 }
146 149
150 /**
151 * Returns a rectangle describing the receiver's size and location
152 * relative to its parent.
153 *
154 * @return the receiver's bounding rectangle
155 *
156 * @exception DWTException <ul>
157 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
158 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
159 * </ul>
160 *
161 * @since 3.4
162 */
147 public Rectangle getBounds () { 163 public Rectangle getBounds () {
148 checkWidget(); 164 checkWidget();
149 int x = OS.GTK_WIDGET_X (handle); 165 int x = OS.GTK_WIDGET_X (handle);
150 int y = OS.GTK_WIDGET_Y (handle); 166 int y = OS.GTK_WIDGET_Y (handle);
151 int width = (state & ZERO_WIDTH) !is 0 ? 0 : OS.GTK_WIDGET_WIDTH (handle); 167 int width = (state & ZERO_WIDTH) !is 0 ? 0 : OS.GTK_WIDGET_WIDTH (handle);