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

HTk.Components.Selection

Description

This module provides access to a widgets selection (e.g. inside a listbox, editor or entry widget).

Synopsis

Documentation

newtype Selection w Source

The Selection datatype.

Constructors

Selection w 

Instances

HasIndex Editor (Selection Editor) BaseIndex

Internal.

GUIObject w => GUIObject (Selection w)

Internal.

(HasSelection w, Widget w) => HasBorder (Selection w)

The selection has a configureable border.

(HasSelection w, Widget w) => HasColour (Selection w)

The selected entries have a configureable foreground and background colour.

HasIndex (Entry a) (Selection (Entry a), Last) BaseIndex

The selection end is a valid index position for an entry widget.

HasIndex (Entry a) (Selection (Entry a), First) BaseIndex

The selection start is a valid index position for an entry widget.

class GUIObject w => HasSelection w whereSource

A widget with a selectable content instantiates the class HasSelection.

Methods

clearSelection :: w -> IO ()Source

Instances

HasSelection Editor

You can select text inside an editor widget.

HasSelection (Entry a)

You can select text inside an entry widget.

HasSelection (ListBox a)

You can select entries inside a listbox widget.

class HasSelectionIndex w i whereSource

A widget with a indexable selection instantiates the class HasSelectionIndex.

Methods

selection :: i -> Config wSource

isSelected :: w -> i -> IO BoolSource

Instances

HasIndex Editor i BaseIndex => HasSelectionIndex Editor i

An editor widget's characters are selectable.

HasIndex (Entry a) i BaseIndex => HasSelectionIndex (Entry a) i

An entry widget's characters are selectable.

HasIndex (ListBox a) i Int => HasSelectionIndex (ListBox a) i

A listbox'es entries are selectable.

class HasSelectionBaseIndex w i whereSource

A widget with an indexable selection base instantiates the class HasSelectionBaseIndex.

Methods

getSelection :: w -> IO (Maybe i)Source

Instances

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

You can select a text range inside an editor widget.

HasSelectionBaseIndex (ListBox a) [Int]

You can select a range of elements inside a listbox widget.

HasSelectionBaseIndex (Entry a) (Int, Int)

You can select a text range inside an entry widget.

class HasSelectionIndexRange w i1 i2 whereSource

A widget with an indexable selection range instantiates the class HasSelectionIndexRange.

Methods

selectionRange :: i1 -> i2 -> Config wSource

Instances

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

You can select a text range inside an editor widget.

(HasIndex (Entry a) i1 BaseIndex, HasIndex (Entry a) i2 BaseIndex) => HasSelectionIndexRange (Entry a) i1 i2

You can select a text range inside an entry widget.

(HasIndex (ListBox a) i1 Int, HasIndex (ListBox a) i2 Int) => HasSelectionIndexRange (ListBox a) i1 i2

You can select a range of elements inside a listbox widget.

class HasSelectionIndex w i => HasSelectionBaseIndexRange w i whereSource

A widget with an indexable selection index range instantiates the class HasSelectionBaseIndexRange.

Instances

HasSelectionBaseIndexRange Editor (Distance, Distance)

You can select a text range inside an editor widget.

HasSelectionBaseIndexRange (Entry a) Int

You can select a text range inside an entry widget.

HasSelectionBaseIndexRange (ListBox a) Int

You can select a range of entries inside a listbox widget.