comparison dwt/custom/TextChangeListener.d @ 41:6337764516f1

Sync dwt/custom with dwt-linux (took copy of complete folder)
author Frank Benoit <benoit@tionex.de>
date Tue, 07 Oct 2008 16:29:55 +0200
parents 380af2bdd8e5
children
comparison
equal deleted inserted replaced
40:fbe68c33eeee 41:6337764516f1
1 /******************************************************************************* 1 /*******************************************************************************
2 * Copyright (c) 2000, 2003 IBM Corporation and others. 2 * Copyright (c) 2000, 2003 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de>
10 *******************************************************************************/ 12 *******************************************************************************/
11 module dwt.custom; 13 module dwt.custom.TextChangeListener;
12 14
13 15
14 import dwt.internal.DWTEventListener; 16 import dwt.internal.DWTEventListener;
17 import dwt.custom.TextChangingEvent;
18 import dwt.custom.TextChangedEvent;
15 19
16 /** 20 /**
17 * The StyledText widget : this listener to receive 21 * The StyledText widget implements this listener to receive
18 * notifications when changes to the model occur. 22 * notifications when changes to the model occur.
19 * It is not intended to be implemented by clients or by 23 * It is not intended to be implemented by clients or by
20 * implementors of StyledTextContent. 24 * implementors of StyledTextContent.
21 * Clients should listen to the ModifyEvent or ExtendedModifyEvent 25 * Clients should listen to the ModifyEvent or ExtendedModifyEvent
22 * that is sent by the StyledText widget to receive text change 26 * that is sent by the StyledText widget to receive text change
23 * notifications. 27 * notifications.
24 * Implementors of StyledTextContent should call the textChanging 28 * Implementors of StyledTextContent should call the textChanging
25 * and textChanged methods when text changes occur as described 29 * and textChanged methods when text changes occur as described
26 * below. If the entire text is replaced the textSet method 30 * below. If the entire text is replaced the textSet method
27 * should be called instead. 31 * should be called instead.
28 */ 32 */
29 public interface TextChangeListener : DWTEventListener { 33 public interface TextChangeListener : DWTEventListener {
30 34
31 /** 35 /**
32 * This method is called when the content is about to be changed. 36 * This method is called when the content is about to be changed.
33 * Callers also need to call the textChanged method after the 37 * Callers also need to call the textChanged method after the
34 * content change has been applied. The widget only updates the 38 * content change has been applied. The widget only updates the
35 * screen properly when it receives both events. 39 * screen properly when it receives both events.
36 * 40 *
37 * @param event the text changing event. All event fields need 41 * @param event the text changing event. All event fields need
38 * to be set by the sender. 42 * to be set by the sender.
39 * @see TextChangingEvent 43 * @see TextChangingEvent
40 */ 44 */
41 public void textChanging(TextChangingEvent event); 45 public void textChanging(TextChangingEvent event);
42 /** 46 /**
43 * This method is called when the content has changed. 47 * This method is called when the content has changed.
44 * Callers need to have called the textChanging method prior to 48 * Callers need to have called the textChanging method prior to
45 * applying the content change and calling this method. The widget 49 * applying the content change and calling this method. The widget
46 * only updates the screen properly when it receives both events. 50 * only updates the screen properly when it receives both events.
47 * 51 *
48 * @param event the text changed event 52 * @param event the text changed event
49 */ 53 */
50 public void textChanged(TextChangedEvent event); 54 public void textChanged(TextChangedEvent event);
51 /** 55 /**
52 * This method is called instead of the textChanging/textChanged 56 * This method is called instead of the textChanging/textChanged
53 * combination when the entire old content has been replaced 57 * combination when the entire old content has been replaced
54 * (e.g., by a call to StyledTextContent.setText()). 58 * (e.g., by a call to StyledTextContent.setText()).
55 * 59 *
56 * @param event the text changed event 60 * @param event the text changed event
57 */ 61 */
58 public void textSet(TextChangedEvent event); 62 public void textSet(TextChangedEvent event);
59 } 63 }
60 64