news |
info |
people |
software |
stuff |
DragRgn XFCN. Version 2.2d2, by Sam Deane. Copyright ©1994 ULTRALAB. Compiled 14:37:10, 14/12/94. Debugging code included.
The XFCN returns a pair of numbers, which give the horizontal and vertical distances that the outline was dragged.
The <limit> and <slop> parameters can either be passed a rectangle, or as one of the pre-defined constants desktop (the default value) or card (which limits the dragging to the card window).
The optional <mode> parameter allows you to constrain the outline so that it only moves vertically, or only moves horizontally. A value of 1 constrains horizontally, a value of 2 vertically, and a value of 0 means no constraints.
The syntax is:
get DragRgn("rect",<rect>,<click> {,<limit> {,<slop> {,<mode>}}})
The <rect> parameter gives starting position of the rectangle that you wish to drag around.
The <click> parameter defines the relative positions of the grey outline and the cursor whilst the outline is being dragged. Normally you should pass the clickLoc here.
See "Optional Parameters" for an explanation of the <limit>, <slop> and <mode> parameters.
on mouseDown put the rect of me into path put the screenrect into limit put the clickLoc into click put 0 into mode if the shiftKey is down then wait until the mouseLoc click if the mouseH <> item 1 of click then put 1 into mode else if the mouseV <> item 2 of click then put 2 into mode end if end if put DragRgn(rect,path,click,,,mode) end mouseDown
get DragRgn("region",<path>,<click> {,<limit> {,<slop> {,<mode>}}})
The <path> parameter gives a list of points in the form x1,y1,x2,y2,x3,y3,.... These points define a path, starting at the top left hand corner of the button and progressing from there to point 1, point 2, etc.
The <click> parameter defines the relative positions of the grey outline and the cursor whilst the outline is being dragged. Normally you should pass the clickLoc here.
See "Optional Parameters" for an explanation of the <limit>, <slop> and <mode> parameters.
on mouseDown put the left of me into item 1 of path put the top of me into item 2 of path put "0,30,60,30,30,-30,-30,-30" into item 3 of path put the screenrect into limit put the clickLoc into click put 0 into mode put DragRgn(region,path,click,limit,limit,mode) end mouseDown
get DragRgn("oval",<rect>,<click> {,<limit> {,<slop> {,<mode>}}})
The <rect> parameter gives starting position of the outline that you wish to drag around.
The <click> parameter defines the relative positions of the grey outline and the cursor whilst the outline is being dragged. Normally you should pass the clickLoc here.
See "Optional Parameters" for an explanation of the <limit>, <slop> and <mode> parameters.
on mouseDown put the rect of me into path put the screenrect into limit put the clickLoc into click put DragRgn(oval,path,click) end mouseDown
get DragRgn("roundRect",<rect>,<click> {,<limit> {,<slop> {,<mode>}}})
The <rect> parameter gives starting position of the rectangle that you wish to drag around.
The <click> parameter defines the relative positions of the grey outline and the cursor whilst the outline is being dragged. Normally you should pass the clickLoc here.
See "Optional Parameters" for an explanation of the <limit>, <slop> and <mode> parameters.
on mouseDown put "10,10," into path put the rect of me after path put the screenrect into limit put the clickLoc into click put 0 into mode if the shiftKey is down then wait until the mouseLoc click if the mouseH <> item 1 of click then put 1 into mode else if the mouseV <> item 2 of click then put 2 into mode end if end if put DragRgn(roundrect,path,click,,,mode) end mouseDown
The syntax is:
get DragRgn("bitmap",<rect>,<click> {,<limit> {,<slop> {,<mode>}}})
The <rect> parameter gives starting position of the outline that you wish to drag around.
The <click> parameter defines the relative positions of the grey outline and the cursor whilst the outline is being dragged. Normally you should pass the clickLoc here.
See "Optional Parameters" for an explanation of the <limit>, <slop> and <mode> parameters.
on mouseDown put the rect of me into path put the screenrect into limit put the clickLoc into click put DragRgn(bitmap,path,click) end mouseDown