1 /******************************************************************************* 2 * Copyright (c) 2009, 2013 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.AccessibleAttributeListener; 14 15 import org.eclipse.swt.accessibility.AccessibleAttributeEvent; 16 import org.eclipse.swt.accessibility.AccessibleTextAttributeEvent; 17 import org.eclipse.swt.internal.SWTEventListener; 18 19 /** 20 * Classes which implement this interface provide methods 21 * that handle AccessibleAttribute events. 22 * <p> 23 * After creating an instance of a class that implements 24 * this interface it can be added to an accessible using the 25 * <code>addAccessibleAttributeListener</code> method and removed using 26 * the <code>removeAccessibleAttributeListener</code> method. 27 * </p> 28 * 29 * @see AccessibleAttributeAdapter 30 * @see AccessibleAttributeEvent 31 * @see AccessibleTextAttributeEvent 32 * 33 * @since 3.6 34 */ 35 public interface AccessibleAttributeListener : SWTEventListener { 36 /** 37 * Returns attributes specific to this Accessible object. 38 * 39 * @param e an event object containing the following fields:<ul> 40 * <li>[out] topMargin - the top margin in pixels</li> 41 * <li>[out] bottomMargin - the bottom margin in pixels</li> 42 * <li>[out] leftMargin - the left margin in pixels</li> 43 * <li>[out] rightMargin - the right margin in pixels</li> 44 * <li>[out] tabStops - an array of pixel locations</li> 45 * <li>[out] justify - whether or not to justify the text</li> 46 * <li>[out] alignment - one of <code>SWT#LEFT</code>, <code>SWT#RIGHT</code> or <code>SWT#CENTER</code></li> 47 * <li>[out] indent - the indent in pixels</li> 48 * <li>[out] groupLevel - the level of this accessible in its group</li> 49 * <li>[out] groupCount - the number of similar children in this accessible's group</li> 50 * <li>[out] groupIndex - the index of this accessible in its group</li> 51 * <li>[out] attributes - an array of alternating key and value Strings 52 * which represent additional (i.e. non predefined) attributes</li> 53 * </ul> 54 */ 55 public void getAttributes(AccessibleAttributeEvent e); 56 57 /** 58 * Returns text attributes specific to this Accessible object. 59 * 60 * @param e an event object containing the following fields:<ul> 61 * <li>[in] offset - the 0 based text offset for which to return attribute information</li> 62 * <li>[out] start - the 0 based starting offset of the character range 63 * over which all text attributes match those of offset</li> 64 * <li>[out] end - the 0 based offset after the last character of the character range 65 * over which all text attributes match those of offset</li> 66 * <li>[out] textStyle - the TextStyle of the character range</li> 67 * <li>[out] attributes - an array of alternating key and value Strings 68 * that represent additional attributes that do not correspond to TextStyle fields</li> 69 * </ul> 70 */ 71 public void getTextAttributes(AccessibleTextAttributeEvent e); 72 }