Hook up WS connection to client UI

This commit is contained in:
Joscha 2020-02-10 23:09:13 +00:00
parent 9f5d1c5684
commit 5e7c2952a1
5 changed files with 129 additions and 111 deletions

View file

@ -1,7 +1,7 @@
module Forest.Client.Tree
( Tree
, newTree
, switchNode
, replaceNode
, renderTree
-- * Focused element
, getCurrent
@ -64,8 +64,8 @@ newTree node focused unfolded = Tree
-- | Switch out a tree's node, keeping as much of the focus and folding
-- information as the type's invariants allow.
switchNode :: Node -> Tree -> Tree
switchNode node tree = newTree node (treeFocused tree) (treeUnfolded tree)
replaceNode :: Node -> Tree -> Tree
replaceNode node tree = newTree node (treeFocused tree) (treeUnfolded tree)
-- | Render a 'Tree' into a widget.
renderTree :: IndentOptions -> Maybe NodeEditor -> Tree -> Widget ResourceName