Mercurial > projects > dwt-mac
comparison dwt/widgets/Event.d @ 15:2952d5604c0a
Ported some widgets, added some stuff to the runtime bindings
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Fri, 29 Aug 2008 21:46:05 +0200 |
parents | 380af2bdd8e5 |
children | d8635bb48c7c |
comparison
equal
deleted
inserted
replaced
14:762fbe6f17d3 | 15:2952d5604c0a |
---|---|
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.Event; | 14 module dwt.widgets.Event; |
12 | 15 |
13 import dwt.dwthelper.utils; | |
14 | |
15 | 16 |
16 import dwt.graphics.GC; | 17 import dwt.graphics.GC; |
17 import dwt.graphics.Rectangle; | 18 import dwt.graphics.Rectangle; |
19 | |
20 import tango.text.convert.Format; | |
21 | |
22 import dwt.dwthelper.utils; | |
23 | |
24 import dwt.widgets.Widget; | |
25 import dwt.widgets.Display; | |
18 | 26 |
19 /** | 27 /** |
20 * Instances of this class provide a description of a particular | 28 * Instances of this class provide a description of a particular |
21 * event which occurred within DWT. The DWT <em>untyped listener</em> | 29 * event which occurred within DWT. The DWT <em>untyped listener</em> |
22 * API uses these instances for all event dispatching. | 30 * API uses these instances for all event dispatching. |
215 * description of the receiver. | 223 * description of the receiver. |
216 * | 224 * |
217 * @return a string representation of the event | 225 * @return a string representation of the event |
218 */ | 226 */ |
219 public String toString () { | 227 public String toString () { |
220 return "Event {type=" + type + " " + widget + " time=" + time + " data=" + data + " x=" + x + " y=" + y + " width=" + width + " height=" + height + " detail=" + detail + "}"; //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ | 228 return Format( "Event {{type={} {} time={} data={} x={} y={} width={} height={} detail={}}", |
221 } | 229 type, widget, time, data, x, y, width, height, detail ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ |
222 } | 230 } |
231 } |