]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.eclipse.swt.win32.win32.x86_64/src/org/eclipse/swt/accessibility/AccessibleAttributeListener.java
936f0223a13ed305def653c901a82356987205bf
[simantics/platform.git] / bundles / org.eclipse.swt.win32.win32.x86_64 / src / org / eclipse / swt / accessibility / AccessibleAttributeListener.java
1 /*******************************************************************************
2  * Copyright (c) 2009, 2013 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.swt.accessibility;
15
16 import org.eclipse.swt.internal.SWTEventListener;
17
18 /**
19  * Classes which implement this interface provide methods
20  * that handle AccessibleAttribute events.
21  * <p>
22  * After creating an instance of a class that implements
23  * this interface it can be added to an accessible using the
24  * <code>addAccessibleAttributeListener</code> method and removed using
25  * the <code>removeAccessibleAttributeListener</code> method.
26  * </p>
27  *
28  * @see AccessibleAttributeAdapter
29  * @see AccessibleAttributeEvent
30  * @see AccessibleTextAttributeEvent
31  *
32  * @since 3.6
33  */
34 public interface AccessibleAttributeListener extends SWTEventListener {
35         /**
36          * Returns attributes specific to this Accessible object.
37          *
38          * @param e an event object containing the following fields:<ul>
39          * <li>[out] topMargin - the top margin in pixels</li>
40          * <li>[out] bottomMargin - the bottom margin in pixels</li>
41          * <li>[out] leftMargin - the left margin in pixels</li>
42          * <li>[out] rightMargin - the right margin in pixels</li>
43          * <li>[out] tabStops - an array of pixel locations</li>
44          * <li>[out] justify - whether or not to justify the text</li>
45          * <li>[out] alignment - one of <code>SWT#LEFT</code>, <code>SWT#RIGHT</code> or <code>SWT#CENTER</code></li>
46          * <li>[out] indent - the indent in pixels</li>
47          * <li>[out] groupLevel - the level of this accessible in its group</li>
48          * <li>[out] groupCount - the number of similar children in this accessible's group</li>
49          * <li>[out] groupIndex - the index of this accessible in its group</li>
50          * <li>[out] attributes - an array of alternating key and value Strings
51          *              which represent additional (i.e. non predefined) attributes</li>
52          * </ul>
53          */
54         public void getAttributes(AccessibleAttributeEvent e);
55
56         /**
57          * Returns text attributes specific to this Accessible object.
58          *
59          * @param e an event object containing the following fields:<ul>
60          * <li>[in] offset - the 0 based text offset for which to return attribute information</li>
61          * <li>[out] start - the 0 based starting offset of the character range
62          *              over which all text attributes match those of offset</li>
63          * <li>[out] end - the 0 based offset after the last character of the character range
64          *              over which all text attributes match those of offset</li>
65          * <li>[out] textStyle - the TextStyle of the character range</li>
66          * <li>[out] attributes - an array of alternating key and value Strings
67          *              that represent additional attributes that do not correspond to TextStyle fields</li>
68          * </ul>
69          */
70         public void getTextAttributes(AccessibleTextAttributeEvent e);
71 }