/usr/share/doc/libjuce/apiref/classDragAndDropContainer.html is in libjuce-doc 4.3.0~repack-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JUCE: DragAndDropContainer Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">JUCE
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#pro-methods">Protected Member Functions</a> |
<a href="classDragAndDropContainer-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">DragAndDropContainer Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>Enables drag-and-drop behaviour for a component and all its sub-components.
<a href="classDragAndDropContainer.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
<img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for DragAndDropContainer:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center">
<img src="classDragAndDropContainer.png" usemap="#DragAndDropContainer_map" alt=""/>
<map id="DragAndDropContainer_map" name="DragAndDropContainer_map">
<area href="classToolbar.html" title="A toolbar component. " alt="Toolbar" shape="rect" coords="0,56,146,80"/>
<area href="classToolbarItemPalette.html" title="A component containing a list of toolbar items, which the user can drag onto a toolbar to add them..." alt="ToolbarItemPalette" shape="rect" coords="156,56,302,80"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:af5236c188d64a8ac0103754ee676f339"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#af5236c188d64a8ac0103754ee676f339">DragAndDropContainer</a> ()</td></tr>
<tr class="memdesc:af5236c188d64a8ac0103754ee676f339"><td class="mdescLeft"> </td><td class="mdescRight">Creates a <a class="el" href="classDragAndDropContainer.html" title="Enables drag-and-drop behaviour for a component and all its sub-components. ">DragAndDropContainer</a>. <a href="#af5236c188d64a8ac0103754ee676f339">More...</a><br /></td></tr>
<tr class="separator:af5236c188d64a8ac0103754ee676f339"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ade6447a100fab338176980f99fa04e8b"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#ade6447a100fab338176980f99fa04e8b">~DragAndDropContainer</a> ()</td></tr>
<tr class="memdesc:ade6447a100fab338176980f99fa04e8b"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#ade6447a100fab338176980f99fa04e8b">More...</a><br /></td></tr>
<tr class="separator:ade6447a100fab338176980f99fa04e8b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1f05c2d712f9cf0dd2a789817549bf60"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#a1f05c2d712f9cf0dd2a789817549bf60">startDragging</a> (const <a class="el" href="classvar.html">var</a> &sourceDescription, <a class="el" href="classComponent.html">Component</a> *sourceComponent, <a class="el" href="classImage.html">Image</a> dragImage=<a class="el" href="classImage.html">Image</a>(), bool allowDraggingToOtherJuceWindows=false, const <a class="el" href="classPoint.html">Point</a>< int > *imageOffsetFromMouse=nullptr)</td></tr>
<tr class="memdesc:a1f05c2d712f9cf0dd2a789817549bf60"><td class="mdescLeft"> </td><td class="mdescRight">Begins a drag-and-drop operation. <a href="#a1f05c2d712f9cf0dd2a789817549bf60">More...</a><br /></td></tr>
<tr class="separator:a1f05c2d712f9cf0dd2a789817549bf60"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a343f10e04006c47f2554c38847a73475"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#a343f10e04006c47f2554c38847a73475">isDragAndDropActive</a> () const</td></tr>
<tr class="memdesc:a343f10e04006c47f2554c38847a73475"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if something is currently being dragged. <a href="#a343f10e04006c47f2554c38847a73475">More...</a><br /></td></tr>
<tr class="separator:a343f10e04006c47f2554c38847a73475"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad90bfda38127cc74086fa7d05743deed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classvar.html">var</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#ad90bfda38127cc74086fa7d05743deed">getCurrentDragDescription</a> () const</td></tr>
<tr class="memdesc:ad90bfda38127cc74086fa7d05743deed"><td class="mdescLeft"> </td><td class="mdescRight">Returns the description of the thing that's currently being dragged. <a href="#ad90bfda38127cc74086fa7d05743deed">More...</a><br /></td></tr>
<tr class="separator:ad90bfda38127cc74086fa7d05743deed"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0041c708ec4c348b719692d4c5963858"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#a0041c708ec4c348b719692d4c5963858">setCurrentDragImage</a> (const <a class="el" href="classImage.html">Image</a> &newImage)</td></tr>
<tr class="memdesc:a0041c708ec4c348b719692d4c5963858"><td class="mdescLeft"> </td><td class="mdescRight">If a drag is in progress, this allows the image being shown to be dynamically updated. <a href="#a0041c708ec4c348b719692d4c5963858">More...</a><br /></td></tr>
<tr class="separator:a0041c708ec4c348b719692d4c5963858"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ab2862f4fe5815a2089c886ab96193949"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classDragAndDropContainer.html">DragAndDropContainer</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#ab2862f4fe5815a2089c886ab96193949">findParentDragContainerFor</a> (<a class="el" href="classComponent.html">Component</a> *childComponent)</td></tr>
<tr class="memdesc:ab2862f4fe5815a2089c886ab96193949"><td class="mdescLeft"> </td><td class="mdescRight">Utility to find the <a class="el" href="classDragAndDropContainer.html" title="Enables drag-and-drop behaviour for a component and all its sub-components. ">DragAndDropContainer</a> for a given <a class="el" href="classComponent.html" title="The base class for all JUCE user-interface objects. ">Component</a>. <a href="#ab2862f4fe5815a2089c886ab96193949">More...</a><br /></td></tr>
<tr class="separator:ab2862f4fe5815a2089c886ab96193949"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae9e29e4a49717401e4631fc5864f0a04"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#ae9e29e4a49717401e4631fc5864f0a04">performExternalDragDropOfFiles</a> (const <a class="el" href="classStringArray.html">StringArray</a> &files, bool canMoveFiles)</td></tr>
<tr class="memdesc:ae9e29e4a49717401e4631fc5864f0a04"><td class="mdescLeft"> </td><td class="mdescRight">This performs a synchronous drag-and-drop of a set of files to some external application. <a href="#ae9e29e4a49717401e4631fc5864f0a04">More...</a><br /></td></tr>
<tr class="separator:ae9e29e4a49717401e4631fc5864f0a04"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a42446d76aa9b798d56936f6de6c270a5"><td class="memItemLeft" align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#a42446d76aa9b798d56936f6de6c270a5">performExternalDragDropOfText</a> (const <a class="el" href="classString.html">String</a> &text)</td></tr>
<tr class="memdesc:a42446d76aa9b798d56936f6de6c270a5"><td class="mdescLeft"> </td><td class="mdescRight">This performs a synchronous drag-and-drop of a block of text to some external application. <a href="#a42446d76aa9b798d56936f6de6c270a5">More...</a><br /></td></tr>
<tr class="separator:a42446d76aa9b798d56936f6de6c270a5"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a69b389d34bc9748eb5f82a8995aae28d"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#a69b389d34bc9748eb5f82a8995aae28d">shouldDropFilesWhenDraggedExternally</a> (const <a class="el" href="classDragAndDropTarget_1_1SourceDetails.html">DragAndDropTarget::SourceDetails</a> &sourceDetails, <a class="el" href="classStringArray.html">StringArray</a> &files, bool &canMoveFiles)</td></tr>
<tr class="memdesc:a69b389d34bc9748eb5f82a8995aae28d"><td class="mdescLeft"> </td><td class="mdescRight">Override this if you want to be able to perform an external drag a set of files when the user drags outside of this container component. <a href="#a69b389d34bc9748eb5f82a8995aae28d">More...</a><br /></td></tr>
<tr class="separator:a69b389d34bc9748eb5f82a8995aae28d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7cb7a19c901f8b48b321f4301bcd0150"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#a7cb7a19c901f8b48b321f4301bcd0150">dragOperationStarted</a> ()</td></tr>
<tr class="memdesc:a7cb7a19c901f8b48b321f4301bcd0150"><td class="mdescLeft"> </td><td class="mdescRight">Subclasses can override this to be told when a drag starts. <a href="#a7cb7a19c901f8b48b321f4301bcd0150">More...</a><br /></td></tr>
<tr class="separator:a7cb7a19c901f8b48b321f4301bcd0150"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5e0c91e9c1518a3d7bc49624f3ead768"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDragAndDropContainer.html#a5e0c91e9c1518a3d7bc49624f3ead768">dragOperationEnded</a> ()</td></tr>
<tr class="memdesc:a5e0c91e9c1518a3d7bc49624f3ead768"><td class="mdescLeft"> </td><td class="mdescRight">Subclasses can override this to be told when a drag finishes. <a href="#a5e0c91e9c1518a3d7bc49624f3ead768">More...</a><br /></td></tr>
<tr class="separator:a5e0c91e9c1518a3d7bc49624f3ead768"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Enables drag-and-drop behaviour for a component and all its sub-components. </p>
<p>For a component to be able to make or receive drag-and-drop events, one of its parent components must derive from this class. It's probably best for the top-level component to implement it.</p>
<p>Then to start a drag operation, any sub-component can just call the <a class="el" href="classDragAndDropContainer.html#a1f05c2d712f9cf0dd2a789817549bf60" title="Begins a drag-and-drop operation. ">startDragging()</a> method, and this object will take over, tracking the mouse and sending appropriate callbacks to any child components derived from <a class="el" href="classDragAndDropTarget.html" title="Components derived from this class can have things dropped onto them by a DragAndDropContainer. ">DragAndDropTarget</a> which the mouse moves over.</p>
<p>Note: If all that you need to do is to respond to files being drag-and-dropped from the operating system onto your component, you don't need any of these classes: you can do this simply by overriding <a class="el" href="classFileDragAndDropTarget.html#adc7848885ab2d9380f242c6445b019d4" title="Callback to indicate that the user has dropped the files onto this component. ">FileDragAndDropTarget::filesDropped()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classDragAndDropTarget.html" title="Components derived from this class can have things dropped onto them by a DragAndDropContainer. ">DragAndDropTarget</a> </dd></dl>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="af5236c188d64a8ac0103754ee676f339"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5236c188d64a8ac0103754ee676f339">§ </a></span>DragAndDropContainer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">DragAndDropContainer::DragAndDropContainer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a <a class="el" href="classDragAndDropContainer.html" title="Enables drag-and-drop behaviour for a component and all its sub-components. ">DragAndDropContainer</a>. </p>
<p>The object that derives from this class must also be a <a class="el" href="classComponent.html" title="The base class for all JUCE user-interface objects. ">Component</a>. </p>
</div>
</div>
<a id="ade6447a100fab338176980f99fa04e8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade6447a100fab338176980f99fa04e8b">§ </a></span>~DragAndDropContainer()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual DragAndDropContainer::~DragAndDropContainer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a1f05c2d712f9cf0dd2a789817549bf60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f05c2d712f9cf0dd2a789817549bf60">§ </a></span>startDragging()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DragAndDropContainer::startDragging </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classvar.html">var</a> & </td>
<td class="paramname"><em>sourceDescription</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classComponent.html">Component</a> * </td>
<td class="paramname"><em>sourceComponent</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classImage.html">Image</a> </td>
<td class="paramname"><em>dragImage</em> = <code><a class="el" href="classImage.html">Image</a>()</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>allowDraggingToOtherJuceWindows</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classPoint.html">Point</a>< int > * </td>
<td class="paramname"><em>imageOffsetFromMouse</em> = <code>nullptr</code> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Begins a drag-and-drop operation. </p>
<p>This starts a drag-and-drop operation - call it when the user drags the mouse in your drag-source component, and this object will track mouse movements until the user lets go of the mouse button, and will send appropriate messages to <a class="el" href="classDragAndDropTarget.html" title="Components derived from this class can have things dropped onto them by a DragAndDropContainer. ">DragAndDropTarget</a> objects that the mouse moves over.</p>
<p><a class="el" href="classDragAndDropContainer.html#ab2862f4fe5815a2089c886ab96193949" title="Utility to find the DragAndDropContainer for a given Component. ">findParentDragContainerFor()</a> is a handy method to call to find the drag container to use for a component.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sourceDescription</td><td>a string or value to use as the description of the thing being dragged - this will be passed to the objects that might be dropped-onto so they can decide whether they want to handle it </td></tr>
<tr><td class="paramname">sourceComponent</td><td>the component that is being dragged </td></tr>
<tr><td class="paramname">dragImage</td><td>the image to drag around underneath the mouse. If this is a null image, a snapshot of the sourceComponent will be used instead. </td></tr>
<tr><td class="paramname">allowDraggingToOtherJuceWindows</td><td>if true, the dragged component will appear as a desktop window, and can be dragged to DragAndDropTargets that are the children of components other than this one. </td></tr>
<tr><td class="paramname">imageOffsetFromMouse</td><td>if an image has been passed-in, this specifies the offset at which the image should be drawn from the mouse. If it isn't specified, then the image will be centred around the mouse. If an image hasn't been passed-in, this will be ignored. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a343f10e04006c47f2554c38847a73475"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a343f10e04006c47f2554c38847a73475">§ </a></span>isDragAndDropActive()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool DragAndDropContainer::isDragAndDropActive </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if something is currently being dragged. </p>
</div>
</div>
<a id="ad90bfda38127cc74086fa7d05743deed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad90bfda38127cc74086fa7d05743deed">§ </a></span>getCurrentDragDescription()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classvar.html">var</a> DragAndDropContainer::getCurrentDragDescription </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the description of the thing that's currently being dragged. </p>
<p>If nothing's being dragged, this will return a null var, otherwise it'll return the var that was passed into <a class="el" href="classDragAndDropContainer.html#a1f05c2d712f9cf0dd2a789817549bf60" title="Begins a drag-and-drop operation. ">startDragging()</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classDragAndDropContainer.html#a1f05c2d712f9cf0dd2a789817549bf60" title="Begins a drag-and-drop operation. ">startDragging</a> </dd></dl>
</div>
</div>
<a id="a0041c708ec4c348b719692d4c5963858"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0041c708ec4c348b719692d4c5963858">§ </a></span>setCurrentDragImage()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void DragAndDropContainer::setCurrentDragImage </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classImage.html">Image</a> & </td>
<td class="paramname"><em>newImage</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>If a drag is in progress, this allows the image being shown to be dynamically updated. </p>
</div>
</div>
<a id="ab2862f4fe5815a2089c886ab96193949"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2862f4fe5815a2089c886ab96193949">§ </a></span>findParentDragContainerFor()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classDragAndDropContainer.html">DragAndDropContainer</a>* DragAndDropContainer::findParentDragContainerFor </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classComponent.html">Component</a> * </td>
<td class="paramname"><em>childComponent</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Utility to find the <a class="el" href="classDragAndDropContainer.html" title="Enables drag-and-drop behaviour for a component and all its sub-components. ">DragAndDropContainer</a> for a given <a class="el" href="classComponent.html" title="The base class for all JUCE user-interface objects. ">Component</a>. </p>
<p>This will search up this component's parent hierarchy looking for the first parent component which is a <a class="el" href="classDragAndDropContainer.html" title="Enables drag-and-drop behaviour for a component and all its sub-components. ">DragAndDropContainer</a>.</p>
<p>It's useful when a component wants to call startDragging but doesn't know the <a class="el" href="classDragAndDropContainer.html" title="Enables drag-and-drop behaviour for a component and all its sub-components. ">DragAndDropContainer</a> it should to use.</p>
<p>Obviously this may return nullptr if it doesn't find a suitable component. </p>
</div>
</div>
<a id="ae9e29e4a49717401e4631fc5864f0a04"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae9e29e4a49717401e4631fc5864f0a04">§ </a></span>performExternalDragDropOfFiles()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool DragAndDropContainer::performExternalDragDropOfFiles </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classStringArray.html">StringArray</a> & </td>
<td class="paramname"><em>files</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool </td>
<td class="paramname"><em>canMoveFiles</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This performs a synchronous drag-and-drop of a set of files to some external application. </p>
<p>You can call this function in response to a mouseDrag callback, and it will block, running its own internal message loop and tracking the mouse, while it uses a native operating system drag-and-drop operation to move or copy some files to another application.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">files</td><td>a list of filenames to drag </td></tr>
<tr><td class="paramname">canMoveFiles</td><td>if true, the app that receives the files is allowed to move the files to a new location (if this is appropriate). If false, the receiver is expected to make a copy of them. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the files were successfully dropped somewhere, or false if it was interrupted </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classDragAndDropContainer.html#a42446d76aa9b798d56936f6de6c270a5" title="This performs a synchronous drag-and-drop of a block of text to some external application. ">performExternalDragDropOfText</a> </dd></dl>
</div>
</div>
<a id="a42446d76aa9b798d56936f6de6c270a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42446d76aa9b798d56936f6de6c270a5">§ </a></span>performExternalDragDropOfText()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool DragAndDropContainer::performExternalDragDropOfText </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>text</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This performs a synchronous drag-and-drop of a block of text to some external application. </p>
<p>You can call this function in response to a mouseDrag callback, and it will block, running its own internal message loop and tracking the mouse, while it uses a native operating system drag-and-drop operation to move or copy some text to another application.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">text</td><td>the text to copy </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the text was successfully dropped somewhere, or false if it was interrupted </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classDragAndDropContainer.html#ae9e29e4a49717401e4631fc5864f0a04" title="This performs a synchronous drag-and-drop of a set of files to some external application. ">performExternalDragDropOfFiles</a> </dd></dl>
</div>
</div>
<a id="a69b389d34bc9748eb5f82a8995aae28d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69b389d34bc9748eb5f82a8995aae28d">§ </a></span>shouldDropFilesWhenDraggedExternally()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool DragAndDropContainer::shouldDropFilesWhenDraggedExternally </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classDragAndDropTarget_1_1SourceDetails.html">DragAndDropTarget::SourceDetails</a> & </td>
<td class="paramname"><em>sourceDetails</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classStringArray.html">StringArray</a> & </td>
<td class="paramname"><em>files</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool & </td>
<td class="paramname"><em>canMoveFiles</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Override this if you want to be able to perform an external drag a set of files when the user drags outside of this container component. </p>
<p>This method will be called when a drag operation moves outside the Juce-based window, and if you want it to then perform a file drag-and-drop, add the filenames you want to the array passed in, and return true.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sourceDetails</td><td>information about the source of the drag operation </td></tr>
<tr><td class="paramname">files</td><td>on return, the filenames you want to drag </td></tr>
<tr><td class="paramname">canMoveFiles</td><td>on return, true if it's ok for the receiver to move the files; false if it must make a copy of them (see the <a class="el" href="classDragAndDropContainer.html#ae9e29e4a49717401e4631fc5864f0a04" title="This performs a synchronous drag-and-drop of a set of files to some external application. ">performExternalDragDropOfFiles()</a> method) </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classDragAndDropContainer.html#ae9e29e4a49717401e4631fc5864f0a04" title="This performs a synchronous drag-and-drop of a set of files to some external application. ">performExternalDragDropOfFiles</a> </dd></dl>
</div>
</div>
<a id="a7cb7a19c901f8b48b321f4301bcd0150"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cb7a19c901f8b48b321f4301bcd0150">§ </a></span>dragOperationStarted()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void DragAndDropContainer::dragOperationStarted </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Subclasses can override this to be told when a drag starts. </p>
</div>
</div>
<a id="a5e0c91e9c1518a3d7bc49624f3ead768"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e0c91e9c1518a3d7bc49624f3ead768">§ </a></span>dragOperationEnded()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void DragAndDropContainer::dragOperationEnded </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Subclasses can override this to be told when a drag finishes. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__DragAndDropContainer_8h.html">juce_DragAndDropContainer.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content © ROLI Ltd.</small></address><br/>
</body>
</html>
|