Mercurial > projects > dwt-mac
comparison dwt/widgets/Decorations.d @ 21:fdbd69a5f101
Ported dwt.widgets.Decorations
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sun, 07 Sep 2008 22:09:59 +0200 |
parents | 1a8b3cb347e0 |
children | c6edc6e9bd0d |
comparison
equal
deleted
inserted
replaced
20:453387bb0706 | 21:fdbd69a5f101 |
---|---|
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 * |
8 * Contributors: | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * | |
11 * Port to the D programming language: | |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | |
10 *******************************************************************************/ | 13 *******************************************************************************/ |
11 module dwt.widgets.Decorations; | 14 module dwt.widgets.Decorations; |
12 | |
13 import dwt.dwthelper.utils; | |
14 | 15 |
15 | 16 |
16 import dwt.DWT; | 17 import dwt.DWT; |
17 import dwt.DWTException; | 18 import dwt.DWTException; |
18 import dwt.graphics.Image; | 19 import dwt.graphics.Image; |
19 import dwt.graphics.ImageData; | 20 import dwt.graphics.ImageData; |
21 | |
22 import dwt.dwthelper.utils; | |
23 import dwt.dwthelper.System; | |
24 import dwt.widgets.Button; | |
25 import dwt.widgets.Composite; | |
26 import dwt.widgets.Control; | |
27 import dwt.widgets.Display; | |
28 import dwt.widgets.Menu; | |
20 | 29 |
21 /** | 30 /** |
22 * Instances of this class provide the appearance and | 31 * Instances of this class provide the appearance and |
23 * behavior of <code>Shells</code>, but are not top | 32 * behavior of <code>Shells</code>, but are not top |
24 * level shells or dialogs. Class <code>Shell</code> | 33 * level shells or dialogs. Class <code>Shell</code> |
638 * @exception DWTException <ul> | 647 * @exception DWTException <ul> |
639 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> | 648 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> |
640 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> | 649 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> |
641 * </ul> | 650 * </ul> |
642 */ | 651 */ |
643 public void setText (String string) { | 652 public void setText (String str) { |
644 checkWidget(); | 653 checkWidget(); |
645 if (string is null) error (DWT.ERROR_NULL_ARGUMENT); | 654 //if (str is null) error (DWT.ERROR_NULL_ARGUMENT); |
646 text = string; | 655 text = str; |
647 } | 656 } |
648 | 657 |
649 void sort (Image [] images) { | 658 void sort (Image [] images) { |
650 /* Shell Sort from K&R, pg 108 */ | 659 /* Shell Sort from K&R, pg 108 */ |
651 int length = images.length; | 660 int length = images.length; |