/usr/share/gtk-doc/html/pygtk/class-gtkcelllayout.html is in python-gtk2-doc 2.24.0-5.1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.CellLayout</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkcelleditable.html" title="gtk.CellEditable"><link rel="next" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.CellLayout</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkcelleditable.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkcellrenderer.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.CellLayout"><a name="class-gtkcelllayout"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.CellLayout</h2><p>gtk.CellLayout — an interface for packing cells</p></div><div class="refsect1" title="Synopsis"><a name="id3626798"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.CellLayout</span></span>(<span class="ooclass"><span class="classname">gobject.GInterface</span></span>):
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--pack-start" title="gtk.CellLayout.pack_start">pack_start</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--pack-end" title="gtk.CellLayout.pack_end">pack_end</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--clear" title="gtk.CellLayout.clear">clear</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--get-cells" title="gtk.CellLayout.get_cells">get_cells</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--set-attributes" title="gtk.CellLayout.set_attributes">set_attributes</a></span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cell</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--add-attribute" title="gtk.CellLayout.add_attribute">add_attribute</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>column</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--set-cell-data-func" title="gtk.CellLayout.set_cell_data_func">set_cell_data_func</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>func_data</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--clear-attributes" title="gtk.CellLayout.clear_attributes">clear_attributes</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--reorder" title="gtk.CellLayout.reorder">reorder</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>position</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Description"><a name="id3627120"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This interface is available in PyGTK 2.4 and above.</p></div><p><a class="link" href="class-gtkcelllayout.html" title="gtk.CellLayout"><code class="classname">gtk.CellLayout</code></a>
is an interface to be implemented by all objects that want to provide a
<a class="link" href="class-gtktreeviewcolumn.html" title="gtk.TreeViewColumn"><code class="classname">gtk.TreeViewColumn</code></a>-like
API for packing cells, setting attributes and data funcs. The <a class="link" href="class-gtkcelllayout.html" title="gtk.CellLayout"><code class="classname">gtk.CellLayout</code></a>
interface is implemented by the <a class="link" href="class-gtkcomboboxentry.html" title="gtk.ComboBoxEntry"><code class="classname">gtk.ComboBoxEntry</code></a>,
<a class="link" href="class-gtkcombobox.html" title="gtk.ComboBox"><code class="classname">gtk.ComboBox</code></a>,
<a class="link" href="class-gtkentrycompletion.html" title="gtk.EntryCompletion"><code class="classname">gtk.EntryCompletion</code></a>
and <a class="link" href="class-gtktreeviewcolumn.html" title="gtk.TreeViewColumn"><code class="classname">gtk.TreeViewColumn</code></a>
widgets.</p></div><div class="refsect1" title="Methods"><a name="id3627182"></a><h2>Methods</h2><div class="refsect2" title="gtk.CellLayout.pack_start"><a name="method-gtkcelllayout--pack-start"></a><h3>gtk.CellLayout.pack_start</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pack_start</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span><span class="initializer">=True</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cell</code></strong> :</span></p></td><td>A <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>expand</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the
<em class="parameter"><code>cell</code></em> is to be given extra space that is
allocated to the cell layout.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">pack_start</code>() method packs the <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
specified by <em class="parameter"><code>cell</code></em> into the beginning of the cell
layout. If the optional parameter <em class="parameter"><code>expand</code></em> is
<code class="literal">False</code>, then <em class="parameter"><code>cell</code></em> is allocated no
more space than it needs. Any unused space is divided evenly between cells
for which <em class="parameter"><code>expand</code></em> is <code class="literal">True</code>.</p></div><div class="refsect2" title="gtk.CellLayout.pack_end"><a name="method-gtkcelllayout--pack-end"></a><h3>gtk.CellLayout.pack_end</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pack_end</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expand</code></strong></span><span class="initializer">=True</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cell</code></strong> :</span></p></td><td>A <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>expand</code></strong> :</span></p></td><td>if <code class="literal">True</code>, the
<em class="parameter"><code>cell</code></em> is to be given extra space that is
allocated to the cell layout.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">pack_end</code>() method adds the <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
specified by <em class="parameter"><code>cell</code></em> to the end of the cell layout. If
the optional parameter <em class="parameter"><code>expand</code></em> is
<code class="literal">False</code>, then the <em class="parameter"><code>cell</code></em> is allocated
no more space than it needs. Any unused space is divided evenly between
cells for which <em class="parameter"><code>expand</code></em> is
<code class="literal">True</code>.</p></div><div class="refsect2" title="gtk.CellLayout.clear"><a name="method-gtkcelllayout--clear"></a><h3>gtk.CellLayout.clear</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear</span>(<span class="methodparam"></span>)</code></pre><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">clear</code>() method unsets all the
attribute mappings on all cell renderers in the cell layout.</p></div><div class="refsect2" title="gtk.CellLayout.get_cells"><a name="method-gtkcelllayout--get-cells"></a><h3>gtk.CellLayout.get_cells</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_cells</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list of cell renderers.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>The <code class="methodname">get_cells</code>() method returns the cell
renderers which have been added to cell_layout.</p></div><div class="refsect2" title="gtk.CellLayout.set_attributes"><a name="method-gtkcelllayout--set-attributes"></a><h3>gtk.CellLayout.set_attributes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_attributes</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cell</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cell</code></em> :</span></p></td><td>A <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>Zero or more keyword-value arguments in the format
attribute=column.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_attributes</code>() method sets the
attributes provided as a keyword argument list as the attributes of the
<a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
specified by <em class="parameter"><code>cell</code></em>. The attributes should be supplied
as keyword-value arguments in the format: attribute=column (e.g. text=0,
background=1). All existing attributes are removed, and replaced with the
new attributes.</p></div><div class="refsect2" title="gtk.CellLayout.add_attribute"><a name="method-gtkcelllayout--add-attribute"></a><h3>gtk.CellLayout.add_attribute</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_attribute</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>attribute</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>column</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cell</code></strong> :</span></p></td><td>A <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>attribute</code></strong> :</span></p></td><td>An attribute on the renderer.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>column</code></strong> :</span></p></td><td>The column number in the model to get the attribute from.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">add_attribute</code>() method adds an
attribute mapping to the list in the cell layout. The
<em class="parameter"><code>column</code></em> parameter is the column of the model to get a
value from, and the <em class="parameter"><code>attribute</code></em> parameter is the
attribute of <em class="parameter"><code>cell</code></em> 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 <a class="link" href="class-gtkcellrenderertext.html" title="gtk.CellRendererText"><code class="classname">gtk.CellRendererText</code></a>
get its values from column 2.</p></div><div class="refsect2" title="gtk.CellLayout.set_cell_data_func"><a name="method-gtkcelllayout--set-cell-data-func"></a><h3>gtk.CellLayout.set_cell_data_func</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_cell_data_func</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>func</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>func_data</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cell</code></strong> :</span></p></td><td>A <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>func</code></strong> :</span></p></td><td>The function to use.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>func_data</code></strong> :</span></p></td><td>The user data for <em class="parameter"><code>func</code></em>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_cell_data_func</code>() method sets
the function (or method) specified by <em class="parameter"><code>func</code></em> to be used
for setting the column value of the <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
specified by <em class="parameter"><code>cell</code></em> instead of using the standard
attribute mapping method. <em class="parameter"><code>func</code></em> may be
<code class="literal">None</code> to remove the current function. The signature of
<em class="parameter"><code>func</code></em> is:</p><pre class="programlisting">
<code class="methodsynopsis"> def <span class="methodname">celldatafunction</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>celllayout</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>cell</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>model</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>iter</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_data</code></em></span></span>)</code><br>
<code class="methodsynopsis"> def <span class="methodname">celldatamethod</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>self</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>celllayout</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>cell</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>model</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>iter</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_data</code></em></span></span>)</code>
</pre><p>where <em class="parameter"><code>celllayout</code></em> is the <a class="link" href="class-gtkcelllayout.html" title="gtk.CellLayout"><code class="classname">gtk.CellLayout</code></a>,
<em class="parameter"><code>cell</code></em> is the <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
for <em class="parameter"><code>celllayout</code></em>, <em class="parameter"><code>model</code></em> is the
<a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a> and
<em class="parameter"><code>iter</code></em> is the <a class="link" href="class-gtktreeiter.html" title="gtk.TreeIter"><code class="classname">gtk.TreeIter</code></a>
pointing at the row.</p></div><div class="refsect2" title="gtk.CellLayout.clear_attributes"><a name="method-gtkcelllayout--clear-attributes"></a><h3>gtk.CellLayout.clear_attributes</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">clear_attributes</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cell</code></strong> :</span></p></td><td>A <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a> to clear the attribute mapping on.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">clear_attributes</code>() method clears
all existing attribute mappings from the <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
specified by <em class="parameter"><code>cell</code></em> previously set with the <a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--set-attributes" title="gtk.CellLayout.set_attributes"><code class="methodname">set_attributes</code>()</a>
or <a class="link" href="class-gtkcelllayout.html#method-gtkcelllayout--add-attribute" title="gtk.CellLayout.add_attribute"><code class="methodname">add_attribute</code>()</a>
methods.</p></div><div class="refsect2" title="gtk.CellLayout.reorder"><a name="method-gtkcelllayout--reorder"></a><h3>gtk.CellLayout.reorder</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">reorder</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>position</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>cell</code></strong> :</span></p></td><td>A <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a> to reorder.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>position</code></strong> :</span></p></td><td>New position to insert <em class="parameter"><code>cell</code></em> at.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">reorder</code>() method re-inserts the
<a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
specified by <em class="parameter"><code>cell</code></em> at
<em class="parameter"><code>position</code></em>. Note that <em class="parameter"><code>cell</code></em> has
to already be packed into <em class="parameter"><code>cell_layout</code></em> for this to
function properly.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkcelleditable.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkcellrenderer.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.CellEditable </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.CellRenderer</td></tr></table></div></body></html>
|