Mercurial > gui
comparison togglePanel.urs @ 21:30f9a763f5fb
Tweak TogglePanel signature
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sat, 24 Sep 2011 17:35:33 -0400 |
parents | 554e342665fe |
children | 5905b56e0cd9 |
comparison
equal
deleted
inserted
replaced
20:554e342665fe | 21:30f9a763f5fb |
---|---|
5 con togglePanel :: Type -> {Unit} -> Type | 5 con togglePanel :: Type -> {Unit} -> Type |
6 (* The type of appearing and disappearing panels. The arguments | 6 (* The type of appearing and disappearing panels. The arguments |
7 * are as for [Gui.gui]. *) | 7 * are as for [Gui.gui]. *) |
8 | 8 |
9 con formatCtl = fn ctx :: {Unit} => [body ~ ctx] => | 9 con formatCtl = fn ctx :: {Unit} => [body ~ ctx] => |
10 {FormatPanel : xbody -> xbody -> xml (body ++ ctx) [] [], | 10 {FormatPanel : xml (body ++ ctx) [] [] |
11 -> xml (body ++ ctx) [] [] | |
12 -> xml (body ++ ctx) [] [], | |
11 (* Allows for formatting the panel. The first two parameters | 13 (* Allows for formatting the panel. The first two parameters |
12 * represent "holes" for the control and panel respectively while | 14 * represent "holes" for the control and panel respectively while |
13 * the result should be the desired XML laying out the whole structure. | 15 * the result should be the desired XML laying out the whole structure. |
14 * The controls can be formatted with the options below. | 16 * The controls can be formatted with the options below. |
15 * The panel part appears and disappears according to the use | 17 * The panel part appears and disappears according to the use |
16 * of the controls. *) | 18 * of the controls. *) |
17 | 19 |
18 OpenCtl : transaction unit -> xbody, | 20 OpenCtl : transaction unit -> xml (body ++ ctx) [] [], |
19 (* This should accept the transaction representing the opening of | 21 (* This should accept the transaction representing the opening of |
20 * the panel and produce an XML control having this as action. *) | 22 * the panel and produce an XML control having this as action. *) |
21 | 23 |
22 CloseCtl : transaction unit -> xbody} | 24 CloseCtl : transaction unit -> xml (body ++ ctx) [] []} |
23 (* This should accept the transaction representing the closing of | 25 (* This should accept the transaction representing the closing of |
24 * the panel and produce an xml control having this as action. *) | 26 * the panel and produce an xml control having this as action. *) |
25 | 27 |
26 (* Some reasonable default formats for the layout and controls. *) | 28 (* Some reasonable default formats for the layout and controls. *) |
27 val defaultFormat : formatCtl [] | 29 val defaultFormat : formatCtl [] |