comparison 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
comparison
equal deleted inserted replaced
239:06a1f6829310 240:ce446666f5a2
17 17
18 18
19 import dwt.DWT; 19 import dwt.DWT;
20 import dwt.DWTException; 20 import dwt.DWTException;
21 import dwt.graphics.Image; 21 import dwt.graphics.Image;
22 import dwt.graphics.Rectangle;
22 import dwt.internal.gtk.OS; 23 import dwt.internal.gtk.OS;
23 import dwt.widgets.Item; 24 import dwt.widgets.Item;
24 import dwt.widgets.Control; 25 import dwt.widgets.Control;
25 import dwt.widgets.TabFolder; 26 import dwt.widgets.TabFolder;
26 import dwt.widgets.ImageList; 27 import dwt.widgets.ImageList;
141 } 142 }
142 143
143 override void destroyWidget () { 144 override void destroyWidget () {
144 parent.destroyItem (this); 145 parent.destroyItem (this);
145 releaseHandle (); 146 releaseHandle ();
147 }
148
149 public Rectangle getBounds () {
150 checkWidget();
151 int x = OS.GTK_WIDGET_X (handle);
152 int y = OS.GTK_WIDGET_Y (handle);
153 int width = (state & ZERO_WIDTH) !is 0 ? 0 : OS.GTK_WIDGET_WIDTH (handle);
154 int height = (state & ZERO_HEIGHT) !is 0 ? 0 : OS.GTK_WIDGET_HEIGHT (handle);
155 if ((parent.style & DWT.MIRRORED) !is 0) x = parent.getClientWidth () - width - x;
156 return new Rectangle (x, y, width, height);
146 } 157 }
147 158
148 /** 159 /**
149 * Returns the control that is used to fill the client area of 160 * Returns the control that is used to fill the client area of
150 * the tab folder when the user selects the tab item. If no 161 * the tab folder when the user selects the tab item. If no