Gtk2HsContentsIndex
Graphics.UI.Gtk.TreeList.TreeSelection
Description

A TreeSelection is a data type belonging to a TreeModel. As the name suggests it holds the current selection which can even be a multiple choice.

TODO

  • treeSelectionGetSelected allows to retreive the associated TreeModel object. We currently do not use this feature so it could be added if needed.
Synopsis
data TreeSelection
class GObjectClass o => TreeSelectionClass o
castToTreeSelection :: GObjectClass obj => obj -> TreeSelection
data SelectionMode
= SelectionNone
| SelectionSingle
| SelectionBrowse
| SelectionMultiple
treeSelectionSetMode :: TreeSelectionClass ts => ts -> SelectionMode -> IO ()
treeSelectionGetMode :: TreeSelectionClass ts => ts -> IO SelectionMode
type TreeSelectionCB = TreePath -> IO ()
treeSelectionSetSelectFunction :: TreeSelectionClass ts => ts -> TreeSelectionCB -> IO ()
treeSelectionGetTreeView :: TreeSelectionClass ts => ts -> IO TreeView
treeSelectionGetSelected :: TreeSelectionClass ts => ts -> IO (Maybe TreeIter)
type TreeSelectionForeachCB = TreeIter -> IO ()
treeSelectionSelectedForeach :: TreeSelectionClass ts => ts -> TreeSelectionForeachCB -> IO ()
treeSelectionSelectPath :: TreeSelectionClass ts => ts -> TreePath -> IO ()
treeSelectionUnselectPath :: TreeSelectionClass ts => ts -> TreePath -> IO ()
treeSelectionPathIsSelected :: TreeSelectionClass ts => ts -> TreePath -> IO Bool
treeSelectionSelectIter :: TreeSelectionClass ts => ts -> TreeIter -> IO ()
treeSelectionUnselectIter :: TreeSelectionClass ts => ts -> TreeIter -> IO ()
treeSelectionIterIsSelected :: TreeSelectionClass ts => ts -> TreeIter -> IO Bool
treeSelectionSelectAll :: TreeSelectionClass ts => ts -> IO ()
treeSelectionUnselectAll :: TreeSelectionClass ts => ts -> IO ()
treeSelectionSelectRange :: TreeSelectionClass ts => ts -> TreePath -> TreePath -> IO ()
onSelectionChanged :: TreeSelectionClass ts => ts -> IO () -> IO (ConnectId ts)
afterSelectionChanged :: TreeSelectionClass ts => ts -> IO () -> IO (ConnectId ts)
Documentation
data TreeSelection
Instances
TreeSelectionClass TreeSelection
GObjectClass TreeSelection
class GObjectClass o => TreeSelectionClass o
Instances
TreeSelectionClass TreeSelection
castToTreeSelection :: GObjectClass obj => obj -> TreeSelection
data SelectionMode

Mode in which selections can be performed

  • There is a deprecated entry SelectionExtended which should have the same value as SelectionMultiple. C2HS chokes on that construct.
Constructors
SelectionNone
SelectionSingle
SelectionBrowse
SelectionMultiple
Instances
Enum SelectionMode
treeSelectionSetMode :: TreeSelectionClass ts => ts -> SelectionMode -> IO ()
Set single or multiple choice.
treeSelectionGetMode :: TreeSelectionClass ts => ts -> IO SelectionMode
Gets the selection mode.
type TreeSelectionCB = TreePath -> IO ()
Callback type for a function that is called everytime the selection changes. This function is set with treeSelectionSetSelectFunction.
treeSelectionSetSelectFunction :: TreeSelectionClass ts => ts -> TreeSelectionCB -> IO ()
Set a callback function if selection changes.
treeSelectionGetTreeView :: TreeSelectionClass ts => ts -> IO TreeView
Retrieve the TreeView widget that this TreeSelection works on.
treeSelectionGetSelected :: TreeSelectionClass ts => ts -> IO (Maybe TreeIter)
Retrieves the selection of a single choice TreeSelection.
type TreeSelectionForeachCB = TreeIter -> IO ()
Callback function type for treeSelectionSelectedForeach.
treeSelectionSelectedForeach :: TreeSelectionClass ts => ts -> TreeSelectionForeachCB -> IO ()
Execute a function for each selected node.
treeSelectionSelectPath :: TreeSelectionClass ts => ts -> TreePath -> IO ()
Select a specific item by TreePath.
treeSelectionUnselectPath :: TreeSelectionClass ts => ts -> TreePath -> IO ()
Deselect a specific item by TreePath.
treeSelectionPathIsSelected :: TreeSelectionClass ts => ts -> TreePath -> IO Bool
Returns True if the row at the given path is currently selected.
treeSelectionSelectIter :: TreeSelectionClass ts => ts -> TreeIter -> IO ()
Select a specific item by TreeIter.
treeSelectionUnselectIter :: TreeSelectionClass ts => ts -> TreeIter -> IO ()
Deselect a specific item by TreeIter.
treeSelectionIterIsSelected :: TreeSelectionClass ts => ts -> TreeIter -> IO Bool
Returns True if the row at the given iter is currently selected.
treeSelectionSelectAll :: TreeSelectionClass ts => ts -> IO ()
Select everything.
treeSelectionUnselectAll :: TreeSelectionClass ts => ts -> IO ()
Deselect everything.
treeSelectionSelectRange :: TreeSelectionClass ts => ts -> TreePath -> TreePath -> IO ()
Select a range specified by two TreePaths.
onSelectionChanged :: TreeSelectionClass ts => ts -> IO () -> IO (ConnectId ts)
Emitted each time the user changes the selection.
afterSelectionChanged :: TreeSelectionClass ts => ts -> IO () -> IO (ConnectId ts)
Produced by Haddock version 0.6