1 /******************************************************************************* 2 * Copyright (c) 2009, 2016 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.AccessibleAttributeAdapter; 14 15 import org.eclipse.swt.accessibility.AccessibleAttributeEvent; 16 import org.eclipse.swt.accessibility.AccessibleAttributeListener; 17 import org.eclipse.swt.accessibility.AccessibleTextAttributeEvent; 18 19 /** 20 * This adapter class provides default implementations for the 21 * methods in the <code>AccessibleAttributeListener</code> interface. 22 * <p> 23 * Classes that wish to deal with <code>AccessibleAttribute</code> events can 24 * extend this class and override only the methods that they are 25 * interested in. 26 * </p> 27 * 28 * @see AccessibleAttributeListener 29 * @see AccessibleAttributeEvent 30 * @see AccessibleTextAttributeEvent 31 * 32 * @since 3.6 33 */ 34 public class AccessibleAttributeAdapter : AccessibleAttributeListener { 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 override 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 override 72 public void getTextAttributes(AccessibleTextAttributeEvent e) {} 73 }