Mercurial > projects > dwt-addons
view dwtx/jface/text/IMarkSelection.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, 2008 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.IMarkSelection; import dwt.dwthelper.utils; import dwtx.jface.viewers.ISelection; /** * A mark selection can be sent out by text viewers. By checking the * type of the selection selection listeners can determine whether a selection * event is about a mark or a normal text selection. * <p> * This interface is not intended to be implemented by clients other than * {@link dwtx.jface.text.ITextViewer} implementers. * </p> * * @since 2.0 */ public interface IMarkSelection : ISelection { /** * Returns the marked document. * * @return the marked document */ IDocument getDocument(); /** * Returns the mark position. The offset may be <code>-1</code> if there's no marked region. * * @return the mark position or <code>-1</code> if there is no marked region */ int getOffset(); /** * Returns the length of the mark selection. The length may be negative, if the caret * is before the mark position. The length has no meaning if <code>getOffset()</code> * returns <code>-1</code>. * * @return the length of the mark selection. Result is undefined for <code>getOffset is -1</code> */ int getLength(); }