25
|
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.accessibility.AccessibleTextAdapter;
|
|
14
|
|
15 import java.lang.all;
|
|
16
|
|
17 import org.eclipse.swt.accessibility.AccessibleTextEvent;
|
|
18 import org.eclipse.swt.accessibility.AccessibleTextListener;
|
|
19
|
|
20 /**
|
|
21 * This adapter class provides default implementations for the
|
|
22 * methods described by the <code>AccessibleTextListener</code> interface.
|
|
23 * <p>
|
|
24 * Classes that wish to deal with <code>AccessibleTextEvent</code>s can
|
|
25 * extend this class and override only the methods that they are
|
|
26 * interested in.
|
|
27 * </p><p>
|
|
28 * Note: Accessibility clients use child identifiers to specify
|
|
29 * whether they want information about a control or one of its children.
|
|
30 * Child identifiers are increasing integers beginning with 0.
|
|
31 * The identifier CHILDID_SELF represents the control itself.
|
|
32 * When returning a child identifier to a client, you may use CHILDID_NONE
|
|
33 * to indicate that no child or control has the required information.
|
|
34 * </p><p>
|
|
35 * Note: This adapter is typically used by implementors of
|
|
36 * a custom control to provide very detailed information about
|
|
37 * the control instance to accessibility clients.
|
|
38 * </p>
|
|
39 *
|
|
40 * @see AccessibleTextListener
|
|
41 * @see AccessibleTextEvent
|
|
42 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
|
|
43 *
|
|
44 * @since 3.0
|
|
45 */
|
|
46 public abstract class AccessibleTextAdapter : AccessibleTextListener {
|
|
47
|
|
48 /**
|
|
49 * Sent when an accessibility client requests the current character offset
|
|
50 * of the text caret.
|
|
51 * The default behavior is to do nothing.
|
|
52 * <p>
|
|
53 * Return the caret offset in the <code>offset</code>
|
|
54 * field of the event object.
|
|
55 * </p>
|
|
56 *
|
|
57 * @param e an event object containing the following fields:<ul>
|
|
58 * <li>childID [IN] - an identifier specifying a child of the control</li>
|
|
59 * <li>offset [OUT] - the current offset of the text caret</li>
|
|
60 * </ul>
|
|
61 */
|
|
62 public void getCaretOffset (AccessibleTextEvent e) {
|
|
63 }
|
|
64
|
|
65 /**
|
|
66 * Sent when an accessibility client requests the range of the current
|
|
67 * text selection.
|
|
68 * The default behavior is to do nothing.
|
|
69 * <p>
|
|
70 * Return the selection start offset and non-negative length in the
|
|
71 * <code>offset</code> and <code>length</code> fields of the event object.
|
|
72 * </p>
|
|
73 *
|
|
74 * @param e an event object containing the following fields:<ul>
|
|
75 * <li>childID [IN] - an identifier specifying a child of the control</li>
|
|
76 * <li>offset [OUT] - the offset of the current text selection</li>
|
|
77 * <li>length [OUT] - the length of the current text selection</li>
|
|
78 * </ul>
|
|
79 */
|
|
80 public void getSelectionRange (AccessibleTextEvent e) {
|
|
81 }
|
|
82 }
|