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

Safe HaskellNone
LanguageHaskell98

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

GUIObject w => GUIObject (Selection w) Source #

Internal.

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

The selection has a configureable border.

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

The selected entries have a configureable foreground and background colour.

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

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

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

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

class GUIObject w => HasSelection w where Source #

A widget with a selectable content instantiates the class HasSelection.

Minimal complete definition

clearSelection

Methods

clearSelection :: w -> IO () Source #

Instances

HasSelection Editor Source #

You can select text inside an editor widget.

Methods

clearSelection :: Editor -> IO () Source #

HasSelection (ListBox a) Source #

You can select entries inside a listbox widget.

Methods

clearSelection :: ListBox a -> IO () Source #

HasSelection (Entry a) Source #

You can select text inside an entry widget.

Methods

clearSelection :: Entry a -> IO () Source #

class HasSelectionIndex w i where Source #

A widget with a indexable selection instantiates the class HasSelectionIndex.

Minimal complete definition

selection, isSelected

Methods

selection :: i -> Config w Source #

isSelected :: w -> i -> IO Bool Source #

Instances

HasIndex Editor i BaseIndex => HasSelectionIndex Editor i Source #

An editor widget's characters are selectable.

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

A listbox'es entries are selectable.

Methods

selection :: i -> Config (ListBox a) Source #

isSelected :: ListBox a -> i -> IO Bool Source #

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

An entry widget's characters are selectable.

Methods

selection :: i -> Config (Entry a) Source #

isSelected :: Entry a -> i -> IO Bool Source #

class HasSelectionBaseIndex w i where Source #

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

Minimal complete definition

getSelection

Methods

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

Instances

HasSelectionBaseIndex Editor ((Distance, Distance), (Distance, Distance)) Source #

You can select a text range inside an editor widget.

HasSelectionBaseIndex (ListBox a) [Int] Source #

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

Methods

getSelection :: ListBox a -> IO (Maybe [Int]) Source #

HasSelectionBaseIndex (Entry a) (Int, Int) Source #

You can select a text range inside an entry widget.

Methods

getSelection :: Entry a -> IO (Maybe (Int, Int)) Source #

class HasSelectionIndexRange w i1 i2 where Source #

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

Minimal complete definition

selectionRange

Methods

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

Instances

(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 (ListBox a) i1 Int, HasIndex (ListBox a) i2 Int) => HasSelectionIndexRange (ListBox a) i1 i2 Source #

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

Methods

selectionRange :: i1 -> i2 -> Config (ListBox a) Source #

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

You can select a text range inside an entry widget.

Methods

selectionRange :: i1 -> i2 -> Config (Entry a) Source #

class HasSelectionIndex w i => HasSelectionBaseIndexRange w i where Source #

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

Minimal complete definition

getSelectionStart, getSelectionEnd

Instances

HasSelectionBaseIndexRange Editor (Distance, Distance) Source #

You can select a text range inside an editor widget.

HasSelectionBaseIndexRange (ListBox a) Int Source #

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

HasSelectionBaseIndexRange (Entry a) Int Source #

You can select a text range inside an entry widget.