Mercurial > projects > dwt-mac
comparison dwt/widgets/CoolBar.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | 1a8b3cb347e0 |
children | a3f5118c8b37 |
comparison
equal
deleted
inserted
replaced
44:ca5e494f2bbf | 45:d8635bb48c7c |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2006 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 * |
41 * </p><p> | 41 * </p><p> |
42 * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. | 42 * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. |
43 * </p><p> | 43 * </p><p> |
44 * IMPORTANT: This class is <em>not</em> intended to be subclassed. | 44 * IMPORTANT: This class is <em>not</em> intended to be subclassed. |
45 * </p> | 45 * </p> |
46 * | |
47 * @see <a href="http://www.eclipse.org/swt/snippets/#coolbar">CoolBar snippets</a> | |
48 * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a> | |
49 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> | |
46 */ | 50 */ |
47 public class CoolBar : Composite { | 51 public class CoolBar : Composite { |
48 CoolItem[][] items = new CoolItem[0][0]; | 52 CoolItem[][] items = new CoolItem[0][0]; |
49 CoolItem[] originalItems = new CoolItem[0]; | 53 CoolItem[] originalItems = new CoolItem[0]; |
50 Cursor hoverCursor, dragCursor, cursor; | 54 Cursor hoverCursor, dragCursor, cursor; |
891 if ((style & DWT.VERTICAL) !is 0) { | 895 if ((style & DWT.VERTICAL) !is 0) { |
892 Rectangle trim = computeTrim (0, 0, height, 0); | 896 Rectangle trim = computeTrim (0, 0, height, 0); |
893 if (height !is size.x) super.setSize(trim.width, size.y); | 897 if (height !is size.x) super.setSize(trim.width, size.y); |
894 } else { | 898 } else { |
895 Rectangle trim = computeTrim (0, 0, 0, height); | 899 Rectangle trim = computeTrim (0, 0, 0, height); |
896 if (height !is size.y) super.setSize(size.x, trim.height); | 900 if (height !is size.y) super.setSize(size.x, trim.height); |
897 } | 901 } |
898 } | 902 } |
899 /** | 903 /** |
900 * Returns an array of zero-relative ints that map | 904 * Returns an array of zero-relative ints that map |
901 * the creation order of the receiver's items to the | 905 * the creation order of the receiver's items to the |