1 /******************************************************************************* 2 * Copyright (c) 2000, 2017 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 * alice <stigma@disroot.org> 13 *******************************************************************************/ 14 module org.eclipse.swt.accessibility.AccessibleTextEvent; 15 16 import org.eclipse.swt.accessibility.Accessible; 17 18 19 import java.lang.all; 20 import java.util.EventObject; 21 22 import org.eclipse.swt.graphics.all; 23 24 /** 25 * Instances of this class are sent as a result of 26 * accessibility clients sending messages to controls 27 * asking for detailed information about the implementation 28 * of the control instance. Typically, only implementors 29 * of custom controls need to listen for this event. 30 * <p> 31 * Note: The meaning of each field depends on the 32 * message that was sent. 33 * </p> 34 * 35 * @see AccessibleTextListener 36 * @see AccessibleTextAdapter 37 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> 38 * 39 * @since 3.0 40 */ 41 public class AccessibleTextEvent : EventObject { 42 public int childID; // IN 43 public int offset, length; // OUT 44 /** @since 3.6 */ 45 public Accessible accessible; 46 47 /** 48 * The value of this field must be set in the accessible text extended listener method 49 * before returning. What to set it to depends on the listener method called. 50 * @since 3.6 51 */ 52 public String result; 53 54 /** @since 3.6 */ 55 public int count; 56 /** @since 3.6 */ 57 public int index; 58 /** @since 3.6 */ 59 public int start, end; 60 /** @since 3.6 */ 61 public int type; 62 /** @since 3.6 */ 63 public int x, y, width, height; 64 /** @since 3.6 */ 65 public int [] ranges; 66 /** @since 3.6 */ 67 public Rectangle [] rectangles; 68 69 //static final long serialVersionUID = 3977019530868308275L; 70 71 /** 72 * Constructs a new instance of this class. 73 * 74 * @param source the object that fired the event 75 */ 76 public this (Object source) { 77 super (source); 78 } 79 80 /** 81 * Returns a string containing a concise, human-readable 82 * description of the receiver. 83 * 84 * @return a string representation of the event 85 */ 86 override public String toString () { 87 return Format( "AccessibleTextEvent {{childID={} offset={} length={}}", 88 childID, 89 offset, 90 length); 91 } 92 }