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

Safe HaskellNone
LanguageHaskell98

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 Source # 

Methods

(==) :: Editor -> Editor -> Bool #

(/=) :: Editor -> Editor -> Bool #

Destroyable Editor Source #

An editor widget can be destroyed.

Methods

destroy :: Editor -> IO () #

Synchronized Editor Source #

You can synchronize on an editor widget.

Methods

synchronize :: Editor -> IO b -> IO b #

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.

Methods

clearSelection :: Editor -> IO () Source #

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.

Methods

selectionRange :: i1 -> i2 -> Config Editor Source #

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 EndOfText index is a valid index for an editor widget.

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.

newEditor Source #

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.

deleteText Source #

Arguments

:: HasIndex Editor i BaseIndex 
=> Editor

the concerned editor widget.

-> i

the concerned index.

-> IO ()

None.

Deletes the character at the specified index.

deleteTextRange Source #

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.

getTextRange Source #

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.

insertText Source #

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.

insertNewline Source #

Arguments

:: Editor

the concerned editor widget.

-> IO ()

None.

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

getTextLine Source #

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.

appendText Source #

Arguments

:: Editor

the concerned editor widget.

-> String

the text to append.

-> IO ()

None.

Appends text at the end of the editor widget.

getIndexPosition Source #

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.

compareIndices Source #

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.

writeTextToFile Source #

Arguments

:: Editor

the concerned editor widget.

-> FilePath

the name of the file.

-> IO ()

None.

Writes the contained text to a file.

readTextFromFile Source #

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 where Source #

Widgets with adjustable tab stops instantiate the class HasTabulators.

Methods

tabs :: String -> Config w Source #

getTabs :: w -> IO String Source #

Instances

HasTabulators Editor Source #

An editor widget has adjustable tab stops.

HasTabulators TextTag Source #

A text tag has adjustable tab stops.

adjustViewTo Source #

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.

scanMark Source #

Arguments

:: HasIndex Editor i BaseIndex 
=> Editor

the concerned editor widget.

-> i

the concerned index.

-> IO ()

None.

Anchor a scrolling operation.

scanDragTo Source #

Arguments

:: HasIndex Editor i BaseIndex 
=> Editor

the concerned editor widget.

-> i

the concerned index.

-> IO ()

None.

Scroll based on a new position.

data SearchSwitch Source #

The SearchSwitch datatype.

search Source #

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.

data IndexModifier Source #

The IndexModifier datatype.

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.

wrap :: WrapMode -> Config Editor Source #

Sets the editor's wrap mode.

getWrapMode :: Editor -> IO WrapMode Source #

Gets the editor's wrap mode.