diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2017-03-01 09:48:47 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-03-01 09:48:47 -0700 |
commit | bb17a258054d190724f81062dca9cefba818d69a (patch) | |
tree | 914d5e1574e53157e5bb6b62ca022f65d17ae3d4 /UI.hs | |
parent | 120161665af41b254acfbb851f83bef83efc5522 (diff) | |
download | sscan-bb17a258054d190724f81062dca9cefba818d69a.tar.gz |
implement new action handlers in UI
Diffstat (limited to 'UI.hs')
-rw-r--r-- | UI.hs | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -99,16 +99,20 @@ drawUI st = [ui] ) handleQ :: St -> EventM () (Next St) -handleQ st = undefined +handleQ st = halt $ ifScanSess st + (setScanSessCommand Finalise st) + (resetScanSess st) handleRET :: St -> EventM () (Next St) -handleRET st = undefined +handleRET st = halt $ setScanSessCommand FinalPage st handleSPC :: St -> EventM () (Next St) -handleSPC st = undefined +handleSPC st = halt $ setScanSessCommand NextPage st handleESC :: St -> EventM () (Next St) -handleESC st = undefined +handleESC st = ifScanSess st + (halt $ setScanSessCommand Abort st) + (continue st) handleHotKey :: St -> Char -> EventM () (Next St) handleHotKey st 'q' = handleQ st |