aboutsummaryrefslogtreecommitdiff
path: root/src/Internal/LayoutZipper.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-04-09 15:09:55 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:46 -0600
commit3f6b3dd99cd45fdd063580fa1deb03257c65e83e (patch)
tree7e668f37fd957cf294cc1f7d44d80659c1b6eee0 /src/Internal/LayoutZipper.hs
parentc796e7533cd8da13f42961966313c926810f6468 (diff)
downloadrde-3f6b3dd99cd45fdd063580fa1deb03257c65e83e.tar.gz
rde-3f6b3dd99cd45fdd063580fa1deb03257c65e83e.tar.bz2
rde-3f6b3dd99cd45fdd063580fa1deb03257c65e83e.zip
Change mosaic to respond to multiple different kinds of messages
Diffstat (limited to 'src/Internal/LayoutZipper.hs')
-rw-r--r--src/Internal/LayoutZipper.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Internal/LayoutZipper.hs b/src/Internal/LayoutZipper.hs
index 136b913..e34a078 100644
--- a/src/Internal/LayoutZipper.hs
+++ b/src/Internal/LayoutZipper.hs
@@ -42,12 +42,15 @@ data NavigateLayout =
}
deriving (Typeable)
+-- NavigateLayout instance to move to the next layout, circularly.
toNextLayout :: NavigateLayout
toNextLayout = SetLayout (+1) True
+-- NavigateLayout instance to move to the previous layout, circularly.
toPreviousLayout :: NavigateLayout
toPreviousLayout = SetLayout (\x -> x - 1) True
+-- NavigateLayotu instance to move to the first layout.
toFirstLayout :: NavigateLayout
toFirstLayout = SetLayout (const 0) True