Safe Haskell | None |
---|---|
Language | Haskell2010 |
- pt :: Int -> Int -> Point
- start :: Point
- lineStart :: Int -> Point
- regionLength :: Lens' Region Size
- till :: Point -> Point -> Region
- linesSize :: Int -> Size
- regionLines :: Lens' Region Int
- emptyRegion :: Region -> Bool
- line :: Int -> Region
- regionSize :: Point -> Size -> Region
- expandLines :: Region -> Region
- atRegion :: Editable s => Region -> Lens' (Contents s) (Contents s)
- overlaps :: Region -> Region -> Bool
- applyMap :: Map -> Region -> Region
- cutMap :: Region -> Map
- insertMap :: Region -> Map
- cutRegion :: Region -> Region -> Region
- insertRegion :: Region -> Region -> Region
- class Editable s => EditAction e s where
- replace :: EditAction e s => Region -> s -> e s
- cut :: EditAction e s => Region -> e s
- paste :: EditAction e s => Point -> s -> e s
- overwrite :: EditAction e s => Point -> s -> e s
- apply :: Editable s => Edit s -> s -> s
- update :: (Editable s, Regioned r) => Edit s -> r -> r
- undo :: Editable s => Edit s -> s -> Edit s
- module Data.Text.Region.Types
Documentation
line :: Int -> Region Source #
n'th line region, starts at the beginning of line and ends on the next line
insertRegion :: Region -> Region -> Region Source #
Update second region position as if it was data inserted at first region (region sets insertion point and data size) Region tries not to extend if data inserted at region bound except when region is empty This allows define replace as cut and insert in special case when we replace region itself
class Editable s => EditAction e s where Source #
replaceAction :: Region -> Contents s -> e s Source #
actionMap :: e s -> Map Source #
Make Map
from action
perform :: e s -> Contents s -> Contents s Source #
Perform action, modifying Contents
inversed :: e s -> Contents s -> e s Source #
Get action undo
Editable s => EditAction Replace s Source # | |
Editable s => EditAction Edit s Source # | |
replace :: EditAction e s => Region -> s -> e s Source #
Replace region with data
cut :: EditAction e s => Region -> e s Source #
Cuts region
module Data.Text.Region.Types