<?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-gtkcellrendereraccel">

  <refnamediv>
    <refname>gtk.CellRendererAccel</refname>
      <refpurpose>an object that renders a keyboard accelerator in a cell
      (new in PyGTK 2.10)</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.CellRendererAccel</classname></ooclass>
      <ooclass><classname><link linkend="class-gtkcellrenderertext">gtk.CellRendererText</link></classname></ooclass>
      <constructorsynopsis language="python">
        <methodname><link linkend="constructor-gtkcellrendereraccel">gtk.CellRendererAccel</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-gtkcellrenderertext">gtk.CellRendererText</link>
        +-- <link linkend="class-gtkcellrendereraccel">gtk.CellRendererAccel</link>
</synopsis>

  </refsect1>

  <refsect1 id="properties-gtkcellrendereraccel">
    <title>gtk.CellRendererAccel Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkcellrenderer">gtk.CellRenderer Properties</link></para>
    <para><link linkend="properties-gtkcellrenderertext">gtk.CellRendererText Properties</link></para>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"accel-key"</entry>
	      <entry>Read-Write</entry>
	      <entry>The keyval of the accelerator. Default value: 0. This
	      property is available in GTK+ 2.10 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"accel-mode"</entry>
	      <entry>Read-Write</entry>
	      <entry>Determines if the edited accelerators are GTK+
	      accelerators. If they are, consumed modifiers are suppressed,
	      only accelerators accepted by GTK+ are allowed, and the
	      accelerators are rendered in the same way as they are in
	      menus. one of the <xref
	      linkend="gtk-cellrendereraccel-mode-constants"
	      endterm="gtk-cellrendereraccel-mode-constants-title"></xref>. Default
	      value:
	      <literal>gtk.CELL_RENDERER_ACCEL_MODE_GTK</literal>. This
	      property is available in GTK+ 2.10 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"accel-mods"</entry>
	      <entry>Read-Write</entry>
	      <entry>The modifier mask of the accelerator. One of the <xref
	      linkend="gdk-modifier-constants"
	      endterm="gdk-modifier-constants-title"></xref>. This property
	      is available in GTK+ 2.10 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"keycode"</entry>
	      <entry>Read-Write</entry>
	      <entry>The hardware keycode of the accelerator. Note that the
	      hardware keycode is only relevant if the key does not have a
	      keyval. Normally, the keyboard configuration should assign
	      keyvals to all keys.  Default value: 0. This property is
	      available in GTK+ 2.10 and above.</entry>
	    </row>

	  </tbody>
	</tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkcellrendereraccel">
    <title>gtk.CellRendererAccel Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcellrenderer">gtk.CellRenderer Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcellrenderertext">gtk.CellRendererText Signal Prototypes</link></para>

    <variablelist>
      <varlistentry>
        <term>"<link linkend="signal-gtkcellrendereraccel--accel-cleared">accel-cleared</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>cellrendereraccel</parameter></methodparam>
            <methodparam><parameter>path_string</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

    <variablelist>
      <varlistentry>
        <term>"<link linkend="signal-gtkcellrendereraccel--accel-edited">accel-edited</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>cellrendereraccel</parameter></methodparam>
            <methodparam><parameter>path_string</parameter></methodparam>
            <methodparam><parameter>accel_key</parameter></methodparam>
            <methodparam><parameter>accel_mods</parameter></methodparam>
            <methodparam><parameter>hardware_keycode</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para><link
    linkend="class-gtkcellrendereraccel"><classname>gtk.CellRendererAccel</classname></link>
    displays a keyboard accelerator (i.e. a key combination like
    <keycombo><keycap>Control</keycap><keycap>a</keycap></keycombo>). If the
    cell renderer is editable, the accelerator can be changed by simply
    typing the new combination.</para>

  </refsect1>

  <refsect1>
    <title>Constructor</title>

    <refsect2 id="constructor-gtkcellrendereraccel">
      <title>gtk.CellRendererAccel</title>

      <programlisting><constructorsynopsis language="python">
        <methodname>gtk.CellRendererAccel</methodname>
        <methodparam></methodparam>
      </constructorsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the new cell renderer</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This constructor is available in PyGTK 2.10 and above.</para>
      </note>

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

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtkcellrendereraccel--accel-cleared">
      <title>The "accel-cleared" Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>cellrendereraccel</parameter></methodparam>
	  <methodparam><parameter>path_string</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>cellrendereraccel</parameter>&nbsp;:</term>
	  <listitem><simpara>the cellrendereraccel that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>path_string</parameter>&nbsp;:</term>
	  <listitem><simpara>the path identifying the row of the cleared
	  cell as a string</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This signal is available in GTK+ 2.10 and above.</para>
      </note>

      <para>The "accel-cleared" signal is emitted when the user has removed
      the accelerator.</para>

    </refsect2>

    <refsect2 id="signal-gtkcellrendereraccel--accel-edited">
      <title>The "accel-edited" Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>cellrendereraccel</parameter></methodparam>
	  <methodparam><parameter>path_string</parameter></methodparam>
	  <methodparam><parameter>accel_key</parameter></methodparam>
	  <methodparam><parameter>accel_mods</parameter></methodparam>
	  <methodparam><parameter>hardware_keycode</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>cellrendereraccel</parameter>&nbsp;:</term>
	  <listitem><simpara>the cellrendereraccel that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>path_string</parameter>&nbsp;:</term>
	  <listitem><simpara>the path identifying the row of the edited cell
	  as a string</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>accel_key</parameter>&nbsp;:</term>
	  <listitem><simpara>the new accelerator keyval </simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>accel_mods</parameter>&nbsp;:</term>
	  <listitem><simpara>the new acclerator modifier
	  mask</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>hardware_keycode</parameter>&nbsp;:</term>
	  <listitem><simpara>the keycode of the new
	  accelerator</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <note>
        <para>This signal is available in GTK+ 2.10 and above.</para>
      </note>

      <para>The "accel-edited" signal is emitted when the user has selected
      a new accelerator.</para>

    </refsect2>

  </refsect1>

</refentry>
