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.custom.ExtendedModifyEvent; 14 15 import java.lang.all; 16 17 import org.eclipse.swt.events.TypedEvent; 18 import org.eclipse.swt.custom.StyledTextEvent; 19 20 /** 21 * This event is sent after a text change occurs. 22 * 23 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> 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 */ 31 public String replacedText; 32 33 static const long serialVersionUID = 3258696507027830832L; 34 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 */ 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 }