3 summary:: A gui object source and receiver for drag and drop
5 related:: Classes/DragSink, Classes/DragSource
8 A gui object source and receiver for drag and drop. See link::Classes/SCDragView:: for description and examples.
16 An instance of link::Classes/Rect::, or a link::Classes/Point:: indicating code::width@height::.
21 subsection:: Subclassing and Internal Methods
23 The following methods are usually not used directly or are called by a primitive. Programmers can still call or override these as needed.
25 method:: defaultGetDrag
26 The method called by default when initiating a drag. Returns the content of object when dragging from an DragBoth.
35 // store various kinds of objects in the drag source
38 a = DragBoth(w, Rect(10, 10, 150, 20)).align_(\center).background_(Color.rand);
39 a.object = "drag us around";
41 a = DragBoth(w, Rect(10, 10, 150, 20)).align_(\center).background_(Color.rand);
42 a.object="SUPERCOLLIDER";
45 a = DragBoth(w, Rect(10, 10, 150, 20)).align_(\center).background_(Color.rand);
46 a.receiveDragHandler = { arg obj; obj.object = View.currentDrag.scramble };