uni-htk-2.2.1.0: Graphical User Interface for Haskell Programs

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.

Synopsis

Documentation

data Editor Source

The Editor datatpe.

Instances

Eq Editor 
Destroyable Editor

An editor widget can be destroyed.

Synchronized Editor

You can synchronize on an editor widget.

GUIObject Editor

Internal.

HasEnable Editor

A editor widget is a stateful widget, it can be enabled or disabled.

HasFont Editor

You can specify the font of an editor widget.

HasBorder Editor

A editor widget has a configureable border.

HasSize Editor

You can specify the size of an editor widget.

HasColour Editor

An editor widget has a foreground and background colour.

HasTooltip Editor

An editor widget can have a tooltip.

Widget Editor

An editor widget has standard widget properties (concerning focus, cursor).

Container Editor

An editor is also a container for widgets, because it can contain widgets in embedded windows.

HasInsertionCursor Editor

An editor widget has an insertion cursor.

HasSelection Editor

You can select text inside an editor widget.

HasXSelection Editor

An editor widget has an X selection.

HasScroller Editor

An editor is a scrollable widget.

HasLineSpacing Editor

You can adjust the line spacing of an editor widget.

HasTabulators Editor

An editor widget has adjustable tab stops.

HasMarkupText Editor

An editor widget is a container for markup text.

GUIValue a => HasValue Editor a

An editor widget has a value (its textual content).

HasIndex Editor i BaseIndex => HasBBox Editor i

You can find out the bounding box of characters inside an editor widget.

HasIndex Editor i BaseIndex => HasInsertionCursorIndexSet Editor i

The insertion cursor of an editor widget can be set by a base index.

HasIndex Editor i BaseIndex => HasSelectionIndex Editor i

An editor widget's characters are selectable.

HasIndex Editor BaseIndex BaseIndex

A base index is a valid index for an editor widget.

HasIndex Editor Pixels BaseIndex

A position in pixels is a valid index for an editor widget.

HasIndex Editor EndOfText BaseIndex

The EndOfText index is a valid index for an editor widget.

HasIndex Editor MousePosition BaseIndex

Internal.

HasIndex Editor Mark BaseIndex

Internal.

HasIndex Editor EmbeddedTextWin BaseIndex

Internal.

(HasIndex Editor i1 BaseIndex, HasIndex Editor i2 BaseIndex) => HasSelectionIndexRange Editor i1 i2

You can select a text range inside an editor widget.

HasIndex Editor i BaseIndex => HasIndex Editor i (Distance, Distance)

Internal.

HasIndex Editor (ICursor Editor) BaseIndex

Internal.

HasIndex Editor (Selection Editor) BaseIndex

Internal.

HasInsertionCursorIndexGet Editor (Distance, Distance)

You can get the position of the insertion cursor of an editor widget.

HasSelectionBaseIndexRange Editor (Distance, Distance)

You can select a text range inside an editor widget.

HasSelectionBaseIndex Editor ((Distance, Distance), (Distance, Distance))

You can select a text range inside an editor widget.

HasIndex Editor i BaseIndex => HasIndex Editor (i, IndexModifier) BaseIndex

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

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

A pair of line and character is a valid index for an editor widget.

HasIndex Editor (TextTag, Last) BaseIndex

Internal.

HasIndex Editor (TextTag, First) BaseIndex

Internal.

newEditorSource

Arguments

:: 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.

deleteTextSource

Arguments

:: HasIndex Editor i BaseIndex 
=> Editor

the concerned editor widget.

-> i

the concerned index.

-> IO ()

None.

Deletes the character at the specified index.

deleteTextRangeSource

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.

getTextRangeSource

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.

insertTextSource

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.

insertNewlineSource

Arguments

:: Editor

the concerned editor widget.

-> IO ()

None.

Inserts a newline character at the end of the editor widget.

getTextLineSource

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.

appendTextSource

Arguments

:: Editor

the concerned editor widget.

-> String

the text to append.

-> IO ()

None.

Appends text at the end of the editor widget.

getIndexPositionSource

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.

compareIndicesSource

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

True or False, depending on the given operation.

Compares two indizes.

writeTextToFileSource

Arguments

:: Editor

the concerned editor widget.

-> FilePath

the name of the file.

-> IO ()

None.

Writes the contained text to a file.

readTextFromFileSource

Arguments

:: 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 whereSource

Widgets with adjustable tab stops instantiate the class HasTabulators.

Instances

HasTabulators Editor

An editor widget has adjustable tab stops.

HasTabulators TextTag

A text tag has adjustable tab stops.

class GUIObject w => HasLineSpacing w whereSource

Widgets with an adjustable line spacing instantiate the class HasLineSpacing.

Instances

HasLineSpacing Editor

You can adjust the line spacing of an editor widget.

HasLineSpacing TextTag

A text tag has a configureable line spacing.

adjustViewToSource

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.

scanMarkSource

Arguments

:: HasIndex Editor i BaseIndex 
=> Editor

the concerned editor widget.

-> i

the concerned index.

-> IO ()

None.

Anchor a scrolling operation.

scanDragToSource

Arguments

:: HasIndex Editor i BaseIndex 
=> Editor

the concerned editor widget.

-> i

the concerned index.

-> IO ()

None.

Scroll based on a new position.

data SearchDirection Source

The SearchDirection datatype.

Constructors

Forward 
Backward 

data SearchMode Source

The SearchMode datatype.

Constructors

Exact 
Nocase 

data SearchSwitch Source

The SearchSwitch datatype.

Instances

Show SearchSwitch

Internal.

searchSource

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.

Instances

data IndexModifier Source

The IndexModifier datatype.

Instances

Show IndexModifier

Internal.

HasIndex Editor i BaseIndex => HasIndex Editor (i, IndexModifier) BaseIndex

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

A pair of a valid index and a list of index modifiers is a valid index for an editor widget.

data WrapMode Source

The WrapMode datatype.

Constructors

NoWrap 
CharWrap 
WordWrap 

Instances

wrap :: WrapMode -> Config EditorSource

Sets the editor's wrap mode.

getWrapMode :: Editor -> IO WrapModeSource

Gets the editor's wrap mode.