Mercurial > projects > dwt-win
annotate dwt/custom/CTabFolderEvent.d @ 315:349b8c12e243
Sync dwt/custom with dwt-linux
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Tue, 07 Oct 2008 16:18:26 +0200 |
parents | fd9c62a2998e |
children |
rev | line source |
---|---|
155 | 1 /******************************************************************************* |
246 | 2 * Copyright (c) 2000, 2008 IBM Corporation and others. |
155 | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | |
5 * which accompanies this distribution, and is available at | |
6 * http://www.eclipse.org/legal/epl-v10.html | |
7 * | |
8 * Contributors: | |
9 * IBM Corporation - initial API and implementation | |
10 * Port to the D programming language: | |
11 * Frank Benoit <benoit@tionex.de> | |
12 *******************************************************************************/ | |
13 module dwt.custom.CTabFolderEvent; | |
14 | |
315
349b8c12e243
Sync dwt/custom with dwt-linux
Frank Benoit <benoit@tionex.de>
parents:
246
diff
changeset
|
15 import dwt.dwthelper.utils; |
349b8c12e243
Sync dwt/custom with dwt-linux
Frank Benoit <benoit@tionex.de>
parents:
246
diff
changeset
|
16 |
155 | 17 |
18 | |
19 import dwt.events.TypedEvent; | |
20 import dwt.widgets.Widget; | |
21 | |
22 import tango.util.Convert; | |
23 | |
24 /** | |
246 | 25 * This event is sent when an event is generated in the CTabFolder. |
155 | 26 * |
246 | 27 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> |
155 | 28 */ |
29 public class CTabFolderEvent : TypedEvent { | |
30 /** | |
31 * The tab item for the operation. | |
32 */ | |
33 public Widget item; | |
34 | |
35 /** | |
36 * A flag indicating whether the operation should be allowed. | |
37 * Setting this field to <code>false</code> will cancel the operation. | |
38 * Applies to the close and showList events. | |
39 */ | |
40 public bool doit; | |
41 | |
42 /** | |
43 * The widget-relative, x coordinate of the chevron button | |
44 * at the time of the event. Applies to the showList event. | |
45 * | |
46 * @since 3.0 | |
47 */ | |
48 public int x; | |
49 /** | |
50 * The widget-relative, y coordinate of the chevron button | |
51 * at the time of the event. Applies to the showList event. | |
52 * | |
53 * @since 3.0 | |
54 */ | |
55 public int y; | |
56 /** | |
57 * The width of the chevron button at the time of the event. | |
58 * Applies to the showList event. | |
59 * | |
60 * @since 3.0 | |
61 */ | |
62 public int width; | |
63 /** | |
64 * The height of the chevron button at the time of the event. | |
65 * Applies to the showList event. | |
66 * | |
67 * @since 3.0 | |
68 */ | |
69 public int height; | |
70 | |
71 static final long serialVersionUID = 3760566386225066807L; | |
72 | |
73 /** | |
74 * Constructs a new instance of this class. | |
75 * | |
76 * @param w the widget that fired the event | |
77 */ | |
78 this(Widget w) { | |
79 super(w); | |
80 } | |
81 | |
82 /** | |
83 * Returns a string containing a concise, human-readable | |
84 * description of the receiver. | |
85 * | |
86 * @return a string representation of the event | |
87 */ | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
88 public override String toString() { |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
89 String string = super.toString (); |
155 | 90 return string[0.. $ - 1] // remove trailing '}' |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
91 ~ " item=" ~ to!(String)(item) |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
92 ~ " doit=" ~ to!(String)(doit) |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
93 ~ " x=" ~ to!(String)(x) |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
94 ~ " y=" ~ to!(String)(y) |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
95 ~ " width=" ~ to!(String)(width) |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
96 ~ " height=" ~ to!(String)(height) |
155 | 97 ~ "}"; |
98 } | |
99 } |