From: Axel S. <si...@co...> - 2008-09-15 21:27:47
|
Mon Sep 15 17:17:39 EDT 2008 A....@ke... * Add a treeModelValueGet function. This patch makes it possible to retrieve the content of a store using the TreeModel interface, that is, by using predefined columns. The ColumnId type had to be amended for that. I used the opportunity to move its definition to the TreeModel module, where it belongs. As a consequence the two functions in CustomStore whose name started with treeModel have been renamed to customStoreGetRow and customStoreSetColumn since they really only make sense on implementations of CustomStores. The original names are no longer documented but still exported in order not to break exisiting programs. hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 150 -{#import Graphics.UI.Gtk.ModelView.CustomStore#} (ColumnId(..), - makeColumnIdString, - columnIdToNumber, - treeModelSetColumn) +{#import Graphics.UI.Gtk.ModelView.CustomStore#} (customStoreSetColumn) +{#import Graphics.UI.Gtk.ModelView.TreeModel#} (ColumnId(..), + makeColumnIdString, + columnIdToNumber) + hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 217 - treeModelSetColumn model strCol id + customStoreSetColumn model strCol id hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 155 +{#import Graphics.UI.Gtk.ModelView.TreeModel#} [_$_] hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBox.chs.pp 401 - value <- treeModelGetRow model iter + value <- customStoreGetRow model iter hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 91 -import Graphics.UI.Gtk.ModelView.ComboBox +import Graphics.UI.Gtk.MenuComboToolbar.ComboBox hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 95 +{#import Graphics.UI.Gtk.ModelView.TreeModel#} [_$_] hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ComboBoxEntry.chs.pp 140 - treeModelSetColumn store colId extract + customStoreSetColumn store colId extract hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRendererCombo.chs.pp 81 -{#import Graphics.UI.Gtk.ModelView.CustomStore#} +{#import Graphics.UI.Gtk.ModelView.TreeModel#} hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 35 - treeModelGetRow, + customStoreGetRow, + customStoreSetColumn, hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 40 - - -- * Extracting a specific datum from the row-oriented store for - -- properties that are not drawn by 'CellRenderer's. - ColumnId, - makeColumnIdInt, - makeColumnIdBool, - makeColumnIdString, - makeColumnIdPixbuf, - columnIdToNumber, - invalidColumnId, + -- for backwards compatability, not documented + treeModelGetRow, hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 88 --- | Accessing a row for a specific value. Used for 'ColumnMap'. -data ColumnAccess row - = CAInvalid - | CAInt (row -> Int) - | CABool (row -> Bool) - | CAString (row -> String) - | CAPixbuf (row -> Pixbuf) - hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 95 --- | The type of a tree column. -data ColumnId row ty = ColumnId ((row -> ty) -> ColumnAccess row) Int - --- | Create a 'ColumnId' to extract an integer. -makeColumnIdInt :: Int -> ColumnId row Int -makeColumnIdInt = ColumnId CAInt - --- | Create a 'ColumnId' to extract an Boolean. -makeColumnIdBool :: Int -> ColumnId row Bool -makeColumnIdBool = ColumnId CABool - --- | Create a 'ColumnId' to extract an string. -makeColumnIdString :: Int -> ColumnId row String -makeColumnIdString = ColumnId CAString - --- | Create a 'ColumnId' to extract an 'Pixbuf'. -makeColumnIdPixbuf :: Int -> ColumnId row Pixbuf -makeColumnIdPixbuf = ColumnId CAPixbuf - --- | Convert a 'ColumnId' to a bare number. -columnIdToNumber :: ColumnId row ty -> Int -columnIdToNumber (ColumnId _ i) = i - --- | The invalid 'ColumnId'. Widgets use this value if no column id has --- been set. -invalidColumnId :: ColumnId row ty -invalidColumnId = ColumnId (error "invalidColumnId: no access type") (-1) - -instance Eq (ColumnId row ty) where - (ColumnId _ i1) == (ColumnId _ i2) = i1==i2 - -instance Show (ColumnId row ty) where - show (ColumnId _ i) = show i - [_$_] --- | Set or update a column mapping. -treeModelSetColumn :: TypedTreeModelClass model +-- | Set or update a column mapping. This function should be used before +-- the model is installed into a widget since the number of defined +-- columns are only checked once by widgets. +customStoreSetColumn :: TypedTreeModelClass model hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 103 -treeModelSetColumn model (ColumnId setter colId) acc | colId<0 = return () - | otherwise = +customStoreSetColumn model (ColumnId _ setter colId) acc | colId<0 = return () + | otherwise = hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 119 +-- this is a backwards compatability definition +treeModelSetColumn :: TypedTreeModelClass model + => model row -- ^ the store in which to allocate a new column + -> (ColumnId row ty) -- ^ the column that should be set + -> (row -> ty) -- ^ the function that sets the property + -> IO () +treeModelSetColumn = customStoreSetColumn + hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 194 -treeModelGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row -treeModelGetRow model iter = [_$_] +-- | Extract a row of the given model at the given 'TreeIter'. +-- +customStoreGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row +customStoreGetRow model iter = [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/CustomStore.chs 203 +-- this is a backwards compatability definition +treeModelGetRow :: TypedTreeModelClass model => model row -> TreeIter -> IO row +treeModelGetRow = customStoreGetRow + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 29 --- [_$_] +-- [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 31 --- 'TreeView' widget. In other words, this module exposes the C interface that --- Gtk uses to populate the 'TreeView' widget. While this module is an --- interface from the perspective of Gtk, this module provides a skeleton to --- create an object that implements this interface. Two implementations that --- come with Gtk2Hs are 'ListStore' and 'TreeStore'. +-- 'TreeView' and similar widgets. Specifically, the functions in defined here +-- are used by Gtk's widgets to access the stored data. Thus, rather than +-- calling these functions, an application programmer has to implement them. +-- While the module "Graphics.UI.Gtk.ModelView.CustomStore" provides the +-- necessary functions to implement the 'TreeMode' interface, it is often +-- sufficient to use the wo implementations that come with Gtk2Hs, namely are +-- 'ListStore' and 'TreeStore'. hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 48 --- other interfaces making drag and drop and storing data trivial. +-- other interfaces, making drag and drop and storing data trivial. +-- +-- A 'TreeModel' stores records of the same type. Each record is referred to +-- as row, just like in a relational database. Defining how the information of +-- a row is displayed can be done in two ways: If the widget displays data +-- using 'Graphics.UI.Gtk.ModelView.CellRenderer.CellRenderer' or one of its +-- derivatives, it is possible to state how a row is mapped to the attributes +-- of a renderer using the +-- 'Graphics.UI.Gtk.ModelView.CellLayout.cellLayoutSetAttributes' function. +-- Some widgets do not use +-- 'Graphics.UI.Gtk.ModelView.CellRenderer.CellRenderer's to display their +-- data. In this case an extraction function can be defined that maps a row to +-- one of a few basic types (like 'String's or 'Int's). This extraction +-- function is associated with a 'ColumnId' using +-- 'Graphics.UI.Gtk.ModelView.CustomStore.treeModelSetColumn'. The latter can +-- be set in the widget for the property that should be set. The widget then +-- uses the function 'treeModelGetValue' and the 'ColumnId' to extract the +-- value from the model. As the name suggests, using 'ColumnId's creates a +-- view of the data as if each row were divided into a well-defined set of +-- columns, again, like a relational database. hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 111 + ColumnId, + +-- * Constructors + makeColumnIdInt, + makeColumnIdBool, + makeColumnIdString, + makeColumnIdPixbuf, + invalidColumnId, + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 121 + columnIdToNumber, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 128 + treeModelGetValue, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 179 - stringToTreePath) - + stringToTreePath, + ColumnId(..), + ColumnAccess(..)) +{#import System.Glib.GValueTypes#} ( valueGetInt, valueGetBool, + valueGetString, valueGetGObject ) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 186 +-------------------- +-- Constructors + + +-- | Create a 'ColumnId' to extract an integer. +makeColumnIdInt :: Int -> ColumnId row Int +makeColumnIdInt = ColumnId valueGetInt CAInt + +-- | Create a 'ColumnId' to extract an Boolean. +makeColumnIdBool :: Int -> ColumnId row Bool +makeColumnIdBool = ColumnId valueGetBool CABool + +-- | Create a 'ColumnId' to extract an string. +makeColumnIdString :: Int -> ColumnId row String +makeColumnIdString = ColumnId valueGetString CAString + +-- | Create a 'ColumnId' to extract an 'Pixbuf'. +makeColumnIdPixbuf :: Int -> ColumnId row Pixbuf +makeColumnIdPixbuf = ColumnId valueGetGObject CAPixbuf + +-- | Convert a 'ColumnId' to a bare number. +columnIdToNumber :: ColumnId row ty -> Int +columnIdToNumber (ColumnId _ _ i) = i + +-- | The invalid 'ColumnId'. Widgets use this value if no column id has +-- been set. +invalidColumnId :: ColumnId row ty +invalidColumnId = ColumnId (error "invalidColumnId: no GValue extractor") + (error "invalidColumnId: no access type") (-1) + +instance Eq (ColumnId row ty) where + (ColumnId _ _ i1) == (ColumnId _ _ i2) = i1==i2 + +instance Show (ColumnId row ty) where + show (ColumnId _ _ i) = show i + [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeModel.chs.pp 301 +-- | Read the value of at a specific column and 'TreeIter'. +-- +treeModelGetValue :: TreeModelClass self => self + -> TreeIter + -> ColumnId row ty -- ^ @column@ - The column to lookup the value at. + -> IO ty +treeModelGetValue self iter (ColumnId getter _ colId) = + allocaGValue $ \gVal -> + with iter $ \iterPtr -> do + {# call tree_model_get_value #} + (toTreeModel self) + iterPtr + (fromIntegral colId) + gVal + getter gVal [_$_] + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 26 --- All functions related to drag and drop are missing. +-- The following functions related to drag and drop: +-- treeViewSetDragDestRow, treeViewGetDragDestRow, treeViewGetDestRowAtPos +-- these seem to be useful only in cases when the user wants to implement +-- drag and drop himself rather than use the widget's implementation. I +-- think this would be a bad idea in the first place. hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 145 + treeViewGetSearchColumn, + treeViewSetSearchColumn, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 165 + treeViewUnsetRowsDragSource, + treeViewUnsetRowsDragDest, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 191 -#if GTK_CHECK_VERSION(2,6,0) + treeViewSearchColumn, +#if GTK_CHECK_VERSION(2,4,0) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 194 +#if GTK_CHECK_VERSION(2,6,0) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 198 +#endif + treeViewShowExpanders, + treeViewLevelIndentation, + treeViewRubberBanding, + treeViewEnableGridLines, + treeViewEnableTreeLines, + treeViewGridLines, + treeViewSearchEntry, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 208 + columnsChanged, + cursorChanged, + rowCollapsed, + rowExpanded, + testCollapseRow, + testExpandRow, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 233 +#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 254 +import Graphics.UI.Gtk.ModelView.TreeModel (ColumnId, columnIdToNumber, + makeColumnIdString) hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1021 +-- %hash c:ecc5 d:bed6 +-- | Gets the column searched on by the interactive search code. +-- +treeViewGetSearchColumn :: TreeViewClass self => self + -> IO (ColumnId row String) -- ^ returns the column the interactive search code searches in. +treeViewGetSearchColumn self = + liftM (makeColumnIdString . fromIntegral) $ + {# call unsafe tree_view_get_search_column #} + (toTreeView self) + +-- %hash c:d0d0 +-- | Sets @column@ as the column where the interactive search code should +-- search in. +-- +-- If the sort column is set, users can use the \"start-interactive-search\" +-- key binding to bring up search popup. The enable-search property controls +-- whether simply typing text will also start an interactive search. +-- +-- Note that @column@ refers to a column of the model. Furthermore, the +-- search column is not used if a comparison function is set, see +-- 'treeViewSetSearchEqualFunc'. +-- +treeViewSetSearchColumn :: TreeViewClass self => self + -> (ColumnId row String) -- ^ @column@ - the column of the model to search in, or -1 to disable + -- searching + -> IO () +treeViewSetSearchColumn self column = + {# call tree_view_set_search_column #} + (toTreeView self) + (fromIntegral (columnIdToNumber column)) + + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1056 --- and the row of the model match. +-- and the row of the model match. Calling this function will overwrite +-- the 'treeViewSearchColumn' (which isn't used anyway when a comparison +-- function is installed). hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1245 - [_$_] + +-- %hash c:5201 d:f3be +-- | Undoes the effect of 'treeViewEnableModelDragSource'. +-- +treeViewUnsetRowsDragSource :: TreeViewClass self => self -> IO () +treeViewUnsetRowsDragSource self = + {# call gtk_tree_view_unset_rows_drag_source #} + (toTreeView self) + +-- %hash c:e31e d:323d +-- | Undoes the effect of 'treeViewEnableModelDragDest'. +-- +treeViewUnsetRowsDragDest :: TreeViewClass self => self -> IO () +treeViewUnsetRowsDragDest self = + {# call gtk_tree_view_unset_rows_drag_dest #} + (toTreeView self) + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1494 -#if GTK_CHECK_VERSION(2,6,0) --- | Setting the fixed-height-mode property to @True@ speeds up 'TreeView' +-- %hash c:e732 +-- | Model column to search through when searching through code. +-- +-- Allowed values: >= -1 +-- +-- Default value: -1 +-- +treeViewSearchColumn :: TreeViewClass self => Attr self (ColumnId row String) +treeViewSearchColumn = newAttr + treeViewGetSearchColumn + treeViewSetSearchColumn + +#if GTK_CHECK_VERSION(2,4,0) +-- %hash c:c7ff d:24d1 +-- | Setting the 'treeViewFixedHeightMode' property to @True@ speeds up 'TreeView' hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1515 +-- * Available since Gtk+ version 2.4 +-- hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1518 -treeViewFixedHeightMode = newAttr - treeViewGetFixedHeightMode - treeViewSetFixedHeightMode +treeViewFixedHeightMode = newAttrFromBoolProperty "fixed-height-mode" hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1520 --- | Enables of disables the hover selection mode of the tree view. Hover +#if GTK_CHECK_VERSION(2,6,0) +-- %hash c:2026 d:839a +-- | Enables of disables the hover selection mode of @treeView@. Hover hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1526 --- This mode is primarily indended for treeviews in popups, e.g. in +-- This mode is primarily intended for 'TreeView's in popups, e.g. in hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1531 +-- * Available since Gtk+ version 2.6 +-- hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1534 -treeViewHoverSelection = newAttr - treeViewGetHoverSelection - treeViewSetHoverSelection +treeViewHoverSelection = newAttrFromBoolProperty "hover-selection" hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1536 --- | Enables of disables the hover expansion mode of the tree view. Hover +-- %hash c:c694 d:3f15 +-- | Enables of disables the hover expansion mode of @treeView@. Hover hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1540 --- This mode is primarily indended for treeviews in popups, e.g. in +-- This mode is primarily intended for 'TreeView's in popups, e.g. in hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1545 +-- * Available since Gtk+ version 2.6 +-- hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1548 -treeViewHoverExpand = newAttr - treeViewGetHoverExpand - treeViewSetHoverExpand +treeViewHoverExpand = newAttrFromBoolProperty "hover-expand" hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1550 +#endif + +-- %hash c:b409 d:2ed2 +-- | View has expanders. +-- +-- Default value: @True@ +-- +treeViewShowExpanders :: TreeViewClass self => Attr self Bool +treeViewShowExpanders = newAttrFromBoolProperty "show-expanders" + +-- %hash c:f0e5 d:9017 +-- | Extra indentation for each level. +-- +-- Allowed values: >= 0 +-- +-- Default value: 0 +-- +treeViewLevelIndentation :: TreeViewClass self => Attr self Int +treeViewLevelIndentation = newAttrFromIntProperty "level-indentation" + +-- %hash c:a647 d:9e53 +-- | Whether to enable selection of multiple items by dragging the mouse +-- pointer. +-- +-- Default value: @False@ +-- +treeViewRubberBanding :: TreeViewClass self => Attr self Bool +treeViewRubberBanding = newAttrFromBoolProperty "rubber-banding" + +-- %hash c:e926 d:86a8 +-- | Whether grid lines should be drawn in the tree view. +-- +-- Default value: 'TreeViewGridLinesNone' +-- +treeViewEnableGridLines :: TreeViewClass self => Attr self TreeViewGridLines +treeViewEnableGridLines = newAttrFromEnumProperty "enable-grid-lines" + {# call pure unsafe gtk_tree_view_grid_lines_get_type #} + +-- %hash c:a7eb d:4c53 +-- | Whether tree lines should be drawn in the tree view. +-- +-- Default value: @False@ +-- +treeViewEnableTreeLines :: TreeViewClass self => Attr self Bool +treeViewEnableTreeLines = newAttrFromBoolProperty "enable-tree-lines" + +-- %hash c:688c d:cbcd +-- | \'gridLines\' property. See 'treeViewGetGridLines' and +-- 'treeViewSetGridLines' +-- +treeViewGridLines :: TreeViewClass self => Attr self TreeViewGridLines +treeViewGridLines = newAttr + treeViewGetGridLines + treeViewSetGridLines + +-- %hash c:9cbe d:2962 +-- | \'searchEntry\' property. See 'treeViewGetSearchEntry' and +-- 'treeViewSetSearchEntry' +-- +treeViewSearchEntry :: (TreeViewClass self, EntryClass entry) => ReadWriteAttr self (Maybe Entry) (Maybe entry) +treeViewSearchEntry = newAttr + treeViewGetSearchEntry + treeViewSetSearchEntry hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1617 +-- %hash c:9fc5 d:3e66 +-- | The given row is about to be expanded (show its children nodes). Use this +-- signal if you need to control the expandability of individual rows. +-- +testExpandRow :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO Bool) +testExpandRow = Signal (connect_BOXED_BOXED__BOOL "test-expand-row" peek readNTP) + +-- %hash c:20de d:96a3 +-- | The given row is about to be collapsed (hide its children nodes). Use +-- this signal if you need to control the collapsibility of individual rows. +-- +testCollapseRow :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO Bool) +testCollapseRow = Signal (connect_BOXED_BOXED__BOOL "test-collapse-row" peek readNTP) + +-- %hash c:16dc d:b113 +-- | The given row has been expanded (child nodes are shown). +-- +rowExpanded :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO ()) +rowExpanded = Signal (connect_BOXED_BOXED__NONE "row-expanded" peek readNTP) + +-- %hash c:9ee6 d:325e +-- | The given row has been collapsed (child nodes are hidden). +-- +rowCollapsed :: TreeViewClass self => Signal self (TreeIter -> TreePath -> IO ()) +rowCollapsed = Signal (connect_BOXED_BOXED__NONE "row-collapsed" peek readNTP) + +-- %hash c:4350 d:4f94 +-- | The number of columns of the treeview has changed. +-- +columnsChanged :: TreeViewClass self => Signal self (IO ()) +columnsChanged = Signal (connect_NONE__NONE "columns-changed") + +-- %hash c:6487 d:5b57 +-- | The position of the cursor (focused cell) has changed. +-- +cursorChanged :: TreeViewClass self => Signal self (IO ()) +cursorChanged = Signal (connect_NONE__NONE "cursor-changed") + +-------------------- +-- Deprecated Signals + +#ifndef DISABLE_DEPRECATED + hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1757 +#endif hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 53 - stringToTreePath [_$_] + stringToTreePath, + [_$_] + -- Columns + ColumnAccess(..), + ColumnId(..), [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 63 -{#import Graphics.UI.Gtk.Types#} (TreeModel, TreeModelSort, TreeModelFilter) +import System.Glib.GValue (GValue) +{#import Graphics.UI.Gtk.Types#} (TreeModel, TreeModelSort, TreeModelFilter, + Pixbuf) hunk ./gtk/Graphics/UI/Gtk/ModelView/Types.chs 233 + +-- | Accessing a row for a specific value. Used for 'ColumnMap'. +data ColumnAccess row + = CAInvalid + | CAInt (row -> Int) + | CABool (row -> Bool) + | CAString (row -> String) + | CAPixbuf (row -> Pixbuf) + +-- | The type of a tree column. +data ColumnId row ty [_$_] + = ColumnId (GValue -> IO ty) ((row -> ty) -> ColumnAccess row) Int + |