Mercurial > projects > dwt-mac
comparison dwt/custom/MovementEvent.d @ 0:380af2bdd8e5
Upload of whole dwt tree
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Sat, 09 Aug 2008 17:00:02 +0200 |
parents | |
children | 1a8b3cb347e0 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:380af2bdd8e5 |
---|---|
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 *******************************************************************************/ | |
11 module dwt.custom; | |
12 | |
13 import dwt.events.*; | |
14 | |
15 /** | |
16 * This event is sent when a new offset is required based on the current | |
17 * offset and a movement type. | |
18 * | |
19 * @since 3.3 | |
20 */ | |
21 public class MovementEvent : TypedEvent { | |
22 | |
23 /** | |
24 * line start offset (input) | |
25 */ | |
26 public int lineOffset; | |
27 | |
28 /** | |
29 * line text (input) | |
30 */ | |
31 public String lineText; | |
32 | |
33 /** | |
34 * the current offset (input) | |
35 */ | |
36 public int offset; | |
37 | |
38 /** | |
39 * the new offset (input, output) | |
40 */ | |
41 public int newOffset; | |
42 | |
43 /** | |
44 * the movement type (input) | |
45 * | |
46 * @see dwt.DWT#MOVEMENT_WORD | |
47 * @see dwt.DWT#MOVEMENT_WORD_END | |
48 * @see dwt.DWT#MOVEMENT_WORD_START | |
49 * @see dwt.DWT#MOVEMENT_CHAR | |
50 * @see dwt.DWT#MOVEMENT_CLUSTER | |
51 */ | |
52 public int movement; | |
53 | |
54 static final long serialVersionUID = 3978765487853324342L; | |
55 | |
56 public MovementEvent(StyledTextEvent e) { | |
57 super(e); | |
58 lineOffset = e.detail; | |
59 lineText = e.text; | |
60 movement = e.count; | |
61 offset = e.start; | |
62 newOffset = e.end; | |
63 } | |
64 } | |
65 | |
66 |