|
|
|
|
|
| Description |
| HTk's editor widget.
A text container for editing purposes. An editor widget can contain
text tags, to which you can bind events, and also embedded windows. |
|
| Synopsis |
|
|
|
| Documentation |
|
| module Selection |
|
| module ICursor |
|
| module Index |
|
| data ScrollBar |
| The ScrollBar datatype. |
|
| data ScrollUnit |
|
| class (Widget w) => HasScroller w where |
| | Methods | | isWfOrientation :: w -> Orientation -> Bool | | True for widgets that are scrollable in the given
orientation. | | | scrollbar :: Orientation -> ScrollBar -> Config w | | Associates a scrollbar with a scrollable widget. | | | moveto :: Orientation -> w -> Fraction -> IO () | | Positions the scrolled widget so the give Fraction is
off-screen to the left. | | | scroll :: Orientation -> w -> Int -> ScrollUnit -> IO () | | Scrolls the associated widget by n pages or units (depending on the
given ScrollUnit). | | | view :: Orientation -> w -> IO (Fraction, Fraction) | | Returns two fractions between 0 and 1 that describe the amount of
the widget off-screen to the left and the amount of the widget visible. |
| | | Instances | |
|
|
| data Editor |
| The Editor datatpe. |
|
| newEditor |
| :: (Container par) | | | => par | the parent widget, which has to be a container widget
(an instance of class Container). | | -> [Config Editor] | the list of configuration options for this editor. | | -> IO Editor | An editor widget. | | Constructs a new editor widget and returns it as a value. |
|
|
| deleteText |
| :: (HasIndex Editor i BaseIndex) | | | => Editor | the concerned editor widget. | | -> i | the concerned index. | | -> IO () | None. | | Deletes the character at the specified index. |
|
|
| deleteTextRange |
|
|
| getTextRange |
|
|
| insertText |
| :: (HasIndex Editor i BaseIndex, GUIValue a) | | | => Editor | the concerned editor widget. | | -> i | the index to insert the text. | | -> a | the text to insert. | | -> IO () | None. | | Inserts the given text at the specified index. |
|
|
| insertNewline |
| :: Editor | the concerned editor widget. | | -> IO () | None. | | Inserts a newline character at the end of the editor widget. |
|
|
| getTextLine |
| :: (HasIndex Editor i BaseIndex) | | | => Editor | the concerned editor widget. | | -> i | an index in the requested text line. | | -> IO String | The requested line of text. | | Gets a text line from an editor widget. |
|
|
| appendText |
| :: Editor | the concerned editor widget. | | -> String | the text to append. | | -> IO () | None. | | Appends text at the end of the editor widget. |
|
|
| getIndexPosition :: (HasIndex Editor i BaseIndex) => Editor -> i -> IO Position |
|
| compareIndices |
| :: (HasIndex Editor i1 BaseIndex, HasIndex Editor i2 BaseIndex) | | | => Editor | the concerned editor widget. | | -> String | an operation given as a string | | -> i1 | the first index. | | -> i2 | the second index. | | -> IO Bool | True or False, depending on
the given operation. | | Compares two indizes. |
|
|
| writeTextToFile |
| :: Editor | the concerned editor widget. | | -> FilePath | the name of the file. | | -> IO () | None. | | Writes the contained text to a file. |
|
|
| readTextFromFile |
| :: Editor | the concerned editor widget. | | -> FilePath | the name of the file. | | -> IO () | None. | | Reads a text from a file and inserts it into the editor pane. |
|
|
| class (GUIObject w) => HasTabulators w where |
| | Methods | | tabs :: String -> Config w | | Sets the tab stops. | | | getTabs :: w -> IO String | | Gets the tab stops. |
| | | Instances | |
|
|
| class (GUIObject w) => HasLineSpacing w where |
| Widgets with an adjustable line spacing instantiate the
class HasLineSpacing. | | | Methods | | spaceAbove :: Distance -> Config w | | Sets the space above an unwrapped line. | | | getSpaceAbove :: w -> IO Distance | | Gets the space above an unwrapped line. | | | spaceWrap :: Distance -> Config w | | Sets the space above a wrapped line. | | | getSpaceWrap :: w -> IO Distance | | Gets the space above a wrapped line. | | | spaceBelow :: Distance -> Config w | | Sets the space below an unwrapped line. | | | getSpaceBelow :: w -> IO Distance | | Sets the space below an unwrapped line. |
| | | Instances | |
|
|
| adjustViewTo :: (HasIndex Editor i BaseIndex) => Editor -> i -> IO () |
|
| scanMark |
|
|
| scanDragTo |
|
|
| data SearchDirection |
|
|
| data SearchMode |
|
|
| data SearchSwitch |
|
|
| search |
| :: (HasIndex Editor i BaseIndex) | | | => Editor | the concerned editor widget. | | -> SearchSwitch | the search switch. | | -> String | the searched text or regular expression. | | -> i | the start index. | | -> IO (Maybe BaseIndex) | The index of the first match (if successful). | | Searches for text inside an editor widget. |
|
|
| newtype IndexModifiers |
|
|
| data IndexModifier |
| The IndexModifier datatype. | | Constructors | | ForwardChars Int | | | BackwardChars Int | | | ForwardLines Int | | | BackwardLines Int | | | LineStart | | | LineEnd | | | WordStart | | | WordEnd | |
| | Instances | |
|
|
| data WrapMode |
| The WrapMode datatype. | | Constructors | | | Instances | |
|
|
| wrap :: WrapMode -> Config Editor |
| Sets the editor's wrap mode. |
|
| getWrapMode :: Editor -> IO WrapMode |
| Gets the editor's wrap mode. |
|
| Produced by Haddock version 0.3 |