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