HTk's TreeList module.
- newTreeList :: (Container par, CItem a) => par -> ChildrenFun a -> [TreeListObject a] -> [Config (TreeList a)] -> IO (TreeList a)
- data CItem c => TreeList c
- bindTreeListEv :: CItem c => TreeList c -> IO (Event (TreeListEvent c), IO ())
- data TreeListEvent c
- = Selected (Maybe (TreeListObject c))
- | Focused (Maybe (TreeListObject c), EventInfo)
- removeTreeListObject :: CItem a => TreeList a -> a -> IO ()
- updateTreeList :: CItem a => TreeList a -> IO ()
- addTreeListRootObject :: CItem a => TreeList a -> TreeListObject a -> IO ()
- addTreeListSubObject :: CItem a => TreeList a -> a -> TreeListObject a -> IO ()
- newTreeListObject :: CItem a => a -> TreeListObjectType -> TreeListObject a
- data TreeListObject a
- data TreeListObjectType
- isLeaf :: CItem a => TreeList a -> a -> IO (Maybe Bool)
- isNode :: CItem a => TreeList a -> a -> IO (Maybe Bool)
- mkLeaf :: CItem a => TreeList a -> a -> IO ()
- mkNode :: CItem a => TreeList a -> a -> IO ()
- getTreeListObjectValue :: TreeListObject a -> a
- getTreeListObjectType :: TreeListObject a -> TreeListObjectType
- isTreeListObjectOpen :: CItem c => TreeList c -> c -> IO Bool
- type ChildrenFun a = TreeListObject a -> IO [TreeListObject a]
- setImage :: CItem a => TreeList a -> a -> Image -> IO ()
- setTreeListObjectName :: CItem a => TreeList a -> a -> Name -> IO ()
- data TreeListExportItem a = TreeListExportItem {}
- type TreeListState a = [TreeListExportItem a]
- exportTreeListState :: CItem c => TreeList c -> IO (TreeListState c)
- importTreeListState :: CItem a => TreeList a -> TreeListState a -> IO ()
- recoverTreeList :: (Container par, CItem a) => par -> ChildrenFun a -> TreeListState a -> [Config (TreeList a)] -> IO (TreeList a)
- module HTk.Toolkit.CItem
Documentation
:: (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.
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). |
:: 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.
Selected (Maybe (TreeListObject c)) | |
Focused (Maybe (TreeListObject c), EventInfo) |
:: 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.
Updates the tree list by recalling the children function for all opened objects.
:: CItem a | |
=> TreeList a | the concerned tree list. |
-> TreeListObject a | the tree list object to add. |
-> IO () | None. |
Adds a toplevel tree list object.
:: 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.
:: 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.
:: CItem a | |
=> TreeList a | the concerned tree list. |
-> a | the concerned tree list object value. |
-> IO (Maybe Bool) |
|
Checks for a given tree list object value if the corresponding object is a leaf.
:: CItem a | |
=> TreeList a | the concerned tree list. |
-> a | the concerned tree list object value. |
-> IO (Maybe Bool) |
|
Checks for a given tree list object value if the corresponding object is a node.
:: 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.
:: 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.
:: TreeListObject a | the concerned tree list object. |
-> a | The given object's value. |
Selector for the value of a tree list object.
:: 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).
:: 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.
type ChildrenFun a = TreeListObject a -> IO [TreeListObject a]Source
The ChildrenFun
type.
:: 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.
:: 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.
type TreeListState a = [TreeListExportItem a]Source
:: CItem c | |
=> TreeList c | the concerned tree list. |
-> IO (TreeListState c) | The tree list's state. |
Exports the tree list's state.
:: CItem a | |
=> TreeList a | the concerned tree list. |
-> TreeListState a | the state to import. |
-> IO () | None. |
Imports a previously saved tree list state.
:: (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.
module HTk.Toolkit.CItem