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
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.CellView</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.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="previous" href="class-gtkcellrenderertoggle.html" title="gtk.CellRendererToggle"><link rel="next" href="class-gtkcheckbutton.html" title="gtk.CheckButton"></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.CellView</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkcellrenderertoggle.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkcheckbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkcellview"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.CellView</h2><p>gtk.CellView — a widget displaying a single row of a <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>
(new in PyGTK 2.6).</p></div><div class="refsect1" lang="en"><a name="id3161706"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.CellView</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a href="class-gtkcellview.html#constructor-gtkcellview" title="Constructor">gtk.CellView</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkcellview.html#method-gtkcellview--set-model" title="gtk.CellView.set_model">set_model</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>model</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkcellview.html#method-gtkcellview--set-displayed-row" title="gtk.CellView.set_displayed_row">set_displayed_row</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkcellview.html#method-gtkcellview--get-displayed-row" title="gtk.CellView.get_displayed_row">get_displayed_row</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkcellview.html#method-gtkcellview--get-size-of-row" title="gtk.CellView.get_size_of_row">get_size_of_row</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>requisition</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkcellview.html#method-gtkcellview--set-background-color" title="gtk.CellView.set_background_color">set_background_color</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>color</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkcellview.html#method-gtkcellview--get-cell-renderers" title="gtk.CellView.get_cell_renderers">get_cell_renderers</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<span class="bold"><b>Functions</b></span>
<code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkcellview.html#function-gtk--cell-view-new-with-text" title="gtk.cell_view_new_with_text">gtk.cell_view_new_with_text</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkcellview.html#function-gtk--cell-view-new-with-markup" title="gtk.cell_view_new_with_markup">gtk.cell_view_new_with_markup</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>markup</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkcellview.html#function-gtk--cell-view-new-with-pixbuf" title="gtk.cell_view_new_with_pixbuf">gtk.cell_view_new_with_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pixbuf</tt></b></span></span>)</code></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3314041"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a href="class-gtkcellview.html" title="gtk.CellView">gtk.CellView</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3260925"></a><h2>Properties</h2><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">"background"</td><td valign="top">Write</td><td valign="top">The background color as a string. Default value:
<tt class="literal">None</tt></td></tr><tr valign="top"><td valign="top">"background-gdk"</td><td valign="top">Read-Write</td><td valign="top">The background color as a <a href="class-gdkcolor.html" title="gtk.gdk.Color"><tt class="classname">gtk.gdk.Color</tt></a>.</td></tr><tr valign="top"><td valign="top">"background-set"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, use the "background-gdk"
property to set the background color.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3261593"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This widget is available in PyGTK 2.6 and above.</p></div><p>The <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a> is a
widget that displays one row of a <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>. <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a>
implements the <a href="class-gtkcelllayout.html" title="gtk.CellLayout"><tt class="classname">gtk.CellLayout</tt></a>
interface that provides for the addition and management of <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
objects.</p></div><div class="refsect1" lang="en"><a name="constructor-gtkcellview"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.CellView</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This constructor is available in PyGTK 2.6 and above.</p></div><p>Creates a new <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a>
widget.</p></div><div class="refsect1" lang="en"><a name="id3227662"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkcellview--set-model"></a><h3>gtk.CellView.set_model</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_model</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>model</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>model</tt></b>:</span></td><td>a <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a> or <tt class="literal">None</tt></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 <tt class="methodname">set_model</tt>() method sets the <a href="class-gtktreemodel.html" title="gtk.TreeModel"><tt class="classname">gtk.TreeModel</tt></a>
used by the cell view to that specified by <i class="parameter"><tt>model</tt></i>. If
<i class="parameter"><tt>model</tt></i> is <tt class="literal">None</tt> the cell view's
model will be unset.</p></div><div class="refsect2" lang="en"><a name="method-gtkcellview--set-displayed-row"></a><h3>gtk.CellView.set_displayed_row</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_displayed_row</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>a tree path or <tt class="literal">None</tt> to unset
the row</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 <tt class="methodname">set_displayed_row</tt>() method sets the
row of the model that is currently displayed to the path specified by
<i class="parameter"><tt>path</tt></i>. If <i class="parameter"><tt>path</tt></i> is
<tt class="literal">None</tt> the display row will be unset, and the contents of
the cell view "stick" at their last value. This is not normally a desired
result, but may be a needed intermediate state if say, the model for the
cell view becomes temporarily empty.</p></div><div class="refsect2" lang="en"><a name="method-gtkcellview--get-displayed-row"></a><h3>gtk.CellView.get_displayed_row</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_displayed_row</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the path of the currently displayed row in the
cell view's model</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 <tt class="methodname">get_displayed_row</tt>() method returns
the path of the currently displayed row as set by the <a href="class-gtkcellview.html#method-gtkcellview--set-displayed-row" title="gtk.CellView.set_displayed_row"><tt class="methodname">set-displayed_row</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkcellview--get-size-of-row"></a><h3>gtk.CellView.get_size_of_row</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_size_of_row</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>path</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>path</tt></b>:</span></td><td>the path of a row</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gtkrequisition.html" title="gtk.Requisition"><tt class="classname">gtk.Requisition</tt></a>
containing the required size data</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 <tt class="methodname">get_size_of_row</tt>() method returns a
<a href="class-gtkrequisition.html" title="gtk.Requisition"><tt class="classname">gtk.Requisition</tt></a>
containing the size required for displaying the row with the tree path
specified by <i class="parameter"><tt>path</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtkcellview--set-background-color"></a><h3>gtk.CellView.set_background_color</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_background_color</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>color</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>color</tt></b>:</span></td><td></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 <tt class="methodname">set_background_color</tt>() method sets
the background color of the cell view to the <a href="class-gdkcolor.html" title="gtk.gdk.Color"><tt class="classname">gtk.gdk.Color</tt></a>
specified by <i class="parameter"><tt>color</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtkcellview--get-cell-renderers"></a><h3>gtk.CellView.get_cell_renderers</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_cell_renderers</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a list of the <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
objects of the cell view.</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 <tt class="methodname">get_cell_renderers</tt>() method returns
a list containing the <a href="class-gtkcellrenderer.html" title="gtk.CellRenderer"><tt class="classname">gtk.CellRenderer</tt></a>
objects used by the cell view.</p></div></div><div class="refsect1" lang="en"><a name="id3314279"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--cell-view-new-with-text"></a><h3>gtk.cell_view_new_with_text</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.cell_view_new_with_text</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>a string</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <tt class="function">gtk.cell_view_new_with_text</tt>() function
creates a new <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a> with
a <a href="class-gtkcellrenderertext.html" title="gtk.CellRendererText"><tt class="classname">gtk.CellRendererText</tt></a>
displaying the string specified by <i class="parameter"><tt>text</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-gtk--cell-view-new-with-markup"></a><h3>gtk.cell_view_new_with_markup</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.cell_view_new_with_markup</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>markup</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>markup</tt></b>:</span></td><td>a string containing Pango markup to be
displayed.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <tt class="function">gtk.cell_view_new_with_markup</tt>()
function creates a new <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a> with
a <a href="class-gtkcellrenderertext.html" title="gtk.CellRendererText"><tt class="classname">gtk.CellRendererText</tt></a>
displaying the Pango markup specified by
<i class="parameter"><tt>markup</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-gtk--cell-view-new-with-pixbuf"></a><h3>gtk.cell_view_new_with_pixbuf</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.cell_view_new_with_pixbuf</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pixbuf</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>pixbuf</tt></b>:</span></td><td>a <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a></td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.6 and above.</p></div><p>The <tt class="function">gtk.cell_view_new_with_pixbuf</tt>()
function creates a new <a href="class-gtkcellview.html" title="gtk.CellView"><tt class="classname">gtk.CellView</tt></a> with
a <a href="class-gtkcellrendererpixbuf.html" title="gtk.CellRendererPixbuf"><tt class="classname">gtk.CellRendererPixbuf</tt></a>
displaying the <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a>
specified by <i class="parameter"><tt>pixbuf</tt></i>.</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-gtkcellrenderertoggle.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-gtkcheckbutton.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.CellRendererToggle</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.CheckButton</td></tr></table></div></body></html>
|