1
2
3
4
5
6
7
8
9
10
11
12 package sk.uniba.euromath.editor.textEditor;
13
14 import org.eclipse.swt.widgets.Caret;
15
16 import sk.baka.ikslibs.ptr.DomPointer;
17
18 /***
19 * CaretProvider provides a single instance of caret.
20 *
21 * @author Tomáš Studva Created on 15.7.2004
22 *
23 */
24 public interface ICaretProvider {
25
26 /***
27 * Returns instance of caret.
28 *
29 * @return caret object
30 */
31 public Caret getCaret();
32
33 /***
34 * @return ID of bottommost node in DOM tree containing caret.
35 * <code>null</code> if caret is not visible or contained by
36 * object without id.
37 */
38 public String getNodeIDWithCaret();
39
40 /***
41 * Returns CaretPositioner with caret or null if caret is not visible.
42 *
43 * @return null or caret positioner
44 */
45 public ICaretPositioner getActiveCaretPositioner();
46
47 /***
48 * Returns TextPieceKeeper with caret or null if caret is not visible.
49 *
50 * @return null or TextPieceKeeper
51 */
52 public ITextPieceKeeper getActiveTextPieceKeeper();
53
54 /***
55 * Returns pointer to place in DOM tree where is caret or null if caret is
56 * nowhere.
57 *
58 * @return null or DomPointer
59 */
60 public DomPointer getPointer();
61
62 /***
63 * Returns text of text node with caret to caret position or null if caret
64 * is nowhere.
65 *
66 * @return null or String
67 */
68 public String getPreviousText();
69
70 }