Mercurial > projects > dwt2
annotate org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/events/MenuDetectEvent.d @ 125:c43718956f21 default tip
Updated the snippets status.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Thu, 11 Aug 2011 19:55:14 +0200 |
parents | 536e43f63c81 |
children |
rev | line source |
---|---|
25 | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2008 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 org.eclipse.swt.events.MenuDetectEvent; | |
14 | |
15 | |
16 import org.eclipse.swt.widgets.Event; | |
17 import org.eclipse.swt.events.TypedEvent; | |
18 | |
19 import java.lang.all; | |
20 | |
21 /** | |
22 * Instances of this class are sent whenever the platform- | |
23 * specific trigger for showing a context menu is detected. | |
24 * | |
25 * @see MenuDetectListener | |
26 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> | |
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 | |
49
7a2dd761a8b2
more work until dmd 2.026 linux segfaults.
Frank Benoit <benoit@tionex.de>
parents:
26
diff
changeset
|
51 //private static const long serialVersionUID = -3061660596590828941L; |
25 | 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 */ | |
72 public override String toString() { | |
120
536e43f63c81
Comprehensive update for Win32/Linux32 dmd-2.053/dmd-1.068+Tango-r5661
Denis Shelomovskij <verylonglogin.reg@gmail.com>
parents:
49
diff
changeset
|
73 return Format( "{} x={} y={} doit={}}", super.toString[ 0 .. $-1 ], x, y, doit ); |
25 | 74 } |
75 } |