| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
HTk.Widgets.Editor
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.
- data Editor
- newEditor :: Container par => par -> [Config Editor] -> IO Editor
- deleteText :: HasIndex Editor i BaseIndex => Editor -> i -> IO ()
- deleteTextRange :: (HasIndex Editor i1 BaseIndex, HasIndex Editor i2 BaseIndex) => Editor -> i1 -> i2 -> IO ()
- getTextRange :: (HasIndex Editor i1 BaseIndex, HasIndex Editor i2 BaseIndex) => Editor -> i1 -> i2 -> IO String
- insertText :: (HasIndex Editor i BaseIndex, GUIValue a) => Editor -> i -> a -> IO ()
- insertNewline :: Editor -> IO ()
- getTextLine :: HasIndex Editor i BaseIndex => Editor -> i -> IO String
- appendText :: Editor -> String -> IO ()
- getIndexPosition :: HasIndex Editor i BaseIndex => Editor -> i -> IO Position
- compareIndices :: (HasIndex Editor i1 BaseIndex, HasIndex Editor i2 BaseIndex) => Editor -> String -> i1 -> i2 -> IO Bool
- writeTextToFile :: Editor -> FilePath -> IO ()
- readTextFromFile :: Editor -> FilePath -> IO ()
- class GUIObject w => HasTabulators w where
- class GUIObject w => HasLineSpacing w where
- adjustViewTo :: HasIndex Editor i BaseIndex => Editor -> i -> IO ()
- scanMark :: HasIndex Editor i BaseIndex => Editor -> i -> IO ()
- scanDragTo :: HasIndex Editor i BaseIndex => Editor -> i -> IO ()
- data SearchDirection
- data SearchMode
- data SearchSwitch = SearchSwitch {}
- search :: HasIndex Editor i BaseIndex => Editor -> SearchSwitch -> String -> i -> IO (Maybe BaseIndex)
- newtype IndexModifiers = IndexModifiers [IndexModifier]
- data IndexModifier
- data WrapMode
- wrap :: WrapMode -> Config Editor
- getWrapMode :: Editor -> IO WrapMode
Documentation
The Editor datatpe.
Instances
| Eq Editor Source # | |
| Destroyable Editor Source # | An editor widget can be destroyed. |
| Synchronized Editor Source # | You can synchronize on an editor widget. |
| GUIObject Editor Source # | Internal. |
| HasEnable Editor Source # | A editor widget is a stateful widget, it can be enabled or disabled. |
| HasFont Editor Source # | You can specify the font of an editor widget. |
| HasBorder Editor Source # | A editor widget has a configureable border. |
| HasSize Editor Source # | You can specify the size of an editor widget. |
| HasColour Editor Source # | An editor widget has a foreground and background colour. |
| HasTooltip Editor Source # | An editor widget can have a tooltip. |
| Widget Editor Source # | An editor widget has standard widget properties (concerning focus, cursor). |
| Container Editor Source # | An editor is also a container for widgets, because it can contain widgets in embedded windows. |
| HasScroller Editor Source # | An editor is a scrollable widget. |
| HasSelection Editor Source # | You can select text inside an editor widget. |
| HasXSelection Editor Source # | An editor widget has an X selection. |
| HasInsertionCursor Editor Source # | An editor widget has an insertion cursor. |
| HasLineSpacing Editor Source # | You can adjust the line spacing of an editor widget. |
| HasTabulators Editor Source # | An editor widget has adjustable tab stops. |
| HasMarkupText Editor Source # | An editor widget is a container for markup text. |
| GUIValue a => HasValue Editor a Source # | An editor widget has a value (its textual content). |
| HasIndex Editor i BaseIndex => HasBBox Editor i Source # | You can find out the bounding box of characters inside an editor widget. |
| HasIndex Editor i BaseIndex => HasSelectionIndex Editor i Source # | An editor widget's characters are selectable. |
| HasIndex Editor i BaseIndex => HasInsertionCursorIndexSet Editor i Source # | The insertion cursor of an editor widget can be set by a base index. |
| (HasIndex Editor i1 BaseIndex, HasIndex Editor i2 BaseIndex) => HasSelectionIndexRange Editor i1 i2 Source # | You can select a text range inside an editor widget. |
| HasIndex Editor BaseIndex BaseIndex Source # | A base index is a valid index for an editor widget. |
| HasIndex Editor Pixels BaseIndex Source # | A position in pixels is a valid index for an editor widget. |
| HasIndex Editor EndOfText BaseIndex Source # | The |
| HasIndex Editor EmbeddedTextWin BaseIndex Source # | Internal. |
| HasIndex Editor Mark BaseIndex Source # | Internal. |
| HasIndex Editor i BaseIndex => HasIndex Editor i (Distance, Distance) Source # | Internal. |
| HasSelectionBaseIndexRange Editor (Distance, Distance) Source # | You can select a text range inside an editor widget. |
| HasSelectionBaseIndex Editor ((Distance, Distance), (Distance, Distance)) Source # | You can select a text range inside an editor widget. |
| HasInsertionCursorIndexGet Editor (Distance, Distance) Source # | You can get the position of the insertion cursor of an editor widget. |
| HasIndex Editor i BaseIndex => HasIndex Editor (i, IndexModifier) BaseIndex Source # | A pair of a valid index and an index modifier is a valid index for an editor widget. |
| HasIndex Editor i BaseIndex => HasIndex Editor (i, [IndexModifier]) BaseIndex Source # | A pair of a valid index and a list of index modifiers is a valid index for an editor widget. |
| HasIndex Editor (Distance, Distance) BaseIndex Source # | A pair of line and character is a valid index for an editor widget. |
| HasIndex Editor (TextTag, Last) BaseIndex Source # | Internal. |
| HasIndex Editor (TextTag, First) BaseIndex Source # | Internal. |
Arguments
| :: Container par | |
| => par | the parent widget, which has to be a container widget
(an instance of |
| -> [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.
Arguments
| :: HasIndex Editor i BaseIndex | |
| => Editor | the concerned editor widget. |
| -> i | the concerned index. |
| -> IO () | None. |
Deletes the character at the specified index.
Arguments
| :: (HasIndex Editor i1 BaseIndex, HasIndex Editor i2 BaseIndex) | |
| => Editor | the start index. |
| -> i1 | the end index. |
| -> i2 | |
| -> IO () | None. |
Deletes the text in the specified range.
Arguments
| :: (HasIndex Editor i1 BaseIndex, HasIndex Editor i2 BaseIndex) | |
| => Editor | the concerned editor widget. |
| -> i1 | the start index. |
| -> i2 | the end index. |
| -> IO String | The editor's text in the specified range. |
Gets the text in the specified range.
Arguments
| :: (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.
Inserts a newline character at the end of the editor widget.
Arguments
| :: 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.
Appends text at the end of the editor widget.
Arguments
| :: HasIndex Editor i BaseIndex | |
| => Editor | the concerned editor widget. |
| -> i | the concerned index. |
| -> IO Position | The requested position. |
Returns the position on the text widget for a given index.
Arguments
| :: (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 |
|
Compares two indizes.
Writes the contained text to a file.
Reads a text from a file and inserts it into the editor pane.
class GUIObject w => HasTabulators w where Source #
Widgets with adjustable tab stops instantiate the
class HasTabulators.
Instances
| HasTabulators Editor Source # | An editor widget has adjustable tab stops. |
| HasTabulators TextTag Source # | A text tag has adjustable tab stops. |
class GUIObject w => HasLineSpacing w where Source #
Widgets with an adjustable line spacing instantiate the
class HasLineSpacing.
Methods
spaceAbove :: Distance -> Config w Source #
getSpaceAbove :: w -> IO Distance Source #
spaceWrap :: Distance -> Config w Source #
getSpaceWrap :: w -> IO Distance Source #
spaceBelow :: Distance -> Config w Source #
getSpaceBelow :: w -> IO Distance Source #
Instances
| HasLineSpacing Editor Source # | You can adjust the line spacing of an editor widget. |
| HasLineSpacing TextTag Source # | A text tag has a configureable line spacing. |
Arguments
| :: HasIndex Editor i BaseIndex | |
| => Editor | the concerned editor widget. |
| -> i | the index to adjust the view to. |
| -> IO () | None. |
Adjusts the view so that the character at the specified position is visible.
Arguments
| :: HasIndex Editor i BaseIndex | |
| => Editor | the concerned editor widget. |
| -> i | the concerned index. |
| -> IO () | None. |
Anchor a scrolling operation.
Arguments
| :: HasIndex Editor i BaseIndex | |
| => Editor | the concerned editor widget. |
| -> i | the concerned index. |
| -> IO () | None. |
Scroll based on a new position.
data SearchMode Source #
The SearchMode datatype.
Instances
| Enum SearchMode Source # | |
| Eq SearchMode Source # | |
| Ord SearchMode Source # | |
| Show SearchMode Source # | Internal. |
data SearchSwitch Source #
The SearchSwitch datatype.
Constructors
| SearchSwitch | |
Fields | |
Instances
| Show SearchSwitch Source # | Internal. |
Arguments
| :: 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 Source #
The IndexModifiers datatype.
Constructors
| IndexModifiers [IndexModifier] |
Instances
| Show IndexModifiers Source # | Internal. |
data IndexModifier Source #
The IndexModifier datatype.
Constructors
| ForwardChars Int | |
| BackwardChars Int | |
| ForwardLines Int | |
| BackwardLines Int | |
| LineStart | |
| LineEnd | |
| WordStart | |
| WordEnd |
Instances
| Show IndexModifier Source # | Internal. |
| HasIndex Editor i BaseIndex => HasIndex Editor (i, IndexModifier) BaseIndex Source # | A pair of a valid index and an index modifier is a valid index for an editor widget. |
| HasIndex Editor i BaseIndex => HasIndex Editor (i, [IndexModifier]) BaseIndex Source # | A pair of a valid index and a list of index modifiers is a valid index for an editor widget. |
The WrapMode datatype.