| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Engine.ReactiveBanana.Widget
Contents
Synopsis
- data Widget e b = Widget {}
- type Widget' a = Widget a a
- wrap :: (Event e -> Event i) -> (Behavior b -> Behavior c) -> (IO () -> IO ()) -> Widget e b -> Widget i c
- data Instance e b = Instance {}
- install :: MomentIO (Widget e b) -> MomentIO (Instance e b)
- drawB :: Behavior b -> IO () -> Widget Void b
- draw_ :: IO () -> Widget Void ()
- collectB :: Traversable t => t (MomentIO (Widget e b)) -> MomentIO (Widget () (t b))
- clumpWithB :: (lb -> rb -> b) -> Widget le lb -> Widget re rb -> Widget () b
- clumpWith :: (ae -> ce) -> (be -> ce) -> (ae -> be -> ce) -> (ab -> bb -> cb) -> Widget ae ab -> Widget be bb -> Widget ce cb
- clump :: Widget ae ab -> Widget b bb -> Widget (These ae b) (ab, bb)
- clumpB :: (ab -> bb -> b) -> Widget ae ab -> Widget be bb -> Widget (These ae be) b
- attachLeft :: Widget ae ab -> Widget be bb -> Widget ae ab
- attachRight :: Widget ae ab -> Widget be bb -> Widget be bb
Documentation
A composable pair of actions for planning and running stages.
wrap :: (Event e -> Event i) -> (Behavior b -> Behavior c) -> (IO () -> IO ()) -> Widget e b -> Widget i c Source #
Like bimap, but wraps draw function too.
Parent draw can be called at wrapper discretion.
Combinators
drawB :: Behavior b -> IO () -> Widget Void b Source #
A widget without events of its own, sampling external behavior.
clumpWith :: (ae -> ce) -> (be -> ce) -> (ae -> be -> ce) -> (ab -> bb -> cb) -> Widget ae ab -> Widget be bb -> Widget ce cb Source #