1 /*******************************************************************************
2 * Copyright (c) 2000, 2008 IBM Corporation and others.
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
14 package org.eclipse.swt.custom;
16 import org.eclipse.swt.events.*;
19 * This event is sent when a new offset is required based on the current
20 * offset and a movement type.
22 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
26 public class MovementEvent extends TypedEvent {
29 * line start offset (input)
31 public int lineOffset;
36 public String lineText;
39 * the current offset (input)
44 * the new offset (input, output)
49 * the movement type (input)
51 * @see org.eclipse.swt.SWT#MOVEMENT_WORD
52 * @see org.eclipse.swt.SWT#MOVEMENT_WORD_END
53 * @see org.eclipse.swt.SWT#MOVEMENT_WORD_START
54 * @see org.eclipse.swt.SWT#MOVEMENT_CHAR
55 * @see org.eclipse.swt.SWT#MOVEMENT_CLUSTER
59 static final long serialVersionUID = 3978765487853324342L;
62 * Constructs a new instance of this class based on the
63 * information in the given event.
65 * @param e the event containing the information
67 public MovementEvent(StyledTextEvent e) {
69 lineOffset = e.detail;