Home » Archimedes archive » Acorn User » AU 1996-12 B.adf » Features » PCA/Docs/Remote_Msg
PCA/Docs/Remote_Msg
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 User » AU 1996-12 B.adf » Features |
| Filename: | PCA/Docs/Remote_Msg |
| Read OK: | ✔ |
| File size: | 1334 bytes |
| Load address: | 0000 |
| Exec address: | 0000 |
File contents
Plug In Compliant Application protocol ====================================== PCA In-place editing specification ================================== Author : Rob Davison (rdavison@xtra.co.nz) Date : 15/08/96 Status : Release 1 Introduction ============ The aim of this section is to define the work necessary for applications to support 'in-place' editing (applications working on an object within another application's window) within the framework supplied by the PCA itself. This feature is an optional part of the PCA specification. All remote tasks must be able to operate according to the normal PCA specification (open their own window onto the object) if the Local task in question does not support in-place editing. Even if the Local task does support this, it is wise for the remote task to give the user the option of switching to external editing as in-place editing has its disadvantages as well as advantages. (The principal disadvantage being that only one in-place editing session per object can be undertaken at a time, for obvious reasons). Local task ---------- The greatest amount of work is down to the 'Local' or object-owning application. After invoking a remote task with the PCA message DoYourStuff when bit 4 of the flags word is set, it must expect receipt of Message_HookMe from the remote task. When it gets this message it should create a transparent icon in its window which completely covers the object and send Message_ObjectPosition . The button type of this icon should be taken from bits 28-31 of the flags word as sent by Message_HookMe and the indirection string (if supported) from R1+36 Then, on receipt of the following standard Wimp messages the Local task must check to see if the message refers to an icon covering the object, and if it is, modify the message block and pass the message to the remote task using Wimp_SendMessage. Doing this effectively cuts a 'hole' in the window where the object is. Messages into that region get shunted to the Remote task and are ignored by the Local task. Details of the modifications: 6. Button_Click xposition and yposition should be made relative to the object's bottom left. Window handle must be set to the one supplied in Message_HookMe . Icon handle must be set to the special value -&414350 (-"PCA") ??? Other messages ??? ??? Which to support and how to modify them ??? ??? Advise us if you have any suggestions ??? On receipt of Message_OpenWindow for the window in which the object resides the Local task must send Message_ObjectPosition to the remote task so that it can open its toolbar at an appropriate place. Also, any actions which cause the position or size of the remotely linked object to change must resize and reposition the icon created above and send Message_ObjectPosition again. On receipt of Message_UnhookMe it must delete the icon covering the object and carry out any other work necessary to restore normal access to the object. The same action should obviously also be undertaken if the object is deleted. Remote Task ----------- On receipt of Message_ObjectPosition the remote task must open its toolbar at an appropriate position calculated from the data contained in the message. This toolbar must contain at least one icon which, when clicked on, sends Message_UnhookMe to the local task, removes any references it has to the object and closes the toolbar. Model the appearance of this icon on the window close icon and position the icon at the far left horizontal toolbars or at the top left of vertical toolbars. On receipt of Message_Do / Message_Changed the remote task must check to see if In-place editing is on (b4 of flags in Message_Do) and, if so, send Message_HookMe rather than opening its own window onto the object. On receipt of ButtonClick messages (apparently) to its main window the remote task should check the icon handle and if it is equal to -&414350 treat the coordinates passed in the ButtonClick block as 'corrected' for the position of its window, scrollbars etc as the coordinates are already relative to the objects bottom left. Modify the object data as appropriate and generate Message_UpdateArea as with standard PCA practice. You should be able to use the same code for remote and local actions just do not convert pointer coordinates to be relative to your main window and do not redraw your main window (it should be closed anyway). Note: For 'painting' or 'dragging' type actions it is sometimes wise to set the remote button type (in Message_HookMe) to Click and to do a tight repeating 'loop' around your redraw/paint code, reading the mouse pointer information directly until the button click stops. In this situation the Remote task should make use of the information in the last Message_ObjectPosition it receieved to work out the visible size and position of the object in the Local task's window (see the !Spaint example).
00000000 50 6c 75 67 20 49 6e 20 43 6f 6d 70 6c 69 61 6e |Plug In Complian| 00000010 74 20 41 70 70 6c 69 63 61 74 69 6f 6e 20 70 72 |t Application pr| 00000020 6f 74 6f 63 6f 6c 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d |otocol.=========| 00000030 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| 00000040 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 20 0a 0a |============= ..| 00000050 50 43 41 20 49 6e 2d 70 6c 61 63 65 20 65 64 69 |PCA In-place edi| 00000060 74 69 6e 67 20 73 70 65 63 69 66 69 63 61 74 69 |ting specificati| 00000070 6f 6e 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |on.=============| 00000080 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| 00000090 3d 3d 3d 3d 3d 0a 0a 0a 41 75 74 68 6f 72 20 3a |=====...Author :| 000000a0 20 52 6f 62 20 44 61 76 69 73 6f 6e 20 28 72 64 | Rob Davison (rd| 000000b0 61 76 69 73 6f 6e 40 78 74 72 61 2e 63 6f 2e 6e |avison@xtra.co.n| 000000c0 7a 29 0a 44 61 74 65 20 3a 20 31 35 2f 30 38 2f |z).Date : 15/08/| 000000d0 39 36 0a 53 74 61 74 75 73 20 3a 20 52 65 6c 65 |96.Status : Rele| 000000e0 61 73 65 20 31 0a 0a 0a 49 6e 74 72 6f 64 75 63 |ase 1...Introduc| 000000f0 74 69 6f 6e 0a 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |tion.===========| 00000100 3d 0a 0a 54 68 65 20 61 69 6d 20 6f 66 20 74 68 |=..The aim of th| 00000110 69 73 20 73 65 63 74 69 6f 6e 20 69 73 20 74 6f |is section is to| 00000120 20 64 65 66 69 6e 65 20 74 68 65 20 77 6f 72 6b | define the work| 00000130 20 6e 65 63 65 73 73 61 72 79 20 66 6f 72 20 61 | necessary for a| 00000140 70 70 6c 69 63 61 74 69 6f 6e 73 20 74 6f 0a 73 |pplications to.s| 00000150 75 70 70 6f 72 74 20 27 69 6e 2d 70 6c 61 63 65 |upport 'in-place| 00000160 27 20 65 64 69 74 69 6e 67 20 28 61 70 70 6c 69 |' editing (appli| 00000170 63 61 74 69 6f 6e 73 20 77 6f 72 6b 69 6e 67 20 |cations working | 00000180 6f 6e 20 61 6e 20 6f 62 6a 65 63 74 20 77 69 74 |on an object wit| 00000190 68 69 6e 20 61 6e 6f 74 68 65 72 0a 61 70 70 6c |hin another.appl| 000001a0 69 63 61 74 69 6f 6e 27 73 20 77 69 6e 64 6f 77 |ication's window| 000001b0 29 20 77 69 74 68 69 6e 20 74 68 65 20 66 72 61 |) within the fra| 000001c0 6d 65 77 6f 72 6b 20 73 75 70 70 6c 69 65 64 20 |mework supplied | 000001d0 62 79 20 74 68 65 20 50 43 41 20 69 74 73 65 6c |by the PCA itsel| 000001e0 66 2e 0a 0a 54 68 69 73 20 66 65 61 74 75 72 65 |f...This feature| 000001f0 20 69 73 20 61 6e 20 6f 70 74 69 6f 6e 61 6c 20 | is an optional | 00000200 70 61 72 74 20 6f 66 20 74 68 65 20 50 43 41 20 |part of the PCA | 00000210 73 70 65 63 69 66 69 63 61 74 69 6f 6e 2e 20 41 |specification. A| 00000220 6c 6c 20 72 65 6d 6f 74 65 20 74 61 73 6b 73 0a |ll remote tasks.| 00000230 6d 75 73 74 20 62 65 20 61 62 6c 65 20 74 6f 20 |must be able to | 00000240 6f 70 65 72 61 74 65 20 61 63 63 6f 72 64 69 6e |operate accordin| 00000250 67 20 74 6f 20 74 68 65 20 6e 6f 72 6d 61 6c 20 |g to the normal | 00000260 50 43 41 20 73 70 65 63 69 66 69 63 61 74 69 6f |PCA specificatio| 00000270 6e 20 28 6f 70 65 6e 0a 74 68 65 69 72 20 6f 77 |n (open.their ow| 00000280 6e 20 77 69 6e 64 6f 77 20 6f 6e 74 6f 20 74 68 |n window onto th| 00000290 65 20 6f 62 6a 65 63 74 29 20 69 66 20 74 68 65 |e object) if the| 000002a0 20 4c 6f 63 61 6c 20 74 61 73 6b 20 69 6e 20 71 | Local task in q| 000002b0 75 65 73 74 69 6f 6e 20 64 6f 65 73 20 6e 6f 74 |uestion does not| 000002c0 0a 73 75 70 70 6f 72 74 20 69 6e 2d 70 6c 61 63 |.support in-plac| 000002d0 65 20 65 64 69 74 69 6e 67 2e 20 45 76 65 6e 20 |e editing. Even | 000002e0 69 66 20 74 68 65 20 4c 6f 63 61 6c 20 74 61 73 |if the Local tas| 000002f0 6b 20 64 6f 65 73 20 73 75 70 70 6f 72 74 20 74 |k does support t| 00000300 68 69 73 2c 20 69 74 20 69 73 0a 77 69 73 65 20 |his, it is.wise | 00000310 66 6f 72 20 74 68 65 20 72 65 6d 6f 74 65 20 74 |for the remote t| 00000320 61 73 6b 20 74 6f 20 67 69 76 65 20 74 68 65 20 |ask to give the | 00000330 75 73 65 72 20 74 68 65 20 6f 70 74 69 6f 6e 20 |user the option | 00000340 6f 66 20 73 77 69 74 63 68 69 6e 67 20 74 6f 0a |of switching to.| 00000350 65 78 74 65 72 6e 61 6c 20 65 64 69 74 69 6e 67 |external editing| 00000360 20 61 73 20 69 6e 2d 70 6c 61 63 65 20 65 64 69 | as in-place edi| 00000370 74 69 6e 67 20 68 61 73 20 69 74 73 20 64 69 73 |ting has its dis| 00000380 61 64 76 61 6e 74 61 67 65 73 20 61 73 20 77 65 |advantages as we| 00000390 6c 6c 20 61 73 0a 61 64 76 61 6e 74 61 67 65 73 |ll as.advantages| 000003a0 2e 20 28 54 68 65 20 70 72 69 6e 63 69 70 61 6c |. (The principal| 000003b0 20 64 69 73 61 64 76 61 6e 74 61 67 65 20 62 65 | disadvantage be| 000003c0 69 6e 67 20 74 68 61 74 20 6f 6e 6c 79 20 6f 6e |ing that only on| 000003d0 65 20 69 6e 2d 70 6c 61 63 65 20 65 64 69 74 69 |e in-place editi| 000003e0 6e 67 0a 73 65 73 73 69 6f 6e 20 70 65 72 20 6f |ng.session per o| 000003f0 62 6a 65 63 74 20 63 61 6e 20 62 65 20 75 6e 64 |bject can be und| 00000400 65 72 74 61 6b 65 6e 20 61 74 20 61 20 74 69 6d |ertaken at a tim| 00000410 65 2c 20 66 6f 72 20 6f 62 76 69 6f 75 73 20 72 |e, for obvious r| 00000420 65 61 73 6f 6e 73 29 2e 20 0a 0a 4c 6f 63 61 6c |easons). ..Local| 00000430 20 74 61 73 6b 20 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d | task .---------| 00000440 2d 0a 0a 54 68 65 20 67 72 65 61 74 65 73 74 20 |-..The greatest | 00000450 61 6d 6f 75 6e 74 20 6f 66 20 77 6f 72 6b 20 69 |amount of work i| 00000460 73 20 64 6f 77 6e 20 74 6f 20 74 68 65 20 27 4c |s down to the 'L| 00000470 6f 63 61 6c 27 20 6f 72 20 6f 62 6a 65 63 74 2d |ocal' or object-| 00000480 6f 77 6e 69 6e 67 0a 61 70 70 6c 69 63 61 74 69 |owning.applicati| 00000490 6f 6e 2e 20 41 66 74 65 72 20 69 6e 76 6f 6b 69 |on. After invoki| 000004a0 6e 67 20 61 20 72 65 6d 6f 74 65 20 74 61 73 6b |ng a remote task| 000004b0 20 77 69 74 68 20 74 68 65 20 50 43 41 20 6d 65 | with the PCA me| 000004c0 73 73 61 67 65 20 44 6f 59 6f 75 72 53 74 75 66 |ssage DoYourStuf| 000004d0 66 0a 77 68 65 6e 20 62 69 74 20 34 20 6f 66 20 |f.when bit 4 of | 000004e0 74 68 65 20 66 6c 61 67 73 20 77 6f 72 64 20 69 |the flags word i| 000004f0 73 20 73 65 74 2c 20 69 74 20 6d 75 73 74 20 65 |s set, it must e| 00000500 78 70 65 63 74 20 72 65 63 65 69 70 74 20 6f 66 |xpect receipt of| 00000510 0a 4d 65 73 73 61 67 65 5f 48 6f 6f 6b 4d 65 20 |.Message_HookMe | 00000520 66 72 6f 6d 20 74 68 65 20 72 65 6d 6f 74 65 20 |from the remote | 00000530 74 61 73 6b 2e 20 57 68 65 6e 20 69 74 20 67 65 |task. When it ge| 00000540 74 73 20 74 68 69 73 20 6d 65 73 73 61 67 65 20 |ts this message | 00000550 69 74 20 73 68 6f 75 6c 64 0a 63 72 65 61 74 65 |it should.create| 00000560 20 61 20 74 72 61 6e 73 70 61 72 65 6e 74 20 69 | a transparent i| 00000570 63 6f 6e 20 69 6e 20 69 74 73 20 77 69 6e 64 6f |con in its windo| 00000580 77 20 77 68 69 63 68 20 63 6f 6d 70 6c 65 74 65 |w which complete| 00000590 6c 79 20 63 6f 76 65 72 73 20 74 68 65 20 6f 62 |ly covers the ob| 000005a0 6a 65 63 74 0a 61 6e 64 20 73 65 6e 64 20 20 4d |ject.and send M| 000005b0 65 73 73 61 67 65 5f 4f 62 6a 65 63 74 50 6f 73 |essage_ObjectPos| 000005c0 69 74 69 6f 6e 20 2e 20 0a 0a 54 68 65 20 62 75 |ition . ..The bu| 000005d0 74 74 6f 6e 20 74 79 70 65 20 6f 66 20 74 68 69 |tton type of thi| 000005e0 73 20 69 63 6f 6e 20 73 68 6f 75 6c 64 20 62 65 |s icon should be| 000005f0 20 74 61 6b 65 6e 20 66 72 6f 6d 20 62 69 74 73 | taken from bits| 00000600 20 32 38 2d 33 31 20 6f 66 20 74 68 65 20 66 6c | 28-31 of the fl| 00000610 61 67 73 0a 77 6f 72 64 20 61 73 20 73 65 6e 74 |ags.word as sent| 00000620 20 62 79 20 20 4d 65 73 73 61 67 65 5f 48 6f 6f | by Message_Hoo| 00000630 6b 4d 65 20 61 6e 64 20 74 68 65 20 69 6e 64 69 |kMe and the indi| 00000640 72 65 63 74 69 6f 6e 20 73 74 72 69 6e 67 20 28 |rection string (| 00000650 69 66 20 73 75 70 70 6f 72 74 65 64 29 0a 66 72 |if supported).fr| 00000660 6f 6d 20 52 31 2b 33 36 0a 0a 54 68 65 6e 2c 20 |om R1+36..Then, | 00000670 6f 6e 20 72 65 63 65 69 70 74 20 6f 66 20 74 68 |on receipt of th| 00000680 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 73 74 61 6e |e following stan| 00000690 64 61 72 64 20 57 69 6d 70 20 6d 65 73 73 61 67 |dard Wimp messag| 000006a0 65 73 20 74 68 65 20 4c 6f 63 61 6c 20 74 61 73 |es the Local tas| 000006b0 6b 20 6d 75 73 74 0a 63 68 65 63 6b 20 74 6f 20 |k must.check to | 000006c0 73 65 65 20 69 66 20 74 68 65 20 6d 65 73 73 61 |see if the messa| 000006d0 67 65 20 72 65 66 65 72 73 20 74 6f 20 61 6e 20 |ge refers to an | 000006e0 69 63 6f 6e 20 63 6f 76 65 72 69 6e 67 20 74 68 |icon covering th| 000006f0 65 20 6f 62 6a 65 63 74 2c 20 61 6e 64 20 69 66 |e object, and if| 00000700 20 69 74 0a 69 73 2c 20 6d 6f 64 69 66 79 20 74 | it.is, modify t| 00000710 68 65 20 6d 65 73 73 61 67 65 20 62 6c 6f 63 6b |he message block| 00000720 20 61 6e 64 20 70 61 73 73 20 74 68 65 20 6d 65 | and pass the me| 00000730 73 73 61 67 65 20 74 6f 20 74 68 65 20 72 65 6d |ssage to the rem| 00000740 6f 74 65 20 74 61 73 6b 20 75 73 69 6e 67 0a 57 |ote task using.W| 00000750 69 6d 70 5f 53 65 6e 64 4d 65 73 73 61 67 65 2e |imp_SendMessage.| 00000760 0a 0a 44 6f 69 6e 67 20 74 68 69 73 20 65 66 66 |..Doing this eff| 00000770 65 63 74 69 76 65 6c 79 20 63 75 74 73 20 61 20 |ectively cuts a | 00000780 27 68 6f 6c 65 27 20 69 6e 20 74 68 65 20 77 69 |'hole' in the wi| 00000790 6e 64 6f 77 20 77 68 65 72 65 20 74 68 65 20 6f |ndow where the o| 000007a0 62 6a 65 63 74 20 69 73 2e 0a 4d 65 73 73 61 67 |bject is..Messag| 000007b0 65 73 20 69 6e 74 6f 20 74 68 61 74 20 72 65 67 |es into that reg| 000007c0 69 6f 6e 20 67 65 74 20 73 68 75 6e 74 65 64 20 |ion get shunted | 000007d0 74 6f 20 74 68 65 20 52 65 6d 6f 74 65 20 74 61 |to the Remote ta| 000007e0 73 6b 20 61 6e 64 20 61 72 65 20 69 67 6e 6f 72 |sk and are ignor| 000007f0 65 64 20 62 79 0a 74 68 65 20 4c 6f 63 61 6c 20 |ed by.the Local | 00000800 74 61 73 6b 2e 0a 0a 0a 44 65 74 61 69 6c 73 20 |task....Details | 00000810 6f 66 20 74 68 65 20 6d 6f 64 69 66 69 63 61 74 |of the modificat| 00000820 69 6f 6e 73 3a 0a 0a 0a 36 2e 20 42 75 74 74 6f |ions:...6. Butto| 00000830 6e 5f 43 6c 69 63 6b 20 0a 0a 78 70 6f 73 69 74 |n_Click ..xposit| 00000840 69 6f 6e 20 61 6e 64 20 79 70 6f 73 69 74 69 6f |ion and ypositio| 00000850 6e 20 73 68 6f 75 6c 64 20 62 65 20 6d 61 64 65 |n should be made| 00000860 20 72 65 6c 61 74 69 76 65 20 74 6f 20 74 68 65 | relative to the| 00000870 20 6f 62 6a 65 63 74 27 73 20 62 6f 74 74 6f 6d | object's bottom| 00000880 20 6c 65 66 74 2e 0a 57 69 6e 64 6f 77 20 68 61 | left..Window ha| 00000890 6e 64 6c 65 20 6d 75 73 74 20 62 65 20 73 65 74 |ndle must be set| 000008a0 20 74 6f 20 74 68 65 20 6f 6e 65 20 73 75 70 70 | to the one supp| 000008b0 6c 69 65 64 20 69 6e 20 4d 65 73 73 61 67 65 5f |lied in Message_| 000008c0 48 6f 6f 6b 4d 65 20 2e 20 49 63 6f 6e 0a 68 61 |HookMe . Icon.ha| 000008d0 6e 64 6c 65 20 6d 75 73 74 20 62 65 20 73 65 74 |ndle must be set| 000008e0 20 74 6f 20 74 68 65 20 73 70 65 63 69 61 6c 20 | to the special | 000008f0 76 61 6c 75 65 20 2d 26 34 31 34 33 35 30 20 28 |value -&414350 (| 00000900 2d 22 50 43 41 22 29 0a 0a 3f 3f 3f 20 4f 74 68 |-"PCA")..??? Oth| 00000910 65 72 20 6d 65 73 73 61 67 65 73 20 3f 3f 3f 0a |er messages ???.| 00000920 3f 3f 3f 20 57 68 69 63 68 20 74 6f 20 73 75 70 |??? Which to sup| 00000930 70 6f 72 74 20 61 6e 64 20 68 6f 77 20 74 6f 20 |port and how to | 00000940 6d 6f 64 69 66 79 20 74 68 65 6d 20 3f 3f 3f 0a |modify them ???.| 00000950 3f 3f 3f 20 41 64 76 69 73 65 20 75 73 20 69 66 |??? Advise us if| 00000960 20 79 6f 75 20 68 61 76 65 20 61 6e 79 20 73 75 | you have any su| 00000970 67 67 65 73 74 69 6f 6e 73 20 3f 3f 3f 0a 0a 4f |ggestions ???..O| 00000980 6e 20 72 65 63 65 69 70 74 20 6f 66 20 4d 65 73 |n receipt of Mes| 00000990 73 61 67 65 5f 4f 70 65 6e 57 69 6e 64 6f 77 20 |sage_OpenWindow | 000009a0 66 6f 72 20 74 68 65 20 77 69 6e 64 6f 77 20 69 |for the window i| 000009b0 6e 20 77 68 69 63 68 20 74 68 65 20 6f 62 6a 65 |n which the obje| 000009c0 63 74 20 72 65 73 69 64 65 73 0a 74 68 65 20 4c |ct resides.the L| 000009d0 6f 63 61 6c 20 74 61 73 6b 20 6d 75 73 74 20 73 |ocal task must s| 000009e0 65 6e 64 20 4d 65 73 73 61 67 65 5f 4f 62 6a 65 |end Message_Obje| 000009f0 63 74 50 6f 73 69 74 69 6f 6e 20 74 6f 20 74 68 |ctPosition to th| 00000a00 65 20 72 65 6d 6f 74 65 20 74 61 73 6b 20 73 6f |e remote task so| 00000a10 20 74 68 61 74 0a 69 74 20 63 61 6e 20 6f 70 65 | that.it can ope| 00000a20 6e 20 69 74 73 20 74 6f 6f 6c 62 61 72 20 61 74 |n its toolbar at| 00000a30 20 61 6e 20 61 70 70 72 6f 70 72 69 61 74 65 20 | an appropriate | 00000a40 70 6c 61 63 65 2e 20 41 6c 73 6f 2c 20 61 6e 79 |place. Also, any| 00000a50 20 61 63 74 69 6f 6e 73 20 77 68 69 63 68 0a 63 | actions which.c| 00000a60 61 75 73 65 20 74 68 65 20 70 6f 73 69 74 69 6f |ause the positio| 00000a70 6e 20 6f 72 20 73 69 7a 65 20 6f 66 20 74 68 65 |n or size of the| 00000a80 20 72 65 6d 6f 74 65 6c 79 20 6c 69 6e 6b 65 64 | remotely linked| 00000a90 20 6f 62 6a 65 63 74 20 74 6f 20 63 68 61 6e 67 | object to chang| 00000aa0 65 20 6d 75 73 74 0a 72 65 73 69 7a 65 20 61 6e |e must.resize an| 00000ab0 64 20 72 65 70 6f 73 69 74 69 6f 6e 20 74 68 65 |d reposition the| 00000ac0 20 69 63 6f 6e 20 63 72 65 61 74 65 64 20 61 62 | icon created ab| 00000ad0 6f 76 65 20 61 6e 64 20 73 65 6e 64 20 4d 65 73 |ove and send Mes| 00000ae0 73 61 67 65 5f 4f 62 6a 65 63 74 50 6f 73 69 74 |sage_ObjectPosit| 00000af0 69 6f 6e 0a 61 67 61 69 6e 2e 0a 0a 4f 6e 20 72 |ion.again...On r| 00000b00 65 63 65 69 70 74 20 6f 66 20 4d 65 73 73 61 67 |eceipt of Messag| 00000b10 65 5f 55 6e 68 6f 6f 6b 4d 65 20 69 74 20 6d 75 |e_UnhookMe it mu| 00000b20 73 74 20 64 65 6c 65 74 65 20 74 68 65 20 69 63 |st delete the ic| 00000b30 6f 6e 20 63 6f 76 65 72 69 6e 67 20 74 68 65 20 |on covering the | 00000b40 6f 62 6a 65 63 74 0a 61 6e 64 20 63 61 72 72 79 |object.and carry| 00000b50 20 6f 75 74 20 61 6e 79 20 6f 74 68 65 72 20 77 | out any other w| 00000b60 6f 72 6b 20 6e 65 63 65 73 73 61 72 79 20 74 6f |ork necessary to| 00000b70 20 72 65 73 74 6f 72 65 20 6e 6f 72 6d 61 6c 20 | restore normal | 00000b80 61 63 63 65 73 73 20 74 6f 20 74 68 65 0a 6f 62 |access to the.ob| 00000b90 6a 65 63 74 2e 20 54 68 65 20 73 61 6d 65 20 61 |ject. The same a| 00000ba0 63 74 69 6f 6e 20 73 68 6f 75 6c 64 20 6f 62 76 |ction should obv| 00000bb0 69 6f 75 73 6c 79 20 61 6c 73 6f 20 62 65 20 75 |iously also be u| 00000bc0 6e 64 65 72 74 61 6b 65 6e 20 69 66 20 74 68 65 |ndertaken if the| 00000bd0 20 6f 62 6a 65 63 74 20 69 73 0a 64 65 6c 65 74 | object is.delet| 00000be0 65 64 2e 20 0a 0a 52 65 6d 6f 74 65 20 54 61 73 |ed. ..Remote Tas| 00000bf0 6b 20 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a |k .-----------..| 00000c00 4f 6e 20 72 65 63 65 69 70 74 20 6f 66 20 4d 65 |On receipt of Me| 00000c10 73 73 61 67 65 5f 4f 62 6a 65 63 74 50 6f 73 69 |ssage_ObjectPosi| 00000c20 74 69 6f 6e 20 74 68 65 20 72 65 6d 6f 74 65 20 |tion the remote | 00000c30 74 61 73 6b 20 6d 75 73 74 20 6f 70 65 6e 20 69 |task must open i| 00000c40 74 73 20 74 6f 6f 6c 62 61 72 0a 61 74 20 61 6e |ts toolbar.at an| 00000c50 20 61 70 70 72 6f 70 72 69 61 74 65 20 70 6f 73 | appropriate pos| 00000c60 69 74 69 6f 6e 20 63 61 6c 63 75 6c 61 74 65 64 |ition calculated| 00000c70 20 66 72 6f 6d 20 74 68 65 20 64 61 74 61 20 63 | from the data c| 00000c80 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 0a |ontained in the.| 00000c90 6d 65 73 73 61 67 65 2e 0a 0a 54 68 69 73 20 74 |message...This t| 00000ca0 6f 6f 6c 62 61 72 20 6d 75 73 74 20 63 6f 6e 74 |oolbar must cont| 00000cb0 61 69 6e 20 61 74 20 6c 65 61 73 74 20 6f 6e 65 |ain at least one| 00000cc0 20 69 63 6f 6e 20 77 68 69 63 68 2c 20 77 68 65 | icon which, whe| 00000cd0 6e 20 63 6c 69 63 6b 65 64 20 6f 6e 2c 20 73 65 |n clicked on, se| 00000ce0 6e 64 73 0a 4d 65 73 73 61 67 65 5f 55 6e 68 6f |nds.Message_Unho| 00000cf0 6f 6b 4d 65 20 74 6f 20 74 68 65 20 6c 6f 63 61 |okMe to the loca| 00000d00 6c 20 74 61 73 6b 2c 20 72 65 6d 6f 76 65 73 20 |l task, removes | 00000d10 61 6e 79 20 72 65 66 65 72 65 6e 63 65 73 20 69 |any references i| 00000d20 74 20 68 61 73 20 74 6f 20 74 68 65 0a 6f 62 6a |t has to the.obj| 00000d30 65 63 74 20 61 6e 64 20 63 6c 6f 73 65 73 20 74 |ect and closes t| 00000d40 68 65 20 74 6f 6f 6c 62 61 72 2e 20 4d 6f 64 65 |he toolbar. Mode| 00000d50 6c 20 74 68 65 20 61 70 70 65 61 72 61 6e 63 65 |l the appearance| 00000d60 20 6f 66 20 74 68 69 73 20 69 63 6f 6e 20 6f 6e | of this icon on| 00000d70 20 74 68 65 0a 77 69 6e 64 6f 77 20 63 6c 6f 73 | the.window clos| 00000d80 65 20 69 63 6f 6e 20 61 6e 64 20 70 6f 73 69 74 |e icon and posit| 00000d90 69 6f 6e 20 74 68 65 20 69 63 6f 6e 20 61 74 20 |ion the icon at | 00000da0 74 68 65 20 66 61 72 20 6c 65 66 74 20 68 6f 72 |the far left hor| 00000db0 69 7a 6f 6e 74 61 6c 20 74 6f 6f 6c 62 61 72 73 |izontal toolbars| 00000dc0 0a 6f 72 20 61 74 20 74 68 65 20 74 6f 70 20 6c |.or at the top l| 00000dd0 65 66 74 20 6f 66 20 76 65 72 74 69 63 61 6c 20 |eft of vertical | 00000de0 74 6f 6f 6c 62 61 72 73 2e 0a 0a 4f 6e 20 72 65 |toolbars...On re| 00000df0 63 65 69 70 74 20 6f 66 20 4d 65 73 73 61 67 65 |ceipt of Message| 00000e00 5f 44 6f 20 2f 20 4d 65 73 73 61 67 65 5f 43 68 |_Do / Message_Ch| 00000e10 61 6e 67 65 64 20 74 68 65 20 72 65 6d 6f 74 65 |anged the remote| 00000e20 20 74 61 73 6b 20 6d 75 73 74 20 63 68 65 63 6b | task must check| 00000e30 20 74 6f 20 73 65 65 0a 69 66 20 49 6e 2d 70 6c | to see.if In-pl| 00000e40 61 63 65 20 65 64 69 74 69 6e 67 20 69 73 20 6f |ace editing is o| 00000e50 6e 20 28 62 34 20 6f 66 20 66 6c 61 67 73 20 69 |n (b4 of flags i| 00000e60 6e 20 4d 65 73 73 61 67 65 5f 44 6f 29 20 61 6e |n Message_Do) an| 00000e70 64 2c 20 69 66 20 73 6f 2c 20 73 65 6e 64 0a 4d |d, if so, send.M| 00000e80 65 73 73 61 67 65 5f 48 6f 6f 6b 4d 65 20 72 61 |essage_HookMe ra| 00000e90 74 68 65 72 20 74 68 61 6e 20 6f 70 65 6e 69 6e |ther than openin| 00000ea0 67 20 69 74 73 20 6f 77 6e 20 77 69 6e 64 6f 77 |g its own window| 00000eb0 20 6f 6e 74 6f 20 74 68 65 20 6f 62 6a 65 63 74 | onto the object| 00000ec0 2e 0a 0a 4f 6e 20 72 65 63 65 69 70 74 20 6f 66 |...On receipt of| 00000ed0 20 42 75 74 74 6f 6e 43 6c 69 63 6b 20 6d 65 73 | ButtonClick mes| 00000ee0 73 61 67 65 73 20 28 61 70 70 61 72 65 6e 74 6c |sages (apparentl| 00000ef0 79 29 20 74 6f 20 69 74 73 20 6d 61 69 6e 20 77 |y) to its main w| 00000f00 69 6e 64 6f 77 20 74 68 65 0a 72 65 6d 6f 74 65 |indow the.remote| 00000f10 20 74 61 73 6b 20 73 68 6f 75 6c 64 20 63 68 65 | task should che| 00000f20 63 6b 20 74 68 65 20 69 63 6f 6e 20 68 61 6e 64 |ck the icon hand| 00000f30 6c 65 20 61 6e 64 20 69 66 20 69 74 20 69 73 20 |le and if it is | 00000f40 65 71 75 61 6c 20 74 6f 20 2d 26 34 31 34 33 35 |equal to -&41435| 00000f50 30 0a 74 72 65 61 74 20 74 68 65 20 63 6f 6f 72 |0.treat the coor| 00000f60 64 69 6e 61 74 65 73 20 70 61 73 73 65 64 20 69 |dinates passed i| 00000f70 6e 20 74 68 65 20 42 75 74 74 6f 6e 43 6c 69 63 |n the ButtonClic| 00000f80 6b 20 62 6c 6f 63 6b 20 61 73 20 27 63 6f 72 72 |k block as 'corr| 00000f90 65 63 74 65 64 27 20 66 6f 72 20 74 68 65 0a 70 |ected' for the.p| 00000fa0 6f 73 69 74 69 6f 6e 20 6f 66 20 69 74 73 20 77 |osition of its w| 00000fb0 69 6e 64 6f 77 2c 20 73 63 72 6f 6c 6c 62 61 72 |indow, scrollbar| 00000fc0 73 20 65 74 63 20 61 73 20 74 68 65 20 63 6f 6f |s etc as the coo| 00000fd0 72 64 69 6e 61 74 65 73 20 61 72 65 20 61 6c 72 |rdinates are alr| 00000fe0 65 61 64 79 0a 72 65 6c 61 74 69 76 65 20 74 6f |eady.relative to| 00000ff0 20 74 68 65 20 6f 62 6a 65 63 74 73 20 62 6f 74 | the objects bot| 00001000 74 6f 6d 20 6c 65 66 74 2e 20 4d 6f 64 69 66 79 |tom left. Modify| 00001010 20 74 68 65 20 6f 62 6a 65 63 74 20 64 61 74 61 | the object data| 00001020 20 61 73 20 61 70 70 72 6f 70 72 69 61 74 65 0a | as appropriate.| 00001030 61 6e 64 20 67 65 6e 65 72 61 74 65 20 4d 65 73 |and generate Mes| 00001040 73 61 67 65 5f 55 70 64 61 74 65 41 72 65 61 20 |sage_UpdateArea | 00001050 61 73 20 77 69 74 68 20 73 74 61 6e 64 61 72 64 |as with standard| 00001060 20 50 43 41 20 70 72 61 63 74 69 63 65 2e 0a 0a | PCA practice...| 00001070 59 6f 75 20 73 68 6f 75 6c 64 20 62 65 20 61 62 |You should be ab| 00001080 6c 65 20 74 6f 20 75 73 65 20 74 68 65 20 73 61 |le to use the sa| 00001090 6d 65 20 63 6f 64 65 20 66 6f 72 20 72 65 6d 6f |me code for remo| 000010a0 74 65 20 61 6e 64 20 6c 6f 63 61 6c 20 61 63 74 |te and local act| 000010b0 69 6f 6e 73 20 6a 75 73 74 20 64 6f 0a 6e 6f 74 |ions just do.not| 000010c0 20 63 6f 6e 76 65 72 74 20 70 6f 69 6e 74 65 72 | convert pointer| 000010d0 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 74 6f 20 | coordinates to | 000010e0 62 65 20 72 65 6c 61 74 69 76 65 20 74 6f 20 79 |be relative to y| 000010f0 6f 75 72 20 6d 61 69 6e 20 77 69 6e 64 6f 77 20 |our main window | 00001100 61 6e 64 20 64 6f 0a 6e 6f 74 20 72 65 64 72 61 |and do.not redra| 00001110 77 20 79 6f 75 72 20 6d 61 69 6e 20 77 69 6e 64 |w your main wind| 00001120 6f 77 20 28 69 74 20 73 68 6f 75 6c 64 20 62 65 |ow (it should be| 00001130 20 63 6c 6f 73 65 64 20 61 6e 79 77 61 79 29 2e | closed anyway).| 00001140 0a 0a 4e 6f 74 65 3a 20 46 6f 72 20 27 70 61 69 |..Note: For 'pai| 00001150 6e 74 69 6e 67 27 20 6f 72 20 27 64 72 61 67 67 |nting' or 'dragg| 00001160 69 6e 67 27 20 74 79 70 65 20 61 63 74 69 6f 6e |ing' type action| 00001170 73 20 69 74 20 69 73 20 73 6f 6d 65 74 69 6d 65 |s it is sometime| 00001180 73 20 77 69 73 65 20 74 6f 20 73 65 74 0a 74 68 |s wise to set.th| 00001190 65 20 72 65 6d 6f 74 65 20 62 75 74 74 6f 6e 20 |e remote button | 000011a0 74 79 70 65 20 28 69 6e 20 4d 65 73 73 61 67 65 |type (in Message| 000011b0 5f 48 6f 6f 6b 4d 65 29 20 74 6f 20 43 6c 69 63 |_HookMe) to Clic| 000011c0 6b 20 61 6e 64 20 74 6f 20 64 6f 20 61 20 74 69 |k and to do a ti| 000011d0 67 68 74 0a 72 65 70 65 61 74 69 6e 67 20 27 6c |ght.repeating 'l| 000011e0 6f 6f 70 27 20 61 72 6f 75 6e 64 20 79 6f 75 72 |oop' around your| 000011f0 20 72 65 64 72 61 77 2f 70 61 69 6e 74 20 63 6f | redraw/paint co| 00001200 64 65 2c 20 72 65 61 64 69 6e 67 20 74 68 65 20 |de, reading the | 00001210 6d 6f 75 73 65 20 70 6f 69 6e 74 65 72 0a 69 6e |mouse pointer.in| 00001220 66 6f 72 6d 61 74 69 6f 6e 20 64 69 72 65 63 74 |formation direct| 00001230 6c 79 20 75 6e 74 69 6c 20 74 68 65 20 62 75 74 |ly until the but| 00001240 74 6f 6e 20 63 6c 69 63 6b 20 73 74 6f 70 73 2e |ton click stops.| 00001250 20 49 6e 20 74 68 69 73 20 73 69 74 75 61 74 69 | In this situati| 00001260 6f 6e 20 74 68 65 0a 52 65 6d 6f 74 65 20 74 61 |on the.Remote ta| 00001270 73 6b 20 73 68 6f 75 6c 64 20 6d 61 6b 65 20 75 |sk should make u| 00001280 73 65 20 6f 66 20 74 68 65 20 69 6e 66 6f 72 6d |se of the inform| 00001290 61 74 69 6f 6e 20 69 6e 20 74 68 65 20 6c 61 73 |ation in the las| 000012a0 74 0a 4d 65 73 73 61 67 65 5f 4f 62 6a 65 63 74 |t.Message_Object| 000012b0 50 6f 73 69 74 69 6f 6e 20 69 74 20 72 65 63 65 |Position it rece| 000012c0 69 65 76 65 64 20 74 6f 20 77 6f 72 6b 20 6f 75 |ieved to work ou| 000012d0 74 20 74 68 65 20 76 69 73 69 62 6c 65 20 73 69 |t the visible si| 000012e0 7a 65 20 61 6e 64 0a 70 6f 73 69 74 69 6f 6e 20 |ze and.position | 000012f0 6f 66 20 74 68 65 20 6f 62 6a 65 63 74 20 69 6e |of the object in| 00001300 20 74 68 65 20 4c 6f 63 61 6c 20 74 61 73 6b 27 | the Local task'| 00001310 73 20 77 69 6e 64 6f 77 20 28 73 65 65 20 74 68 |s window (see th| 00001320 65 20 21 53 70 61 69 6e 74 20 65 78 61 6d 70 6c |e !Spaint exampl| 00001330 65 29 2e 20 |e). | 00001334
.