1 /******************************************************************************* 2 * Copyright (c) 2010, 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.AccessibleEditableTextAdapter; 14 15 import org.eclipse.swt.accessibility.AccessibleEditableTextEvent; 16 import org.eclipse.swt.accessibility.AccessibleEditableTextListener; 17 import org.eclipse.swt.accessibility.AccessibleTextAttributeEvent; 18 19 /** 20 * This adapter class provides default implementations for the 21 * methods in the <code>AccessibleEditableTextListener</code> interface. 22 * <p> 23 * Classes that wish to deal with <code>AccessibleEditableText</code> events can 24 * extend this class and override only the methods that they are 25 * interested in. 26 * </p> 27 * 28 * @see AccessibleEditableTextListener 29 * @see AccessibleEditableTextEvent 30 * @see AccessibleTextAttributeEvent 31 * 32 * @since 3.7 33 */ 34 public class AccessibleEditableTextAdapter : AccessibleEditableTextListener { 35 /** 36 * Copies the substring beginning at the specified <code>start</code> offset 37 * and extending to the character at offset <code>end - 1</code> to the clipboard. 38 * 39 * @param e an event object containing the following information:<ul> 40 * <li>[in] start - the 0 based offset of the first character of the substring 41 * to be copied to the clipboard</li> 42 * <li>[in] end - the 0 based offset after the last character of the substring 43 * to be copied to the clipboard</li> 44 * <li>[out] result - set to {@link ACC#OK} if the operation was completed successfully</li> 45 * </ul> 46 */ 47 public void copyText(AccessibleEditableTextEvent e) {} 48 49 /** 50 * Moves the substring beginning at the specified <code>start</code> offset 51 * and extending to the character at offset <code>end - 1</code> to the clipboard. 52 * 53 * @param e an event object containing the following information:<ul> 54 * <li>[in] start - the 0 based offset of the first character of the substring 55 * to be moved to the clipboard</li> 56 * <li>[in] end - the 0 based offset after the last character of the substring 57 * to be moved to the clipboard</li> 58 * <li>[out] result - set to {@link ACC#OK} if the operation was completed successfully</li> 59 * </ul> 60 */ 61 public void cutText(AccessibleEditableTextEvent e) {} 62 63 /** 64 * Inserts the text in the clipboard at the leading edge of the specified <code>start</code> offset. 65 * 66 * @param e an event object containing the following information:<ul> 67 * <li>[in] start - the offset at which to insert the text from the clipboard. 68 * The valid range is 0..length</li> 69 * <li>[out] result - set to {@link ACC#OK} if the operation was completed successfully</li> 70 * </ul> 71 */ 72 public void pasteText(AccessibleEditableTextEvent e) {} 73 74 /** 75 * Replaces the substring beginning at the specified <code>start</code> offset 76 * and extending to the character at offset <code>end - 1</code> by the specified string. 77 * <p> 78 * This event notification is also used to delete text if <code>string</code> is an empty string, 79 * or to insert text at the leading edge of the specified offset if <code>start</code> and <code>end</code> are equal. 80 * </p> 81 * 82 * @param e an event object containing the following information:<ul> 83 * <li>[in] start - the 0 based offset of the first character of the substring 84 * to be replaced</li> 85 * <li>[in] end - the 0 based offset after the last character of the substring 86 * to be replaced</li> 87 * <li>[in] string - the string that replaces the substring beginning at 88 * <code>start</code> and extending to <code>end - 1</code></li> 89 * <li>[out] result - set to {@link ACC#OK} if the operation was completed successfully</li> 90 * </ul> 91 */ 92 public void replaceText(AccessibleEditableTextEvent e) {} 93 94 /** 95 * Replaces the set of attributes of the substring beginning at the specified <code>start</code> offset 96 * and extending to the character at offset <code>end - 1</code> by the specified set of attributes. 97 * 98 * @param e an event object containing the following information:<ul> 99 * <li>[in] start - the 0 based offset of the first character of the substring 100 * whose attributes are modified</li> 101 * <li>[in] end - the 0 based offset after the last character of the substring 102 * whose attributes are modified</li> 103 * <li>[in] textStyle - the TextStyle which contains attributes that replace the old set of attributes. 104 * The foreground, background, and font fields of this TextStyle are only valid for the duration of the event. 105 * The value of this field may be null if none of the attributes to be set correspond to TextStyle fields.</li> 106 * <li>[in] attributes - an array of alternating key and value Strings that represent the complete 107 * set of attributes to replace the old set of attributes. 108 * The value of this field may be null if no attributes are to be set.</li> 109 * <li>[out] result - set to {@link ACC#OK} if the operation was completed successfully</li> 110 * </ul> 111 */ 112 public void setTextAttributes(AccessibleTextAttributeEvent e) {} 113 }