<?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-gtktreedragdest">
  <refnamediv>
    <refname>gtk.TreeDragDest</refname>
    <refpurpose>an interface that manages the data transfer for a
destination of a <link
linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link> drag
and drop operation</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.TreeDragDest</classname></ooclass>
      <ooclass><classname>gobject.GInterface</classname></ooclass>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktreedragdest--drag-data-received">drag_data_received</link></methodname>
	<methodparam><parameter
		       role="keyword">dest</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">selection_data</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktreedragdest--row-drop-possible">row_drop_possible</link></methodname>
	<methodparam><parameter
		       role="keyword">dest_path</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">selection_data</parameter></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>The <link
linkend="class-gtktreedragdest"><classname>gtk.TreeDragDest</classname></link> 
is an interface for checking and receiving the data for the destination of a
<link linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link>
drag and drop operation.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

  <refsect2 id="method-gtktreedragdest--drag-data-received">
      <title>gtk.TreeDragDest.drag_data_received</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>drag_data_received</methodname>
	  <methodparam><parameter
			 role="keyword">dest</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">selection_data</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">dest</parameter>&nbsp;:</term>
	  <listitem><simpara>the row to drop the data in front
of</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">selection_data</parameter>&nbsp;:</term>
	  <listitem><simpara>the data to drop</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if a new row was
created before position <parameter>dest</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>drag_data_received</methodname>() method asks
the <link
linkend="class-gtktreedragdest"><classname>gtk.TreeDragDest</classname></link> 
to insert a row before the path <parameter>dest</parameter>, deriving the
contents of the row from <parameter>selection_data</parameter>. If
<parameter>dest</parameter> is outside the tree so that inserting before it
is impossible, <literal>False</literal> will be returned. Also,
<literal>False</literal> may be returned if the new row is not created for
some model-specific reason.</para>

    </refsect2>

  <refsect2 id="method-gtktreedragdest--row-drop-possible">
      <title>gtk.TreeDragDest.row_drop_possible</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>row_drop_possible</methodname>
	  <methodparam><parameter
			 role="keyword">dest_path</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">selection_data</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">dest_path</parameter>&nbsp;:</term>
	  <listitem><simpara>a destination row</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">selection_data</parameter>&nbsp;:</term>
	  <listitem><simpara>the data being dragged</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>True if a drop is possible before
<parameter>dest_path</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>row_drop_possible</methodname>() method
determines if a drop is possible before the tree path specified by
<parameter>dest_path</parameter> and at the same depth as
<parameter>dest_path</parameter>. That is, can we drop the data specified by
<parameter>selection_data</parameter> at that location.
<parameter>dest_path</parameter> does not have to exist but the return value
will almost certainly be <literal>False</literal> if the parent of
<parameter>dest_path</parameter> doesn't exist, though.</para>

  </refsect2>

  </refsect1>

</refentry>
