view dwtx/jface/text/source/IVerticalRulerColumn.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
line wrap: on
line source

/*******************************************************************************
 * Copyright (c) 2000, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 * Port to the D programming language:
 *     Frank Benoit <benoit@tionex.de>
 *******************************************************************************/
module dwtx.jface.text.source.IVerticalRulerColumn;

import dwt.dwthelper.utils;


import dwt.graphics.Font;
import dwt.widgets.Composite;
import dwt.widgets.Control;


/**
 * A vertical ruler column is an element that can be added to a composite
 * vertical ruler ({@link dwtx.jface.text.source.CompositeRuler}). A
 * composite vertical ruler is a vertical ruler with  dynamically changing
 * appearance and behavior depending on its actual arrangement of ruler columns.
 * A vertical ruler column supports a subset of the contract of a vertical
 * ruler.
 *
 * @see dwtx.jface.text.source.CompositeRuler
 * @since 2.0
 */
public interface IVerticalRulerColumn {

    /**
     * Associates an annotation model with this ruler column.
     * A value <code>null</code> is acceptable and clears the ruler.
     *
     * @param model the new annotation model, may be <code>null</code>
     */
    void setModel(IAnnotationModel model);

    /**
     * Redraws this column.
     */
    void redraw();

    /**
     * Creates the column's DWT control.
     *
     * @param parentRuler the parent ruler of this column
     * @param parentControl the control of the parent ruler
     * @return the column's DWT control
     */
    Control createControl(CompositeRuler parentRuler, Composite parentControl);

    /**
     * Returns the column's DWT control.
     *
     * @return the column's DWT control
     */
    Control getControl();

    /**
     * Returns the width of this column's control.
     *
     * @return the width of this column's control
     */
    int getWidth();

    /**
     * Sets the font of this ruler column.
     *
     * @param font the new font of the ruler column
     */
    void setFont(Font font);
}