Home » Archimedes archive » Acorn Computing » 1994 08 subscription disc.adf » 9408s » Shareware/Event/Documents/!EShellDoc/!RunImage/Chapter14/Text

Shareware/Event/Documents/!EShellDoc/!RunImage/Chapter14/Text

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 » 1994 08 subscription disc.adf » 9408s
Filename: Shareware/Event/Documents/!EShellDoc/!RunImage/Chapter14/Text
Read OK:
File size: 148C bytes
Load address: 0000
Exec address: 0000
File contents
����R��7A�������5� aZ��User Redraws�((�
�
((�

��TR��'3��h7� aZ
�
(�
�
�
)�
)T�`R��w������h7� aZSimple Cases�)�
�
�
�
�

`�0RD��g���h7� aZ
�
0
��0'��6�� "� aZBy �Simple Cases� I mean text, lines, arcs, filled shapes etc. In other words anything that it is easy �
�(������� "�aZfor the program to redraw quickly - this excludes maps of the world and any kind of random �
���������� "�aZdisplay. For these cases it is much faster to redirect the screen output into a sprite (see the next �-0R �g^��G��� "�aZsection).
0-(R'&��U�� "� aZ
(
������� "� aZUsing the example application you created earlier (or create a new one using AppBuild) add the �-LR(/������ "�aZfollowing line to PROCSetUp_Windows:   
L�4Rg}��G��� "� aZ
�
�
4�\R@�L��t��p��WaZPROCshell_AttachUserRedraw(mainw%,�_redraw�)
�
\-(RG��'E�� "� aZ
(-LRȰ����� "� aZand add the following FN definition:
L�4Rǥ����� "� aZ
�
�
4-@R�xWu��g���p��WaZDEF FN_redraw(blk%,x0%,y0%)
@-\R��wF���m��p��WaZREM set colour for circle - colours are numbered 0-15!
\-<R0�����>��p��WaZREM draw the circle..
<-<R�����p��WaZSYS �Wimp_SetColour�,11
<-DR��׹����p��WaZCIRCLE FILL x0%+200,y0%-200,120
D-@R`a�������p��WaZREM set colour for text...
@-\R��\��'���p��WaZSYS �Wimp_SetColour�,8 :REM colours are numbered 0-15!
\-XRp|7-��GT��p��WaZMOVE x0%+80,y0%-340:PRINT �This is an example of�
X-`R� W���g%��p��WaZMOVE x0%+40,y0%-380:PRINT �user drawn text and graphics�
`-TR�Mw������p��WaZMOVE x0%+95,y0%-420:PRINT �in a desktop window�
T�0R�.�������p��W}�=0
�
0-(R�i��ǘ�� "� }�
(
Txi�1���`�� "� }�The routine that attaches the redraw event also T
X��g���G(�� "�}�alters the �flags� of the window so that the �Auto X
X@�'���� "�}�redraw� bit is set up correctly. When you run the X
Px`��Ƿ�� "�}�application and open the main window now, a P
X��P����� "�}�circle and some text will appear in the window. If X
X��g��GG�� "�}�another window is moved over this one, note that X-HRTj'��� "�}�the window is correctly redrawn.
H-(R����� "� }�
(
P(J�o������ "� }�The parameters x0% and y0% for the redraw P
\\�g7��Gf�� "�}�routine are the coordinates of the top left corner of \-XRh�'���.�� "�}�the window. Note that y coordinates are negative! 
X
L������� "� }�The blk% parameter contains all of the L
T���������� "�}�information returned by the wimp when a redraw T
THWgV��G��� "�}�request is made, and could be useful for more T-@RX�'��M�� "�}�advanced redraw handling.
@-(R������ "� }�
(
��M�X�և� "� aZTry experimenting with other drawing commands and putting text in different places in the window �-DR��� �O� "�aZto get the hang of all this.
D�4Rv��V� "� aZ
**4�`RP�Ƙ���h7� aZDrawing Into A Sprite*�
�
�


�
`-(R�[�� "� aZ
(
�\*�#�vR� "� aZWith a more complicated or random display you need to set up a sprite to draw into. The example �-PR(8V��6� "�aZapplication !Redraw2 shows how to do this.
P-(R���� "� aZ
(
���z��� "� aZNote in this case that the display within the window is animated by calling the plotting routine at �
�H&�B�vq� "�aZevery null event received. There also has to be two redrawing routines, one called when you want �
x�V
�69� "�aZthe display redrawn and one for when the wimp wants it  redrawn (hence the call to x��R,I��� "�aZPROCshell_AttachUserRedraw). In both cases it is necessary just to replot the sprite. �
�


�
�-DRx��<�@�� aZ�
x@�
DyV4���
�DB�l��1<��)��
�
�
User Redrawsws�

DyV4�l�
�DB�l��<��)��
�
�
User Redrawsws�

DyV4��!	�`B��3��b�"�!	!	The more complicated example from !Redraw2.!	
`yV4
00000000  d8 12 00 00 01 00 00 00  00 00 00 00 06 08 00 00  |................|
00000010  00 08 00 00 01 10 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 10 00 00 02 18 00 00  10 01 00 00 00 00 00 00  |................|
00000030  01 be 0c 00 00 00 00 00  00 18 00 00 ad 84 00 00  |................|
00000040  52 ea d4 01 37 41 fe ff  87 87 fe ff dc 35 00 f2  |R...7A.......5..|
00000050  15 00 00 00 20 03 00 00  61 5a 07 00 07 05 05 05  |.... ...aZ......|
00000060  01 be 0c 00 01 be 0c 00  00 00 00 00 55 73 65 72  |............User|
00000070  20 52 65 64 72 61 77 73  08 08 08 05 01 be 0c 00  | Redraws........|
00000080  00 00 00 00 07 05 05 05  01 28 0b 00 01 28 0b 00  |.........(...(..|
00000090  00 00 00 00 07 05 05 05  02 d5 0a 00 02 d5 0a 00  |................|
000000a0  01 28 0b 00 00 00 00 00  08 00 00 00 01 28 0b 00  |.(...........(..|
000000b0  02 d5 0a 00 00 00 00 00  0d 00 00 00 00 84 00 00  |................|
000000c0  ad 54 00 00 52 00 00 00  d7 ec fd ff 27 33 fe ff  |.T..R.......'3..|
000000d0  68 37 00 f2 15 00 00 00  20 03 00 00 61 5a 07 00  |h7...... ...aZ..|
000000e0  0d 08 05 05 02 d5 0a 00  00 00 00 00 07 28 0b 00  |.............(..|
000000f0  07 da 0a 00 07 da 0a 00  00 00 00 00 07 d5 0a 00  |................|
00000100  02 29 0b 00 07 da 0a 00  02 29 0b 00 00 00 00 00  |.).......)......|
00000110  00 54 00 00 ad 60 00 00  52 b0 b1 01 77 98 fd ff  |.T...`..R...w...|
00000120  c7 de fd ff 68 37 00 f2  15 00 00 00 20 03 00 00  |....h7...... ...|
00000130  61 5a 07 00 53 69 6d 70  6c 65 20 43 61 73 65 73  |aZ..Simple Cases|
00000140  08 91 07 00 02 29 0b 00  07 da 0a 00 00 00 00 00  |.....)..........|
00000150  08 da 0a 00 07 da 0a 00  00 00 00 00 07 00 00 00  |................|
00000160  02 d5 0a 00 02 d5 0a 00  00 00 00 00 0d 00 00 00  |................|
00000170  00 60 00 00 ad 30 00 00  52 00 00 00 17 44 fd ff  |.`...0..R....D..|
00000180  67 8a fd ff 68 37 00 f2  15 00 00 00 20 03 00 00  |g...h7...... ...|
00000190  61 5a 07 00 0d 08 07 00  02 d5 0a 00 00 00 00 00  |aZ..............|
000001a0  00 30 00 00 0d 8c 00 00  10 ec 30 07 27 07 fd ff  |.0........0.'...|
000001b0  07 36 fd ff 20 22 00 f2  15 00 00 00 20 03 00 00  |.6.. "...... ...|
000001c0  61 5a 07 00 42 79 20 90  53 69 6d 70 6c 65 20 43  |aZ..By .Simple C|
000001d0  61 73 65 73 91 20 49 20  6d 65 61 6e 20 74 65 78  |ases. I mean tex|
000001e0  74 2c 20 6c 69 6e 65 73  2c 20 61 72 63 73 2c 20  |t, lines, arcs, |
000001f0  66 69 6c 6c 65 64 20 73  68 61 70 65 73 20 65 74  |filled shapes et|
00000200  63 2e 20 49 6e 20 6f 74  68 65 72 20 77 6f 72 64  |c. In other word|
00000210  73 20 61 6e 79 74 68 69  6e 67 20 74 68 61 74 20  |s anything that |
00000220  69 74 20 69 73 20 65 61  73 79 20 00 00 8c 00 00  |it is easy .....|
00000230  0d 80 00 00 10 28 c2 06  e7 ce fc ff c7 fd fc ff  |.....(..........|
00000240  20 22 00 f0 15 00 00 00  00 00 00 00 61 5a 07 00  | "..........aZ..|
00000250  66 6f 72 20 74 68 65 20  70 72 6f 67 72 61 6d 20  |for the program |
00000260  74 6f 20 72 65 64 72 61  77 20 71 75 69 63 6b 6c  |to redraw quickl|
00000270  79 20 2d 20 74 68 69 73  20 65 78 63 6c 75 64 65  |y - this exclude|
00000280  73 20 6d 61 70 73 20 6f  66 20 74 68 65 20 77 6f  |s maps of the wo|
00000290  72 6c 64 20 61 6e 64 20  61 6e 79 20 6b 69 6e 64  |rld and any kind|
000002a0  20 6f 66 20 72 61 6e 64  6f 6d 20 00 00 80 00 00  | of random .....|
000002b0  0d 8c 00 00 10 d4 eb 06  a7 96 fc ff 87 c5 fc ff  |................|
000002c0  20 22 00 f0 15 00 00 00  00 00 00 00 61 5a 07 00  | "..........aZ..|
000002d0  64 69 73 70 6c 61 79 2e  20 46 6f 72 20 74 68 65  |display. For the|
000002e0  73 65 20 63 61 73 65 73  20 69 74 20 69 73 20 6d  |se cases it is m|
000002f0  75 63 68 20 66 61 73 74  65 72 20 74 6f 20 72 65  |uch faster to re|
00000300  64 69 72 65 63 74 20 74  68 65 20 73 63 72 65 65  |direct the scree|
00000310  6e 20 6f 75 74 70 75 74  20 69 6e 74 6f 20 61 20  |n output into a |
00000320  73 70 72 69 74 65 20 28  73 65 65 20 74 68 65 20  |sprite (see the |
00000330  6e 65 78 74 20 00 00 00  00 8c 00 00 2d 30 00 00  |next .......-0..|
00000340  52 20 a0 00 67 5e fc ff  47 8d fc ff 20 22 00 f0  |R ..g^..G... "..|
00000350  15 00 00 00 00 00 00 00  61 5a 07 00 73 65 63 74  |........aZ..sect|
00000360  69 6f 6e 29 2e 0d 00 00  00 30 00 00 2d 28 00 00  |ion).....0..-(..|
00000370  52 00 00 00 27 26 fc ff  07 55 fc ff 20 22 00 f2  |R...'&...U.. "..|
00000380  15 00 00 00 20 03 00 00  61 5a 07 00 0d 00 00 00  |.... ...aZ......|
00000390  00 28 00 00 0d 84 00 00  10 c0 05 07 e7 ed fb ff  |.(..............|
000003a0  c7 1c fc ff 20 22 00 f2  15 00 00 00 20 03 00 00  |.... "...... ...|
000003b0  61 5a 07 00 55 73 69 6e  67 20 74 68 65 20 65 78  |aZ..Using the ex|
000003c0  61 6d 70 6c 65 20 61 70  70 6c 69 63 61 74 69 6f  |ample applicatio|
000003d0  6e 20 79 6f 75 20 63 72  65 61 74 65 64 20 65 61  |n you created ea|
000003e0  72 6c 69 65 72 20 28 6f  72 20 63 72 65 61 74 65  |rlier (or create|
000003f0  20 61 20 6e 65 77 20 6f  6e 65 20 75 73 69 6e 67  | a new one using|
00000400  20 41 70 70 42 75 69 6c  64 29 20 61 64 64 20 74  | AppBuild) add t|
00000410  68 65 20 00 00 84 00 00  2d 4c 00 00 52 28 2f 03  |he .....-L..R(/.|
00000420  a7 b5 fb ff 87 e4 fb ff  20 22 00 f0 15 00 00 00  |........ "......|
00000430  00 00 00 00 61 5a 07 00  66 6f 6c 6c 6f 77 69 6e  |....aZ..followin|
00000440  67 20 6c 69 6e 65 20 74  6f 20 50 52 4f 43 53 65  |g line to PROCSe|
00000450  74 55 70 5f 57 69 6e 64  6f 77 73 3a 20 20 20 0d  |tUp_Windows:   .|
00000460  00 4c 00 00 ad 34 00 00  52 00 00 00 67 7d fb ff  |.L...4..R...g}..|
00000470  47 ac fb ff 20 22 00 f2  15 00 00 00 20 03 00 00  |G... "...... ...|
00000480  61 5a 07 00 0d 07 00 00  1c d6 0a 00 1c d6 0a 00  |aZ..............|
00000490  00 00 00 00 00 34 00 00  ad 5c 00 00 52 40 07 04  |.....4...\..R@..|
000004a0  f7 4c fb ff 07 74 fb ff  70 1a 00 f2 15 00 00 00  |.L...t..p.......|
000004b0  80 57 00 00 61 5a 07 00  50 52 4f 43 73 68 65 6c  |.W..aZ..PROCshel|
000004c0  6c 5f 41 74 74 61 63 68  55 73 65 72 52 65 64 72  |l_AttachUserRedr|
000004d0  61 77 28 6d 61 69 6e 77  25 2c 94 5f 72 65 64 72  |aw(mainw%,._redr|
000004e0  61 77 95 29 0d 08 00 00  1c d6 0a 00 00 00 00 00  |aw.)............|
000004f0  00 5c 00 00 2d 28 00 00  52 00 00 00 47 16 fb ff  |.\..-(..R...G...|
00000500  27 45 fb ff 20 22 00 f2  15 00 00 00 20 03 00 00  |'E.. "...... ...|
00000510  61 5a 07 00 0d 00 00 00  00 28 00 00 2d 4c 00 00  |aZ.......(..-L..|
00000520  52 c8 b0 02 07 de fa ff  e7 0c fb ff 20 22 00 f2  |R........... "..|
00000530  15 00 00 00 20 03 00 00  61 5a 07 00 61 6e 64 20  |.... ...aZ..and |
00000540  61 64 64 20 74 68 65 20  66 6f 6c 6c 6f 77 69 6e  |add the followin|
00000550  67 20 46 4e 20 64 65 66  69 6e 69 74 69 6f 6e 3a  |g FN definition:|
00000560  0d 00 00 00 00 4c 00 00  ad 34 00 00 52 00 00 00  |.....L...4..R...|
00000570  c7 a5 fa ff a7 d4 fa ff  20 22 00 f2 15 00 00 00  |........ "......|
00000580  20 03 00 00 61 5a 07 00  0d 07 00 00 1c d7 0a 00  | ...aZ..........|
00000590  1c d7 0a 00 00 00 00 00  00 34 00 00 2d 40 00 00  |.........4..-@..|
000005a0  52 d0 78 02 57 75 fa ff  67 9c fa ff 70 1a 00 f2  |R.x.Wu..g...p...|
000005b0  15 00 00 00 80 57 00 00  61 5a 07 00 44 45 46 20  |.....W..aZ..DEF |
000005c0  46 4e 5f 72 65 64 72 61  77 28 62 6c 6b 25 2c 78  |FN_redraw(blk%,x|
000005d0  30 25 2c 79 30 25 29 0d  00 40 00 00 2d 5c 00 00  |0%,y0%)..@..-\..|
000005e0  52 a0 f1 04 77 46 fa ff  87 6d fa ff 70 1a 00 f2  |R...wF...m..p...|
000005f0  15 00 00 00 80 57 00 00  61 5a 07 00 52 45 4d 20  |.....W..aZ..REM |
00000600  73 65 74 20 63 6f 6c 6f  75 72 20 66 6f 72 20 63  |set colour for c|
00000610  69 72 63 6c 65 20 2d 20  63 6f 6c 6f 75 72 73 20  |ircle - colours |
00000620  61 72 65 20 6e 75 6d 62  65 72 65 64 20 30 2d 31  |are numbered 0-1|
00000630  35 21 0d 00 00 5c 00 00  2d 3c 00 00 52 30 ec 01  |5!...\..-<..R0..|
00000640  97 17 fa ff a7 3e fa ff  70 1a 00 f2 15 00 00 00  |.....>..p.......|
00000650  80 57 00 00 61 5a 07 00  52 45 4d 20 64 72 61 77  |.W..aZ..REM draw|
00000660  20 74 68 65 20 63 69 72  63 6c 65 2e 2e 0d 00 00  | the circle.....|
00000670  00 3c 00 00 2d 3c 00 00  52 10 1b 02 b7 e8 f9 ff  |.<..-<..R.......|
00000680  c7 0f fa ff 70 1a 00 f2  15 00 00 00 80 57 00 00  |....p........W..|
00000690  61 5a 07 00 53 59 53 20  94 57 69 6d 70 5f 53 65  |aZ..SYS .Wimp_Se|
000006a0  74 43 6f 6c 6f 75 72 95  2c 31 31 0d 00 3c 00 00  |tColour.,11..<..|
000006b0  2d 44 00 00 52 90 d6 02  d7 b9 f9 ff e7 e0 f9 ff  |-D..R...........|
000006c0  70 1a 00 f2 15 00 00 00  80 57 00 00 61 5a 07 00  |p........W..aZ..|
000006d0  43 49 52 43 4c 45 20 46  49 4c 4c 20 78 30 25 2b  |CIRCLE FILL x0%+|
000006e0  32 30 30 2c 79 30 25 2d  32 30 30 2c 31 32 30 0d  |200,y0%-200,120.|
000006f0  00 44 00 00 2d 40 00 00  52 60 61 02 f7 8a f9 ff  |.D..-@..R`a.....|
00000700  07 b2 f9 ff 70 1a 00 f2  15 00 00 00 80 57 00 00  |....p........W..|
00000710  61 5a 07 00 52 45 4d 20  73 65 74 20 63 6f 6c 6f  |aZ..REM set colo|
00000720  75 72 20 66 6f 72 20 74  65 78 74 2e 2e 2e 0d 00  |ur for text.....|
00000730  00 40 00 00 2d 5c 00 00  52 a0 f1 04 17 5c f9 ff  |.@..-\..R....\..|
00000740  27 83 f9 ff 70 1a 00 f2  15 00 00 00 80 57 00 00  |'...p........W..|
00000750  61 5a 07 00 53 59 53 20  94 57 69 6d 70 5f 53 65  |aZ..SYS .Wimp_Se|
00000760  74 43 6f 6c 6f 75 72 95  2c 38 20 3a 52 45 4d 20  |tColour.,8 :REM |
00000770  63 6f 6c 6f 75 72 73 20  61 72 65 20 6e 75 6d 62  |colours are numb|
00000780  65 72 65 64 20 30 2d 31  35 21 0d 00 00 5c 00 00  |ered 0-15!...\..|
00000790  2d 58 00 00 52 70 7c 04  37 2d f9 ff 47 54 f9 ff  |-X..Rp|.7-..GT..|
000007a0  70 1a 00 f2 15 00 00 00  80 57 00 00 61 5a 07 00  |p........W..aZ..|
000007b0  4d 4f 56 45 20 78 30 25  2b 38 30 2c 79 30 25 2d  |MOVE x0%+80,y0%-|
000007c0  33 34 30 3a 50 52 49 4e  54 20 94 54 68 69 73 20  |340:PRINT .This |
000007d0  69 73 20 61 6e 20 65 78  61 6d 70 6c 65 20 6f 66  |is an example of|
000007e0  95 0d 00 00 00 58 00 00  2d 60 00 00 52 80 20 05  |.....X..-`..R. .|
000007f0  57 fe f8 ff 67 25 f9 ff  70 1a 00 f2 15 00 00 00  |W...g%..p.......|
00000800  80 57 00 00 61 5a 07 00  4d 4f 56 45 20 78 30 25  |.W..aZ..MOVE x0%|
00000810  2b 34 30 2c 79 30 25 2d  33 38 30 3a 50 52 49 4e  |+40,y0%-380:PRIN|
00000820  54 20 94 75 73 65 72 20  64 72 61 77 6e 20 74 65  |T .user drawn te|
00000830  78 74 20 61 6e 64 20 67  72 61 70 68 69 63 73 95  |xt and graphics.|
00000840  0d 00 00 00 00 60 00 00  2d 54 00 00 52 90 4d 04  |.....`..-T..R.M.|
00000850  77 cf f8 ff 87 f6 f8 ff  70 1a 00 f2 15 00 00 00  |w.......p.......|
00000860  80 57 00 00 61 5a 07 00  4d 4f 56 45 20 78 30 25  |.W..aZ..MOVE x0%|
00000870  2b 39 35 2c 79 30 25 2d  34 32 30 3a 50 52 49 4e  |+95,y0%-420:PRIN|
00000880  54 20 94 69 6e 20 61 20  64 65 73 6b 74 6f 70 20  |T .in a desktop |
00000890  77 69 6e 64 6f 77 95 0d  00 54 00 00 ad 30 00 00  |window...T...0..|
000008a0  52 e0 2e 00 97 a0 f8 ff  a7 c7 f8 ff 70 1a 00 f2  |R...........p...|
000008b0  15 00 00 00 80 57 00 00  7d c3 03 00 3d 30 0d 08  |.....W..}...=0..|
000008c0  1c d7 0a 00 00 00 00 00  00 30 00 00 2d 28 00 00  |.........0..-(..|
000008d0  52 00 00 00 e7 69 f8 ff  c7 98 f8 ff 20 22 00 f2  |R....i...... "..|
000008e0  15 00 00 00 20 03 00 00  7d c3 03 00 0d 00 00 00  |.... ...}.......|
000008f0  00 28 00 00 0d 54 00 00  10 78 69 03 a7 31 f8 ff  |.(...T...xi..1..|
00000900  87 60 f8 ff 20 22 00 f2  15 00 00 00 20 03 00 00  |.`.. "...... ...|
00000910  7d c3 03 00 54 68 65 20  72 6f 75 74 69 6e 65 20  |}...The routine |
00000920  74 68 61 74 20 61 74 74  61 63 68 65 73 20 74 68  |that attaches th|
00000930  65 20 72 65 64 72 61 77  20 65 76 65 6e 74 20 61  |e redraw event a|
00000940  6c 73 6f 20 00 54 00 00  0d 58 00 00 10 9c 90 03  |lso .T...X......|
00000950  67 f9 f7 ff 47 28 f8 ff  20 22 00 f0 15 00 00 00  |g...G(.. "......|
00000960  00 00 00 00 7d c3 03 00  61 6c 74 65 72 73 20 74  |....}...alters t|
00000970  68 65 20 90 66 6c 61 67  73 91 20 6f 66 20 74 68  |he .flags. of th|
00000980  65 20 77 69 6e 64 6f 77  20 73 6f 20 74 68 61 74  |e window so that|
00000990  20 74 68 65 20 90 41 75  74 6f 20 00 00 58 00 00  | the .Auto ..X..|
000009a0  0d 58 00 00 10 40 8f 03  27 c1 f7 ff 07 f0 f7 ff  |.X...@..'.......|
000009b0  20 22 00 f0 15 00 00 00  00 00 00 00 7d c3 03 00  | "..........}...|
000009c0  72 65 64 72 61 77 91 20  62 69 74 20 69 73 20 73  |redraw. bit is s|
000009d0  65 74 20 75 70 20 63 6f  72 72 65 63 74 6c 79 2e  |et up correctly.|
000009e0  20 57 68 65 6e 20 79 6f  75 20 72 75 6e 20 74 68  | When you run th|
000009f0  65 20 00 00 00 58 00 00  0d 50 00 00 10 78 60 03  |e ...X...P...x`.|
00000a00  e7 88 f7 ff c7 b7 f7 ff  20 22 00 f0 15 00 00 00  |........ "......|
00000a10  00 00 00 00 7d c3 03 00  61 70 70 6c 69 63 61 74  |....}...applicat|
00000a20  69 6f 6e 20 61 6e 64 20  6f 70 65 6e 20 74 68 65  |ion and open the|
00000a30  20 6d 61 69 6e 20 77 69  6e 64 6f 77 20 6e 6f 77  | main window now|
00000a40  2c 20 61 20 00 50 00 00  0d 58 00 00 10 1c a4 03  |, a .P...X......|
00000a50  a7 50 f7 ff 87 7f f7 ff  20 22 00 f0 15 00 00 00  |.P...... "......|
00000a60  00 00 00 00 7d c3 03 00  63 69 72 63 6c 65 20 61  |....}...circle a|
00000a70  6e 64 20 73 6f 6d 65 20  74 65 78 74 20 77 69 6c  |nd some text wil|
00000a80  6c 20 61 70 70 65 61 72  20 69 6e 20 74 68 65 20  |l appear in the |
00000a90  77 69 6e 64 6f 77 2e 20  49 66 20 00 00 58 00 00  |window. If ..X..|
00000aa0  0d 58 00 00 10 b0 9d 03  67 18 f7 ff 47 47 f7 ff  |.X......g...GG..|
00000ab0  20 22 00 f0 15 00 00 00  00 00 00 00 7d c3 03 00  | "..........}...|
00000ac0  61 6e 6f 74 68 65 72 20  77 69 6e 64 6f 77 20 69  |another window i|
00000ad0  73 20 6d 6f 76 65 64 20  6f 76 65 72 20 74 68 69  |s moved over thi|
00000ae0  73 20 6f 6e 65 2c 20 6e  6f 74 65 20 74 68 61 74  |s one, note that|
00000af0  20 00 00 00 00 58 00 00  2d 48 00 00 52 54 6a 02  | ....X..-H..RTj.|
00000b00  27 e0 f6 ff 07 0f f7 ff  20 22 00 f0 15 00 00 00  |'....... "......|
00000b10  00 00 00 00 7d c3 03 00  74 68 65 20 77 69 6e 64  |....}...the wind|
00000b20  6f 77 20 69 73 20 63 6f  72 72 65 63 74 6c 79 20  |ow is correctly |
00000b30  72 65 64 72 61 77 6e 2e  0d 00 00 00 00 48 00 00  |redrawn......H..|
00000b40  2d 28 00 00 52 00 00 00  e7 a7 f6 ff c7 d6 f6 ff  |-(..R...........|
00000b50  20 22 00 f2 15 00 00 00  20 03 00 00 7d c3 03 00  | "...... ...}...|
00000b60  0d 00 00 00 00 28 00 00  0d 50 00 00 10 28 4a 03  |.....(...P...(J.|
00000b70  a7 6f f6 ff 87 9e f6 ff  20 22 00 f2 15 00 00 00  |.o...... "......|
00000b80  20 03 00 00 7d c3 03 00  54 68 65 20 70 61 72 61  | ...}...The para|
00000b90  6d 65 74 65 72 73 20 78  30 25 20 61 6e 64 20 79  |meters x0% and y|
00000ba0  30 25 20 66 6f 72 20 74  68 65 20 72 65 64 72 61  |0% for the redra|
00000bb0  77 20 00 00 00 50 00 00  0d 5c 00 00 10 5c b2 03  |w ...P...\...\..|
00000bc0  67 37 f6 ff 47 66 f6 ff  20 22 00 f0 15 00 00 00  |g7..Gf.. "......|
00000bd0  00 00 00 00 7d c3 03 00  72 6f 75 74 69 6e 65 20  |....}...routine |
00000be0  61 72 65 20 74 68 65 20  63 6f 6f 72 64 69 6e 61  |are the coordina|
00000bf0  74 65 73 20 6f 66 20 74  68 65 20 74 6f 70 20 6c  |tes of the top l|
00000c00  65 66 74 20 63 6f 72 6e  65 72 20 6f 66 20 00 00  |eft corner of ..|
00000c10  00 5c 00 00 2d 58 00 00  52 68 b2 03 27 ff f5 ff  |.\..-X..Rh..'...|
00000c20  07 2e f6 ff 20 22 00 f0  15 00 00 00 00 00 00 00  |.... "..........|
00000c30  7d c3 03 00 74 68 65 20  77 69 6e 64 6f 77 2e 20  |}...the window. |
00000c40  4e 6f 74 65 20 74 68 61  74 20 79 20 63 6f 6f 72  |Note that y coor|
00000c50  64 69 6e 61 74 65 73 20  61 72 65 20 6e 65 67 61  |dinates are nega|
00000c60  74 69 76 65 21 20 0d 00  00 58 00 00 0d 4c 00 00  |tive! ...X...L..|
00000c70  10 00 d9 02 e7 c6 f5 ff  c7 f5 f5 ff 20 22 00 f2  |............ "..|
00000c80  15 00 00 00 20 03 00 00  7d c3 03 00 54 68 65 20  |.... ...}...The |
00000c90  62 6c 6b 25 20 70 61 72  61 6d 65 74 65 72 20 63  |blk% parameter c|
00000ca0  6f 6e 74 61 69 6e 73 20  61 6c 6c 20 6f 66 20 74  |ontains all of t|
00000cb0  68 65 20 00 00 4c 00 00  0d 54 00 00 10 f8 9a 03  |he ..L...T......|
00000cc0  a7 8e f5 ff 87 bd f5 ff  20 22 00 f0 15 00 00 00  |........ "......|
00000cd0  00 00 00 00 7d c3 03 00  69 6e 66 6f 72 6d 61 74  |....}...informat|
00000ce0  69 6f 6e 20 72 65 74 75  72 6e 65 64 20 62 79 20  |ion returned by |
00000cf0  74 68 65 20 77 69 6d 70  20 77 68 65 6e 20 61 20  |the wimp when a |
00000d00  72 65 64 72 61 77 20 00  00 54 00 00 0d 54 00 00  |redraw ..T...T..|
00000d10  10 48 57 03 67 56 f5 ff  47 85 f5 ff 20 22 00 f0  |.HW.gV..G... "..|
00000d20  15 00 00 00 00 00 00 00  7d c3 03 00 72 65 71 75  |........}...requ|
00000d30  65 73 74 20 69 73 20 6d  61 64 65 2c 20 61 6e 64  |est is made, and|
00000d40  20 63 6f 75 6c 64 20 62  65 20 75 73 65 66 75 6c  | could be useful|
00000d50  20 66 6f 72 20 6d 6f 72  65 20 00 00 00 54 00 00  | for more ...T..|
00000d60  2d 40 00 00 52 58 fa 01  27 1e f5 ff 07 4d f5 ff  |-@..RX..'....M..|
00000d70  20 22 00 f0 15 00 00 00  00 00 00 00 7d c3 03 00  | "..........}...|
00000d80  61 64 76 61 6e 63 65 64  20 72 65 64 72 61 77 20  |advanced redraw |
00000d90  68 61 6e 64 6c 69 6e 67  2e 0d 00 00 00 40 00 00  |handling.....@..|
00000da0  2d 28 00 00 52 00 00 00  e7 e5 f4 ff c7 14 f5 ff  |-(..R...........|
00000db0  20 22 00 f2 15 00 00 00  20 03 00 00 7d c3 03 00  | "...... ...}...|
00000dc0  0d 00 00 00 00 28 00 00  01 10 00 00 00 00 00 00  |.....(..........|
00000dd0  00 00 00 00 00 10 00 00  02 14 00 00 1c 04 00 00  |................|
00000de0  00 00 00 00 00 00 00 00  00 14 00 00 0d 88 00 00  |................|
00000df0  10 90 4d 07 f6 58 f1 ff  d6 87 f1 ff 20 22 00 f2  |..M..X...... "..|
00000e00  15 00 00 00 20 03 00 00  61 5a 07 00 54 72 79 20  |.... ...aZ..Try |
00000e10  65 78 70 65 72 69 6d 65  6e 74 69 6e 67 20 77 69  |experimenting wi|
00000e20  74 68 20 6f 74 68 65 72  20 64 72 61 77 69 6e 67  |th other drawing|
00000e30  20 63 6f 6d 6d 61 6e 64  73 20 61 6e 64 20 70 75  | commands and pu|
00000e40  74 74 69 6e 67 20 74 65  78 74 20 69 6e 20 64 69  |tting text in di|
00000e50  66 66 65 72 65 6e 74 20  70 6c 61 63 65 73 20 69  |fferent places i|
00000e60  6e 20 74 68 65 20 77 69  6e 64 6f 77 20 00 00 00  |n the window ...|
00000e70  00 88 00 00 2d 44 00 00  52 d8 dd 01 b6 20 f1 ff  |....-D..R.... ..|
00000e80  96 4f f1 ff 20 22 00 f0  15 00 00 00 00 00 00 00  |.O.. "..........|
00000e90  61 5a 07 00 74 6f 20 67  65 74 20 74 68 65 20 68  |aZ..to get the h|
00000ea0  61 6e 67 20 6f 66 20 61  6c 6c 20 74 68 69 73 2e  |ang of all this.|
00000eb0  0d 00 00 00 00 44 00 00  ad 34 00 00 52 00 00 00  |.....D...4..R...|
00000ec0  76 e8 f0 ff 56 17 f1 ff  20 22 00 f2 15 00 00 00  |v...V... "......|
00000ed0  20 03 00 00 61 5a 07 00  0d 07 0b 00 02 2a 0b 00  | ...aZ.......*..|
00000ee0  02 2a 0b 00 00 00 00 00  00 34 00 00 ad 60 00 00  |.*.......4...`..|
00000ef0  52 50 98 02 c6 98 f0 ff  16 df f0 ff 68 37 00 f2  |RP..........h7..|
00000f00  15 00 00 00 20 03 00 00  61 5a 07 00 44 72 61 77  |.... ...aZ..Draw|
00000f10  69 6e 67 20 49 6e 74 6f  20 41 20 53 70 72 69 74  |ing Into A Sprit|
00000f20  65 08 0b 00 02 2a 0b 00  00 00 00 00 07 d9 0a 00  |e....*..........|
00000f30  07 d9 0a 00 07 d9 0a 00  00 00 00 00 0d 08 0a 00  |................|
00000f40  07 d9 0a 00 00 00 00 00  00 60 00 00 2d 28 00 00  |.........`..-(..|
00000f50  52 00 00 00 d6 5b f0 ff  b6 8a f0 ff 20 22 00 f2  |R....[...... "..|
00000f60  15 00 00 00 20 03 00 00  61 5a 07 00 0d 00 00 00  |.... ...aZ......|
00000f70  00 28 00 00 0d 84 00 00  10 5c 2a 07 96 23 f0 ff  |.(.......\*..#..|
00000f80  76 52 f0 ff 20 22 00 f2  15 00 00 00 20 03 00 00  |vR.. "...... ...|
00000f90  61 5a 07 00 57 69 74 68  20 61 20 6d 6f 72 65 20  |aZ..With a more |
00000fa0  63 6f 6d 70 6c 69 63 61  74 65 64 20 6f 72 20 72  |complicated or r|
00000fb0  61 6e 64 6f 6d 20 64 69  73 70 6c 61 79 20 79 6f  |andom display yo|
00000fc0  75 20 6e 65 65 64 20 74  6f 20 73 65 74 20 75 70  |u need to set up|
00000fd0  20 61 20 73 70 72 69 74  65 20 74 6f 20 64 72 61  | a sprite to dra|
00000fe0  77 20 69 6e 74 6f 2e 20  54 68 65 20 65 78 61 6d  |w into. The exam|
00000ff0  70 6c 65 20 00 84 00 00  2d 50 00 00 52 28 38 03  |ple ....-P..R(8.|
00001000  56 eb ef ff 36 1a f0 ff  20 22 00 f0 15 00 00 00  |V...6... "......|
00001010  00 00 00 00 61 5a 07 00  61 70 70 6c 69 63 61 74  |....aZ..applicat|
00001020  69 6f 6e 20 21 52 65 64  72 61 77 32 20 73 68 6f  |ion !Redraw2 sho|
00001030  77 73 20 68 6f 77 20 74  6f 20 64 6f 20 74 68 69  |ws how to do thi|
00001040  73 2e 0d 00 00 50 00 00  2d 28 00 00 52 00 00 00  |s....P..-(..R...|
00001050  16 b3 ef ff f6 e1 ef ff  20 22 00 f2 15 00 00 00  |........ "......|
00001060  20 03 00 00 61 5a 07 00  0d 00 00 00 00 28 00 00  | ...aZ.......(..|
00001070  0d 88 00 00 10 bc 15 07  d6 7a ef ff b6 a9 ef ff  |.........z......|
00001080  20 22 00 f2 15 00 00 00  20 03 00 00 61 5a 07 00  | "...... ...aZ..|
00001090  4e 6f 74 65 20 69 6e 20  74 68 69 73 20 63 61 73  |Note in this cas|
000010a0  65 20 74 68 61 74 20 74  68 65 20 64 69 73 70 6c  |e that the displ|
000010b0  61 79 20 77 69 74 68 69  6e 20 74 68 65 20 77 69  |ay within the wi|
000010c0  6e 64 6f 77 20 69 73 20  61 6e 69 6d 61 74 65 64  |ndow is animated|
000010d0  20 62 79 20 63 61 6c 6c  69 6e 67 20 74 68 65 20  | by calling the |
000010e0  70 6c 6f 74 74 69 6e 67  20 72 6f 75 74 69 6e 65  |plotting routine|
000010f0  20 61 74 20 00 88 00 00  0d 88 00 00 10 48 26 07  | at .........H&.|
00001100  96 42 ef ff 76 71 ef ff  20 22 00 f0 15 00 00 00  |.B..vq.. "......|
00001110  00 00 00 00 61 5a 07 00  65 76 65 72 79 20 6e 75  |....aZ..every nu|
00001120  6c 6c 20 65 76 65 6e 74  20 72 65 63 65 69 76 65  |ll event receive|
00001130  64 2e 20 54 68 65 72 65  20 61 6c 73 6f 20 68 61  |d. There also ha|
00001140  73 20 74 6f 20 62 65 20  74 77 6f 20 72 65 64 72  |s to be two redr|
00001150  61 77 69 6e 67 20 72 6f  75 74 69 6e 65 73 2c 20  |awing routines, |
00001160  6f 6e 65 20 63 61 6c 6c  65 64 20 77 68 65 6e 20  |one called when |
00001170  79 6f 75 20 77 61 6e 74  20 00 00 00 00 88 00 00  |you want .......|
00001180  0d 78 00 00 10 bc 1c 06  56 0a ef ff 36 39 ef ff  |.x......V...69..|
00001190  20 22 00 f0 15 00 00 00  00 00 00 00 61 5a 07 00  | "..........aZ..|
000011a0  74 68 65 20 64 69 73 70  6c 61 79 20 72 65 64 72  |the display redr|
000011b0  61 77 6e 20 61 6e 64 20  6f 6e 65 20 66 6f 72 20  |awn and one for |
000011c0  77 68 65 6e 20 74 68 65  20 77 69 6d 70 20 77 61  |when the wimp wa|
000011d0  6e 74 73 20 69 74 20 20  72 65 64 72 61 77 6e 20  |nts it  redrawn |
000011e0  28 68 65 6e 63 65 20 74  68 65 20 63 61 6c 6c 20  |(hence the call |
000011f0  74 6f 20 00 00 78 00 00  ad 94 00 00 52 2c 49 06  |to ..x......R,I.|
00001200  16 d2 ee ff f6 00 ef ff  20 22 00 f0 15 00 00 00  |........ "......|
00001210  00 00 00 00 61 5a 07 00  50 52 4f 43 73 68 65 6c  |....aZ..PROCshel|
00001220  6c 5f 41 74 74 61 63 68  55 73 65 72 52 65 64 72  |l_AttachUserRedr|
00001230  61 77 29 2e 20 49 6e 20  62 6f 74 68 20 63 61 73  |aw). In both cas|
00001240  65 73 20 69 74 20 69 73  20 6e 65 63 65 73 73 61  |es it is necessa|
00001250  72 79 20 6a 75 73 74 20  74 6f 20 72 65 70 6c 6f  |ry just to replo|
00001260  74 20 74 68 65 20 73 70  72 69 74 65 2e 20 07 00  |t the sprite. ..|
00001270  02 d5 0a 00 02 d5 0a 00  00 00 00 00 0d 08 0a 00  |................|
00001280  02 d5 0a 00 00 00 00 00  00 94 00 00 2d 44 00 00  |............-D..|
00001290  52 00 78 05 16 98 e8 ff  16 3c ee ff 40 97 05 f2  |R.x......<..@...|
000012a0  15 00 00 00 20 03 00 00  61 5a 07 00 13 00 00 00  |.... ...aZ......|
000012b0  18 00 00 00 01 00 00 00  00 00 00 00 dc 0a 00 00  |................|
000012c0  00 78 05 00 40 97 05 00  0d 00 00 00 00 44 00 00  |.x..@........D..|
000012d0  06 00 00 00 79 56 34 12  88 00 00 00 02 00 00 00  |....yV4.........|
000012e0  00 00 00 00 06 08 00 00  00 08 00 00 01 10 00 00  |................|
000012f0  00 00 00 00 00 00 00 00  00 10 00 00 02 18 00 00  |................|
00001300  84 02 00 00 00 00 03 00  18 cd 0a 00 00 00 00 00  |................|
00001310  00 18 00 00 a5 44 00 00  42 b6 6c 01 81 05 f4 ff  |.....D..B.l.....|
00001320  31 3c f4 ff e4 29 00 f2  07 cd 0a 00 18 cd 0a 00  |1<...)..........|
00001330  18 cd 0a 00 00 00 00 00  55 73 65 72 20 52 65 64  |........User Red|
00001340  72 61 77 73 08 08 77 73  18 cd 0a 00 00 00 00 00  |raws..ws........|
00001350  0d 00 00 00 00 44 00 00  06 00 00 00 79 56 34 12  |.....D......yV4.|
00001360  88 00 00 00 04 00 00 00  00 00 00 00 06 08 00 00  |................|
00001370  00 08 00 00 01 10 00 00  00 00 00 00 00 00 00 00  |................|
00001380  00 10 00 00 02 18 00 00  6c 05 00 00 00 00 03 00  |........l.......|
00001390  18 cd 0a 00 00 00 00 00  00 18 00 00 a5 44 00 00  |.............D..|
000013a0  42 b6 6c 01 d0 05 e7 ff  80 3c e7 ff e4 29 00 f2  |B.l......<...)..|
000013b0  07 cd 0a 00 18 cd 0a 00  18 cd 0a 00 00 00 00 00  |................|
000013c0  55 73 65 72 20 52 65 64  72 61 77 73 08 08 77 73  |User Redraws..ws|
000013d0  18 cd 0a 00 00 00 00 00  0d 00 00 00 00 44 00 00  |.............D..|
000013e0  06 00 00 00 79 56 34 12  a4 00 00 00 06 00 00 00  |....yV4.........|
000013f0  00 00 00 00 06 08 00 00  00 08 00 00 01 10 00 00  |................|
00001400  00 00 00 00 00 00 00 00  00 10 00 00 02 18 00 00  |................|
00001410  dc 05 00 00 00 00 06 00  21 09 0e 00 00 00 00 00  |........!.......|
00001420  00 18 00 00 a5 60 00 00  42 b0 7f 03 fd 33 e9 ff  |.....`..B....3..|
00001430  dd 62 e9 ff f8 22 00 f2  07 00 00 00 21 09 0e 00  |.b..."......!...|
00001440  21 09 0e 00 00 00 00 00  54 68 65 20 6d 6f 72 65  |!.......The more|
00001450  20 63 6f 6d 70 6c 69 63  61 74 65 64 20 65 78 61  | complicated exa|
00001460  6d 70 6c 65 20 66 72 6f  6d 20 21 52 65 64 72 61  |mple from !Redra|
00001470  77 32 2e 08 21 09 0e 00  00 00 00 00 0d 00 00 00  |w2..!...........|
00001480  00 60 00 00 06 00 00 00  79 56 34 12              |.`......yV4.|
0000148c