annotate dwt/custom/TextChangeListener.d @ 156:969e7de37c3d default tip

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