129
|
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.IVerticalRulerColumn;
|
|
14
|
|
15 import dwt.dwthelper.utils;
|
|
16
|
|
17
|
|
18 import dwt.graphics.Font;
|
|
19 import dwt.widgets.Composite;
|
|
20 import dwt.widgets.Control;
|
|
21
|
|
22
|
|
23 /**
|
|
24 * A vertical ruler column is an element that can be added to a composite
|
|
25 * vertical ruler ({@link dwtx.jface.text.source.CompositeRuler}). A
|
|
26 * composite vertical ruler is a vertical ruler with dynamically changing
|
|
27 * appearance and behavior depending on its actual arrangement of ruler columns.
|
|
28 * A vertical ruler column supports a subset of the contract of a vertical
|
|
29 * ruler.
|
|
30 *
|
|
31 * @see dwtx.jface.text.source.CompositeRuler
|
|
32 * @since 2.0
|
|
33 */
|
|
34 public interface IVerticalRulerColumn {
|
|
35
|
|
36 /**
|
|
37 * Associates an annotation model with this ruler column.
|
|
38 * A value <code>null</code> is acceptable and clears the ruler.
|
|
39 *
|
|
40 * @param model the new annotation model, may be <code>null</code>
|
|
41 */
|
|
42 void setModel(IAnnotationModel model);
|
|
43
|
|
44 /**
|
|
45 * Redraws this column.
|
|
46 */
|
|
47 void redraw();
|
|
48
|
|
49 /**
|
|
50 * Creates the column's DWT control.
|
|
51 *
|
|
52 * @param parentRuler the parent ruler of this column
|
|
53 * @param parentControl the control of the parent ruler
|
|
54 * @return the column's DWT control
|
|
55 */
|
|
56 Control createControl(CompositeRuler parentRuler, Composite parentControl);
|
|
57
|
|
58 /**
|
|
59 * Returns the column's DWT control.
|
|
60 *
|
|
61 * @return the column's DWT control
|
|
62 */
|
|
63 Control getControl();
|
|
64
|
|
65 /**
|
|
66 * Returns the width of this column's control.
|
|
67 *
|
|
68 * @return the width of this column's control
|
|
69 */
|
|
70 int getWidth();
|
|
71
|
|
72 /**
|
|
73 * Sets the font of this ruler column.
|
|
74 *
|
|
75 * @param font the new font of the ruler column
|
|
76 */
|
|
77 void setFont(Font font);
|
|
78 }
|