Safe Haskell | None |
---|---|
Language | Haskell2010 |
- bufDo :: BufRef -> BufAction a -> Action (Maybe a)
- bufDo_ :: BufRef -> BufAction a -> Action ()
- buffersDo :: BufAction a -> Action [a]
- buffersDo_ :: BufAction a -> Action ()
- exit :: Action ()
- newBuffer :: YiString -> Action BufRef
- getBufRefs :: Action [BufRef]
- getBuffers :: Action [(BufRef, Buffer)]
- getBuffer :: BufRef -> Action (Maybe Buffer)
- nextBufRef :: BufRef -> Action BufRef
- prevBufRef :: BufRef -> Action BufRef
- overRange :: CrdRange -> (YiString -> YiString) -> BufAction ()
- replaceRange :: CrdRange -> YiString -> BufAction ()
- deleteRange :: CrdRange -> BufAction ()
- insertAt :: Coord -> YiString -> BufAction ()
- sizeOf :: YiString -> Coord
Performing Actions on Buffers
buffersDo_ :: BufAction a -> Action () Source #
Editor Actions
This signals to the editor that you'd like to shutdown. The current events
will finish processing, then the onExit
event will be dispatched,
then the editor will exit.
newBuffer :: YiString -> Action BufRef Source #
This adds a new buffer with the given text, returning a reference to that buffer.
getBuffers :: Action [(BufRef, Buffer)] Source #
Returns an up-to-date list of all Buffer
s, returned values
are read-only; altering them has no effect on the actual stored buffers.
This function is useful for renderers.
getBuffer :: BufRef -> Action (Maybe Buffer) Source #
Returns the Buffer
for a BufRef if it still exists.
This is read-only; altering the buffer has no effect on the stored buffer.
This function is useful for renderers.
Buffer Actions
overRange :: CrdRange -> (YiString -> YiString) -> BufAction () Source #
Runs function over given range of text
replaceRange :: CrdRange -> YiString -> BufAction () Source #
Replaces the text in the given range with the given text.
deleteRange :: CrdRange -> BufAction () Source #
Deletes the text in the given range from the buffer.