gi-gtk-hs-0.3.18: A wrapper for gi-gtk, adding a few more idiomatic API parts on top

Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell2010

Data.GI.Gtk.ModelView.CellLayout

Contents

- Detail
- Class Hierarchy

Description

An interface for packing cells

- Module available since Gtk+ version 2.4

Synopsis

- module GI.Gtk.Interfaces.CellLayout
- data CellLayoutAddAttributeMethodInfo
- data CellLayoutClearAttributesMethodInfo
- data CellLayoutClearMethodInfo
- data CellLayoutGetAreaMethodInfo
- data CellLayoutGetCellsMethodInfo
- data CellLayoutPackEndMethodInfo
- data CellLayoutPackStartMethodInfo
- data CellLayoutReorderMethodInfo
- data CellLayoutSetCellDataFuncMethodInfo
- type family ResolveCellLayoutMethod (t :: Symbol) o where ...
- cellLayoutSetAttributes :: (MonadIO m, IsCellLayout self, IsCellRenderer cell, IsTreeModel (model row), IsTypedTreeModel model) => self -> cell -> model row -> (row -> [AttrOp cell 'AttrSet]) -> m ()
- cellLayoutSetDataFunction :: (MonadIO m, IsCellLayout self, IsCellRenderer cell, IsTreeModel (model row), IsTypedTreeModel model) => self -> cell -> model row -> (row -> IO ()) -> m ()
- cellLayoutSetDataFunc' :: (MonadIO m, IsCellLayout self, IsCellRenderer cell, IsTreeModel model) => self -> cell -> model -> (TreeIter -> IO ()) -> m ()
- convertIterFromParentToChildModel :: TreeIter -> TreeModel -> TreeModel -> IO TreeIter

# Detail

`CellLayout` is an interface which is implemented by all objects which provide a `TreeViewColumn` API for packing cells, setting attributes and data funcs.

# Class Hierarchy

    |  Interface CellLayout
    |   +----TreeViewColumn
    |   +----CellView
    |   +----IconView
    |   +----EntryCompletion
    |   +----ComboBox
    |   +----ComboBoxEntry

module GI.Gtk.Interfaces.CellLayout

data CellLayoutAddAttributeMethodInfo Source #

#### Instances

Instances details

(signature ~ (b -> Text -> Int32 -> m ()), MonadIO m, IsCellLayout a, IsCellRenderer b) => OverloadedMethod CellLayoutAddAttributeMethodInfo a signature |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethod :: a -> signature Source #
OverloadedMethodInfo CellLayoutAddAttributeMethodInfo (a :: Type) |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethodInfo :: Maybe ResolvedSymbolInfo Source #

data CellLayoutClearAttributesMethodInfo Source #

#### Instances

Instances details

(signature ~ (b -> m ()), MonadIO m, IsCellLayout a, IsCellRenderer b) => OverloadedMethod CellLayoutClearAttributesMethodInfo a signature |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethod :: a -> signature Source #
OverloadedMethodInfo CellLayoutClearAttributesMethodInfo (a :: Type) |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethodInfo :: Maybe ResolvedSymbolInfo Source #

data CellLayoutClearMethodInfo Source #

#### Instances

Instances details

(signature ~ m (), MonadIO m, IsCellLayout a) => OverloadedMethod CellLayoutClearMethodInfo a signature |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethod :: a -> signature Source #
OverloadedMethodInfo CellLayoutClearMethodInfo (a :: Type) |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethodInfo :: Maybe ResolvedSymbolInfo Source #

data CellLayoutGetAreaMethodInfo Source #

#### Instances

Instances details

(signature ~ m (Maybe CellArea), MonadIO m, IsCellLayout a) => OverloadedMethod CellLayoutGetAreaMethodInfo a signature |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethod :: a -> signature Source #
OverloadedMethodInfo CellLayoutGetAreaMethodInfo (a :: Type) |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethodInfo :: Maybe ResolvedSymbolInfo Source #

data CellLayoutGetCellsMethodInfo Source #

#### Instances

Instances details

(signature ~ m [CellRenderer], MonadIO m, IsCellLayout a) => OverloadedMethod CellLayoutGetCellsMethodInfo a signature |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethod :: a -> signature Source #
OverloadedMethodInfo CellLayoutGetCellsMethodInfo (a :: Type) |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethodInfo :: Maybe ResolvedSymbolInfo Source #

data CellLayoutPackEndMethodInfo Source #

#### Instances

Instances details

(signature ~ (b -> Bool -> m ()), MonadIO m, IsCellLayout a, IsCellRenderer b) => OverloadedMethod CellLayoutPackEndMethodInfo a signature |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethod :: a -> signature Source #
OverloadedMethodInfo CellLayoutPackEndMethodInfo (a :: Type) |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethodInfo :: Maybe ResolvedSymbolInfo Source #

data CellLayoutPackStartMethodInfo Source #

#### Instances

Instances details

(signature ~ (b -> Bool -> m ()), MonadIO m, IsCellLayout a, IsCellRenderer b) => OverloadedMethod CellLayoutPackStartMethodInfo a signature |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethod :: a -> signature Source #
OverloadedMethodInfo CellLayoutPackStartMethodInfo (a :: Type) |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethodInfo :: Maybe ResolvedSymbolInfo Source #

data CellLayoutReorderMethodInfo Source #

#### Instances

Instances details

(signature ~ (b -> Int32 -> m ()), MonadIO m, IsCellLayout a, IsCellRenderer b) => OverloadedMethod CellLayoutReorderMethodInfo a signature |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethod :: a -> signature Source #
OverloadedMethodInfo CellLayoutReorderMethodInfo (a :: Type) |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethodInfo :: Maybe ResolvedSymbolInfo Source #

data CellLayoutSetCellDataFuncMethodInfo Source #

#### Instances

Instances details

(signature ~ (b -> Maybe CellLayoutDataFunc -> m ()), MonadIO m, IsCellLayout a, IsCellRenderer b) => OverloadedMethod CellLayoutSetCellDataFuncMethodInfo a signature |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethod :: a -> signature Source #
OverloadedMethodInfo CellLayoutSetCellDataFuncMethodInfo (a :: Type) |
Instance details Defined in GI.Gtk.Interfaces.CellLayout Methods overloadedMethodInfo :: Maybe ResolvedSymbolInfo Source #

type family ResolveCellLayoutMethod (t :: Symbol) o where ... Source #

Equations

ResolveCellLayoutMethod "addAttribute" o = CellLayoutAddAttributeMethodInfo |
ResolveCellLayoutMethod "bindProperty" o = ObjectBindPropertyMethodInfo |
ResolveCellLayoutMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo |
ResolveCellLayoutMethod "clear" o = CellLayoutClearMethodInfo |
ResolveCellLayoutMethod "clearAttributes" o = CellLayoutClearAttributesMethodInfo |
ResolveCellLayoutMethod "forceFloating" o = ObjectForceFloatingMethodInfo |
ResolveCellLayoutMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo |
ResolveCellLayoutMethod "getv" o = ObjectGetvMethodInfo |
ResolveCellLayoutMethod "isFloating" o = ObjectIsFloatingMethodInfo |
ResolveCellLayoutMethod "notify" o = ObjectNotifyMethodInfo |
ResolveCellLayoutMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo |
ResolveCellLayoutMethod "packEnd" o = CellLayoutPackEndMethodInfo |
ResolveCellLayoutMethod "packStart" o = CellLayoutPackStartMethodInfo |
ResolveCellLayoutMethod "ref" o = ObjectRefMethodInfo |
ResolveCellLayoutMethod "refSink" o = ObjectRefSinkMethodInfo |
ResolveCellLayoutMethod "reorder" o = CellLayoutReorderMethodInfo |
ResolveCellLayoutMethod "runDispose" o = ObjectRunDisposeMethodInfo |
ResolveCellLayoutMethod "stealData" o = ObjectStealDataMethodInfo |
ResolveCellLayoutMethod "stealQdata" o = ObjectStealQdataMethodInfo |
ResolveCellLayoutMethod "thawNotify" o = ObjectThawNotifyMethodInfo |
ResolveCellLayoutMethod "unref" o = ObjectUnrefMethodInfo |
ResolveCellLayoutMethod "watchClosure" o = ObjectWatchClosureMethodInfo |
ResolveCellLayoutMethod "getArea" o = CellLayoutGetAreaMethodInfo |
ResolveCellLayoutMethod "getCells" o = CellLayoutGetCellsMethodInfo |
ResolveCellLayoutMethod "getData" o = ObjectGetDataMethodInfo |
ResolveCellLayoutMethod "getProperty" o = ObjectGetPropertyMethodInfo |
ResolveCellLayoutMethod "getQdata" o = ObjectGetQdataMethodInfo |
ResolveCellLayoutMethod "setCellDataFunc" o = CellLayoutSetCellDataFuncMethodInfo |
ResolveCellLayoutMethod "setData" o = ObjectSetDataMethodInfo |
ResolveCellLayoutMethod "setDataFull" o = ObjectSetDataFullMethodInfo |
ResolveCellLayoutMethod "setProperty" o = ObjectSetPropertyMethodInfo |
ResolveCellLayoutMethod l o = MethodResolutionFailed l o :: Type |

cellLayoutSetAttributes Source #

Arguments

:: (MonadIO m, IsCellLayout self, IsCellRenderer cell, IsTreeModel (model row), IsTypedTreeModel model) |
=> self |
-> cell | `cell` - A `CellRenderer`.
-> model row | `model` - A model containing rows of type `row`.
-> (row -> [AttrOp cell 'AttrSet]) | Function to set attributes on the cell renderer.
-> m () |

Adds an attribute mapping to the renderer `cell`. The `column` is the `ColumnId` of the model to get a value from, and the `attribute` is the parameter on `cell` to be set from the value. So for example if column 2 of the model contains strings, you could have the "text" attribute of a `CellRendererText` get its values from column 2.

cellLayoutAddColumnAttribute :: (MonadIO m, IsCellLayout self, IsCellRenderer cell) => self -> cell -- ^ `cell` - A `CellRenderer`. -> ReadWriteAttr cell a v -- ^ `attribute` - An attribute of a renderer. -> ColumnId row v -- ^ `column` - The virtual column of the model from which to -- retrieve the attribute. -> m () cellLayoutAddColumnAttribute self cell attr column = cellLayoutAddAttribute self cell (T.pack $ show attr) (columnIdToNumber column)

Specify how a row of the `model` defines the attributes of the `CellRenderer` `cell`. This is a convenience wrapper around `cellLayoutSetAttributeFunc` in that it sets the cells of the `cell` with the data retrieved from the model.

- Note on using `TreeModelSort` and `TreeModelFilter`: These two models wrap another model, the so-called child model, instead of storing their own data. This raises the problem that the data of cell renderers must be set using the child model, while the `TreeIter`s that the view works with refer to the model that encapsulates the child model. For convenience, this function transparently translates an iterator to the child model before extracting the data using e.g. `treeModelSortConvertIterToChildIter`. Hence, it is possible to install the encapsulating model in the view and to pass the child model to this function.

cellLayoutSetDataFunction Source #

Arguments

:: (MonadIO m, IsCellLayout self, IsCellRenderer cell, IsTreeModel (model row), IsTypedTreeModel model) |
=> self |
-> cell | `cell` - A `CellRenderer`.
-> model row | `model` - A model containing rows of type `row`.
-> (row -> IO ()) | Function to set data on the cell renderer.
-> m () |

Like `cellLayoutSetAttributes`, but allows any IO action to be used

cellLayoutSetDataFunc' Source #

Arguments

:: (MonadIO m, IsCellLayout self, IsCellRenderer cell, IsTreeModel model) |
=> self |
-> cell | `cell` - A `CellRenderer`.
-> model | `model` - A model from which to draw data.
-> (TreeIter -> IO ()) | Function to set attributes on the cell renderer.
-> m () |

Install a function that looks up a row in the model and sets the attributes of the `CellRenderer` `cell` using the row's content.

convertIterFromParentToChildModel Source #

Arguments

:: TreeIter | the iterator
-> TreeModel | the model that we got from the all back
-> TreeModel | the model that we actually want
-> IO TreeIter |