Mercurial > projects > dwt-addons
comparison 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 |
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.IMarkSelection; | |
14 | |
15 import dwt.dwthelper.utils; | |
16 | |
17 | |
18 import dwtx.jface.viewers.ISelection; | |
19 | |
20 | |
21 /** | |
22 * A mark selection can be sent out by text viewers. By checking the | |
23 * type of the selection selection listeners can determine whether a selection | |
24 * event is about a mark or a normal text selection. | |
25 * <p> | |
26 * This interface is not intended to be implemented by clients other than | |
27 * {@link dwtx.jface.text.ITextViewer} implementers. | |
28 * </p> | |
29 * | |
30 * @since 2.0 | |
31 */ | |
32 public interface IMarkSelection : ISelection { | |
33 | |
34 /** | |
35 * Returns the marked document. | |
36 * | |
37 * @return the marked document | |
38 */ | |
39 IDocument getDocument(); | |
40 | |
41 /** | |
42 * Returns the mark position. The offset may be <code>-1</code> if there's no marked region. | |
43 * | |
44 * @return the mark position or <code>-1</code> if there is no marked region | |
45 */ | |
46 int getOffset(); | |
47 | |
48 /** | |
49 * Returns the length of the mark selection. The length may be negative, if the caret | |
50 * is before the mark position. The length has no meaning if <code>getOffset()</code> | |
51 * returns <code>-1</code>. | |
52 * | |
53 * @return the length of the mark selection. Result is undefined for <code>getOffset is -1</code> | |
54 */ | |
55 int getLength(); | |
56 } |