home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1989-09-14 | 13.4 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| AMOS Picture Packer (image/amosPicturePacker)
| ext
| Supported |
1%
| dexvert
| Debian floppy split (archive/debianFloppySplit)
| ext
| Unsupported |
1%
| dexvert
| Sound Images sound sample (audio/soundImagesSoundSample)
| ext
| Unsupported |
1%
| dexvert
| DESI-III drawing (image/desiIIIDrawing)
| ext
| Unsupported |
1%
| dexvert
| MS-DOS PMODE extender executable (executable/msdosPMODEExtenderExecutable)
| ext
| Unsupported |
1%
| dexvert
| Alien Trilogytextures (other/alienTrilogyTextures)
| ext
| Unsupported |
1%
| dexvert
| APT cache data (other/aptCacheData)
| ext
| Unsupported |
1%
| dexvert
| CorelTRACE configuration (other/corelTRACEConfiguration)
| ext
| Unsupported |
1%
| dexvert
| Dreamcast Disc (other/dreamcastDisc)
| ext
| Unsupported |
1%
| dexvert
| EST flat binary (other/estFlatBinary)
| ext
| Unsupported |
1%
| dexvert
| Finale Enigma Binary Format (other/finaleEnigmaBinaryFormat)
| ext
| Unsupported |
1%
| dexvert
| Sega Genesis/Megadrive/32x ROM (other/genesisROM)
| ext
| Unsupported |
1%
| dexvert
| Myth: The Fallen Lords game archive (other/mythTheFallenLordsGameArchive)
| ext
| Unsupported |
1%
| dexvert
| Sound Images Sound Driver (other/soundImagesSoundDriver)
| ext
| Unsupported |
1%
| dexvert
| Symantec/Norton Config (other/symantecNortonConfig)
| ext
| Unsupported |
1%
| dexvert
| Vectrex ROM (other/vectrexROM)
| ext
| Unsupported |
1%
| dexvert
| BIS raP encoded format (other/bisraPEncoded)
| ext
| Unsupported |
1%
| dexvert
| Pascal Script binary (other/pascalScriptBinary)
| ext
| Unsupported |
1%
| dexvert
| 7th Level game data archive (other/seventhLevelGameDataArchive)
| ext
| Unsupported |
1%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Binary Text (image/binaryText)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary, Sat Feb 4 11:17:08 1989, modified Wed Feb 8 18:54:07 1989, creator Think C, type ASCII, 13451 bytes "crushmenu.c"
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 1
| default (weak)
| |
100%
| lsar
| MacBinary
| default
| |
100%
| gt2
| MAC Bilddatei
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 63 72 75 73 68 6d | 65 6e 75 2e 63 00 00 00 |..crushm|enu.c...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 34 8b 00 | 00 00 00 a0 10 d2 84 a0 |.....4..|........|
|00000060| 16 83 9f 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 2f 2a 0d 20 2a 20 63 72 | 75 73 68 6d 65 6e 75 2e |/*. * cr|ushmenu.|
|00000090| 63 20 2d 20 61 20 63 75 | 73 74 6f 6d 20 4d 65 6e |c - a cu|stom Men|
|000000a0| 75 20 44 65 66 69 6e 69 | 74 69 6f 6e 20 70 72 6f |u Defini|tion pro|
|000000b0| 63 65 64 75 72 65 2e 0d | 20 2a 2f 0d 0d 23 69 6e |cedure..| */..#in|
|000000c0| 63 6c 75 64 65 20 3c 4d | 65 6d 6f 72 79 4d 67 72 |clude <M|emoryMgr|
|000000d0| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 51 75 |.h>.#inc|lude <Qu|
|000000e0| 69 63 6b 64 72 61 77 2e | 68 3e 0d 23 69 6e 63 6c |ickdraw.|h>.#incl|
|000000f0| 75 64 65 20 3c 4d 65 6e | 75 4d 67 72 2e 68 3e 0d |ude <Men|uMgr.h>.|
|00000100| 23 69 6e 63 6c 75 64 65 | 20 3c 54 6f 6f 6c 62 6f |#include| <Toolbo|
|00000110| 78 55 74 69 6c 2e 68 3e | 0d 0d 23 64 65 66 69 6e |xUtil.h>|..#defin|
|00000120| 65 20 49 43 4f 4e 53 49 | 44 45 09 33 32 09 2f 2a |e ICONSI|DE.32./*|
|00000130| 20 53 69 7a 65 20 28 70 | 69 78 65 6c 73 29 20 6f | Size (p|ixels) o|
|00000140| 66 20 6f 6e 65 20 73 69 | 64 65 20 6f 66 20 61 6e |f one si|de of an|
|00000150| 20 69 63 6f 6e 20 2a 2f | 0d 23 64 65 66 69 6e 65 | icon */|.#define|
|00000160| 20 49 43 4f 4e 5f 48 4d | 41 52 47 09 34 09 2f 2a | ICON_HM|ARG.4./*|
|00000170| 20 4d 61 72 67 69 6e 20 | 66 6f 72 20 6c 65 66 74 | Margin |for left|
|00000180| 20 61 6e 64 20 72 69 67 | 68 74 20 6f 66 20 61 6e | and rig|ht of an|
|00000190| 20 69 63 6f 6e 20 2a 2f | 0d 23 64 65 66 69 6e 65 | icon */|.#define|
|000001a0| 20 49 43 4f 4e 5f 56 4d | 41 52 47 09 32 09 2f 2a | ICON_VM|ARG.2./*|
|000001b0| 20 4d 61 72 67 69 6e 20 | 66 6f 72 20 74 6f 70 20 | Margin |for top |
|000001c0| 61 6e 64 20 62 6f 74 74 | 6f 6d 20 6f 66 20 61 6e |and bott|om of an|
|000001d0| 20 69 63 6f 6e 20 2a 2f | 0d 0d 23 64 65 66 69 6e | icon */|..#defin|
|000001e0| 65 20 48 53 4c 49 44 45 | 09 36 09 2f 2a 20 6e 75 |e HSLIDE|.6./* nu|
|000001f0| 6d 62 65 72 20 6f 66 20 | 70 69 78 65 6c 73 20 65 |mber of |pixels e|
|00000200| 61 63 68 20 73 75 63 63 | 65 73 73 69 76 65 20 65 |ach succ|essive e|
|00000210| 6e 74 72 79 20 69 73 20 | 73 68 69 66 74 65 64 20 |ntry is |shifted |
|00000220| 6c 65 66 74 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |left */.|#define |
|00000230| 52 4d 41 52 47 09 35 09 | 2f 2a 20 70 69 78 65 6c |RMARG.5.|/* pixel|
|00000240| 73 20 6f 66 20 62 6c 61 | 6e 6b 20 74 6f 20 74 68 |s of bla|nk to th|
|00000250| 65 20 72 69 67 68 74 20 | 6f 66 20 74 68 65 20 69 |e right |of the i|
|00000260| 74 65 6d 20 74 65 78 74 | 20 2a 2f 0d 0d 2f 2a 0d |tem text| */../*.|
|00000270| 20 2a 20 54 68 65 20 6d | 65 6e 75 44 61 74 61 20 | * The m|enuData |
|00000280| 66 69 65 6c 64 20 6f 66 | 20 74 68 65 20 6d 65 6e |field of| the men|
|00000290| 75 27 73 20 73 74 72 75 | 63 74 75 72 65 0d 20 2a |u's stru|cture. *|
|000002a0| 20 69 73 20 61 20 70 69 | 6c 65 20 6f 66 20 76 61 | is a pi|le of va|
|000002b0| 72 69 61 62 6c 65 2d 6c | 65 6e 67 74 68 20 66 69 |riable-l|ength fi|
|000002c0| 65 6c 64 73 2e 20 20 42 | 61 73 69 63 61 6c 6c 79 |elds. B|asically|
|000002d0| 2c 20 69 74 27 73 3a 0d | 20 2a 09 09 50 61 73 63 |, it's:.| *..Pasc|
|000002e0| 61 6c 20 73 74 72 69 6e | 67 20 6f 66 20 74 68 65 |al strin|g of the|
|000002f0| 20 54 69 74 6c 65 3b 0d | 20 2a 09 09 50 61 73 63 | Title;.| *..Pasc|
|00000300| 61 6c 20 73 74 72 69 6e | 67 20 6f 66 20 74 68 65 |al strin|g of the|
|00000310| 20 66 69 72 73 74 20 6d | 65 6e 75 20 69 74 65 6d | first m|enu item|
|00000320| 3b 0d 20 2a 09 09 73 74 | 72 75 63 74 20 69 74 65 |;. *..st|ruct ite|
|00000330| 6d 69 6e 66 6f 20 6f 66 | 20 74 68 65 20 66 69 72 |minfo of| the fir|
|00000340| 73 74 20 6d 65 6e 75 20 | 69 74 65 6d 3b 0d 20 2a |st menu |item;. *|
|00000350| 09 09 50 61 73 63 61 6c | 20 73 74 72 69 6e 67 20 |..Pascal| string |
|00000360| 6f 66 20 74 68 65 20 73 | 65 63 6f 6e 64 20 6d 65 |of the s|econd me|
|00000370| 6e 75 20 69 74 65 6d 2e | 2e 2e 0d 20 2a 20 54 68 |nu item.|... * Th|
|00000380| 65 20 6c 69 73 74 20 69 | 73 20 65 6e 64 65 64 20 |e list i|s ended |
|00000390| 62 79 20 61 20 50 61 73 | 63 61 6c 20 73 74 72 69 |by a Pas|cal stri|
|000003a0| 6e 67 20 6f 66 20 6c 65 | 6e 67 74 68 20 30 2e 0d |ng of le|ngth 0..|
|000003b0| 20 2a 2f 0d 0d 73 74 72 | 75 63 74 20 69 74 65 6d | */..str|uct item|
|000003c0| 69 6e 66 6f 20 7b 0d 09 | 63 68 61 72 20 69 63 6f |info {..|char ico|
|000003d0| 6e 6e 75 6d 3b 09 2f 2a | 20 65 6e 63 6f 64 65 64 |nnum;./*| encoded|
|000003e0| 20 52 65 73 6f 75 72 63 | 65 20 49 44 20 6f 66 20 | Resourc|e ID of |
|000003f0| 74 68 65 20 69 74 65 6d | 27 73 20 69 63 6f 6e 20 |the item|'s icon |
|00000400| 28 6f 72 20 30 29 20 2a | 2f 0d 09 63 68 61 72 20 |(or 0) *|/..char |
|00000410| 6b 65 79 65 71 75 69 76 | 3b 09 2f 2a 20 69 74 73 |keyequiv|;./* its|
|00000420| 20 6b 65 79 62 6f 61 72 | 64 20 65 71 75 69 76 61 | keyboar|d equiva|
|00000430| 6c 65 6e 74 20 28 6f 72 | 20 30 29 20 2a 2f 0d 09 |lent (or| 0) */..|
|00000440| 63 68 61 72 20 6d 61 72 | 6b 3b 09 09 2f 2a 20 69 |char mar|k;../* i|
|00000450| 74 73 20 6d 61 72 6b 69 | 6e 67 20 63 68 61 72 61 |ts marki|ng chara|
|00000460| 63 74 65 72 20 28 6f 72 | 20 30 29 20 2a 2f 0d 09 |cter (or| 0) */..|
|00000470| 53 74 79 6c 65 20 74 73 | 74 79 6c 65 3b 09 2f 2a |Style ts|tyle;./*|
|00000480| 20 69 74 73 20 74 65 78 | 74 27 73 20 73 74 79 6c | its tex|t's styl|
|00000490| 65 20 2a 2f 0d 7d 3b 0d | 0d 2f 2a 0d 20 2a 20 73 |e */.};.|./*. * s|
|000004a0| 74 72 75 63 74 20 63 6f | 6d 6d 6f 6e 73 20 2d 20 |truct co|mmons - |
|000004b0| 63 6f 6d 6d 6f 6e 20 69 | 6e 66 6f 72 6d 61 74 69 |common i|nformati|
|000004c0| 6f 6e 20 65 61 63 68 20 | 72 6f 75 74 69 6e 65 20 |on each |routine |
|000004d0| 77 69 6c 6c 20 62 65 20 | 69 6e 74 65 72 65 73 74 |will be |interest|
|000004e0| 65 64 20 69 6e 2e 0d 20 | 2a 0d 20 2a 20 54 6f 20 |ed in.. |*. * To |
|000004f0| 73 61 76 65 20 63 6f 64 | 65 2c 20 74 68 65 20 6d |save cod|e, the m|
|00000500| 61 69 6e 20 72 6f 75 74 | 69 6e 65 20 63 61 6c 63 |ain rout|ine calc|
|00000510| 75 6c 61 74 65 73 20 74 | 68 65 20 63 6f 6d 6d 6f |ulates t|he commo|
|00000520| 6e 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2c 0d 20 |n inform|ation,. |
|00000530| 2a 20 74 68 65 6e 20 70 | 61 73 73 65 73 20 74 6f |* then p|asses to|
|00000540| 20 65 61 63 68 20 73 75 | 62 72 6f 75 74 69 6e 65 | each su|broutine|
|00000550| 20 61 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 74 68 | a point|er to th|
|00000560| 65 20 62 6c 6f 63 6b 20 | 6f 66 20 69 6e 66 6f 72 |e block |of infor|
|00000570| 6d 61 74 69 6f 6e 2e 0d | 20 2a 2f 0d 0d 73 74 72 |mation..| */..str|
|00000580| 75 63 74 20 63 6f 6d 6d | 6f 6e 73 20 7b 0d 09 46 |uct comm|ons {..F|
|00000590| 6f 6e 74 49 6e 66 6f 20 | 66 69 6e 66 6f 3b 09 09 |ontInfo |finfo;..|
|000005a0| 2f 2a 20 74 68 65 20 64 | 69 6d 65 6e 73 69 6f 6e |/* the d|imension|
|000005b0| 73 20 6f 66 20 74 68 65 | 20 53 79 73 74 65 6d 20 |s of the| System |
|000005c0| 46 6f 6e 74 20 2a 2f 0d | 09 69 6e 74 20 6c 68 65 |Font */.|.int lhe|
|000005d0| 69 67 68 74 3b 09 09 2f | 2a 20 74 68 65 20 68 65 |ight;../|* the he|
|000005e0| 69 67 68 74 20 6f 66 20 | 6f 6e 65 20 74 65 78 74 |ight of |one text|
|000005f0| 20 6c 69 6e 65 20 2a 2f | 0d 09 69 6e 74 20 63 6c | line */|..int cl|
|00000600| 6f 76 65 72 77 69 64 74 | 68 3b 09 2f 2a 20 74 68 |overwidt|h;./* th|
|00000610| 65 20 77 69 64 74 68 20 | 6f 66 20 74 68 65 20 63 |e width |of the c|
|00000620| 6c 6f 76 65 72 20 28 22 | 63 6f 6d 6d 61 6e 64 22 |lover ("|command"|
|00000630| 29 20 73 79 6d 62 6f 6c | 20 2a 2f 0d 09 69 6e 74 |) symbol| */..int|
|00000640| 20 63 68 65 63 6b 77 69 | 64 74 68 3b 09 09 2f 2a | checkwi|dth;../*|
|00000650| 20 74 68 65 20 77 69 64 | 74 68 20 6f 66 20 74 68 | the wid|th of th|
|00000660| 65 20 63 68 65 63 6b 2d | 6d 61 72 6b 20 63 68 61 |e check-|mark cha|
|00000670| 72 61 63 74 65 72 20 2a | 2f 0d 09 69 6e 74 20 6e |racter *|/..int n|
|00000680| 75 6d 69 74 65 6d 73 3b | 09 09 2f 2a 20 74 68 65 |umitems;|../* the|
|00000690| 20 6e 75 6d 62 65 72 20 | 6f 66 20 69 74 65 6d 73 | number |of items|
|000006a0| 20 69 6e 20 74 68 65 20 | 6d 65 6e 75 20 2a 2f 0d | in the |menu */.|
|000006b0| 7d 3b 0d 0d 2f 2a 0d 20 | 2a 20 6d 61 69 6e 28 29 |};../*. |* main()|
|000006c0| 20 2d 20 74 68 65 20 65 | 6e 74 72 79 2d 70 6f 69 | - the e|ntry-poi|
|000006d0| 6e 74 20 74 6f 20 6f 75 | 72 20 63 75 73 74 6f 6d |nt to ou|r custom|
|000006e0| 20 6d 65 6e 75 20 64 65 | 66 69 6e 69 74 69 6f 6e | menu de|finition|
|000006f0| 2e 0d 20 2a 0d 20 2a 20 | 42 65 63 61 75 73 65 20 |.. *. * |Because |
|00000700| 74 68 65 20 4d 44 45 46 | 20 6d 75 73 74 20 62 65 |the MDEF| must be|
|00000710| 20 61 20 70 75 72 65 2d | 63 6f 64 65 20 72 65 73 | a pure-|code res|
|00000720| 6f 75 72 63 65 2c 0d 20 | 2a 20 77 65 20 63 61 6e |ource,. |* we can|
|00000730| 27 74 20 75 73 65 20 61 | 6e 79 20 67 6c 6f 62 61 |'t use a|ny globa|
|00000740| 6c 20 6f 72 20 73 74 61 | 74 69 63 20 64 61 74 61 |l or sta|tic data|
|00000750| 2c 0d 20 2a 20 77 68 69 | 63 68 20 66 6f 72 63 65 |,. * whi|ch force|
|00000760| 73 20 75 73 20 74 6f 20 | 72 65 63 61 6c 63 75 6c |s us to |recalcul|
|00000770| 61 74 65 20 61 20 6c 6f | 74 20 6f 66 20 69 6e 66 |ate a lo|t of inf|
|00000780| 6f 72 6d 61 74 69 6f 6e | 0d 20 2a 20 65 61 63 68 |ormation|. * each|
|00000790| 20 74 69 6d 65 20 77 65 | 27 72 65 20 63 61 6c 6c | time we|'re call|
|000007a0| 65 64 2e 0d 20 2a 2f 0d | 0d 70 61 73 63 61 6c 20 |ed.. */.|.pascal |
|000007b0| 76 6f 69 64 0d 6d 61 69 | 6e 28 6f 70 2c 20 6d 65 |void.mai|n(op, me|
|000007c0| 6e 75 68 2c 20 6d 72 65 | 63 74 70 2c 20 70 74 2c |nuh, mre|ctp, pt,|
|000007d0| 20 74 68 65 69 74 65 6d | 70 29 0d 69 6e 74 20 6f | theitem|p).int o|
|000007e0| 70 3b 09 09 09 09 2f 2a | 20 74 68 65 20 6f 70 65 |p;..../*| the ope|
|000007f0| 72 61 74 69 6f 6e 20 74 | 6f 20 70 65 72 66 6f 72 |ration t|o perfor|
|00000800| 6d 20 2a 2f 0d 4d 65 6e | 75 48 61 6e 64 6c 65 20 |m */.Men|uHandle |
|00000810| 6d 65 6e 75 68 3b 09 2f | 2a 20 74 68 65 20 6d 65 |menuh;./|* the me|
|00000820| 6e 75 20 74 6f 20 6f 70 | 65 72 61 74 65 20 6f 6e |nu to op|erate on|
|00000830| 20 2a 2f 0d 52 65 63 74 | 20 2a 6d 72 65 63 74 70 | */.Rect| *mrectp|
|00000840| 3b 09 09 2f 2a 20 74 68 | 65 20 52 65 63 74 20 65 |;../* th|e Rect e|
|00000850| 6e 63 6c 6f 73 69 6e 67 | 20 74 68 65 20 6d 65 6e |nclosing| the men|
|00000860| 75 20 28 67 6c 6f 62 61 | 6c 20 63 6f 6f 72 64 69 |u (globa|l coordi|
|00000870| 6e 61 74 65 73 29 20 2a | 2f 0d 50 6f 69 6e 74 20 |nates) *|/.Point |
|00000880| 70 74 3b 09 09 09 2f 2a | 20 74 68 65 20 6d 6f 75 |pt;.../*| the mou|
|00000890| 73 65 20 6c 6f 63 61 74 | 69 6f 6e 20 28 67 6c 6f |se locat|ion (glo|
|000008a0| 62 61 6c 20 63 6f 6f 72 | 64 69 6e 61 74 65 73 29 |bal coor|dinates)|
|000008b0| 20 2a 2f 0d 69 6e 74 20 | 2a 74 68 65 69 74 65 6d | */.int |*theitem|
|000008c0| 70 3b 09 09 2f 2a 20 74 | 68 65 20 68 69 67 68 6c |p;../* t|he highl|
|000008d0| 69 67 68 74 65 64 20 69 | 74 65 6d 20 2a 2f 0d 7b |ighted i|tem */.{|
|000008e0| 0d 09 73 74 72 75 63 74 | 20 63 6f 6d 6d 6f 6e 73 |..struct| commons|
|000008f0| 20 63 6f 6d 6d 3b 20 2f | 2a 20 74 68 65 20 69 6e | comm; /|* the in|
|00000900| 66 6f 20 6f 66 20 63 6f | 6d 6d 6f 6e 20 69 6e 74 |fo of co|mmon int|
|00000910| 65 72 65 73 74 20 2a 2f | 0d 09 63 68 61 72 20 2a |erest */|..char *|
|00000920| 6d 63 70 3b 09 09 2f 2a | 20 22 4d 65 6e 75 20 43 |mcp;../*| "Menu C|
|00000930| 68 61 72 2d 50 6f 69 6e | 74 65 72 22 20 66 6f 72 |har-Poin|ter" for|
|00000940| 20 74 72 61 76 65 72 73 | 69 6e 67 20 74 68 65 20 | travers|ing the |
|00000950| 6d 65 6e 75 44 61 74 61 | 20 66 69 65 6c 64 73 20 |menuData| fields |
|00000960| 2a 2f 0d 09 0d 09 2f 2a | 0d 09 20 2a 20 43 61 6c |*/..../*|.. * Cal|
|00000970| 63 75 6c 61 74 65 20 74 | 68 65 20 69 6e 66 6f 20 |culate t|he info |
|00000980| 77 65 20 6e 65 65 64 20 | 72 65 67 61 72 64 6c 65 |we need |regardle|
|00000990| 73 73 20 6f 66 20 74 68 | 65 20 6f 70 65 72 61 74 |ss of th|e operat|
|000009a0| 69 6f 6e 2e 0d 09 20 2a | 2f 0d 09 0d 09 47 65 74 |ion... *|/....Get|
|000009b0| 46 6f 6e 74 49 6e 66 6f | 28 26 63 6f 6d 6d 2e 66 |FontInfo|(&comm.f|
|000009c0| 69 6e 66 6f 29 3b 0d 09 | 63 6f 6d 6d 2e 6c 68 65 |info);..|comm.lhe|
|000009d0| 69 67 68 74 20 3d 20 63 | 6f 6d 6d 2e 66 69 6e 66 |ight = c|omm.finf|
|000009e0| 6f 2e 61 73 63 65 6e 74 | 20 2b 20 63 6f 6d 6d 2e |o.ascent| + comm.|
|000009f0| 66 69 6e 66 6f 2e 64 65 | 73 63 65 6e 74 20 2b 20 |finfo.de|scent + |
|00000a00| 63 6f 6d 6d 2e 66 69 6e | 66 6f 2e 6c 65 61 64 69 |comm.fin|fo.leadi|
|00000a10| 6e 67 3b 0d 09 63 6f 6d | 6d 2e 63 6c 6f 76 65 72 |ng;..com|m.clover|
|00000a20| 77 69 64 74 68 20 3d 20 | 43 68 61 72 57 69 64 74 |width = |CharWidt|
|00000a30| 68 28 28 63 68 61 72 29 | 20 30 78 31 31 29 3b 0d |h((char)| 0x11);.|
|00000a40| 09 63 6f 6d 6d 2e 63 68 | 65 63 6b 77 69 64 74 68 |.comm.ch|eckwidth|
|00000a50| 20 3d 20 43 68 61 72 57 | 69 64 74 68 28 28 63 68 | = CharW|idth((ch|
|00000a60| 61 72 29 20 30 78 31 32 | 29 3b 0d 09 0d 09 63 6f |ar) 0x12|);....co|
|00000a70| 6d 6d 2e 6e 75 6d 69 74 | 65 6d 73 20 3d 20 30 3b |mm.numit|ems = 0;|
|00000a80| 0d 09 6d 63 70 20 3d 20 | 28 63 68 61 72 20 2a 29 |..mcp = |(char *)|
|00000a90| 20 26 28 28 2a 6d 65 6e | 75 68 29 2d 3e 6d 65 6e | &((*men|uh)->men|
|00000aa0| 75 44 61 74 61 29 3b 0d | 09 6d 63 70 20 2b 3d 20 |uData);.|.mcp += |
|00000ab0| 28 28 69 6e 74 29 20 2a | 6d 63 70 20 26 20 30 78 |((int) *|mcp & 0x|
|00000ac0| 46 46 29 20 2b 20 31 3b | 09 09 09 2f 2a 20 73 6b |FF) + 1;|.../* sk|
|00000ad0| 69 70 20 70 61 73 74 20 | 74 68 65 20 74 69 74 6c |ip past |the titl|
|00000ae0| 65 20 73 74 72 69 6e 67 | 20 2a 2f 0d 09 77 68 69 |e string| */..whi|
|00000af0| 6c 65 20 28 2a 6d 63 70 | 29 20 7b 0d 09 09 2b 2b |le (*mcp|) {...++|
|00000b00| 63 6f 6d 6d 2e 6e 75 6d | 69 74 65 6d 73 3b 0d 09 |comm.num|items;..|
|00000b10| 09 6d 63 70 20 2b 3d 20 | 28 28 69 6e 74 29 20 2a |.mcp += |((int) *|
|00000b20| 6d 63 70 20 26 20 30 78 | 46 46 29 20 2b 20 31 20 |mcp & 0x|FF) + 1 |
|00000b30| 2b 20 73 69 7a 65 6f 66 | 28 73 74 72 75 63 74 20 |+ sizeof|(struct |
|00000b40| 69 74 65 6d 69 6e 66 6f | 29 3b 0d 09 7d 0d 09 0d |iteminfo|);..}...|
|00000b50| 09 2f 2a 0d 09 20 2a 20 | 4e 6f 77 20 64 6f 20 74 |./*.. * |Now do t|
|00000b60| 68 65 20 72 65 71 75 65 | 73 74 65 64 20 6f 70 65 |he reque|sted ope|
|00000b70| 72 61 74 69 6f 6e 2e 0d | 09 20 2a 2f 0d 09 20 0d |ration..|. */.. .|
|00000b80| 09 73 77 69 74 63 68 28 | 6f 70 29 20 7b 0d 09 63 |.switch(|op) {..c|
|00000b90| 61 73 65 20 6d 53 69 7a | 65 4d 73 67 3a 09 09 09 |ase mSiz|eMsg:...|
|00000ba0| 2f 2a 20 66 69 6e 64 20 | 74 68 65 20 64 69 6d 65 |/* find |the dime|
|00000bb0| 6e 73 69 6f 6e 73 20 6f | 66 20 74 68 65 20 6d 65 |nsions o|f the me|
|00000bc0| 6e 75 20 2a 2f 0d 09 09 | 6d 73 69 7a 65 28 26 63 |nu */...|msize(&c|
|00000bd0| 6f 6d 6d 2c 20 6d 65 6e | 75 68 29 3b 0d 09 09 62 |omm, men|uh);...b|
|00000be0| 72 65 61 6b 3b 0d 09 63 | 61 73 65 20 6d 44 72 61 |reak;..c|ase mDra|
|00000bf0| 77 4d 73 67 3a 09 09 09 | 2f 2a 20 64 72 61 77 20 |wMsg:...|/* draw |
|00000c00| 74 68 65 20 6d 65 6e 75 | 20 2a 2f 0d 09 09 6d 64 |the menu| */...md|
|00000c10| 72 61 77 28 26 63 6f 6d | 6d 2c 20 6d 65 6e 75 68 |raw(&com|m, menuh|
|00000c20| 2c 20 6d 72 65 63 74 70 | 29 3b 0d 09 09 62 72 65 |, mrectp|);...bre|
|00000c30| 61 6b 3b 0d 09 63 61 73 | 65 20 6d 43 68 6f 6f 73 |ak;..cas|e mChoos|
|00000c40| 65 4d 73 67 3a 09 09 2f | 2a 20 66 69 6e 64 20 61 |eMsg:../|* find a|
|00000c50| 6e 64 20 68 69 67 68 6c | 69 67 68 74 20 74 68 65 |nd highl|ight the|
|00000c60| 20 69 74 65 6d 20 74 68 | 65 20 6d 6f 75 73 65 20 | item th|e mouse |
|00000c70| 69 73 20 69 6e 20 2a 2f | 0d 09 09 6d 63 68 6f 6f |is in */|...mchoo|
|00000c80| 73 65 28 26 63 6f 6d 6d | 2c 20 6d 65 6e 75 68 2c |se(&comm|, menuh,|
|00000c90| 20 6d 72 65 63 74 70 2c | 20 70 74 2c 20 74 68 65 | mrectp,| pt, the|
|00000ca0| 69 74 65 6d 70 29 3b 0d | 09 09 62 72 65 61 6b 3b |itemp);.|..break;|
|00000cb0| 0d 09 2f 2a 20 54 68 69 | 73 20 4d 44 45 46 20 64 |../* Thi|s MDEF d|
|00000cc0| 6f 65 73 6e 27 74 20 73 | 75 70 70 6f 72 74 20 74 |oesn't s|upport t|
|00000cd0| 68 65 20 70 6f 70 75 70 | 20 6d 65 73 73 61 67 65 |he popup| message|
|00000ce0| 2c 20 6d 50 6f 70 75 70 | 4d 73 67 2e 20 2a 2f 0d |, mPopup|Msg. */.|
|00000cf0| 09 7d 0d 7d 0d 0d 2f 2a | 0d 20 2a 20 6d 73 69 7a |.}.}../*|. * msiz|
|00000d00| 65 28 29 20 2d 20 63 61 | 6c 63 75 6c 61 74 65 20 |e() - ca|lculate |
|00000d10| 74 68 65 20 64 69 6d 65 | 6e 73 69 6f 6e 73 20 6f |the dime|nsions o|
|00000d20| 66 20 74 68 65 20 67 69 | 76 65 6e 20 6d 65 6e 75 |f the gi|ven menu|
|00000d30| 2c 0d 20 2a 20 70 6c 61 | 63 69 6e 67 20 74 68 65 |,. * pla|cing the|
|00000d40| 6d 20 69 6e 20 74 68 65 | 20 61 70 70 72 6f 70 72 |m in the| appropr|
|00000d50| 69 61 74 65 20 66 69 65 | 6c 64 73 20 6f 66 20 74 |iate fie|lds of t|
|00000d60| 68 65 20 6d 65 6e 75 20 | 73 74 72 75 63 74 75 72 |he menu |structur|
|00000d70| 65 2e 0d 20 2a 2f 0d 0d | 6d 73 69 7a 65 28 63 6f |e.. */..|msize(co|
|00000d80| 6d 6d 70 2c 20 6d 65 6e | 75 68 29 0d 73 74 72 75 |mmp, men|uh).stru|
|00000d90| 63 74 20 63 6f 6d 6d 6f | 6e 73 20 2a 63 6f 6d 6d |ct commo|ns *comm|
|00000da0| 70 3b 09 2f 2a 20 74 68 | 65 20 63 6f 6d 6d 6f 6e |p;./* th|e common|
|00000db0| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 2a 2f 0d | informa|tion */.|
|00000dc0| 4d 65 6e 75 48 61 6e 64 | 6c 65 20 6d 65 6e 75 68 |MenuHand|le menuh|
|00000dd0| 3b 0d 7b 0d 09 63 68 61 | 72 20 2a 6d 63 70 3b 09 |;.{..cha|r *mcp;.|
|00000de0| 09 2f 2a 20 22 4d 65 6e | 75 20 43 68 61 72 2d 50 |./* "Men|u Char-P|
|00000df0| 6f 69 6e 74 65 72 22 20 | 66 6f 72 20 74 72 61 76 |ointer" |for trav|
|00000e00| 65 72 73 69 6e 67 20 74 | 68 65 20 6d 65 6e 75 44 |ersing t|he menuD|
|00000e10| 61 74 61 20 66 69 65 6c | 64 73 20 2a 2f 0d 09 69 |ata fiel|ds */..i|
|00000e20| 6e 74 20 69 74 65 6d 6e | 75 6d 3b 09 2f 2a 20 69 |nt itemn|um;./* i|
|00000e30| 74 65 6d 20 6e 75 6d 62 | 65 72 20 6f 66 20 74 68 |tem numb|er of th|
|00000e40| 65 20 63 75 72 72 65 6e | 74 20 69 74 65 6d 20 2a |e curren|t item *|
|00000e50| 2f 0d 09 63 68 61 72 20 | 2a 6e 61 6d 65 3b 09 09 |/..char |*name;..|
|00000e60| 2f 2a 20 74 68 65 20 28 | 50 61 73 63 61 6c 29 20 |/* the (|Pascal) |
|00000e70| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 63 75 72 72 |name of |the curr|
|00000e80| 65 6e 74 20 69 74 65 6d | 20 2a 2f 0d 09 73 74 72 |ent item| */..str|
|00000e90| 75 63 74 20 69 74 65 6d | 69 6e 66 6f 20 2a 69 6e |uct item|info *in|
|00000ea0| 66 6f 70 3b 09 2f 2a 20 | 70 6f 69 6e 74 65 72 20 |fop;./* |pointer |
|00000eb0| 74 6f 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 69 |to the c|urrent i|
|00000ec0| 74 65 6d 27 73 20 69 6e | 66 6f 20 2a 2f 0d 09 69 |tem's in|fo */..i|
|00000ed0| 6e 74 20 74 68 69 73 68 | 65 69 67 68 74 3b 09 2f |nt thish|eight;./|
|00000ee0| 2a 20 68 65 69 67 68 74 | 20 6f 66 20 74 68 69 73 |* height| of this|
|00000ef0| 20 69 74 65 6d 20 2a 2f | 0d 09 69 6e 74 20 74 6f | item */|..int to|
|00000f00| 74 61 6c 68 65 69 67 68 | 74 3b 2f 2a 20 74 6f 74 |talheigh|t;/* tot|
|00000f10| 61 6c 20 68 65 69 67 68 | 74 20 6f 66 20 74 68 65 |al heigh|t of the|
|00000f20| 20 6d 65 6e 75 20 2a 2f | 0d 09 69 6e 74 20 74 68 | menu */|..int th|
|00000f30| 69 73 77 69 64 74 68 3b | 09 2f 2a 20 77 69 64 74 |iswidth;|./* widt|
|00000f40| 68 20 6f 66 20 74 68 65 | 20 63 75 72 72 65 6e 74 |h of the| current|
|00000f50| 20 69 74 65 6d 27 73 20 | 74 65 78 74 20 2a 2f 0d | item's |text */.|
|00000f60| 09 69 6e 74 20 6d 61 78 | 72 69 67 68 74 3b 09 2f |.int max|right;./|
|00000f70| 2a 20 6d 61 78 69 6d 75 | 6d 20 77 69 64 74 68 20 |* maximu|m width |
|00000f80| 74 6f 20 74 68 65 20 72 | 69 67 68 74 20 6f 66 20 |to the r|ight of |
|00000f90| 74 68 65 20 72 65 66 65 | 72 65 6e 63 65 20 70 6f |the refe|rence po|
|00000fa0| 69 6e 74 20 2a 2f 0d 09 | 0d 09 6d 61 78 72 69 67 |int */..|..maxrig|
|00000fb0| 68 74 20 3d 20 30 3b 0d | 09 74 6f 74 61 6c 68 65 |ht = 0;.|.totalhe|
|00000fc0| 69 67 68 74 20 3d 20 30 | 3b 0d 09 0d 09 69 74 65 |ight = 0|;....ite|
|00000fd0| 6d 6e 75 6d 20 3d 20 30 | 3b 0d 09 6d 63 70 20 3d |mnum = 0|;..mcp =|
|00000fe0| 20 28 63 68 61 72 20 2a | 29 20 26 28 28 2a 6d 65 | (char *|) &((*me|
|00000ff0| 6e 75 68 29 2d 3e 6d 65 | 6e 75 44 61 74 61 29 3b |nuh)->me|nuData);|
|00001000| 0d 09 6d 63 70 20 2b 3d | 20 28 28 69 6e 74 29 20 |..mcp +=| ((int) |
|00001010| 2a 6d 63 70 20 26 20 30 | 78 46 46 29 20 2b 20 31 |*mcp & 0|xFF) + 1|
|00001020| 3b 0d 09 77 68 69 6c 65 | 20 28 2a 6d 63 70 29 20 |;..while| (*mcp) |
|00001030| 7b 0d 09 09 2b 2b 69 74 | 65 6d 6e 75 6d 3b 0d 09 |{...++it|emnum;..|
|00001040| 09 6e 61 6d 65 20 3d 20 | 6d 63 70 3b 0d 09 09 6d |.name = |mcp;...m|
|00001050| 63 70 20 2b 3d 20 28 28 | 69 6e 74 29 20 2a 6d 63 |cp += ((|int) *mc|
|00001060| 70 20 26 20 30 78 46 46 | 29 20 2b 20 31 3b 0d 09 |p & 0xFF|) + 1;..|
|00001070| 09 69 6e 66 6f 70 20 3d | 20 28 73 74 72 75 63 74 |.infop =| (struct|
|00001080| 20 69 74 65 6d 69 6e 66 | 6f 20 2a 29 20 6d 63 70 | iteminf|o *) mcp|
|00001090| 3b 0d 09 09 6d 63 70 20 | 2b 3d 20 73 69 7a 65 6f |;...mcp |+= sizeo|
|000010a0| 66 28 73 74 72 75 63 74 | 20 69 74 65 6d 69 6e 66 |f(struct| iteminf|
|000010b0| 6f 29 3b 0d 09 09 0d 09 | 09 2f 2a 0d 09 09 20 2a |o);.....|./*... *|
|000010c0| 20 49 66 20 77 65 27 72 | 65 20 64 72 61 77 69 6e | If we'r|e drawin|
|000010d0| 67 20 61 6e 20 69 63 6f | 6e 2c 20 6f 75 72 20 6c |g an ico|n, our l|
|000010e0| 69 6e 65 20 69 73 20 74 | 68 61 74 20 68 69 67 68 |ine is t|hat high|
|000010f0| 2c 0d 09 09 20 2a 20 6f | 74 68 65 72 77 69 73 65 |,... * o|therwise|
|00001100| 2c 20 74 68 65 20 6c 69 | 6e 65 20 69 73 20 6f 6e |, the li|ne is on|
|00001110| 65 20 74 65 78 74 2d 6c | 69 6e 65 20 68 69 67 68 |e text-l|ine high|
|00001120| 2e 0d 09 09 20 2a 20 28 | 54 68 69 73 20 63 6f 64 |.... * (|This cod|
|00001130| 65 20 61 73 73 75 6d 65 | 73 20 74 68 61 74 20 74 |e assume|s that t|
|00001140| 68 65 20 73 79 73 74 65 | 6d 20 66 6f 6e 74 20 69 |he syste|m font i|
|00001150| 73 6e 27 74 20 68 75 67 | 65 2e 29 0d 09 09 20 2a |sn't hug|e.)... *|
|00001160| 2f 0d 09 09 0d 09 09 69 | 66 20 28 69 6e 66 6f 70 |/......i|f (infop|
|00001170| 2d 3e 69 63 6f 6e 6e 75 | 6d 29 20 7b 0d 09 09 09 |->iconnu|m) {....|
|00001180| 74 68 69 73 68 65 69 67 | 68 74 20 3d 20 49 43 4f |thisheig|ht = ICO|
|00001190| 4e 5f 56 4d 41 52 47 20 | 2b 20 49 43 4f 4e 53 49 |N_VMARG |+ ICONSI|
|000011a0| 44 45 20 2b 20 49 43 4f | 4e 5f 56 4d 41 52 47 3b |DE + ICO|N_VMARG;|
|000011b0| 0d 09 09 7d 20 65 6c 73 | 65 20 7b 0d 09 09 09 74 |...} els|e {....t|
|000011c0| 68 69 73 68 65 69 67 68 | 74 20 3d 20 63 6f 6d 6d |hisheigh|t = comm|
|000011d0| 70 2d 3e 6c 68 65 69 67 | 68 74 3b 0d 09 09 7d 0d |p->lheig|ht;...}.|
|000011e0| 09 09 0d 09 09 2f 2a 0d | 09 09 20 2a 20 53 75 6d |...../*.|.. * Sum|
|000011f0| 2d 75 70 20 74 68 65 20 | 69 74 65 6d 27 73 20 77 |-up the |item's w|
|00001200| 69 64 74 68 3a 0d 09 09 | 20 2a 20 54 68 65 20 69 |idth:...| * The i|
|00001210| 74 65 6d 20 63 6f 6e 74 | 61 69 6e 73 3a 0d 09 09 |tem cont|ains:...|
|00001220| 20 2a 09 09 61 20 63 68 | 65 63 6b 20 28 6f 72 20 | *..a ch|eck (or |
|00001230| 6f 74 68 65 72 20 6d 61 | 72 6b 29 09 09 09 5b 6f |other ma|rk)...[o|
|00001240| 70 74 69 6f 6e 61 6c 5d | 0d 09 09 20 2a 09 09 61 |ptional]|... *..a|
|00001250| 6e 20 69 63 6f 6e 20 28 | 61 6e 64 20 69 74 73 20 |n icon (|and its |
|00001260| 6d 61 72 67 69 6e 73 29 | 09 09 5b 6f 70 74 69 6f |margins)|..[optio|
|00001270| 6e 61 6c 5d 0d 09 09 20 | 2a 09 09 74 68 65 20 69 |nal]... |*..the i|
|00001280| 74 65 6d 27 73 20 6e 61 | 6d 65 0d 09 09 20 2a 09 |tem's na|me... *.|
|00001290| 09 61 20 63 6c 6f 76 65 | 72 2d 6b 65 79 20 65 71 |.a clove|r-key eq|
|000012a0| 75 69 76 61 6c 65 6e 74 | 09 09 09 5b 6f 70 74 69 |uivalent|...[opti|
|000012b0| 6f 6e 61 6c 5d 0d 09 09 | 20 2a 09 09 61 20 72 69 |onal]...| *..a ri|
|000012c0| 67 68 74 2d 6d 61 72 67 | 69 6e 0d 09 09 20 2a 2f |ght-marg|in... */|
|000012d0| 0d 09 0d 09 09 74 68 69 | 73 77 69 64 74 68 20 3d |.....thi|swidth =|
|000012e0| 20 30 3b 0d 09 09 0d 09 | 09 69 66 20 28 69 6e 66 | 0;.....|.if (inf|
|000012f0| 6f 70 2d 3e 6d 61 72 6b | 29 20 7b 0d 09 09 09 74 |op->mark|) {....t|
|00001300| 68 69 73 77 69 64 74 68 | 20 2b 3d 20 43 68 61 72 |hiswidth| += Char|
|00001310| 57 69 64 74 68 28 69 6e | 66 6f 70 2d 3e 6d 61 72 |Width(in|fop->mar|
|00001320| 6b 29 3b 0d 09 09 7d 20 | 65 6c 73 65 20 7b 0d 09 |k);...} |else {..|
|00001330| 09 09 74 68 69 73 77 69 | 64 74 68 20 2b 3d 20 63 |..thiswi|dth += c|
|00001340| 6f 6d 6d 70 2d 3e 63 68 | 65 63 6b 77 69 64 74 68 |ommp->ch|eckwidth|
|00001350| 3b 0d 09 09 7d 0d 0d 09 | 09 69 66 20 28 69 6e 66 |;...}...|.if (inf|
|00001360| 6f 70 2d 3e 69 63 6f 6e | 6e 75 6d 29 20 7b 0d 09 |op->icon|num) {..|
|00001370| 09 09 74 68 69 73 77 69 | 64 74 68 20 2b 3d 20 49 |..thiswi|dth += I|
|00001380| 43 4f 4e 5f 48 4d 41 52 | 47 20 2b 20 49 43 4f 4e |CON_HMAR|G + ICON|
|00001390| 53 49 44 45 20 2b 20 49 | 43 4f 4e 5f 48 4d 41 52 |SIDE + I|CON_HMAR|
|000013a0| 47 3b 0d 09 09 7d 0d 09 | 09 0d 09 09 74 68 69 73 |G;...}..|....this|
|000013b0| 77 69 64 74 68 20 2b 3d | 20 53 74 72 69 6e 67 57 |width +=| StringW|
|000013c0| 69 64 74 68 28 6e 61 6d | 65 29 3b 0d 09 09 0d 09 |idth(nam|e);.....|
|000013d0| 09 69 66 20 28 69 6e 66 | 6f 70 2d 3e 6b 65 79 65 |.if (inf|op->keye|
|000013e0| 71 75 69 76 20 21 3d 20 | 27 5c 30 27 29 20 7b 0d |quiv != |'\0') {.|
|000013f0| 09 09 09 74 68 69 73 77 | 69 64 74 68 20 2b 3d 20 |...thisw|idth += |
|00001400| 63 6f 6d 6d 70 2d 3e 63 | 6c 6f 76 65 72 77 69 64 |commp->c|loverwid|
|00001410| 74 68 20 2a 20 32 20 2b | 20 63 6f 6d 6d 70 2d 3e |th * 2 +| commp->|
|00001420| 66 69 6e 66 6f 2e 77 69 | 64 4d 61 78 3b 0d 09 09 |finfo.wi|dMax;...|
|00001430| 7d 0d 0d 09 09 74 68 69 | 73 77 69 64 74 68 20 2b |}....thi|swidth +|
|00001440| 3d 20 52 4d 41 52 47 3b | 0d 09 09 0d 09 09 2f 2a |= RMARG;|....../*|
|00001450| 0d 09 09 20 2a 20 41 64 | 6a 75 73 74 20 74 68 65 |... * Ad|just the|
|00001460| 20 77 69 64 74 68 20 62 | 79 20 74 68 65 20 61 6d | width b|y the am|
|00001470| 6f 75 6e 74 20 74 68 69 | 73 20 65 6e 74 72 79 20 |ount thi|s entry |
|00001480| 69 73 20 73 68 69 66 74 | 65 64 20 6c 65 66 74 2e |is shift|ed left.|
|00001490| 0d 09 09 20 2a 2f 0d 09 | 09 0d 09 09 74 68 69 73 |... */..|....this|
|000014a0| 77 69 64 74 68 20 2d 3d | 20 28 69 74 65 6d 6e 75 |width -=| (itemnu|
|000014b0| 6d 20 2d 20 31 29 20 2a | 20 48 53 4c 49 44 45 3b |m - 1) *| HSLIDE;|
|000014c0| 0d 09 09 69 66 20 28 6d | 61 78 72 69 67 68 74 20 |...if (m|axright |
|000014d0| 3c 20 74 68 69 73 77 69 | 64 74 68 29 20 7b 0d 09 |< thiswi|dth) {..|
|000014e0| 09 09 6d 61 78 72 69 67 | 68 74 20 3d 20 74 68 69 |..maxrig|ht = thi|
|000014f0| 73 77 69 64 74 68 3b 0d | 09 09 7d 0d 09 09 74 6f |swidth;.|..}...to|
|00001500| 74 61 6c 68 65 69 67 68 | 74 20 2b 3d 20 74 68 69 |talheigh|t += thi|
|00001510| 73 68 65 69 67 68 74 3b | 0d 09 7d 0d 09 20 0d 09 |sheight;|..}.. ..|
|00001520| 28 2a 6d 65 6e 75 68 29 | 2d 3e 6d 65 6e 75 48 65 |(*menuh)|->menuHe|
|00001530| 69 67 68 74 20 3d 20 63 | 6f 6d 6d 70 2d 3e 6c 68 |ight = c|ommp->lh|
|00001540| 65 69 67 68 74 20 2f 20 | 32 20 2b 20 74 6f 74 61 |eight / |2 + tota|
|00001550| 6c 68 65 69 67 68 74 3b | 0d 09 28 2a 6d 65 6e 75 |lheight;|..(*menu|
|00001560| 68 29 2d 3e 6d 65 6e 75 | 57 69 64 74 68 20 3d 20 |h)->menu|Width = |
|00001570| 63 6f 6d 6d 70 2d 3e 6e | 75 6d 69 74 65 6d 73 20 |commp->n|umitems |
|00001580| 2a 20 48 53 4c 49 44 45 | 20 2b 20 6d 61 78 72 69 |* HSLIDE| + maxri|
|00001590| 67 68 74 3b 0d 7d 0d 0d | 2f 2a 0d 20 2a 20 6d 64 |ght;.}..|/*. * md|
|000015a0| 72 61 77 28 29 20 2d 20 | 64 72 61 77 20 74 68 65 |raw() - |draw the|
|000015b0| 20 69 6e 69 74 69 61 6c | 20 70 69 63 74 75 72 65 | initial| picture|
|000015c0| 20 6f 66 20 74 68 65 20 | 67 69 76 65 6e 20 6d 65 | of the |given me|
|000015d0| 6e 75 20 77 69 74 68 69 | 6e 20 74 68 65 20 67 69 |nu withi|n the gi|
|000015e0| 76 65 6e 20 52 65 63 74 | 2e 0d 20 2a 2f 0d 0d 6d |ven Rect|.. */..m|
|000015f0| 64 72 61 77 28 63 6f 6d | 6d 70 2c 20 6d 65 6e 75 |draw(com|mp, menu|
|00001600| 68 2c 20 6d 72 65 63 74 | 70 29 0d 73 74 72 75 63 |h, mrect|p).struc|
|00001610| 74 20 63 6f 6d 6d 6f 6e | 73 20 2a 63 6f 6d 6d 70 |t common|s *commp|
|00001620| 3b 09 2f 2a 20 74 68 65 | 20 63 6f 6d 6d 6f 6e 20 |;./* the| common |
|00001630| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 2a 2f 0d 4d |informat|ion */.M|
|00001640| 65 6e 75 48 61 6e 64 6c | 65 20 6d 65 6e 75 68 3b |enuHandl|e menuh;|
|00001650| 0d 52 65 63 74 20 2a 6d | 72 65 63 74 70 3b 0d 7b |.Rect *m|rectp;.{|
|00001660| 0d 09 63 68 61 72 20 2a | 6d 63 70 3b 09 09 2f 2a |..char *|mcp;../*|
|00001670| 20 22 4d 65 6e 75 20 43 | 68 61 72 2d 50 6f 69 6e | "Menu C|har-Poin|
|00001680| 74 65 72 22 20 66 6f 72 | 20 74 72 61 76 65 72 73 |ter" for| travers|
|00001690| 69 6e 67 20 74 68 65 20 | 6d 65 6e 75 44 61 74 61 |ing the |menuData|
|000016a0| 20 66 69 65 6c 64 73 20 | 2a 2f 0d 09 69 6e 74 20 | fields |*/..int |
|000016b0| 69 74 65 6d 6e 75 6d 3b | 09 2f 2a 20 74 68 65 20 |itemnum;|./* the |
|000016c0| 69 74 65 6d 20 6e 75 6d | 62 65 72 20 6f 66 20 74 |item num|ber of t|
|000016d0| 68 65 20 63 75 72 72 65 | 6e 74 20 69 74 65 6d 20 |he curre|nt item |
|000016e0| 2a 2f 0d 09 63 68 61 72 | 20 2a 6e 61 6d 65 3b 09 |*/..char| *name;.|
|000016f0| 09 2f 2a 20 74 68 65 20 | 28 50 61 73 63 61 6c 29 |./* the |(Pascal)|
|00001700| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 63 75 72 | name of| the cur|
|00001710| 72 65 6e 74 20 69 74 65 | 6d 20 2a 2f 0d 09 73 74 |rent ite|m */..st|
|00001720| 72 75 63 74 20 69 74 65 | 6d 69 6e 66 6f 20 2a 69 |ruct ite|minfo *i|
|00001730| 6e 66 6f 70 3b 09 2f 2a | 20 70 6f 69 6e 74 65 72 |nfop;./*| pointer|
|00001740| 20 74 6f 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | to the |current |
|00001750| 69 74 65 6d 27 73 20 69 | 6e 66 6f 20 2a 2f 0d 09 |item's i|nfo */..|
|00001760| 52 65 63 74 20 69 74 65 | 6d 72 65 63 74 3b 09 2f |Rect ite|mrect;./|
|00001770| 2a 20 72 65 63 74 20 65 | 6e 63 6c 6f 73 69 6e 67 |* rect e|nclosing|
|00001780| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 69 74 65 | the cur|rent ite|
|00001790| 6d 20 2a 2f 0d 09 52 65 | 63 74 20 62 61 72 72 65 |m */..Re|ct barre|
|000017a0| 63 74 3b 09 2f 2a 20 72 | 65 63 74 20 65 6e 63 6c |ct;./* r|ect encl|
|000017b0| 6f 73 69 6e 67 20 74 68 | 65 20 76 65 72 74 69 63 |osing th|e vertic|
|000017c0| 61 6c 20 62 61 72 20 66 | 6f 72 20 74 68 69 73 20 |al bar f|or this |
|000017d0| 69 74 65 6d 20 2a 2f 0d | 09 69 6e 74 20 74 65 78 |item */.|.int tex|
|000017e0| 74 76 65 72 74 3b 09 2f | 2a 20 76 65 72 74 69 63 |tvert;./|* vertic|
|000017f0| 61 6c 20 70 6f 73 69 74 | 69 6f 6e 20 6f 66 20 74 |al posit|ion of t|
|00001800| 65 78 74 20 69 6e 20 74 | 68 69 73 20 69 74 65 6d |ext in t|his item|
|00001810| 20 2a 2f 0d 09 50 65 6e | 53 74 61 74 65 20 6f 6c | */..Pen|State ol|
|00001820| 64 70 65 6e 3b 2f 2a 20 | 74 68 65 20 6f 72 69 67 |dpen;/* |the orig|
|00001830| 69 6e 61 6c 20 50 65 6e | 20 6f 66 20 74 68 65 20 |inal Pen| of the |
|00001840| 70 6f 72 74 20 28 74 6f | 20 62 65 20 72 65 73 74 |port (to| be rest|
|00001850| 6f 72 65 64 29 20 2a 2f | 0d 09 50 61 74 74 65 72 |ored) */|..Patter|
|00001860| 6e 20 66 75 7a 7a 3b 09 | 2f 2a 20 70 61 74 74 65 |n fuzz;.|/* patte|
|00001870| 72 6e 20 74 6f 20 64 69 | 6d 20 77 69 74 68 09 2a |rn to di|m with.*|
|00001880| 2f 0d 09 69 6e 74 20 63 | 75 72 68 6f 72 7a 3b 09 |/..int c|urhorz;.|
|00001890| 2f 2a 20 63 75 72 72 65 | 6e 74 20 68 6f 72 69 7a |/* curre|nt horiz|
|000018a0| 6f 6e 74 61 6c 20 70 6f | 73 69 74 69 6f 6e 20 6f |ontal po|sition o|
|000018b0| 66 20 74 68 65 20 6e 65 | 78 74 20 70 69 65 63 65 |f the ne|xt piece|
|000018c0| 20 2a 2f 0d 09 48 61 6e | 64 6c 65 20 69 63 6f 6e | */..Han|dle icon|
|000018d0| 68 3b 09 2f 2a 20 68 61 | 6e 64 6c 65 20 74 6f 20 |h;./* ha|ndle to |
|000018e0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 69 63 6f 6e |the curr|ent icon|
|000018f0| 20 2a 2f 0d 09 52 65 63 | 74 20 69 63 6f 6e 72 65 | */..Rec|t iconre|
|00001900| 63 74 3b 09 2f 2a 20 52 | 65 63 74 20 65 6e 63 6c |ct;./* R|ect encl|
|00001910| 6f 73 69 6e 67 20 74 68 | 65 20 69 63 6f 6e 20 74 |osing th|e icon t|
|00001920| 6f 20 64 72 61 77 20 2a | 2f 0d 09 0d 09 47 65 74 |o draw *|/....Get|
|00001930| 50 65 6e 53 74 61 74 65 | 28 26 6f 6c 64 70 65 6e |PenState|(&oldpen|
|00001940| 29 3b 0d 0d 09 2f 2a 0d | 09 20 2a 20 53 69 6e 63 |);.../*.|. * Sinc|
|00001950| 65 20 77 65 20 63 61 6e | 27 74 20 61 63 63 65 73 |e we can|'t acces|
|00001960| 73 20 74 68 65 20 71 75 | 69 63 6b 64 72 61 77 20 |s the qu|ickdraw |
|00001970| 67 6c 6f 62 61 6c 20 70 | 61 74 74 65 72 6e 73 0d |global p|atterns.|
|00001980| 09 20 2a 20 28 6f 72 20 | 65 76 65 6e 20 6f 75 72 |. * (or |even our|
|00001990| 20 6f 77 6e 20 67 6c 6f | 62 61 6c 73 29 2c 0d 09 | own glo|bals),..|
|000019a0| 20 2a 20 77 65 20 68 61 | 76 65 20 74 6f 20 63 72 | * we ha|ve to cr|
|000019b0| 65 61 74 65 20 74 68 69 | 73 20 70 61 74 74 65 72 |eate thi|s patter|
|000019c0| 6e 20 65 61 63 68 20 74 | 69 6d 65 20 77 65 27 72 |n each t|ime we'r|
|000019d0| 65 20 63 61 6c 6c 65 64 | 2e 0d 09 20 2a 2f 0d 0d |e called|... */..|
|000019e0| 09 66 75 7a 7a 5b 30 5d | 20 3d 20 28 75 6e 73 69 |.fuzz[0]| = (unsi|
|000019f0| 67 6e 65 64 20 63 68 61 | 72 29 20 30 78 41 41 3b |gned cha|r) 0xAA;|
|00001a00| 0d 09 66 75 7a 7a 5b 31 | 5d 20 3d 20 28 75 6e 73 |..fuzz[1|] = (uns|
|00001a10| 69 67 6e 65 64 20 63 68 | 61 72 29 20 30 78 35 35 |igned ch|ar) 0x55|
|00001a20| 3b 0d 09 66 75 7a 7a 5b | 32 5d 20 3d 20 28 75 6e |;..fuzz[|2] = (un|
|00001a30| 73 69 67 6e 65 64 20 63 | 68 61 72 29 20 30 78 41 |signed c|har) 0xA|
|00001a40| 41 3b 0d 09 66 75 7a 7a | 5b 33 5d 20 3d 20 28 75 |A;..fuzz|[3] = (u|
|00001a50| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 29 20 30 78 |nsigned |char) 0x|
|00001a60| 35 35 3b 0d 09 66 75 7a | 7a 5b 34 5d 20 3d 20 28 |55;..fuz|z[4] = (|
|00001a70| 75 6e 73 69 67 6e 65 64 | 20 63 68 61 72 29 20 30 |unsigned| char) 0|
|00001a80| 78 41 41 3b 0d 09 66 75 | 7a 7a 5b 35 5d 20 3d 20 |xAA;..fu|zz[5] = |
|00001a90| 28 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 29 20 |(unsigne|d char) |
|00001aa0| 30 78 35 35 3b 0d 09 66 | 75 7a 7a 5b 36 5d 20 3d |0x55;..f|uzz[6] =|
|00001ab0| 20 28 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 29 | (unsign|ed char)|
|00001ac0| 20 30 78 41 41 3b 0d 09 | 66 75 7a 7a 5b 37 5d 20 | 0xAA;..|fuzz[7] |
|00001ad0| 3d 20 28 75 6e 73 69 67 | 6e 65 64 20 63 68 61 72 |= (unsig|ned char|
|00001ae0| 29 20 30 78 35 35 3b 0d | 09 0d 09 0d 09 2f 2a 20 |) 0x55;.|...../* |
|00001af0| 45 72 61 73 65 52 65 63 | 74 28 6d 72 65 63 74 70 |EraseRec|t(mrectp|
|00001b00| 29 3b 20 09 54 68 65 20 | 4d 65 6e 75 20 4d 61 6e |); .The |Menu Man|
|00001b10| 61 67 65 72 20 73 65 65 | 6d 73 20 74 6f 20 64 6f |ager see|ms to do|
|00001b20| 20 74 68 69 73 20 66 6f | 72 20 75 73 20 2a 2f 0d | this fo|r us */.|
|00001b30| 09 0d 09 0d 09 69 74 65 | 6d 72 65 63 74 2e 74 6f |.....ite|mrect.to|
|00001b40| 70 20 3d 20 6d 72 65 63 | 74 70 2d 3e 74 6f 70 20 |p = mrec|tp->top |
|00001b50| 2b 20 63 6f 6d 6d 70 2d | 3e 6c 68 65 69 67 68 74 |+ commp-|>lheight|
|00001b60| 20 2f 20 32 3b 0d 09 69 | 74 65 6d 72 65 63 74 2e | / 2;..i|temrect.|
|00001b70| 6c 65 66 74 20 3d 20 6d | 72 65 63 74 70 2d 3e 6c |left = m|rectp->l|
|00001b80| 65 66 74 20 2b 20 63 6f | 6d 6d 70 2d 3e 6e 75 6d |eft + co|mmp->num|
|00001b90| 69 74 65 6d 73 20 2a 20 | 48 53 4c 49 44 45 3b 0d |items * |HSLIDE;.|
|00001ba0| 09 69 74 65 6d 72 65 63 | 74 2e 72 69 67 68 74 20 |.itemrec|t.right |
|00001bb0| 3d 20 6d 72 65 63 74 70 | 2d 3e 72 69 67 68 74 3b |= mrectp|->right;|
|00001bc0| 0d 09 0d 09 69 74 65 6d | 6e 75 6d 20 3d 20 30 3b |....item|num = 0;|
|00001bd0| 0d 09 6d 63 70 20 3d 20 | 28 63 68 61 72 20 2a 29 |..mcp = |(char *)|
|00001be0| 20 26 28 28 2a 6d 65 6e | 75 68 29 2d 3e 6d 65 6e | &((*men|uh)->men|
|00001bf0| 75 44 61 74 61 29 3b 0d | 09 6d 63 70 20 2b 3d 20 |uData);.|.mcp += |
|00001c00| 28 28 69 6e 74 29 20 2a | 6d 63 70 20 26 20 30 78 |((int) *|mcp & 0x|
|00001c10| 46 46 29 20 2b 20 31 3b | 0d 09 77 68 69 6c 65 20 |FF) + 1;|..while |
|00001c20| 28 2a 6d 63 70 29 20 7b | 0d 09 09 2b 2b 69 74 65 |(*mcp) {|...++ite|
|00001c30| 6d 6e 75 6d 3b 0d 09 09 | 6e 61 6d 65 20 3d 20 6d |mnum;...|name = m|
|00001c40| 63 70 3b 0d 09 09 6d 63 | 70 20 2b 3d 20 28 28 69 |cp;...mc|p += ((i|
|00001c50| 6e 74 29 20 2a 6d 63 70 | 20 26 20 30 78 46 46 29 |nt) *mcp| & 0xFF)|
|00001c60| 20 2b 20 31 3b 0d 09 09 | 69 6e 66 6f 70 20 3d 20 | + 1;...|infop = |
|00001c70| 28 73 74 72 75 63 74 20 | 69 74 65 6d 69 6e 66 6f |(struct |iteminfo|
|00001c80| 20 2a 29 20 6d 63 70 3b | 0d 09 09 6d 63 70 20 2b | *) mcp;|...mcp +|
|00001c90| 3d 20 73 69 7a 65 6f 66 | 28 73 74 72 75 63 74 20 |= sizeof|(struct |
|00001ca0| 69 74 65 6d 69 6e 66 6f | 29 3b 0d 09 09 0d 09 09 |iteminfo|);......|
|00001cb0| 2f 2a 0d 09 09 20 2a 20 | 43 61 6c 63 75 6c 61 74 |/*... * |Calculat|
|00001cc0| 65 20 77 68 65 72 65 20 | 69 6e 20 74 68 65 20 6d |e where |in the m|
|00001cd0| 65 6e 75 20 74 68 69 73 | 20 69 74 65 6d 20 67 6f |enu this| item go|
|00001ce0| 65 73 3a 0d 09 09 20 2a | 20 49 74 73 20 69 74 65 |es:... *| Its ite|
|00001cf0| 6d 20 72 65 63 74 61 6e | 67 6c 65 2c 20 69 74 73 |m rectan|gle, its|
|00001d00| 20 61 73 73 6f 63 69 61 | 74 65 64 20 76 65 72 74 | associa|ted vert|
|00001d10| 69 63 61 6c 20 62 61 72 | 2c 0d 09 09 20 2a 20 61 |ical bar|,... * a|
|00001d20| 6e 64 20 77 68 65 72 65 | 20 28 76 65 72 74 69 63 |nd where| (vertic|
|00001d30| 61 6c 6c 79 29 20 69 74 | 73 20 74 65 78 74 20 67 |ally) it|s text g|
|00001d40| 6f 65 73 2e 0d 09 09 20 | 2a 2f 0d 0d 09 09 69 66 |oes.... |*/....if|
|00001d50| 20 28 69 6e 66 6f 70 2d | 3e 69 63 6f 6e 6e 75 6d | (infop-|>iconnum|
|00001d60| 29 20 7b 0d 09 09 09 69 | 74 65 6d 72 65 63 74 2e |) {....i|temrect.|
|00001d70| 62 6f 74 74 6f 6d 20 3d | 20 69 74 65 6d 72 65 63 |bottom =| itemrec|
|00001d80| 74 2e 74 6f 70 20 2b 20 | 49 43 4f 4e 5f 56 4d 41 |t.top + |ICON_VMA|
|00001d90| 52 47 20 2b 20 49 43 4f | 4e 53 49 44 45 20 2b 20 |RG + ICO|NSIDE + |
|00001da0| 49 43 4f 4e 5f 56 4d 41 | 52 47 3b 0d 09 09 7d 20 |ICON_VMA|RG;...} |
|00001db0| 65 6c 73 65 20 7b 0d 09 | 09 09 69 74 65 6d 72 65 |else {..|..itemre|
|00001dc0| 63 74 2e 62 6f 74 74 6f | 6d 20 3d 20 69 74 65 6d |ct.botto|m = item|
|00001dd0| 72 65 63 74 2e 74 6f 70 | 20 2b 20 63 6f 6d 6d 70 |rect.top| + commp|
|00001de0| 2d 3e 6c 68 65 69 67 68 | 74 3b 0d 09 09 7d 0d 09 |->lheigh|t;...}..|
|00001df0| 09 0d 09 09 62 61 72 72 | 65 63 74 2e 6c 65 66 74 |....barr|ect.left|
|00001e00| 20 3d 20 69 74 65 6d 72 | 65 63 74 2e 6c 65 66 74 | = itemr|ect.left|
|00001e10| 20 2d 20 48 53 4c 49 44 | 45 3b 0d 09 09 62 61 72 | - HSLID|E;...bar|
|00001e20| 72 65 63 74 2e 72 69 67 | 68 74 20 3d 20 69 74 65 |rect.rig|ht = ite|
|00001e30| 6d 72 65 63 74 2e 6c 65 | 66 74 3b 0d 09 09 62 61 |mrect.le|ft;...ba|
|00001e40| 72 72 65 63 74 2e 74 6f | 70 20 3d 20 6d 72 65 63 |rrect.to|p = mrec|
|00001e50| 74 70 2d 3e 74 6f 70 3b | 0d 09 09 62 61 72 72 65 |tp->top;|...barre|
|00001e60| 63 74 2e 62 6f 74 74 6f | 6d 20 3d 20 69 74 65 6d |ct.botto|m = item|
|00001e70| 72 65 63 74 2e 62 6f 74 | 74 6f 6d 3b 0d 09 09 0d |rect.bot|tom;....|
|00001e80| 09 09 74 65 78 74 76 65 | 72 74 20 3d 20 28 69 74 |..textve|rt = (it|
|00001e90| 65 6d 72 65 63 74 2e 74 | 6f 70 20 2b 20 69 74 65 |emrect.t|op + ite|
|00001ea0| 6d 72 65 63 74 2e 62 6f | 74 74 6f 6d 29 20 2f 20 |mrect.bo|ttom) / |
|00001eb0| 32 20 2d 0d 09 09 09 20 | 20 28 63 6f 6d 6d 70 2d |2 -.... | (commp-|
|00001ec0| 3e 6c 68 65 69 67 68 74 | 20 2f 20 32 29 20 2b 20 |>lheight| / 2) + |
|00001ed0| 63 6f 6d 6d 70 2d 3e 66 | 69 6e 66 6f 2e 61 73 63 |commp->f|info.asc|
|00001ee0| 65 6e 74 3b 0d 09 09 0d | 09 09 2f 2a 0d 09 09 20 |ent;....|../*... |
|00001ef0| 2a 20 4e 6f 77 20 64 72 | 61 77 20 74 68 65 20 69 |* Now dr|aw the i|
|00001f00| 74 65 6d 3a 0d 09 09 20 | 2a 09 61 20 6c 69 6e 65 |tem:... |*.a line|
|00001f10| 20 64 65 6d 61 72 6b 69 | 6e 67 20 74 68 65 20 76 | demarki|ng the v|
|00001f20| 65 72 74 69 63 61 6c 20 | 62 61 72 3b 0d 09 09 20 |ertical |bar;... |
|00001f30| 2a 09 61 20 6c 69 6e 65 | 20 66 6f 72 20 65 6d 70 |*.a line| for emp|
|00001f40| 74 79 20 69 74 65 6d 73 | 2c 20 6f 74 68 65 72 77 |ty items|, otherw|
|00001f50| 69 73 65 2e 2e 2e 0d 09 | 09 20 2a 09 09 74 68 65 |ise.....|. *..the|
|00001f60| 20 63 68 65 63 6b 20 28 | 6f 72 20 6f 74 68 65 72 | check (|or other|
|00001f70| 20 6d 61 72 6b 29 20 5b | 69 66 20 61 6e 79 5d 0d | mark) [|if any].|
|00001f80| 09 09 20 2a 09 09 74 68 | 65 20 69 63 6f 6e 20 5b |.. *..th|e icon [|
|00001f90| 69 66 20 61 6e 79 5d 0d | 09 09 20 2a 09 09 74 68 |if any].|.. *..th|
|00001fa0| 65 20 74 65 78 74 20 6f | 66 20 74 68 65 20 69 74 |e text o|f the it|
|00001fb0| 65 6d 0d 09 09 20 2a 09 | 09 74 68 65 20 63 6c 6f |em... *.|.the clo|
|00001fc0| 76 65 72 2d 6b 65 79 20 | 65 71 75 69 76 61 6c 65 |ver-key |equivale|
|00001fd0| 6e 74 20 5b 69 66 20 61 | 6e 79 5d 0d 09 09 20 2a |nt [if a|ny]... *|
|00001fe0| 2f 0d 09 09 0d 09 09 4d | 6f 76 65 54 6f 28 62 61 |/......M|oveTo(ba|
|00001ff0| 72 72 65 63 74 2e 72 69 | 67 68 74 20 2d 20 31 2c |rrect.ri|ght - 1,|
|00002000| 20 62 61 72 72 65 63 74 | 2e 74 6f 70 29 3b 0d 09 | barrect|.top);..|
|00002010| 09 4c 69 6e 65 54 6f 28 | 62 61 72 72 65 63 74 2e |.LineTo(|barrect.|
|00002020| 72 69 67 68 74 20 2d 20 | 31 2c 20 69 74 65 6d 72 |right - |1, itemr|
|00002030| 65 63 74 2e 74 6f 70 20 | 2d 20 31 29 3b 0d 09 09 |ect.top |- 1);...|
|00002040| 0d 09 09 54 65 78 74 46 | 61 63 65 28 69 6e 66 6f |...TextF|ace(info|
|00002050| 70 2d 3e 74 73 74 79 6c | 65 29 3b 0d 09 09 0d 09 |p->tstyl|e);.....|
|00002060| 09 63 75 72 68 6f 72 7a | 20 3d 20 69 74 65 6d 72 |.curhorz| = itemr|
|00002070| 65 63 74 2e 6c 65 66 74 | 3b 0d 09 09 69 66 20 28 |ect.left|;...if (|
|00002080| 6e 61 6d 65 5b 31 5d 20 | 3d 3d 20 27 2d 27 29 20 |name[1] |== '-') |
|00002090| 7b 0d 09 09 09 4d 6f 76 | 65 54 6f 28 63 75 72 68 |{....Mov|eTo(curh|
|000020a0| 6f 72 7a 2c 20 28 69 74 | 65 6d 72 65 63 74 2e 74 |orz, (it|emrect.t|
|000020b0| 6f 70 20 2b 20 69 74 65 | 6d 72 65 63 74 2e 62 6f |op + ite|mrect.bo|
|000020c0| 74 74 6f 6d 29 20 2f 20 | 32 29 3b 0d 09 09 09 4c |ttom) / |2);....L|
|000020d0| 69 6e 65 54 6f 28 69 74 | 65 6d 72 65 63 74 2e 72 |ineTo(it|emrect.r|
|000020e0| 69 67 68 74 20 2d 20 31 | 2c 20 28 69 74 65 6d 72 |ight - 1|, (itemr|
|000020f0| 65 63 74 2e 74 6f 70 20 | 2b 20 69 74 65 6d 72 65 |ect.top |+ itemre|
|00002100| 63 74 2e 62 6f 74 74 6f | 6d 29 20 2f 20 32 29 3b |ct.botto|m) / 2);|
|00002110| 0d 09 09 7d 20 65 6c 73 | 65 20 7b 0d 09 09 09 69 |...} els|e {....i|
|00002120| 66 20 28 69 6e 66 6f 70 | 2d 3e 6d 61 72 6b 29 20 |f (infop|->mark) |
|00002130| 7b 0d 09 09 09 09 4d 6f | 76 65 54 6f 28 63 75 72 |{.....Mo|veTo(cur|
|00002140| 68 6f 72 7a 2c 20 74 65 | 78 74 76 65 72 74 29 3b |horz, te|xtvert);|
|00002150| 0d 09 09 09 09 44 72 61 | 77 43 68 61 72 28 69 6e |.....Dra|wChar(in|
|00002160| 66 6f 70 2d 3e 6d 61 72 | 6b 29 3b 0d 09 09 09 09 |fop->mar|k);.....|
|00002170| 63 75 72 68 6f 72 7a 20 | 2b 3d 20 43 68 61 72 57 |curhorz |+= CharW|
|00002180| 69 64 74 68 28 69 6e 66 | 6f 70 2d 3e 6d 61 72 6b |idth(inf|op->mark|
|00002190| 29 3b 0d 09 09 09 7d 20 | 65 6c 73 65 20 7b 0d 09 |);....} |else {..|
|000021a0| 09 09 09 63 75 72 68 6f | 72 7a 20 2b 3d 20 63 6f |...curho|rz += co|
|000021b0| 6d 6d 70 2d 3e 63 68 65 | 63 6b 77 69 64 74 68 3b |mmp->che|ckwidth;|
|000021c0| 0d 09 09 09 7d 0d 09 09 | 09 0d 09 09 09 69 66 20 |....}...|.....if |
|000021d0| 28 69 6e 66 6f 70 2d 3e | 69 63 6f 6e 6e 75 6d 29 |(infop->|iconnum)|
|000021e0| 20 7b 0d 09 09 09 0d 09 | 09 09 09 2f 2a 0d 09 09 | {......|.../*...|
|000021f0| 09 09 20 2a 20 4d 65 6e | 75 20 69 63 6f 6e 20 6e |.. * Men|u icon n|
|00002200| 75 6d 62 65 72 73 20 73 | 74 61 72 74 20 61 74 20 |umbers s|tart at |
|00002210| 32 35 37 2e 0d 09 09 09 | 09 20 2a 2f 0d 09 09 09 |257.....|. */....|
|00002220| 09 0d 09 09 09 09 69 63 | 6f 6e 68 20 3d 20 47 65 |......ic|onh = Ge|
|00002230| 74 49 63 6f 6e 28 28 28 | 69 6e 74 29 20 69 6e 66 |tIcon(((|int) inf|
|00002240| 6f 70 2d 3e 69 63 6f 6e | 6e 75 6d 20 26 20 30 78 |op->icon|num & 0x|
|00002250| 46 46 29 20 2b 20 32 35 | 36 29 3b 0d 09 09 09 09 |FF) + 25|6);.....|
|00002260| 69 66 20 28 69 63 6f 6e | 68 29 20 7b 0d 09 09 09 |if (icon|h) {....|
|00002270| 09 09 69 63 6f 6e 72 65 | 63 74 2e 6c 65 66 74 20 |..iconre|ct.left |
|00002280| 3d 20 63 75 72 68 6f 72 | 7a 20 2b 20 49 43 4f 4e |= curhor|z + ICON|
|00002290| 5f 48 4d 41 52 47 3b 0d | 09 09 09 09 09 69 63 6f |_HMARG;.|.....ico|
|000022a0| 6e 72 65 63 74 2e 74 6f | 70 20 3d 20 69 74 65 6d |nrect.to|p = item|
|000022b0| 72 65 63 74 2e 74 6f 70 | 20 2b 20 49 43 4f 4e 5f |rect.top| + ICON_|
|000022c0| 56 4d 41 52 47 3b 0d 09 | 09 09 09 09 69 63 6f 6e |VMARG;..|....icon|
|000022d0| 72 65 63 74 2e 72 69 67 | 68 74 20 3d 20 69 63 6f |rect.rig|ht = ico|
|000022e0| 6e 72 65 63 74 2e 6c 65 | 66 74 20 2b 20 49 43 4f |nrect.le|ft + ICO|
|000022f0| 4e 53 49 44 45 3b 0d 09 | 09 09 09 09 69 63 6f 6e |NSIDE;..|....icon|
|00002300| 72 65 63 74 2e 62 6f 74 | 74 6f 6d 20 3d 20 69 63 |rect.bot|tom = ic|
|00002310| 6f 6e 72 65 63 74 2e 74 | 6f 70 20 2b 20 49 43 4f |onrect.t|op + ICO|
|00002320| 4e 53 49 44 45 3b 0d 09 | 09 09 09 09 50 6c 6f 74 |NSIDE;..|....Plot|
|00002330| 49 63 6f 6e 28 26 69 63 | 6f 6e 72 65 63 74 2c 20 |Icon(&ic|onrect, |
|00002340| 69 63 6f 6e 68 29 3b 0d | 09 09 09 09 7d 0d 09 09 |iconh);.|....}...|
|00002350| 09 09 63 75 72 68 6f 72 | 7a 20 2b 3d 20 49 43 4f |..curhor|z += ICO|
|00002360| 4e 5f 48 4d 41 52 47 20 | 2b 20 49 43 4f 4e 53 49 |N_HMARG |+ ICONSI|
|00002370| 44 45 20 2b 20 49 43 4f | 4e 5f 48 4d 41 52 47 3b |DE + ICO|N_HMARG;|
|00002380| 0d 09 09 09 7d 0d 09 09 | 09 0d 09 09 09 4d 6f 76 |....}...|.....Mov|
|00002390| 65 54 6f 28 63 75 72 68 | 6f 72 7a 2c 20 74 65 78 |eTo(curh|orz, tex|
|000023a0| 74 76 65 72 74 29 3b 0d | 09 09 09 44 72 61 77 53 |tvert);.|...DrawS|
|000023b0| 74 72 69 6e 67 28 6e 61 | 6d 65 29 3b 0d 09 09 09 |tring(na|me);....|
|000023c0| 0d 09 09 09 69 66 20 28 | 69 6e 66 6f 70 2d 3e 6b |....if (|infop->k|
|000023d0| 65 79 65 71 75 69 76 20 | 21 3d 20 27 5c 30 27 29 |eyequiv |!= '\0')|
|000023e0| 20 7b 0d 09 09 09 09 4d | 6f 76 65 54 6f 28 69 74 | {.....M|oveTo(it|
|000023f0| 65 6d 72 65 63 74 2e 72 | 69 67 68 74 20 2d 0d 09 |emrect.r|ight -..|
|00002400| 09 09 09 20 20 28 63 6f | 6d 6d 70 2d 3e 63 6c 6f |... (co|mmp->clo|
|00002410| 76 65 72 77 69 64 74 68 | 20 2b 20 63 6f 6d 6d 70 |verwidth| + commp|
|00002420| 2d 3e 66 69 6e 66 6f 2e | 77 69 64 4d 61 78 20 2b |->finfo.|widMax +|
|00002430| 20 52 4d 41 52 47 29 2c | 0d 09 09 09 09 20 20 74 | RMARG),|..... t|
|00002440| 65 78 74 76 65 72 74 29 | 3b 0d 09 09 09 09 44 72 |extvert)|;.....Dr|
|00002450| 61 77 43 68 61 72 28 28 | 63 68 61 72 29 20 30 78 |awChar((|char) 0x|
|00002460| 31 31 29 3b 0d 09 09 09 | 09 44 72 61 77 43 68 61 |11);....|.DrawCha|
|00002470| 72 28 69 6e 66 6f 70 2d | 3e 6b 65 79 65 71 75 69 |r(infop-|>keyequi|
|00002480| 76 29 3b 0d 09 09 09 7d | 0d 09 09 7d 0d 09 09 0d |v);....}|...}....|
|00002490| 09 09 2f 2a 0d 09 09 20 | 2a 20 54 68 65 20 69 74 |../*... |* The it|
|000024a0| 65 6d 20 69 73 20 64 69 | 73 61 62 6c 65 64 20 69 |em is di|sabled i|
|000024b0| 66 20 65 69 74 68 65 72 | 20 74 68 65 20 77 68 6f |f either| the who|
|000024c0| 6c 65 20 6d 65 6e 75 20 | 69 73 20 64 69 73 61 62 |le menu |is disab|
|000024d0| 6c 65 64 0d 09 09 20 2a | 20 6f 72 20 74 68 65 20 |led... *| or the |
|000024e0| 69 74 65 6d 20 63 61 6e | 20 62 65 20 61 6e 64 20 |item can| be and |
|000024f0| 69 73 20 64 69 73 61 62 | 6c 65 64 2e 0d 09 09 20 |is disab|led.... |
|00002500| 2a 20 28 4f 6e 6c 79 20 | 74 68 65 20 66 69 72 73 |* (Only |the firs|
|00002510| 74 20 33 31 20 69 74 65 | 6d 73 20 69 6e 20 61 20 |t 31 ite|ms in a |
|00002520| 6d 65 6e 75 20 68 61 76 | 65 20 64 69 73 61 62 6c |menu hav|e disabl|
|00002530| 65 2f 65 6e 61 62 6c 65 | 20 66 6c 61 67 73 2e 29 |e/enable| flags.)|
|00002540| 0d 09 09 20 2a 0d 09 09 | 20 2a 20 49 66 20 74 68 |... *...| * If th|
|00002550| 65 20 69 74 65 6d 20 69 | 73 20 64 69 73 61 62 6c |e item i|s disabl|
|00002560| 65 64 2c 20 6d 61 6b 65 | 20 69 74 20 67 72 61 79 |ed, make| it gray|
|00002570| 2e 0d 09 09 20 2a 2f 0d | 09 09 0d 09 09 69 66 20 |.... */.|.....if |
|00002580| 28 28 28 2a 6d 65 6e 75 | 68 29 2d 3e 65 6e 61 62 |(((*menu|h)->enab|
|00002590| 6c 65 46 6c 61 67 73 20 | 26 20 31 29 20 3d 3d 20 |leFlags |& 1) == |
|000025a0| 30 4c 20 7c 7c 20 28 69 | 74 65 6d 6e 75 6d 20 3c |0L || (i|temnum <|
|000025b0| 20 33 32 20 26 26 0d 09 | 09 20 20 28 28 2a 6d 65 | 32 &&..|. ((*me|
|000025c0| 6e 75 68 29 2d 3e 65 6e | 61 62 6c 65 46 6c 61 67 |nuh)->en|ableFlag|
|000025d0| 73 20 26 20 28 28 75 6e | 73 69 67 6e 65 64 20 6c |s & ((un|signed l|
|000025e0| 6f 6e 67 29 20 31 20 3c | 3c 20 69 74 65 6d 6e 75 |ong) 1 <|< itemnu|
|000025f0| 6d 29 29 20 3d 3d 20 30 | 4c 29 29 20 7b 0d 09 09 |m)) == 0|L)) {...|
|00002600| 09 50 65 6e 4d 6f 64 65 | 28 70 61 74 42 69 63 29 |.PenMode|(patBic)|
|00002610| 3b 0d 09 09 09 50 65 6e | 50 61 74 28 26 66 75 7a |;....Pen|Pat(&fuz|
|00002620| 7a 29 3b 0d 09 09 09 50 | 61 69 6e 74 52 65 63 74 |z);....P|aintRect|
|00002630| 28 26 69 74 65 6d 72 65 | 63 74 29 3b 0d 09 09 7d |(&itemre|ct);...}|
|00002640| 0d 09 09 0d 09 09 2f 2a | 0d 09 09 20 2a 20 53 65 |....../*|... * Se|
|00002650| 74 20 74 68 69 6e 67 73 | 20 75 70 20 66 6f 72 20 |t things| up for |
|00002660| 74 68 65 20 6e 65 78 74 | 20 69 74 65 6d 20 69 6e |the next| item in|
|00002670| 20 74 68 65 20 6d 65 6e | 75 2e 0d 09 09 20 2a 2f | the men|u.... */|
|00002680| 0d 09 09 0d 09 09 53 65 | 74 50 65 6e 53 74 61 74 |......Se|tPenStat|
|00002690| 65 28 26 6f 6c 64 70 65 | 6e 29 3b 0d 09 09 69 74 |e(&oldpe|n);...it|
|000026a0| 65 6d 72 65 63 74 2e 74 | 6f 70 20 3d 20 69 74 65 |emrect.t|op = ite|
|000026b0| 6d 72 65 63 74 2e 62 6f | 74 74 6f 6d 3b 0d 09 09 |mrect.bo|ttom;...|
|000026c0| 69 74 65 6d 72 65 63 74 | 2e 6c 65 66 74 20 2d 3d |itemrect|.left -=|
|000026d0| 20 48 53 4c 49 44 45 3b | 0d 09 7d 0d 7d 0d 0d 2f | HSLIDE;|..}.}../|
|000026e0| 2a 0d 20 2a 20 6d 63 68 | 6f 6f 73 65 28 29 20 2d |*. * mch|oose() -|
|000026f0| 20 46 69 6e 64 20 77 68 | 69 63 68 20 69 74 65 6d | Find wh|ich item|
|00002700| 20 28 69 66 20 61 6e 79 | 29 20 69 73 20 73 65 6c | (if any|) is sel|
|00002710| 65 63 74 65 64 20 62 79 | 20 74 68 65 20 67 69 76 |ected by| the giv|
|00002720| 65 6e 20 6d 6f 75 73 65 | 20 6c 6f 63 61 74 69 6f |en mouse| locatio|
|00002730| 6e 2c 0d 20 2a 20 75 6e | 68 69 67 68 6c 69 67 68 |n,. * un|highligh|
|00002740| 74 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 6c 79 |t the pr|eviously|
|00002750| 2d 73 65 6c 65 63 74 65 | 64 20 69 74 65 6d 20 28 |-selecte|d item (|
|00002760| 69 66 20 61 6e 79 29 2c | 0d 20 2a 20 61 6e 64 20 |if any),|. * and |
|00002770| 68 69 67 68 6c 69 67 68 | 74 20 74 68 65 20 6e 65 |highligh|t the ne|
|00002780| 77 6c 79 2d 73 65 6c 65 | 63 74 65 64 20 69 74 65 |wly-sele|cted ite|
|00002790| 6d 20 28 61 67 61 69 6e | 2c 20 69 66 20 61 6e 79 |m (again|, if any|
|000027a0| 29 2e 0d 20 2a 2f 0d 20 | 0d 6d 63 68 6f 6f 73 65 |).. */. |.mchoose|
|000027b0| 28 63 6f 6d 6d 70 2c 20 | 6d 65 6e 75 68 2c 20 6d |(commp, |menuh, m|
|000027c0| 72 65 63 74 70 2c 20 70 | 74 2c 20 74 68 65 69 74 |rectp, p|t, theit|
|000027d0| 65 6d 70 29 0d 73 74 72 | 75 63 74 20 63 6f 6d 6d |emp).str|uct comm|
|000027e0| 6f 6e 73 20 2a 63 6f 6d | 6d 70 3b 09 2f 2a 20 74 |ons *com|mp;./* t|
|000027f0| 68 65 20 63 6f 6d 6d 6f | 6e 20 69 6e 66 6f 72 6d |he commo|n inform|
|00002800| 61 74 69 6f 6e 20 2a 2f | 0d 4d 65 6e 75 48 61 6e |ation */|.MenuHan|
|00002810| 64 6c 65 20 6d 65 6e 75 | 68 3b 0d 52 65 63 74 20 |dle menu|h;.Rect |
|00002820| 2a 6d 72 65 63 74 70 3b | 0d 50 6f 69 6e 74 20 70 |*mrectp;|.Point p|
|00002830| 74 3b 0d 69 6e 74 20 2a | 74 68 65 69 74 65 6d 70 |t;.int *|theitemp|
|00002840| 3b 09 09 2f 2a 20 69 66 | 20 6e 6f 6e 2d 7a 65 72 |;../* if| non-zer|
|00002850| 6f 2c 20 74 68 65 20 6f | 6c 64 20 69 74 65 6d 3b |o, the o|ld item;|
|00002860| 20 73 65 74 20 69 74 20 | 74 6f 20 74 68 65 20 6e | set it |to the n|
|00002870| 65 77 20 69 74 65 6d 20 | 2a 2f 0d 7b 0d 09 63 68 |ew item |*/.{..ch|
|00002880| 61 72 20 2a 6d 63 70 3b | 09 09 2f 2a 20 22 4d 65 |ar *mcp;|../* "Me|
|00002890| 6e 75 20 43 68 61 72 2d | 50 6f 69 6e 74 65 72 22 |nu Char-|Pointer"|
|000028a0| 20 66 6f 72 20 74 72 61 | 76 65 72 73 69 6e 67 20 | for tra|versing |
|000028b0| 74 68 65 20 6d 65 6e 75 | 44 61 74 61 20 66 69 65 |the menu|Data fie|
|000028c0| 6c 64 73 20 2a 2f 0d 09 | 69 6e 74 20 69 74 65 6d |lds */..|int item|
|000028d0| 6e 75 6d 3b 09 2f 2a 20 | 74 68 65 20 69 74 65 6d |num;./* |the item|
|000028e0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 74 68 65 20 63 | number |of the c|
|000028f0| 75 72 72 65 6e 74 20 69 | 74 65 6d 20 2a 2f 0d 09 |urrent i|tem */..|
|00002900| 63 68 61 72 20 2a 6e 61 | 6d 65 3b 09 09 2f 2a 20 |char *na|me;../* |
|00002910| 74 68 65 20 28 50 61 73 | 63 61 6c 29 20 6e 61 6d |the (Pas|cal) nam|
|00002920| 65 20 6f 66 20 74 68 65 | 20 63 75 72 72 65 6e 74 |e of the| current|
|00002930| 20 69 74 65 6d 20 2a 2f | 0d 09 73 74 72 75 63 74 | item */|..struct|
|00002940| 20 69 74 65 6d 69 6e 66 | 6f 20 2a 69 6e 66 6f 70 | iteminf|o *infop|
|00002950| 3b 09 2f 2a 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |;./* poi|nter to |
|00002960| 74 68 65 20 63 75 72 72 | 65 6e 74 20 69 74 65 6d |the curr|ent item|
|00002970| 27 73 20 69 6e 66 6f 20 | 2a 2f 0d 09 52 65 63 74 |'s info |*/..Rect|
|00002980| 20 69 74 65 6d 72 65 63 | 74 3b 09 2f 2a 20 72 65 | itemrec|t;./* re|
|00002990| 63 74 20 65 6e 63 6c 6f | 73 69 6e 67 20 74 68 65 |ct enclo|sing the|
|000029a0| 20 63 75 72 72 65 6e 74 | 20 69 74 65 6d 20 2a 2f | current| item */|
|000029b0| 0d 09 52 65 63 74 20 62 | 61 72 72 65 63 74 3b 09 |..Rect b|arrect;.|
|000029c0| 2f 2a 20 72 65 63 74 20 | 65 6e 63 6c 6f 73 69 6e |/* rect |enclosin|
|000029d0| 67 20 74 68 65 20 76 65 | 72 74 69 63 61 6c 20 62 |g the ve|rtical b|
|000029e0| 61 72 20 66 6f 72 20 74 | 68 69 73 20 69 74 65 6d |ar for t|his item|
|000029f0| 20 2a 2f 0d 09 69 6e 74 | 20 77 61 73 69 74 65 6d | */..int| wasitem|
|00002a00| 3b 09 2f 2a 20 69 74 65 | 6d 20 6e 75 6d 62 65 72 |;./* ite|m number|
|00002a10| 20 6f 66 20 74 68 65 20 | 70 72 65 76 69 6f 75 73 | of the |previous|
|00002a20| 6c 79 2d 73 65 6c 65 63 | 74 65 64 20 69 74 65 6d |ly-selec|ted item|
|00002a30| 20 2a 2f 0d 09 69 6e 74 | 20 69 73 69 74 65 6d 3b | */..int| isitem;|
|00002a40| 09 09 2f 2a 20 64 69 74 | 74 6f 20 66 6f 72 20 74 |../* dit|to for t|
|00002a50| 68 65 20 6e 65 77 6c 79 | 2d 73 65 6c 65 63 74 65 |he newly|-selecte|
|00002a60| 64 20 69 74 65 6d 20 2a | 2f 0d 09 0d 09 2f 2a 0d |d item *|/..../*.|
|00002a70| 09 20 2a 20 53 65 65 20 | 77 68 69 63 68 20 69 74 |. * See |which it|
|00002a80| 65 6d 20 74 68 65 20 6d | 6f 75 73 65 20 75 73 65 |em the m|ouse use|
|00002a90| 64 20 74 6f 20 62 65 20 | 69 6e 20 28 72 65 6a 65 |d to be |in (reje|
|00002aa0| 63 74 69 6e 67 20 6e 6f | 6e 73 65 6e 73 69 63 61 |cting no|nsensica|
|00002ab0| 6c 20 61 6e 73 77 65 72 | 73 29 0d 09 20 2a 20 61 |l answer|s).. * a|
|00002ac0| 6e 64 20 69 6e 69 74 69 | 61 6c 69 7a 65 20 6f 75 |nd initi|alize ou|
|00002ad0| 72 20 69 64 65 61 20 6f | 66 20 77 68 65 72 65 20 |r idea o|f where |
|00002ae0| 74 68 65 20 6d 6f 75 73 | 65 20 69 73 0d 09 20 2a |the mous|e is.. *|
|00002af0| 20 28 74 6f 20 62 65 20 | 75 70 64 61 74 65 64 20 | (to be |updated |
|00002b00| 69 66 2f 77 68 65 6e 20 | 77 65 20 66 69 6e 64 20 |if/when |we find |
|00002b10| 74 68 65 20 74 72 75 65 | 20 6d 6f 75 73 65 20 69 |the true| mouse i|
|00002b20| 74 65 6d 29 2e 0d 09 20 | 2a 2f 0d 09 0d 09 77 61 |tem)... |*/....wa|
|00002b30| 73 69 74 65 6d 20 3d 20 | 2a 74 68 65 69 74 65 6d |sitem = |*theitem|
|00002b40| 70 3b 0d 09 69 66 20 28 | 77 61 73 69 74 65 6d 20 |p;..if (|wasitem |
|00002b50| 3c 20 30 20 7c 7c 20 77 | 61 73 69 74 65 6d 20 3e |< 0 || w|asitem >|
|00002b60| 20 63 6f 6d 6d 70 2d 3e | 6e 75 6d 69 74 65 6d 73 | commp->|numitems|
|00002b70| 29 20 7b 0d 09 09 0d 09 | 09 2f 2a 0d 09 09 20 2a |) {.....|./*... *|
|00002b80| 20 57 65 20 67 65 74 20 | 69 6c 6c 65 67 61 6c 20 | We get |illegal |
|00002b90| 77 61 73 69 74 65 6d 20 | 6e 75 6d 62 65 72 73 20 |wasitem |numbers |
|00002ba0| 77 68 65 6e 20 74 68 65 | 20 6d 65 6e 75 20 6d 61 |when the| menu ma|
|00002bb0| 6e 61 67 65 72 20 74 72 | 69 65 73 0d 09 09 20 2a |nager tr|ies... *|
|00002bc0| 20 74 6f 20 62 6c 69 6e | 6b 20 74 68 65 20 73 65 | to blin|k the se|
|00002bd0| 6c 65 63 74 65 64 20 69 | 74 65 6d 2e 0d 09 09 20 |lected i|tem.... |
|00002be0| 2a 20 49 20 68 61 76 65 | 6e 27 74 20 66 6f 75 6e |* I have|n't foun|
|00002bf0| 64 20 61 6e 79 20 64 65 | 73 63 72 69 70 74 69 6f |d any de|scriptio|
|00002c00| 6e 20 6f 66 20 74 68 65 | 73 65 20 69 6c 6c 65 67 |n of the|se illeg|
|00002c10| 61 6c 20 69 74 65 6d 20 | 6e 75 6d 62 65 72 73 2e |al item |numbers.|
|00002c20| 0d 09 09 20 2a 20 49 66 | 20 79 6f 75 20 6b 6e 6f |... * If| you kno|
|00002c30| 77 20 68 6f 77 20 74 6f | 20 69 6e 74 65 72 70 72 |w how to| interpr|
|00002c40| 65 74 20 74 68 65 73 65 | 20 6e 75 6d 62 65 72 73 |et these| numbers|
|00002c50| 2c 20 70 6c 65 61 73 65 | 20 64 72 6f 70 20 6d 65 |, please| drop me|
|00002c60| 20 61 20 6e 6f 74 65 3a | 0d 09 09 20 2a 09 09 42 | a note:|... *..B|
|00002c70| 72 61 64 20 4e 65 65 64 | 68 61 6d 0d 09 09 20 2a |rad Need|ham... *|
|00002c80| 09 09 32 32 33 39 20 53 | 45 20 37 34 74 68 20 41 |..2239 S|E 74th A|
|00002c90| 76 65 2e 0d 09 09 20 2a | 09 09 48 69 6c 6c 73 62 |ve.... *|..Hillsb|
|00002ca0| 6f 72 6f 2c 20 4f 52 20 | 39 37 31 32 33 20 20 20 |oro, OR |97123 |
|00002cb0| 55 53 41 0d 09 09 20 2a | 2f 0d 09 09 20 0d 09 09 |USA... *|/... ...|
|00002cc0| 77 61 73 69 74 65 6d 20 | 3d 20 30 3b 0d 09 7d 0d |wasitem |= 0;..}.|
|00002cd0| 09 69 73 69 74 65 6d 20 | 3d 20 30 3b 0d 09 0d 09 |.isitem |= 0;....|
|00002ce0| 2f 2a 0d 09 20 2a 20 4e | 6f 77 20 74 72 61 76 65 |/*.. * N|ow trave|
|00002cf0| 72 73 65 20 74 68 65 20 | 6d 65 6e 75 2c 20 6c 6f |rse the |menu, lo|
|00002d00| 6f 6b 69 6e 67 20 66 6f | 72 20 74 68 65 20 69 74 |oking fo|r the it|
|00002d10| 65 6d 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 74 68 |em conta|ining th|
|00002d20| 65 20 6d 6f 75 73 65 0d | 09 20 2a 20 6f 72 20 74 |e mouse.|. * or t|
|00002d30| 68 65 20 69 74 65 6d 20 | 74 68 61 74 20 75 73 65 |he item |that use|
|00002d40| 64 20 74 6f 20 63 6f 6e | 74 61 69 6e 20 74 68 65 |d to con|tain the|
|00002d50| 20 6d 6f 75 73 65 2e 0d | 09 20 2a 0d 09 20 2a 20 | mouse..|. *.. * |
|00002d60| 54 68 65 73 65 20 74 77 | 6f 20 69 74 65 6d 73 20 |These tw|o items |
|00002d70| 61 72 65 20 74 68 65 20 | 6f 6e 6c 79 20 6f 6e 65 |are the |only one|
|00002d80| 73 20 74 68 61 74 20 77 | 69 6c 6c 20 6e 65 65 64 |s that w|ill need|
|00002d90| 20 74 6f 20 62 65 20 72 | 65 64 72 61 77 6e 20 2d | to be r|edrawn -|
|00002da0| 2d 0d 09 20 2a 20 6e 6f | 74 68 69 6e 67 20 65 6c |-.. * no|thing el|
|00002db0| 73 65 20 68 61 73 20 63 | 68 61 6e 67 65 64 20 61 |se has c|hanged a|
|00002dc0| 70 70 65 61 72 61 6e 63 | 65 2e 0d 09 20 2a 2f 0d |ppearanc|e... */.|
|00002dd0| 09 0d 09 69 74 65 6d 72 | 65 63 74 2e 74 6f 70 20 |...itemr|ect.top |
|00002de0| 3d 20 6d 72 65 63 74 70 | 2d 3e 74 6f 70 20 2b 20 |= mrectp|->top + |
|00002df0| 63 6f 6d 6d 70 2d 3e 6c | 68 65 69 67 68 74 20 2f |commp->l|height /|
|00002e00| 20 32 3b 0d 09 69 74 65 | 6d 72 65 63 74 2e 6c 65 | 2;..ite|mrect.le|
|00002e10| 66 74 20 3d 20 6d 72 65 | 63 74 70 2d 3e 6c 65 66 |ft = mre|ctp->lef|
|00002e20| 74 20 2b 20 63 6f 6d 6d | 70 2d 3e 6e 75 6d 69 74 |t + comm|p->numit|
|00002e30| 65 6d 73 20 2a 20 48 53 | 4c 49 44 45 3b 0d 09 69 |ems * HS|LIDE;..i|
|00002e40| 74 65 6d 72 65 63 74 2e | 72 69 67 68 74 20 3d 20 |temrect.|right = |
|00002e50| 6d 72 65 63 74 70 2d 3e | 72 69 67 68 74 3b 0d 09 |mrectp->|right;..|
|00002e60| 0d 09 69 74 65 6d 6e 75 | 6d 20 3d 20 30 3b 0d 09 |..itemnu|m = 0;..|
|00002e70| 6d 63 70 20 3d 20 28 63 | 68 61 72 20 2a 29 20 26 |mcp = (c|har *) &|
|00002e80| 28 28 2a 6d 65 6e 75 68 | 29 2d 3e 6d 65 6e 75 44 |((*menuh|)->menuD|
|00002e90| 61 74 61 29 3b 0d 09 6d | 63 70 20 2b 3d 20 28 28 |ata);..m|cp += ((|
|00002ea0| 69 6e 74 29 20 2a 6d 63 | 70 20 26 20 30 78 46 46 |int) *mc|p & 0xFF|
|00002eb0| 29 20 2b 20 31 3b 0d 09 | 77 68 69 6c 65 20 28 2a |) + 1;..|while (*|
|00002ec0| 6d 63 70 29 20 7b 0d 09 | 09 2b 2b 69 74 65 6d 6e |mcp) {..|.++itemn|
|00002ed0| 75 6d 3b 0d 09 09 6e 61 | 6d 65 20 3d 20 6d 63 70 |um;...na|me = mcp|
|00002ee0| 3b 0d 09 09 6d 63 70 20 | 2b 3d 20 28 28 69 6e 74 |;...mcp |+= ((int|
|00002ef0| 29 20 2a 6d 63 70 20 26 | 20 30 78 46 46 29 20 2b |) *mcp &| 0xFF) +|
|00002f00| 20 31 3b 0d 09 09 69 6e | 66 6f 70 20 3d 20 28 73 | 1;...in|fop = (s|
|00002f10| 74 72 75 63 74 20 69 74 | 65 6d 69 6e 66 6f 20 2a |truct it|eminfo *|
|00002f20| 29 20 6d 63 70 3b 0d 09 | 09 6d 63 70 20 2b 3d 20 |) mcp;..|.mcp += |
|00002f30| 73 69 7a 65 6f 66 28 73 | 74 72 75 63 74 20 69 74 |sizeof(s|truct it|
|00002f40| 65 6d 69 6e 66 6f 29 3b | 0d 09 09 0d 09 09 69 66 |eminfo);|......if|
|00002f50| 20 28 69 6e 66 6f 70 2d | 3e 69 63 6f 6e 6e 75 6d | (infop-|>iconnum|
|00002f60| 29 20 7b 0d 09 09 09 69 | 74 65 6d 72 65 63 74 2e |) {....i|temrect.|
|00002f70| 62 6f 74 74 6f 6d 20 3d | 20 69 74 65 6d 72 65 63 |bottom =| itemrec|
|00002f80| 74 2e 74 6f 70 20 2b 20 | 49 43 4f 4e 5f 56 4d 41 |t.top + |ICON_VMA|
|00002f90| 52 47 20 2b 20 49 43 4f | 4e 53 49 44 45 20 2b 20 |RG + ICO|NSIDE + |
|00002fa0| 49 43 4f 4e 5f 56 4d 41 | 52 47 3b 0d 09 09 7d 20 |ICON_VMA|RG;...} |
|00002fb0| 65 6c 73 65 20 7b 0d 09 | 09 09 69 74 65 6d 72 65 |else {..|..itemre|
|00002fc0| 63 74 2e 62 6f 74 74 6f | 6d 20 3d 20 69 74 65 6d |ct.botto|m = item|
|00002fd0| 72 65 63 74 2e 74 6f 70 | 20 2b 20 63 6f 6d 6d 70 |rect.top| + commp|
|00002fe0| 2d 3e 6c 68 65 69 67 68 | 74 3b 0d 09 09 7d 0d 09 |->lheigh|t;...}..|
|00002ff0| 09 0d 09 09 62 61 72 72 | 65 63 74 2e 6c 65 66 74 |....barr|ect.left|
|00003000| 20 3d 20 69 74 65 6d 72 | 65 63 74 2e 6c 65 66 74 | = itemr|ect.left|
|00003010| 20 2d 20 48 53 4c 49 44 | 45 3b 0d 09 09 62 61 72 | - HSLID|E;...bar|
|00003020| 72 65 63 74 2e 72 69 67 | 68 74 20 3d 20 69 74 65 |rect.rig|ht = ite|
|00003030| 6d 72 65 63 74 2e 6c 65 | 66 74 3b 0d 09 09 62 61 |mrect.le|ft;...ba|
|00003040| 72 72 65 63 74 2e 74 6f | 70 20 3d 20 6d 72 65 63 |rrect.to|p = mrec|
|00003050| 74 70 2d 3e 74 6f 70 3b | 0d 09 09 62 61 72 72 65 |tp->top;|...barre|
|00003060| 63 74 2e 62 6f 74 74 6f | 6d 20 3d 20 69 74 65 6d |ct.botto|m = item|
|00003070| 72 65 63 74 2e 62 6f 74 | 74 6f 6d 3b 0d 09 09 0d |rect.bot|tom;....|
|00003080| 09 09 2f 2a 0d 09 09 20 | 2a 20 54 68 65 20 69 74 |../*... |* The it|
|00003090| 65 6d 20 69 73 20 64 69 | 73 61 62 6c 65 64 20 69 |em is di|sabled i|
|000030a0| 66 20 65 69 74 68 65 72 | 20 74 68 65 20 77 68 6f |f either| the who|
|000030b0| 6c 65 20 6d 65 6e 75 20 | 69 73 20 64 69 73 61 62 |le menu |is disab|
|000030c0| 6c 65 64 0d 09 09 20 2a | 20 6f 72 20 74 68 65 20 |led... *| or the |
|000030d0| 69 74 65 6d 20 63 61 6e | 20 62 65 20 61 6e 64 20 |item can| be and |
|000030e0| 69 73 20 64 69 73 61 62 | 6c 65 64 2e 0d 09 09 20 |is disab|led.... |
|000030f0| 2a 20 28 4f 6e 6c 79 20 | 74 68 65 20 66 69 72 73 |* (Only |the firs|
|00003100| 74 20 33 31 20 69 74 65 | 6d 73 20 69 6e 20 61 20 |t 31 ite|ms in a |
|00003110| 6d 65 6e 75 20 68 61 76 | 65 20 64 69 73 61 62 6c |menu hav|e disabl|
|00003120| 65 2f 65 6e 61 62 6c 65 | 20 66 6c 61 67 73 2e 29 |e/enable| flags.)|
|00003130| 0d 09 09 20 2a 0d 09 09 | 20 2a 20 49 66 20 74 68 |... *...| * If th|
|00003140| 65 20 69 74 65 6d 20 69 | 73 20 64 69 73 61 62 6c |e item i|s disabl|
|00003150| 65 64 2c 20 77 65 20 63 | 61 6e 27 74 20 73 65 6c |ed, we c|an't sel|
|00003160| 65 63 74 20 69 74 2e 0d | 09 09 20 2a 2f 0d 09 09 |ect it..|.. */...|
|00003170| 0d 09 09 69 66 20 28 28 | 28 2a 6d 65 6e 75 68 29 |...if ((|(*menuh)|
|00003180| 2d 3e 65 6e 61 62 6c 65 | 46 6c 61 67 73 20 26 20 |->enable|Flags & |
|00003190| 31 29 20 3d 3d 20 30 4c | 20 7c 7c 20 28 69 74 65 |1) == 0L| || (ite|
|000031a0| 6d 6e 75 6d 20 3c 20 33 | 32 20 26 26 0d 09 09 20 |mnum < 3|2 &&... |
|000031b0| 20 28 28 2a 6d 65 6e 75 | 68 29 2d 3e 65 6e 61 62 | ((*menu|h)->enab|
|000031c0| 6c 65 46 6c 61 67 73 20 | 26 20 28 28 75 6e 73 69 |leFlags |& ((unsi|
|000031d0| 67 6e 65 64 20 6c 6f 6e | 67 29 20 31 20 3c 3c 20 |gned lon|g) 1 << |
|000031e0| 69 74 65 6d 6e 75 6d 29 | 29 20 3d 3d 20 30 4c 29 |itemnum)|) == 0L)|
|000031f0| 29 20 7b 0d 09 09 09 67 | 6f 74 6f 20 6e 6f 74 65 |) {....g|oto note|
|00003200| 6e 61 62 6c 65 64 3b 0d | 09 09 7d 0d 09 09 0d 09 |nabled;.|..}.....|
|00003210| 09 2f 2a 0d 09 09 20 2a | 20 49 66 20 74 68 65 20 |./*... *| If the |
|00003220| 6d 6f 75 73 65 20 69 73 | 20 69 6e 73 69 64 65 20 |mouse is| inside |
|00003230| 74 68 69 73 20 69 74 65 | 6d 2c 20 74 68 65 6e 0d |this ite|m, then.|
|00003240| 09 09 20 2a 20 74 68 69 | 73 20 69 73 20 74 68 65 |.. * thi|s is the|
|00003250| 20 6e 65 77 6c 79 2d 73 | 65 6c 65 63 74 65 64 20 | newly-s|elected |
|00003260| 69 74 65 6d 2e 0d 09 09 | 20 2a 2f 0d 09 09 0d 09 |item....| */.....|
|00003270| 09 69 66 20 28 50 74 49 | 6e 52 65 63 74 28 70 74 |.if (PtI|nRect(pt|
|00003280| 2c 20 26 69 74 65 6d 72 | 65 63 74 29 20 7c 7c 20 |, &itemr|ect) || |
|00003290| 50 74 49 6e 52 65 63 74 | 28 70 74 2c 20 26 62 61 |PtInRect|(pt, &ba|
|000032a0| 72 72 65 63 74 29 29 20 | 7b 0d 09 09 09 69 73 69 |rrect)) |{....isi|
|000032b0| 74 65 6d 20 3d 20 69 74 | 65 6d 6e 75 6d 3b 0d 09 |tem = it|emnum;..|
|000032c0| 09 7d 0d 09 09 0d 09 09 | 2f 2a 0d 09 09 20 2a 20 |.}......|/*... * |
|000032d0| 57 65 20 77 61 6e 74 20 | 74 6f 20 69 6e 76 65 72 |We want |to inver|
|000032e0| 74 20 74 68 69 73 20 69 | 74 65 6d 20 69 66 20 65 |t this i|tem if e|
|000032f0| 69 74 68 65 72 0d 09 09 | 20 2a 20 74 68 69 73 20 |ither...| * this |
|00003300| 69 74 65 6d 20 69 73 20 | 74 68 65 20 6d 6f 75 73 |item is |the mous|
|00003310| 65 27 73 20 69 74 65 6d | 20 28 74 6f 20 62 65 20 |e's item| (to be |
|00003320| 69 6e 76 65 72 74 65 64 | 29 20 6f 72 0d 09 09 20 |inverted|) or... |
|00003330| 2a 20 74 68 69 73 20 69 | 74 65 6d 20 75 73 65 64 |* this i|tem used|
|00003340| 20 74 6f 20 62 65 20 73 | 65 6c 65 63 74 65 64 20 | to be s|elected |
|00003350| 28 61 6e 64 20 77 65 20 | 77 61 6e 74 20 74 6f 20 |(and we |want to |
|00003360| 63 6c 65 61 72 20 74 68 | 65 20 69 6e 76 65 72 73 |clear th|e invers|
|00003370| 69 6f 6e 29 2e 0d 09 09 | 20 2a 0d 09 09 20 2a 20 |ion)....| *... * |
|00003380| 54 6f 20 61 76 6f 69 64 | 20 66 6c 69 63 6b 65 72 |To avoid| flicker|
|00003390| 2c 20 77 65 20 63 68 61 | 6e 67 65 20 6e 6f 74 68 |, we cha|nge noth|
|000033a0| 69 6e 67 20 69 66 20 74 | 68 65 20 6d 6f 75 73 65 |ing if t|he mouse|
|000033b0| 20 68 61 73 6e 27 74 20 | 6d 6f 76 65 64 2e 0d 09 | hasn't |moved...|
|000033c0| 09 20 2a 2f 0d 09 09 0d | 09 09 69 66 20 28 28 69 |. */....|..if ((i|
|000033d0| 74 65 6d 6e 75 6d 20 3d | 3d 20 69 73 69 74 65 6d |temnum =|= isitem|
|000033e0| 20 7c 7c 20 69 74 65 6d | 6e 75 6d 20 3d 3d 20 77 | || item|num == w|
|000033f0| 61 73 69 74 65 6d 29 20 | 26 26 0d 09 09 20 20 69 |asitem) |&&... i|
|00003400| 73 69 74 65 6d 20 21 3d | 20 77 61 73 69 74 65 6d |sitem !=| wasitem|
|00003410| 29 20 7b 0d 09 09 20 20 | 09 49 6e 76 65 72 74 52 |) {... |.InvertR|
|00003420| 65 63 74 28 26 69 74 65 | 6d 72 65 63 74 29 3b 0d |ect(&ite|mrect);.|
|00003430| 09 09 20 20 09 49 6e 76 | 65 72 74 52 65 63 74 28 |.. .Inv|ertRect(|
|00003440| 26 62 61 72 72 65 63 74 | 29 3b 0d 09 09 7d 0d 0d |&barrect|);...}..|
|00003450| 6e 6f 74 65 6e 61 62 6c | 65 64 3a 09 0d 09 09 69 |notenabl|ed:....i|
|00003460| 74 65 6d 72 65 63 74 2e | 74 6f 70 20 3d 20 69 74 |temrect.|top = it|
|00003470| 65 6d 72 65 63 74 2e 62 | 6f 74 74 6f 6d 3b 0d 09 |emrect.b|ottom;..|
|00003480| 09 69 74 65 6d 72 65 63 | 74 2e 6c 65 66 74 20 2d |.itemrec|t.left -|
|00003490| 3d 20 48 53 4c 49 44 45 | 3b 0d 09 7d 0d 09 0d 09 |= HSLIDE|;..}....|
|000034a0| 2f 2a 0d 09 20 2a 20 52 | 65 70 6f 72 74 20 65 69 |/*.. * R|eport ei|
|000034b0| 74 68 65 72 20 74 68 65 | 20 66 6f 75 6e 64 20 69 |ther the| found i|
|000034c0| 74 65 6d 2c 0d 09 20 2a | 20 6f 72 20 74 68 65 20 |tem,.. *| or the |
|000034d0| 66 61 63 74 20 74 68 61 | 74 20 77 65 20 66 6f 75 |fact tha|t we fou|
|000034e0| 6e 64 20 6e 6f 20 69 74 | 65 6d 2e 0d 09 20 2a 2f |nd no it|em... */|
|000034f0| 0d 09 0d 09 2a 74 68 65 | 69 74 65 6d 70 20 3d 20 |....*the|itemp = |
|00003500| 69 73 69 74 65 6d 3b 0d | 0d 7d 0d 00 00 00 00 00 |isitem;.|.}......|
|00003510| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003520| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003530| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003540| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003550| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003560| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003570| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+