Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 345aa895e80053137c21f8693106c3a0 > files > 19

gtkmm2.4-documentation-2.17.4-1mdv2010.0.noarch.rpm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Chapter 16. Drag and Drop</title>
<link rel="stylesheet" href="style.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="index.html" title="Programming with gtkmm">
<link rel="up" href="index.html" title="Programming with gtkmm">
<link rel="prev" href="sec-drawing-clock-example.html" title="Example Application: Creating a Clock with Cairo">
<link rel="next" href="sec-dnd-methods.html" title="Methods">
</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">Chapter 16. Drag and Drop</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="sec-drawing-clock-example.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<th width="60%" align="center"> </th>
<td width="20%" align="right"> <a accesskey="n" href="sec-dnd-methods.html"><img src="icons/next.png" alt="Next"></a>
</td>
</tr>
</table>
<hr>
</div>
<div class="chapter" title="Chapter 16. Drag and Drop">
<div class="titlepage"><div><div><h2 class="title">
<a name="chapter-draganddrop"></a>Chapter 16. Drag and Drop</h2></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<ul>
<li><span class="sect1"><a href="chapter-draganddrop.html#sec-dnd-sources-destinations">Sources and Destinations</a></span></li>
<li><span class="sect1"><a href="sec-dnd-methods.html">Methods</a></span></li>
<li><span class="sect1"><a href="sec-dnd-signals.html">Signals</a></span></li>
<li><span class="sect1"><a href="sec-dragcontext.html">DragContext</a></span></li>
<li><span class="sect1"><a href="sec-dnd-example.html">Example</a></span></li>
</ul>
</div>
<p>
<code class="classname">Gtk::Widget</code> has several methods and signals which are
prefixed with "drag_". These are used for Drag and Drop.
</p>
<div class="sect1" title="Sources and Destinations">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="sec-dnd-sources-destinations"></a>Sources and Destinations</h2></div></div></div>
<p>
Things are dragged from <code class="literal">sources</code> to be dropped on
<code class="literal">destinations</code>. Each source and destination has infomation
about the data formats that it can send or receive, provided by
<code class="classname">Gtk::TargetEntry</code> items. A drop destination will only
accept a dragged item if they both share a compatible
<code class="classname">Gtk::TargetEntry</code> item.  Appropriate signals will then be
emitted, telling the signal handlers which
<code class="classname">Gtk::TargetEntry</code> was used.
</p>
<p>
<code class="classname">Gtk::TargetEntry</code> objects contain this information:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>target: A name, such as "STRING"</p></li>
<li class="listitem"><p>info: An identifier which will be sent to your signals to tell you which TargetEntry was used.</p></li>
<li class="listitem"><p>flags: TODO</p></li>
</ul></div>
<p>
</p>
</div>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="sec-drawing-clock-example.html"><img src="icons/prev.png" alt="Prev"></a> </td>
<td width="20%" align="center"> </td>
<td width="40%" align="right"> <a accesskey="n" href="sec-dnd-methods.html"><img src="icons/next.png" alt="Next"></a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Example Application: Creating a Clock with Cairo </td>
<td width="20%" align="center"><a accesskey="h" href="index.html"><img src="icons/home.png" alt="Home"></a></td>
<td width="40%" align="right" valign="top"> Methods</td>
</tr>
</table>
</div>
</body>
</html>