WEditorBrick-0.1.0.0: Text-editor widget with dynamic line-wrapping for use with Brick.

Safe HaskellTrustworthy
LanguageHaskell2010

WEditorBrick.WrappingEditor

Description

A wrapping text-editor with dynamic sizing for Brick.

Synopsis

Documentation

data WrappingEditor c n Source #

Editor widget for use with Brick.

Instances
Show n => Show (WrappingEditor c n) Source # 
Instance details

Defined in WEditorBrick.WrappingEditor

Named (WrappingEditor c n) n Source # 
Instance details

Defined in WEditorBrick.WrappingEditor

Methods

getName :: WrappingEditor c n -> n #

type WrappingEditorAction c = forall a. (FixedFontViewer a c, FixedFontEditor a c) => a -> a Source #

Any action that updates the editor state.

type WrappingEditorDoer c b = forall a. (FixedFontViewer a c, FixedFontEditor a c) => a -> b Source #

Any action that reads the editor state.

doWrappingEditor :: WrappingEditorDoer c b -> WrappingEditor c n -> b Source #

Read from the editor state.

dumpWrappingEditor :: WrappingEditor c n -> [[c]] Source #

Dump the final contents of the edited document.

genericWrappingEditor :: (FixedFontViewer a c, FixedFontEditor a c) => n -> a -> WrappingEditor c n Source #

Create a new WrappingEditor using a custom editor component.

handleWrappingEditor :: Eq n => WrappingEditor Char n -> Event -> EventM n (WrappingEditor Char n) Source #

Update the editor based on Brick events.

mapWrappingEditor :: WrappingEditorAction c -> WrappingEditor c n -> WrappingEditor c n Source #

Update the editor state.

newWrappingEditor :: FixedFontParser a c => a -> n -> [[c]] -> WrappingEditor c n Source #

Create a new WrappingEditor using the default editor component.

renderWrappingEditor :: (Ord n, Show n) => Bool -> WrappingEditor Char n -> Widget n Source #

Render the editor as a Widget.