yi-core-0.18.0: Yi editor core library

LicenseGPL-2
Maintaineryi-devel@googlegroups.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010
ExtensionsFlexibleContexts

Yi.UI.Utils

Description

Utilities shared by various UIs

Synopsis

Documentation

strokePicture :: [Span (Endo a)] -> [(Point, a -> a)] Source #

Turn a sequence of (from,style,to) strokes into a sequence of picture points (from,style), taking special care to ensure that the points are strictly increasing and introducing padding segments where neccessary. Precondition: Strokes are ordered and not overlapping.

paintStrokes :: (a -> a) -> a -> [(Point, a -> a)] -> [(Point, a)] -> [(Point, a)] Source #

Paint the given stroke-picture on top of an existing picture

paintPicture :: a -> [[Span (Endo a)]] -> [(Point, a)] Source #

arrangeItems :: [Text] -> Int -> Int -> [Text] Source #

Arrange a list of items in columns over maximum maxNumberOfLines lines

arrangeItems' :: [Text] -> Int -> Int -> (Int, [Text]) Source #

Arrange a list of items in columns over numberOfLines lines.

TODO: proper Text/YiString implementation