home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / languages / panebasic / lib / blib2 / Blib / STW < prev    next >
Unknown  |  1992-11-05  |  4.4 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text


This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
100% file data default
100% xdgMime image/x-tga default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0d 00 0a 0f 2a 7c 73 74 | 61 72 74 20 53 54 57 0d |....*|st|art STW.|
|00000010| 00 14 21 2a 7c 21 53 69 | 6d 70 6c 65 20 54 65 78 |..!*|!Si|mple Tex|
|00000020| 74 20 57 69 6e 64 6f 77 | 20 4c 69 62 72 61 72 79 |t Window| Library|
|00000030| 0d 00 1e 07 2a 7c 21 0d | 00 28 3d 2a 7c 21 41 6e |....*|!.|.(=*|!An|
|00000040| 20 53 54 57 20 69 73 20 | 61 20 73 69 6d 70 6c 65 | STW is |a simple|
|00000050| 20 77 69 6e 64 6f 77 20 | 74 79 70 65 20 28 73 65 | window |type (se|
|00000060| 65 20 57 49 4e 44 4f 57 | 20 6c 69 62 72 61 72 79 |e WINDOW| library|
|00000070| 20 66 6f 72 0d 00 32 42 | 2a 7c 21 64 65 74 61 69 | for..2B|*|!detai|
|00000080| 6c 73 29 20 77 68 69 63 | 68 20 61 6c 6c 6f 77 73 |ls) whic|h allows|
|00000090| 20 65 61 73 79 20 64 69 | 73 70 6c 61 79 20 6f 66 | easy di|splay of|
|000000a0| 20 74 65 78 74 20 77 69 | 74 68 69 6e 20 61 20 77 | text wi|thin a w|
|000000b0| 69 6e 64 6f 77 2e 0d 00 | 3c 3f 2a 7c 21 59 6f 75 |indow...|<?*|!You|
|000000c0| 20 63 61 6e 20 75 73 65 | 20 63 6f 6c 6f 75 72 20 | can use| colour |
|000000d0| 61 6e 64 20 61 6e 79 20 | 64 69 73 70 6c 61 79 61 |and any |displaya|
|000000e0| 62 6c 65 20 63 68 61 72 | 61 63 74 65 72 73 20 77 |ble char|acters w|
|000000f0| 69 74 68 69 6e 0d 00 46 | 40 2a 7c 21 74 68 69 73 |ithin..F|@*|!this|
|00000100| 20 77 69 6e 64 6f 77 20 | 74 79 70 65 2c 20 62 75 | window |type, bu|
|00000110| 74 20 74 68 65 20 74 65 | 78 74 20 63 61 6e 20 4e |t the te|xt can N|
|00000120| 4f 54 20 62 65 20 61 6c | 74 65 72 65 64 20 6f 6e |OT be al|tered on|
|00000130| 63 65 20 69 74 0d 00 50 | 40 2a 7c 21 68 61 73 20 |ce it..P|@*|!has |
|00000140| 62 65 65 6e 20 61 64 64 | 65 64 20 74 6f 20 74 68 |been add|ed to th|
|00000150| 65 20 77 69 6e 64 6f 77 | 20 28 65 78 63 65 70 74 |e window| (except|
|00000160| 20 62 79 20 63 6c 65 61 | 72 69 6e 67 20 61 6c 6c | by clea|ring all|
|00000170| 20 74 65 78 74 0d 00 5a | 1c 2a 7c 21 61 6e 64 20 | text..Z|.*|!and |
|00000180| 61 64 64 69 6e 67 20 69 | 74 20 61 67 61 69 6e 29 |adding i|t again)|
|00000190| 2e 0d 00 64 04 0d 00 6e | 0e 2a 7c 73 74 6f 70 20 |...d...n|.*|stop |
|000001a0| 53 54 57 0d 00 78 18 2a | 7c 73 74 61 72 74 20 50 |STW..x.*||start P|
|000001b0| 52 4f 43 73 74 77 5f 69 | 6e 69 74 0d 00 82 13 2a |ROCstw_i|nit....*|
|000001c0| 7c 21 50 52 4f 43 73 74 | 77 5f 69 6e 69 74 0d 00 ||!PROCst|w_init..|
|000001d0| 8c 07 2a 7c 21 0d 00 96 | 46 2a 7c 21 49 6e 69 74 |..*|!...|F*|!Init|
|000001e0| 69 61 6c 69 73 65 73 20 | 74 68 65 20 27 53 69 6d |ialises |the 'Sim|
|000001f0| 70 6c 65 20 54 65 78 74 | 20 57 69 6e 64 6f 77 27 |ple Text| Window'|
|00000200| 20 72 6f 75 74 69 6e 65 | 73 2e 20 53 54 57 73 20 | routine|s. STWs |
|00000210| 68 61 76 65 20 77 69 6e | 64 6f 77 0d 00 a0 15 2a |have win|dow....*|
|00000220| 7c 21 74 79 70 65 20 6e | 75 6d 62 65 72 20 31 2e ||!type n|umber 1.|
|00000230| 0d 00 aa 0e dd f2 73 74 | 77 5f 69 6e 69 74 0d 00 |......st|w_init..|
|00000240| b4 3c 5f 73 74 77 5f 62 | 75 66 66 65 72 25 3d a4 |.<_stw_b|uffer%=.|
|00000250| 6d 61 6c 6c 6f 63 28 32 | 35 32 29 3a 5f 73 74 77 |malloc(2|52):_stw|
|00000260| 5f 63 6f 6c 6f 75 72 25 | 3d 30 3a 5f 73 74 77 5f |_colour%|=0:_stw_|
|00000270| 6d 61 72 67 69 6e 25 3d | 31 36 0d 00 be 05 e1 0d |margin%=|16......|
|00000280| 00 c8 04 0d 00 d2 17 2a | 7c 73 74 6f 70 20 50 52 |.......*||stop PR|
|00000290| 4f 43 73 74 77 5f 69 6e | 69 74 0d 00 dc 1a 2a 7c |OCstw_in|it....*||
|000002a0| 73 74 61 72 74 20 50 52 | 4f 43 73 74 77 5f 6e 65 |start PR|OCstw_ne|
|000002b0| 77 73 74 77 0d 00 e6 1f | 2a 7c 21 50 52 4f 43 73 |wstw....|*|!PROCs|
|000002c0| 74 77 5f 6e 65 77 73 74 | 77 28 20 77 69 6e 64 6f |tw_newst|w( windo|
|000002d0| 77 20 29 0d 00 f0 07 2a | 7c 21 0d 00 fa 3c 2a 7c |w )....*||!...<*||
|000002e0| 21 4d 61 6b 65 73 20 74 | 68 65 20 77 69 6e 64 6f |!Makes t|he windo|
|000002f0| 77 20 70 61 73 73 65 64 | 20 74 6f 20 69 74 20 61 |w passed| to it a|
|00000300| 20 27 53 69 6d 70 6c 65 | 20 54 65 78 74 20 57 69 | 'Simple| Text Wi|
|00000310| 6e 64 6f 77 27 2e 0d 01 | 04 14 dd f2 73 74 77 5f |ndow'...|....stw_|
|00000320| 6e 65 77 73 74 77 28 57 | 25 29 0d 01 0e 44 e7 20 |newstw(W|%)...D. |
|00000330| a4 77 69 6e 5f 66 69 6e | 64 74 79 70 65 28 57 25 |.win_fin|dtype(W%|
|00000340| 29 3d 2d 31 20 8c 20 f2 | 77 69 6d 70 5f 65 72 72 |)=-1 . .|wimp_err|
|00000350| 6f 72 28 31 2c 30 2c 22 | 53 54 57 20 3a 20 49 6e |or(1,0,"|STW : In|
|00000360| 76 61 6c 69 64 20 77 69 | 6e 64 6f 77 22 29 0d 01 |valid wi|ndow")..|
|00000370| 18 20 21 28 57 25 2d 31 | 36 29 3d 26 37 36 43 30 |. !(W%-1|6)=&76C0|
|00000380| 30 30 31 3a 21 28 57 25 | 2d 31 32 29 3d 30 0d 01 |001:!(W%|-12)=0..|
|00000390| 22 05 e1 0d 01 2c 04 0d | 01 36 19 2a 7c 73 74 6f |"....,..|.6.*|sto|
|000003a0| 70 20 50 52 4f 43 73 74 | 77 5f 6e 65 77 73 74 77 |p PROCst|w_newstw|
|000003b0| 0d 01 40 19 2a 7c 73 74 | 61 72 74 20 50 52 4f 43 |..@.*|st|art PROC|
|000003c0| 73 74 77 5f 63 6c 65 61 | 72 0d 01 4a 1e 2a 7c 21 |stw_clea|r..J.*|!|
|000003d0| 50 52 4f 43 73 74 77 5f | 63 6c 65 61 72 28 20 77 |PROCstw_|clear( w|
|000003e0| 69 6e 64 6f 77 20 29 0d | 01 54 07 2a 7c 21 0d 01 |indow ).|.T.*|!..|
|000003f0| 5e 43 2a 7c 21 43 6c 65 | 61 72 73 20 74 68 65 20 |^C*|!Cle|ars the |
|00000400| 74 65 78 74 20 69 6e 20 | 61 6e 20 53 54 57 2e 20 |text in |an STW. |
|00000410| 4d 75 73 74 20 62 65 20 | 63 61 6c 6c 65 64 20 62 |Must be |called b|
|00000420| 65 66 6f 72 65 20 61 6e | 79 20 74 65 78 74 20 69 |efore an|y text i|
|00000430| 73 0d 01 68 0d 2a 7c 21 | 61 64 64 65 64 2e 0d 01 |s..h.*|!|added...|
|00000440| 72 13 dd f2 73 74 77 5f | 63 6c 65 61 72 28 57 25 |r...stw_|clear(W%|
|00000450| 29 0d 01 7c 0b ea 20 41 | 25 2c 4e 25 0d 01 86 39 |)..|.. A|%,N%...9|
|00000460| e7 20 a4 77 69 6e 5f 66 | 69 6e 64 74 79 70 65 28 |. .win_f|indtype(|
|00000470| 57 25 29 3c 3e 31 20 f2 | 77 69 6d 70 5f 65 72 72 |W%)<>1 .|wimp_err|
|00000480| 6f 72 28 31 2c 30 2c 22 | 49 6e 76 61 6c 69 64 20 |or(1,0,"|Invalid |
|00000490| 53 54 57 22 29 0d 01 90 | 39 41 25 3d 21 28 57 25 |STW")...|9A%=!(W%|
|000004a0| 2d 31 32 29 3a c8 95 20 | 41 25 20 4e 25 3d 21 41 |-12):.. |A% N%=!A|
|000004b0| 25 3a f2 66 72 65 65 28 | 41 25 29 3a 41 25 3d 4e |%:.free(|A%):A%=N|
|000004c0| 25 3a ce 3a 21 28 57 25 | 2d 31 32 29 3d 30 0d 01 |%:.:!(W%|-12)=0..|
|000004d0| 9a 05 e1 0d 01 a4 04 0d | 01 ae 18 2a 7c 73 74 6f |........|...*|sto|
|000004e0| 70 20 50 52 4f 43 73 74 | 77 5f 63 6c 65 61 72 0d |p PROCst|w_clear.|
|000004f0| 01 b8 1d 2a 7c 73 74 61 | 72 74 20 50 52 4f 43 73 |...*|sta|rt PROCs|
|00000500| 74 77 5f 73 65 74 63 6f | 6c 6f 75 72 0d 01 c2 27 |tw_setco|lour...'|
|00000510| 2a 7c 21 50 52 4f 43 73 | 74 77 5f 73 65 74 63 6f |*|!PROCs|tw_setco|
|00000520| 6c 6f 75 72 28 20 77 69 | 6d 70 5f 63 6f 6c 6f 75 |lour( wi|mp_colou|
|00000530| 72 20 29 0d 01 cc 07 2a | 7c 21 0d 01 d6 41 2a 7c |r )....*||!...A*||
|00000540| 21 53 65 74 73 20 74 68 | 65 20 63 6f 6c 6f 75 72 |!Sets th|e colour|
|00000550| 20 6f 66 20 61 6c 6c 20 | 74 65 78 74 20 61 64 64 | of all |text add|
|00000560| 65 64 20 74 6f 20 61 6e | 20 53 54 57 20 75 6e 74 |ed to an| STW unt|
|00000570| 69 6c 20 74 68 65 20 6e | 65 78 74 0d 01 e0 45 2a |il the n|ext...E*|
|00000580| 7c 21 63 68 61 6e 67 65 | 20 6f 66 20 63 6f 6c 6f ||!change| of colo|
|00000590| 75 72 2e 20 4e 6f 74 65 | 20 74 68 69 73 20 70 72 |ur. Note| this pr|
|000005a0| 6f 63 65 64 75 72 65 20 | 69 73 20 67 6c 6f 62 61 |ocedure |is globa|
|000005b0| 6c 20 6f 76 65 72 20 41 | 4c 4c 20 53 54 57 73 2e |l over A|LL STWs.|
|000005c0| 0d 01 ea 17 dd f2 73 74 | 77 5f 73 65 74 63 6f 6c |......st|w_setcol|
|000005d0| 6f 75 72 28 43 25 29 0d | 01 f4 15 5f 73 74 77 5f |our(C%).|..._stw_|
|000005e0| 63 6f 6c 6f 75 72 25 3d | 43 25 3a e1 0d 01 fe 04 |colour%=|C%:.....|
|000005f0| 0d 02 08 1c 2a 7c 73 74 | 6f 70 20 50 52 4f 43 73 |....*|st|op PROCs|
|00000600| 74 77 5f 73 65 74 63 6f | 6c 6f 75 72 0d 02 12 1d |tw_setco|lour....|
|00000610| 2a 7c 73 74 61 72 74 20 | 50 52 4f 43 73 74 77 5f |*|start |PROCstw_|
|00000620| 73 74 61 72 74 6c 69 6e | 65 0d 02 1c 18 2a 7c 21 |startlin|e....*|!|
|00000630| 50 52 4f 43 73 74 77 5f | 73 74 61 72 74 6c 69 6e |PROCstw_|startlin|
|00000640| 65 0d 02 26 07 2a 7c 21 | 0d 02 30 42 2a 7c 21 53 |e..&.*|!|..0B*|!S|
|00000650| 74 61 72 74 73 20 61 20 | 6e 65 77 20 53 54 57 20 |tarts a |new STW |
|00000660| 6c 69 6e 65 2c 20 74 68 | 69 73 20 6c 69 6e 65 20 |line, th|is line |
|00000670| 69 73 20 6e 6f 74 20 79 | 65 74 20 61 73 73 69 67 |is not y|et assig|
|00000680| 6e 65 64 20 74 6f 20 61 | 6e 79 0d 02 3a 19 2a 7c |ned to a|ny..:.*||
|00000690| 21 70 61 72 74 69 63 75 | 6c 61 72 20 77 69 6e 64 |!particu|lar wind|
|000006a0| 6f 77 2e 0d 02 44 13 dd | f2 73 74 77 5f 73 74 61 |ow...D..|.stw_sta|
|000006b0| 72 74 6c 69 6e 65 0d 02 | 4e 16 24 5f 73 74 77 5f |rtline..|N.$_stw_|
|000006c0| 62 75 66 66 65 72 25 3d | 22 22 3a e1 0d 02 58 04 |buffer%=|"":...X.|
|000006d0| 0d 02 62 1c 2a 7c 73 74 | 6f 70 20 50 52 4f 43 73 |..b.*|st|op PROCs|
|000006e0| 74 77 5f 73 74 61 72 74 | 6c 69 6e 65 0d 02 6c 1a |tw_start|line..l.|
|000006f0| 2a 7c 73 74 61 72 74 20 | 50 52 4f 43 73 74 77 5f |*|start |PROCstw_|
|00000700| 61 70 70 65 6e 64 0d 02 | 76 1f 2a 7c 21 50 52 4f |append..|v.*|!PRO|
|00000710| 43 73 74 77 5f 61 70 70 | 65 6e 64 28 20 73 74 72 |Cstw_app|end( str|
|00000720| 69 6e 67 20 29 0d 02 80 | 07 2a 7c 21 0d 02 8a 3f |ing )...|.*|!...?|
|00000730| 2a 7c 21 41 64 64 73 20 | 27 73 74 72 69 6e 67 27 |*|!Adds |'string'|
|00000740| 20 74 6f 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 | to the |end of t|
|00000750| 68 65 20 63 75 72 72 65 | 6e 74 20 53 54 57 20 6c |he curre|nt STW l|
|00000760| 69 6e 65 20 74 68 61 74 | 20 69 73 0d 02 94 15 2a |ine that| is....*|
|00000770| 7c 21 62 65 69 6e 67 20 | 63 72 65 61 74 65 64 2e ||!being |created.|
|00000780| 0d 02 9e 14 dd f2 73 74 | 77 5f 61 70 70 65 6e 64 |......st|w_append|
|00000790| 28 53 24 29 0d 02 a8 4c | e7 20 a9 28 53 24 29 2b |(S$)...L|. .(S$)+|
|000007a0| a9 28 24 5f 73 74 77 5f | 62 75 66 66 65 72 25 29 |.($_stw_|buffer%)|
|000007b0| 3e 32 35 32 20 f2 77 69 | 6d 70 5f 65 72 72 6f 72 |>252 .wi|mp_error|
|000007c0| 28 31 2c 30 2c 22 53 54 | 57 20 3a 20 54 65 78 74 |(1,0,"ST|W : Text|
|000007d0| 20 6c 69 6e 65 20 74 6f | 6f 20 6c 6f 6e 67 22 29 | line to|o long")|
|000007e0| 0d 02 b2 28 24 5f 73 74 | 77 5f 62 75 66 66 65 72 |...($_st|w_buffer|
|000007f0| 25 2b 3d bd 28 31 34 2b | 5f 73 74 77 5f 63 6f 6c |%+=.(14+|_stw_col|
|00000800| 6f 75 72 25 29 2b 53 24 | 0d 02 bc 05 e1 0d 02 c6 |our%)+S$|........|
|00000810| 04 0d 02 d0 19 2a 7c 73 | 74 6f 70 20 50 52 4f 43 |.....*|s|top PROC|
|00000820| 73 74 77 5f 61 70 70 65 | 6e 64 0d 02 da 1b 2a 7c |stw_appe|nd....*||
|00000830| 73 74 61 72 74 20 50 52 | 4f 43 73 74 77 5f 61 64 |start PR|OCstw_ad|
|00000840| 64 6c 69 6e 65 0d 02 e4 | 20 2a 7c 21 50 52 4f 43 |dline...| *|!PROC|
|00000850| 73 74 77 5f 61 64 64 6c | 69 6e 65 28 20 77 69 6e |stw_addl|ine( win|
|00000860| 64 6f 77 20 29 0d 02 ee | 07 2a 7c 21 0d 02 f8 32 |dow )...|.*|!...2|
|00000870| 2a 7c 21 41 64 64 73 20 | 74 68 65 20 63 75 72 72 |*|!Adds |the curr|
|00000880| 65 6e 74 20 53 54 57 20 | 6c 69 6e 65 20 74 6f 20 |ent STW |line to |
|00000890| 74 68 65 20 67 69 76 65 | 6e 20 53 54 57 2e 0d 03 |the give|n STW...|
|000008a0| 02 15 dd f2 73 74 77 5f | 61 64 64 6c 69 6e 65 28 |....stw_|addline(|
|000008b0| 57 25 29 0d 03 0c 0e ea | 20 4c 25 2c 41 25 2c 42 |W%).....| L%,A%,B|
|000008c0| 25 0d 03 16 39 e7 20 a4 | 77 69 6e 5f 66 69 6e 64 |%...9. .|win_find|
|000008d0| 74 79 70 65 28 57 25 29 | 3c 3e 31 20 f2 77 69 6d |type(W%)|<>1 .wim|
|000008e0| 70 5f 65 72 72 6f 72 28 | 31 2c 30 2c 22 49 6e 76 |p_error(|1,0,"Inv|
|000008f0| 61 6c 69 64 20 53 54 57 | 22 29 0d 03 20 2e 4c 25 |alid STW|").. .L%|
|00000900| 3d a9 28 24 5f 73 74 77 | 5f 62 75 66 66 65 72 25 |=.($_stw|_buffer%|
|00000910| 29 2b 35 3a 41 25 3d 21 | 28 57 25 2d 31 32 29 3a |)+5:A%=!|(W%-12):|
|00000920| 42 25 3d 57 25 2d 31 32 | 0d 03 2a 18 c8 95 20 41 |B%=W%-12|..*... A|
|00000930| 25 20 42 25 3d 41 25 3a | 41 25 3d 21 41 25 3a ce |% B%=A%:|A%=!A%:.|
|00000940| 0d 03 34 35 41 25 3d a4 | 6d 61 6c 6c 6f 63 28 4c |..45A%=.|malloc(L|
|00000950| 25 29 3a 21 41 25 3d 30 | 3a 21 42 25 3d 41 25 3a |%):!A%=0|:!B%=A%:|
|00000960| 24 28 41 25 2b 34 29 3d | 24 5f 73 74 77 5f 62 75 |$(A%+4)=|$_stw_bu|
|00000970| 66 66 65 72 25 0d 03 3e | 05 e1 0d 03 48 04 0d 03 |ffer%..>|....H...|
|00000980| 52 1a 2a 7c 73 74 6f 70 | 20 50 52 4f 43 73 74 77 |R.*|stop| PROCstw|
|00000990| 5f 61 64 64 6c 69 6e 65 | 0d 03 5c 18 2a 7c 73 74 |_addline|..\.*|st|
|000009a0| 61 72 74 20 46 4e 73 74 | 77 5f 72 65 64 72 61 77 |art FNst|w_redraw|
|000009b0| 0d 03 66 26 2a 7c 21 46 | 4e 73 74 77 5f 72 65 64 |..f&*|!F|Nstw_red|
|000009c0| 72 61 77 28 20 77 69 6d | 70 5f 70 6f 6c 6c 5f 62 |raw( wim|p_poll_b|
|000009d0| 6c 6f 63 6b 20 29 0d 03 | 70 07 2a 7c 21 0d 03 7a |lock )..|p.*|!..z|
|000009e0| 47 2a 7c 21 57 69 6c 6c | 20 72 65 64 72 61 77 20 |G*|!Will| redraw |
|000009f0| 61 6e 20 53 54 57 20 69 | 66 20 69 74 20 63 61 6e |an STW i|f it can|
|00000a00| 2e 20 52 65 74 75 72 6e | 73 20 54 52 55 45 20 69 |. Return|s TRUE i|
|00000a10| 66 20 69 74 20 63 61 6e | 20 28 69 65 2e 20 72 65 |f it can| (ie. re|
|00000a20| 64 72 61 77 0d 03 84 38 | 2a 7c 21 65 76 65 6e 74 |draw...8|*|!event|
|00000a30| 20 72 65 66 65 72 73 20 | 74 6f 20 61 6e 20 53 54 | refers |to an ST|
|00000a40| 57 29 2c 20 6f 74 68 65 | 72 77 69 73 65 20 72 65 |W), othe|rwise re|
|00000a50| 74 75 72 6e 73 20 46 41 | 4c 53 45 2e 0d 03 8e 14 |turns FA|LSE.....|
|00000a60| dd a4 73 74 77 5f 72 65 | 64 72 61 77 28 42 25 29 |..stw_re|draw(B%)|
|00000a70| 0d 03 98 26 ea 20 48 25 | 2c 57 25 2c 59 25 2c 79 |...&. H%|,W%,Y%,y|
|00000a80| 25 2c 4d 25 2c 58 25 2c | 78 25 2c 50 25 2c 49 25 |%,M%,X%,|x%,P%,I%|
|00000a90| 2c 43 25 2c 54 24 0d 03 | a2 34 57 25 3d a4 77 69 |,C%,T$..|.4W%=.wi|
|00000aa0| 6e 5f 66 69 6e 64 77 69 | 6e 28 21 42 25 29 3a e7 |n_findwi|n(!B%):.|
|00000ab0| 20 a4 77 69 6e 5f 66 69 | 6e 64 74 79 70 65 28 57 | .win_fi|ndtype(W|
|00000ac0| 25 29 3c 3e 31 20 8c 20 | 3d a3 0d 03 ac 16 c8 99 |%)<>1 . |=.......|
|00000ad0| 20 26 34 30 30 43 38 2c | 2c 42 25 20 b8 20 4d 25 | &400C8,|,B% . M%|
|00000ae0| 0d 03 b6 09 c8 95 20 4d | 25 0d 03 c0 41 20 20 79 |...... M|%...A y|
|00000af0| 25 3d 28 28 42 25 21 31 | 36 2d 42 25 21 34 30 2d |%=((B%!1|6-B%!40-|
|00000b00| 42 25 21 32 34 29 81 20 | 33 32 29 2d 31 3a 59 25 |B%!24). |32)-1:Y%|
|00000b10| 3d 31 2b 28 42 25 21 31 | 36 2d 42 25 21 33 32 2d |=1+(B%!1|6-B%!32-|
|00000b20| 42 25 21 32 34 29 81 20 | 33 32 0d 03 ca 11 20 20 |B%!24). |32.... |
|00000b30| e7 20 79 25 3c 30 20 79 | 25 3d 30 0d 03 d4 47 20 |. y%<0 y|%=0...G |
|00000b40| 20 78 25 3d 28 42 25 21 | 32 38 2d 42 25 21 34 2b | x%=(B%!|28-B%!4+|
|00000b50| 42 25 21 32 30 2d 5f 73 | 74 77 5f 6d 61 72 67 69 |B%!20-_s|tw_margi|
|00000b60| 6e 25 29 81 20 31 36 3a | 58 25 3d 31 2b 28 42 25 |n%). 16:|X%=1+(B%|
|00000b70| 21 33 36 2d 42 25 21 34 | 2b 42 25 21 32 30 29 81 |!36-B%!4|+B%!20).|
|00000b80| 31 36 0d 03 de 38 20 20 | 48 25 3d 30 3a 50 25 3d |16...8 |H%=0:P%=|
|00000b90| 21 28 57 25 2d 31 32 29 | 3a c8 95 20 28 50 25 3c |!(W%-12)|:.. (P%<|
|00000ba0| 3e 30 20 80 20 48 25 3c | 79 25 29 20 50 25 3d 21 |>0 . H%<|y%) P%=!|
|00000bb0| 50 25 3a 48 25 2b 3d 31 | 3a ce 0d 03 e8 19 20 20 |P%:H%+=1|:..... |
|00000bc0| c8 95 20 28 50 25 3c 3e | 30 20 80 20 48 25 3c 3d |.. (P%<>|0 . H%<=|
|00000bd0| 59 25 29 0d 03 f2 2a 20 | 20 20 20 49 25 3d 50 25 |Y%)...* | I%=P%|
|00000be0| 2b 34 3a 43 25 3d 30 3a | c8 95 20 28 3f 49 25 29 |+4:C%=0:|.. (?I%)|
|00000bf0| 3c 3e 31 33 20 80 20 43 | 25 3c 3d 58 25 0d 03 fc |<>13 . C|%<=X%...|
|00000c00| 2e 20 20 20 20 20 20 e7 | 20 3f 49 25 3e 31 33 20 |. .| ?I%>13 |
|00000c10| 80 20 3f 49 25 3c 33 30 | 20 8c 20 c8 99 20 26 34 |. ?I%<30| . .. &4|
|00000c20| 30 30 45 36 2c 3f 49 25 | 2d 31 34 0d 04 06 14 20 |00E6,?I%|-14.... |
|00000c30| 20 20 20 20 20 e7 20 3f | 49 25 3e 33 31 20 8c 0d | . ?|I%>31 ..|
|00000c40| 04 10 1f 20 20 20 20 20 | 20 20 20 e7 20 43 25 3e |... | . C%>|
|00000c50| 3d 78 25 20 80 20 43 25 | 3c 3d 58 25 20 8c 0d 04 |=x% . C%|<=X% ...|
|00000c60| 1a 45 20 20 20 20 20 20 | 20 20 20 20 ec 20 43 25 |.E | . C%|
|00000c70| 2a 31 36 2b 42 25 21 34 | 2d 42 25 21 32 30 2b 5f |*16+B%!4|-B%!20+_|
|00000c80| 73 74 77 5f 6d 61 72 67 | 69 6e 25 2c 42 25 21 31 |stw_marg|in%,B%!1|
|00000c90| 36 2d 48 25 2a 33 32 2d | 42 25 21 32 34 3a 54 24 |6-H%*32-|B%!24:T$|
|00000ca0| 3d 22 22 0d 04 24 42 20 | 20 20 20 20 20 20 20 20 |=""..$B | |
|00000cb0| 20 c8 95 20 3f 49 25 3e | 33 31 20 80 20 43 25 3e | .. ?I%>|31 . C%>|
|00000cc0| 3d 78 25 20 80 20 43 25 | 3c 3d 58 25 20 54 24 2b |=x% . C%|<=X% T$+|
|00000cd0| 3d bd 28 3f 49 25 29 3a | 43 25 2b 3d 31 3a 49 25 |=.(?I%):|C%+=1:I%|
|00000ce0| 2b 3d 31 3a ce 0d 04 2e | 1d 20 20 20 20 20 20 20 |+=1:....|. |
|00000cf0| 20 20 20 f1 54 24 3a 49 | 25 2d 3d 31 3a 43 25 2d | .T$:I|%-=1:C%-|
|00000d00| 3d 31 0d 04 38 0d 20 20 | 20 20 20 20 20 20 cd 0d |=1..8. | ..|
|00000d10| 04 42 11 20 20 20 20 20 | 20 20 20 43 25 2b 3d 31 |.B. | C%+=1|
|00000d20| 0d 04 4c 0b 20 20 20 20 | 20 20 cd 0d 04 56 0f 20 |..L. | ...V. |
|00000d30| 20 20 20 20 20 49 25 2b | 3d 31 0d 04 60 09 20 20 | I%+|=1..`. |
|00000d40| 20 20 ce 0d 04 6a 14 20 | 20 20 20 48 25 2b 3d 31 | ...j. | H%+=1|
|00000d50| 3a 50 25 3d 21 50 25 0d | 04 74 07 20 20 ce 0d 04 |:P%=!P%.|.t. ...|
|00000d60| 7e 18 20 20 c8 99 20 26 | 34 30 30 43 41 2c 2c 42 |~. .. &|400CA,,B|
|00000d70| 25 20 b8 20 4d 25 0d 04 | 88 05 ce 0d 04 92 06 3d |% . M%..|.......=|
|00000d80| b9 0d 04 9c 04 0d 04 a6 | 17 2a 7c 73 74 6f 70 20 |........|.*|stop |
|00000d90| 46 4e 73 74 77 5f 72 65 | 64 72 61 77 0d 04 b0 1d |FNstw_re|draw....|
|00000da0| 2a 7c 73 74 61 72 74 20 | 50 52 4f 43 73 74 77 5f |*|start |PROCstw_|
|00000db0| 73 65 74 65 78 74 65 6e | 74 0d 04 ba 2a 2a 7c 21 |setexten|t...**|!|
|00000dc0| 50 52 4f 43 73 74 77 5f | 73 65 74 65 78 74 65 6e |PROCstw_|setexten|
|00000dd0| 74 28 20 77 69 6e 64 6f | 77 20 2c 20 6d 69 6e 5f |t( windo|w , min_|
|00000de0| 78 20 29 0d 04 c4 07 2a | 7c 21 0d 04 ce 3f 2a 7c |x )....*||!...?*||
|00000df0| 21 53 65 74 73 20 74 68 | 65 20 77 6f 72 6b 20 61 |!Sets th|e work a|
|00000e00| 72 65 61 20 66 6f 72 20 | 74 68 65 20 67 69 76 65 |rea for |the give|
|00000e10| 6e 20 53 54 57 20 74 6f | 20 72 65 66 6c 65 63 74 |n STW to| reflect|
|00000e20| 20 74 68 65 20 74 65 78 | 74 0d 04 d8 42 2a 7c 21 | the tex|t...B*|!|
|00000e30| 63 6f 6e 74 61 69 6e 65 | 64 20 77 69 74 68 69 6e |containe|d within|
|00000e40| 20 69 74 2e 20 6d 69 6e | 5f 78 20 72 65 66 6c 65 | it. min|_x refle|
|00000e50| 63 74 73 20 74 68 65 20 | 6d 69 6e 69 6d 75 6d 20 |cts the |minimum |
|00000e60| 78 20 77 69 64 74 68 20 | 79 6f 75 0d 04 e2 43 2a |x width |you...C*|
|00000e70| 7c 21 77 61 6e 74 20 69 | 6e 20 63 68 61 72 61 63 ||!want i|n charac|
|00000e80| 74 65 72 73 20 28 6c 65 | 73 73 20 6d 61 72 67 69 |ters (le|ss margi|
|00000e90| 6e 73 29 2c 20 30 20 73 | 65 74 73 20 69 74 20 74 |ns), 0 s|ets it t|
|00000ea0| 6f 20 74 68 65 20 77 69 | 64 74 68 20 6f 66 0d 04 |o the wi|dth of..|
|00000eb0| ec 41 2a 7c 21 74 68 65 | 20 74 65 78 74 2e 20 4e |.A*|!the| text. N|
|00000ec0| 6f 74 65 20 74 68 65 20 | 65 78 74 65 6e 74 20 77 |ote the |extent w|
|00000ed0| 69 6c 6c 20 4e 4f 54 20 | 62 65 20 73 65 74 20 74 |ill NOT |be set t|
|00000ee0| 6f 20 6c 65 73 73 20 74 | 68 61 6e 20 74 68 65 0d |o less t|han the.|
|00000ef0| 04 f6 28 2a 7c 21 63 75 | 72 72 65 6e 74 20 64 69 |..(*|!cu|rrent di|
|00000f00| 6d 65 6e 73 69 6f 6e 73 | 20 6f 66 20 74 68 65 20 |mensions| of the |
|00000f10| 77 69 6e 64 6f 77 2e 0d | 05 00 1a dd f2 73 74 77 |window..|.....stw|
|00000f20| 5f 73 65 74 65 78 74 65 | 6e 74 28 57 25 2c 78 25 |_setexte|nt(W%,x%|
|00000f30| 29 0d 05 0a 17 ea 20 58 | 25 2c 59 25 2c 50 25 2c |)..... X|%,Y%,P%,|
|00000f40| 4c 25 2c 48 25 2c 49 25 | 0d 05 14 39 e7 20 a4 77 |L%,H%,I%|...9. .w|
|00000f50| 69 6e 5f 66 69 6e 64 74 | 79 70 65 28 57 25 29 3c |in_findt|ype(W%)<|
|00000f60| 3e 31 20 f2 77 69 6d 70 | 5f 65 72 72 6f 72 28 31 |>1 .wimp|_error(1|
|00000f70| 2c 30 2c 22 49 6e 76 61 | 6c 69 64 20 53 54 57 22 |,0,"Inva|lid STW"|
|00000f80| 29 0d 05 1e 43 f2 77 69 | 6e 5f 67 65 74 73 69 7a |)...C.wi|n_getsiz|
|00000f90| 65 28 57 25 2c 58 25 2c | 59 25 29 3a 50 25 3d 21 |e(W%,X%,|Y%):P%=!|
|00000fa0| 28 57 25 2d 31 32 29 3a | 48 25 3d 30 3a e7 20 28 |(W%-12):|H%=0:. (|
|00000fb0| 31 36 2a 78 25 29 3e 58 | 25 20 8c 20 58 25 3d 31 |16*x%)>X|% . X%=1|
|00000fc0| 36 2a 78 25 0d 05 28 0c | c8 95 20 50 25 3c 3e 30 |6*x%..(.|.. P%<>0|
|00000fd0| 0d 05 32 12 20 20 49 25 | 3d 50 25 2b 34 3a 4c 25 |..2. I%|=P%+4:L%|
|00000fe0| 3d 30 0d 05 3c 10 20 20 | c8 95 20 3f 49 25 3c 3e |=0..<. |.. ?I%<>|
|00000ff0| 31 33 0d 05 46 18 20 20 | 20 20 e7 20 3f 49 25 3e |13..F. | . ?I%>|
|00001000| 33 31 20 8c 20 4c 25 2b | 3d 31 0d 05 50 0d 20 20 |31 . L%+|=1..P. |
|00001010| 20 20 49 25 2b 3d 31 0d | 05 5a 1e 20 20 ce 3a 4c | I%+=1.|.Z. .:L|
|00001020| 25 3d 4c 25 2a 31 36 3a | e7 20 4c 25 3e 58 25 20 |%=L%*16:|. L%>X% |
|00001030| 58 25 3d 4c 25 0d 05 64 | 12 20 20 50 25 3d 21 50 |X%=L%..d|. P%=!P|
|00001040| 25 3a 48 25 2b 3d 31 0d | 05 6e 1c ce 3a 48 25 3d |%:H%+=1.|.n..:H%=|
|00001050| 48 25 2a 33 32 3a e7 20 | 48 25 3e 59 25 20 59 25 |H%*32:. |H%>Y% Y%|
|00001060| 3d 48 25 0d 05 78 30 f2 | 77 69 6e 5f 73 65 74 65 |=H%..x0.|win_sete|
|00001070| 78 74 65 6e 74 28 57 25 | 2c 30 2c 2d 59 25 2c 58 |xtent(W%|,0,-Y%,X|
|00001080| 25 2b 32 2a 5f 73 74 77 | 5f 6d 61 72 67 69 6e 25 |%+2*_stw|_margin%|
|00001090| 2c 30 29 0d 05 82 05 e1 | 0d 05 8c 04 0d 05 96 1c |,0).....|........|
|000010a0| 2a 7c 73 74 6f 70 20 50 | 52 4f 43 73 74 77 5f 73 |*|stop P|ROCstw_s|
|000010b0| 65 74 65 78 74 65 6e 74 | 0d 05 a0 1d 2a 7c 73 74 |etextent|....*|st|
|000010c0| 61 72 74 20 50 52 4f 43 | 73 74 77 5f 73 65 74 6d |art PROC|stw_setm|
|000010d0| 61 72 67 69 6e 0d 05 aa | 22 2a 7c 21 50 52 4f 43 |argin...|"*|!PROC|
|000010e0| 73 74 77 5f 73 65 74 6d | 61 72 67 69 6e 28 20 6d |stw_setm|argin( m|
|000010f0| 61 72 67 69 6e 20 29 0d | 05 b4 07 2a 7c 21 0d 05 |argin ).|...*|!..|
|00001100| be 42 2a 7c 21 53 65 74 | 73 20 74 68 65 20 6c 65 |.B*|!Set|s the le|
|00001110| 66 74 20 28 61 6e 64 20 | 72 69 67 68 74 29 20 6d |ft (and |right) m|
|00001120| 61 72 67 69 6e 73 20 66 | 6f 77 20 61 6c 6c 20 53 |argins f|ow all S|
|00001130| 54 57 73 20 74 6f 20 74 | 68 65 20 67 69 76 65 6e |TWs to t|he given|
|00001140| 0d 05 c8 39 2a 7c 21 73 | 69 7a 65 2e 20 45 67 2e |...9*|!s|ize. Eg.|
|00001150| 20 61 20 76 61 6c 75 65 | 20 6f 66 20 31 36 20 67 | a value| of 16 g|
|00001160| 69 76 65 73 20 31 20 63 | 68 61 72 61 63 74 65 72 |ives 1 c|haracter|
|00001170| 20 6d 61 72 67 69 6e 73 | 2e 0d 05 d2 17 dd f2 73 | margins|.......s|
|00001180| 74 77 5f 73 65 74 6d 61 | 72 67 69 6e 28 4d 25 29 |tw_setma|rgin(M%)|
|00001190| 0d 05 dc 13 5f 73 74 77 | 5f 6d 61 72 67 69 6e 25 |...._stw|_margin%|
|000011a0| 3d 4d 25 0d 05 e6 05 e1 | 0d 05 f0 04 0d 05 fa 1c |=M%.....|........|
|000011b0| 2a 7c 73 74 6f 70 20 50 | 52 4f 43 73 74 77 5f 73 |*|stop P|ROCstw_s|
|000011c0| 65 74 6d 61 72 67 69 6e | 0d ff |etmargin|.. |
+--------+-------------------------+-------------------------+--------+--------+