rewrite-inspector-0.1.0.11: Inspection of rewriting steps

Copyright(C) 2019 QBayLogic
LicenseBSD2 (see the file LICENSE)
MaintainerOrestis Melkonian <melkon.or@gmail.com>
Safe HaskellNone
LanguageHaskell2010

BrickUI

Contents

Description

Basic functionality for the terminal user-inteface (TUI).

Synopsis

Documentation

runTerminal :: forall term. Diff term => FilePath -> IO () Source #

Entry point for the TUI.

app :: Diff term => AttrMap -> App (VizStates term) NoCustomEvent Name Source #

The App configuration.

chooseCursor :: VizStates term -> [Cursor] -> Maybe Cursor Source #

Choose a single cursor to display, out of possibly many requests.

Display.

drawUI :: forall term. Diff term => VizStates term -> [Widget Name] Source #

Event handling.

lookupSize :: EventM Name (VizStates term -> VizStates term) Source #

Lookup terminal size and store in the current state.

updateOcc :: Diff term => VizStates term -> VizStates term Source #

Update number of occurrences of searched string in both viewports.

handleStart :: forall term. Diff term => VizStates term -> BrickEvent Name NoCustomEvent -> EventM Name (Next (VizStates term)) Source #

Lookup code sizes and store them in the current state, then handle events.

handleEvent :: Diff term => VizStates term -> BrickEvent Name NoCustomEvent -> EventM Name (Next (VizStates term)) Source #

Handle keyboard events.

Scrolling.

scrollStep :: Int Source #

The amount of scrolling with each request (in pixels).

visibleCursors :: Int -> Widget Name -> Widget Name Source #

Gather all cursor placement requests coming from within the given Widget, filter out only those that are the result of a search command, and convert the current one (based on the current occurrence number) to a visibility request. NB: Only to be used within a viewport.

invisibleCursors :: Widget n -> Widget n Source #

Remove all cursor placement requests coming from within the given Widget. NB: Only to be used within a viewport.

Orphan instances

MonadFail (EventM Name) Source #

Allow pattern matches in EventM monadic do blocks.

Instance details

Methods

fail :: String -> EventM Name a #