<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Graphics.UI.Gtk.ModelView.CellLayout</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Graphics-UI-Gtk-ModelView-CellLayout.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">gtk-0.12.0: Binding to the Gtk+ graphical user interface library.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable (depends on GHC)</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>gtk2hs-users@lists.sourceforge.net</td></tr></table><p class="caption">Graphics.UI.Gtk.ModelView.CellLayout</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Detail </a></li><li><a href="#g:2">Class Hierarchy </a></li><li><a href="#g:3">Types </a></li><li><a href="#g:4">Methods </a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>An interface for packing cells </p><ul><li> Module available since Gtk+ version 2.4 </li></ul></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> o => <a href="#t:CellLayoutClass">CellLayoutClass</a> o </li><li class="src short"><a href="#v:toCellLayout">toCellLayout</a> :: <a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> o => o -> CellLayout</li><li class="src short"><a href="#v:cellLayoutPackStart">cellLayoutPackStart</a> :: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell) => self -> cell -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:cellLayoutPackEnd">cellLayoutPackEnd</a> :: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell) => self -> cell -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:cellLayoutReorder">cellLayoutReorder</a> :: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell) => self -> cell -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:cellLayoutClear">cellLayoutClear</a> :: <a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:cellLayoutClearAttributes">cellLayoutClearAttributes</a> :: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell) => self -> cell -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:cellLayoutGetCells">cellLayoutGetCells</a> :: <a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> [<a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a>]</li><li class="src short"><a href="#v:cellLayoutAddColumnAttribute">cellLayoutAddColumnAttribute</a> :: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell) => self -> cell -> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadWriteAttr">ReadWriteAttr</a> cell a v -> <a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:ColumnId">ColumnId</a> row v -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:cellLayoutSetAttributes">cellLayoutSetAttributes</a> :: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell, <a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:TreeModelClass">TreeModelClass</a> (model row), <a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:TypedTreeModelClass">TypedTreeModelClass</a> model) => self -> cell -> model row -> (row -> [<a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:AttrOp">AttrOp</a> cell]) -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:cellLayoutSetAttributeFunc">cellLayoutSetAttributeFunc</a> :: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell, <a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:TreeModelClass">TreeModelClass</a> model) => self -> cell -> model -> (<a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:TreeIter">TreeIter</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li></ul></div><div id="interface"><h1 id="g:1">Detail </h1><div class="doc"><p><code>CellLayout</code> is an interface which is implemented by all objects which provide a <code><a href="Graphics-UI-Gtk-ModelView-TreeViewColumn.html#t:TreeViewColumn">TreeViewColumn</a></code> API for packing cells, setting attributes and data funcs. </p></div><h1 id="g:2">Class Hierarchy </h1><div class="doc"><pre> | Interface CellLayout | +----<code><a href="Graphics-UI-Gtk-ModelView-TreeViewColumn.html#t:TreeViewColumn">TreeViewColumn</a></code> | +----<code><a href="Graphics-UI-Gtk-ModelView-CellView.html#t:CellView">CellView</a></code> | +----<code><a href="Graphics-UI-Gtk-ModelView-IconView.html#t:IconView">IconView</a></code> | +----<code><a href="Graphics-UI-Gtk-Entry-EntryCompletion.html#t:EntryCompletion">EntryCompletion</a></code> | +----<code><a href="Graphics-UI-Gtk-MenuComboToolbar-ComboBox.html#t:ComboBox">ComboBox</a></code> | +----<code><a href="Graphics-UI-Gtk-MenuComboToolbar-ComboBoxEntry.html#t:ComboBoxEntry">ComboBoxEntry</a></code> </pre></div><h1 id="g:3">Types </h1><div class="top"><p class="src"><span class="keyword">class</span> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-GObject.html#t:GObjectClass">GObjectClass</a> o => <a name="t:CellLayoutClass" class="def">CellLayoutClass</a> o <a href="src/Graphics-UI-Gtk-Types.html#CellLayoutClass" class="link">Source</a></p><div class="subs instances"><p id="control.i:CellLayoutClass" class="caption collapser" onclick="toggleSection('i:CellLayoutClass')">Instances</p><div id="section.i:CellLayoutClass" class="show"><table><tr><td class="src"><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> <a href="Graphics-UI-Gtk-Entry-EntryCompletion.html#t:EntryCompletion">EntryCompletion</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> CellLayout</td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> <a href="Graphics-UI-Gtk-ModelView-TreeViewColumn.html#t:TreeViewColumn">TreeViewColumn</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> <a href="Graphics-UI-Gtk-ModelView-CellView.html#t:CellView">CellView</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> <a href="Graphics-UI-Gtk-ModelView-IconView.html#t:IconView">IconView</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> <a href="Graphics-UI-Gtk-ModelView-IconView.html#t:IconView">IconView</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> <a href="Graphics-UI-Gtk-MenuComboToolbar-ComboBoxEntry.html#t:ComboBoxEntry">ComboBoxEntry</a></td><td class="doc empty"> </td></tr><tr><td class="src"><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> <a href="Graphics-UI-Gtk-MenuComboToolbar-ComboBox.html#t:ComboBox">ComboBox</a></td><td class="doc empty"> </td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:toCellLayout" class="def">toCellLayout</a> :: <a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> o => o -> CellLayout<a href="src/Graphics-UI-Gtk-Types.html#toCellLayout" class="link">Source</a></p></div><h1 id="g:4">Methods </h1><div class="top"><p class="src"><a name="v:cellLayoutPackStart" class="def">cellLayoutPackStart</a><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html#cellLayoutPackStart" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> cell</td><td class="doc"><p><code>cell</code> - A <code><a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a></code>. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p><code>expand</code> - <code>True</code> if <code>cell</code> is to be given extra space allocated to <code>cellLayout</code>. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Packs the <code>cell</code> into the beginning of the cell layout. If <code>expand</code> is <code>False</code>, then the <code>cell</code> is allocated no more space than it needs. Any unused space is divided evenly between cells for which <code>expand</code> is <code>True</code>. </p><p>Note that reusing the same cell renderer is not supported. </p></div></div><div class="top"><p class="src"><a name="v:cellLayoutPackEnd" class="def">cellLayoutPackEnd</a><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html#cellLayoutPackEnd" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> cell</td><td class="doc"><p><code>cell</code> - A <code><a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a></code>. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p><code>expand</code> - <code>True</code> if <code>cell</code> is to be given extra space allocated to <code>cellLayout</code>. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Adds the <code>cell</code> to the end of <code>cellLayout</code>. If <code>expand</code> is <code>False</code>, then the <code>cell</code> is allocated no more space than it needs. Any unused space is divided evenly between cells for which <code>expand</code> is <code>True</code>. </p><p>Note that reusing the same cell renderer is not supported. </p></div></div><div class="top"><p class="src"><a name="v:cellLayoutReorder" class="def">cellLayoutReorder</a><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html#cellLayoutReorder" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> cell</td><td class="doc"><p><code>cell</code> - A <code><a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a></code> to reorder. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p><code>position</code> - New position to insert <code>cell</code> at. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Re-inserts <code>cell</code> at <code>position</code>. Note that <code>cell</code> has already to be packed into <code>cellLayout</code> for this to function properly. </p></div></div><div class="top"><p class="src"><a name="v:cellLayoutClear" class="def">cellLayoutClear</a> :: <a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self => self -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html#cellLayoutClear" class="link">Source</a></p><div class="doc"><p>Remove all renderers from the cell layout. </p></div></div><div class="top"><p class="src"><a name="v:cellLayoutClearAttributes" class="def">cellLayoutClearAttributes</a><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html#cellLayoutClearAttributes" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> cell</td><td class="doc"><p><code>cell</code> - A <code><a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a></code> to clear the attribute mapping on. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Clears all existing attributes previously set with <code><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#v:cellLayoutSetAttributes">cellLayoutSetAttributes</a></code>. </p></div></div><div class="top"><p class="src"><a name="v:cellLayoutGetCells" class="def">cellLayoutGetCells</a><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html#cellLayoutGetCells" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> [<a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a>]</td><td class="doc"><p>returns a list of cell renderers </p></td></tr></table></div><div class="doc"><p>Returns the cell renderers which have been added to <code>cellLayout</code>. </p><ul><li> Available since Gtk+ version 2.12 </li></ul></div></div><div class="top"><p class="src"><a name="v:cellLayoutAddColumnAttribute" class="def">cellLayoutAddColumnAttribute</a><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html#cellLayoutAddColumnAttribute" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> cell</td><td class="doc"><p><code>cell</code> - A <code><a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a></code>. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:ReadWriteAttr">ReadWriteAttr</a> cell a v</td><td class="doc"><p><code>attribute</code> - An attribute of a renderer. </p></td></tr><tr><td class="src">-> <a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:ColumnId">ColumnId</a> row v</td><td class="doc"><p><code>column</code> - The virtual column of the model from which to retrieve the attribute. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Adds an attribute mapping to the renderer <code>cell</code>. The <code>column</code> is the <code><a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:ColumnId">ColumnId</a></code> of the model to get a value from, and the <code>attribute</code> is the parameter on <code>cell</code> 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 <code><a href="Graphics-UI-Gtk-ModelView-CellRendererText.html#t:CellRendererText">CellRendererText</a></code> get its values from column 2. </p></div></div><div class="top"><p class="src"><a name="v:cellLayoutSetAttributes" class="def">cellLayoutSetAttributes</a><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html#cellLayoutSetAttributes" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell, <a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:TreeModelClass">TreeModelClass</a> (model row), <a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:TypedTreeModelClass">TypedTreeModelClass</a> model)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> cell</td><td class="doc"><p><code>cell</code> - A <code><a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a></code>. </p></td></tr><tr><td class="src">-> model row</td><td class="doc"><p><code>model</code> - A model containing rows of type <code>row</code>. </p></td></tr><tr><td class="src">-> (row -> [<a href="/usr/share/doc/ghc/html/libraries/glib-0.12.0/System-Glib-Attributes.html#t:AttrOp">AttrOp</a> cell])</td><td class="doc"><p>Function to set attributes on the cell renderer. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Specify how a row of the <code>model</code> defines the attributes of the <code><a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a></code> <code>cell</code>. This is a convenience wrapper around <code><a href="Graphics-UI-Gtk-ModelView-CellLayout.html#v:cellLayoutSetAttributeFunc">cellLayoutSetAttributeFunc</a></code> in that it sets the cells of the <code>cell</code> with the data retrieved from the model. </p><ul><li> Note on using <code>Graphics.UI.Gtk.ModelView.TreeModelSort.TreeModelSort</code> and <code>Graphics.UI.Gtk.ModelView.TreeModelFilter.TreeModelFilter</code>: 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 <code><a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:TreeIter">TreeIter</a></code>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. <code>Graphics.UI.Gtk.TreeModel.TreeModelSort.treeModelSortConvertIterToChildIter</code>. Hence, it is possible to install the encapsulating model in the view and to pass the child model to this function. </li></ul></div></div><div class="top"><p class="src"><a name="v:cellLayoutSetAttributeFunc" class="def">cellLayoutSetAttributeFunc</a><a href="src/Graphics-UI-Gtk-ModelView-CellLayout.html#cellLayoutSetAttributeFunc" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="Graphics-UI-Gtk-ModelView-CellLayout.html#t:CellLayoutClass">CellLayoutClass</a> self, <a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRendererClass">CellRendererClass</a> cell, <a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:TreeModelClass">TreeModelClass</a> model)</td><td class="doc empty"> </td></tr><tr><td class="src">=> self</td><td class="doc empty"> </td></tr><tr><td class="src">-> cell</td><td class="doc"><p><code>cell</code> - A <code><a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a></code>. </p></td></tr><tr><td class="src">-> model</td><td class="doc"><p><code>model</code> - A model from which to draw data. </p></td></tr><tr><td class="src">-> (<a href="Graphics-UI-Gtk-ModelView-TreeModel.html#t:TreeIter">TreeIter</a> -> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>)</td><td class="doc"><p>Function to set attributes on the cell renderer. </p></td></tr><tr><td class="src">-> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/System-IO.html#t:IO">IO</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></td><td class="doc empty"> </td></tr></table></div><div class="doc"><p>Install a function that looks up a row in the model and sets the attributes of the <code><a href="Graphics-UI-Gtk-ModelView-CellRenderer.html#t:CellRenderer">CellRenderer</a></code> <code>cell</code> using the row's content. </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>