<?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-gtktoolpalette">
  <refnamediv>
    <refname>gtk.ToolPalette</refname>
    <refpurpose>a tool palette with categories (new in PyGTK 2.22)</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.ToolPalette</classname></ooclass>
      <ooclass><classname><link linkend="class-gtkcontainer">gtk.Container</link></classname></ooclass>
      <constructorsynopsis language="python">
        <methodname><link linkend="constructor-gtktoolpalette">gtk.ToolPalette</link></methodname>
        <methodparam></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--set-group-position">set_group_position</link></methodname>
        <methodparam><parameter role="keyword">group</parameter></methodparam>
        <methodparam><parameter role="keyword">position</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--set-exclusive">set_exclusive</link></methodname>
        <methodparam><parameter role="keyword">group</parameter></methodparam>
        <methodparam><parameter role="keyword">exclusive</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--set-expand">set_expand</link></methodname>
        <methodparam><parameter role="keyword">group</parameter></methodparam>
        <methodparam><parameter role="keyword">expand</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-group-position">get_group_position</link></methodname>
        <methodparam><parameter role="keyword">group</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-exclusive">get_exclusive</link></methodname>
        <methodparam><parameter role="keyword">group</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-expand">get_expand</link></methodname>
        <methodparam><parameter role="keyword">group</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--set-icon-size">set_icon_size</link></methodname>
        <methodparam><parameter role="keyword">icon_size</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--unset-icon-size">unset_icon_size</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--set-style">set_style</link></methodname>
        <methodparam><parameter role="keyword">style</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--unset-style">unset_style</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-icon-size">get_icon_size</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-style">get_style</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-drop-item">get_drop_item</link></methodname>
        <methodparam><parameter role="keyword">x</parameter></methodparam>
        <methodparam><parameter role="keyword">y</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-drop-group">get_drop_group</link></methodname>
        <methodparam><parameter role="keyword">x</parameter></methodparam>
        <methodparam><parameter role="keyword">y</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-drag-item">get_drag_item</link></methodname>
        <methodparam><parameter role="keyword">selection</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--set-drag-source">set_drag_source</link></methodname>
        <methodparam><parameter role="keyword">targets</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--add-drag-dest">add_drag_dest</link></methodname>
        <methodparam><parameter role="keyword">widget</parameter></methodparam>
        <methodparam><parameter role="keyword">flags</parameter></methodparam>
        <methodparam><parameter role="keyword">targets</parameter></methodparam>
        <methodparam><parameter role="keyword">actions</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-hadjustment">get_hadjustment</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktoolpalette--get-vadjustment">get_vadjustment</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">GObject</link>
  +-- <link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkwidget">gtk.Widget</link>
      +-- <link linkend="class-gtkcontainer">gtk.Container</link>
        +-- <link linkend="class-gtktoolpalette">gtk.ToolPalette</link>
