<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-pygtkgenericcellrenderer">
  <refnamediv>
    <refname>gtk.GenericCellRenderer</refname>
    <refpurpose>a TreeView cell renderer that helps create cell renderers
in Python</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.GenericCellRenderer</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkcellrenderer">gtk.CellRenderer</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtkgenericcellrenderer">gtk.GenericCellRenderer</link></methodname>
	<methodparam></methodparam>  </constructorsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkcellrenderer">gtk.CellRenderer</link>
      +-- <link linkend="class-pygtkgenericcellrenderer">gtk.GenericCellRenderer</link>
</synopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>The <link
linkend="class-pygtkgenericcellrenderer"><classname>gtk.GenericCellRenderer</classname></link> 
helps in the creation of <link
linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link> cell
renderers in Python. The <link
linkend="class-pygtkgenericcellrenderer"><classname>gtk.GenericCellRenderer</classname></link> 
is subclassed to provide a new cell renderer that provides cell renderer
behavior using methods with predefined names that are called by the <link
linkend="class-pygtkgenericcellrenderer"><classname>gtk.GenericCellRenderer</classname></link> 
methods as required to provide the various cell renderer operations. The
methods that need to be defined by the programmer in Python are:</para>

    <methodsynopsis language="python">
      <methodname>on_get_size</methodname>
      <methodparam><parameter>widget</parameter></methodparam>
      <methodparam><parameter>cell_area</parameter></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
      <methodname>on_render</methodname>
      <methodparam><parameter>window</parameter></methodparam>
      <methodparam><parameter>widget</parameter></methodparam>
      <methodparam><parameter>background_area</parameter></methodparam>
      <methodparam><parameter>cell_area</parameter></methodparam>
      <methodparam><parameter>expose_area</parameter></methodparam>
      <methodparam><parameter>flags</parameter></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
      <methodname>on_activate</methodname>
      <methodparam><parameter>event</parameter></methodparam>
      <methodparam><parameter>widget</parameter></methodparam>
      <methodparam><parameter>path</parameter></methodparam>
      <methodparam><parameter>background_area</parameter></methodparam>
      <methodparam><parameter>cell_area</parameter></methodparam>
      <methodparam><parameter>flags</parameter></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
      <methodname>on_start_editing</methodname>
      <methodparam><parameter>event</parameter></methodparam>
      <methodparam><parameter>widget</parameter></methodparam>
      <methodparam><parameter>path</parameter></methodparam>
      <methodparam><parameter>background_area</parameter></methodparam>
      <methodparam><parameter>cell_area</parameter></methodparam>
      <methodparam><parameter>flags</parameter></methodparam>
    </methodsynopsis>

    <para>See the <link
linkend="class-gtkcellrenderer"><classname>gtk.CellRenderer</classname></link> 
description for details of the above methods.</para>

  </refsect1>

  <refsect1 id="constructor-gtkgenericcellrenderer">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.GenericCellRenderer</methodname>
	<methodparam></methodparam>  </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new <link
linkend="class-pygtkgenericcellrenderer"><classname>gtk.GenericCellRenderer</classname></link> 
object</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-pygtkgenericcellrenderer"><classname>gtk.GenericCellRenderer</classname></link></para>

  </refsect1>

</refentry>
