Mercurial > projects > dwt-win
annotate dwt/custom/ExtendedModifyEvent.d @ 341:f403c83322c3 default tip
fix: thx torhu
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 08 Nov 2009 20:58:32 +0100 |
parents | 349b8c12e243 |
children |
rev | line source |
---|---|
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
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.ExtendedModifyEvent; | |
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 import dwt.events.TypedEvent; |
18 import dwt.custom.StyledTextEvent; | |
19 | |
20 /** | |
21 * This event is sent after a text change occurs. | |
246 | 22 * |
23 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> | |
155 | 24 */ |
25 public final class ExtendedModifyEvent : TypedEvent { | |
26 /** start offset of the new text */ | |
27 public int start; | |
28 /** length of the new text */ | |
29 public int length; | |
30 /** replaced text or empty string if no text was replaced */ | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
31 public String replacedText; |
155 | 32 |
33 static final long serialVersionUID = 3258696507027830832L; | |
34 | |
246 | 35 /** |
36 * Constructs a new instance of this class based on the | |
37 * information in the given event. | |
38 * | |
39 * @param e the event containing the information | |
40 */ | |
155 | 41 public this(StyledTextEvent e) { |
42 super(cast(Object)e); | |
43 start = e.start; | |
44 length = e.end - e.start; | |
45 replacedText = e.text; | |
46 } | |
47 } |