Mercurial > projects > dwt-win
annotate dwt/events/MenuDetectEvent.d @ 212:ab60f3309436
reverted the char[] to String and use the an alias.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:12:38 +0200 |
parents | bef1ed4ebc50 |
children | fd9c62a2998e |
rev | line source |
---|---|
0 | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2007 IBM Corporation and others. | |
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.events.MenuDetectEvent; | |
14 | |
15 | |
16 import dwt.widgets.Event; | |
17 import dwt.events.TypedEvent; | |
18 | |
19 import tango.text.convert.Format; | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
86
diff
changeset
|
20 import dwt.dwthelper.utils; |
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
86
diff
changeset
|
21 |
0 | 22 /** |
23 * Instances of this class are sent whenever the platform- | |
24 * specific trigger for showing a context menu is detected. | |
25 * | |
26 * @see MenuDetectListener | |
27 * | |
28 * @since 3.3 | |
29 */ | |
30 | |
31 public final class MenuDetectEvent : TypedEvent { | |
32 | |
33 /** | |
34 * the display-relative x coordinate of the pointer | |
35 * at the time the context menu trigger occurred | |
36 */ | |
37 public int x; | |
38 | |
39 /** | |
40 * the display-relative y coordinate of the pointer | |
41 * at the time the context menu trigger occurred | |
42 */ | |
43 public int y; | |
44 | |
45 /** | |
46 * A flag indicating whether the operation should be allowed. | |
47 * Setting this field to <code>false</code> will cancel the operation. | |
48 */ | |
49 public bool doit; | |
50 | |
51 //private static final long serialVersionUID = -3061660596590828941L; | |
52 | |
53 /** | |
54 * Constructs a new instance of this class based on the | |
55 * information in the given untyped event. | |
56 * | |
57 * @param e the untyped event containing the information | |
58 */ | |
59 public this(Event e) { | |
60 super(e); | |
61 this.x = e.x; | |
62 this.y = e.y; | |
63 this.doit = e.doit; | |
64 } | |
65 | |
66 /** | |
67 * Returns a string containing a concise, human-readable | |
68 * description of the receiver. | |
69 * | |
70 * @return a string representation of the event | |
71 */ | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
86
diff
changeset
|
72 public override String toString() { |
0 | 73 return Format( "{} x={} y={} doit={}}", super.toString[ 0 .. $-2 ], x, y, doit ); |
74 } | |
75 } |