Mercurial > gui
view gui.urs @ 33:2e7f8f7d71d4
Update for Ur/Web's new tag name resolution
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 21 Nov 2013 16:12:17 -0500 |
parents | 5905b56e0cd9 |
children |
line wrap: on
line source
(* Gui framework elements common across individual components. *) (* Types of this class describe gui components. *) class gui :: Type (* The type of an object to render *) -> {Unit} (* The HTML context to render it for (minus [Dyn]) *) -> Type (* How to add components to the gui class. *) val mkGui : t ::: Type -> ctx ::: {Unit} -> ([[Dyn] ~ ctx] => t -> xml ([Dyn] ++ ctx) [] []) -> gui t ctx (* XML itself can be a gui component. *) val gui_xbody : gui xbody body' val gui_xtable : gui xtable tabl' (* Currently the only thing a gui component can do is be * pretty printed to a piece of xml. *) val toXml : t ::: Type -> ctx ::: {Unit} -> [[Dyn] ~ ctx] => gui t ctx -> t -> xml ([Dyn] ++ ctx) [] []