Include a header file required for build on mac 10.4
[supercollider.git] / Help / GUI / Cocoa-GUI / SCDragBoth.html
blob951c396849a0e29dd2ca5830879cdcf5b36d1506
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="949.43">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #001ee6}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
14 p.p5 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
16 p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
17 p.p8 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
18 p.p9 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica}
19 p.p10 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica}
20 p.p11 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica; min-height: 17.0px}
21 p.p12 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
22 p.p13 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000}
23 p.p14 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #bf0000}
24 p.p15 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000; min-height: 12.0px}
25 p.p16 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #606060}
26 p.p17 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #3e3c36; min-height: 12.0px}
27 span.s1 {font: 18.0px Helvetica}
28 span.s2 {color: #000000}
29 span.s3 {color: #485abb}
30 span.s4 {color: #6f717d}
31 span.s5 {font: 14.0px Helvetica}
32 span.s6 {color: #0000bf}
33 span.s7 {color: #007300}
34 span.Apple-tab-span {white-space:pre}
35 </style>
36 </head>
37 <body>
38 <p class="p1"><span class="s1"><b>SCDragBoth<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>a gui object source and receiver for drag and drop</b></p>
39 <p class="p2"><br></p>
40 <p class="p3"><span class="s2"><b>Inherits from: </b><a href="../../Core/Object.html"><b>Object</b></a><b> : </b><a href="SCView.html"><b>SCView</b></a><b> : </b><a href="SCStaticTextBase.html"><b>SCStaticTextBase</b></a><b> : </b><a href="SCDragView.html"><b>SCDragView</b></a><b> : </b><a href="SCDragSink.html"><b>SCDragSink</b></a></span></p>
41 <p class="p4"><br></p>
42 <p class="p1">See <a href="SCDragView.html"><span class="s3">SCDragView</span></a> for description and examples.</p>
43 <p class="p5"><br></p>
44 <p class="p6"><b>Creation / Class Methods</b></p>
45 <p class="p5"><br></p>
46 <p class="p7"><b><span class="Apple-tab-span"> </span>*new (parent, bounds)</b></p>
47 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
48 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>parent </b>- the parent view.</p>
49 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>bounds </b>- an instance of <a href="../../Geometry/Rect.html"><span class="s4">Rect</span></a>, or a <a href="../../Geometry/Point.html"><span class="s4">Point</span></a> indicating width@height.</p>
50 <p class="p5"><br></p>
51 <p class="p10"><b>Subclassing and Internal Methods</b></p>
52 <p class="p7"><span class="s5"><span class="Apple-tab-span"> </span></span>The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these as needed.</p>
53 <p class="p8"><span class="Apple-tab-span"> </span></p>
54 <p class="p7"><b><span class="Apple-tab-span"> </span>defaultGetDrag</b></p>
55 <p class="p8"><b><span class="Apple-tab-span"> </span></b></p>
56 <p class="p7"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>The method called by default when initiating a drag. Returns the content of <b>object</b> when dragging <b>from</b> an SCDragBoth.</p>
57 <p class="p5"><br></p>
58 <p class="p10"><b>Examples</b></p>
59 <p class="p11"><br></p>
60 <p class="p12">(</p>
61 <p class="p13"><span class="Apple-tab-span"> </span>w=<span class="s6">Window</span>.new.front;</p>
62 <p class="p13"><span class="Apple-tab-span"> </span>w.addFlowLayout;</p>
63 <p class="p14"><span class="s2"><span class="Apple-tab-span"> </span></span>// store various kinds of objects in the drag source</p>
64 <p class="p15"><span class="Apple-tab-span"> </span></p>
65 <p class="p14"><span class="s2"><span class="Apple-tab-span"> </span></span>// a string source</p>
66 <p class="p13"><span class="Apple-tab-span"> </span>a=<span class="s6">DragBoth</span>(w,<span class="s6">Rect</span>(10,10,150,20)).align_(<span class="s7">\center</span>)<span class="s2">.background_(Color.rand)</span>;</p>
67 <p class="p16"><span class="s2"><span class="Apple-tab-span"> </span>a.object=</span>"drag us around"<span class="s2">;</span></p>
68 <p class="p15"><span class="Apple-tab-span"> </span></p>
69 <p class="p15"><span class="Apple-tab-span"> </span></p>
70 <p class="p12"><span class="Apple-tab-span"> </span>a=<span class="s6">DragBoth</span>(w,<span class="s6">Rect</span>(10,10,150,20)).align_(<span class="s7">\center</span>).background_(Color.rand);</p>
71 <p class="p16"><span class="s2"><span class="Apple-tab-span"> </span>a.object=</span>"SUPERCOLLIDER"<span class="s2">;</span></p>
72 <p class="p15"><span class="Apple-tab-span"> </span></p>
73 <p class="p13"><span class="Apple-tab-span"> </span>8.do{</p>
74 <p class="p12"><span class="Apple-tab-span"> </span>a=<span class="s6">DragBoth</span>(w,<span class="s6">Rect</span>(10,10,150,20)).align_(<span class="s7">\center</span>).background_(Color.rand);</p>
75 <p class="p12"><span class="Apple-tab-span"> </span>a.receiveDragHandler={arg obj; obj.object = View.currentDrag.scramble}</p>
76 <p class="p13"><span class="Apple-tab-span"> </span>}</p>
77 <p class="p15"><span class="Apple-tab-span"> </span></p>
78 <p class="p15"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
79 <p class="p12">)</p>
80 <p class="p4"><br></p>
81 <p class="p4"><br></p>
82 <p class="p17"><br></p>
83 </body>
84 </html>