Mercurial > projects > dwt-addons
comparison dwtx/jface/text/source/IAnnotationHoverExtension.d @ 129:eb30df5ca28b
Added JFace Text sources
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 23 Aug 2008 19:10:48 +0200 |
parents | |
children | c4fb132a086c |
comparison
equal
deleted
inserted
replaced
128:8df1d4193877 | 129:eb30df5ca28b |
---|---|
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.source.IAnnotationHoverExtension; | |
14 | |
15 import dwt.dwthelper.utils; | |
16 | |
17 import dwtx.jface.text.IInformationControlCreator; | |
18 | |
19 /** | |
20 * Extension interface for {@link dwtx.jface.text.source.IAnnotationHover} for | |
21 * <ul> | |
22 * <li>providing its own information control creator</li> | |
23 * <li>providing the range of lines for which the hover for a given line is valid</li> | |
24 * <li>providing whether the information control can interact with the mouse cursor</li> | |
25 * </ul> | |
26 * | |
27 * @see dwtx.jface.text.IInformationControlCreator | |
28 * @see dwtx.jface.text.source.IAnnotationHover | |
29 * @since 3.0 | |
30 */ | |
31 public interface IAnnotationHoverExtension { | |
32 | |
33 /** | |
34 * Returns the hover control creator of this annotation hover. | |
35 * | |
36 * @return the hover control creator | |
37 */ | |
38 IInformationControlCreator getHoverControlCreator(); | |
39 | |
40 /** | |
41 * Returns whether the provided information control can interact with the mouse cursor. I.e. the | |
42 * hover must implement custom information control management. | |
43 * | |
44 * @return <code>true</code> if the mouse cursor can be handled | |
45 */ | |
46 bool canHandleMouseCursor(); | |
47 | |
48 /** | |
49 * Returns the object which should be presented in the a | |
50 * hover popup window. The information is requested based on | |
51 * the specified line range. | |
52 * | |
53 * @param sourceViewer the source viewer this hover is registered with | |
54 * @param lineRange the line range for which information is requested | |
55 * @param visibleNumberOfLines the number of visible lines | |
56 * @return the requested information or <code>null</code> if no such information exists | |
57 */ | |
58 Object getHoverInfo(ISourceViewer sourceViewer, ILineRange lineRange, int visibleNumberOfLines); | |
59 | |
60 /** | |
61 * Returns the range of lines that include the given line number for which | |
62 * the same hover information is valid. | |
63 * | |
64 * @param viewer the viewer which the hover is queried for | |
65 * @param lineNumber the line number of the line for which a hover is displayed for | |
66 * @return the computed line range or <code>null</code> for no range | |
67 */ | |
68 ILineRange getHoverLineRange(ISourceViewer viewer, int lineNumber); | |
69 } |