1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.CellRenderer</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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-gtkcelllayout.html" title="gtk.CellLayout"><link rel="next" href="class-gtkcellrendereraccel.html" title="gtk.CellRendererAccel"></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.CellRenderer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkcelllayout.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkcellrendereraccel.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkcellrenderer"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.CellRenderer</h2><p>gtk.CellRenderer — a base class for objects that render on a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a></p></div><div class="refsect1" lang="en"><a name="id3435179"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.CellRenderer</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a></span></span>):
2
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--get-size" title="gtk.CellRenderer.get_size">get_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--render" title="gtk.CellRenderer.render">render</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expose_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--activate" title="gtk.CellRenderer.activate">activate</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--start-editing" title="gtk.CellRenderer.start_editing">start_editing</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--editing-canceled" title="gtk.CellRenderer.editing_canceled">editing_canceled</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--stop-editing" title="gtk.CellRenderer.stop_editing">stop_editing</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>canceled</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--set-fixed-size" title="gtk.CellRenderer.set_fixed_size">set_fixed_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--get-fixed-size" title="gtk.CellRenderer.get_fixed_size">get_fixed_size</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3435594"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.CellRenderer</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.1"><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-gtkcelllayout.html" title="gtk.CellLayout"><link rel="next" href="class-gtkcellrendereraccel.html" title="gtk.CellRendererAccel"></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.CellRenderer</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkcelllayout.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkcellrendereraccel.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.CellRenderer"><a name="class-gtkcellrenderer"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.CellRenderer</h2><p>gtk.CellRenderer — a base class for objects that render on a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a></p></div><div class="refsect1" title="Synopsis"><a name="id3744319"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.CellRenderer</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a></span></span>):
2
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--get-size" title="gtk.CellRenderer.get_size">get_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--render" title="gtk.CellRenderer.render">render</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>expose_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--activate" title="gtk.CellRenderer.activate">activate</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--start-editing" title="gtk.CellRenderer.start_editing">start_editing</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--editing-canceled" title="gtk.CellRenderer.editing_canceled">editing_canceled</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--stop-editing" title="gtk.CellRenderer.stop_editing">stop_editing</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>canceled</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--set-fixed-size" title="gtk.CellRenderer.set_fixed_size">set_fixed_size</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--get-fixed-size" title="gtk.CellRenderer.get_fixed_size">get_fixed_size</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3744734"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
3
3
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
4
4
+-- <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer">gtk.CellRenderer</a>
5
</pre></div><div class="refsect1" lang="en"><a name="properties-gtkcellrenderer"></a><h2>gtk.CellRenderer Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"cell-background"</td><td valign="top">Write</td><td valign="top">The background color of the cell as a string.
5
</pre></div><div class="refsect1" title="gtk.CellRenderer Properties"><a name="properties-gtkcellrenderer"></a><h2>gtk.CellRenderer Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="3.5in"></colgroup><tbody><tr valign="top"><td valign="top">"cell-background"</td><td valign="top">Write</td><td valign="top">The background color of the cell as a string.
6
6
Default: None.</td></tr><tr valign="top"><td valign="top">"cell-background-gdk"</td><td valign="top">Read/Write</td><td valign="top">The background color of the cell as a <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>.</td></tr><tr valign="top"><td valign="top">"cell-background-set"</td><td valign="top">Read/Write</td><td valign="top">If True the cell background color is set by this
7
7
cellrenderer. Default: False.</td></tr><tr valign="top"><td valign="top">"height"</td><td valign="top">Read/Write</td><td valign="top">The fixed height of the cell. Allowed values >= -1.
8
8
Default: -1.</td></tr><tr valign="top"><td valign="top">"is-expanded"</td><td valign="top">Read/Write</td><td valign="top">If True the row has children and it is expanded to show the
15
15
cell. Default: 0.</td></tr><tr valign="top"><td valign="top">"yalign"</td><td valign="top">Read/Write</td><td valign="top">The fraction of <span class="emphasis"><em>free</em></span> space above the
16
16
cell in the range 0.0 to 1.0. Allowed values between 0 and 1.
17
17
Default: 0.5.</td></tr><tr valign="top"><td valign="top">"ypad"</td><td valign="top">Read/Write</td><td valign="top">The amount of padding above and below cell. Default:
18
0.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkcellrenderer"></a><h2>gtk.CellRenderer Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkcellrenderer.html#signal-gtkcellrenderer--editing-canceled" title='The "editing-canceled" gtk.CellRenderer Signal'>editing-canceled</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cellrenderer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkcellrenderer.html#signal-gtkcellrenderer--editing-started" title='The "editing-started" gtk.CellRenderer Signal'>editing-started</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cellrenderer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>editable</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>path</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3436074"></a><h2>Description</h2><p>The <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
18
0.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.CellRenderer Signal Prototypes"><a name="signal-prototypes-gtkcellrenderer"></a><h2>gtk.CellRenderer Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtkcellrenderer.html#signal-gtkcellrenderer--editing-canceled" title='The "editing-canceled" gtk.CellRenderer Signal'>editing-canceled</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cellrenderer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtkcellrenderer.html#signal-gtkcellrenderer--editing-started" title='The "editing-started" gtk.CellRenderer Signal'>editing-started</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cellrenderer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>editable</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>path</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3745214"></a><h2>Description</h2><p>The <a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
19
19
is a base class for a set of objects used for rendering a cell to a <a class="link" href="class-gdkdrawable.html" title="gtk.gdk.Drawable"><code class="classname">gtk.gdk.Drawable</code></a>. The
20
20
<a class="link" href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><code class="classname">gtk.CellRenderer</code></a>
21
21
provides the common attributes and methods for its subclasses (<a class="link" href="class-gtkcellrendererpixbuf.html" title="gtk.CellRendererPixbuf"><code class="classname">gtk.CellRendererPixbuf</code></a>,
73
73
<code class="literal">gtk.CELL_RENDERER_SELECTED</code>,
74
74
<code class="literal">gtk.CELL_RENDERER_PRELIT</code>,
75
75
<code class="literal">gtk.CELL_RENDERER_INSENSITIVE</code> or
76
<code class="literal">gtk.CELL_RENDERER_SORTED</code></p></div><div class="refsect2" lang="en"><a name="method-gtkcellrenderer--start-editing"></a><h3>gtk.CellRenderer.start_editing</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">start_editing</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</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>event</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkevent.html" title="gtk.gdk.Event"><code class="classname">gtk.gdk.Event</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>widget</code></strong> :</span></p></td><td>the widget that received the
76
<code class="literal">gtk.CELL_RENDERER_SORTED</code></p></div><div class="refsect2" title="gtk.CellRenderer.start_editing"><a name="method-gtkcellrenderer--start-editing"></a><h3>gtk.CellRenderer.start_editing</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">start_editing</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>path</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>background_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>cell_area</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>flags</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>event</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkevent.html" title="gtk.gdk.Event"><code class="classname">gtk.gdk.Event</code></a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>widget</code></strong> :</span></p></td><td>the widget that received the
77
77
event</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>path</code></strong> :</span></p></td><td>a widget-dependent string representation of the
78
78
event location; e.g. for <a class="link" href="class-gtktreeview.html" title="gtk.TreeView"><code class="classname">gtk.TreeView</code></a>, a
79
79
string representation of
80
80
<code class="literal">gtk.TreePath</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>background_area</code></strong> :</span></p></td><td>background area as passed to <a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--render" title="gtk.CellRenderer.render"><code class="methodname">render</code>()</a>.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>cell_area</code></strong> :</span></p></td><td>cell area as passed to <a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--render" title="gtk.CellRenderer.render"><code class="methodname">render</code>()</a></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>flags</code></strong> :</span></p></td><td>render flags</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A new <a class="link" href="class-gtkcelleditable.html" title="gtk.CellEditable"><code class="classname">gtk.CellEditable</code></a>,
81
81
or <code class="literal">None</code></td></tr></tbody></table><p>The <code class="methodname">start_editing</code>() method initiates
82
the editing of a cell.</p></div><div class="refsect2" lang="en"><a name="method-gtkcellrenderer--editing-canceled"></a><h3>gtk.CellRenderer.editing_canceled</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">editing_canceled</span>(<span class="methodparam"></span>)</code></pre><div class="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><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.6 and above. Use the
82
the editing of a cell.</p></div><div class="refsect2" title="gtk.CellRenderer.editing_canceled"><a name="method-gtkcellrenderer--editing-canceled"></a><h3>gtk.CellRenderer.editing_canceled</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">editing_canceled</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><div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is deprecated in PyGTK 2.6 and above. Use the
83
83
<a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--stop-editing" title="gtk.CellRenderer.stop_editing"><code class="methodname">stop_editing</code>()</a>
84
84
method instead.</p></div><p>The <code class="methodname">editing_canceled</code>() method causes
85
85
the cell renderer to emit the "editing-canceled" signal. This method is for
86
86
use only by implementations of cell renderers that need to notify the client
87
87
program that an editing process was canceled and the changes were not
88
committed.</p></div><div class="refsect2" lang="en"><a name="method-gtkcellrenderer--stop-editing"></a><h3>gtk.CellRenderer.stop_editing</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">stop_editing</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>canceled</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>canceled</code></strong> :</span></p></td><td>if <code class="literal">True</code> the editing has been
89
canceled</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.6 and above.</p></div><p>The <code class="methodname">stop_editing</code>() method informs the
88
committed.</p></div><div class="refsect2" title="gtk.CellRenderer.stop_editing"><a name="method-gtkcellrenderer--stop-editing"></a><h3>gtk.CellRenderer.stop_editing</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">stop_editing</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>canceled</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>canceled</code></strong> :</span></p></td><td>if <code class="literal">True</code> the editing has been
89
canceled</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.6 and above.</p></div><p>The <code class="methodname">stop_editing</code>() method informs the
90
90
cell renderer that the editing is stopped. If
91
91
<em class="parameter"><code>canceled</code></em> is <code class="literal">True</code>, the cell
92
92
renderer will emit the "editing-canceled" signal. This method should be
93
93
called by cell renderer implementations in response to the "editing-done"
94
signal of <a class="link" href="class-gtkcelleditable.html" title="gtk.CellEditable"><code class="classname">gtk.CellEditable</code></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkcellrenderer--set-fixed-size"></a><h3>gtk.CellRenderer.set_fixed_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_fixed_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</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>width</code></strong> :</span></p></td><td>the width of the cell renderer, or
94
signal of <a class="link" href="class-gtkcelleditable.html" title="gtk.CellEditable"><code class="classname">gtk.CellEditable</code></a>.</p></div><div class="refsect2" title="gtk.CellRenderer.set_fixed_size"><a name="method-gtkcellrenderer--set-fixed-size"></a><h3>gtk.CellRenderer.set_fixed_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_fixed_size</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>width</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>height</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>width</code></strong> :</span></p></td><td>the width of the cell renderer, or
95
95
-1</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>height</code></strong> :</span></p></td><td>the height of the cell renderer, or
96
96
-1</td></tr></tbody></table><p>The <code class="methodname">set_fixed_size</code>() method sets the
97
97
renderer size to the specified <em class="parameter"><code>width</code></em> and
98
<em class="parameter"><code>height</code></em>, independent of the properties set.</p></div><div class="refsect2" lang="en"><a name="method-gtkcellrenderer--get-fixed-size"></a><h3>gtk.CellRenderer.get_fixed_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_fixed_size</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 tuple containing the width and height of the
98
<em class="parameter"><code>height</code></em>, independent of the properties set.</p></div><div class="refsect2" title="gtk.CellRenderer.get_fixed_size"><a name="method-gtkcellrenderer--get-fixed-size"></a><h3>gtk.CellRenderer.get_fixed_size</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_fixed_size</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 tuple containing the width and height of the
99
99
cell</td></tr></tbody></table><p>The <code class="methodname">get_fixed_size</code>() method retrieves a
100
100
tuple containing the fixed <em class="parameter"><code>width</code></em> and
101
<em class="parameter"><code>height</code></em> of the cell.</p></div></div><div class="refsect1" lang="en"><a name="id3437464"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkcellrenderer--editing-canceled"></a><h3>The "editing-canceled" gtk.CellRenderer Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cellrenderer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</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>cellrenderer</code></em> :</span></p></td><td>the cellrenderer that received the
101
<em class="parameter"><code>height</code></em> of the cell.</p></div></div><div class="refsect1" title="Signals"><a name="id3746604"></a><h2>Signals</h2><div class="refsect2" title='The "editing-canceled" gtk.CellRenderer Signal'><a name="signal-gtkcellrenderer--editing-canceled"></a><h3>The "editing-canceled" gtk.CellRenderer Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cellrenderer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</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>cellrenderer</code></em> :</span></p></td><td>the cellrenderer that received the
102
102
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
103
103
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
104
104
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
105
any)</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This signal is available in GTK+ 2.4 and above.</p></div><p>The "editing-canceled" signal is emitted when the user cancels
105
any)</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 signal is available in GTK+ 2.4 and above.</p></div><p>The "editing-canceled" signal is emitted when the user cancels
106
106
the process of editing a cell. For example, an editable cell renderer
107
107
could be written to cancel editing when the user presses Escape. Also
108
108
see the <a class="link" href="class-gtkcellrenderer.html#method-gtkcellrenderer--editing-canceled" title="gtk.CellRenderer.editing_canceled"><code class="methodname">editing_canceled</code>()</a>
109
method.</p></div><div class="refsect2" lang="en"><a name="signal-gtkcellrenderer--editing-started"></a><h3>The "editing-started" gtk.CellRenderer Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cellrenderer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>editable</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>path</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</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>cellrenderer</code></em> :</span></p></td><td>the cellrenderer that received the
109
method.</p></div><div class="refsect2" title='The "editing-started" gtk.CellRenderer Signal'><a name="signal-gtkcellrenderer--editing-started"></a><h3>The "editing-started" gtk.CellRenderer Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>cellrenderer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>editable</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>path</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</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>cellrenderer</code></em> :</span></p></td><td>the cellrenderer that received the
110
110
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>editable</code></em> :</span></p></td><td>the <a class="link" href="class-gtkcelleditable.html" title="gtk.CellEditable"><code class="classname">gtk.CellEditable</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td><td>he path identifying the edited
111
111
cell</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
112
112
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
113
113
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
114
any)</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This signal is available in GTK+ 2.6 and above.</p></div><p>The "editing-started" signal is emitted when a cell starts to be
114
any)</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 signal is available in GTK+ 2.6 and above.</p></div><p>The "editing-started" signal is emitted when a cell starts to be
115
115
edited. The intended use of this signal is to do special setup on
116
116
<em class="parameter"><code>editable</code></em>, e.g. adding a <a class="link" href="class-gtkentrycompletion.html" title="gtk.EntryCompletion"><code class="classname">gtk.EntryCompletion</code></a>
117
117
or setting up additional columns in a <a class="link" href="class-gtkcombobox.html" title="gtk.ComboBox"><code class="classname">gtk.ComboBox</code></a>.</p><p>Note that GTK+ doesn't guarantee that cell renderers will