Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileGRAF_DRAGBOX(iw,ih,ix,iy,rx,ry,rw,rh[,last_ix,last_iy]) iw, ih, ix, iy, rx, ry, rw, rh: iexp last_ix, last_iy: ivar This function allows a rectangle to be moved about the screen with the mouse. Its movement is restricted to the interior of a larger specified rectangle. The function should only be called when the left mouse button is held down, as it terminates when the button is released. Returns 0 is an error occurred. iw - Width of moving rectangle. ih - Height of moving rectangle. ix - Initial x-coordinate of top left corner of moving rectangle. iy - Initial y-coordinate of top left corner of moving rectangle. rx - x-coodinate of top left corner of limiting rectangle. ry - y-coodinate of top left corner of limiting rectangle. rw - Width of limiting rectangle. rh - Height of limiting rectangle. last_ix - Returns x-coordinate of top left corner of moving rectangle when function terminates. last_iy - Returns y-coordinate of top left corner of moving rectangle when function terminates. The parameters last_ix and last_iy are optional, these values can also be found by querying GINTOUT(1) to GINTOUT(2). Example: REPEAT UNTIL MOUSEK=1 ~GRAF_DRAWBOX(25,25,50,50,10,10,150,150,lx%,ly%) BOX lx%,ly%,lx%+25,ly%+25 --> When the left mouse button is pressed, a small rectangle will move with the mouse pointer, provided that this does not take it outside the specified larger rectangle (in this case 10, 10 - 160, 160). When the button is released, the function terminates and the smaller rectangle is redrawn at its final position with the standard BOX command. graf_dragbox()+