flexwin.dcl 1.04 KB
Newer Older
Diederik van Arkel's avatar
Diederik van Arkel committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
definition module flexwin

import StdEnv, StdIO
//import ShowProfile

//::	FlexBarWindow ls pst = FlexBarWindow Title [(String, Maybe Int)] [WindowAttribute *(ls,pst)]
//::	FlexBarWindow ls pst
//	= FlexBarWindow Title [(String, Maybe Int)] .[FormattedProfile] (R2Id (MessageIn ls) MessageOut) [WindowAttribute *(ls,pst)]
//::	FlexBarWindow s ls pst
//	= FlexBarWindow Title [(String, Maybe Int)] [s] (R2Id (MessageIn s) MessageOut) [WindowAttribute *(ls,pst)]

class content_size c :: FontMetrics c -> Int

::FlexBarState s
::	FlexBarWindow s ls pst
	= FlexBarWindow Title [(String, Maybe Int)] s
		(!s .Int .Int [.Int] -> (.SelectState .UpdateState -> .(*Picture -> *Picture)))
		![(FlexBarState s) -> FlexBarState s]
		(R2Id (MessageIn s) (MessageOut s)) [WindowAttribute *(ls,pst)]

:: MessageIn s
	= FW_DummyIn
	| FW_SetContent s		//[.FormattedProfile]
	| FW_ApplyFunction Int
	| FW_GetContent

:: MessageOut s
	= FW_DummyOut
	| FW_ContentOut s

instance Windows (FlexBarWindow s) | content_size s

//--

appInfo :: (s->s) !(FlexBarState s) -> FlexBarState s