comparison org.eclipse.jface.text/src/org/eclipse/jface/text/ITextViewerExtension4.d @ 12:bc29606a740c

Added dwt-addons in original directory structure of eclipse.org
author Frank Benoit <benoit@tionex.de>
date Sat, 14 Mar 2009 18:23:29 +0100
parents
children
comparison
equal deleted inserted replaced
11:43904fec5dca 12:bc29606a740c
1 /*******************************************************************************
2 * Copyright (c) 2000, 2005 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 * Frank Benoit <benoit@tionex.de>
12 *******************************************************************************/
13 module org.eclipse.jface.text.ITextViewerExtension4;
14
15 import org.eclipse.jface.text.ITextPresentationListener; // packageimport
16
17 import java.lang.all;
18
19
20 /**
21 * Extension interface for {@link org.eclipse.jface.text.ITextViewer}.
22 * Introduces the concept of text presentation listeners and improves focus
23 * handling among widget token keepers.
24 * <p>
25 * A {@link org.eclipse.jface.text.ITextPresentationListener}is a listener that
26 * is informed by the viewer that a text presentation is about to be applied.
27 * During this callback the listener is allowed to modify the presentation. Text
28 * presentation listeners are thus a mean to participate in the process of text
29 * presentation creation.
30 *
31 * @since 3.0
32 */
33 public interface ITextViewerExtension4 {
34
35 /**
36 * Instructs the receiver to request the {@link IWidgetTokenKeeper}
37 * currently holding the widget token to take the keyboard focus.
38 *
39 * @return <code>true</code> if there was any
40 * <code>IWidgetTokenKeeper</code> that was asked to take the
41 * focus, <code>false</code> otherwise
42 */
43 bool moveFocusToWidgetToken();
44
45 /**
46 * Adds the given text presentation listener to this text viewer.
47 * This call has no effect if the listener is already registered
48 * with this text viewer.
49 *
50 * @param listener the text presentation listener
51 */
52 void addTextPresentationListener(ITextPresentationListener listener);
53
54 /**
55 * Removes the given text presentation listener from this text viewer.
56 * This call has no effect if the listener is not registered with this
57 * text viewer.
58 *
59 * @param listener the text presentation listener
60 */
61 void removeTextPresentationListener(ITextPresentationListener listener);
62 }