EdWindow.dcl 896 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
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
22
	Int											// right margin (0 means no margin)
Diederik van Arkel's avatar
Diederik van Arkel committed
23
24
25
	SyntaxColours								// syntax colours
	Id											// window id
	[.WindowAttribute *(EditState,*PSt *b)]		// initial attributes
26
	!*(PSt *b) -> *PSt *b | Editor b;
Diederik van Arkel's avatar
Diederik van Arkel committed
27
28
29
30
31

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