if ((parent.style & SWT.VERTICAL) != 0) { return new Rectangle (rect.top, rect.left, height, width); }
public Rectangle getBounds () {	checkWidget ();	int index = parent.indexOf (this);	if (index == -1) return new Rectangle (0, 0, 0, 0);	int hwnd = parent.handle;	RECT rect = new RECT ();	OS.SendMessage (hwnd, OS.RB_GETRECT, index, rect);	if (OS.COMCTL32_MAJOR >= 6) {		MARGINS margins = new MARGINS ();		OS.SendMessage (hwnd, OS.RB_GETBANDMARGINS, 0, margins);		rect.left -= margins.cxLeftWidth;		rect.right += margins.cxRightWidth;	}	if (!parent.isLastItemOfRow (index)) {		rect.right += (parent.style & SWT.FLAT) == 0 ? CoolBar.SEPARATOR_WIDTH : 0;	}	int width = rect.right - rect.left;	int height = rect.bottom - rect.top;	return new Rectangle (rect.left, rect.top, width, height);}