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

Safe HaskellNone
LanguageHaskell98

HTk.Toolkit.TreeList

Description

HTk's TreeList module.

Synopsis

Documentation

newTreeList Source #

Arguments

:: (Container par, CItem a) 
=> par

the parent widget, which has to be a container widget.

-> ChildrenFun a

the tree list's children function.

-> [TreeListObject a]

the initial list of tree list objects.

-> [Config (TreeList a)]

the list of configuration options for this tree list.

-> IO (TreeList a)

A tree list.

Constructs a new tree list.

data CItem c => TreeList c Source #

The TreeList datatype.

Instances

CItem c => Destroyable (TreeList c) Source #

A tree list can be destroyed.

Methods

destroy :: TreeList c -> IO () #

CItem c => Synchronized (TreeList c) Source #

You can synchronize on a tree list.

Methods

synchronize :: TreeList c -> IO b -> IO b #

CItem c => GUIObject (TreeList c) Source #

Internal.

CItem c => HasBorder (TreeList c) Source #

A tree list has a configureable border.

CItem c => HasSize (TreeList c) Source #

A tree list has a configureable size.

CItem c => HasColour (TreeList c) Source #

A tree list has a configureale background colour.

CItem c => Widget (TreeList c) Source #

A tree list has standard widget properties (concerning focus, cursor).

bindTreeListEv Source #

Arguments

:: CItem c 
=> TreeList c

the concerned tree list.

-> IO (Event (TreeListEvent c), IO ())

A pair of (event, unbind action).

Binds a listener for tree list events to the tree list and returns a corresponding event and an unbind action.

data TreeListEvent c Source #

The TreeListEvent datatype.

removeTreeListObject Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> a

the concerned tree list object's value.

-> IO ()

None.

Removes the corresponding objects to a given tree list object value from the tree list.

updateTreeList Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> IO ()

None.

Updates the tree list by recalling the children function for all opened objects.

addTreeListRootObject Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> TreeListObject a

the tree list object to add.

-> IO ()

None.

Adds a toplevel tree list object.

addTreeListSubObject Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> a

the parent object's value.

-> TreeListObject a

the new tree list object to add.

-> IO ()

None.

Adds a subobject to a tree list object.

newTreeListObject Source #

Arguments

:: CItem a 
=> a

the object's value.

-> TreeListObjectType

the object's type (node or leaf).

-> TreeListObject a

A tree list object.

Constructs a new tree list object.

data TreeListObject a Source #

The TreeListObject datatype.

data TreeListObjectType Source #

The TreeListObjectType datatype.

Constructors

Node 
Leaf 

isLeaf Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> a

the concerned tree list object value.

-> IO (Maybe Bool)

Nothing if no corresponding object is found, otherwise Just True if the corresponding object is a leaf, otherwise Just False.

Checks for a given tree list object value if the corresponding object is a leaf.

isNode Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> a

the concerned tree list object value.

-> IO (Maybe Bool)

Nothing if no corresponding object is found, otherwise Just True if the corresponding object is a node, otherwise Just False.

Checks for a given tree list object value if the corresponding object is a node.

mkLeaf Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> a

the concerned tree list object's value.

-> IO ()

None.

Converts the corresponding object to a given tree list object value to a leaf.

mkNode Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> a

the concerned treelist object's value.

-> IO ()

None.

Converts the corresponding object to a given tree list object value to a node.

getTreeListObjectValue Source #

Arguments

:: TreeListObject a

the concerned tree list object.

-> a

The given object's value.

Selector for the value of a tree list object.

getTreeListObjectType Source #

Arguments

:: TreeListObject a

the concerned tree list object.

-> TreeListObjectType

The object's type (node or leaf).

Selector for the type of a tree list object (node or leaf).

isTreeListObjectOpen Source #

Arguments

:: CItem c 
=> TreeList c

the concerned tree list.

-> c

the concerned object's value.

-> IO Bool

True, if the object with the given value is currently opened in the tree list, otherwise False.

True, if the object with the given value is currently opened in the tree list.

type ChildrenFun a = TreeListObject a -> IO [TreeListObject a] Source #

The ChildrenFun type.

setImage Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> a

the concerned object's value.

-> Image

the image to set.

-> IO ()

None.

(Re-)sets the image of a tree list object.

setTreeListObjectName Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> a

the concerned object's value.

-> Name

the name to set.

-> IO ()

None.

(Re-)sets the name of a tree list object.

exportTreeListState Source #

Arguments

:: CItem c 
=> TreeList c

the concerned tree list.

-> IO (TreeListState c)

The tree list's state.

Exports the tree list's state.

importTreeListState Source #

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> TreeListState a

the state to import.

-> IO ()

None.

Imports a previously saved tree list state.

recoverTreeList Source #

Arguments

:: (Container par, CItem a) 
=> par

the parent widget, which has to be a container widget.

-> ChildrenFun a

the tree list's children function.

-> TreeListState a

the state to recover.

-> [Config (TreeList a)]

the list of configuration options for this tree list.

-> IO (TreeList a)

A tree list.

Constructs a new tree list recovering a previously saved state.