comparison dwtx/jface/text/IInformationControlExtension3.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, 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.text.IInformationControlExtension3;
14
15 import dwt.dwthelper.utils;
16
17 import dwt.graphics.Rectangle;
18
19
20 /**
21 * Extension interface for {@link dwtx.jface.text.IInformationControl}.
22 * Adds API which allows to get this information control's bounds and introduces
23 * the concept of persistent size and location by introducing predicates for
24 * whether the information control supports restoring of size and location.
25 * <p>
26 * Note: An information control which implements this interface can ignore calls
27 * to
28 * {@link dwtx.jface.text.IInformationControl#setSizeConstraints(int, int)}
29 * or use it as hint for its very first appearance.
30 * </p>
31 *
32 * @see dwtx.jface.text.IInformationControl
33 * @since 3.0
34 */
35 public interface IInformationControlExtension3 {
36
37 /**
38 * Returns a rectangle describing the receiver's size and location
39 * relative to its parent (or its display if its parent is null).
40 * <p>
41 * Note: If the receiver is already disposed then this methods must
42 * return the last valid location and size.
43 * </p>
44 *
45 * @return the receiver's bounding rectangle
46 */
47 Rectangle getBounds();
48
49 /**
50 * Computes the trim for this control. The trim is the space around the
51 * information control's actual content area. It includes all borders of the
52 * control and other static content placed around the content area (e.g. a
53 * toolbar).
54 *
55 * @return The receiver's trim. <code>x</code> and <code>y</code> denote
56 * the upper left corner of the trimming relative to this control's
57 * location i.e. this will most likely be negative values.
58 * <code>width</code> and <code>height</code> represent the
59 * border sizes (the sum of the horizontal and vertical trimmings,
60 * respectively).
61 */
62 Rectangle computeTrim();
63
64 /**
65 * Tells whether this control allows to restore the previously
66 * used size.
67 * <p>
68 * Note: This is not a static property - it can change during the
69 * lifetime of this control.</p>
70 *
71 * @return <code>true</code> if restoring size is supported
72 */
73 bool restoresSize();
74
75 /**
76 * Tells whether this control allows to restore the previously
77 * used location.
78 * <p>
79 * Note: This is not a static property - it can change during the
80 * lifetime of this control.</p>
81 *
82 * @return <code>true</code> if restoring location is supported
83 */
84 bool restoresLocation();
85 }