comparison dwt/accessibility/AccessibleTextAdapter.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children f565d3a95c0a
comparison
equal deleted inserted replaced
-1:000000000000 0:380af2bdd8e5
1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 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 *
11 * Port to the D Programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com>
13 *******************************************************************************/
14 module dwt.accessibility.AccessibleTextAdapter;
15
16 import dwt.accessibility.AccessibleTextListener;
17 import dwt.accessibility.AccessibleTextEvent;
18 import dwt.dwthelper.utils;
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 *
43 * @since 3.0
44 */
45 public abstract class AccessibleTextAdapter : AccessibleTextListener {
46
47 /**
48 * Sent when an accessibility client requests the current character offset
49 * of the text caret.
50 * The default behavior is to do nothing.
51 * <p>
52 * Return the caret offset in the <code>offset</code>
53 * field of the event object.
54 * </p>
55 *
56 * @param e an event object containing the following fields:<ul>
57 * <li>childID [IN] - an identifier specifying a child of the control</li>
58 * <li>offset [OUT] - the current offset of the text caret</li>
59 * </ul>
60 */
61 public void getCaretOffset (AccessibleTextEvent e) {
62 }
63
64 /**
65 * Sent when an accessibility client requests the range of the current
66 * text selection.
67 * The default behavior is to do nothing.
68 * <p>
69 * Return the selection start offset and non-negative length in the
70 * <code>offset</code> and <code>length</code> fields of the event object.
71 * </p>
72 *
73 * @param e an event object containing the following fields:<ul>
74 * <li>childID [IN] - an identifier specifying a child of the control</li>
75 * <li>offset [OUT] - the offset of the current text selection</li>
76 * <li>length [OUT] - the length of the current text selection</li>
77 * </ul>
78 */
79 public void getSelectionRange (AccessibleTextEvent e) {
80 }
81 }