Gtk2HsContentsIndex
Graphics.UI.Gtk.ModelView.ListStore
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Contents
Types
Constructors
Implementation of Interfaces
Methods
Description
Standard model to store list data.
Synopsis
data ListStore a
listStoreNew :: [a] -> IO (ListStore a)
listStoreDefaultDragSourceIface :: DragSourceIface ListStore row
listStoreDefaultDragDestIface :: DragDestIface ListStore row
listStoreGetValue :: ListStore a -> Int -> IO a
listStoreSetValue :: ListStore a -> Int -> a -> IO ()
listStoreToList :: ListStore a -> IO [a]
listStoreInsert :: ListStore a -> Int -> a -> IO ()
listStorePrepend :: ListStore a -> a -> IO ()
listStoreAppend :: ListStore a -> a -> IO Int
listStoreRemove :: ListStore a -> Int -> IO ()
listStoreClear :: ListStore a -> IO ()
Types
data ListStore a
show/hide Instances
Constructors
listStoreNew :: [a] -> IO (ListStore a)
Create a new TreeModel that contains a list of elements.
Implementation of Interfaces
listStoreDefaultDragSourceIface :: DragSourceIface ListStore row
Default drag functions for ListStore. These functions allow the rows of the model to serve as drag source. Any row is allowed to be dragged and the data set in the SelectionDataM object is set with treeSetRowDragData, i.e. it contains the model and the TreePath to the row.
listStoreDefaultDragDestIface :: DragDestIface ListStore row
Default drop functions for ListStore. These functions accept a row and insert the row into the new location if it is dragged into a tree view that uses the same model.
Methods
listStoreGetValue :: ListStore a -> Int -> IO a
Extract the value at the given index.
listStoreSetValue :: ListStore a -> Int -> a -> IO ()
Update the value at the given index. The index must exist.
listStoreToList :: ListStore a -> IO [a]
Extract all data from the store.
listStoreInsert :: ListStore a -> Int -> a -> IO ()
Insert an element in front of the given element. The element is appended if the index is greater or equal to the size of the list.
listStorePrepend :: ListStore a -> a -> IO ()
Prepend the element to the store.
listStoreAppend :: ListStore a -> a -> IO Int
Append an element to the store. Returns the index of the inserted element.
listStoreRemove :: ListStore a -> Int -> IO ()
Remove the element at the given index.
listStoreClear :: ListStore a -> IO ()
Empty the store.
Produced by Haddock version 0.8