frpnow-gtk3-0.2.0: Program GUIs with GTK3 and frpnow!

Copyright(c) George Steel 2017
LicenseBSD3
Maintainergeorge.steel@gmail.org
Safe HaskellNone
LanguageHaskell2010

Control.FRPNow.GTK.TreeView

Description

Functions for working with TreeView and dynamic data.

Synopsis

Documentation

createListDisplay :: Eq a => Behavior [a] -> (forall store. (TreeModelClass (store a), TypedTreeModelClass store) => ReaderT (TreeView, store a) IO b) -> Now (TreeView, Behavior (Maybe a)) Source #

Creates a TreeView displauying a dynamic list. The columns and cell renderers are defined using reader monads built from the other functions in this module.In this casem the cells must be polymorphic in the type of store they accept so as to ensure read-only behavior. Returns the TreeView and the curently-selected item.

tvColumn :: Text -> ReaderT (TreeViewColumn, store) IO b -> ReaderT (TreeView, store) IO TreeViewColumn Source #

Add a column with the given title and renderers to the enclosing TreeView.

tvTextDisplay :: (CellLayoutClass col, TreeModelClass (store a), TypedTreeModelClass store) => (a -> Text) -> ReaderT (col, store a) IO CellRendererText Source #

Add a cell renderer diaplaying a text-valued function of a row to a column.

tvShowDisplay :: (CellLayoutClass col, TreeModelClass (store a), TypedTreeModelClass store, Show b) => (a -> b) -> ReaderT (col, store a) IO CellRendererText Source #

Add a cell renderer diaplaying a s function of a row using Show. Useful for Int values.