1 /*******************************************************************************
2  * Copyright (c) 2010, 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  *     alice <stigma@disroot.org>
12  *******************************************************************************/
13 module org.eclipse.swt.accessibility.AccessibleEditableTextEvent;
14 
15 import java.lang.all;
16 import java.util.EventObject;
17 
18 /**
19  * Instances of this class are sent as a result of accessibility clients
20  * sending AccessibleEditableText messages to an accessible object.
21  *
22  * @see AccessibleEditableTextListener
23  * @see AccessibleEditableTextAdapter
24  *
25  * @since 3.7
26  */
27 public class AccessibleEditableTextEvent : EventObject {
28 
29     /**
30      * [in] 0-based start offset of the character range to perform
31      * the operation on
32      *
33      * @see AccessibleEditableTextListener#copyText
34      * @see AccessibleEditableTextListener#cutText
35      * @see AccessibleEditableTextListener#pasteText
36      * @see AccessibleEditableTextListener#replaceText
37      */
38     public int start;
39 
40     /**
41      * [in] 0-based ending offset of the character range to perform
42      * the operation on
43      *
44      * @see AccessibleEditableTextListener#copyText
45      * @see AccessibleEditableTextListener#cutText
46      * @see AccessibleEditableTextListener#replaceText
47      */
48     public int end;
49 
50     /**
51      * [in] a string that will replace the specified character range
52      *
53      * @see AccessibleEditableTextListener#replaceText
54      */
55     public String string;
56 
57     /**
58      * [out] Set this field to {@link ACC#OK} if the operation
59      * was completed successfully, and <code>null</code> otherwise.
60      *
61      * @see AccessibleEditableTextListener#copyText
62      * @see AccessibleEditableTextListener#cutText
63      * @see AccessibleEditableTextListener#pasteText
64      * @see AccessibleEditableTextListener#replaceText
65      */
66     public String result;
67 
68     // static const long serialVersionUID = -5045447704486894646L;
69 
70 /**
71  * Constructs a new instance of this class.
72  *
73  * @param source the object that fired the event
74  */
75 public this(Object source) {
76     super(source);
77 }
78 
79 /**
80  * Returns a string containing a concise, human-readable
81  * description of the receiver.
82  *
83  * @return a string representation of the event
84  */
85 override
86 public String toString () const {
87     return Format("AccessibleEditableTextEvent {{start={} end={} string={} result={}}",
88         start,
89         end,
90         string,
91         result);
92 }
93 }