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

3
4
// opening and closing editor windows

5
6
7
8
9
10
from StdWindow		import :: Title, :: WindowAttribute
from StdPSt			import :: PSt
from StdId			import :: Id
from StdPicture		import :: Font
from EdText			import :: Text
from EdState		import class Editor
Diederik van Arkel's avatar
Diederik van Arkel committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import EdMonad, StdIOBasic, StdMaybe


// openEditWindow: create a new edit window with the given properties
openEditWindow ::
	Id											// undo menu item id
	.Title										// window title
	String										// file path
	Text										// initial text
	!Font										// initial font
	(Int,Bool,Bool,Bool,Bool)					// tabs
	SyntaxColours								// syntax colours
	Id											// window id
	[.WindowAttribute *(EditState,*PSt *b)]		// initial attributes
	!*(PSt *b) -> !*PSt *b | Editor b;

closeEditWindow ::
	!Id											// window id
	!*(PSt *b) -> *PSt *b | Editor b;