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

HTk.Toolkit.TreeList

Description

HTk's TreeList module.

Synopsis

Documentation

newTreeListSource

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)

A tree list can be destroyed.

CItem c => Synchronized (TreeList c)

You can synchronize on a tree list.

CItem c => GUIObject (TreeList c)

Internal.

CItem c => HasBorder (TreeList c)

A tree list has a configureable border.

CItem c => HasSize (TreeList c)

A tree list has a configureable size.

CItem c => HasColour (TreeList c)

A tree list has a configureale background colour.

CItem c => Widget (TreeList c)

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

bindTreeListEvSource

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.

removeTreeListObjectSource

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.

updateTreeListSource

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> IO ()

None.

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

addTreeListRootObjectSource

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.

addTreeListSubObjectSource

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.

newTreeListObjectSource

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 

isLeafSource

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.

isNodeSource

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.

mkLeafSource

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.

mkNodeSource

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.

getTreeListObjectValueSource

Arguments

:: TreeListObject a

the concerned tree list object.

-> a

The given object's value.

Selector for the value of a tree list object.

getTreeListObjectTypeSource

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

isTreeListObjectOpenSource

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.

setImageSource

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.

setTreeListObjectNameSource

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.

exportTreeListStateSource

Arguments

:: CItem c 
=> TreeList c

the concerned tree list.

-> IO (TreeListState c)

The tree list's state.

Exports the tree list's state.

importTreeListStateSource

Arguments

:: CItem a 
=> TreeList a

the concerned tree list.

-> TreeListState a

the state to import.

-> IO ()

None.

Imports a previously saved tree list state.

recoverTreeListSource

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.