Name

ListStore —

The database for simple (non-hierarchical) tables.

Synopsis

newtype
        ListSkel
data
        ListSkelState
listStoreNew:: [TMType] -> IO ListStore
newListStore:: ListSkel -> IO ListStore
emptyListSkel:: IO ListSkel
listSkelAddAttribute:: CellRendererClass cr => ListSkel -> Attribute cr argTy -> IO (Association cr,TreeIter -> IO argTy,TreeIter -> argTy -> IO ())
listStoreAppend:: ListStoreClass ts => ts -> IO TreeIter
listStoreClear:: ListStoreClass ts => ts -> IO ()
listStoreInsert:: ListStoreClass ts => ts -> Int -> IO TreeIter
listStoreInsertAfter:: ListStoreClass ts => ts -> TreeIter -> IO TreeIter
listStoreInsertBefore:: ListStoreClass ts => ts -> TreeIter -> IO TreeIter
listStorePrepend:: ListStoreClass ts => ts -> IO TreeIter
listStoreRemove:: ListStoreClass ts => ts -> TreeIter -> IO Bool
listStoreSetValue:: ListStoreClass ts => ts -> TreeIter -> Int -> GenericValue -> IO ()

Datatypes

newtype ListSkel

A skeleton of a ListStore database.

newtype ListSkel =ListSkel (IORef ListSkelState)

This datastructure describes what columns the database will have when it is finally created by newListStore. A skeleton of a ListStore database.

This datastructure describes what columns the database will have when it is finally created by newListStore.

data ListSkelState

data ListSkelState =LSSActive ListStore
| LSSPrepare [TMType]

Constructors

listStoreNew

Generate a new entity to store tree information.

listStoreNew:: [TMType]:: IO ListStore
cols

newListStore

Create a new ListStore database.

newListStore:: ListSkel:: IO ListStore
(ListSkel statusRef)

This method throws an exception if the skeleton has been used before.

Methods

emptyListSkel

Returns an empty ListSkel.

emptyListSkel

listSkelAddAttribute

Reserve a new column in ListSkel to hold values for the given attribute.

listSkelAddAttribute:: ListSkel:: Attribute cr argTy:: IO (Association cr,TreeIter -> IO argTy,TreeIter -> argTy -> IO ())
(ListSkel statusRef)(Attribute prop ty toGen fromGen)

The type of the column is determined by the given Attribute of the ViewColumn which should be stored here. It is possible to associate this column with several ViewColumns.

listStoreAppend

Insert a row at the end of the table .

listStoreAppend:: ts:: IO TreeIter
ts

This is equivalent to listStoreInsert (-1).

listStoreClear

Clear all rows in this table.

listStoreClear:: ts:: IO ()

listStoreInsert

Insert a new row into the list.

listStoreInsert:: ts:: Int:: IO TreeIter
tspos

The pos parameter determines the row number where the row should be inserted. Set this to -1 to insert at the end of the list.

listStoreInsertAfter

Insert a row behind the sibling row.

listStoreInsertAfter:: ts:: TreeIter:: IO TreeIter
tssibling

listStoreInsertBefore

Insert a row in front of the sibling node.

listStoreInsertBefore:: ts:: TreeIter:: IO TreeIter
tssibling

listStorePrepend

Insert a row in front of every other row.

listStorePrepend:: ts:: IO TreeIter
ts

This is equivalent to listStoreInsert 0.

listStoreRemove

Remove a specific node.

listStoreRemove:: ts:: TreeIter:: IO Bool
tsti

The TreeIter will point to the entry following the one which was just removed. The function returns False if the tiTreeIter does not point to a valid element (i.e. the function just removed the bottom entry from the list).

<warning><para>This function returned () in Gtk version 2.0.X</warning><para>

listStoreSetValue

Set the data of a specific node.

listStoreSetValue:: ts:: TreeIter:: Int:: GenericValue:: IO ()
tsticolval

The supplied value must match the type that was set for the column.