Mercurial > projects > dwt-addons
comparison dwtx/jface/internal/text/InternalAccessor.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) 2008 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.internal.text.InternalAccessor; | |
14 | |
15 import dwt.dwthelper.utils; | |
16 | |
17 | |
18 | |
19 import dwt.graphics.Rectangle; | |
20 import dwtx.jface.text.AbstractInformationControlManager; | |
21 import dwtx.jface.text.IInformationControl; | |
22 import dwtx.jface.text.IInformationControlExtension3; | |
23 import dwtx.jface.text.ITextViewerExtension8; | |
24 import dwtx.jface.text.ITextViewerExtension8.EnrichMode; | |
25 | |
26 | |
27 /** | |
28 * An internal class that gives access to internal methods of {@link | |
29 * AbstractInformationControlManager} and subclasses. | |
30 * | |
31 * @since 3.4 | |
32 */ | |
33 public abstract class InternalAccessor { | |
34 | |
35 /** | |
36 * Returns the current information control, or <code>null</code> if none. | |
37 * | |
38 * @return the current information control, or <code>null</code> if none | |
39 */ | |
40 public abstract IInformationControl getCurrentInformationControl(); | |
41 | |
42 /** | |
43 * Sets the information control replacer for this manager and disposes the | |
44 * old one if set. | |
45 * | |
46 * @param replacer the information control replacer for this manager, or | |
47 * <code>null</code> if no information control replacing should | |
48 * take place | |
49 */ | |
50 public abstract void setInformationControlReplacer(InformationControlReplacer replacer); | |
51 | |
52 /** | |
53 * Returns the current information control replacer or <code>null</code> if none has been installed. | |
54 * | |
55 * @return the current information control replacer or <code>null</code> if none has been installed | |
56 */ | |
57 public abstract InformationControlReplacer getInformationControlReplacer(); | |
58 | |
59 /** | |
60 * Tests whether the given information control is replaceable. | |
61 * | |
62 * @param iControl information control or <code>null</code> if none | |
63 * @return <code>true</code> if information control is replaceable, <code>false</code> otherwise | |
64 */ | |
65 public abstract bool canReplace(IInformationControl iControl); | |
66 | |
67 /** | |
68 * Tells whether this manager's information control is currently being replaced. | |
69 * | |
70 * @return <code>true</code> if a replace is in progress | |
71 */ | |
72 public abstract bool isReplaceInProgress(); | |
73 | |
74 /** | |
75 * Crops the given bounds such that they lie completely on the closest monitor. | |
76 * | |
77 * @param bounds shell bounds to crop | |
78 */ | |
79 public abstract void cropToClosestMonitor(Rectangle bounds); | |
80 | |
81 /** | |
82 * Sets the hover enrich mode. Only applicable when an information | |
83 * control replacer has been set with | |
84 * {@link #setInformationControlReplacer(InformationControlReplacer)} . | |
85 * | |
86 * @param mode the enrich mode | |
87 * @see ITextViewerExtension8#setHoverEnrichMode(dwtx.jface.text.ITextViewerExtension8.EnrichMode) | |
88 */ | |
89 public abstract void setHoverEnrichMode(EnrichMode mode); | |
90 | |
91 /** | |
92 * Indicates whether the mouse cursor is allowed to leave the subject area without closing the hover. | |
93 * | |
94 * @return whether the mouse cursor is allowed to leave the subject area without closing the hover | |
95 */ | |
96 public abstract bool getAllowMouseExit(); | |
97 | |
98 /** | |
99 * Replaces this manager's information control as defined by | |
100 * the information control replacer. | |
101 * <strong>Must only be called when the information control is instanceof {@link IInformationControlExtension3}!</strong> | |
102 * | |
103 * @param takeFocus <code>true</code> iff the replacing information control should take focus | |
104 */ | |
105 public abstract void replaceInformationControl(bool takeFocus); | |
106 | |
107 } |