annotate 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
rev   line source
kkallio@8 1 (* Gui framework elements common across individual components. *)
kkallio@8 2
kkallio@8 3 (* Types of this class describe gui components. *)
adam@20 4 class gui :: Type (* The type of an object to render *)
adam@27 5 -> {Unit} (* The HTML context to render it for (minus [Dyn]) *)
adam@20 6 -> Type
rmbruijn@18 7
rmbruijn@18 8 (* How to add components to the gui class. *)
adam@27 9 val mkGui : t ::: Type -> ctx ::: {Unit} -> ([[Dyn] ~ ctx] => t -> xml ([Dyn] ++ ctx) [] []) -> gui t ctx
rmbruijn@18 10
adam@20 11 (* XML itself can be a gui component. *)
adam@27 12 val gui_xbody : gui xbody body'
adam@27 13 val gui_xtable : gui xtable tabl'
rmbruijn@18 14
kkallio@8 15 (* Currently the only thing a gui component can do is be
kkallio@8 16 * pretty printed to a piece of xml. *)
adam@27 17 val toXml : t ::: Type -> ctx ::: {Unit} -> [[Dyn] ~ ctx] => gui t ctx -> t -> xml ([Dyn] ++ ctx) [] []