EdVisualCursor.dcl 1.49 KB
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1
2
definition module EdVisualCursor

3
4
5
6
// visual operations on the cursor and selections

from	StdIOCommon import :: ViewFrame, :: Rectangle, :: Point2
import	EdMonad, EdMovement
Diederik van Arkel's avatar
Diederik van Arkel committed
7

8

Diederik van Arkel's avatar
Diederik van Arkel committed
9
10
11
12
vUpdateCursor	:: !Bool !Position !Int !FontInfo !Text !ViewFrame ![Rectangle]
												->	(*Picture -> *Picture)
// vUpdateCursor:	updates the cursor

Diederik van Arkel's avatar
Diederik van Arkel committed
13
14
vShowCursor		::									EditMonad (PSt .l) nothing
vHideCursor		::									EditMonad (PSt .l) nothing
Diederik van Arkel's avatar
Diederik van Arkel committed
15
16
// exported only for use by mouse functions to hide cursor during mouse edits

Diederik van Arkel's avatar
Diederik van Arkel committed
17
vCenterCursor	::									EditMonad (PSt .l) nothing
Diederik van Arkel's avatar
Diederik van Arkel committed
18
19
20
21
// vCenterCursor:	checks to see whether the cursor is within the view frame.
//					If it is not, the cursor is centered in the directions in which
//					it is necessary to make the cursor visible.

Diederik van Arkel's avatar
Diederik van Arkel committed
22
vScrollToCursor	::									EditMonad (PSt .l) nothing
Diederik van Arkel's avatar
Diederik van Arkel committed
23
24
25
// vScrollToCursor:	scrolls the view frame up to the point that the cursor 
//					becomes visible.

Diederik van Arkel's avatar
Diederik van Arkel committed
26
vMoveCursor		:: !Movement					->	EditMonad (PSt .l) nothing
Diederik van Arkel's avatar
Diederik van Arkel committed
27

Diederik van Arkel's avatar
Diederik van Arkel committed
28
vDoCursorSafe	:: (EditMonad (PSt .l) a)		->	EditMonad (PSt .l) a
Diederik van Arkel's avatar
Diederik van Arkel committed
29

Diederik van Arkel's avatar
Diederik van Arkel committed
30
vChangeSelectionTo	:: Selection				->	EditMonad (PSt .l) nothing
Diederik van Arkel's avatar
Diederik van Arkel committed
31
32
33
34
35
36
37
38
39
// vChangeSelectionTo:	changes the selection from the current selection
//						to the given selection and redraws, so that the display
//						reflects this change

vUpdateSelection :: !Selection FontInfo Text ViewFrame [Rectangle]
												->	(*Picture -> *Picture)
// vUpdateSelection:	updates the selection in the frame 
//						within the given update area

Diederik van Arkel's avatar
Diederik van Arkel committed
40
vRemoveSelection	::								EditMonad (PSt .l) nothing