EdState.dcl 736 Bytes
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1
2
definition module EdState

3
4
// the global state of the editor process

5
6
7
8
9
from StdId			import :: Id
from StdPSt			import :: PSt
from StdMaybe		import :: Maybe
from EdKeyMapping	import :: KeyMapping
from EdMessage		import :: EditId
Diederik van Arkel's avatar
Diederik van Arkel committed
10
11
12
13
14
15

class Editor env
where
	getEditorState :: !*env -> *(!EditorState,!*env)
	setEditorState :: !EditorState !*env -> *env

Diederik van Arkel's avatar
Diederik van Arkel committed
16
instance Editor (PSt *l) | Editor l
Diederik van Arkel's avatar
Diederik van Arkel committed
17
18
19
20
21

:: EditorState

initEditorState		:: !KeyMapping					->	EditorState

22
findReceiver		:: !Id			!EditorState	->	(!Maybe EditId, !EditorState)
Diederik van Arkel's avatar
Diederik van Arkel committed
23
24
25
26
27
28
addReceiver			:: Id EditId	!EditorState	->	EditorState
removeReceiver		:: Id			!EditorState	->	EditorState

getKeyMapping		::				!EditorState	->	KeyMapping
setKeyMapping		:: KeyMapping	!EditorState	->	EditorState