Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cursor.Brick.Text
Synopsis
- selectedTextCursorWidget :: n -> TextCursor -> Widget n
- textCursorWidget :: TextCursor -> Widget n
- textWidget :: Text -> Widget n
- textWidgetWrap :: Text -> Widget n
- textLineWidget :: Text -> Widget n
- textLineWidgetWrap :: Text -> Widget n
- nonNullLinesText :: Text -> Text
- nonNullText :: Text -> Text
- sanitiseText :: Text -> Text
Documentation
selectedTextCursorWidget :: n -> TextCursor -> Widget n Source #
Make a text cursor widget with a blink-y box.
This function does not wrap the given text.
Otherwise, because of the way indexes work, there would be rendering errors for text that crosses the side of the terminal.
textCursorWidget :: TextCursor -> Widget n Source #
Make a text cursor widget without a blink-y box.
This function does not wrap the given text.
textWidget :: Text -> Widget n Source #
Draw an arbitrary Text, it will be sanitised.
textWidgetWrap :: Text -> Widget n Source #
Draw an arbitrary Text (with wrapping), it will be sanitised.
textLineWidget :: Text -> Widget n Source #
Draw an arbitrary single-line Text, it will be sanitised.
textLineWidgetWrap :: Text -> Widget n Source #
Draw an arbitrary single-line Text (with wrapping), it will be sanitised.
nonNullLinesText :: Text -> Text Source #
Makes every line of a Text non-empty using nonNullText
nonNullText :: Text -> Text Source #
Makes a text non-empty.
This turns the empty text into " " and leaves other text as-is.
sanitiseText :: Text -> Text Source #
Replace tabs by spaces so that brick doesn't render nonsense.
See https://hackage.haskell.org/package/brick/docs/Brick-Widgets-Core.html#v:txt