This module provides the main event loop functionality for this library. All vty-ui applications must use runUi to get anything done usefully.
- type Collection = IORef CollectionData
- data CollectionError = BadCollectionIndex Int
- runUi :: Collection -> RenderContext -> IO ()
- schedule :: IO () -> IO ()
- shutdownUi :: IO ()
- newCollection :: IO Collection
- addToCollection :: Show a => Collection -> Widget a -> Widget FocusGroup -> IO (IO ())
- setCurrentEntry :: Collection -> Int -> IO ()
Schedule a widget-mutating
IO action to be run by the main event
loop. Use of this function is required to guarantee consistency
between interface presentation and internal state.
Schedule a vty-ui event loop shutdown. This event will preempt others so that it will be processed next.
Add a widget and its focus group to a collection. Returns an action which, when invoked, will switch to the interface specified in the call.