File: class-gtktreedragdest.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (24 lines) | stat: -rw-r--r-- 7,117 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.TreeDragDest</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-gtktooltips.html" title="gtk.Tooltips"><link rel="next" href="class-gtktreedragsource.html" title="gtk.TreeDragSource"></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.TreeDragDest</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktooltips.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtktreedragsource.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktreedragdest"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.TreeDragDest</h2><p>gtk.TreeDragDest &#8212; an interface that manages the data transfer for a
destination of a <a href="class-gtktreeview.html" title="gtk.TreeView"><tt class="classname">gtk.TreeView</tt></a> drag
and drop operation</p></div><div class="refsect1" lang="en"><a name="id3577751"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.TreeDragDest</span></span>(<span class="ooclass"><span class="classname">gobject.GInterface</span></span>):
<code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktreedragdest.html#method-gtktreedragdest--drag-data-received" title="gtk.TreeDragDest.drag_data_received">drag_data_received</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>dest</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>selection_data</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktreedragdest.html#method-gtktreedragdest--row-drop-possible" title="gtk.TreeDragDest.row_drop_possible">row_drop_possible</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>dest_path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>selection_data</tt></b></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3577831"></a><h2>Description</h2><p>The <a href="class-gtktreedragdest.html" title="gtk.TreeDragDest"><tt class="classname">gtk.TreeDragDest</tt></a> 
is an interface for checking and receiving the data for the destination of a
<a href="class-gtktreeview.html" title="gtk.TreeView"><tt class="classname">gtk.TreeView</tt></a>
drag and drop operation.</p></div><div class="refsect1" lang="en"><a name="id3577858"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktreedragdest--drag-data-received"></a><h3>gtk.TreeDragDest.drag_data_received</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">drag_data_received</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>dest</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>selection_data</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>dest</tt></b>:</span></td><td>the row to drop the data in front
of</td></tr><tr><td><span class="term"><b class="parameter"><tt>selection_data</tt></b>:</span></td><td>the data to drop</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if a new row was
created before position <i class="parameter"><tt>dest</tt></i></td></tr></tbody></table><p>The <tt class="methodname">drag_data_received</tt>() method asks
the <a href="class-gtktreedragdest.html" title="gtk.TreeDragDest"><tt class="classname">gtk.TreeDragDest</tt></a> 
to insert a row before the path <i class="parameter"><tt>dest</tt></i>, deriving the
contents of the row from <i class="parameter"><tt>selection_data</tt></i>. If
<i class="parameter"><tt>dest</tt></i> is outside the tree so that inserting before it
is impossible, <tt class="literal">FALSE</tt> will be returned. Also,
<tt class="literal">FALSE</tt> may be returned if the new row is not created for
some model-specific reason.</p></div><div class="refsect2" lang="en"><a name="method-gtktreedragdest--row-drop-possible"></a><h3>gtk.TreeDragDest.row_drop_possible</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">row_drop_possible</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>dest_path</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>selection_data</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>dest_path</tt></b>:</span></td><td>a destination row</td></tr><tr><td><span class="term"><b class="parameter"><tt>selection_data</tt></b>:</span></td><td>the data being dragged</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>TRUE if a drop is possible before
<i class="parameter"><tt>dest_path</tt></i></td></tr></tbody></table><p>The <tt class="methodname">row_drop_possible</tt>() method
determines if a drop is possible before the tree path specified by
<i class="parameter"><tt>dest_path</tt></i> and at the same depth as
<i class="parameter"><tt>dest_path</tt></i>. That is, can we drop the data specified by
<i class="parameter"><tt>selection_data</tt></i> at that location.
<i class="parameter"><tt>dest_path</tt></i> does not have to exist but the return value
will almost certainly be <tt class="literal">FALSE</tt> if the parent of
<i class="parameter"><tt>dest_path</tt></i> doesn't exist, though.</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-gtktooltips.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-gtktreedragsource.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Tooltips</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.TreeDragSource</td></tr></table></div></body></html>