Safe Haskell | None |
---|---|
Language | Haskell2010 |
- overRange :: CrdRange -> (YiString -> YiString) -> BufAction ()
- replaceRange :: CrdRange -> YiString -> BufAction ()
- deleteRange :: CrdRange -> BufAction ()
- insertAt :: Coord -> YiString -> BufAction ()
- sizeOf :: YiString -> Coord
- getLineRange :: Row -> BufAction (Maybe CrdRange)
- bufDo :: BufRef -> BufAction a -> App (Maybe a)
- bufDo_ :: BufRef -> BufAction a -> App ()
- buffersDo :: BufAction a -> App [a]
- buffersDo_ :: BufAction a -> App ()
- getBufRefs :: App [BufRef]
- nextBufRef :: BufRef -> App BufRef
- prevBufRef :: BufRef -> App BufRef
- getBufExt :: (Typeable s, Show s, Default s) => BufAction s
- setBufExt :: (Typeable s, Show s, Default s) => s -> BufAction ()
- overBufExt :: (Typeable s, Show s, Default s) => (s -> s) -> BufAction ()
- getBufRef :: BufAction BufRef
- getRange :: CrdRange -> BufAction YiString
- addBuffer :: YiString -> App BufRef
- getBuffer :: BufRef -> App (Maybe Buffer)
- dispatchBufEvent :: (Monoid result, Typeable eventType, Typeable result) => eventType -> BufAction result
- addBufListener :: (Typeable eventType, Typeable result, Monoid result) => (eventType -> BufAction result) -> BufAction ListenerId
- addBufListener_ :: (Typeable eventType, Typeable result, Monoid result) => (eventType -> BufAction result) -> BufAction ()
- removeBufListener :: ListenerId -> BufAction ()
- onBufAdded :: (BufAdded -> App result) -> App ListenerId
- onBufAdded_ :: (BufAdded -> App result) -> App ()
- dispatchBufAdded :: BufAdded -> App ()
- onEveryNewBuffer :: BufAction a -> App ListenerId
- onEveryNewBuffer_ :: BufAction a -> App ()
- onBufTextChanged :: (BufTextChanged -> BufAction result) -> BufAction ListenerId
- dispatchBufTextChanged :: BufTextChanged -> BufAction ()
- getText :: BufAction YiString
Documentation
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.
insertAt :: Coord -> YiString -> BufAction () Source #
Inserts text into the buffer at the given Coord
.
sizeOf :: YiString -> Coord Source #
Returns the number of rows and columns that a chunk of text spans as a Coord
getLineRange :: Row -> BufAction (Maybe CrdRange) Source #
Gets the range representing a given row (if that row exists)
Performing Apps on Buffers
buffersDo_ :: BufAction a -> App () Source #
Editor Apps
getBufExt :: (Typeable s, Show s, Default s) => BufAction s Source #
Retrieve some buffer extension state
setBufExt :: (Typeable s, Show s, Default s) => s -> BufAction () Source #
Set some buffer extension state
overBufExt :: (Typeable s, Show s, Default s) => (s -> s) -> BufAction () Source #
Set some buffer extension state
getBuffer :: BufRef -> App (Maybe Buffer) Source #
Retrieve a buffer. This is read-only for loggingrenderingdebugging purposes only.
dispatchBufEvent :: (Monoid result, Typeable eventType, Typeable result) => eventType -> BufAction result Source #
Dispatches an event of any type to the BufAction's buffer.
See dispatchEvent
addBufListener :: (Typeable eventType, Typeable result, Monoid result) => (eventType -> BufAction result) -> BufAction ListenerId Source #
Adds a listener to the BufAction's buffer.
See addListener
addBufListener_ :: (Typeable eventType, Typeable result, Monoid result) => (eventType -> BufAction result) -> BufAction () Source #
removeBufListener :: ListenerId -> BufAction () Source #
Removes a listener from the BufAction's buffer.
See removeListener
onBufAdded :: (BufAdded -> App result) -> App ListenerId Source #
onEveryNewBuffer :: BufAction a -> App ListenerId Source #
Run the given BufAction
over all new buffers
onEveryNewBuffer_ :: BufAction a -> App () Source #
onBufTextChanged :: (BufTextChanged -> BufAction result) -> BufAction ListenerId Source #
This is fired every time text in a buffer changes.
The range of text which was altered and the new value of that text are provided inside a BufTextChanged
event.
dispatchBufTextChanged :: BufTextChanged -> BufAction () Source #
Dispatch the BufBufTextChanged
action.