Source codeContentsIndex
Mark
Description
This module provides access to text marks inside an editor widget.
Synopsis
data Editor
data Gravity
= ToLeft
| ToRight
data Mark = Mark Editor String
createMark :: (HasIndex Editor i BaseIndex) => Editor -> String -> i -> IO Mark
setMarkGravity :: Mark -> Gravity -> IO ()
setMark :: (HasIndex Editor i BaseIndex) => Mark -> i -> IO ()
unsetMark :: Mark -> IO ()
getCurrentMarks :: Editor -> IO [Mark]
Documentation
data Editor
The Editor datatpe.
data Gravity
Constructors
ToLeft
ToRight
Instances
Read Gravity
Show Gravity
GUIValue Gravity
data Mark
The Mark datatype.
Constructors
Mark Editor String
Instances
HasIndex Editor Mark BaseIndex
createMark
:: (HasIndex Editor i BaseIndex)
=> Editor the concerned editor widget.
-> String the name of the text mark to create.
-> i the text marks index position inside the editor widget.
-> IO Mark A text mark.
Creates a text mark inside an editor widget and returns a handler.
setMarkGravity
:: Mark the concerned text mark.
-> Gravity the gravity to set.
-> IO () None.
Sets the gravity of the given text mark.
setMark
:: (HasIndex Editor i BaseIndex)
=> Mark the concerned tex mark.
-> i
-> IO () None.
Sets the index position of the text mark.
unsetMark
:: Mark the concerned text mark.
-> IO () None.
Unsets a text mark inside an editor widget.
getCurrentMarks
:: Editor the concerned editor widget.
-> IO [Mark] A list of text marks.
Gets the current marks from an editor widget.
Produced by Haddock version 0.3