Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > e40b0b2b839eccdb3c85993a7b738115 > files > 18

gtkmm-documentation-3.24.0-1.mga7.noarch.rpm

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Chapter 18. Drag and Drop</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Programming with gtkmm 3">
<link rel="up" href="index.html" title="Programming with gtkmm 3">
<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 18. 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">
<div class="titlepage"><div><div><h1 class="title">
<a name="chapter-draganddrop"></a>Chapter 18. Drag and Drop</h1></div></div></div>
<div class="toc">
<p><b>Table of Contents</b></p>
<ul class="toc">
<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">
<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" style="list-style-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: Used only for drag and drop, this specifies whether the data may be dragged to other widgets and applications, or only to the same ones.</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>