129
|
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 dwtx.jface.text.ITextViewerExtension4;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 /**
|
|
19 * Extension interface for {@link dwtx.jface.text.ITextViewer}.
|
|
20 * Introduces the concept of text presentation listeners and improves focus
|
|
21 * handling among widget token keepers.
|
|
22 * <p>
|
|
23 * A {@link dwtx.jface.text.ITextPresentationListener}is a listener that
|
|
24 * is informed by the viewer that a text presentation is about to be applied.
|
|
25 * During this callback the listener is allowed to modify the presentation. Text
|
|
26 * presentation listeners are thus a mean to participate in the process of text
|
|
27 * presentation creation.
|
|
28 *
|
|
29 * @since 3.0
|
|
30 */
|
|
31 public interface ITextViewerExtension4 {
|
|
32
|
|
33 /**
|
|
34 * Instructs the receiver to request the {@link IWidgetTokenKeeper}
|
|
35 * currently holding the widget token to take the keyboard focus.
|
|
36 *
|
|
37 * @return <code>true</code> if there was any
|
|
38 * <code>IWidgetTokenKeeper</code> that was asked to take the
|
|
39 * focus, <code>false</code> otherwise
|
|
40 */
|
|
41 bool moveFocusToWidgetToken();
|
|
42
|
|
43 /**
|
|
44 * Adds the given text presentation listener to this text viewer.
|
|
45 * This call has no effect if the listener is already registered
|
|
46 * with this text viewer.
|
|
47 *
|
|
48 * @param listener the text presentation listener
|
|
49 */
|
|
50 void addTextPresentationListener(ITextPresentationListener listener);
|
|
51
|
|
52 /**
|
|
53 * Removes the given text presentation listener from this text viewer.
|
|
54 * This call has no effect if the listener is not registered with this
|
|
55 * text viewer.
|
|
56 *
|
|
57 * @param listener the text presentation listener
|
|
58 */
|
|
59 void removeTextPresentationListener(ITextPresentationListener listener);
|
|
60 }
|