</synopsis>

  </refsect1>

  <refsect1>
    <title>Implemented Interfaces</title>
    <para>
      <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link>
      implements
      <link linkend="class-atkimplementor"><classname>atk.ImplementorIFace</classname></link>,
      <link linkend="class-gtkbuildable"><classname>gtk.Buildable</classname></link>,
    </para>
  </refsect1>

  <refsect1 id="properties-gtktoolpalette">
    <title>gtk.ToolPalette Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
    <para><link linkend="properties-gtkcontainer">gtk.Container 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>"icon-size"</entry>
              <entry>Read-Write</entry>
              <entry>Whether the group has been collapsed and items are hidden.
              Default value: <literal>False</literal>.
              This property is available in GTK+ 2.20 and above.</entry>
            </row>
            <row valign="top">
              <entry>"icon-size-set"</entry>
              <entry>Read-Write</entry>
              <entry>Ellipsize for item group headers.
              Default value: <literal>pango.ELLIPSIZE_NONE</literal>.
              This property is available in GTK+ 2.20 and above.</entry>
            </row>
            <row valign="top">
              <entry>"toolbar-style"</entry>
              <entry>Read-Write</entry>
              <entry>Relief of the group header button.
              Default value: <literal>gtk.RELIEF_NORMAL</literal>.
              This property is available in GTK+ 2.20 and above.</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="child-properties-gtktoolpalette">
    <title>gtk.ToolPalette Child Properties</title>

    <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>"exclusive"</entry>
              <entry>Read-Write</entry>
              <entry>Whether the item should receive extra space when the group grows.
              Default value: <literal>False</literal>.
              This property is available in GTK+ 2.20 and above.</entry>
            </row>
            <row valign="top">
              <entry>"expand"</entry>
              <entry>Read-Write</entry>
              <entry>Whether the item should fill the available space.
              Default value: <literal>True</literal>.
              This property is available in GTK+ 2.20 and above.</entry>
            </row>
          </tbody>
        </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="style-properties-gtktoolpalette">
    <title>gtk.ToolPalette Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>

  </refsect1>

  <refsect1 id="signal-prototypes-gtktoolpalette">
    <title>gtk.ToolPalette 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-gtkwidget">gtk.Widget Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcontainer">gtk.Container Signal Prototypes</link></para>

    <variablelist>
      <varlistentry>
        <term>"<link linkend="signal-gtktoolpalette--set-scroll-adjustments">set-scroll-adjustments</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>toolpalette</parameter></methodparam>
            <methodparam><parameter>hadjustment</parameter></methodparam>
            <methodparam><parameter>vadjustment</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <note>
      <para>This widget is available in PyGTK 2.22 and above.</para>
    </note>

    <para>A <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link>
    is used together with <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link>
    to add <link linkend="class-gtktoolitem"><classname>gtk.ToolItem</classname></link> objects to
    a palette like container with different categories and drag and drop support.</para>

  </refsect1>

  <refsect1>
    <title>Constructor</title>

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

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

    <para>Creates a new tool palette.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtktoolpalette--set-group-position">
      <title>gtk.ToolPalette.set_group_position</title>

      <programlisting><methodsynopsis language="python">
          <methodname>set_group_position</methodname>
          <methodparam><parameter role="keyword">group</parameter></methodparam>
          <methodparam><parameter role="keyword">position</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">group</parameter>&nbsp;:</term>
          <listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">position</parameter>&nbsp;:</term>
          <listitem><simpara>a new index for group</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>set_group_position</methodname>() method sets the position of the group as an index of the tool palette.
      If position is 0 the group will become the first child, if position is
      -1 it will become the last child.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--set-exclusive">
      <title>gtk.ToolPalette.set_exclusive</title>

      <programlisting><methodsynopsis language="python">
          <methodname>set_exclusive</methodname>
          <methodparam><parameter role="keyword">group</parameter></methodparam>
          <methodparam><parameter role="keyword">exclusive</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">group</parameter>&nbsp;:</term>
          <listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">exclusive</parameter>&nbsp;:</term>
          <listitem><simpara>whether the group should be exclusive or not</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Sets whether the group should be exclusive or not.
      If an exclusive group is expanded all other groups are collapsed.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--set-expand">
      <title>gtk.ToolPalette.set_expand</title>

      <programlisting><methodsynopsis language="python">
          <methodname>set_expand</methodname>
          <methodparam><parameter role="keyword">group</parameter></methodparam>
          <methodparam><parameter role="keyword">expand</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">group</parameter>&nbsp;:</term>
          <listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">expand</parameter>&nbsp;:</term>
          <listitem><simpara>whether the group should be given extra space</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Sets whether the group should be given extra space.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-group-position">
      <title>gtk.ToolPalette.get_group_position</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_group_position</methodname>
          <methodparam><parameter role="keyword">group</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">group</parameter>&nbsp;:</term>
          <listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the index of group or -1 if <parameter>group</parameter> is not a child of <parameter>palette</parameter></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Gets the position of <parameter>group</parameter> in <parameter>palette</parameter> as index.
      See <link linkend="method-gtktoolpalette--set-group-position"><methodname>gtk.ToolPalette.set_group_position</methodname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-exclusive">
      <title>gtk.ToolPalette.get_exclusive</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_exclusive</methodname>
          <methodparam><parameter role="keyword">group</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">group</parameter>&nbsp;:</term>
          <listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if <parameter>group</parameter> is exclusive</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Gets whether <parameter>group</parameter> is exclusive or not.
      See <link linkend="method-gtktoolpalette--set-exclusive"><methodname>gtk.ToolPalette.set_exclusive</methodname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-expand">
      <title>gtk.ToolPalette.get_expand</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_expand</methodname>
          <methodparam><parameter role="keyword">group</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">group</parameter>&nbsp;:</term>
          <listitem><simpara>a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> which is a child of palette</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if group should be given extra space, <literal>False</literal> otherwise</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Gets whether group should be given extra space.
      See <link linkend="method-gtktoolpalette--set-expand"><methodname>gtk.ToolPalette.set_expand</methodname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--set-icon-size">
      <title>gtk.ToolPalette.set_icon_size</title>

      <programlisting><methodsynopsis language="python">
          <methodname>set_icon_size</methodname>
          <methodparam><parameter role="keyword">icon_size</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">icon_size</parameter>&nbsp;:</term>
          <listitem><simpara>one of the <xref linkend="gtk-icon-size-constants" endterm="gtk-icon-size-constants-title"></xref> that icons in the tool palette shall have</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>set_icon_size</methodname>() method sets the size of icons in the tool palette.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--unset-icon-size">
      <title>gtk.ToolPalette.unset_icon_size</title>

      <programlisting><methodsynopsis language="python">
          <methodname>unset_icon_size</methodname>
          <methodparam></methodparam>
        </methodsynopsis></programlisting>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Unsets the tool palette icon size set with <link linkend="method-gtktoolpalette--set-icon-size"><methodname>gtk.ToolPalette.set_icon_size</methodname></link>,
      so that user preferences will be used to determine the icon size.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--set-style">
      <title>gtk.ToolPalette.set_style</title>

      <programlisting><methodsynopsis language="python">
          <methodname>set_style</methodname>
          <methodparam><parameter role="keyword">style</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">style</parameter>&nbsp;:</term>
          <listitem><simpara>one of the <xref linkend="gtk-toolbar-style-constants" endterm="gtk-toolbar-style-constants-title"></xref> that items in the tool palette shall have</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>set_style</methodname>() method sets the style (text, icons or both) of items in the tool palette.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--unset-style">
      <title>gtk.ToolPalette.unset_style</title>

      <programlisting><methodsynopsis language="python">
          <methodname>unset_style</methodname>
          <methodparam></methodparam>
        </methodsynopsis></programlisting>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Unsets a toolbar style set with <link linkend="method-gtktoolpalette--set-style"><methodname>gtk.ToolPalette.set_style</methodname></link>,
      so that user preferences will be used to determine the toolbar style.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-icon-size">
      <title>gtk.ToolPalette.get_icon_size</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_icon_size</methodname>
          <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>one of the <xref linkend="gtk-icon-size-constants" endterm="gtk-icon-size-constants-title"></xref></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Gets the size of icons in the tool palette.
      See <link linkend="method-gtktoolpalette--set-icon-size"><methodname>gtk.ToolPalette.set_icon_size</methodname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-style">
      <title>gtk.ToolPalette.get_style</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_style</methodname>
          <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>one of the <xref linkend="gtk-toolbar-style-constants" endterm="gtk-toolbar-style-constants-title"></xref></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Gets the style (icons, text or both) of items in the tool palette.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-drop-item">
      <title>gtk.ToolPalette.get_drop_item</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_drop_item</methodname>
          <methodparam><parameter role="keyword">x</parameter></methodparam>
          <methodparam><parameter role="keyword">y</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">x</parameter>&nbsp;:</term>
          <listitem><simpara>the x position</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">y</parameter>&nbsp;:</term>
          <listitem><simpara>the y position</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the <link linkend="class-gtktoolitem"><classname>gtk.ToolItem</classname></link> at position or <literal>None</literal> if there is no such item</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Gets the item at position (x, y).
      See <link linkend="method-gtktoolpalette--get-drop-group"><methodname>gtk.ToolPalette.get_drop_group</methodname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-drop-group">
      <title>gtk.ToolPalette.get_drop_group</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_drop_group</methodname>
          <methodparam><parameter role="keyword">x</parameter></methodparam>
          <methodparam><parameter role="keyword">y</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">x</parameter>&nbsp;:</term>
          <listitem><simpara>the x position</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">y</parameter>&nbsp;:</term>
          <listitem><simpara>the y position</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link> at position or <literal>None</literal> if there is no such group</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Gets the group at position (x, y).</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-drag-item">
      <title>gtk.ToolPalette.get_drag_item</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_drag_item</methodname>
          <methodparam><parameter role="keyword">selection</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">selection</parameter>&nbsp;:</term>
          <listitem><simpara>a <link linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the dragged item in selection</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Get the dragged item from the selection.
      This could be a <link linkend="class-gtktoolitem"><classname>gtk.ToolItem</classname></link> or a <link linkend="class-gtktoolpalette"><classname>gtk.ToolPalette</classname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--set-drag-source">
      <title>gtk.ToolPalette.set_drag_source</title>

      <programlisting><methodsynopsis language="python">
          <methodname>set_drag_source</methodname>
          <methodparam><parameter role="keyword">targets</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">targets</parameter>&nbsp;:</term>
          <listitem><simpara>the <literal>GtkToolPaletteDragTarget</literal><!-- -->s which the widget should support</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>The <methodname>set_drag_source</methodname>() method sets the tool palette as a drag source.
      Enables all groups and items in the tool palette as drag sources
      on button 1 and button 3 press with copy and move actions.
      See <link linkend="method-gtkwidget--drag-source-set"><methodname>gtk.Widget.drag_source_set</methodname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--add-drag-dest">
      <title>gtk.ToolPalette.add_drag_dest</title>

      <programlisting><methodsynopsis language="python">
          <methodname>add_drag_dest</methodname>
          <methodparam><parameter role="keyword">widget</parameter></methodparam>
          <methodparam><parameter role="keyword">flags</parameter></methodparam>
          <methodparam><parameter role="keyword">targets</parameter></methodparam>
          <methodparam><parameter role="keyword">actions</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">widget</parameter>&nbsp;:</term>
          <listitem><simpara>a <link linkend="class-gtkwidget"><classname>gtk.Widget</classname></link> which should be a drag destination for <parameter>palette</parameter></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">flags</parameter>&nbsp;:</term>
          <listitem><simpara>the flags that specify what actions GTK+ should take for drops on that widget</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">targets</parameter>&nbsp;:</term>
          <listitem><simpara>the <literal>GtkToolPaletteDragTarget</literal><!-- -->s which the widget should support</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">actions</parameter>&nbsp;:</term>
          <listitem><simpara>the <literal>GdkDragAction</literal><!-- -->s which the widget should suppport</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Sets <parameter>palette</parameter> as drag source (see <link linkend="method-gtktoolpalette--set-drag-source"><methodname>gtk.ToolPalette.set_drag_source</methodname></link>)
      and sets <parameter>widget</parameter> as a drag destination for drags from <parameter>palette</parameter>.
      See <link linkend="method-gtkwidget--drag-dest-set"><methodname>gtk.Widget.drag_dest_set</methodname></link>.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-hadjustment">
      <title>gtk.ToolPalette.get_hadjustment</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_hadjustment</methodname>
          <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the horizontal adjustment of <parameter>palette</parameter></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Gets the horizontal adjustment of the tool palette.</para>

    </refsect2>

    <refsect2 id="method-gtktoolpalette--get-vadjustment">
      <title>gtk.ToolPalette.get_vadjustment</title>

      <programlisting><methodsynopsis language="python">
          <methodname>get_vadjustment</methodname>
          <methodparam></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the vertical adjustment of <parameter>palette</parameter></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This method is available in PyGTK 2.22 and above.</para>
      </note>

      <para>Gets the vertical adjustment of the tool palette.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtktoolpalette--set-scroll-adjustments">
      <title>The "set-scroll-adjustments" gtk.ToolPalette Signal</title>

      <programlisting><methodsynopsis language="python">
        <methodname>callback</methodname>
        <methodparam><parameter>toolpalette</parameter></methodparam>
        <methodparam><parameter>hadjustment </parameter></methodparam>
        <methodparam><parameter>vadjustment </parameter></methodparam>
        <methodparam><parameter>user_param1</parameter></methodparam>
        <methodparam><parameter>...</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter>toolpalette</parameter>&nbsp;:</term>
          <listitem><simpara>the toolpalette that received the signal</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>hadjustment</parameter>&nbsp;:</term>
          <listitem><simpara>the horizontal adjustment</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>vadjustment</parameter>&nbsp;:</term>
          <listitem><simpara>the vertical adjustment</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.20 and above.</para>
      </note>

      <para>The "set-scroll-adjustments" signal is emitted when one or both
      adjustments (specified by <parameter>hadjustment</parameter> and
      <parameter>vadjustment</parameter>) are set on textview.</para>

    </refsect2>
  </refsect1>
</refentry>
