glazier-react-1.0.0.0: ReactJS binding using Glazier.Command.

Safe HaskellNone
LanguageHaskell2010

Glazier.React.Widget

Synopsis

Documentation

type Widget cmd p s a = ExceptT (Window s ()) (Gadget cmd p s) a Source #

A Widget is a Gadget that fires Either a Window or a value.

noIOWidget :: Widget (NoIOCmd cmd) s s a -> Widget cmd s s a -> Widget cmd s s a Source #

Use this function to verify at compile time that the first widget doesn't require any AsFacet (IO cmd) cmd.

magnifyWidget :: Traversal' t s -> ExceptT (Window s ()) (Gadget cmd p s) a -> ExceptT (Window t ()) (Gadget cmd p t) a Source #

widget :: Gadget cmd p s (Either (Window s ()) a) -> Widget cmd p s a Source #

Convert a Gadget into a Widget

runWidget :: Widget cmd p s a -> Gadget cmd p s (Either (Window s ()) a) Source #

mapWidget :: (Gadget cmd p s (Either (Window s ()) a) -> Gadget cmd p' s' (Either (Window s' ()) b)) -> Widget cmd p s a -> Widget cmd p' s' b Source #

display :: Window s () -> Widget cmd p s a Source #

overWindow :: (Window s () -> Window s ()) -> Widget cmd p s a -> Widget cmd p s a Source #

overWindow2 :: (Window s () -> Window s () -> Window s ()) -> Widget cmd p s a -> Widget cmd p s a -> Widget cmd p s a Source #

overWindow3 :: (Window s () -> Window s () -> Window s () -> Window s ()) -> Widget cmd p s a -> Widget cmd p s a -> Widget cmd p s a -> Widget cmd p s a Source #

overWindow2' :: ChooseBoth x1 x2 ys => (Window s () -> Window s () -> Window s ()) -> Widget cmd p s (Which x1) -> Widget cmd p s (Which x2) -> Widget cmd p s (Which ys) Source #

overWindow3' :: (Diversify x1 ys, Diversify x2 ys, Diversify x3 ys, ys ~ AppendUnique x1 (AppendUnique x2 x3)) => (Window s () -> Window s () -> Window s () -> Window s ()) -> Widget cmd p s (Which x1) -> Widget cmd p s (Which x2) -> Widget cmd p s (Which x3) -> Widget cmd p s (Which ys) Source #

withWindow :: Widget cmd p s a -> (Window s () -> Widget cmd p s a) -> Widget cmd p s a Source #

withWindow' :: ChooseBoth xs ys zs => Widget cmd p s (Which xs) -> (Window s () -> Widget cmd p s (Which ys)) -> Widget cmd p s (Which zs) Source #