comparison dwtx/jface/internal/text/InternalAccessor.d @ 156:a9566845f1cb

...
author Frank Benoit <benoit@tionex.de>
date Mon, 25 Aug 2008 19:03:46 +0200
parents c4fb132a086c
children 7926b636c282
comparison
equal deleted inserted replaced
155:8442b6b2da2d 156:a9566845f1cb
2 * Copyright (c) 2008 IBM Corporation and others. 2 * Copyright (c) 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 * Port to the D programming language: 10 * Port to the D programming language:
11 * Frank Benoit <benoit@tionex.de> 11 * Frank Benoit <benoit@tionex.de>
12 *******************************************************************************/ 12 *******************************************************************************/
26 import dwt.graphics.Rectangle; 26 import dwt.graphics.Rectangle;
27 import dwtx.jface.text.AbstractInformationControlManager; 27 import dwtx.jface.text.AbstractInformationControlManager;
28 import dwtx.jface.text.IInformationControl; 28 import dwtx.jface.text.IInformationControl;
29 import dwtx.jface.text.IInformationControlExtension3; 29 import dwtx.jface.text.IInformationControlExtension3;
30 import dwtx.jface.text.ITextViewerExtension8; 30 import dwtx.jface.text.ITextViewerExtension8;
31 import dwtx.jface.text.ITextViewerExtension8.EnrichMode; 31 import dwtx.jface.text.ITextViewerExtension8;
32 32
33 33
34 /** 34 /**
35 * An internal class that gives access to internal methods of {@link 35 * An internal class that gives access to internal methods of {@link
36 * AbstractInformationControlManager} and subclasses. 36 * AbstractInformationControlManager} and subclasses.
37 * 37 *
38 * @since 3.4 38 * @since 3.4
39 */ 39 */
40 public abstract class InternalAccessor { 40 public abstract class InternalAccessor {
41 41
42 /** 42 /**
43 * Returns the current information control, or <code>null</code> if none. 43 * Returns the current information control, or <code>null</code> if none.
44 * 44 *
45 * @return the current information control, or <code>null</code> if none 45 * @return the current information control, or <code>null</code> if none
46 */ 46 */
47 public abstract IInformationControl getCurrentInformationControl(); 47 public abstract IInformationControl getCurrentInformationControl();
48 48
49 /** 49 /**
50 * Sets the information control replacer for this manager and disposes the 50 * Sets the information control replacer for this manager and disposes the
51 * old one if set. 51 * old one if set.
52 * 52 *
53 * @param replacer the information control replacer for this manager, or 53 * @param replacer the information control replacer for this manager, or
54 * <code>null</code> if no information control replacing should 54 * <code>null</code> if no information control replacing should
55 * take place 55 * take place
56 */ 56 */
57 public abstract void setInformationControlReplacer(InformationControlReplacer replacer); 57 public abstract void setInformationControlReplacer(InformationControlReplacer replacer);
58 58
59 /** 59 /**
60 * Returns the current information control replacer or <code>null</code> if none has been installed. 60 * Returns the current information control replacer or <code>null</code> if none has been installed.
61 * 61 *
62 * @return the current information control replacer or <code>null</code> if none has been installed 62 * @return the current information control replacer or <code>null</code> if none has been installed
63 */ 63 */
64 public abstract InformationControlReplacer getInformationControlReplacer(); 64 public abstract InformationControlReplacer getInformationControlReplacer();
65 65
66 /** 66 /**
67 * Tests whether the given information control is replaceable. 67 * Tests whether the given information control is replaceable.
68 * 68 *
69 * @param iControl information control or <code>null</code> if none 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 70 * @return <code>true</code> if information control is replaceable, <code>false</code> otherwise
71 */ 71 */
72 public abstract bool canReplace(IInformationControl iControl); 72 public abstract bool canReplace(IInformationControl iControl);
73 73
74 /** 74 /**
75 * Tells whether this manager's information control is currently being replaced. 75 * Tells whether this manager's information control is currently being replaced.
76 * 76 *
77 * @return <code>true</code> if a replace is in progress 77 * @return <code>true</code> if a replace is in progress
78 */ 78 */
79 public abstract bool isReplaceInProgress(); 79 public abstract bool isReplaceInProgress();
80 80
81 /** 81 /**
82 * Crops the given bounds such that they lie completely on the closest monitor. 82 * Crops the given bounds such that they lie completely on the closest monitor.
83 * 83 *
84 * @param bounds shell bounds to crop 84 * @param bounds shell bounds to crop
85 */ 85 */
86 public abstract void cropToClosestMonitor(Rectangle bounds); 86 public abstract void cropToClosestMonitor(Rectangle bounds);
87 87
88 /** 88 /**
89 * Sets the hover enrich mode. Only applicable when an information 89 * Sets the hover enrich mode. Only applicable when an information
90 * control replacer has been set with 90 * control replacer has been set with
91 * {@link #setInformationControlReplacer(InformationControlReplacer)} . 91 * {@link #setInformationControlReplacer(InformationControlReplacer)} .
92 * 92 *
93 * @param mode the enrich mode 93 * @param mode the enrich mode
94 * @see ITextViewerExtension8#setHoverEnrichMode(dwtx.jface.text.ITextViewerExtension8.EnrichMode) 94 * @see ITextViewerExtension8#setHoverEnrichMode(dwtx.jface.text.ITextViewerExtension8.EnrichMode)
95 */ 95 */
96 public abstract void setHoverEnrichMode(EnrichMode mode); 96 public abstract void setHoverEnrichMode(EnrichMode mode);
97 97
98 /** 98 /**
99 * Indicates whether the mouse cursor is allowed to leave the subject area without closing the hover. 99 * Indicates whether the mouse cursor is allowed to leave the subject area without closing the hover.
100 * 100 *
101 * @return whether the mouse cursor is allowed to leave the subject area without closing the hover 101 * @return whether the mouse cursor is allowed to leave the subject area without closing the hover
102 */ 102 */
103 public abstract bool getAllowMouseExit(); 103 public abstract bool getAllowMouseExit();
104 104
105 /** 105 /**
106 * Replaces this manager's information control as defined by 106 * Replaces this manager's information control as defined by
107 * the information control replacer. 107 * the information control replacer.
108 * <strong>Must only be called when the information control is instanceof {@link IInformationControlExtension3}!</strong> 108 * <strong>Must only be called when the information control is instanceof {@link IInformationControlExtension3}!</strong>
109 * 109 *
110 * @param takeFocus <code>true</code> iff the replacing information control should take focus 110 * @param takeFocus <code>true</code> iff the replacing information control should take focus
111 */ 111 */
112 public abstract void replaceInformationControl(bool takeFocus); 112 public abstract void replaceInformationControl(bool takeFocus);
113 113
114 } 114 }