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
|
131
|
15 import dwtx.jface.text.ITextPresentationListener; // packageimport
|
|
16
|
129
|
17 import dwt.dwthelper.utils;
|
|
18
|
|
19
|
|
20 /**
|
|
21 * Extension interface for {@link dwtx.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 dwtx.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 }
|