Home » Archimedes archive » Acorn Computing » 1993 06 Mega Disk.adf » 93_06 » Miscellany/SolidDrag/!SolidDrag/Documents/DragDoc
Miscellany/SolidDrag/!SolidDrag/Documents/DragDoc
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn Computing » 1993 06 Mega Disk.adf » 93_06 |
Filename: | Miscellany/SolidDrag/!SolidDrag/Documents/DragDoc |
Read OK: | ✔ |
File size: | 095B bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
How to drive DragASprite How to do a drag ---------------- i) Prepare a sprite to be dragged (this may be trivial as the application may have a suitable sprite already to hand). ii) Perform a DragASprite_Start. This takes a copy of your sprite (so you can dispose of your copy whenever you like) and starts a Wimp drag. iii) When the Wimp sends you an indication that your drag has finished do a DragASprite_Stop which will release the workspace necessary for doing a drag-a-sprite. The Swis -------- DragASprite_Start (0x42400) This Swi starts dragging a sprite. The sprite you supply is copied, so there is no problem with you disposing of your copy of the sprite. In: r0 = flags: Bits Meaning 0-1 Horizontal location of sprite in box: 00 Left 01 Centre 10 Right 11 <undefined> 2-3 Vertical location of sprite in box: 00 Bottom 01 Centre 10 Top 11 <undefined> 4-5 Drag bounding box is: 00 Whole screen 01 Display area of window that the pointer's over 10 User specified 11 <undefined> 6 Bounding box applies to: 0 The box 1 The pointer 7 Control of drop-shadow: 0 Don't do a drop-shadow 1 Make a drop shadow when copying the sprite 8-31 Reserved for future use, should be set to 0. r1 = sprite area: 0 System sprite area 1 Wimp sprite area other Address of sprite area r2 = sprite name^ r3 = Pointer to 16-byte block containing box: Offset Use 0 x0 4 y0 8 x1 12 y1 r4 = Pointer to optional (see flags) 16-byte block containing bounding box: Offset Use 0 x0 4 y0 8 x1 12 y1 Out: All registers preserved. DragASprite_Stop (0x42401) This Swi terminates any current drag operation and releases any drag-a-sprite workspace claimed to do a drag. It is expected that this Swi will be called when the user_drag_box reason is received by the application. In: - Out: -
00000000 48 6f 77 20 74 6f 20 64 72 69 76 65 20 44 72 61 |How to drive Dra| 00000010 67 41 53 70 72 69 74 65 0a 0a 48 6f 77 20 74 6f |gASprite..How to| 00000020 20 64 6f 20 61 20 64 72 61 67 0a 2d 2d 2d 2d 2d | do a drag.-----| 00000030 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 69 29 20 |-----------..i) | 00000040 50 72 65 70 61 72 65 20 61 20 73 70 72 69 74 65 |Prepare a sprite| 00000050 20 74 6f 20 62 65 20 64 72 61 67 67 65 64 20 28 | to be dragged (| 00000060 74 68 69 73 20 6d 61 79 20 62 65 20 74 72 69 76 |this may be triv| 00000070 69 61 6c 20 61 73 20 74 68 65 20 61 70 70 6c 69 |ial as the appli| 00000080 63 61 74 69 6f 6e 20 6d 61 79 0a 20 20 20 20 20 |cation may. | 00000090 20 20 20 68 61 76 65 20 61 20 73 75 69 74 61 62 | have a suitab| 000000a0 6c 65 20 73 70 72 69 74 65 20 61 6c 72 65 61 64 |le sprite alread| 000000b0 79 20 74 6f 20 68 61 6e 64 29 2e 0a 69 69 29 20 |y to hand)..ii) | 000000c0 50 65 72 66 6f 72 6d 20 61 20 44 72 61 67 41 53 |Perform a DragAS| 000000d0 70 72 69 74 65 5f 53 74 61 72 74 2e 20 54 68 69 |prite_Start. Thi| 000000e0 73 20 74 61 6b 65 73 20 61 20 63 6f 70 79 20 6f |s takes a copy o| 000000f0 66 20 79 6f 75 72 20 73 70 72 69 74 65 20 28 73 |f your sprite (s| 00000100 6f 20 79 6f 75 20 63 61 6e 0a 20 20 20 20 20 20 |o you can. | 00000110 20 20 64 69 73 70 6f 73 65 20 6f 66 20 79 6f 75 | dispose of you| 00000120 72 20 63 6f 70 79 20 77 68 65 6e 65 76 65 72 20 |r copy whenever | 00000130 79 6f 75 20 6c 69 6b 65 29 20 61 6e 64 20 73 74 |you like) and st| 00000140 61 72 74 73 20 61 20 57 69 6d 70 20 64 72 61 67 |arts a Wimp drag| 00000150 2e 0a 69 69 69 29 20 57 68 65 6e 20 74 68 65 20 |..iii) When the | 00000160 57 69 6d 70 20 73 65 6e 64 73 20 79 6f 75 20 61 |Wimp sends you a| 00000170 6e 20 69 6e 64 69 63 61 74 69 6f 6e 20 74 68 61 |n indication tha| 00000180 74 20 79 6f 75 72 20 64 72 61 67 20 68 61 73 20 |t your drag has | 00000190 66 69 6e 69 73 68 65 64 20 64 6f 0a 20 20 20 20 |finished do. | 000001a0 20 20 20 20 61 20 44 72 61 67 41 53 70 72 69 74 | a DragASprit| 000001b0 65 5f 53 74 6f 70 20 77 68 69 63 68 20 77 69 6c |e_Stop which wil| 000001c0 6c 20 72 65 6c 65 61 73 65 20 74 68 65 20 77 6f |l release the wo| 000001d0 72 6b 73 70 61 63 65 20 6e 65 63 65 73 73 61 72 |rkspace necessar| 000001e0 79 20 66 6f 72 0a 20 20 20 20 20 20 20 20 64 6f |y for. do| 000001f0 69 6e 67 20 61 20 64 72 61 67 2d 61 2d 73 70 72 |ing a drag-a-spr| 00000200 69 74 65 2e 0a 0a 54 68 65 20 53 77 69 73 0a 2d |ite...The Swis.-| 00000210 2d 2d 2d 2d 2d 2d 2d 0a 0a 44 72 61 67 41 53 70 |-------..DragASp| 00000220 72 69 74 65 5f 53 74 61 72 74 20 28 30 78 34 32 |rite_Start (0x42| 00000230 34 30 30 29 0a 0a 54 68 69 73 20 53 77 69 20 73 |400)..This Swi s| 00000240 74 61 72 74 73 20 64 72 61 67 67 69 6e 67 20 61 |tarts dragging a| 00000250 20 73 70 72 69 74 65 2e 20 54 68 65 20 73 70 72 | sprite. The spr| 00000260 69 74 65 20 79 6f 75 20 73 75 70 70 6c 79 20 69 |ite you supply i| 00000270 73 20 63 6f 70 69 65 64 2c 20 73 6f 20 74 68 65 |s copied, so the| 00000280 72 65 0a 69 73 20 6e 6f 20 70 72 6f 62 6c 65 6d |re.is no problem| 00000290 20 77 69 74 68 20 79 6f 75 20 64 69 73 70 6f 73 | with you dispos| 000002a0 69 6e 67 20 6f 66 20 79 6f 75 72 20 63 6f 70 79 |ing of your copy| 000002b0 20 6f 66 20 74 68 65 20 73 70 72 69 74 65 2e 0a | of the sprite..| 000002c0 0a 49 6e 3a 0a 72 30 20 3d 20 66 6c 61 67 73 3a |.In:.r0 = flags:| 000002d0 0a 20 20 20 20 20 20 20 20 42 69 74 73 20 20 20 |. Bits | 000002e0 20 4d 65 61 6e 69 6e 67 0a 20 20 20 20 20 20 20 | Meaning. | 000002f0 20 30 2d 31 20 20 20 20 20 48 6f 72 69 7a 6f 6e | 0-1 Horizon| 00000300 74 61 6c 20 6c 6f 63 61 74 69 6f 6e 20 6f 66 20 |tal location of | 00000310 73 70 72 69 74 65 20 69 6e 20 62 6f 78 3a 0a 20 |sprite in box:. | 00000320 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 | 0| 00000330 30 20 20 20 20 20 20 4c 65 66 74 0a 20 20 20 20 |0 Left. | 00000340 20 20 20 20 20 20 20 20 20 20 20 20 30 31 20 20 | 01 | 00000350 20 20 20 20 43 65 6e 74 72 65 0a 20 20 20 20 20 | Centre. | 00000360 20 20 20 20 20 20 20 20 20 20 20 31 30 20 20 20 | 10 | 00000370 20 20 20 52 69 67 68 74 0a 20 20 20 20 20 20 20 | Right. | 00000380 20 20 20 20 20 20 20 20 20 31 31 20 20 20 20 20 | 11 | 00000390 20 3c 75 6e 64 65 66 69 6e 65 64 3e 0a 20 20 20 | <undefined>. | 000003a0 20 20 20 20 20 32 2d 33 20 20 20 20 20 56 65 72 | 2-3 Ver| 000003b0 74 69 63 61 6c 20 6c 6f 63 61 74 69 6f 6e 20 6f |tical location o| 000003c0 66 20 73 70 72 69 74 65 20 69 6e 20 62 6f 78 3a |f sprite in box:| 000003d0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 000003e0 20 30 30 20 20 20 20 20 20 42 6f 74 74 6f 6d 0a | 00 Bottom.| 000003f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000400 30 31 20 20 20 20 20 20 43 65 6e 74 72 65 0a 20 |01 Centre. | 00000410 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 | 1| 00000420 30 20 20 20 20 20 20 54 6f 70 0a 20 20 20 20 20 |0 Top. | 00000430 20 20 20 20 20 20 20 20 20 20 20 31 31 20 20 20 | 11 | 00000440 20 20 20 3c 75 6e 64 65 66 69 6e 65 64 3e 0a 20 | <undefined>. | 00000450 20 20 20 20 20 20 20 34 2d 35 20 20 20 20 20 44 | 4-5 D| 00000460 72 61 67 20 62 6f 75 6e 64 69 6e 67 20 62 6f 78 |rag bounding box| 00000470 20 69 73 3a 0a 20 20 20 20 20 20 20 20 20 20 20 | is:. | 00000480 20 20 20 20 20 30 30 20 20 20 20 20 20 57 68 6f | 00 Who| 00000490 6c 65 20 73 63 72 65 65 6e 0a 20 20 20 20 20 20 |le screen. | 000004a0 20 20 20 20 20 20 20 20 20 20 30 31 20 20 20 20 | 01 | 000004b0 20 20 44 69 73 70 6c 61 79 20 61 72 65 61 20 6f | Display area o| 000004c0 66 20 77 69 6e 64 6f 77 20 74 68 61 74 20 74 68 |f window that th| 000004d0 65 20 70 6f 69 6e 74 65 72 27 73 20 6f 76 65 72 |e pointer's over| 000004e0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 000004f0 20 31 30 20 20 20 20 20 20 55 73 65 72 20 73 70 | 10 User sp| 00000500 65 63 69 66 69 65 64 0a 20 20 20 20 20 20 20 20 |ecified. | 00000510 20 20 20 20 20 20 20 20 31 31 20 20 20 20 20 20 | 11 | 00000520 3c 75 6e 64 65 66 69 6e 65 64 3e 0a 20 20 20 20 |<undefined>. | 00000530 20 20 20 20 36 20 20 20 20 20 20 20 42 6f 75 6e | 6 Boun| 00000540 64 69 6e 67 20 62 6f 78 20 61 70 70 6c 69 65 73 |ding box applies| 00000550 20 74 6f 3a 0a 20 20 20 20 20 20 20 20 20 20 20 | to:. | 00000560 20 20 20 20 20 30 20 20 20 20 20 20 20 54 68 65 | 0 The| 00000570 20 62 6f 78 0a 20 20 20 20 20 20 20 20 20 20 20 | box. | 00000580 20 20 20 20 20 31 20 20 20 20 20 20 20 54 68 65 | 1 The| 00000590 20 70 6f 69 6e 74 65 72 0a 20 20 20 20 20 20 20 | pointer. | 000005a0 20 37 20 20 20 20 20 20 20 43 6f 6e 74 72 6f 6c | 7 Control| 000005b0 20 6f 66 20 64 72 6f 70 2d 73 68 61 64 6f 77 3a | of drop-shadow:| 000005c0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 000005d0 20 30 20 20 20 20 20 20 20 44 6f 6e 27 74 20 64 | 0 Don't d| 000005e0 6f 20 61 20 64 72 6f 70 2d 73 68 61 64 6f 77 0a |o a drop-shadow.| 000005f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000600 31 20 20 20 20 20 20 20 4d 61 6b 65 20 61 20 64 |1 Make a d| 00000610 72 6f 70 20 73 68 61 64 6f 77 20 77 68 65 6e 20 |rop shadow when | 00000620 63 6f 70 79 69 6e 67 20 74 68 65 20 73 70 72 69 |copying the spri| 00000630 74 65 0a 20 20 20 20 20 20 20 20 38 2d 33 31 20 |te. 8-31 | 00000640 20 20 20 52 65 73 65 72 76 65 64 20 66 6f 72 20 | Reserved for | 00000650 66 75 74 75 72 65 20 75 73 65 2c 20 73 68 6f 75 |future use, shou| 00000660 6c 64 20 62 65 20 73 65 74 20 74 6f 20 30 2e 0a |ld be set to 0..| 00000670 72 31 20 3d 20 73 70 72 69 74 65 20 61 72 65 61 |r1 = sprite area| 00000680 3a 0a 20 20 20 20 20 20 20 20 30 20 20 20 20 20 |:. 0 | 00000690 20 20 53 79 73 74 65 6d 20 73 70 72 69 74 65 20 | System sprite | 000006a0 61 72 65 61 0a 20 20 20 20 20 20 20 20 31 20 20 |area. 1 | 000006b0 20 20 20 20 20 57 69 6d 70 20 73 70 72 69 74 65 | Wimp sprite| 000006c0 20 61 72 65 61 0a 20 20 20 20 20 20 20 20 6f 74 | area. ot| 000006d0 68 65 72 20 20 20 41 64 64 72 65 73 73 20 6f 66 |her Address of| 000006e0 20 73 70 72 69 74 65 20 61 72 65 61 0a 72 32 20 | sprite area.r2 | 000006f0 3d 20 73 70 72 69 74 65 20 6e 61 6d 65 5e 0a 72 |= sprite name^.r| 00000700 33 20 3d 20 50 6f 69 6e 74 65 72 20 74 6f 20 31 |3 = Pointer to 1| 00000710 36 2d 62 79 74 65 20 62 6c 6f 63 6b 20 63 6f 6e |6-byte block con| 00000720 74 61 69 6e 69 6e 67 20 62 6f 78 3a 0a 20 20 20 |taining box:. | 00000730 20 20 20 20 20 4f 66 66 73 65 74 20 20 55 73 65 | Offset Use| 00000740 0a 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 |. 0 | 00000750 20 78 30 0a 20 20 20 20 20 20 20 20 34 20 20 20 | x0. 4 | 00000760 20 20 20 20 79 30 0a 20 20 20 20 20 20 20 20 38 | y0. 8| 00000770 20 20 20 20 20 20 20 78 31 0a 20 20 20 20 20 20 | x1. | 00000780 20 20 31 32 20 20 20 20 20 20 79 31 0a 72 34 20 | 12 y1.r4 | 00000790 3d 20 50 6f 69 6e 74 65 72 20 74 6f 20 6f 70 74 |= Pointer to opt| 000007a0 69 6f 6e 61 6c 20 28 73 65 65 20 66 6c 61 67 73 |ional (see flags| 000007b0 29 20 31 36 2d 62 79 74 65 20 62 6c 6f 63 6b 20 |) 16-byte block | 000007c0 63 6f 6e 74 61 69 6e 69 6e 67 20 62 6f 75 6e 64 |containing bound| 000007d0 69 6e 67 20 62 6f 78 3a 0a 20 20 20 20 20 20 20 |ing box:. | 000007e0 20 4f 66 66 73 65 74 20 20 55 73 65 0a 20 20 20 | Offset Use. | 000007f0 20 20 20 20 20 30 20 20 20 20 20 20 20 78 30 0a | 0 x0.| 00000800 20 20 20 20 20 20 20 20 34 20 20 20 20 20 20 20 | 4 | 00000810 79 30 0a 20 20 20 20 20 20 20 20 38 20 20 20 20 |y0. 8 | 00000820 20 20 20 78 31 0a 20 20 20 20 20 20 20 20 31 32 | x1. 12| 00000830 20 20 20 20 20 20 79 31 0a 0a 4f 75 74 3a 0a 41 | y1..Out:.A| 00000840 6c 6c 20 72 65 67 69 73 74 65 72 73 20 70 72 65 |ll registers pre| 00000850 73 65 72 76 65 64 2e 0a 0a 44 72 61 67 41 53 70 |served...DragASp| 00000860 72 69 74 65 5f 53 74 6f 70 20 28 30 78 34 32 34 |rite_Stop (0x424| 00000870 30 31 29 0a 0a 54 68 69 73 20 53 77 69 20 74 65 |01)..This Swi te| 00000880 72 6d 69 6e 61 74 65 73 20 61 6e 79 20 63 75 72 |rminates any cur| 00000890 72 65 6e 74 20 64 72 61 67 20 6f 70 65 72 61 74 |rent drag operat| 000008a0 69 6f 6e 20 61 6e 64 20 72 65 6c 65 61 73 65 73 |ion and releases| 000008b0 20 61 6e 79 0a 64 72 61 67 2d 61 2d 73 70 72 69 | any.drag-a-spri| 000008c0 74 65 20 77 6f 72 6b 73 70 61 63 65 20 63 6c 61 |te workspace cla| 000008d0 69 6d 65 64 20 74 6f 20 64 6f 20 61 20 64 72 61 |imed to do a dra| 000008e0 67 2e 20 49 74 20 69 73 20 65 78 70 65 63 74 65 |g. It is expecte| 000008f0 64 20 74 68 61 74 20 74 68 69 73 20 53 77 69 0a |d that this Swi.| 00000900 77 69 6c 6c 20 62 65 20 63 61 6c 6c 65 64 20 77 |will be called w| 00000910 68 65 6e 20 74 68 65 20 75 73 65 72 5f 64 72 61 |hen the user_dra| 00000920 67 5f 62 6f 78 20 72 65 61 73 6f 6e 20 69 73 20 |g_box reason is | 00000930 72 65 63 65 69 76 65 64 20 62 79 20 74 68 65 20 |received by the | 00000940 61 70 70 6c 69 63 61 74 69 6f 6e 2e 0a 0a 49 6e |application...In| 00000950 3a 0a 2d 0a 4f 75 74 3a 0a 2d 0a |:.-.Out:.-.| 0000095b