Mercurial > projects > dwt-win
annotate dwt/custom/MovementEvent.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 | a5afe31f5cdd |
children | fd9c62a2998e |
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 /******************************************************************************* |
155 | 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.custom.MovementEvent; | |
14 | |
15 import dwt.events.TypedEvent; | |
16 import dwt.custom.StyledTextEvent; | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
17 import dwt.dwthelper.utils; |
155 | 18 |
19 /** | |
20 * This event is sent when a new offset is required based on the current | |
21 * offset and a movement type. | |
22 * | |
23 * @since 3.3 | |
24 */ | |
25 public class MovementEvent : TypedEvent { | |
26 | |
27 /** | |
28 * line start offset (input) | |
29 */ | |
30 public int lineOffset; | |
31 | |
32 /** | |
33 * line text (input) | |
34 */ | |
212
ab60f3309436
reverted the char[] to String and use the an alias.
Frank Benoit <benoit@tionex.de>
parents:
155
diff
changeset
|
35 public String lineText; |
155 | 36 |
37 /** | |
38 * the current offset (input) | |
39 */ | |
40 public int offset; | |
41 | |
42 /** | |
43 * the new offset (input, output) | |
44 */ | |
45 public int newOffset; | |
46 | |
47 /** | |
48 * the movement type (input) | |
49 * | |
50 * @see dwt.DWT#MOVEMENT_WORD | |
51 * @see dwt.DWT#MOVEMENT_WORD_END | |
52 * @see dwt.DWT#MOVEMENT_WORD_START | |
53 * @see dwt.DWT#MOVEMENT_CHAR | |
54 * @see dwt.DWT#MOVEMENT_CLUSTER | |
55 */ | |
56 public int movement; | |
57 | |
58 static final long serialVersionUID = 3978765487853324342L; | |
59 | |
60 public this(StyledTextEvent e) { | |
61 super(cast(Object)e); | |
62 lineOffset = e.detail; | |
63 lineText = e.text; | |
64 movement = e.count; | |
65 offset = e.start; | |
66 newOffset = e.end; | |
67 } | |
68 } | |
69 | |
70 |