home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1999-02-11 | 38.1 KB | [TEXT/CWIE] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: ZMenuBar.cpp
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Thu Feb 11 12:40:32 1999, modified Thu Feb 11 12:40:32 1999, creator 'CWIE', type ASCII, 38338 bytes "ZMenuBar.cpp" , at 0x9642 428 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [CWIE] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 5a 4d 65 6e 75 42 | 61 72 2e 63 70 70 00 00 |..ZMenuB|ar.cpp..|
|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 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 95 c2 00 | 00 01 ac b2 e8 c6 90 b2 |........|........|
|00000060| e8 c6 90 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 ba 68 00 00 |........|.....h..|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000e0| 2a 2a 0d 2a 0d 2a 0d 2a | 09 09 09 4d 61 63 5a 6f |**.*.*.*|...MacZo|
|000000f0| 6f 70 20 2d 20 22 74 68 | 65 20 66 72 61 6d 65 77 |op - "th|e framew|
|00000100| 6f 72 6b 20 66 6f 72 20 | 74 68 65 20 72 65 73 74 |ork for |the rest|
|00000110| 20 6f 66 20 75 73 22 09 | 09 20 0d 2a 0d 2a 0d 2a | of us".|. .*.*.*|
|00000120| 0d 2a 09 09 09 5a 4d 65 | 6e 75 42 61 72 2e 63 70 |.*...ZMe|nuBar.cp|
|00000130| 70 09 09 2d 2d 20 74 68 | 65 20 6d 65 6e 75 62 61 |p..-- th|e menuba|
|00000140| 72 20 6d 61 6e 61 67 65 | 72 20 6f 62 6a 65 63 74 |r manage|r object|
|00000150| 0d 2a 0d 2a 0d 2a 0d 2a | 0d 2a 0d 2a 09 09 09 a9 |.*.*.*.*|.*.*....|
|00000160| 20 31 39 39 36 2c 20 47 | 72 61 68 61 6d 20 43 6f | 1996, G|raham Co|
|00000170| 78 0d 2a 0d 2a 0d 2a 0d | 2a 0d 2a 2a 2a 2a 2a 2a |x.*.*.*.|*.******|
|00000180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001d0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2f 0d 0d 0d 23 |********|***/...#|
|000001e0| 69 6e 63 6c 75 64 65 09 | 22 4d 61 63 5a 6f 6f 70 |include.|"MacZoop|
|000001f0| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 09 22 50 72 |.h".#inc|lude."Pr|
|00000200| 6f 6a 65 63 74 53 65 74 | 74 69 6e 67 73 2e 68 22 |ojectSet|tings.h"|
|00000210| 0d 23 69 6e 63 6c 75 64 | 65 09 22 5a 43 6f 6d 6d |.#includ|e."ZComm|
|00000220| 61 6e 64 65 72 2e 68 22 | 0d 0d 23 69 66 6e 64 65 |ander.h"|..#ifnde|
|00000230| 66 20 5f 5f 42 41 4c 4c | 4f 4f 4e 53 5f 5f 0d 23 |f __BALL|OONS__.#|
|00000240| 69 6e 63 6c 75 64 65 09 | 3c 62 61 6c 6c 6f 6f 6e |include.|<balloon|
|00000250| 73 2e 68 3e 0d 23 65 6e | 64 69 66 0d 0d 0d 65 78 |s.h>.#en|dif...ex|
|00000260| 74 65 72 6e 09 5a 43 6f | 6d 6d 61 6e 64 65 72 2a |tern.ZCo|mmander*|
|00000270| 09 09 67 43 75 72 48 61 | 6e 64 6c 65 72 3b 0d 0d |..gCurHa|ndler;..|
|00000280| 73 68 6f 72 74 09 09 67 | 46 6f 6e 74 4d 65 6e 75 |short..g|FontMenu|
|00000290| 49 44 20 3d 20 30 3b 0d | 0d 2f 2a 2d 2d 2d 2d 2d |ID = 0;.|./*-----|
|000002a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2a 2a 20 20 |--------|---*** |
|000002c0| 44 45 53 54 52 55 43 54 | 4f 52 20 20 2a 2a 2a 2d |DESTRUCT|OR ***-|
|000002d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000002f0| 2a 2f 0d 0d 0d 5a 4d 65 | 6e 75 42 61 72 3a 3a 7e |*/...ZMe|nuBar::~|
|00000300| 5a 4d 65 6e 75 42 61 72 | 28 29 0d 7b 0d 09 2f 2f |ZMenuBar|().{..//|
|00000310| 20 6d 65 6e 75 62 61 72 | 20 6d 75 73 74 20 62 65 | menubar| must be|
|00000320| 20 76 69 73 69 62 6c 65 | 20 77 68 65 6e 20 77 65 | visible| when we|
|00000330| 20 71 75 69 74 0d 09 0d | 09 69 66 20 28 20 6d 62 | quit...|.if ( mb|
|00000340| 48 69 64 69 6e 67 20 3d | 3d 20 4d 42 41 52 5f 48 |Hiding =|= MBAR_H|
|00000350| 49 44 45 20 29 0d 09 09 | 53 68 6f 77 48 69 64 65 |IDE )...|ShowHide|
|00000360| 4d 65 6e 75 42 61 72 28 | 20 4d 42 41 52 5f 53 48 |MenuBar(| MBAR_SH|
|00000370| 4f 57 20 29 3b 0d 09 0d | 09 69 66 20 28 20 74 68 |OW );...|.if ( th|
|00000380| 65 4d 65 6e 75 43 6d 64 | 73 20 29 0d 09 09 46 6f |eMenuCmd|s )...Fo|
|00000390| 72 67 65 74 4f 62 6a 65 | 63 74 28 20 74 68 65 4d |rgetObje|ct( theM|
|000003a0| 65 6e 75 43 6d 64 73 20 | 29 3b 0d 09 09 0d 09 69 |enuCmds |);.....i|
|000003b0| 66 20 28 20 74 68 65 4d | 65 6e 75 73 20 29 0d 09 |f ( theM|enus )..|
|000003c0| 09 46 6f 72 67 65 74 4f | 62 6a 65 63 74 28 20 74 |.ForgetO|bject( t|
|000003d0| 68 65 4d 65 6e 75 73 20 | 29 3b 0d 0d 09 52 65 6c |heMenus |);...Rel|
|000003e0| 65 61 73 65 52 65 73 6f | 75 72 63 65 28 28 48 61 |easeReso|urce((Ha|
|000003f0| 6e 64 6c 65 29 20 6d 42 | 61 72 48 20 29 3b 0d 7d |ndle) mB|arH );.}|
|00000400| 09 0d 0d 0d 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..../*--|--------|
|00000410| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000420| 2d 2d 2d 2d 2d 2d 2a 2a | 2a 20 20 49 4e 49 54 4d |------**|* INITM|
|00000430| 45 4e 55 42 41 52 20 20 | 2a 2a 2a 2d 2d 2d 2d 2d |ENUBAR |***-----|
|00000440| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 2f 2a |--------|---*/./*|
|00000460| 0d 69 6e 69 74 69 61 6c | 69 73 65 20 74 68 65 20 |.initial|ise the |
|00000470| 6d 65 6e 75 62 61 72 20 | 66 72 6f 6d 20 61 20 4d |menubar |from a M|
|00000480| 42 41 52 20 72 65 73 6f | 75 72 63 65 0d 2d 2d 2d |BAR reso|urce.---|
|00000490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000004e0| 2d 2d 2d 2d 2a 2f 0d 0d | 76 6f 69 64 09 09 5a 4d |----*/..|void..ZM|
|000004f0| 65 6e 75 42 61 72 3a 3a | 49 6e 69 74 4d 65 6e 75 |enuBar::|InitMenu|
|00000500| 42 61 72 28 29 0d 7b 0d | 09 2f 2f 20 63 72 65 61 |Bar().{.|.// crea|
|00000510| 74 65 20 61 6e 20 61 72 | 72 61 79 20 66 6f 72 20 |te an ar|ray for |
|00000520| 68 6f 6c 64 69 6e 67 20 | 6f 75 72 20 63 6f 6d 6d |holding |our comm|
|00000530| 61 6e 64 20 69 6e 66 6f | 0d 09 0d 09 46 61 69 6c |and info|....Fail|
|00000540| 4e 49 4c 28 20 74 68 65 | 4d 65 6e 75 43 6d 64 73 |NIL( the|MenuCmds|
|00000550| 20 3d 20 6e 65 77 20 5a | 41 72 72 61 79 28 20 73 | = new Z|Array( s|
|00000560| 69 7a 65 6f 66 28 20 4d | 65 6e 75 43 6d 64 20 29 |izeof( M|enuCmd )|
|00000570| 29 29 3b 0d 09 46 61 69 | 6c 4e 49 4c 28 20 74 68 |));..Fai|lNIL( th|
|00000580| 65 4d 65 6e 75 73 20 3d | 20 6e 65 77 20 5a 41 72 |eMenus =| new ZAr|
|00000590| 72 61 79 28 20 73 69 7a | 65 6f 66 28 20 4d 65 6e |ray( siz|eof( Men|
|000005a0| 75 49 6e 66 52 65 63 20 | 29 29 29 3b 0d 09 0d 09 |uInfRec |)));....|
|000005b0| 6d 62 43 6f 75 6e 74 20 | 3d 20 30 3b 0d 09 6d 69 |mbCount |= 0;..mi|
|000005c0| 53 65 65 64 20 3d 20 31 | 3b 0d 09 77 6d 4d 65 6e |Seed = 1|;..wmMen|
|000005d0| 75 49 44 20 3d 20 30 3b | 0d 09 72 62 50 65 6e 64 |uID = 0;|..rbPend|
|000005e0| 69 6e 67 20 3d 20 46 41 | 4c 53 45 3b 0d 09 69 6e |ing = FA|LSE;..in|
|000005f0| 44 69 73 70 61 74 63 68 | 20 3d 20 46 41 4c 53 45 |Dispatch| = FALSE|
|00000600| 3b 0d 09 0d 09 2f 2f 20 | 69 6e 69 74 69 61 6c 6c |;....// |initiall|
|00000610| 79 20 6d 65 6e 75 62 61 | 72 20 69 73 20 76 69 73 |y menuba|r is vis|
|00000620| 69 62 6c 65 0d 09 0d 09 | 6d 42 61 72 48 65 69 67 |ible....|mBarHeig|
|00000630| 68 74 20 3d 20 47 65 74 | 4d 42 61 72 48 65 69 67 |ht = Get|MBarHeig|
|00000640| 68 74 28 29 3b 0d 09 6d | 62 48 69 64 69 6e 67 20 |ht();..m|bHiding |
|00000650| 3d 20 4d 42 41 52 5f 53 | 48 4f 57 3b 0d 09 0d 09 |= MBAR_S|HOW;....|
|00000660| 2f 2f 20 6c 6f 61 64 20 | 74 68 65 20 4d 42 41 52 |// load |the MBAR|
|00000670| 20 72 65 73 6f 75 72 63 | 65 0d 09 0d 09 6d 42 61 | resourc|e....mBa|
|00000680| 72 48 20 3d 20 28 73 68 | 6f 72 74 2a 2a 29 20 47 |rH = (sh|ort**) G|
|00000690| 65 74 52 65 73 6f 75 72 | 63 65 28 20 27 4d 42 41 |etResour|ce( 'MBA|
|000006a0| 52 27 2c 20 6d 42 61 72 | 49 44 20 29 3b 0d 09 46 |R', mBar|ID );..F|
|000006b0| 61 69 6c 4f 53 45 72 72 | 28 20 52 65 73 45 72 72 |ailOSErr|( ResErr|
|000006c0| 6f 72 28 29 29 3b 0d 09 | 0d 09 48 4e 6f 50 75 72 |or());..|..HNoPur|
|000006d0| 67 65 28 28 48 61 6e 64 | 6c 65 29 20 6d 42 61 72 |ge((Hand|le) mBar|
|000006e0| 48 20 29 3b 0d 09 0d 09 | 2f 2f 20 72 65 61 64 20 |H );....|// read |
|000006f0| 69 6e 20 6d 65 6e 75 73 | 20 66 72 6f 6d 20 74 68 |in menus| from th|
|00000700| 65 20 4d 42 41 52 20 72 | 65 73 6f 75 72 63 65 0d |e MBAR r|esource.|
|00000710| 09 0d 09 4c 6f 61 64 4d | 65 6e 75 73 28 29 3b 0d |...LoadM|enus();.|
|00000720| 09 0d 09 48 50 75 72 67 | 65 28 28 48 61 6e 64 6c |...HPurg|e((Handl|
|00000730| 65 29 20 6d 42 61 72 48 | 20 29 3b 0d 09 0d 09 2f |e) mBarH| );..../|
|00000740| 2f 20 61 64 64 20 74 68 | 65 20 73 74 61 6e 64 61 |/ add th|e standa|
|00000750| 72 64 20 69 74 65 6d 73 | 20 28 44 41 27 73 29 20 |rd items| (DA's) |
|00000760| 74 6f 20 74 68 65 20 41 | 70 70 6c 65 20 6d 65 6e |to the A|pple men|
|00000770| 75 0d 09 0d 09 41 70 70 | 65 6e 64 53 74 64 49 74 |u....App|endStdIt|
|00000780| 65 6d 73 28 20 6b 41 70 | 70 6c 65 4d 65 6e 75 49 |ems( kAp|pleMenuI|
|00000790| 44 20 29 3b 09 0d 09 0d | 09 6d 65 6e 75 43 68 65 |D );....|.menuChe|
|000007a0| 63 6b 43 68 61 72 20 3d | 20 63 68 65 63 6b 4d 61 |ckChar =| checkMa|
|000007b0| 72 6b 3b 0d 09 0d 09 2f | 2f 20 6e 6f 74 65 20 68 |rk;..../|/ note h|
|000007c0| 6f 77 20 6d 61 6e 79 20 | 69 74 65 6d 73 20 61 72 |ow many |items ar|
|000007d0| 65 20 69 6e 20 74 68 65 | 20 68 65 6c 70 20 6d 65 |e in the| help me|
|000007e0| 6e 75 20 73 6f 20 77 65 | 20 63 61 6e 20 63 6f 72 |nu so we| can cor|
|000007f0| 72 65 63 74 6c 79 0d 09 | 2f 2f 20 69 64 65 6e 74 |rectly..|// ident|
|00000800| 69 66 79 20 61 6e 79 20 | 69 74 65 6d 73 20 77 65 |ify any |items we|
|00000810| 20 68 61 76 65 20 61 64 | 64 65 64 0d 09 0d 09 4d | have ad|ded....M|
|00000820| 65 6e 75 48 61 6e 64 6c | 65 09 68 65 6c 70 4d 65 |enuHandl|e.helpMe|
|00000830| 6e 75 48 3b 0d 09 0d 09 | 46 61 69 6c 4f 53 45 72 |nuH;....|FailOSEr|
|00000840| 72 28 20 48 4d 47 65 74 | 48 65 6c 70 4d 65 6e 75 |r( HMGet|HelpMenu|
|00000850| 48 61 6e 64 6c 65 28 20 | 26 68 65 6c 70 4d 65 6e |Handle( |&helpMen|
|00000860| 75 48 20 29 29 3b 20 0d | 09 6d 48 65 6c 70 4f 66 |uH )); .|.mHelpOf|
|00000870| 66 73 65 74 20 3d 20 43 | 6f 75 6e 74 4d 65 6e 75 |fset = C|ountMenu|
|00000880| 49 74 65 6d 73 28 20 68 | 65 6c 70 4d 65 6e 75 48 |Items( h|elpMenuH|
|00000890| 20 29 3b 0d 7d 09 0d 0d | 0d 2f 2a 2d 2d 2d 2d 2d | );.}...|./*-----|
|000008a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2a 2a 20 20 43 |--------|--*** C|
|000008c0| 4c 49 43 4b 4d 45 4e 55 | 42 41 52 20 20 2a 2a 2a |LICKMENU|BAR ***|
|000008d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008f0| 2a 2f 0d 2f 2a 0d 68 61 | 6e 64 6c 65 20 6d 6f 75 |*/./*.ha|ndle mou|
|00000900| 73 65 20 63 6c 69 63 6b | 20 69 6e 20 74 68 65 20 |se click| in the |
|00000910| 6d 65 6e 75 62 61 72 0d | 2d 2d 2d 2d 2d 2d 2d 2d |menubar.|--------|
|00000920| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000930| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000940| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000950| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000960| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00000970| 2f 0d 0d 76 6f 69 64 09 | 09 5a 4d 65 6e 75 42 61 |/..void.|.ZMenuBa|
|00000980| 72 3a 3a 43 6c 69 63 6b | 4d 65 6e 75 42 61 72 28 |r::Click|MenuBar(|
|00000990| 20 63 6f 6e 73 74 20 50 | 6f 69 6e 74 20 6d 6f 75 | const P|oint mou|
|000009a0| 73 65 50 74 20 29 0d 7b | 0d 09 6c 6f 6e 67 09 09 |sePt ).{|..long..|
|000009b0| 6d 53 65 6c 65 63 74 3b | 0d 09 0d 09 2f 2f 20 69 |mSelect;|....// i|
|000009c0| 6e 69 74 69 61 6c 6c 79 | 20 64 69 73 61 62 6c 65 |nitially| disable|
|000009d0| 20 61 6c 6c 20 6d 65 6e | 75 20 69 74 65 6d 73 0d | all men|u items.|
|000009e0| 09 0d 09 44 69 6d 4d 65 | 6e 75 73 28 29 3b 0d 09 |...DimMe|nus();..|
|000009f0| 0d 09 2f 2f 20 61 73 6b | 20 74 68 65 20 63 6f 6d |..// ask| the com|
|00000a00| 6d 61 6e 64 20 63 68 61 | 69 6e 20 74 6f 20 72 65 |mand cha|in to re|
|00000a10| 65 6e 61 62 6c 65 20 74 | 68 65 20 72 65 6c 65 76 |enable t|he relev|
|00000a20| 61 6e 74 20 6d 65 6e 75 | 20 69 74 65 6d 73 0d 0d |ant menu| items..|
|00000a30| 09 69 66 20 28 20 67 43 | 75 72 48 61 6e 64 6c 65 |.if ( gC|urHandle|
|00000a40| 72 20 29 0d 09 09 67 43 | 75 72 48 61 6e 64 6c 65 |r )...gC|urHandle|
|00000a50| 72 2d 3e 55 70 64 61 74 | 65 4d 65 6e 75 73 28 29 |r->Updat|eMenus()|
|00000a60| 3b 0d 0d 09 2f 2f 20 6e | 6f 77 20 74 72 61 63 6b |;...// n|ow track|
|00000a70| 20 61 6e 64 20 73 65 6c | 65 63 74 20 74 68 65 20 | and sel|ect the |
|00000a80| 6d 65 6e 75 73 0d 09 0d | 09 6d 53 65 6c 65 63 74 |menus...|.mSelect|
|00000a90| 20 3d 20 54 72 61 63 6b | 4d 65 6e 75 42 61 72 28 | = Track|MenuBar(|
|00000aa0| 20 6d 6f 75 73 65 50 74 | 20 29 3b 0d 09 0d 09 2f | mousePt| );..../|
|00000ab0| 2f 20 64 69 73 70 61 74 | 63 68 20 74 68 65 20 63 |/ dispat|ch the c|
|00000ac0| 6f 6d 6d 61 6e 64 0d 09 | 0d 09 44 69 73 70 61 74 |ommand..|..Dispat|
|00000ad0| 63 68 43 6f 6d 6d 61 6e | 64 28 20 6d 53 65 6c 65 |chComman|d( mSele|
|00000ae0| 63 74 20 29 3b 09 0d 7d | 09 0d 0d 0d 2f 2a 2d 2d |ct );..}|..../*--|
|00000af0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2a 2a 2a |--------|-----***|
|00000b10| 20 20 54 52 41 43 4b 4d | 45 4e 55 42 41 52 20 20 | TRACKM|ENUBAR |
|00000b20| 2a 2a 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |***-----|--------|
|00000b30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b40| 2d 2d 2d 2a 2f 0d 2f 2a | 0d 74 72 61 63 6b 20 74 |---*/./*|.track t|
|00000b50| 68 65 20 6d 65 6e 75 62 | 61 72 2c 20 72 65 74 75 |he menub|ar, retu|
|00000b60| 72 6e 69 6e 67 20 74 68 | 65 20 69 74 65 6d 20 63 |rning th|e item c|
|00000b70| 68 6f 73 65 6e 2e 0d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |hosen..-|--------|
|00000b80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000b90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ba0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000bb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000bc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2f |--------|------*/|
|00000bd0| 0d 0d 6c 6f 6e 67 09 09 | 5a 4d 65 6e 75 42 61 72 |..long..|ZMenuBar|
|00000be0| 3a 3a 54 72 61 63 6b 4d | 65 6e 75 42 61 72 28 20 |::TrackM|enuBar( |
|00000bf0| 63 6f 6e 73 74 20 50 6f | 69 6e 74 20 6d 6f 75 73 |const Po|int mous|
|00000c00| 65 20 29 09 0d 7b 0d 09 | 50 61 75 73 65 43 75 72 |e )..{..|PauseCur|
|00000c10| 73 6f 72 41 6e 69 6d 61 | 74 69 6f 6e 28 20 30 20 |sorAnima|tion( 0 |
|00000c20| 29 3b 0d 0d 09 72 65 74 | 75 72 6e 20 4d 65 6e 75 |);...ret|urn Menu|
|00000c30| 53 65 6c 65 63 74 28 20 | 6d 6f 75 73 65 20 29 3b |Select( |mouse );|
|00000c40| 0d 7d 0d 0d 0d 2f 2a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.}.../*-|--------|
|00000c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000c60| 2d 2d 2d 2d 2d 2a 2a 2a | 20 20 55 50 44 41 54 45 |-----***| UPDATE|
|00000c70| 4d 45 4e 55 42 41 52 20 | 20 2a 2a 2a 2d 2d 2d 2d |MENUBAR | ***----|
|00000c80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000c90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2a 2f 0d 2f |--------|----*/./|
|00000ca0| 2a 0d 72 65 64 72 61 77 | 20 74 68 65 20 6d 65 6e |*.redraw| the men|
|00000cb0| 75 62 61 72 2e 20 49 66 | 20 74 68 65 20 6d 65 6e |ubar. If| the men|
|00000cc0| 75 62 61 72 20 69 73 20 | 63 75 72 72 65 6e 74 6c |ubar is |currentl|
|00000cd0| 79 20 64 69 73 70 61 74 | 63 68 69 6e 67 20 74 6f |y dispat|ching to|
|00000ce0| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 20 63 68 61 | the com|mand cha|
|00000cf0| 69 6e 2c 20 73 65 74 0d | 61 20 66 6c 61 67 20 69 |in, set.|a flag i|
|00000d00| 6e 20 6f 72 64 65 72 20 | 74 6f 20 63 61 75 73 65 |n order |to cause|
|00000d10| 20 75 73 20 74 6f 20 67 | 65 74 20 72 65 64 72 61 | us to g|et redra|
|00000d20| 77 6e 20 77 68 65 6e 20 | 74 68 65 20 63 6f 6d 6d |wn when |the comm|
|00000d30| 61 6e 64 20 63 6f 6d 70 | 6c 65 74 65 73 2e 20 49 |and comp|letes. I|
|00000d40| 66 20 79 6f 75 20 64 6f | 6e 27 74 20 64 6f 0d 74 |f you do|n't do.t|
|00000d50| 68 69 73 2c 20 74 68 65 | 20 6d 65 6e 75 62 61 72 |his, the| menubar|
|00000d60| 20 63 61 6e 20 67 65 74 | 20 69 74 73 65 6c 66 20 | can get| itself |
|00000d70| 69 6e 74 6f 20 61 20 62 | 61 64 20 76 69 73 75 61 |into a b|ad visua|
|00000d80| 6c 20 73 74 61 74 65 2e | 0d 2d 2d 2d 2d 2d 2d 2d |l state.|.-------|
|00000d90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000da0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000db0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000dc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000dd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000de0| 2a 2f 0d 0d 76 6f 69 64 | 09 09 5a 4d 65 6e 75 42 |*/..void|..ZMenuB|
|00000df0| 61 72 3a 3a 55 70 64 61 | 74 65 4d 65 6e 75 42 61 |ar::Upda|teMenuBa|
|00000e00| 72 28 29 0d 7b 0d 09 69 | 66 20 28 20 69 6e 44 69 |r().{..i|f ( inDi|
|00000e10| 73 70 61 74 63 68 20 7c | 7c 20 72 62 50 65 6e 64 |spatch ||| rbPend|
|00000e20| 69 6e 67 20 29 0d 09 09 | 72 62 50 65 6e 64 69 6e |ing )...|rbPendin|
|00000e30| 67 20 3d 20 54 52 55 45 | 3b 0d 09 65 6c 73 65 0d |g = TRUE|;..else.|
|00000e40| 09 09 44 72 61 77 4d 65 | 6e 75 42 61 72 28 29 3b |..DrawMe|nuBar();|
|00000e50| 0d 7d 0d 0d 0d 2f 2a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.}.../*-|--------|
|00000e60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000e70| 2d 2d 2d 2d 2d 2a 2a 2a | 20 20 44 49 53 50 41 54 |-----***| DISPAT|
|00000e80| 43 48 43 4f 4d 4d 41 4e | 44 20 20 2a 2a 2a 2d 2d |CHCOMMAN|D ***--|
|00000e90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ea0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2a 2f 0d 2f |--------|----*/./|
|00000eb0| 2a 0d 6c 6f 6f 6b 20 75 | 70 20 74 68 65 20 63 6f |*.look u|p the co|
|00000ec0| 6d 6d 61 6e 64 20 61 6e | 64 20 73 65 6e 64 20 69 |mmand an|d send i|
|00000ed0| 74 20 75 70 20 74 68 65 | 20 63 68 61 69 6e 0d 2d |t up the| chain.-|
|00000ee0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ef0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000f00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000f10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000f20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000f30| 2d 2d 2d 2d 2d 2d 2a 2f | 0d 0d 76 6f 69 64 09 5a |------*/|..void.Z|
|00000f40| 4d 65 6e 75 42 61 72 3a | 3a 44 69 73 70 61 74 63 |MenuBar:|:Dispatc|
|00000f50| 68 43 6f 6d 6d 61 6e 64 | 28 20 63 6f 6e 73 74 20 |hCommand|( const |
|00000f60| 6c 6f 6e 67 20 6d 53 65 | 6c 65 63 74 20 29 0d 7b |long mSe|lect ).{|
|00000f70| 0d 09 4d 65 6e 75 43 6d | 64 09 09 6d 43 6d 64 3b |..MenuCm|d..mCmd;|
|00000f80| 0d 09 0d 09 2f 2f 20 69 | 66 20 61 6e 20 69 74 65 |....// i|f an ite|
|00000f90| 6d 20 77 61 73 20 63 68 | 6f 73 65 6e 2c 20 6c 6f |m was ch|osen, lo|
|00000fa0| 6f 6b 20 75 70 20 74 68 | 65 20 63 6f 6d 6d 61 6e |ok up th|e comman|
|00000fb0| 64 20 61 6e 64 20 73 65 | 6e 64 20 69 74 20 75 70 |d and se|nd it up|
|00000fc0| 20 74 68 65 20 63 68 61 | 69 6e 0d 09 0d 09 6d 43 | the cha|in....mC|
|00000fd0| 6d 64 2e 74 68 65 43 6d | 64 20 3d 20 6e 6f 43 6f |md.theCm|d = noCo|
|00000fe0| 6d 6d 61 6e 64 3b 0d 09 | 0d 09 69 66 20 28 20 48 |mmand;..|..if ( H|
|00000ff0| 69 57 6f 72 64 28 20 6d | 53 65 6c 65 63 74 29 20 |iWord( m|Select) |
|00001000| 21 3d 20 30 20 26 26 20 | 67 43 75 72 48 61 6e 64 |!= 0 && |gCurHand|
|00001010| 6c 65 72 20 29 0d 09 7b | 0d 09 09 2f 2f 20 73 65 |ler )..{|...// se|
|00001020| 74 20 74 68 65 20 7a 6f | 6f 6d 20 73 6f 75 72 63 |t the zo|om sourc|
|00001030| 65 20 72 65 63 74 20 69 | 6e 20 63 61 73 65 20 74 |e rect i|n case t|
|00001040| 68 65 20 63 6f 6d 6d 61 | 6e 64 20 73 70 61 77 6e |he comma|nd spawn|
|00001050| 73 20 61 20 77 69 6e 64 | 6f 77 0d 09 09 23 69 66 |s a wind|ow...#if|
|00001060| 20 5f 5a 4f 4f 4d 5f 52 | 45 43 54 5f 46 58 0d 09 | _ZOOM_R|ECT_FX..|
|00001070| 09 0d 09 09 52 65 63 74 | 09 72 3b 0d 09 09 0d 09 |....Rect|.r;.....|
|00001080| 09 47 65 74 4d 65 6e 75 | 54 69 74 6c 65 52 65 63 |.GetMenu|TitleRec|
|00001090| 74 28 20 48 69 57 6f 72 | 64 28 20 6d 53 65 6c 65 |t( HiWor|d( mSele|
|000010a0| 63 74 20 29 2c 20 26 72 | 20 29 3b 0d 09 09 49 6e |ct ), &r| );...In|
|000010b0| 73 65 74 52 65 63 74 28 | 20 26 72 2c 20 32 30 2c |setRect(| &r, 20,|
|000010c0| 20 34 20 29 3b 0d 09 09 | 53 65 74 47 6c 6f 62 61 | 4 );...|SetGloba|
|000010d0| 6c 5a 6f 6f 6d 53 6f 75 | 72 63 65 28 20 26 72 20 |lZoomSou|rce( &r |
|000010e0| 29 3b 0d 0d 09 09 23 65 | 6e 64 69 66 0d 09 09 2f |);....#e|ndif.../|
|000010f0| 2f 20 69 66 20 74 68 65 | 20 6e 6f 6d 69 6e 61 74 |/ if the| nominat|
|00001100| 65 64 20 77 69 6e 64 6f | 77 73 20 6d 65 6e 75 2c |ed windo|ws menu,|
|00001110| 20 68 61 6e 64 6c 65 20 | 74 68 65 20 77 69 6e 64 | handle |the wind|
|00001120| 6f 77 20 73 65 6c 65 63 | 74 69 6f 6e 0d 09 09 0d |ow selec|tion....|
|00001130| 09 09 69 66 20 28 20 48 | 69 57 6f 72 64 28 20 6d |..if ( H|iWord( m|
|00001140| 53 65 6c 65 63 74 20 29 | 20 3d 3d 20 77 6d 4d 65 |Select )| == wmMe|
|00001150| 6e 75 49 44 20 29 0d 09 | 09 09 67 57 69 6e 64 6f |nuID )..|..gWindo|
|00001160| 77 4d 61 6e 61 67 65 72 | 2d 3e 53 65 6c 65 63 74 |wManager|->Select|
|00001170| 57 69 6e 64 6f 77 46 72 | 6f 6d 4d 65 6e 75 28 20 |WindowFr|omMenu( |
|00001180| 4c 6f 57 6f 72 64 28 20 | 6d 53 65 6c 65 63 74 20 |LoWord( |mSelect |
|00001190| 29 29 3b 09 0d 0d 09 09 | 46 69 6e 64 4d 43 6d 64 |));.....|FindMCmd|
|000011a0| 28 20 6d 53 65 6c 65 63 | 74 2c 20 26 6d 43 6d 64 |( mSelec|t, &mCmd|
|000011b0| 20 29 3b 0d 09 09 0d 09 | 09 69 66 20 28 20 6d 43 | );.....|.if ( mC|
|000011c0| 6d 64 2e 74 68 65 43 6d | 64 20 21 3d 20 70 61 72 |md.theCm|d != par|
|000011d0| 65 6e 74 43 6d 64 20 29 | 0d 09 09 7b 0d 09 09 09 |entCmd )|...{....|
|000011e0| 2f 2f 20 69 66 20 74 68 | 65 20 63 6f 6d 6d 61 6e |// if th|e comman|
|000011f0| 64 20 77 61 73 20 66 6f | 75 6e 64 2c 20 70 61 73 |d was fo|und, pas|
|00001200| 73 20 69 74 20 75 70 20 | 74 68 65 20 63 68 61 69 |s it up |the chai|
|00001210| 6e 2e 20 49 66 20 6e 6f | 74 20 66 6f 75 6e 64 2c |n. If no|t found,|
|00001220| 20 77 65 20 73 74 69 6c | 6c 20 70 61 73 73 20 69 | we stil|l pass i|
|00001230| 74 0d 09 09 09 2f 2f 20 | 75 70 20 74 68 65 20 63 |t....// |up the c|
|00001240| 68 61 69 6e 2c 20 62 75 | 74 20 74 68 69 73 20 74 |hain, bu|t this t|
|00001250| 69 6d 65 20 61 73 20 74 | 68 65 20 64 69 72 65 63 |ime as t|he direc|
|00001260| 74 20 6d 65 6e 75 49 44 | 20 61 6e 64 20 69 74 65 |t menuID| and ite|
|00001270| 6d 49 44 20 63 68 6f 73 | 65 6e 2e 20 43 6f 6d 6d |mID chos|en. Comm|
|00001280| 61 6e 64 65 72 0d 09 09 | 09 2f 2f 20 63 6c 61 73 |ander...|.// clas|
|00001290| 73 65 73 20 63 61 6e 20 | 63 68 6f 6f 73 65 20 77 |ses can |choose w|
|000012a0| 68 69 63 68 20 6f 66 20 | 74 68 65 20 74 77 6f 20 |hich of |the two |
|000012b0| 6d 65 74 68 6f 64 73 20 | 28 6f 72 20 70 65 72 68 |methods |(or perh|
|000012c0| 61 70 73 20 62 6f 74 68 | 3f 29 20 74 6f 20 61 64 |aps both|?) to ad|
|000012d0| 6f 70 74 2e 0d 09 09 09 | 0d 09 09 09 69 6e 44 69 |opt.....|....inDi|
|000012e0| 73 70 61 74 63 68 20 3d | 20 54 52 55 45 3b 0d 09 |spatch =| TRUE;..|
|000012f0| 09 09 0d 09 09 09 69 66 | 20 28 20 6d 43 6d 64 2e |......if| ( mCmd.|
|00001300| 74 68 65 43 6d 64 20 21 | 3d 20 6e 6f 43 6f 6d 6d |theCmd !|= noComm|
|00001310| 61 6e 64 20 29 0d 09 09 | 09 09 67 43 75 72 48 61 |and )...|..gCurHa|
|00001320| 6e 64 6c 65 72 2d 3e 48 | 61 6e 64 6c 65 43 6f 6d |ndler->H|andleCom|
|00001330| 6d 61 6e 64 28 20 6d 43 | 6d 64 2e 74 68 65 43 6d |mand( mC|md.theCm|
|00001340| 64 20 29 3b 0d 09 09 09 | 65 6c 73 65 0d 09 09 09 |d );....|else....|
|00001350| 09 67 43 75 72 48 61 6e | 64 6c 65 72 2d 3e 48 61 |.gCurHan|dler->Ha|
|00001360| 6e 64 6c 65 43 6f 6d 6d | 61 6e 64 28 20 48 69 57 |ndleComm|and( HiW|
|00001370| 6f 72 64 28 20 6d 53 65 | 6c 65 63 74 20 29 2c 20 |ord( mSe|lect ), |
|00001380| 4c 6f 57 6f 72 64 28 20 | 6d 53 65 6c 65 63 74 20 |LoWord( |mSelect |
|00001390| 29 29 3b 09 0d 09 09 09 | 09 0d 09 09 09 69 6e 44 |));.....|.....inD|
|000013a0| 69 73 70 61 74 63 68 20 | 3d 20 46 41 4c 53 45 3b |ispatch |= FALSE;|
|000013b0| 09 09 0d 09 09 7d 0d 0d | 09 09 53 65 74 54 69 74 |.....}..|..SetTit|
|000013c0| 6c 65 48 69 6c 69 74 65 | 28 20 30 2c 20 46 41 4c |leHilite|( 0, FAL|
|000013d0| 53 45 20 29 3b 0d 09 09 | 0d 09 09 69 66 20 28 20 |SE );...|...if ( |
|000013e0| 72 62 50 65 6e 64 69 6e | 67 20 29 0d 09 09 7b 0d |rbPendin|g )...{.|
|000013f0| 09 09 09 72 62 50 65 6e | 64 69 6e 67 20 3d 20 46 |...rbPen|ding = F|
|00001400| 41 4c 53 45 3b 0d 09 09 | 09 55 70 64 61 74 65 4d |ALSE;...|.UpdateM|
|00001410| 65 6e 75 42 61 72 28 29 | 3b 0d 09 09 7d 0d 09 7d |enuBar()|;...}..}|
|00001420| 0d 7d 09 0d 0d 0d 2f 2a | 2d 2d 2d 2d 2d 2d 2d 2d |.}..../*|--------|
|00001430| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001440| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2a 2a 20 20 45 4e |--------|-*** EN|
|00001450| 41 42 4c 45 43 4d 44 20 | 20 2a 2a 2a 2d 2d 2d 2d |ABLECMD | ***----|
|00001460| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001470| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2a 2f 0d |--------|-----*/.|
|00001480| 2f 2a 0d 65 6e 61 62 6c | 65 20 74 68 65 20 6d 65 |/*.enabl|e the me|
|00001490| 6e 75 20 69 74 65 6d 20 | 61 73 73 6f 63 69 61 74 |nu item |associat|
|000014a0| 65 64 20 77 69 74 68 20 | 74 68 65 20 63 6f 6d 6d |ed with |the comm|
|000014b0| 61 6e 64 0d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |and.----|--------|
|000014c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000014d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000014e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000014f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001500| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 0d 76 |--------|---*/..v|
|00001510| 6f 69 64 09 09 5a 4d 65 | 6e 75 42 61 72 3a 3a 45 |oid..ZMe|nuBar::E|
|00001520| 6e 61 62 6c 65 43 6f 6d | 6d 61 6e 64 28 20 63 6f |nableCom|mand( co|
|00001530| 6e 73 74 20 6c 6f 6e 67 | 20 63 6d 64 20 29 0d 7b |nst long| cmd ).{|
|00001540| 0d 09 73 68 6f 72 74 09 | 6d 20 3d 20 30 2c 20 69 |..short.|m = 0, i|
|00001550| 20 3d 20 30 3b 0d 09 0d | 09 46 69 6e 64 43 6f 6d | = 0;...|.FindCom|
|00001560| 6d 61 6e 64 28 20 63 6d | 64 2c 20 26 6d 2c 20 26 |mand( cm|d, &m, &|
|00001570| 69 20 29 3b 0d 09 0d 09 | 69 66 20 28 20 6d 20 26 |i );....|if ( m &|
|00001580| 26 20 69 20 29 0d 09 09 | 45 6e 61 62 6c 65 43 6f |& i )...|EnableCo|
|00001590| 6d 6d 61 6e 64 28 20 6d | 2c 20 69 20 29 3b 0d 7d |mmand( m|, i );.}|
|000015a0| 09 0d 0d 2f 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.../*---|--------|
|000015b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000015c0| 2d 2d 2d 2d 2d 2d 2a 2a | 2a 20 20 45 4e 41 42 4c |------**|* ENABL|
|000015d0| 45 43 4d 44 20 20 2a 2a | 2a 2d 2d 2d 2d 2d 2d 2d |ECMD **|*-------|
|000015e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000015f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0d 0d 76 6f |--------|--*/..vo|
|00001600| 69 64 09 09 5a 4d 65 6e | 75 42 61 72 3a 3a 45 6e |id..ZMen|uBar::En|
|00001610| 61 62 6c 65 43 6f 6d 6d | 61 6e 64 28 20 63 6f 6e |ableComm|and( con|
|00001620| 73 74 20 73 68 6f 72 74 | 20 6d 65 6e 75 49 44 2c |st short| menuID,|
|00001630| 20 63 6f 6e 73 74 20 73 | 68 6f 72 74 20 69 74 65 | const s|hort ite|
|00001640| 6d 49 44 20 29 0d 7b 0d | 09 4d 65 6e 75 48 61 6e |mID ).{.|.MenuHan|
|00001650| 64 6c 65 09 6d 48 20 3d | 20 46 69 6e 64 4d 65 6e |dle.mH =| FindMen|
|00001660| 75 49 44 28 20 6d 65 6e | 75 49 44 20 29 3b 0d 09 |uID( men|uID );..|
|00001670| 0d 09 69 66 20 28 20 6d | 48 20 29 0d 09 7b 0d 09 |..if ( m|H )..{..|
|00001680| 09 45 6e 61 62 6c 65 49 | 74 65 6d 28 20 6d 48 2c |.EnableI|tem( mH,|
|00001690| 20 69 74 65 6d 49 44 20 | 29 3b 0d 09 09 0d 09 09 | itemID |);......|
|000016a0| 69 66 20 28 20 69 74 65 | 6d 49 44 20 3d 3d 20 30 |if ( ite|mID == 0|
|000016b0| 20 29 0d 09 09 09 55 70 | 64 61 74 65 4d 65 6e 75 | )....Up|dateMenu|
|000016c0| 42 61 72 28 29 3b 0d 09 | 7d 0d 7d 09 0d 0d 2f 2a |Bar();..|}.}.../*|
|000016d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000016e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000016f0| 2d 2a 2a 2a 20 20 44 49 | 53 41 42 4c 45 43 4d 44 |-*** DI|SABLECMD|
|00001700| 20 20 2a 2a 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ***---|--------|
|00001710| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001720| 2d 2d 2d 2d 2d 2a 2f 0d | 2f 2a 0d 64 69 73 61 62 |-----*/.|/*.disab|
|00001730| 6c 65 20 74 68 65 20 6d | 65 6e 75 20 69 74 65 6d |le the m|enu item|
|00001740| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|00001750| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 0d 2d 2d 2d | the com|mand.---|
|00001760| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001770| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001780| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001790| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000017a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000017b0| 2d 2d 2d 2d 2a 2f 0d 0d | 76 6f 69 64 09 09 5a 4d |----*/..|void..ZM|
|000017c0| 65 6e 75 42 61 72 3a 3a | 44 69 73 61 62 6c 65 43 |enuBar::|DisableC|
|000017d0| 6f 6d 6d 61 6e 64 28 20 | 63 6f 6e 73 74 20 6c 6f |ommand( |const lo|
|000017e0| 6e 67 20 63 6d 64 20 29 | 0d 7b 0d 09 73 68 6f 72 |ng cmd )|.{..shor|
|000017f0| 74 09 6d 20 3d 20 30 2c | 20 69 20 3d 20 30 3b 0d |t.m = 0,| i = 0;.|
|00001800| 09 0d 09 46 69 6e 64 43 | 6f 6d 6d 61 6e 64 28 20 |...FindC|ommand( |
|00001810| 63 6d 64 2c 20 26 6d 2c | 20 26 69 20 29 3b 0d 09 |cmd, &m,| &i );..|
|00001820| 0d 09 69 66 20 28 20 6d | 20 26 26 20 69 20 29 0d |..if ( m| && i ).|
|00001830| 09 09 44 69 73 61 62 6c | 65 43 6f 6d 6d 61 6e 64 |..Disabl|eCommand|
|00001840| 28 20 6d 2c 20 69 20 29 | 3b 0d 7d 09 0d 0d 2f 2a |( m, i )|;.}.../*|
|00001850| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001860| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001870| 2d 2a 2a 2a 20 20 44 49 | 53 41 42 4c 45 43 4d 44 |-*** DI|SABLECMD|
|00001880| 20 20 2a 2a 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ***---|--------|
|00001890| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000018a0| 2d 2d 2d 2d 2d 2a 2f 0d | 0d 76 6f 69 64 09 09 5a |-----*/.|.void..Z|
|000018b0| 4d 65 6e 75 42 61 72 3a | 3a 44 69 73 61 62 6c 65 |MenuBar:|:Disable|
|000018c0| 43 6f 6d 6d 61 6e 64 28 | 20 63 6f 6e 73 74 20 73 |Command(| const s|
|000018d0| 68 6f 72 74 20 6d 65 6e | 75 49 44 2c 20 63 6f 6e |hort men|uID, con|
|000018e0| 73 74 20 73 68 6f 72 74 | 20 69 74 65 6d 49 44 20 |st short| itemID |
|000018f0| 29 0d 7b 0d 09 4d 65 6e | 75 48 61 6e 64 6c 65 09 |).{..Men|uHandle.|
|00001900| 6d 48 20 3d 20 46 69 6e | 64 4d 65 6e 75 49 44 28 |mH = Fin|dMenuID(|
|00001910| 20 6d 65 6e 75 49 44 20 | 29 3b 0d 09 0d 09 69 66 | menuID |);....if|
|00001920| 20 28 20 6d 48 20 29 0d | 09 7b 0d 09 09 44 69 73 | ( mH ).|.{...Dis|
|00001930| 61 62 6c 65 49 74 65 6d | 28 20 6d 48 2c 20 69 74 |ableItem|( mH, it|
|00001940| 65 6d 49 44 20 29 3b 0d | 09 09 0d 09 09 69 66 20 |emID );.|.....if |
|00001950| 28 20 69 74 65 6d 49 44 | 20 3d 3d 20 30 20 29 0d |( itemID| == 0 ).|
|00001960| 09 09 09 55 70 64 61 74 | 65 4d 65 6e 75 42 61 72 |...Updat|eMenuBar|
|00001970| 28 29 3b 0d 09 7d 0d 7d | 0d 0d 0d 2f 2a 2d 2d 2d |();..}.}|.../*---|
|00001980| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001990| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2a 2a 2a |--------|-----***|
|000019a0| 20 20 43 48 45 43 4b 43 | 4f 4d 4d 41 4e 44 20 20 | CHECKC|OMMAND |
|000019b0| 2a 2a 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |***-----|--------|
|000019c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000019d0| 2d 2d 2a 2f 0d 2f 2a 0d | 63 68 65 63 6b 20 74 68 |--*/./*.|check th|
|000019e0| 65 20 6d 65 6e 75 20 63 | 6f 6d 6d 61 6e 64 20 6f |e menu c|ommand o|
|000019f0| 6e 20 6f 72 20 6f 66 66 | 2e 0d 2d 2d 2d 2d 2d 2d |n or off|..------|
|00001a00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001a50| 2d 2a 2f 0d 0d 76 6f 69 | 64 09 09 5a 4d 65 6e 75 |-*/..voi|d..ZMenu|
|00001a60| 42 61 72 3a 3a 43 68 65 | 63 6b 43 6f 6d 6d 61 6e |Bar::Che|ckComman|
|00001a70| 64 28 20 63 6f 6e 73 74 | 20 6c 6f 6e 67 20 63 6d |d( const| long cm|
|00001a80| 64 2c 20 63 6f 6e 73 74 | 20 42 6f 6f 6c 65 61 6e |d, const| Boolean|
|00001a90| 20 63 68 65 63 6b 4f 6e | 4f 66 66 20 29 0d 7b 0d | checkOn|Off ).{.|
|00001aa0| 09 73 68 6f 72 74 09 6d | 20 3d 20 30 2c 20 69 20 |.short.m| = 0, i |
|00001ab0| 3d 20 30 3b 0d 09 0d 09 | 46 69 6e 64 43 6f 6d 6d |= 0;....|FindComm|
|00001ac0| 61 6e 64 28 20 63 6d 64 | 2c 20 26 6d 2c 20 26 69 |and( cmd|, &m, &i|
|00001ad0| 20 29 3b 0d 09 0d 09 69 | 66 20 28 20 6d 20 26 26 | );....i|f ( m &&|
|00001ae0| 20 69 20 29 0d 09 09 43 | 68 65 63 6b 43 6f 6d 6d | i )...C|heckComm|
|00001af0| 61 6e 64 28 20 6d 2c 20 | 69 2c 20 63 68 65 63 6b |and( m, |i, check|
|00001b00| 4f 6e 4f 66 66 20 29 3b | 0d 7d 0d 0d 0d 2f 2a 2d |OnOff );|.}.../*-|
|00001b10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001b20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00001b30| 2a 2a 20 20 43 48 45 43 | 4b 43 4f 4d 4d 41 4e 44 |** CHEC|KCOMMAND|
|00001b40| 20 20 2a 2a 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ***---|--------|
|00001b50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001b60| 2d 2d 2d 2d 2a 2f 0d 0d | 76 6f 69 64 09 09 5a 4d |----*/..|void..ZM|
|00001b70| 65 6e 75 42 61 72 3a 3a | 43 68 65 63 6b 43 6f 6d |enuBar::|CheckCom|
|00001b80| 6d 61 6e 64 28 20 63 6f | 6e 73 74 20 73 68 6f 72 |mand( co|nst shor|
|00001b90| 74 20 6d 65 6e 75 49 44 | 2c 20 63 6f 6e 73 74 20 |t menuID|, const |
|00001ba0| 73 68 6f 72 74 20 69 74 | 65 6d 49 44 2c 20 63 6f |short it|emID, co|
|00001bb0| 6e 73 74 20 42 6f 6f 6c | 65 61 6e 20 63 68 65 63 |nst Bool|ean chec|
|00001bc0| 6b 4f 6e 4f 66 66 20 29 | 0d 7b 0d 09 4d 65 6e 75 |kOnOff )|.{..Menu|
|00001bd0| 48 61 6e 64 6c 65 09 6d | 48 20 3d 20 46 69 6e 64 |Handle.m|H = Find|
|00001be0| 4d 65 6e 75 49 44 28 20 | 6d 65 6e 75 49 44 20 29 |MenuID( |menuID )|
|00001bf0| 3b 0d 09 0d 09 69 66 20 | 28 20 6d 48 20 29 0d 09 |;....if |( mH )..|
|00001c00| 09 53 65 74 49 74 65 6d | 4d 61 72 6b 28 20 6d 48 |.SetItem|Mark( mH|
|00001c10| 2c 20 69 74 65 6d 49 44 | 2c 20 63 68 65 63 6b 4f |, itemID|, checkO|
|00001c20| 6e 4f 66 66 3f 20 6d 65 | 6e 75 43 68 65 63 6b 43 |nOff? me|nuCheckC|
|00001c30| 68 61 72 20 3a 20 6e 6f | 4d 61 72 6b 20 29 3b 0d |har : no|Mark );.|
|00001c40| 7d 0d 0d 0d 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}.../*--|--------|
|00001c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c60| 2d 2d 2d 2d 2d 2d 2a 2a | 2a 20 20 43 48 45 43 4b |------**|* CHECK|
|00001c70| 43 4f 4d 4d 41 4e 44 20 | 20 2a 2a 2a 2d 2d 2d 2d |COMMAND | ***----|
|00001c80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 0d 76 |--------|---*/..v|
|00001ca0| 6f 69 64 09 09 5a 4d 65 | 6e 75 42 61 72 3a 3a 43 |oid..ZMe|nuBar::C|
|00001cb0| 68 65 63 6b 43 6f 6d 6d | 61 6e 64 28 20 63 6f 6e |heckComm|and( con|
|00001cc0| 73 74 20 73 68 6f 72 74 | 20 6d 65 6e 75 49 44 2c |st short| menuID,|
|00001cd0| 20 53 74 72 32 35 35 20 | 69 74 65 6d 53 74 72 69 | Str255 |itemStri|
|00001ce0| 6e 67 2c 20 63 6f 6e 73 | 74 20 42 6f 6f 6c 65 61 |ng, cons|t Boolea|
|00001cf0| 6e 20 63 68 65 63 6b 4f | 6e 4f 66 66 20 29 0d 7b |n checkO|nOff ).{|
|00001d00| 0d 09 2f 2f 20 63 68 65 | 63 6b 20 74 68 65 20 69 |..// che|ck the i|
|00001d10| 74 65 6d 20 77 69 74 68 | 20 74 68 65 20 74 65 78 |tem with| the tex|
|00001d20| 74 20 6d 61 74 63 68 69 | 6e 67 20 74 68 61 74 20 |t matchi|ng that |
|00001d30| 70 61 73 73 65 64 20 28 | 6e 6f 74 20 63 61 73 65 |passed (|not case|
|00001d40| 20 73 65 6e 73 69 74 69 | 76 65 29 0d 09 0d 09 4d | sensiti|ve)....M|
|00001d50| 65 6e 75 48 61 6e 64 6c | 65 09 6d 48 20 3d 20 46 |enuHandl|e.mH = F|
|00001d60| 69 6e 64 4d 65 6e 75 49 | 44 28 20 6d 65 6e 75 49 |indMenuI|D( menuI|
|00001d70| 44 20 29 3b 0d 09 53 74 | 72 32 35 35 09 09 69 4d |D );..St|r255..iM|
|00001d80| 61 74 63 68 3b 0d 09 0d | 09 69 66 20 28 20 6d 48 |atch;...|.if ( mH|
|00001d90| 20 29 0d 09 7b 0d 09 09 | 73 68 6f 72 74 09 6d 20 | )..{...|short.m |
|00001da0| 3d 20 43 6f 75 6e 74 4d | 65 6e 75 49 74 65 6d 73 |= CountM|enuItems|
|00001db0| 28 20 6d 48 20 29 3b 0d | 09 0d 09 09 64 6f 0d 09 |( mH );.|....do..|
|00001dc0| 09 7b 0d 09 09 09 47 65 | 74 4d 65 6e 75 49 74 65 |.{....Ge|tMenuIte|
|00001dd0| 6d 54 65 78 74 28 20 6d | 48 2c 20 6d 2c 20 69 4d |mText( m|H, m, iM|
|00001de0| 61 74 63 68 20 29 3b 0d | 09 09 09 0d 09 09 09 69 |atch );.|.......i|
|00001df0| 66 20 28 20 45 71 75 61 | 6c 53 74 72 69 6e 67 28 |f ( Equa|lString(|
|00001e00| 20 69 74 65 6d 53 74 72 | 69 6e 67 2c 20 69 4d 61 | itemStr|ing, iMa|
|00001e10| 74 63 68 2c 20 46 41 4c | 53 45 2c 20 54 52 55 45 |tch, FAL|SE, TRUE|
|00001e20| 20 29 29 0d 09 09 09 7b | 0d 09 09 09 09 53 65 74 | ))....{|.....Set|
|00001e30| 49 74 65 6d 4d 61 72 6b | 28 20 6d 48 2c 20 6d 2c |ItemMark|( mH, m,|
|00001e40| 20 63 68 65 63 6b 4f 6e | 4f 66 66 3f 20 6d 65 6e | checkOn|Off? men|
|00001e50| 75 43 68 65 63 6b 43 68 | 61 72 20 3a 20 6e 6f 4d |uCheckCh|ar : noM|
|00001e60| 61 72 6b 20 29 3b 0d 09 | 09 09 09 62 72 65 61 6b |ark );..|...break|
|00001e70| 3b 0d 09 09 09 7d 0d 09 | 09 7d 0d 09 09 77 68 69 |;....}..|.}...whi|
|00001e80| 6c 65 28 20 2d 2d 6d 20 | 29 3b 0d 09 7d 0d 7d 0d |le( --m |);..}.}.|
|00001e90| 0d 0d 2f 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |../*----|--------|
|00001ea0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001eb0| 2a 2a 2a 20 20 43 48 45 | 43 4b 43 4f 4d 4d 41 4e |*** CHE|CKCOMMAN|
|00001ec0| 44 57 49 54 48 43 48 41 | 52 20 20 2a 2a 2a 2d 2d |DWITHCHA|R ***--|
|00001ed0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001ee0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 0d 76 6f 69 |--------|-*/..voi|
|00001ef0| 64 09 09 5a 4d 65 6e 75 | 42 61 72 3a 3a 43 68 65 |d..ZMenu|Bar::Che|
|00001f00| 63 6b 43 6f 6d 6d 61 6e | 64 57 69 74 68 43 68 61 |ckComman|dWithCha|
|00001f10| 72 28 20 63 6f 6e 73 74 | 20 6c 6f 6e 67 20 63 6d |r( const| long cm|
|00001f20| 64 2c 20 63 6f 6e 73 74 | 20 63 68 61 72 20 63 68 |d, const| char ch|
|00001f30| 65 63 6b 43 68 61 72 20 | 29 0d 7b 0d 09 73 68 6f |eckChar |).{..sho|
|00001f40| 72 74 09 6d 20 3d 20 30 | 2c 20 69 20 3d 20 30 3b |rt.m = 0|, i = 0;|
|00001f50| 0d 09 0d 09 46 69 6e 64 | 43 6f 6d 6d 61 6e 64 28 |....Find|Command(|
|00001f60| 20 63 6d 64 2c 20 26 6d | 2c 20 26 69 20 29 3b 0d | cmd, &m|, &i );.|
|00001f70| 09 0d 09 69 66 20 28 20 | 6d 20 26 26 20 69 20 29 |...if ( |m && i )|
|00001f80| 0d 09 7b 0d 09 09 4d 65 | 6e 75 48 61 6e 64 6c 65 |..{...Me|nuHandle|
|00001f90| 09 6d 48 20 3d 20 46 69 | 6e 64 4d 65 6e 75 49 44 |.mH = Fi|ndMenuID|
|00001fa0| 28 20 6d 20 29 3b 0d 09 | 09 0d 09 09 69 66 20 28 |( m );..|....if (|
|00001fb0| 20 6d 48 20 29 0d 09 09 | 09 53 65 74 49 74 65 6d | mH )...|.SetItem|
|00001fc0| 4d 61 72 6b 28 20 6d 48 | 2c 20 69 2c 20 63 68 65 |Mark( mH|, i, che|
|00001fd0| 63 6b 43 68 61 72 20 29 | 3b 0d 09 7d 0d 7d 0d 0d |ckChar )|;..}.}..|
|00001fe0| 0d 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |./*-----|--------|
|00001ff0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00002000| 2a 2a 20 20 43 48 45 43 | 4b 43 4f 4d 4d 41 4e 44 |** CHEC|KCOMMAND|
|00002010| 57 49 54 48 43 48 41 52 | 20 20 2a 2a 2a 2d 2d 2d |WITHCHAR| ***---|
|00002020| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002030| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 0d 76 6f 69 64 |--------|*/..void|
|00002040| 09 09 5a 4d 65 6e 75 42 | 61 72 3a 3a 43 68 65 63 |..ZMenuB|ar::Chec|
|00002050| 6b 43 6f 6d 6d 61 6e 64 | 57 69 74 68 43 68 61 72 |kCommand|WithChar|
|00002060| 28 20 63 6f 6e 73 74 20 | 73 68 6f 72 74 20 6d 65 |( const |short me|
|00002070| 6e 75 49 44 2c 20 53 74 | 72 32 35 35 20 69 74 65 |nuID, St|r255 ite|
|00002080| 6d 53 74 72 69 6e 67 2c | 20 63 6f 6e 73 74 20 63 |mString,| const c|
|00002090| 68 61 72 20 63 68 65 63 | 6b 43 68 61 72 20 29 0d |har chec|kChar ).|
|000020a0| 7b 0d 09 4d 65 6e 75 48 | 61 6e 64 6c 65 09 6d 48 |{..MenuH|andle.mH|
|000020b0| 20 3d 20 46 69 6e 64 4d | 65 6e 75 49 44 28 20 6d | = FindM|enuID( m|
|000020c0| 65 6e 75 49 44 20 29 3b | 0d 09 53 74 72 32 35 35 |enuID );|..Str255|
|000020d0| 09 09 69 4d 61 74 63 68 | 3b 0d 09 0d 09 69 66 20 |..iMatch|;....if |
|000020e0| 28 20 6d 48 20 29 0d 09 | 7b 0d 09 09 73 68 6f 72 |( mH )..|{...shor|
|000020f0| 74 09 6d 20 3d 20 43 6f | 75 6e 74 4d 65 6e 75 49 |t.m = Co|untMenuI|
|00002100| 74 65 6d 73 28 20 6d 48 | 20 29 3b 0d 09 0d 09 09 |tems( mH| );.....|
|00002110| 64 6f 0d 09 09 7b 0d 09 | 09 09 47 65 74 4d 65 6e |do...{..|..GetMen|
|00002120| 75 49 74 65 6d 54 65 78 | 74 28 20 6d 48 2c 20 6d |uItemTex|t( mH, m|
|00002130| 2c 20 69 4d 61 74 63 68 | 20 29 3b 0d 09 09 09 0d |, iMatch| );.....|
|00002140| 09 09 09 69 66 20 28 20 | 45 71 75 61 6c 53 74 72 |...if ( |EqualStr|
|00002150| 69 6e 67 28 20 69 74 65 | 6d 53 74 72 69 6e 67 2c |ing( ite|mString,|
|00002160| 20 69 4d 61 74 63 68 2c | 20 46 41 4c 53 45 2c 20 | iMatch,| FALSE, |
|00002170| 54 52 55 45 20 29 29 0d | 09 09 09 7b 0d 09 09 09 |TRUE )).|...{....|
|00002180| 09 53 65 74 49 74 65 6d | 4d 61 72 6b 28 20 6d 48 |.SetItem|Mark( mH|
|00002190| 2c 20 6d 2c 20 63 68 65 | 63 6b 43 68 61 72 20 29 |, m, che|ckChar )|
|000021a0| 3b 0d 09 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 09 |;.....br|eak;....|
|000021b0| 7d 0d 09 09 7d 0d 09 09 | 77 68 69 6c 65 28 20 2d |}...}...|while( -|
|000021c0| 2d 6d 20 29 3b 0d 09 7d | 0d 7d 0d 0d 0d 2f 2a 2d |-m );..}|.}.../*-|
|000021d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000021e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2a |--------|------**|
|000021f0| 2a 20 20 53 45 54 43 4f | 4d 4d 41 4e 44 54 45 58 |* SETCO|MMANDTEX|
|00002200| 54 20 20 2a 2a 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |T ***--|--------|
|00002210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002220| 2d 2d 2d 2d 2a 2f 0d 2f | 2a 0d 73 65 74 20 74 68 |----*/./|*.set th|
|00002230| 65 20 74 65 78 74 20 6f | 66 20 61 20 6d 65 6e 75 |e text o|f a menu|
|00002240| 20 69 74 65 6d 20 74 6f | 20 74 68 65 20 64 65 73 | item to| the des|
|00002250| 69 72 65 64 20 73 74 72 | 69 6e 67 2e 20 43 61 6e |ired str|ing. Can|
|00002260| 20 62 65 20 61 63 63 65 | 73 73 65 64 20 62 79 20 | be acce|ssed by |
|00002270| 63 6f 6d 6d 61 6e 64 20 | 6f 72 20 69 74 65 6d 2e |command |or item.|
|00002280| 0d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.-------|--------|
|00002290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000022a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000022b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000022c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000022d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 0d 76 6f 69 64 |--------|*/..void|
|000022e0| 09 09 5a 4d 65 6e 75 42 | 61 72 3a 3a 53 65 74 43 |..ZMenuB|ar::SetC|
|000022f0| 6f 6d 6d 61 6e 64 54 65 | 78 74 28 20 63 6f 6e 73 |ommandTe|xt( cons|
|00002300| 74 20 6c 6f 6e 67 20 63 | 6d 64 2c 20 53 74 72 32 |t long c|md, Str2|
|00002310| 35 35 20 61 54 65 78 74 | 20 29 0d 7b 0d 09 73 68 |55 aText| ).{..sh|
|00002320| 6f 72 74 09 6d 20 3d 20 | 30 2c 20 69 20 3d 20 30 |ort.m = |0, i = 0|
|00002330| 3b 0d 09 0d 09 46 69 6e | 64 43 6f 6d 6d 61 6e 64 |;....Fin|dCommand|
|00002340| 28 20 63 6d 64 2c 20 26 | 6d 2c 20 26 69 20 29 3b |( cmd, &|m, &i );|
|00002350| 0d 09 0d 09 69 66 20 28 | 20 6d 20 26 26 20 69 20 |....if (| m && i |
|00002360| 29 0d 09 09 53 65 74 43 | 6f 6d 6d 61 6e 64 54 65 |)...SetC|ommandTe|
|00002370| 78 74 28 20 6d 2c 20 69 | 2c 20 61 54 65 78 74 20 |xt( m, i|, aText |
|00002380| 29 3b 0d 7d 0d 0d 0d 2f | 2a 2d 2d 2d 2d 2d 2d 2d |);.}.../|*-------|
|00002390| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000023a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2a 2a 20 20 53 45 54 |--------|*** SET|
|000023b0| 43 4f 4d 4d 41 4e 44 54 | 45 58 54 20 20 2a 2a 2a |COMMANDT|EXT ***|
|000023c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000023d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2f |--------|------*/|
|000023e0| 0d 0d 76 6f 69 64 09 09 | 5a 4d 65 6e 75 42 61 72 |..void..|ZMenuBar|
|000023f0| 3a 3a 53 65 74 43 6f 6d | 6d 61 6e 64 54 65 78 74 |::SetCom|mandText|
|00002400| 28 20 63 6f 6e 73 74 20 | 73 68 6f 72 74 20 6d 65 |( const |short me|
|00002410| 6e 75 49 44 2c 20 63 6f | 6e 73 74 20 73 68 6f 72 |nuID, co|nst shor|
|00002420| 74 20 69 74 65 6d 49 44 | 2c 20 53 74 72 32 35 35 |t itemID|, Str255|
|00002430| 20 61 54 65 78 74 20 29 | 0d 7b 0d 09 4d 65 6e 75 | aText )|.{..Menu|
|00002440| 48 61 6e 64 6c 65 09 6d | 48 3b 0d 09 0d 09 6d 48 |Handle.m|H;....mH|
|00002450| 20 3d 20 46 69 6e 64 4d | 65 6e 75 49 44 28 20 6d | = FindM|enuID( m|
|00002460| 65 6e 75 49 44 20 29 3b | 0d 09 0d 09 69 66 20 28 |enuID );|....if (|
|00002470| 20 6d 48 20 29 0d 09 09 | 53 65 74 4d 65 6e 75 49 | mH )...|SetMenuI|
|00002480| 74 65 6d 54 65 78 74 28 | 20 6d 48 2c 20 69 74 65 |temText(| mH, ite|
|00002490| 6d 49 44 2c 20 61 54 65 | 78 74 20 29 3b 0d 7d 0d |mID, aTe|xt );.}.|
|000024a0| 0d 0d 2f 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |../*----|--------|
|000024b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000024c0| 2d 2d 2d 2a 2a 2a 20 20 | 53 45 54 43 4f 4d 4d 41 |---*** |SETCOMMA|
|000024d0| 4e 44 54 45 58 54 20 20 | 2a 2a 2a 2d 2d 2d 2d 2d |NDTEXT |***-----|
|000024e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000024f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 0d 76 6f 69 |--------|-*/..voi|
|00002500| 64 09 09 5a 4d 65 6e 75 | 42 61 72 3a 3a 53 65 74 |d..ZMenu|Bar::Set|
|00002510| 43 6f 6d 6d 61 6e 64 54 | 65 78 74 28 20 63 6f 6e |CommandT|ext( con|
|00002520| 73 74 20 6c 6f 6e 67 20 | 63 6d 64 2c 20 63 6f 6e |st long |cmd, con|
|00002530| 73 74 20 73 68 6f 72 74 | 20 73 74 72 4c 69 73 74 |st short| strList|
|00002540| 49 44 2c 20 63 6f 6e 73 | 74 20 73 68 6f 72 74 20 |ID, cons|t short |
|00002550| 73 74 72 49 6e 64 65 78 | 20 29 0d 7b 0d 09 53 74 |strIndex| ).{..St|
|00002560| 72 32 35 35 09 61 54 65 | 78 74 3b 0d 09 0d 09 47 |r255.aTe|xt;....G|
|00002570| 65 74 49 6e 64 53 74 72 | 69 6e 67 28 20 61 54 65 |etIndStr|ing( aTe|
|00002580| 78 74 2c 20 73 74 72 4c | 69 73 74 49 44 2c 20 73 |xt, strL|istID, s|
|00002590| 74 72 49 6e 64 65 78 20 | 29 3b 0d 09 69 66 20 28 |trIndex |);..if (|
|000025a0| 20 61 54 65 78 74 5b 30 | 5d 20 3e 20 30 20 29 0d | aText[0|] > 0 ).|
|000025b0| 09 09 53 65 74 43 6f 6d | 6d 61 6e 64 54 65 78 74 |..SetCom|mandText|
|000025c0| 28 20 63 6d 64 2c 20 61 | 54 65 78 74 20 29 3b 0d |( cmd, a|Text );.|
|000025d0| 7d 0d 0d 0d 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}.../*--|--------|
|000025e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000025f0| 2d 2d 2d 2d 2d 2a 2a 2a | 20 20 53 45 54 43 4f 4d |-----***| SETCOM|
|00002600| 4d 41 4e 44 54 45 58 54 | 20 20 2a 2a 2a 2d 2d 2d |MANDTEXT| ***---|
|00002610| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002620| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 0d 76 |--------|---*/..v|
|00002630| 6f 69 64 09 09 5a 4d 65 | 6e 75 42 61 72 3a 3a 53 |oid..ZMe|nuBar::S|
|00002640| 65 74 43 6f 6d 6d 61 6e | 64 54 65 78 74 28 20 63 |etComman|dText( c|
|00002650| 6f 6e 73 74 20 73 68 6f | 72 74 20 6d 65 6e 75 49 |onst sho|rt menuI|
|00002660| 44 2c 20 63 6f 6e 73 74 | 20 73 68 6f 72 74 20 69 |D, const| short i|
|00002670| 74 65 6d 49 44 2c 20 63 | 6f 6e 73 74 20 73 68 6f |temID, c|onst sho|
|00002680| 72 74 20 73 74 72 4c 69 | 73 74 49 44 2c 20 63 6f |rt strLi|stID, co|
|00002690| 6e 73 74 20 73 68 6f 72 | 74 20 73 74 72 49 6e 64 |nst shor|t strInd|
|000026a0| 65 78 20 29 0d 7b 0d 09 | 53 74 72 32 35 35 09 61 |ex ).{..|Str255.a|
|000026b0| 54 65 78 74 3b 0d 09 0d | 09 47 65 74 49 6e 64 53 |Text;...|.GetIndS|
|000026c0| 74 72 69 6e 67 28 20 61 | 54 65 78 74 2c 20 73 74 |tring( a|Text, st|
|000026d0| 72 4c 69 73 74 49 44 2c | 20 73 74 72 49 6e 64 65 |rListID,| strInde|
|000026e0| 78 20 29 3b 0d 09 69 66 | 20 28 20 61 54 65 78 74 |x );..if| ( aText|
|000026f0| 5b 30 5d 20 3e 20 30 20 | 29 0d 09 09 53 65 74 43 |[0] > 0 |)...SetC|
|00002700| 6f 6d 6d 61 6e 64 54 65 | 78 74 28 20 6d 65 6e 75 |ommandTe|xt( menu|
|00002710| 49 44 2c 20 69 74 65 6d | 49 44 2c 20 61 54 65 78 |ID, item|ID, aTex|
|00002720| 74 20 29 3b 0d 7d 0d 0d | 2f 2a 2d 2d 2d 2d 2d 2d |t );.}..|/*------|
|00002730| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002740| 2d 2d 2d 2d 2d 2d 2a 2a | 2a 20 20 53 45 54 43 4f |------**|* SETCO|
|00002750| 4d 4d 41 4e 44 54 45 58 | 54 53 54 59 4c 45 20 20 |MMANDTEX|TSTYLE |
|00002760| 2a 2a 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |***-----|--------|
|00002770| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2f |--------|------*/|
|00002780| 0d 0d 76 6f 69 64 09 09 | 5a 4d 65 6e 75 42 61 72 |..void..|ZMenuBar|
|00002790| 3a 3a 53 65 74 43 6f 6d | 6d 61 6e 64 54 65 78 74 |::SetCom|mandText|
|000027a0| 53 74 79 6c 65 28 20 63 | 6f 6e 73 74 20 6c 6f 6e |Style( c|onst lon|
|000027b0| 67 20 63 6d 64 2c 20 53 | 74 79 6c 65 20 61 53 74 |g cmd, S|tyle aSt|
|000027c0| 79 6c 65 20 29 0d 7b 0d | 09 73 68 6f 72 74 09 09 |yle ).{.|.short..|
|000027d0| 6d 20 3d 20 30 2c 20 69 | 20 3d 20 30 3b 0d 09 4d |m = 0, i| = 0;..M|
|000027e0| 65 6e 75 48 61 6e 64 6c | 65 09 6d 68 3b 0d 09 0d |enuHandl|e.mh;...|
|000027f0| 09 46 69 6e 64 43 6f 6d | 6d 61 6e 64 28 20 63 6d |.FindCom|mand( cm|
|00002800| 64 2c 20 26 6d 2c 20 26 | 69 20 29 3b 0d 09 0d 09 |d, &m, &|i );....|
|00002810| 69 66 20 28 20 6d 20 26 | 26 20 69 20 29 0d 09 7b |if ( m &|& i )..{|
|00002820| 0d 09 09 6d 68 20 3d 20 | 46 69 6e 64 4d 65 6e 75 |...mh = |FindMenu|
|00002830| 49 44 28 20 6d 20 29 3b | 0d 09 09 0d 09 09 69 66 |ID( m );|......if|
|00002840| 20 28 20 6d 68 20 29 0d | 09 09 09 53 65 74 49 74 | ( mh ).|...SetIt|
|00002850| 65 6d 53 74 79 6c 65 28 | 20 6d 68 2c 20 69 2c 20 |emStyle(| mh, i, |
|00002860| 61 53 74 79 6c 65 20 29 | 3b 0d 09 7d 0d 7d 0d 0d |aStyle )|;..}.}..|
|00002870| 0d 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |./*-----|--------|
|00002880| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002890| 2d 2d 2a 2a 2a 20 20 53 | 48 4f 57 48 49 44 45 4d |--*** S|HOWHIDEM|
|000028a0| 45 4e 55 42 41 52 20 20 | 2a 2a 2a 2d 2d 2d 2d 2d |ENUBAR |***-----|
|000028b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000028c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 2f 2a 0d 53 68 |--------|*/./*.Sh|
|000028d0| 6f 77 20 6f 72 20 68 69 | 64 65 20 74 68 65 20 6d |ow or hi|de the m|
|000028e0| 65 6e 75 62 61 72 2e 20 | 54 68 69 73 20 63 61 6e |enubar. |This can|
|000028f0| 20 62 65 20 75 73 65 64 | 20 69 6e 20 74 77 6f 20 | be used| in two |
|00002900| 77 61 79 73 2e 20 59 6f | 75 20 63 61 6e 20 73 65 |ways. Yo|u can se|
|00002910| 74 20 74 68 65 20 6d 65 | 6e 75 62 61 72 20 68 69 |t the me|nubar hi|
|00002920| 64 64 65 6e 0d 63 6f 6d | 70 6c 65 74 65 6c 79 20 |dden.com|pletely |
|00002930| 62 79 20 70 61 73 73 69 | 6e 67 20 4d 42 41 52 5f |by passi|ng MBAR_|
|00002940| 48 49 44 45 2c 20 61 6e | 64 20 72 65 73 68 6f 77 |HIDE, an|d reshow|
|00002950| 20 69 74 20 77 69 74 68 | 20 4d 42 41 52 5f 53 48 | it with| MBAR_SH|
|00002960| 4f 57 2e 20 4f 52 20 79 | 6f 75 20 63 61 6e 20 70 |OW. OR y|ou can p|
|00002970| 61 73 73 20 69 6e 0d 4d | 42 41 52 5f 48 49 44 45 |ass in.M|BAR_HIDE|
|00002980| 5f 4d 4f 55 53 45 41 57 | 41 52 45 20 61 6e 64 20 |_MOUSEAW|ARE and |
|00002990| 61 20 67 6c 6f 62 61 6c | 20 6d 6f 75 73 65 20 6c |a global| mouse l|
|000029a0| 6f 63 61 74 69 6f 6e 20 | 74 6f 20 73 68 6f 77 20 |ocation |to show |
|000029b0| 6f 72 20 68 69 64 65 20 | 74 68 65 20 62 61 72 20 |or hide |the bar |
|000029c0| 64 79 6e 61 6d 69 63 61 | 6c 6c 79 20 61 73 0d 74 |dynamica|lly as.t|
|000029d0| 68 65 20 75 73 65 72 20 | 6d 6f 76 65 73 20 74 68 |he user |moves th|
|000029e0| 65 20 6d 6f 75 73 65 2e | 20 5a 45 76 65 6e 74 48 |e mouse.| ZEventH|
|000029f0| 61 6e 64 6c 65 72 20 77 | 69 6c 6c 20 70 72 6f 76 |andler w|ill prov|
|00002a00| 69 64 65 20 74 68 69 73 | 20 66 75 6e 63 74 69 6f |ide this| functio|
|00002a10| 6e 61 6c 69 74 79 20 69 | 66 20 79 6f 75 20 64 65 |nality i|f you de|
|00002a20| 66 69 6e 65 0d 5f 41 55 | 54 4f 5f 4d 42 41 52 5f |fine._AU|TO_MBAR_|
|00002a30| 48 49 44 49 4e 47 2e 0d | 2d 2d 2d 2d 2d 2d 2d 2d |HIDING..|--------|
|00002a40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002a80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00002a90| 2f 0d 0d 76 6f 69 64 09 | 09 5a 4d 65 6e 75 42 61 |/..void.|.ZMenuBa|
|00002aa0| 72 3a 3a 53 68 6f 77 48 | 69 64 65 4d 65 6e 75 42 |r::ShowH|ideMenuB|
|00002ab0| 61 72 28 20 4d 42 61 72 | 48 69 64 69 6e 67 09 6d |ar( MBar|Hiding.m|
|00002ac0| 48 69 64 69 6e 67 2c 20 | 50 6f 69 6e 74 20 67 4d |Hiding, |Point gM|
|00002ad0| 6f 75 73 65 4c 6f 63 20 | 29 0d 7b 0d 09 42 6f 6f |ouseLoc |).{..Boo|
|00002ae0| 6c 65 61 6e 09 09 73 68 | 6f 77 49 74 3b 0d 09 52 |lean..sh|owIt;..R|
|00002af0| 65 63 74 09 09 6d 73 52 | 65 63 74 3b 0d 09 47 44 |ect..msR|ect;..GD|
|00002b00| 48 61 6e 64 6c 65 09 74 | 68 65 44 65 76 69 63 65 |Handle.t|heDevice|
|00002b10| 3b 0d 09 52 67 6e 48 61 | 6e 64 6c 65 09 74 65 6d |;..RgnHa|ndle.tem|
|00002b20| 70 3b 0d 09 0d 09 69 66 | 20 28 20 6d 48 69 64 69 |p;....if| ( mHidi|
|00002b30| 6e 67 20 21 3d 20 6d 62 | 48 69 64 69 6e 67 20 29 |ng != mb|Hiding )|
|00002b40| 0d 09 7b 0d 09 09 2f 2f | 20 73 74 61 74 65 20 68 |..{...//| state h|
|00002b50| 61 73 20 63 68 61 6e 67 | 65 64 2c 20 6f 72 20 77 |as chang|ed, or w|
|00002b60| 65 20 77 61 6e 74 20 74 | 6f 20 64 65 74 65 72 6d |e want t|o determ|
|00002b70| 69 6e 65 20 69 74 20 66 | 72 6f 6d 20 6d 6f 75 73 |ine it f|rom mous|
|00002b80| 65 20 70 6f 73 69 74 69 | 6f 6e 0d 09 0d 09 09 74 |e positi|on.....t|
|00002b90| 68 65 44 65 76 69 63 65 | 20 3d 20 47 65 74 4d 61 |heDevice| = GetMa|
|00002ba0| 69 6e 44 65 76 69 63 65 | 28 29 3b 0d 09 09 6d 73 |inDevice|();...ms|
|00002bb0| 52 65 63 74 20 3d 20 28 | 2a 74 68 65 44 65 76 69 |Rect = (|*theDevi|
|00002bc0| 63 65 29 2d 3e 67 64 52 | 65 63 74 3b 0d 09 09 6d |ce)->gdR|ect;...m|
|00002bd0| 73 52 65 63 74 2e 62 6f | 74 74 6f 6d 20 3d 20 6d |sRect.bo|ttom = m|
|00002be0| 73 52 65 63 74 2e 74 6f | 70 20 2b 20 6d 42 61 72 |sRect.to|p + mBar|
|00002bf0| 48 65 69 67 68 74 3b 0d | 09 09 09 0d 09 09 69 66 |Height;.|......if|
|00002c00| 20 28 20 6d 48 69 64 69 | 6e 67 20 3d 3d 20 4d 42 | ( mHidi|ng == MB|
|00002c10| 41 52 5f 48 49 44 45 5f | 4d 4f 55 53 45 41 57 41 |AR_HIDE_|MOUSEAWA|
|00002c20| 52 45 20 29 0d 09 09 7b | 0d 09 09 09 73 68 6f 77 |RE )...{|....show|
|00002c30| 49 74 20 3d 20 50 74 49 | 6e 52 65 63 74 28 20 67 |It = PtI|nRect( g|
|00002c40| 4d 6f 75 73 65 4c 6f 63 | 2c 20 26 6d 73 52 65 63 |MouseLoc|, &msRec|
|00002c50| 74 20 29 3b 0d 09 09 09 | 0d 09 09 09 2f 2f 20 69 |t );....|....// i|
|00002c60| 66 20 6d 65 6e 75 62 61 | 72 20 61 6c 72 65 61 64 |f menuba|r alread|
|00002c70| 79 20 69 6e 20 69 6e 64 | 69 63 61 74 65 64 20 73 |y in ind|icated s|
|00002c80| 74 61 74 65 2c 20 64 6f | 20 6e 6f 74 68 69 6e 67 |tate, do| nothing|
|00002c90| 0d 09 09 09 0d 09 09 09 | 69 66 20 28 28 20 73 68 |........|if (( sh|
|00002ca0| 6f 77 49 74 20 20 26 26 | 20 28 20 6d 62 48 69 64 |owIt &&| ( mbHid|
|00002cb0| 69 6e 67 20 3d 3d 20 4d | 42 41 52 5f 53 48 4f 57 |ing == M|BAR_SHOW|
|00002cc0| 20 29 29 20 7c 7c 0d 09 | 09 09 09 28 20 21 73 68 | )) ||..|...( !sh|
|00002cd0| 6f 77 49 74 20 26 26 20 | 28 20 6d 62 48 69 64 69 |owIt && |( mbHidi|
|00002ce0| 6e 67 20 3d 3d 20 4d 42 | 41 52 5f 48 49 44 45 20 |ng == MB|AR_HIDE |
|00002cf0| 29 29 29 0d 09 09 09 09 | 72 65 74 75 72 6e 3b 0d |))).....|return;.|
|00002d00| 09 09 7d 0d 09 09 65 6c | 73 65 0d 09 09 09 73 68 |..}...el|se....sh|
|00002d10| 6f 77 49 74 20 3d 20 28 | 20 6d 48 69 64 69 6e 67 |owIt = (| mHiding|
|00002d20| 20 3d 3d 20 4d 42 41 52 | 5f 53 48 4f 57 20 29 3b | == MBAR|_SHOW );|
|00002d30| 0d 09 09 09 0d 09 09 46 | 61 69 6c 4e 49 4c 28 20 |.......F|ailNIL( |
|00002d40| 74 65 6d 70 20 3d 20 4e | 65 77 52 67 6e 28 29 29 |temp = N|ewRgn())|
|00002d50| 3b 0d 09 09 52 65 63 74 | 52 67 6e 28 20 74 65 6d |;...Rect|Rgn( tem|
|00002d60| 70 2c 20 26 6d 73 52 65 | 63 74 20 29 3b 0d 0d 09 |p, &msRe|ct );...|
|00002d70| 09 69 66 20 28 20 73 68 | 6f 77 49 74 20 29 0d 09 |.if ( sh|owIt )..|
|00002d80| 09 7b 0d 09 09 09 4c 4d | 53 65 74 4d 42 61 72 48 |.{....LM|SetMBarH|
|00002d90| 65 69 67 68 74 28 20 6d | 42 61 72 48 65 69 67 68 |eight( m|BarHeigh|
|00002da0| 74 20 29 3b 0d 09 09 09 | 44 69 66 66 52 67 6e 28 |t );....|DiffRgn(|
|00002db0| 4c 4d 47 65 74 47 72 61 | 79 52 67 6e 28 29 2c 20 |LMGetGra|yRgn(), |
|00002dc0| 74 65 6d 70 2c 20 4c 4d | 47 65 74 47 72 61 79 52 |temp, LM|GetGrayR|
|00002dd0| 67 6e 28 29 29 3b 0d 09 | 09 09 55 70 64 61 74 65 |gn());..|..Update|
|00002de0| 4d 65 6e 75 42 61 72 28 | 29 3b 0d 09 09 09 0d 09 |MenuBar(|);......|
|00002df0| 09 09 6d 62 48 69 64 69 | 6e 67 20 3d 20 4d 42 41 |..mbHidi|ng = MBA|
|00002e00| 52 5f 53 48 4f 57 3b 0d | 09 09 7d 0d 09 09 65 6c |R_SHOW;.|..}...el|
|00002e10| 73 65 0d 09 09 7b 0d 09 | 09 09 4c 4d 53 65 74 4d |se...{..|..LMSetM|
|00002e20| 42 61 72 48 65 69 67 68 | 74 28 20 30 20 29 3b 0d |BarHeigh|t( 0 );.|
|00002e30| 09 09 09 55 6e 69 6f 6e | 52 67 6e 28 4c 4d 47 65 |...Union|Rgn(LMGe|
|00002e40| 74 47 72 61 79 52 67 6e | 28 29 2c 20 74 65 6d 70 |tGrayRgn|(), temp|
|00002e50| 2c 20 4c 4d 47 65 74 47 | 72 61 79 52 67 6e 28 29 |, LMGetG|rayRgn()|
|00002e60| 29 3b 0d 09 09 09 0d 09 | 09 09 6d 62 48 69 64 69 |);......|..mbHidi|
|00002e70| 6e 67 20 3d 20 4d 42 41 | 52 5f 48 49 44 45 3b 0d |ng = MBA|R_HIDE;.|
|00002e80| 09 09 7d 0d 09 09 0d 09 | 09 2f 2f 20 63 61 6c 63 |..}.....|.// calc|
|00002e90| 75 6c 61 74 65 20 61 6e | 64 20 72 65 66 72 65 73 |ulate an|d refres|
|00002ea0| 68 20 76 69 73 20 72 65 | 67 69 6f 6e 73 20 6f 66 |h vis re|gions of|
|00002eb0| 20 77 69 6e 64 6f 77 73 | 0d 09 09 0d 09 09 57 69 | windows|......Wi|
|00002ec0| 6e 64 6f 77 50 74 72 09 | 66 77 20 3d 20 46 72 6f |ndowPtr.|fw = Fro|
|00002ed0| 6e 74 57 69 6e 64 6f 77 | 28 29 3b 0d 09 09 0d 09 |ntWindow|();.....|
|00002ee0| 09 69 66 20 28 20 66 77 | 20 29 0d 09 09 7b 0d 09 |.if ( fw| )...{..|
|00002ef0| 09 09 50 61 69 6e 74 42 | 65 68 69 6e 64 28 20 66 |..PaintB|ehind( f|
|00002f00| 77 2c 20 74 65 6d 70 20 | 29 3b 0d 09 09 09 43 61 |w, temp |);....Ca|
|00002f10| 6c 63 56 69 73 42 65 68 | 69 6e 64 28 20 66 77 2c |lcVisBeh|ind( fw,|
|00002f20| 20 20 74 65 6d 70 20 29 | 3b 0d 09 09 7d 0d 09 09 | temp )|;...}...|
|00002f30| 44 69 73 70 6f 73 65 52 | 67 6e 28 20 74 65 6d 70 |DisposeR|gn( temp|
|00002f40| 20 29 3b 0d 09 7d 0d 7d | 0d 0d 2f 2a 2d 2d 2d 2d | );..}.}|../*----|
|00002f50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002f60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2a 2a 20 20 |--------|---*** |
|00002f70| 53 48 4f 57 48 49 44 45 | 4d 45 4e 55 42 41 52 20 |SHOWHIDE|MENUBAR |
|00002f80| 20 2a 2a 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ***----|--------|
|00002f90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002fa0| 2d 2a 2f 0d 0d 0d 76 6f | 69 64 09 5a 4d 65 6e 75 |-*/...vo|id.ZMenu|
|00002fb0| 42 61 72 3a 3a 53 68 6f | 77 48 69 64 65 4d 65 6e |Bar::Sho|wHideMen|
|00002fc0| 75 42 61 72 28 20 4d 42 | 61 72 48 69 64 69 6e 67 |uBar( MB|arHiding|
|00002fd0| 20 6d 48 69 64 69 6e 67 | 20 29 0d 7b 0d 09 50 6f | mHiding| ).{..Po|
|00002fe0| 69 6e 74 20 75 6e 75 73 | 65 64 20 3d 20 7b 20 30 |int unus|ed = { 0|
|00002ff0| 2c 20 30 20 7d 3b 0d 09 | 0d 09 53 68 6f 77 48 69 |, 0 };..|..ShowHi|
|00003000| 64 65 4d 65 6e 75 42 61 | 72 28 20 6d 48 69 64 69 |deMenuBa|r( mHidi|
|00003010| 6e 67 2c 20 75 6e 75 73 | 65 64 20 29 3b 0d 7d 0d |ng, unus|ed );.}.|
|00003020| 0d 0d 2f 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |../*----|--------|
|00003030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003040| 2d 2a 2a 2a 20 20 4e 4f | 4d 49 4e 41 54 45 57 49 |-*** NO|MINATEWI|
|00003050| 4e 44 4f 57 53 4d 45 4e | 55 20 20 2a 2a 2a 2d 2d |NDOWSMEN|U ***--|
|00003060| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003070| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2a 2f 0d 2f 2a 0d 54 |--------|-*/./*.T|
|00003080| 68 69 73 20 6d 65 74 68 | 6f 64 20 63 61 6e 20 62 |his meth|od can b|
|00003090| 65 20 75 73 65 64 20 74 | 6f 20 73 65 74 20 75 70 |e used t|o set up|
|000030a0| 20 61 6e 20 61 75 74 6f | 6d 61 74 69 63 20 22 57 | an auto|matic "W|
|000030b0| 69 6e 64 6f 77 73 22 20 | 6d 65 6e 75 2e 20 54 6f |indows" |menu. To|
|000030c0| 20 64 6f 20 74 68 69 73 | 2c 20 63 61 6c 6c 20 74 | do this|, call t|
|000030d0| 68 69 73 0d 6d 65 74 68 | 6f 64 20 6f 6e 63 65 20 |his.meth|od once |
|000030e0| 79 6f 75 72 20 62 61 72 | 20 69 73 20 62 75 69 6c |your bar| is buil|
|000030f0| 74 2e 20 54 68 69 73 20 | 77 69 6c 6c 20 6e 6f 6d |t. This |will nom|
|00003100| 69 6e 61 74 65 20 74 68 | 65 20 6d 65 6e 75 20 77 |inate th|e menu w|
|00003110| 69 74 68 20 74 68 65 20 | 49 44 20 70 61 73 73 65 |ith the |ID passe|
|00003120| 64 20 61 73 20 74 68 65 | 0d 57 69 6e 64 6f 77 73 |d as the|.Windows|
|00003130| 20 6d 65 6e 75 2e 20 41 | 6e 79 20 69 74 65 6d 73 | menu. A|ny items|
|00003140| 20 69 6e 20 74 68 65 20 | 6d 65 6e 75 20 61 6c 72 | in the |menu alr|
|00003150| 65 61 64 79 20 77 69 6c | 6c 20 62 65 20 72 65 74 |eady wil|l be ret|
|00003160| 61 69 6e 65 64 20 61 6e | 64 20 77 6f 72 6b 20 61 |ained an|d work a|
|00003170| 73 20 6e 6f 72 6d 61 6c | 2e 20 41 73 0d 77 69 6e |s normal|. As.win|
|00003180| 64 6f 77 73 20 61 72 65 | 20 61 64 64 65 64 20 61 |dows are| added a|
|00003190| 6e 64 20 64 65 6c 65 74 | 65 64 20 69 6e 20 74 68 |nd delet|ed in th|
|000031a0| 65 20 77 69 6e 64 6f 77 | 20 6d 61 6e 61 67 65 72 |e window| manager|
|000031b0| 2c 20 74 68 69 73 20 77 | 69 6c 6c 20 6d 61 69 6e |, this w|ill main|
|000031c0| 74 61 69 6e 20 74 68 65 | 20 6d 65 6e 75 20 66 6f |tain the| menu fo|
|000031d0| 72 20 79 6f 75 2e 0d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |r you..-|--------|
|000031e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000031f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003200| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003210| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003220| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2a 2f |--------|------*/|
|00003230| 0d 0d 76 6f 69 64 09 09 | 5a 4d 65 6e 75 42 61 72 |..void..|ZMenuBar|
|00003240| 3a 3a 4e 6f 6d 69 6e 61 | 74 65 57 69 6e 64 6f 77 |::Nomina|teWindow|
|00003250| 73 4d 65 6e 75 28 20 63 | 6f 6e 73 74 20 73 68 6f |sMenu( c|onst sho|
|00003260| 72 74 20 6d 65 6e 75 49 | 44 20 29 09 0d 7b 0d 09 |rt menuI|D )..{..|
|00003270| 69 66 20 28 20 77 6d 4d | 65 6e 75 49 44 20 3d 3d |if ( wmM|enuID ==|
|00003280| 20 30 20 29 0d 09 7b 0d | 09 09 4d 65 6e 75 48 61 | 0 )..{.|..MenuHa|
|00003290| 6e 64 6c 65 09 6d 48 20 | 3d 20 46 69 6e 64 4d 65 |ndle.mH |= FindMe|
|000032a0| 6e 75 49 44 28 20 6d 65 | 6e 75 49 44 20 29 3b 0d |nuID( me|nuID );.|
|000032b0| 09 09 0d 09 09 69 66 20 | 28 20 6d 48 20 29 0d 09 |.....if |( mH )..|
|000032c0| 09 7b 0d 09 09 09 77 6d | 4d 65 6e 75 49 44 20 3d |.{....wm|MenuID =|
|000032d0| 20 6d 65 6e 75 49 44 3b | 0d 09 09 09 0d 09 09 09 | menuID;|........|
|000032e0| 53 65 74 4d 65 6e 75 44 | 69 6d 6d 69 6e 67 28 20 |SetMenuD|imming( |
|000032f0| 6d 65 6e 75 49 44 2c 20 | 64 69 73 61 62 6c 65 43 |menuID, |disableC|
|00003300| 6d 64 73 4f 6e 6c 79 20 | 29 3b 0d 09 09 09 0d 09 |mdsOnly |);......|
|00003310| 09 09 2f 2f 20 77 65 20 | 6e 65 65 64 20 74 6f 20 |..// we |need to |
|00003320| 77 6f 72 6b 20 68 61 6e | 64 2d 69 6e 2d 68 61 6e |work han|d-in-han|
|00003330| 64 20 77 69 74 68 20 74 | 68 65 20 77 69 6e 64 6f |d with t|he windo|
|00003340| 77 20 6d 61 6e 61 67 65 | 72 20 74 6f 0d 09 09 09 |w manage|r to....|
|00003350| 2f 2f 20 6b 65 65 70 20 | 74 72 61 63 6b 20 6f 66 |// keep |track of|
|00003360| 20 74 68 65 20 77 69 6e | 64 6f 77 73 2e 20 54 68 | the win|dows. Th|
|00003370| 65 20 57 69 6e 64 6f 77 | 20 4d 61 6e 61 67 65 72 |e Window| Manager|
|00003380| 20 69 73 20 62 65 73 74 | 20 70 6c 61 63 65 64 20 | is best| placed |
|00003390| 74 6f 0d 09 09 09 2f 2f | 20 64 6f 20 61 6c 6c 20 |to....//| do all |
|000033a0| 74 68 69 73 2c 20 73 6f | 20 77 65 20 73 69 6d 70 |this, so| we simp|
|000033b0| 6c 79 20 68 61 6e 64 20 | 6f 66 66 20 74 68 65 20 |ly hand |off the |
|000033c0| 6d 65 6e 75 20 74 6f 20 | 69 74 2e 0d 09 09 09 0d |menu to |it......|
|000033d0| 09 09 09 67 57 69 6e 64 | 6f 77 4d 61 6e 61 67 65 |...gWind|owManage|
|000033e0| 72 2d 3e 53 65 74 57 69 | 6e 64 6f 77 73 4d 65 6e |r->SetWi|ndowsMen|
|000033f0| 75 28 20 6d 48 20 29 3b | 0d 09 09 7d 0d 09 7d 0d |u( mH );|...}..}.|
|00003400| 7d 0d 0d 0d 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}.../*--|--------|
|00003410| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003420| 2d 2d 2d 2d 2d 2a 2a 2a | 20 20 49 4e 53 45 52 54 |-----***| INSERT|
|00003430| 48 45 4c 50 49 54 45 4d | 20 20 2a 2a 2a 2d 2d 2d |HELPITEM| ***---|
|00003440| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003450| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 2f 2a |--------|---*/./*|
|00003460| 0d 61 70 70 65 6e 64 20 | 74 68 65 20 74 65 78 74 |.append |the text|
|00003470| 20 74 6f 20 74 68 65 20 | 68 65 6c 70 20 6d 65 6e | to the |help men|
|00003480| 75 2c 20 61 6e 64 20 72 | 65 74 75 72 6e 20 74 68 |u, and r|eturn th|
|00003490| 65 20 69 74 65 6d 20 6e | 75 6d 62 65 72 20 6f 66 |e item n|umber of|
|000034a0| 20 74 68 65 20 72 65 73 | 75 6c 74 69 6e 67 20 69 | the res|ulting i|
|000034b0| 74 65 6d 2e 20 54 6f 0d | 70 72 6f 63 65 73 73 20 |tem. To.|process |
|000034c0| 74 68 69 73 20 69 74 65 | 6d 2c 20 6f 76 65 72 72 |this ite|m, overr|
|000034d0| 69 64 65 20 48 61 6e 64 | 6c 65 43 6f 6d 6d 61 6e |ide Hand|leComman|
|000034e0| 64 20 61 6e 64 20 6c 6f | 6f 6b 20 66 6f 72 20 6b |d and lo|ok for k|
|000034f0| 48 4d 48 65 6c 70 4d 65 | 6e 75 49 44 20 61 6e 64 |HMHelpMe|nuID and|
|00003500| 20 74 68 65 20 69 74 65 | 6d 20 72 65 74 75 72 6e | the ite|m return|
|00003510| 65 64 0d 66 72 6f 6d 20 | 74 68 69 73 20 6d 65 74 |ed.from |this met|
|00003520| 68 6f 64 2e 0d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |hod..---|--------|
|00003530| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003540| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003550| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003560| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003570| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2a 2f 0d 0d |--------|----*/..|
|00003580| 73 68 6f 72 74 09 09 5a | 4d 65 6e 75 42 61 72 3a |short..Z|MenuBar:|
|00003590| 3a 41 70 70 65 6e 64 48 | 65 6c 70 49 74 65 6d 28 |:AppendH|elpItem(|
|000035a0| 20 53 74 72 32 35 35 20 | 69 74 65 6d 54 65 78 74 | Str255 |itemText|
|000035b0| 20 29 09 09 0d 7b 0d 09 | 73 68 6f 72 74 09 09 69 | )...{..|short..i|
|000035c0| 3b 0d 09 4d 65 6e 75 48 | 61 6e 64 6c 65 09 68 65 |;..MenuH|andle.he|
|000035d0| 6c 70 4d 65 6e 75 48 3b | 0d 09 0d 09 46 61 69 6c |lpMenuH;|....Fail|
|000035e0| 4f 53 45 72 72 28 20 48 | 4d 47 65 74 48 65 6c 70 |OSErr( H|MGetHelp|
|000035f0| 4d 65 6e 75 48 61 6e 64 | 6c 65 28 20 26 68 65 6c |MenuHand|le( &hel|
|00003600| 70 4d 65 6e 75 48 20 29 | 29 3b 0d 09 0d 09 41 70 |pMenuH )|);....Ap|
|00003610| 70 65 6e 64 4d 65 6e 75 | 28 20 68 65 6c 70 4d 65 |pendMenu|( helpMe|
|00003620| 6e 75 48 2c 20 69 74 65 | 6d 54 65 78 74 20 29 3b |nuH, ite|mText );|
|00003630| 09 0d 09 0d 09 69 20 3d | 20 43 6f 75 6e 74 4d 49 |.....i =| CountMI|
|00003640| 74 65 6d 73 28 20 68 65 | 6c 70 4d 65 6e 75 48 20 |tems( he|lpMenuH |
|00003650| 29 3b 0d 0d 09 72 65 74 | 75 72 6e 20 69 3b 0d 7d |);...ret|urn i;.}|
|00003660| 0d 0d 0d 2f 2a 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.../*---|--------|
|00003670| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003680| 2d 2d 2d 2a 2a 2a 20 20 | 41 50 50 45 4e 44 4d 45 |---*** |APPENDME|
|00003690| 4e 55 54 4f 42 41 52 20 | 20 2a 2a 2a 2d 2d 2d 2d |NUTOBAR | ***----|
|000036a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000036b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0d 2f 2a 0d |--------|--*/./*.|
|000036c0| 54 68 69 73 20 63 61 6e | 20 62 65 20 63 61 6c 6c |This can| be call|
|000036d0| 65 64 20 74 6f 20 61 64 | 64 20 6d 65 6e 75 73 20 |ed to ad|d menus |
|000036e0| 22 6f 6e 20 74 68 65 20 | 66 6c 79 22 20 69 6e 74 |"on the |fly" int|
|000036f0| 6f 20 74 68 65 20 62 61 | 72 2e 20 54 68 69 73 20 |o the ba|r. This |
|00003700| 72 65 61 64 73 20 61 20 | 6d 65 6e 75 20 66 72 6f |reads a |menu fro|
|00003710| 6d 20 61 0d 4d 45 4e 55 | 20 6f 72 20 43 4d 4e 55 |m a.MENU| or CMNU|
|00003720| 20 72 65 73 6f 75 72 63 | 65 2c 20 70 61 72 73 65 | resourc|e, parse|
|00003730| 73 20 69 74 73 20 63 6f | 6d 61 6e 64 73 20 61 6e |s its co|mands an|
|00003740| 64 20 69 6e 73 65 72 74 | 73 20 74 68 65 20 6d 65 |d insert|s the me|
|00003750| 6e 75 2e 20 4d 65 6e 75 | 73 20 63 61 6e 20 6f 6e |nu. Menu|s can on|
|00003760| 6c 79 20 62 65 20 61 64 | 64 65 64 0d 74 6f 20 74 |ly be ad|ded.to t|
|00003770| 68 65 20 65 6e 64 20 6f | 66 20 74 68 65 20 62 61 |he end o|f the ba|
|00003780| 72 2e 20 59 6f 75 20 6e | 65 65 64 20 74 6f 20 63 |r. You n|eed to c|
|00003790| 61 6c 6c 20 55 70 64 61 | 74 65 4d 65 6e 75 42 61 |all Upda|teMenuBa|
|000037a0| 72 20 61 66 74 65 72 20 | 74 68 69 73 20 6f 72 20 |r after |this or |
|000037b0| 61 20 73 65 72 69 65 73 | 20 6f 66 20 74 68 65 73 |a series| of thes|
|000037c0| 65 2e 0d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |e..-----|--------|
|000037d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000037e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000037f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003800| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003810| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2a 2f 0d 0d 76 6f |--------|--*/..vo|
|00003820| 69 64 09 09 5a 4d 65 6e | 75 42 61 72 3a 3a 41 70 |id..ZMen|uBar::Ap|
|00003830| 70 65 6e 64 4d 65 6e 75 | 54 6f 42 61 72 28 20 63 |pendMenu|ToBar( c|
|00003840| 6f 6e 73 74 20 73 68 6f | 72 74 20 6d 65 6e 75 49 |onst sho|rt menuI|
|00003850| 44 20 20 29 0d 7b 0d 09 | 48 61 6e 64 6c 65 09 74 |D ).{..|Handle.t|
|00003860| 65 6d 70 3b 0d 09 0d 09 | 74 65 6d 70 20 3d 20 47 |emp;....|temp = G|
|00003870| 65 74 52 65 73 6f 75 72 | 63 65 28 20 27 43 4d 4e |etResour|ce( 'CMN|
|00003880| 55 27 2c 20 6d 65 6e 75 | 49 44 20 29 3b 0d 09 0d |U', menu|ID );...|
|00003890| 09 69 66 20 28 20 74 65 | 6d 70 20 29 0d 09 7b 0d |.if ( te|mp )..{.|
|000038a0| 09 09 4c 6f 61 64 43 4d | 4e 55 4d 65 6e 75 28 20 |..LoadCM|NUMenu( |
|000038b0| 6d 65 6e 75 49 44 20 29 | 3b 0d 09 09 52 65 6c 65 |menuID )|;...Rele|
|000038c0| 61 73 65 52 65 73 6f 75 | 72 63 65 28 20 74 65 6d |aseResou|rce( tem|
|000038d0| 70 20 29 3b 0d 09 7d 0d | 09 65 6c 73 65 0d 09 09 |p );..}.|.else...|
|000038e0| 4c 6f 61 64 4d 65 6e 75 | 28 20 6d 65 6e 75 49 44 |LoadMenu|( menuID|
|000038f0| 20 29 3b 0d 09 0d 09 6d | 62 43 6f 75 6e 74 2b 2b | );....m|bCount++|
|00003900| 3b 09 0d 7d 0d 0d 2f 2a | 2d 2d 2d 2d 2d 2d 2d 2d |;..}../*|--------|
|00003910| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003920| 2d 2d 2d 2d 2d 2a 2a 2a | 20 20 52 45 4d 4f 56 45 |-----***| REMOVE|
|00003930| 4d 45 4e 55 46 52 4f 4d | 42 41 52 20 20 2a 2a 2a |MENUFROM|BAR ***|
|00003940| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003950| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2a 2f 0d |--------|-----*/.|
|00003960| 2f 2a 0d 54 68 69 73 20 | 63 61 6e 20 62 65 20 63 |/*.This |can be c|
|00003970| 61 6c 6c 65 64 20 74 6f | 20 72 65 6d 6f 76 65 20 |alled to| remove |
|00003980| 61 20 6d 65 6e 75 20 61 | 64 64 65 64 20 77 69 74 |a menu a|dded wit|
|00003990| 68 20 74 68 65 20 61 62 | 6f 76 65 20 72 6f 75 74 |h the ab|ove rout|
|000039a0| 69 6e 65 2e 20 59 6f 75 | 20 6e 65 65 64 20 74 6f |ine. You| need to|
|000039b0| 20 63 61 6c 6c 0d 55 70 | 64 61 74 65 4d 65 6e 75 | call.Up|dateMenu|
|000039c0| 42 61 72 20 61 66 74 65 | 72 20 74 68 69 73 20 6f |Bar afte|r this o|
|000039d0| 72 20 61 20 73 65 72 69 | 65 73 20 6f 66 20 74 68 |r a seri|es of th|
|000039e0| 65 73 65 2e 0d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ese..---|--------|
|000039f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003a30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2a 2f 0d 0d |--------|----*/..|
|00003a40| 76 6f 69 64 09 09 5a 4d | 65 6e 75 42 61 72 3a 3a |void..ZM|enuBar::|
|00003a50| 52 65 6d 6f 76 65 4d 65 | 6e 75 46 72 6f 6d 42 61 |RemoveMe|nuFromBa|
|00003a60| 72 28 20 63 6f 6e 73 74 | 20 73 68 6f 72 74 20 6d |r( const| short m|
|00003a70| 65 6e 75 49 44 20 29 0d | 7b 0d 09 4d 65 6e 75 48 |enuID ).|{..MenuH|
|00003a80| 61 6e 64 6c 65 09 6d 48 | 3b 0d 09 0d 09 46 61 69 |andle.mH|;....Fai|
|00003a90| 6c 4e 49 4c 50 61 72 61 | 6d 28 20 6d 48 20 3d 20 |lNILPara|m( mH = |
|00003aa0| 47 65 74 4d 65 6e 75 48 | 61 6e 64 6c 65 28 20 6d |GetMenuH|andle( m|
|00003ab0| 65 6e 75 49 44 20 29 29 | 3b 09 0d 09 0d 09 2f 2f |enuID ))|;.....//|
|00003ac0| 20 72 65 6d 6f 76 65 20 | 74 68 65 20 63 6f 6d 6d | remove |the comm|
|00003ad0| 61 6e 64 20 65 6e 74 72 | 69 65 73 20 66 6f 72 20 |and entr|ies for |
|00003ae0| 74 68 69 73 20 6d 65 6e | 75 20 61 6e 64 20 61 6e |this men|u and an|
|00003af0| 79 20 73 75 62 6d 65 6e | 75 73 20 69 74 20 69 73 |y submen|us it is|
|00003b00| 20 74 68 65 20 70 61 72 | 65 6e 74 20 6f 66 2e 0d | the par|ent of..|
|00003b10| 09 0d 09 55 6e 6c 6f 61 | 64 4d 65 6e 75 28 20 6d |...Unloa|dMenu( m|
|00003b20| 48 20 29 3b 0d 09 6d 62 | 43 6f 75 6e 74 2d 2d 3b |H );..mb|Count--;|
|00003b30| 0d 7d 0d 0d 0d 2f 2a 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.}.../*-|--------|
|00003b40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003b50| 2d 2d 2d 2d 2d 2a 2a 2a | 20 20 55 50 44 41 54 45 |-----***| UPDATE|
|00003b60| 53 54 59 4c 45 4d 45 4e | 55 20 20 2a 2a 2a 2d 2d |STYLEMEN|U ***--|
|00003b70| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003b80| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2a 2f 0d 2f |--------|----*/./|
|00003b90| 2a 0d 73 65 74 73 20 63 | 68 65 63 6b 6d 61 72 6b |*.sets c|heckmark|
|00003ba0| 73 20 61 67 61 69 6e 73 | 20 73 74 61 6e 64 61 72 |s agains| standar|
|00003bb0| 64 20 73 79 6c 65 20 63 | 6f 6d 6d 61 6e 64 20 61 |d syle c|ommand a|
|00003bc0| 63 63 6f 72 64 69 6e 67 | 20 74 6f 20 73 74 79 6c |ccording| to styl|
|00003bd0| 65 20 69 6e 66 6f 20 70 | 61 73 73 65 64 0d 2d 2d |e info p|assed.--|
|00003be0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003bf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00003c30| 2d 2d 2d 2d 2d 2a 2f 0d | 0d 76 6f 69 64 09 09 5a |-----*/.|.void..Z|
|00003c40| 4d 65 6e 75 42 61 72 3a | 3a 55 70 64 61 74 65 53 |MenuBar:|:UpdateS|
|00003c50| 74 79 6c 65 4d 65 6e 75 | 28 20 54 45 53 74 79 6c |tyleMenu|( TEStyl|
|00003c60| 65 52 75 6e 49 6e 66 6f | 2a 20 72 75 6e 49 6e 66 |eRunInfo|* runInf|
|00003c70| 6f 20 29 0d 7b 0d 09 45 | 6e 61 62 6c 65 43 6f 6d |o ).{..E|nableCom|
|00003c80| 6d 61 6e 64 28 20 6b 43 | 6d 64 50 6c 61 69 6e 54 |mand( kC|mdPlainT|
|00003c90| 65 78 74 20 29 3b 0d 09 | 45 6e 61 62 6c 65 43 6f |ext );..|EnableCo|
|00003ca0| 6d 6d 61 6e 64 28 20 6b | 43 6d 64 42 6f 6c 64 54 |mmand( k|CmdBoldT|
|00003cb0| 65 78 74 20 29 3b 0d 09 | 45 6e 61 62 6c 65 43 6f |ext );..|EnableCo|
|00003cc0| 6d 6d 61 6e 64 28 20 6b | 43 6d 64 49 74 61 6c 69 |mmand( k|CmdItali|
|00003cd0| 63 54 65 78 74 20 29 3b | 0d 09 45 6e 61 62 6c 65 |cText );|..Enable|
|00003ce0| 43 6f 6d 6d 61 6e 64 28 | 20 6b 43 6d 64 55 6e 64 |Command(| kCmdUnd|
|00003cf0| 65 72 6c 69 6e 65 54 65 | 78 74 20 29 3b 0d 09 45 |erlineTe|xt );..E|
|00003d00| 6e 61 62 6c 65 43 6f 6d | 6d 61 6e 64 28 20 6b 43 |nableCom|mand( kC|
|00003d10| 6d 64 4f 75 74 6c 69 6e | 65 54 65 78 74 20 29 3b |mdOutlin|eText );|
|00003d20| 0d 09 45 6e 61 62 6c 65 | 43 6f 6d 6d 61 6e 64 28 |..Enable|Command(|
|00003d30| 20 6b 43 6d 64 53 68 61 | 64 6f 77 54 65 78 74 20 | kCmdSha|dowText |
|00003d40| 29 3b 0d 09 45 6e 61 62 | 6c 65 43 6f 6d 6d 61 6e |);..Enab|leComman|
|00003d50| 64 28 20 6b 43 6d 64 43 | 6f 6e 64 65 6e 73 65 64 |d( kCmdC|ondensed|
|00003d60| 54 65 78 74 20 29 3b 0d | 09 45 6e 61 62 6c 65 43 |Text );.|.EnableC|
|00003d70| 6f 6d 6d 61 6e 64 28 20 | 6b 43 6d 64 45 78 74 65 |ommand( |kCmdExte|
|00003d80| 6e 64 65 64 54 65 78 74 | 20 29 3b 0d 09 0d 09 53 |ndedText| );....S|
|00003d90| 74 79 6c 65 09 63 75 72 | 53 74 79 6c 65 20 3d 20 |tyle.cur|Style = |
|00003da0| 72 75 6e 49 6e 66 6f 2d | 3e 72 75 6e 53 74 79 6c |runInfo-|>runStyl|
|00003db0| 65 73 3b 0d 09 53 74 79 | 6c 65 09 63 73 20 3d 20 |es;..Sty|le.cs = |
|00003dc0| 72 75 6e 49 6e 66 6f 2d | 3e 63 6f 6e 74 53 74 79 |runInfo-|>contSty|
|00003dd0| 6c 65 73 3b 0d 09 42 6f | 6f 6c 65 61 6e 20 63 6f |les;..Bo|olean co|
|00003de0| 6e 74 69 6e 75 6f 75 73 | 52 75 6e 20 3d 20 28 20 |ntinuous|Run = ( |
|00003df0| 63 73 20 3d 3d 20 30 78 | 46 46 20 29 3b 0d 0d 09 |cs == 0x|FF );...|
|00003e00| 69 66 20 28 28 20 63 75 | 72 53 74 79 6c 65 20 26 |if (( cu|rStyle &|
|00003e10| 20 30 78 37 46 20 29 20 | 3d 3d 20 30 20 29 0d 09 | 0x7F ) |== 0 )..|
|00003e20| 09 43 68 65 63 6b 43 6f | 6d 6d 61 6e 64 28 20 6b |.CheckCo|mmand( k|
|00003e30| 43 6d 64 50 6c 61 69 6e | 54 65 78 74 2c 20 54 52 |CmdPlain|Text, TR|
|00003e40| 55 45 20 29 3b 0d 09 65 | 6c 73 65 0d 09 7b 0d 09 |UE );..e|lse..{..|
|00003e50| 09 69 66 20 28 20 63 75 | 72 53 74 79 6c 65 20 26 |.if ( cu|rStyle &|
|00003e60| 20 6b 50 6c 61 69 6e 53 | 74 79 6c 65 20 29 0d 09 | kPlainS|tyle )..|
|00003e70| 09 09 43 68 65 63 6b 43 | 6f 6d 6d 61 6e 64 57 69 |..CheckC|ommandWi|
|00003e80| 74 68 43 68 61 72 28 20 | 6b 43 6d 64 50 6c 61 69 |thChar( |kCmdPlai|
|00003e90| 6e 54 65 78 74 2c 20 27 | 2d 27 20 29 3b 0d 09 09 |nText, '|-' );...|
|00003ea0| 0d 09 09 69 66 20 28 20 | 63 75 72 53 74 79 6c 65 |...if ( |curStyle|
|00003eb0| 20 26 20 62 6f 6c 64 20 | 29 0d 09 09 09 43 68 65 | & bold |)....Che|
|00003ec0| 63 6b 43 6f 6d 6d 61 6e | 64 57 69 74 68 43 68 61 |ckComman|dWithCha|
|00003ed0| 72 28 20 6b 43 6d 64 42 | 6f 6c 64 54 65 78 74 2c |r( kCmdB|oldText,|
|00003ee0| 20 28 20 63 73 20 26 20 | 62 6f 6c 64 20 29 20 3d | ( cs & |bold ) =|
|00003ef0| 3d 20 62 6f 6c 64 3f 20 | 63 68 65 63 6b 4d 61 72 |= bold? |checkMar|
|00003f00| 6b 20 3a 20 27 2d 27 20 | 29 3b 0d 0d 09 09 69 66 |k : '-' |);....if|
|00003f10| 20 28 20 63 75 72 53 74 | 79 6c 65 20 26 20 69 74 | ( curSt|yle & it|
|00003f20| 61 6c 69 63 20 29 0d 09 | 09 09 43 68 65 63 6b 43 |alic )..|..CheckC|
|00003f30| 6f 6d 6d 61 6e 64 57 69 | 74 68 43 68 61 72 28 20 |ommandWi|thChar( |
|00003f40| 6b 43 6d 64 49 74 61 6c | 69 63 54 65 78 74 2c 20 |kCmdItal|icText, |
|00003f50| 28 20 63 73 20 26 20 69 | 74 61 6c 69 63 20 29 20 |( cs & i|talic ) |
|00003f60| 3d 3d 20 69 74 61 6c 69 | 63 3f 20 63 68 65 63 6b |== itali|c? check|
|00003f70| 4d 61 72 6b 20 3a 20 27 | 2d 27 20 29 3b 0d 09 09 |Mark : '|-' );...|
|00003f80| 0d 09 09 69 66 20 28 20 | 63 75 72 53 74 79 6c 65 |...if ( |curStyle|
|00003f90| 20 26 20 75 6e 64 65 72 | 6c 69 6e 65 20 29 0d 09 | & under|line )..|
|00003fa0| 09 09 43 68 65 63 6b 43 | 6f 6d 6d 61 6e 64 57 69 |..CheckC|ommandWi|
|00003fb0| 74 68 43 68 61 72 28 20 | 6b 43 6d 64 55 6e 64 65 |thChar( |kCmdUnde|
|00003fc0| 72 6c 69 6e 65 54 65 78 | 74 2c 20 28 20 63 73 20 |rlineTex|t, ( cs |
|00003fd0| 26 20 75 6e 64 65 72 6c | 69 6e 65 20 29 20 3d 3d |& underl|ine ) ==|
|00003fe0| 20 75 6e 64 65 72 6c 69 | 6e 65 3f 20 63 68 65 63 | underli|ne? chec|
|00003ff0| 6b 4d 61 72 6b 20 3a 20 | 27 2d 27 20 29 3b 0d 09 |kMark : |'-' );..|
|00004000| 09 0d 09 09 69 66 20 28 | 20 63 75 72 53 74 79 6c |....if (| curStyl|
|00004010| 65 20 26 20 6f 75 74 6c | 69 6e 65 20 29 0d 09 09 |e & outl|ine )...|
|00004020| 09 43 68 65 63 6b 43 6f | 6d 6d 61 6e 64 57 69 74 |.CheckCo|mmandWit|
|00004030| 68 43 68 61 72 28 20 6b | 43 6d 64 4f 75 74 6c 69 |hChar( k|CmdOutli|
|00004040| 6e 65 54 65 78 74 2c 20 | 28 20 63 73 20 26 20 6f |neText, |( cs & o|
|00004050| 75 74 6c 69 6e 65 20 29 | 20 3d 3d 20 6f 75 74 6c |utline )| == outl|
|00004060| 69 6e 65 3f 20 63 68 65 | 63 6b 4d 61 72 6b 20 3a |ine? che|ckMark :|
|00004070| 20 27 2d 27 20 29 3b 0d | 09 09 0d 09 09 69 66 20 | '-' );.|.....if |
|00004080| 28 20 63 75 72 53 74 79 | 6c 65 20 26 20 73 68 61 |( curSty|le & sha|
|00004090| 64 6f 77 20 29 0d 09 09 | 09 43 68 65 63 6b 43 6f |dow )...|.CheckCo|
|000040a0| 6d 6d 61 6e 64 57 69 74 | 68 43 68 61 72 28 20 6b |mmandWit|hChar( k|
|000040b0| 43 6d 64 53 68 61 64 6f | 77 54 65 78 74 2c 20 28 |CmdShado|wText, (|
|000040c0| 20 63 73 20 26 20 73 68 | 61 64 6f 77 20 29 20 3d | cs & sh|adow ) =|
|000040d0| 3d 20 73 68 61 64 6f 77 | 3f 20 63 68 65 63 6b 4d |= shadow|? checkM|
|000040e0| 61 72 6b 20 3a 20 27 2d | 27 20 29 3b 0d 09 09 0d |ark : '-|' );....|
|000040f0| 09 09 69 66 20 28 20 63 | 75 72 53 74 79 6c 65 20 |..if ( c|urStyle |
|00004100| 26 20 63 6f 6e 64 65 6e | 73 65 20 29 0d 09 09 09 |& conden|se )....|
|00004110| 43 68 65 63 6b 43 6f 6d | 6d 61 6e 64 57 69 74 68 |CheckCom|mandWith|
|00004120| 43 68 61 72 28 20 6b 43 | 6d 64 43 6f 6e 64 65 6e |Char( kC|mdConden|
|00004130| 73 65 64 54 65 78 74 2c | 20 28 20 63 73 20 26 20 |sedText,| ( cs & |
|00004140| 63 6f 6e 64 65 6e 73 65 | 20 29 20 3d 3d 20 63 6f |condense| ) == co|
|00004150| 6e 64 65 6e 73 65 3f 20 | 63 68 65 63 6b 4d 61 72 |ndense? |checkMar|
|00004160| 6b 20 3a 20 27 2d 27 20 | 29 3b 0d 09 09 0d 09 09 |k : '-' |);......|
|00004170| 69 66 20 28 20 63 75 72 | 53 74 79 6c 65 20 26 20 |if ( cur|Style & |
|00004180| 65 78 74 65 6e 64 20 29 | 0d 09 09 09 43 68 65 63 |extend )|....Chec|
|00004190| 6b 43 6f 6d 6d 61 6e 64 | 57 69 74 68 43 68 61 72 |kCommand|WithChar|
|000041a0| 28 20 6b 43 6d 64 45 78 | 74 65 6e 64 65 64 54 65 |( kCmdEx|tendedTe|
|000041b0| 78 74 2c 20 28 20 63 73 | 20 26 20 65 78 74 65 6e |xt, ( cs| & exten|
|000041c0| 64 20 29 20 3d 3d 20 65 | 78 74 65 6e 64 3f 20 63 |d ) == e|xtend? c|
|000041d0| 68 65 63 6b 4d 61 72 6b | 20 3a 20 27 2d 27 20 29 |heckMark| : '-' )|
|000041e0| 3b 0d 09 7d 0d 7d 0d 0d | 2f 2a 2d 2d 2d 2d 2d 2d |;..}.}..|/*------|
|000041f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004200| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2a 2a 20 20 55 50 44 |--------|*** UPD|
|00004210| 41 54 45 53 54 59 4c 45 | 4d 45 4e 55 20 20 2a 2a |ATESTYLE|MENU **|
|00004220| 2a 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |*-------|--------|
|00004230| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00004240| 2f 0d 0d 0d 76 6f 69 64 | 09 09 5a 4d 65 6e 75 42 |/...void|..ZMenuB|
|00004250| 61 72 3a 3a 55 70 64 61 | 74 65 53 74 79 6c 65 4d |ar::Upda|teStyleM|
|00004260| 65 6e 75 28 20 53 74 79 | 6c 65 20 61 53 74 79 6c |enu( Sty|le aStyl|
|00004270| 65 20 29 0d 7b 0d 09 45 | 6e 61 62 6c 65 43 6f 6d |e ).{..E|nableCom|
|00004280| 6d 61 6e 64 28 20 6b 43 | 6d 64 50 6c 61 69 6e 54 |mand( kC|mdPlainT|
|00004290| 65 78 74 20 29 3b 0d 09 | 45 6e 61 62 6c 65 43 6f |ext );..|EnableCo|
|000042a0| 6d 6d 61 6e 64 28 20 6b | 43 6d 64 42 6f 6c 64 54 |mmand( k|CmdBoldT|
|000042b0| 65 78 74 20 29 3b 0d 09 | 45 6e 61 62 6c 65 43 6f |ext );..|EnableCo|
|000042c0| 6d 6d 61 6e 64 28 20 6b | 43 6d 64 49 74 61 6c 69 |mmand( k|CmdItali|
|000042d0| 63 54 65 78 74 20 29 3b | 0d 09 45 6e 61 62 6c 65 |cText );|..Enable|
|000042e0| 43 6f 6d 6d 61 6e 64 28 | 20 6b 43 6d 64 55 6e 64 |Command(| kCmdUnd|
|000042f0| 65 72 6c 69 6e 65 54 65 | 78 74 20 29 3b 0d 09 45 |erlineTe|xt );..E|
|00004300| 6e 61 62 6c 65 43 6f 6d | 6d 61 6e 64 28 20 6b 43 |nableCom|mand( kC|
|00004310| 6d 64 4f 75 74 6c 69 6e | 65 54 65 78 74 20 29 3b |mdOutlin|eText );|
|00004320| 0d 09 45 6e 61 62 6c 65 | 43 6f 6d 6d 61 6e 64 28 |..Enable|Command(|
|00004330| 20 6b 43 6d 64 53 68 61 | 64 6f 77 54 65 78 74 20 | kCmdSha|dowText |
|00004340| 29 3b 0d 09 45 6e 61 62 | 6c 65 43 6f 6d 6d 61 6e |);..Enab|leComman|
|00004350| 64 28 20 6b 43 6d 64 43 | 6f 6e 64 65 6e 73 65 64 |d( kCmdC|ondensed|
|00004360| 54 65 78 74 20 29 3b 0d | 09 45 6e 61 62 6c 65 43 |Text );.|.EnableC|
|00004370| 6f 6d 6d 61 6e 64 28 20 | 6b 43 6d 64 45 78 74 65 |ommand( |kCmdExte|
|00004380| 6e 64 65 64 54 65 78 74 | 20 29 3b 0d 0d 09 69 66 |ndedText| );...if|
|00004390| 20 28 20 61 53 74 79 6c | 65 20 3d 3d 20 6e 6f 72 | ( aStyl|e == nor|
|000043a0| 6d 61 6c 20 29 0d 09 09 | 43 68 65 63 6b 43 6f 6d |mal )...|CheckCom|
|000043b0| 6d 61 6e 64 28 20 6b 43 | 6d 64 50 6c 61 69 6e 54 |mand( kC|mdPlainT|
|000043c0| 65 78 74 2c 20 54 52 55 | 45 20 29 3b 0d 09 65 6c |ext, TRU|E );..el|
|000043d0| 73 65 0d 09 7b 0d 09 09 | 43 68 65 63 6b 43 6f 6d |se..{...|CheckCom|
|000043e0| 6d 61 6e 64 28 20 6b 43 | 6d 64 42 6f 6c 64 54 65 |mand( kC|mdBoldTe|
|000043f0| 78 74 2c 20 09 20 28 20 | 61 53 74 79 6c 65 20 26 |xt, . ( |aStyle &|
|00004400| 20 62 6f 6c 64 20 29 20 | 09 09 3d 3d 20 62 6f 6c | bold ) |..== bol|
|00004410| 64 20 29 3b 0d 09 09 43 | 68 65 63 6b 43 6f 6d 6d |d );...C|heckComm|
|00004420| 61 6e 64 28 20 6b 43 6d | 64 49 74 61 6c 69 63 54 |and( kCm|dItalicT|
|00004430| 65 78 74 2c 20 09 20 28 | 20 61 53 74 79 6c 65 20 |ext, . (| aStyle |
|00004440| 26 20 69 74 61 6c 69 63 | 20 29 20 09 3d 3d 20 69 |& italic| ) .== i|
|00004450| 74 61 6c 69 63 20 29 3b | 0d 09 09 43 68 65 63 6b |talic );|...Check|
|00004460| 43 6f 6d 6d 61 6e 64 28 | 20 6b 43 6d 64 55 6e 64 |Command(| kCmdUnd|
|00004470| 65 72 6c 69 6e 65 54 65 | 78 74 2c 20 28 20 61 53 |erlineTe|xt, ( aS|
|00004480| 74 79 6c 65 20 26 20 75 | 6e 64 65 72 6c 69 6e 65 |tyle & u|nderline|
|00004490| 20 29 20 3d 3d 20 75 6e | 64 65 72 6c 69 6e 65 20 | ) == un|derline |
|000044a0| 29 3b 0d 09 09 43 68 65 | 63 6b 43 6f 6d 6d 61 6e |);...Che|ckComman|
|000044b0| 64 28 20 6b 43 6d 64 4f | 75 74 6c 69 6e 65 54 65 |d( kCmdO|utlineTe|
|000044c0| 78 74 2c 20 09 20 28 20 | 61 53 74 79 6c 65 20 26 |xt, . ( |aStyle &|
|000044d0| 20 6f 75 74 6c 69 6e 65 | 20 29 20 09 3d 3d 20 6f | outline| ) .== o|
|000044e0| 75 74 6c 69 6e 65 20 29 | 3b 0d 09 09 43 68 65 63 |utline )|;...Chec|
|000044f0| 6b 43 6f 6d 6d 61 6e 64 | 28 20 6b 43 6d 64 53 68 |kCommand|( kCmdSh|
|00004500| 61 64 6f 77 54 65 78 74 | 2c 20 09 20 28 20 61 53 |adowText|, . ( aS|
|00004510| 74 79 6c 65 20 26 20 73 | 68 61 64 6f 77 20 29 20 |tyle & s|hadow ) |
|00004520| 09 3d 3d 20 73 68 61 64 | 6f 77 20 29 3b 0d 09 09 |.== shad|ow );...|
|00004530| 43 68 65 63 6b 43 6f 6d | 6d 61 6e 64 28 20 6b 43 |CheckCom|mand( kC|
|00004540| 6d 64 43 6f 6e 64 65 6e | 73 65 64 54 65 78 74 2c |mdConden|sedText,|
|00004550| 20 28 20 61 53 74 79 6c | 65 20 26 20 63 6f 6e 64 | ( aStyl|e & cond|
|00004560| 65 6e 73 65 20 29 20 09 | 3d 3d 20 63 6f 6e 64 65 |ense ) .|== conde|
|00004570| 6e 73 65 20 29 3b 0d 09 | 09 43 68 65 63 6b 43 6f |nse );..|.CheckCo|
|00004580| 6d 6d 61 6e 64 28 20 6b | 43 6d 64 45 78 74 65 6e |mmand( k|CmdExten|
|00004590| 64 65 64 54 65 78 74 2c | 20 20 28 20 61 53 74 79 |dedText,| ( aSty|
|000045a0| 6c 65 20 26 20 65 78 74 | 65 6e 64 20 29 09 3d 3d |le & ext|end ).==|
|000045b0| 20 65 78 74 65 6e 64 20 | 29 3b 0d 09 7d 0d 7d 0d | extend |);..}.}.|
|000045c0| 0d 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |./*-----|--------|
|000045d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|000045e0| 2a 2a 20 20 55 50 44 41 | 54 45 46 4f 4e 54 53 49 |** UPDA|TEFONTSI|
|000045f0| 5a 45 4d 45 4e 55 20 20 | 2a 2a 2a 2d 2d 2d 2d 2d |ZEMENU |***-----|
|00004600| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004610| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 2f 2a 0d 73 65 |--------|*/./*.se|
|00004620| 74 73 20 63 68 65 63 6b | 6d 61 72 6b 20 61 67 61 |ts check|mark aga|
|00004630| 69 6e 73 74 20 63 75 72 | 72 65 6e 74 20 66 6f 6e |inst cur|rent fon|
|00004640| 74 20 73 69 7a 65 2c 20 | 70 6c 75 73 20 73 65 74 |t size, |plus set|
|00004650| 73 20 6f 75 74 6c 69 6e | 65 20 73 74 79 6c 65 20 |s outlin|e style |
|00004660| 66 6f 72 20 72 65 61 6c | 20 66 6f 6e 74 20 73 69 |for real| font si|
|00004670| 7a 65 73 0d 69 6e 20 74 | 68 65 20 63 75 72 72 65 |zes.in t|he curre|
|00004680| 6e 74 20 66 6f 6e 74 2e | 20 54 68 69 73 20 69 74 |nt font.| This it|
|00004690| 65 72 61 74 65 73 20 74 | 68 72 6f 75 67 68 20 74 |erates t|hrough t|
|000046a0| 68 65 20 70 6f 73 73 69 | 62 6c 65 20 63 6f 6d 6d |he possi|ble comm|
|000046b0| 61 6e 64 73 20 73 6f 20 | 69 74 20 77 69 6c 6c 20 |ands so |it will |
|000046c0| 77 6f 72 6b 20 6e 6f 0d | 6d 61 74 74 65 72 20 77 |work no.|matter w|
|000046d0| 68 65 72 65 20 79 6f 75 | 20 68 61 76 65 20 64 65 |here you| have de|
|000046e0| 63 69 64 65 64 20 74 6f | 20 70 6c 61 63 65 20 79 |cided to| place y|
|000046f0| 6f 75 72 20 73 69 7a 65 | 20 63 6f 6d 6d 61 6e 64 |our size| command|
|00004700| 73 2e 20 4e 65 61 74 2e | 0d 2d 2d 2d 2d 2d 2d 2d |s. Neat.|.-------|
|00004710| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004720| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004730| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004740| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004750| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004760| 2a 2f 0d 0d 76 6f 69 64 | 09 09 5a 4d 65 6e 75 42 |*/..void|..ZMenuB|
|00004770| 61 72 3a 3a 55 70 64 61 | 74 65 46 6f 6e 74 53 69 |ar::Upda|teFontSi|
|00004780| 7a 65 4d 65 6e 75 28 20 | 54 45 53 74 79 6c 65 52 |zeMenu( |TEStyleR|
|00004790| 75 6e 49 6e 66 6f 2a 20 | 72 75 6e 49 6e 66 6f 20 |unInfo* |runInfo |
|000047a0| 29 0d 7b 0d 09 42 6f 6f | 6c 65 61 6e 09 63 6f 6e |).{..Boo|lean.con|
|000047b0| 74 46 6f 6e 74 2c 20 63 | 6f 6e 74 53 69 7a 65 3b |tFont, c|ontSize;|
|000047c0| 0d 09 0d 09 63 6f 6e 74 | 46 6f 6e 74 20 3d 20 72 |....cont|Font = r|
|000047d0| 75 6e 49 6e 66 6f 2d 3e | 66 72 20 26 20 6b 46 6f |unInfo->|fr & kFo|
|000047e0| 6e 74 49 73 43 6f 6e 74 | 69 6e 75 6f 75 73 3b 0d |ntIsCont|inuous;.|
|000047f0| 09 63 6f 6e 74 53 69 7a | 65 20 3d 20 72 75 6e 49 |.contSiz|e = runI|
|00004800| 6e 66 6f 2d 3e 66 72 20 | 26 20 6b 53 69 7a 65 49 |nfo->fr |& kSizeI|
|00004810| 73 43 6f 6e 74 69 6e 75 | 6f 75 73 3b 0d 09 0d 09 |sContinu|ous;....|
|00004820| 6c 6f 6e 67 09 66 43 6d | 64 3b 0d 09 73 68 6f 72 |long.fCm|d;..shor|
|00004830| 74 20 09 69 3b 0d 09 53 | 74 72 32 35 35 09 66 6f |t .i;..S|tr255.fo|
|00004840| 6e 74 4e 61 6d 65 3b 0d | 09 0d 09 66 6f 72 20 28 |ntName;.|...for (|
|00004850| 20 66 43 6d 64 20 3d 20 | 6b 43 6d 64 53 74 64 46 | fCmd = |kCmdStdF|
|00004860| 6f 6e 74 53 69 7a 65 37 | 3b 20 66 43 6d 64 20 3c |ontSize7|; fCmd <|
|00004870| 3d 20 6b 43 6d 64 53 74 | 64 46 6f 6e 74 53 69 7a |= kCmdSt|dFontSiz|
|00004880| 65 37 32 3b 20 66 43 6d | 64 2b 2b 20 29 0d 09 7b |e72; fCm|d++ )..{|
|00004890| 0d 09 09 45 6e 61 62 6c | 65 43 6f 6d 6d 61 6e 64 |...Enabl|eCommand|
|000048a0| 28 20 66 43 6d 64 20 29 | 3b 0d 09 09 0d 09 09 69 |( fCmd )|;......i|
|000048b0| 66 20 28 20 63 6f 6e 74 | 46 6f 6e 74 20 26 26 20 |f ( cont|Font && |
|000048c0| 52 65 61 6c 46 6f 6e 74 | 28 20 72 75 6e 49 6e 66 |RealFont|( runInf|
|000048d0| 6f 2d 3e 66 6f 6e 74 73 | 5b 30 5d 2c 20 66 43 6d |o->fonts|[0], fCm|
|000048e0| 64 20 2d 20 6b 53 74 64 | 46 6f 6e 74 53 69 7a 65 |d - kStd|FontSize|
|000048f0| 42 61 73 65 20 29 29 0d | 09 09 09 53 65 74 43 6f |Base )).|...SetCo|
|00004900| 6d 6d 61 6e 64 54 65 78 | 74 53 74 79 6c 65 28 20 |mmandTex|tStyle( |
|00004910| 66 43 6d 64 2c 20 6f 75 | 74 6c 69 6e 65 20 29 3b |fCmd, ou|tline );|
|00004920| 0d 09 09 65 6c 73 65 0d | 09 09 09 53 65 74 43 6f |...else.|...SetCo|
|00004930| 6d 6d 61 6e 64 54 65 78 | 74 53 74 79 6c 65 28 20 |mmandTex|tStyle( |
|00004940| 66 43 6d 64 2c 20 30 20 | 29 3b 0d 09 7d 0d 0d 09 |fCmd, 0 |);..}...|
|00004950| 69 66 20 28 20 63 6f 6e | 74 53 69 7a 65 20 29 0d |if ( con|tSize ).|
|00004960| 09 09 43 68 65 63 6b 43 | 6f 6d 6d 61 6e 64 28 20 |..CheckC|ommand( |
|00004970| 6b 53 74 64 46 6f 6e 74 | 53 69 7a 65 42 61 73 65 |kStdFont|SizeBase|
|00004980| 20 2b 20 72 75 6e 49 6e | 66 6f 2d 3e 73 69 7a 65 | + runIn|fo->size|
|00004990| 73 5b 30 5d 2c 20 54 52 | 55 45 20 29 3b 0d 09 65 |s[0], TR|UE );..e|
|000049a0| 6c 73 65 0d 09 7b 0d 09 | 09 2f 2f 20 6e 6f 6e 2d |lse..{..|.// non-|
|000049b0| 63 6f 6e 74 69 6e 75 6f | 75 73 20 73 69 7a 65 73 |continuo|us sizes|
|000049c0| 2c 20 73 6f 20 6d 61 72 | 6b 20 61 6c 6c 20 74 68 |, so mar|k all th|
|000049d0| 65 20 6c 69 73 74 65 64 | 20 73 69 7a 65 73 0d 09 |e listed| sizes..|
|000049e0| 09 0d 09 09 66 6f 72 20 | 28 20 69 20 3d 20 30 3b |....for |( i = 0;|
|000049f0| 20 69 20 3c 20 72 75 6e | 49 6e 66 6f 2d 3e 6e 75 | i < run|Info->nu|
|00004a00| 6d 53 69 7a 65 73 3b 20 | 69 2b 2b 20 29 0d 09 09 |mSizes; |i++ )...|
|00004a10| 09 43 68 65 63 6b 43 6f | 6d 6d 61 6e 64 57 69 74 |.CheckCo|mmandWit|
|00004a20| 68 43 68 61 72 28 20 72 | 75 6e 49 6e 66 6f 2d 3e |hChar( r|unInfo->|
|00004a30| 73 69 7a 65 73 5b 69 5d | 20 2b 20 6b 53 74 64 46 |sizes[i]| + kStdF|
|00004a40| 6f 6e 74 53 69 7a 65 42 | 61 73 65 2c 20 27 2d 27 |ontSizeB|ase, '-'|
|00004a50| 20 29 3b 09 0d 09 7d 0d | 09 0d 09 69 66 20 28 20 | );...}.|...if ( |
|00004a60| 67 46 6f 6e 74 4d 65 6e | 75 49 44 20 29 0d 09 7b |gFontMen|uID )..{|
|00004a70| 0d 09 09 69 66 20 28 20 | 63 6f 6e 74 46 6f 6e 74 |...if ( |contFont|
|00004a80| 20 29 0d 09 09 7b 0d 09 | 09 09 47 65 74 46 6f 6e | )...{..|..GetFon|
|00004a90| 74 4e 61 6d 65 28 20 72 | 75 6e 49 6e 66 6f 2d 3e |tName( r|unInfo->|
|00004aa0| 66 6f 6e 74 73 5b 30 5d | 2c 20 66 6f 6e 74 4e 61 |fonts[0]|, fontNa|
|00004ab0| 6d 65 20 29 3b 0d 09 09 | 09 43 68 65 63 6b 43 6f |me );...|.CheckCo|
|00004ac0| 6d 6d 61 6e 64 28 20 67 | 46 6f 6e 74 4d 65 6e 75 |mmand( g|FontMenu|
|00004ad0| 49 44 2c 20 66 6f 6e 74 | 4e 61 6d 65 2c 20 54 52 |ID, font|Name, TR|
|00004ae0| 55 45 20 29 3b 0d 09 09 | 7d 0d 09 09 65 6c 73 65 |UE );...|}...else|
|00004af0| 0d 09 09 7b 0d 09 09 09 | 2f 2f 20 6e 6f 6e 2d 63 |...{....|// non-c|
|00004b00| 6f 6e 74 69 6e 6f 75 73 | 20 66 6f 6e 74 73 2c 20 |ontinous| fonts, |
|00004b10| 73 6f 20 6d 61 72 6b 20 | 61 6c 6c 20 74 68 65 20 |so mark |all the |
|00004b20| 6c 69 73 74 65 64 20 66 | 6f 6e 74 73 0d 09 09 09 |listed f|onts....|
|00004b30| 0d 09 09 09 66 6f 72 20 | 28 20 69 20 3d 20 30 3b |....for |( i = 0;|
|00004b40| 20 69 20 3c 20 72 75 6e | 49 6e 66 6f 2d 3e 6e 75 | i < run|Info->nu|
|00004b50| 6d 46 6f 6e 74 73 3b 20 | 69 2b 2b 20 29 0d 09 09 |mFonts; |i++ )...|
|00004b60| 09 7b 0d 09 09 09 09 47 | 65 74 46 6f 6e 74 4e 61 |.{.....G|etFontNa|
|00004b70| 6d 65 28 20 72 75 6e 49 | 6e 66 6f 2d 3e 66 6f 6e |me( runI|nfo->fon|
|00004b80| 74 73 5b 69 5d 2c 20 66 | 6f 6e 74 4e 61 6d 65 20 |ts[i], f|ontName |
|00004b90| 29 3b 0d 09 09 09 09 43 | 68 65 63 6b 43 6f 6d 6d |);.....C|heckComm|
|00004ba0| 61 6e 64 57 69 74 68 43 | 68 61 72 28 20 67 46 6f |andWithC|har( gFo|
|00004bb0| 6e 74 4d 65 6e 75 49 44 | 2c 20 66 6f 6e 74 4e 61 |ntMenuID|, fontNa|
|00004bc0| 6d 65 2c 20 27 2d 27 20 | 29 3b 0d 09 09 09 7d 0d |me, '-' |);....}.|
|00004bd0| 09 09 7d 09 0d 09 7d 0d | 7d 0d 0d 0d 2f 2a 2d 2d |..}...}.|}.../*--|
|00004be0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004bf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2a |--------|-------*|
|00004c00| 2a 2a 20 20 4c 4f 41 44 | 4d 45 4e 55 53 20 20 2a |** LOAD|MENUS *|
|00004c10| 2a 2a 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |**------|--------|
|00004c20| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004c30| 2d 2d 2d 2a 2f 0d 2f 2a | 0d 66 6f 72 20 65 61 63 |---*/./*|.for eac|
|00004c40| 68 20 6d 65 6e 75 20 69 | 6e 20 74 68 65 20 4d 42 |h menu i|n the MB|
|00004c50| 41 52 2c 20 63 61 6c 6c | 20 4c 6f 61 64 4d 65 6e |AR, call| LoadMen|
|00004c60| 75 2e 20 54 68 69 73 20 | 77 69 6c 6c 20 64 65 61 |u. This |will dea|
|00004c70| 6c 20 77 69 74 68 20 68 | 69 65 72 61 72 63 68 69 |l with h|ierarchi|
|00004c80| 63 61 6c 20 6d 65 6e 75 | 73 2c 20 65 74 63 2e 0d |cal menu|s, etc..|
|00004c90| 54 68 69 73 20 6d 65 74 | 68 6f 64 20 61 73 73 75 |This met|hod assu|
|00004ca0| 6d 65 73 20 6d 42 61 72 | 48 20 69 73 20 76 61 6c |mes mBar|H is val|
|00004cb0| 69 64 2c 20 61 6e 64 20 | 77 6f 6e 27 74 20 62 65 |id, and |won't be|
|00004cc0| 20 70 75 72 67 65 64 2e | 0d 2d 2d 2d 2d 2d 2d 2d | purged.|.-------|
|00004cd0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004ce0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004cf0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004d00| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004d10| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004d20| 2a 2f 0d 0d 76 6f 69 64 | 09 09 5a 4d 65 6e 75 42 |*/..void|..ZMenuB|
|00004d30| 61 72 3a 3a 4c 6f 61 64 | 4d 65 6e 75 73 28 20 63 |ar::Load|Menus( c|
|00004d40| 6f 6e 73 74 20 42 6f 6f | 6c 65 61 6e 20 61 75 74 |onst Boo|lean aut|
|00004d50| 6f 49 6e 73 74 61 6c 6c | 20 29 0d 7b 0d 09 73 68 |oInstall| ).{..sh|
|00004d60| 6f 72 74 09 09 69 2c 20 | 6d 65 6e 75 49 44 3b 0d |ort..i, |menuID;.|
|00004d70| 09 48 61 6e 64 6c 65 09 | 09 74 65 6d 70 3b 0d 09 |.Handle.|.temp;..|
|00004d80| 0d 09 2f 2f 20 68 6f 77 | 20 6d 61 6e 79 20 6d 65 |..// how| many me|
|00004d90| 6e 75 73 20 69 6e 20 4d | 42 41 52 20 72 65 73 6f |nus in M|BAR reso|
|00004da0| 75 72 63 65 3f 20 54 68 | 69 73 20 69 73 20 66 69 |urce? Th|is is fi|
|00004db0| 72 73 74 20 69 74 65 6d | 20 69 6e 20 72 65 73 6f |rst item| in reso|
|00004dc0| 75 72 63 65 2e 0d 09 0d | 09 6d 62 43 6f 75 6e 74 |urce....|.mbCount|
|00004dd0| 20 3d 20 28 2a 6d 42 61 | 72 48 29 5b 30 5d 3b 0d | = (*mBa|rH)[0];.|
|00004de0| 09 0d 09 2f 2f 20 69 74 | 65 72 61 74 65 20 74 68 |...// it|erate th|
|00004df0| 72 6f 75 67 68 2c 20 6c | 6f 6f 6b 69 6e 67 20 66 |rough, l|ooking f|
|00004e00| 6f 72 20 4d 45 4e 55 20 | 6f 72 20 43 4d 4e 55 20 |or MENU |or CMNU |
|00004e10| 72 65 73 6f 75 72 63 65 | 73 0d 09 0d 09 66 6f 72 |resource|s....for|
|00004e20| 20 28 20 69 20 3d 20 31 | 3b 20 69 20 3c 3d 20 6d | ( i = 1|; i <= m|
|00004e30| 62 43 6f 75 6e 74 3b 20 | 69 2b 2b 20 29 0d 09 7b |bCount; |i++ )..{|
|00004e40| 0d 09 09 6d 65 6e 75 49 | 44 20 3d 20 28 2a 6d 42 |...menuI|D = (*mB|
|00004e50| 61 72 48 29 5b 69 5d 3b | 0d 09 09 0d 09 09 2f 2f |arH)[i];|......//|
|00004e60| 20 69 66 20 43 4d 4e 55 | 20 72 65 73 6f 75 72 63 | if CMNU| resourc|
|00004e70| 65 20 69 73 20 61 76 61 | 69 6c 61 62 6c 65 2c 20 |e is ava|ilable, |
|00004e80| 75 73 65 20 74 68 61 74 | 2e 20 4f 74 68 65 72 77 |use that|. Otherw|
|00004e90| 69 73 65 2c 20 75 73 65 | 20 4d 45 4e 55 20 72 65 |ise, use| MENU re|
|00004ea0| 73 6f 75 72 63 65 2c 0d | 09 09 2f 2f 20 70 6f 73 |source,.|..// pos|
|00004eb0| 73 69 62 6c 79 20 70 61 | 72 73 69 6e 67 20 69 74 |sibly pa|rsing it|
|00004ec0| 20 66 6f 72 20 63 6f 6d | 6d 61 6e 64 20 6e 75 6d | for com|mand num|
|00004ed0| 62 65 72 73 0d 09 09 0d | 09 09 74 65 6d 70 20 3d |bers....|..temp =|
|00004ee0| 20 47 65 74 52 65 73 6f | 75 72 63 65 28 20 27 43 | GetReso|urce( 'C|
|00004ef0| 4d 4e 55 27 2c 20 6d 65 | 6e 75 49 44 20 29 3b 0d |MNU', me|nuID );.|
|00004f00| 09 09 0d 09 09 69 66 20 | 28 20 74 65 6d 70 20 29 |.....if |( temp )|
|00004f10| 0d 09 09 7b 0d 09 09 09 | 4c 6f 61 64 43 4d 4e 55 |...{....|LoadCMNU|
|00004f20| 4d 65 6e 75 28 20 6d 65 | 6e 75 49 44 2c 20 46 41 |Menu( me|nuID, FA|
|00004f30| 4c 53 45 2c 20 61 75 74 | 6f 49 6e 73 74 61 6c 6c |LSE, aut|oInstall|
|00004f40| 20 29 3b 0d 09 09 09 52 | 65 6c 65 61 73 65 52 65 | );....R|eleaseRe|
|00004f50| 73 6f 75 72 63 65 28 20 | 74 65 6d 70 20 29 3b 0d |source( |temp );.|
|00004f60| 09 09 7d 0d 09 09 65 6c | 73 65 0d 09 09 09 4c 6f |..}...el|se....Lo|
|00004f70| 61 64 4d 65 6e 75 28 20 | 6d 65 6e 75 49 44 2c 20 |adMenu( |menuID, |
|00004f80| 46 41 4c 53 45 2c 20 61 | 75 74 6f 49 6e 73 74 61 |FALSE, a|utoInsta|
|00004f90| 6c 6c 20 29 3b 0d 0d 09 | 7d 0d 7d 09 0d 0d 2f 2a |ll );...|}.}.../*|
|00004fa0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004fb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004fc0| 2d 2d 2a 2a 2a 20 20 44 | 49 4d 4d 45 4e 55 53 20 |--*** D|IMMENUS |
|00004fd0| 20 2a 2a 2a 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d | ***----|--------|
|00004fe0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00004ff0| 2d 2d 2d 2d 2d 2a 2f 0d | 2f 2a 0d 64 69 6d 20 61 |-----*/.|/*.dim a|
|00005000| 6c 6c 20 6f 66 20 74 68 | 65 20 6d 65 6e 75 20 69 |ll of th|e menu i|
|00005010| 74 65 6d 73 2c 20 61 63 | 63 6f 72 64 69 6e 67 20 |tems, ac|cording |
|00005020| 74 6f 20 74 68 65 69 72 | 20 66 6c 61 67 73 2e 0d |to their| flags..|
|00005030| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005040| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005050| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005060| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005070| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005080| 2d 2d 2d 2d 2d 2d 2d 2a | 2f 0d 0d 76 6f 69 64 09 |-------*|/..void.|
|00005090| 09 5a 4d 65 6e 75 42 61 | 72 3a 3a 44 69 6d 4d 65 |.ZMenuBa|r::DimMe|
|000050a0| 6e 75 73 28 29 0d 7b 0d | 09 2f 2f 20 54 68 69 73 |nus().{.|.// This|
|000050b0| 20 6f 72 69 67 69 6e 61 | 6c 6c 79 20 6f 70 65 72 | origina|lly oper|
|000050c0| 61 74 65 64 20 62 79 20 | 77 61 6c 6b 69 6e 67 20 |ated by |walking |
|000050d0| 74 68 65 20 6c 6f 77 2d | 6d 65 6d 6f 72 79 20 67 |the low-|memory g|
|000050e0| 6c 6f 62 61 6c 20 6d 65 | 6e 75 4c 69 73 74 2c 20 |lobal me|nuList, |
|000050f0| 62 75 74 20 74 68 61 74 | 20 64 6f 65 73 0d 09 2f |but that| does../|
|00005100| 2f 20 6e 6f 74 20 77 6f | 72 6b 20 77 68 65 6e 20 |/ not wo|rk when |
|00005110| 33 72 64 20 70 61 72 74 | 79 20 65 78 74 65 6e 73 |3rd part|y extens|
|00005120| 69 6f 6e 73 20 69 6e 73 | 74 61 6c 6c 20 65 78 74 |ions ins|tall ext|
|00005130| 72 61 20 6d 65 6e 75 73 | 2e 20 54 68 75 73 20 77 |ra menus|. Thus w|
|00005140| 65 20 6e 6f 77 20 75 73 | 65 20 6f 75 72 20 70 72 |e now us|e our pr|
|00005150| 69 76 61 74 65 0d 09 2f | 2f 20 6c 69 73 74 20 6f |ivate../|/ list o|
|00005160| 66 20 6d 65 6e 75 73 20 | 74 6f 20 64 6f 20 74 68 |f menus |to do th|
|00005170| 69 73 20 6f 70 65 72 61 | 74 69 6f 6e 20 73 6f 20 |is opera|tion so |
|00005180| 77 65 20 6f 6e 6c 79 20 | 61 66 66 65 63 74 20 6f |we only |affect o|
|00005190| 75 72 20 6f 77 6e 20 6d | 65 6e 75 73 2e 0d 09 0d |ur own m|enus....|
|000051a0| 09 73 68 6f 72 74 09 09 | 69 3b 0d 09 4d 65 6e 75 |.short..|i;..Menu|
|000051b0| 49 6e 66 52 65 63 09 6d | 52 65 63 3b 0d 09 0d 09 |InfRec.m|Rec;....|
|000051c0| 66 6f 72 20 28 20 69 20 | 3d 20 31 3b 20 69 20 3c |for ( i |= 1; i <|
|000051d0| 3d 20 74 68 65 4d 65 6e | 75 73 2d 3e 43 6f 75 6e |= theMen|us->Coun|
|000051e0| 74 49 74 65 6d 73 28 29 | 3b 20 69 2b 2b 20 29 0d |tItems()|; i++ ).|
|000051f0| 09 7b 0d 09 09 2f 2f 20 | 66 69 6e 64 20 74 68 69 |.{...// |find thi|
|00005200| 73 20 6d 65 6e 75 20 69 | 6e 20 6f 75 72 20 6c 69 |s menu i|n our li|
|00005210| 73 74 2c 20 61 6e 64 20 | 64 69 6d 20 69 74 20 61 |st, and |dim it a|
|00005220| 63 63 6f 72 64 69 6e 67 | 20 74 6f 20 74 68 65 0d |ccording| to the.|
|00005230| 09 09 2f 2f 20 66 6c 61 | 67 73 20 74 68 65 72 65 |..// fla|gs there|
|00005240| 2e 20 28 54 68 61 6e 6b | 73 20 74 6f 20 4a 65 61 |. (Thank|s to Jea|
|00005250| 6e 2d 59 76 65 73 20 50 | 6f 63 68 65 7a 20 66 6f |n-Yves P|ochez fo|
|00005260| 72 20 74 68 65 20 69 6d | 70 72 6f 76 65 6d 65 6e |r the im|provemen|
|00005270| 74 73 20 74 6f 20 74 68 | 69 73 20 6d 65 74 68 6f |ts to th|is metho|
|00005280| 64 29 0d 09 09 0d 09 09 | 6d 52 65 63 2e 6d 61 63 |d)......|mRec.mac|
|00005290| 4d 65 6e 75 20 3d 20 4e | 55 4c 4c 3b 0d 09 09 74 |Menu = N|ULL;...t|
|000052a0| 68 65 4d 65 6e 75 73 2d | 3e 47 65 74 41 72 72 61 |heMenus-|>GetArra|
|000052b0| 79 49 74 65 6d 28 20 26 | 6d 52 65 63 2c 20 69 20 |yItem( &|mRec, i |
|000052c0| 29 3b 0d 09 0d 09 09 69 | 66 20 28 20 6d 52 65 63 |);.....i|f ( mRec|
|000052d0| 2e 6d 61 63 4d 65 6e 75 | 20 29 0d 09 09 7b 0d 09 |.macMenu| )...{..|
|000052e0| 09 09 2f 2f 20 6d 65 6e | 75 20 69 73 20 69 6e 20 |..// men|u is in |
|000052f0| 6f 75 72 20 6c 69 73 74 | 2c 20 73 6f 20 64 69 6d |our list|, so dim|
|00005300| 20 69 74 2e 20 4e 6f 74 | 65 20 74 68 61 74 20 61 | it. Not|e that a|
|00005310| 6c 6c 20 6d 65 6e 75 73 | 2c 20 69 6e 63 6c 75 64 |ll menus|, includ|
|00005320| 69 6e 67 20 61 6c 6c 20 | 6f 66 0d 09 09 09 2f 2f |ing all |of....//|
|00005330| 20 74 68 65 20 61 74 74 | 61 63 68 65 64 20 68 69 | the att|ached hi|
|00005340| 65 72 61 72 63 68 69 63 | 61 6c 20 6d 65 6e 75 73 |erarchic|al menus|
|00005350| 20 61 72 65 20 64 69 6d | 6d 65 64 20 62 79 20 69 | are dim|med by i|
|00005360| 74 65 72 61 74 69 6e 67 | 20 74 68 69 73 20 6c 69 |terating| this li|
|00005370| 73 74 2e 20 54 68 75 73 | 0d 09 09 09 2f 2f 20 50 |st. Thus|....// P|
|00005380| 72 65 64 69 6d 4d 65 6e | 75 20 64 6f 65 73 20 6e |redimMen|u does n|
|00005390| 6f 74 20 6e 65 65 64 20 | 74 6f 20 62 65 20 72 65 |ot need |to be re|
|000053a0| 63 75 72 73 69 76 65 2c | 20 61 6e 64 20 69 73 6e |cursive,| and isn|
|000053b0| 27 74 2e 0d 09 09 09 0d | 09 09 09 50 72 65 64 69 |'t......|...Predi|
|000053c0| 6d 4d 65 6e 75 28 20 6d | 52 65 63 2e 6d 61 63 4d |mMenu( m|Rec.macM|
|000053d0| 65 6e 75 20 29 3b 0d 09 | 09 7d 0d 09 7d 0d 0d 09 |enu );..|.}..}...|
|000053e0| 2f 2f 20 69 66 20 61 75 | 74 6f 20 57 69 6e 64 6f |// if au|to Windo|
|000053f0| 77 73 20 6d 65 6e 75 20 | 69 6e 20 75 73 65 2c 20 |ws menu |in use, |
|00005400| 73 65 74 20 74 68 61 74 | 20 75 70 20 61 73 20 77 |set that| up as w|
|00005410| 65 6c 6c 0d 09 0d 09 69 | 66 20 28 20 77 6d 4d 65 |ell....i|f ( wmMe|
|00005420| 6e 75 49 44 20 3e 20 30 | 20 29 0d 09 09 67 57 69 |nuID > 0| )...gWi|
|00005430| 6e 64 6f 77 4d 61 6e 61 | 67 65 72 2d 3e 42 75 69 |ndowMana|ger->Bui|
|00005440| 6c 64 57 69 6e 64 6f 77 | 73 4d 65 6e 75 28 29 3b |ldWindow|sMenu();|
|00005450| 09 0d 7d 0d 0d 0d 2f 2a | 2d 2d 2d 2d 2d 2d 2d 2d |..}.../*|--------|
|00005460| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005470| 2d 2d 2d 2d 2d 2d 2d 2a | 2a 2a 20 20 53 45 54 4d |-------*|** SETM|
|00005480| 45 4e 55 44 49 4d 4d 49 | 4e 47 20 20 2a 2a 2a 2d |ENUDIMMI|NG ***-|
|00005490| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000054a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2a 2f 0d |--------|-----*/.|
|000054b0| 2f 2a 0d 73 65 74 20 74 | 68 65 20 64 69 6d 6d 69 |/*.set t|he dimmi|
|000054c0| 6e 67 20 6f 70 74 69 6f | 6e 73 20 66 6f 72 20 61 |ng optio|ns for a|
|000054d0| 20 70 61 72 74 69 63 75 | 6c 61 72 20 6d 65 6e 75 | particu|lar menu|
|000054e0| 2e 20 42 79 20 64 65 66 | 61 75 6c 74 2c 20 61 6c |. By def|ault, al|
|000054f0| 6c 20 6d 65 6e 75 73 20 | 61 72 65 20 64 69 6d 6d |l menus |are dimm|
|00005500| 65 64 20 61 75 74 6f 2d | 0d 6d 61 74 69 63 61 6c |ed auto-|.matical|
|00005510| 6c 79 2c 20 62 75 74 20 | 69 66 20 79 6f 75 20 64 |ly, but |if you d|
|00005520| 6f 6e 27 74 20 77 61 6e | 74 20 74 68 65 6d 20 64 |on't wan|t them d|
|00005530| 69 6d 6d 65 64 2c 20 6f | 72 20 70 61 72 74 69 61 |immed, o|r partia|
|00005540| 6c 6c 79 20 64 69 6d 6d | 65 64 2c 20 63 61 6c 6c |lly dimm|ed, call|
|00005550| 20 74 68 69 73 20 77 69 | 74 68 20 74 68 65 0d 72 | this wi|th the.r|
|00005560| 65 71 75 69 72 65 64 20 | 6f 70 74 69 6f 6e 73 2e |equired |options.|
|00005570| 0d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.-------|--------|
|00005580| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00005590| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000055a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000055b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000055c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 0d 76 6f 69 64 |--------|*/..void|
|000055d0| 09 09 5a 4d 65 6e 75 42 | 61 72 3a 3a 53 65 74 4d |..ZMenuB|ar::SetM|
|000055e0| 65 6e 75 44 69 6d 6d 69 | 6e 67 28 20 63 6f 6e 73 |enuDimmi|ng( cons|
|000055f0| 74 20 73 68 6f 72 74 20 | 6d 65 6e 75 49 44 2c 20 |t short |menuID, |
|00005600| 63 6f 6e 73 74 20 44 69 | 6d 6d 69 6e 67 4f 70 74 |const Di|mmingOpt|
|00005610| 69 6f 6e 73 20 64 69 6d | 4f 70 74 73 20 29 0d 7b |ions dim|Opts ).{|
|00005620| 0d 09 4d 65 6e 75 49 6e | 66 52 65 63 09 6d 72 3b |..MenuIn|fRec.mr;|
|00005630| 0d 09 42 6f 6f 6c 65 61 | 6e 09 09 62 55 70 64 61 |..Boolea|n..bUpda|
|00005640| 74 65 3b 0d 09 0d 09 6d | 72 2e 6d 61 63 4d 65 6e |te;....m|r.macMen|
|00005650| 75 20 3d 20 4e 55 4c 4c | 3b 0d 09 0d 09 46 69 6e |u = NULL|;....Fin|
|00005660| 64 4d 65 6e 75 49 6e 66 | 6f 28 20 6d 65 6e 75 49 |dMenuInf|o( menuI|
|00005670| 44 2c 20 26 6d 72 20 29 | 3b 0d 09 0d 09 69 66 20 |D, &mr )|;....if |
|00005680| 28 20 6d 72 2e 6d 61 63 | 4d 65 6e 75 20 29 0d 09 |( mr.mac|Menu )..|
|00005690| 7b 0d 09 09 2f 2f 20 69 | 66 20 74 68 69 73 20 63 |{...// i|f this c|
|000056a0| 61 6c 6c 20 77 69 6c 6c | 20 63 68 61 6e 67 65 20 |all will| change |
|000056b0| 74 68 65 20 73 74 61 74 | 65 20 6f 66 20 74 68 65 |the stat|e of the|
|000056c0| 20 64 69 6d 54 69 74 6c | 65 20 66 6c 61 67 2c 20 | dimTitl|e flag, |
|000056d0| 77 65 20 6e 65 65 64 20 | 74 6f 20 63 61 75 73 65 |we need |to cause|
|000056e0| 20 61 6e 0d 09 09 2f 2f | 20 75 70 64 61 74 65 20 | an...//| update |
|000056f0| 74 6f 20 74 68 65 20 6d | 65 6e 75 62 61 72 20 73 |to the m|enubar s|
|00005700| 6f 20 74 68 61 74 20 74 | 68 65 20 75 73 65 72 20 |o that t|he user |
|00005710| 73 65 65 73 20 74 68 65 | 20 63 68 61 6e 67 65 0d |sees the| change.|
|00005720| 09 09 0d 09 09 62 55 70 | 64 61 74 65 20 3d 20 28 |.....bUp|date = (|
|00005730| 28 20 6d 72 2e 6d 44 69 | 6d 6d 69 6e 67 20 5e 20 |( mr.mDi|mming ^ |
|00005740| 64 69 6d 4f 70 74 73 20 | 29 20 26 20 64 69 6d 54 |dimOpts |) & dimT|
|00005750| 69 74 6c 65 20 29 20 21 | 3d 20 30 3b 0d 09 09 0d |itle ) !|= 0;....|
|00005760| 09 09 6d 72 2e 6d 44 69 | 6d 6d 69 6e 67 20 3d 20 |..mr.mDi|mming = |
|00005770| 64 69 6d 4f 70 74 73 3b | 0d 09 09 74 68 65 4d 65 |dimOpts;|...theMe|
|00005780| 6e 75 73 2d 3e 53 65 74 | 41 72 72 61 79 49 74 65 |nus->Set|ArrayIte|
|00005790| 6d 28 20 26 6d 72 2c 20 | 6d 72 2e 6d 49 6e 64 65 |m( &mr, |mr.mInde|
|000057a0| 78 20 29 3b 0d 09 09 0d | 09 09 2f 2f 20 75 70 64 |x );....|..// upd|
|000057b0| 61 74 65 20 74 68 65 20 | 62 61 72 20 69 66 20 6e |ate the |bar if n|
|000057c0| 65 63 65 73 73 61 72 79 | 0d 09 09 0d 09 09 69 66 |ecessary|......if|
|000057d0| 20 28 20 62 55 70 64 61 | 74 65 20 29 0d 09 09 7b | ( bUpda|te )...{|
|000057e0| 0d 09 09 09 2f 2f 20 65 | 6e 61 62 6c 65 20 6f 72 |....// e|nable or|
|000057f0| 20 64 69 73 61 62 6c 65 | 20 74 69 74 6c 65 20 69 | disable| title i|
|00005800| 74 65 6d 0d 09 09 09 0d | 09 09 09 69 66 20 28 20 |tem.....|...if ( |
|00005810| 64 69 6d 4f 70 74 73 20 | 26 20 64 69 6d 54 69 74 |dimOpts |& dimTit|
|00005820| 6c 65 20 29 0d 09 09 09 | 09 28 2a 6d 72 2e 6d 61 |le )....|.(*mr.ma|
|00005830| 63 4d 65 6e 75 29 2d 3e | 65 6e 61 62 6c 65 46 6c |cMenu)->|enableFl|
|00005840| 61 67 73 20 26 3d 20 30 | 78 46 46 46 46 46 46 46 |ags &= 0|xFFFFFFF|
|00005850| 45 3b 0d 09 09 09 65 6c | 73 65 0d 09 09 09 09 28 |E;....el|se.....(|
|00005860| 2a 6d 72 2e 6d 61 63 4d | 65 6e 75 29 2d 3e 65 6e |*mr.macM|enu)->en|
|00005870| 61 62 6c 65 46 6c 61 67 | 73 20 7c 3d 20 31 3b 0d |ableFlag|s |= 1;.|
|00005880| 09 09 09 0d 09 09 09 55 | 70 64 61 74 65 4d 65 6e |.......U|pdateMen|
|00005890| 75 42 61 72 28 29 3b 0d | 09 09 7d 0d 09 7d 0d 7d |uBar();.|..}..}.}|
|000058a0| 09 0d 0d 0d 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |..../*--|--------|
|000058b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000058c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2a 2a 20 20 4c 4f 41 |--------|*** LOA|
|000058d0| 44 4d 45 4e 55 20 20 2a | 2a 2a 2d 2d 2d 2d 2d 2d |DMENU *|**------|
|000058e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000058f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2a 2f 0d 2f 2a |--------|---*/./*|
|00005900| 0d 63 61 6e 20 62 65 20 | 63 61 6c 6c 65 64 20 72 |.can be |called r|
|00005910| 65 63 75 72 73 69 76 65 | 6c 79 2d 20 74 72 79 20 |ecursive|ly- try |
|00005920| 74 6f 20 6c 6f 61 64 20 | 74 68 65 20 6d 65 6e 75 |to load |the menu|
|00005930| 20 77 69 74 68 20 74 68 | 65 20 49 44 20 61 6e 64 | with th|e ID and|
|00005940| 20 61 6e 79 20 73 75 62 | 6d 65 6e 75 73 20 69 74 | any sub|menus it|
|00005950| 20 72 65 66 65 72 73 0d | 74 6f 2e 20 49 66 20 4d | refers.|to. If M|
|00005960| 45 4e 55 20 72 65 73 6f | 75 72 63 65 73 20 61 72 |ENU reso|urces ar|
|00005970| 65 20 6e 6f 74 20 66 6f | 75 6e 64 2c 20 74 72 79 |e not fo|und, try|
|00005980| 20 43 4d 4e 55 20 72 65 | 73 6f 75 72 63 65 73 2e | CMNU re|sources.|
|00005990| 0d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |.-------|--------|
|000059a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000059b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000059c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000059d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000059e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 0d 76 6f 69 64 |--------|*/..void|
|000059f0| 09 09 5a 4d 65 6e 75 42 | 61 72 3a 3a 4c 6f 61 64 |..ZMenuB|ar::Load|
|00005a00| 4d 65 6e 75 28 20 63 6f | 6e 73 74 20 73 68 6f 72 |Menu( co|nst shor|
|00005a10| 74 20 6d 65 6e 75 49 44 | 2c 20 42 6f 6f 6c 65 61 |t menuID|, Boolea|
|00005a20| 6e 20 69 73 48 4d 65 6e | 75 2c 20 42 6f 6f 6c 65 |n isHMen|u, Boole|
|00005a30| 61 6e 20 61 75 74 6f 49 | 6e 73 74 61 6c 6c 20 29 |an autoI|nstall )|
|00005a40| 0d 7b 0d 09 73 68 6f 72 | 74 09 09 69 2c 20 6d 43 |.{..shor|t..i, mC|
|00005a50| 6f 75 6e 74 2c 20 63 6d | 64 43 68 61 72 2c 20 73 |ount, cm|dChar, s|
|00005a60| 75 62 49 44 3b 0d 09 4d | 65 6e 75 48 61 6e 64 6c |ubID;..M|enuHandl|
|00005a70| 65 09 6d 48 3b 0d 09 4d | 65 6e 75 43 6d 64 09 09 |e.mH;..M|enuCmd..|
|00005a80| 6d 43 6d 64 3b 0d 09 4d | 65 6e 75 49 6e 66 52 65 |mCmd;..M|enuInfRe|
|00005a90| 63 09 6d 52 65 63 3b 0d | 09 53 74 72 32 35 35 09 |c.mRec;.|.Str255.|
|00005aa0| 09 69 54 65 78 74 3b 0d | 09 0d 09 46 61 69 6c 4e |.iText;.|...FailN|
|00005ab0| 49 4c 52 65 73 28 20 6d | 48 20 3d 20 47 65 74 4d |ILRes( m|H = GetM|
|00005ac0| 65 6e 75 28 20 6d 65 6e | 75 49 44 20 29 29 3b 0d |enu( men|uID ));.|
|00005ad0| 09 0d 09 2f 2f 20 73 65 | 74 20 75 70 20 69 6e 66 |...// se|t up inf|
|00005ae0| 6f 20 72 65 63 6f 72 64 | 20 66 6f 72 20 74 68 69 |o record| for thi|
|00005af0| 73 20 6d 65 6e 75 0d 09 | 0d 09 6d 52 65 63 2e 6d |s menu..|..mRec.m|
|00005b00| 65 6e 75 49 44 20 3d 20 | 6d 65 6e 75 49 44 3b 0d |enuID = |menuID;.|
|00005b10| 09 6d 52 65 63 2e 6d 49 | 6e 64 65 78 20 3d 20 6d |.mRec.mI|ndex = m|
|00005b20| 69 53 65 65 64 2b 2b 3b | 0d 09 6d 52 65 63 2e 6d |iSeed++;|..mRec.m|
|00005b30| 61 63 4d 65 6e 75 20 3d | 20 6d 48 3b 0d 09 6d 52 |acMenu =| mH;..mR|
|00005b40| 65 63 2e 6d 44 69 6d 6d | 69 6e 67 20 3d 20 64 69 |ec.mDimm|ing = di|
|00005b50| 6d 43 6f 6d 6d 61 6e 64 | 73 3b 0d 09 6d 52 65 63 |mCommand|s;..mRec|
|00005b60| 2e 6d 49 73 52 65 73 6f | 75 72 63 65 20 3d 20 54 |.mIsReso|urce = T|
|00005b70| 52 55 45 3b 0d 09 0d 09 | 74 68 65 4d 65 6e 75 73 |RUE;....|theMenus|
|00005b80| 2d 3e 41 70 70 65 6e 64 | 49 74 65 6d 28 20 26 6d |->Append|Item( &m|
|00005b90| 52 65 63 20 29 3b 0d 09 | 0d 09 2f 2f 20 6c 6f 6f |Rec );..|..// loo|
|00005ba0| 6b 20 74 68 72 6f 75 67 | 68 20 74 68 65 20 6d 65 |k throug|h the me|
|00005bb0| 6e 75 20 66 6f 72 20 73 | 75 62 6d 65 6e 75 73 2c |nu for s|ubmenus,|
|00005bc0| 20 61 6e 64 20 72 65 63 | 75 72 73 69 76 65 6c 79 | and rec|ursively|
|00005bd0| 20 61 64 64 20 74 68 65 | 6d 0d 09 0d 09 6d 43 6f | add the|m....mCo|
|00005be0| 75 6e 74 20 3d 20 43 6f | 75 6e 74 4d 65 6e 75 49 |unt = Co|untMenuI|
|00005bf0| 74 65 6d 73 28 20 6d 48 | 20 29 3b 0d 09 0d 09 66 |tems( mH| );....f|
|00005c00| 6f 72 28 20 69 20 3d 20 | 31 3b 20 69 20 3c 3d 20 |or( i = |1; i <= |
|00005c10| 6d 43 6f 75 6e 74 3b 20 | 69 2b 2b 20 29 0d 09 7b |mCount; |i++ )..{|
|00005c20| 0d 09 09 47 65 74 4d 65 | 6e 75 49 74 65 6d 54 65 |...GetMe|nuItemTe|
|00005c30| 78 74 28 20 6d 48 2c 20 | 69 2c 20 69 54 65 78 74 |xt( mH, |i, iText|
|00005c40| 20 29 3b 0d 09 09 0d 09 | 09 69 66 20 28 20 69 54 | );.....|.if ( iT|
|00005c50| 65 78 74 5b 31 5d 20 21 | 3d 20 27 2d 27 20 29 0d |ext[1] !|= '-' ).|
|00005c60| 09 09 7b 0d 09 09 09 2f | 2f 20 6d 61 6b 65 20 61 |..{..../|/ make a|
|00005c70| 20 63 6f 6d 6d 61 6e 64 | 20 65 6e 74 72 79 20 66 | command| entry f|
|00005c80| 6f 72 20 74 68 65 20 69 | 74 65 6d 0d 09 09 09 0d |or the i|tem.....|
|00005c90| 09 09 09 6d 43 6d 64 2e | 6d 65 6e 75 49 44 20 3d |...mCmd.|menuID =|
|00005ca0| 20 6d 65 6e 75 49 44 3b | 0d 09 09 09 6d 43 6d 64 | menuID;|....mCmd|
|00005cb0| 2e 69 74 65 6d 49 44 20 | 3d 20 69 3b 0d 09 09 09 |.itemID |= i;....|
|00005cc0| 6d 43 6d 64 2e 6d 61 63 | 4d 65 6e 75 20 3d 20 6d |mCmd.mac|Menu = m|
|00005cd0| 48 3b 0d 09 09 09 0d 09 | 09 09 50 61 72 73 65 4d |H;......|..ParseM|
|00005ce0| 65 6e 75 49 74 65 6d 28 | 20 69 54 65 78 74 2c 20 |enuItem(| iText, |
|00005cf0| 26 6d 43 6d 64 2e 74 68 | 65 43 6d 64 20 29 3b 0d |&mCmd.th|eCmd );.|
|00005d00| 09 09 09 0d 09 09 09 2f | 2f 20 6d 65 6e 75 73 20 |......./|/ menus |
|00005d10| 63 72 65 61 74 65 64 20 | 75 73 69 6e 67 20 47 65 |created |using Ge|
|00005d20| 74 4d 65 6e 75 20 61 72 | 65 20 72 65 73 6f 75 72 |tMenu ar|e resour|
|00005d30| 63 65 73 2c 20 43 4d 4e | 55 20 61 72 65 20 6e 6f |ces, CMN|U are no|
|00005d40| 74 2e 20 54 68 69 73 20 | 69 73 20 66 6c 61 67 67 |t. This |is flagg|
|00005d50| 65 64 20 73 6f 0d 09 09 | 09 2f 2f 20 77 65 20 63 |ed so...|.// we c|
|00005d60| 61 6e 20 64 69 73 70 6f | 73 65 20 6f 66 20 69 74 |an dispo|se of it|
|00005d70| 20 63 6f 72 72 65 63 74 | 6c 79 2e 0d 09 09 09 0d | correct|ly......|
|00005d80| 09 09 09 6d 43 6d 64 2e | 63 6d 64 46 6c 61 67 73 |...mCmd.|cmdFlags|
|00005d90| 20 3d 20 61 75 74 6f 55 | 6e 43 68 65 63 6b 20 7c | = autoU|nCheck ||
|00005da0| 20 28 20 69 73 48 4d 65 | 6e 75 3f 20 30 20 3a 20 | ( isHMe|nu? 0 : |
|00005db0| 69 73 50 72 69 6d 61 72 | 79 4d 65 6e 75 20 29 20 |isPrimar|yMenu ) |
|00005dc0| 7c 20 6d 65 6e 75 49 73 | 52 65 73 6f 75 72 63 65 || menuIs|Resource|
|00005dd0| 3b 0d 09 09 09 6d 43 6d | 64 2e 73 75 62 4d 65 6e |;....mCm|d.subMen|
|00005de0| 75 49 44 20 3d 20 30 3b | 0d 09 09 09 0d 09 09 09 |uID = 0;|........|
|00005df0| 53 65 74 4d 65 6e 75 49 | 74 65 6d 54 65 78 74 28 |SetMenuI|temText(|
|00005e00| 20 6d 48 2c 20 69 2c 20 | 69 54 65 78 74 20 29 3b | mH, i, |iText );|
|00005e10| 0d 09 09 09 47 65 74 49 | 74 65 6d 43 6d 64 28 20 |....GetI|temCmd( |
|00005e20| 6d 48 2c 20 69 2c 20 26 | 63 6d 64 43 68 61 72 20 |mH, i, &|cmdChar |
|00005e30| 29 3b 0d 09 09 09 0d 09 | 09 09 69 66 20 28 20 63 |);......|..if ( c|
|00005e40| 6d 64 43 68 61 72 20 3d | 3d 20 68 4d 65 6e 75 43 |mdChar =|= hMenuC|
|00005e50| 6d 64 20 29 0d 09 09 09 | 7b 0d 09 09 09 09 2f 2f |md )....|{.....//|
|00005e60| 20 68 61 73 20 61 20 73 | 75 62 6d 65 6e 75 2c 20 | has a s|ubmenu, |
|00005e70| 73 6f 20 6c 6f 61 64 20 | 69 74 3a 0d 09 09 09 09 |so load |it:.....|
|00005e80| 0d 09 09 09 09 47 65 74 | 49 74 65 6d 4d 61 72 6b |.....Get|ItemMark|
|00005e90| 28 20 6d 48 2c 20 69 2c | 20 26 73 75 62 49 44 20 |( mH, i,| &subID |
|00005ea0| 29 3b 0d 09 09 09 09 0d | 09 09 09 09 2f 2f 20 6e |);......|....// n|
|00005eb0| 65 65 64 20 74 6f 20 64 | 65 74 65 72 6d 69 6e 65 |eed to d|etermine|
|00005ec0| 20 69 66 20 73 75 62 6d | 65 6e 75 20 69 73 20 61 | if subm|enu is a|
|00005ed0| 20 4d 45 4e 55 20 6f 72 | 20 43 4d 4e 55 20 72 65 | MENU or| CMNU re|
|00005ee0| 73 6f 75 72 63 65 3a 0d | 09 09 09 09 0d 09 09 09 |source:.|........|
|00005ef0| 09 48 61 6e 64 6c 65 09 | 63 6d 6e 75 48 3b 0d 09 |.Handle.|cmnuH;..|
|00005f00| 09 09 09 0d 09 09 09 09 | 63 6d 6e 75 48 20 3d 20 |........|cmnuH = |
|00005f10| 47 65 74 52 65 73 6f 75 | 72 63 65 28 20 27 43 4d |GetResou|rce( 'CM|
|00005f20| 4e 55 27 2c 20 73 75 62 | 49 44 20 29 3b 0d 09 09 |NU', sub|ID );...|
|00005f30| 09 09 0d 09 09 09 09 69 | 66 20 28 20 63 6d 6e 75 |.......i|f ( cmnu|
|00005f40| 48 20 29 0d 09 09 09 09 | 7b 0d 09 09 09 09 09 4c |H ).....|{......L|
|00005f50| 6f 61 64 43 4d 4e 55 4d | 65 6e 75 28 20 73 75 62 |oadCMNUM|enu( sub|
|00005f60| 49 44 2c 20 54 52 55 45 | 2c 20 61 75 74 6f 49 6e |ID, TRUE|, autoIn|
|00005f70| 73 74 61 6c 6c 20 29 3b | 0d 09 09 09 09 09 52 65 |stall );|......Re|
|00005f80| 6c 65 61 73 65 52 65 73 | 6f 75 72 63 65 28 20 63 |leaseRes|ource( c|
|00005f90| 6d 6e 75 48 20 29 3b 0d | 09 09 09 09 7d 0d 09 09 |mnuH );.|....}...|
|00005fa0| 09 09 65 6c 73 65 0d 09 | 09 09 09 09 4c 6f 61 64 |..else..|....Load|
|00005fb0| 4d 65 6e 75 28 20 73 75 | 62 49 44 2c 20 54 52 55 |Menu( su|bID, TRU|
|00005fc0| 45 2c 20 61 75 74 6f 49 | 6e 73 74 61 6c 6c 20 29 |E, autoI|nstall )|
|00005fd0| 3b 0d 09 09 09 09 09 0d | 09 09 09 09 6d 43 6d 64 |;.......|....mCmd|
|00005fe0| 2e 73 75 62 4d 65 6e 75 | 49 44 20 3d 20 73 75 62 |.subMenu|ID = sub|
|00005ff0| 49 44 3b 0d 09 09 09 09 | 6d 43 6d 64 2e 74 68 65 |ID;.....|mCmd.the|
|00006000| 43 6d 64 20 3d 20 70 61 | 72 65 6e 74 43 6d 64 3b |Cmd = pa|rentCmd;|
|00006010| 0d 09 09 09 7d 0d 09 09 | 09 0d 09 09 09 74 68 65 |....}...|.....the|
|00006020| 4d 65 6e 75 43 6d 64 73 | 2d 3e 41 70 70 65 6e 64 |MenuCmds|->Append|
|00006030| 49 74 65 6d 28 20 26 6d | 43 6d 64 20 29 3b 0d 09 |Item( &m|Cmd );..|
|00006040| 09 7d 0d 09 7d 0d 09 0d | 09 2f 2f 20 61 64 64 20 |.}..}...|.// add |
|00006050| 74 68 65 20 6d 65 6e 75 | 20 74 6f 20 74 68 65 20 |the menu| to the |
|00006060| 73 79 73 74 65 6d 20 6c | 69 73 74 0d 09 0d 09 69 |system l|ist....i|
|00006070| 66 20 28 20 61 75 74 6f | 49 6e 73 74 61 6c 6c 20 |f ( auto|Install |
|00006080| 29 0d 09 09 49 6e 73 65 | 72 74 4d 65 6e 75 28 20 |)...Inse|rtMenu( |
|00006090| 6d 48 2c 20 69 73 48 4d | 65 6e 75 3f 20 68 69 65 |mH, isHM|enu? hie|
|000060a0| 72 4d 65 6e 75 20 3a 20 | 30 20 29 3b 0d 7d 09 0d |rMenu : |0 );.}..|
|000060b0| 0d 2f 2a 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |./*-----|--------|
|000060c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000060d0| 2d 2d 2d 2a 2a 2a 20 20 | 4c 4f 41 44 43 4d 4e 55 |---*** |LOADCMNU|
|000060e0| 4d 45 4e 55 20 20 2a 2a | 2a 2d 2d 2d 2d 2d 2d 2d |MENU **|*-------|
|000060f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006100| 2d 2d 2d 2d 2d 2d 2d 2d | 2a 2f 0d 2f 2a 0d 64 69 |--------|*/./*.di|
|00006110| 74 74 6f 20 66 6f 72 20 | 43 4d 4e 55 20 72 65 73 |tto for |CMNU res|
|00006120| 6f 75 72 63 65 73 2d 20 | 74 68 69 73 20 63 61 6e |ources- |this can|
|00006130| 20 70 61 72 73 65 20 74 | 68 61 74 20 66 6f 72 6d | parse t|hat form|
|00006140| 61 74 20 6f 66 20 72 65 | 73 6f 75 72 63 65 2e 0d |at of re|source..|
|00006150| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006160| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006170| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006180| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00006190| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000061a0| 2d 2d 2d 2d 2d 2d 2d 2a | 2f 0d 0d 76 6f 69 64 09 |-------*|/..void.|
|000061b0| 09 5a 4d 65 6e 75 42 61 | 72 3a 3a 4c 6f 61 64 43 |.ZMenuBa|r::LoadC|
|000061c0| 4d 4e 55 4d 65 6e 75 28 | 20 63 6f 6e 73 74 20 73 |MNUMenu(| const s|
|000061d0| 68 6f 72 74 20 6d 65 6e | 75 49 44 2c 20 42 6f 6f |hort men|uID, Boo|
|000061e0| 6c 65 61 6e 20 69 73 48 | 4d 65 6e 75 2c 20 42 6f |lean isH|Menu, Bo|
|000061f0| 6f 6c 65 61 6e 20 61 75 | 74 6f 49 6e 73 74 61 6c |olean au|toInstal|
|00006200| 6c 20 29 0d 7b 0d 09 43 | 4d 4e 55 52 65 73 48 64 |l ).{..C|MNUResHd|
|00006210| 6c 09 63 48 3b 0d 09 4d | 65 6e 75 43 6d 64 09 09 |l.cH;..M|enuCmd..|
|00006220| 6d 43 6d 64 3b 0d 09 4d | 65 6e 75 49 6e 66 52 65 |mCmd;..M|enuInfRe|
|00006230| 63 09 6d 52 65 63 3b 0d | 09 4d 65 6e 75 48 61 6e |c.mRec;.|.MenuHan|
|00006240| 64 6c 65 09 6d 48 3b 0d | 09 50 74 72 09 09 09 63 |dle.mH;.|.Ptr...c|
|00006250| 6d 50 2c 20 63 6d 49 74 | 65 6d 54 65 78 74 3b 0d |mP, cmIt|emText;.|
|00006260| 09 73 68 6f 72 74 09 09 | 69 74 65 6d 49 44 3b 0d |.short..|itemID;.|
|00006270| 09 0d 09 63 48 20 3d 20 | 28 20 43 4d 4e 55 52 65 |...cH = |( CMNURe|
|00006280| 73 48 64 6c 20 29 20 47 | 65 74 52 65 73 6f 75 72 |sHdl ) G|etResour|
|00006290| 63 65 28 20 27 43 4d 4e | 55 27 2c 20 6d 65 6e 75 |ce( 'CMN|U', menu|
|000062a0| 49 44 20 29 3b 0d 09 0d | 09 69 66 20 28 20 63 48 |ID );...|.if ( cH|
|000062b0| 20 29 0d 09 7b 0d 09 09 | 2f 2f 20 77 65 20 6e 65 | )..{...|// we ne|
|000062c0| 65 64 20 74 6f 20 64 6f | 20 74 77 6f 20 74 68 69 |ed to do| two thi|
|000062d0| 6e 67 73 20 77 69 74 68 | 20 74 68 69 73 20 6d 65 |ngs with| this me|
|000062e0| 6e 75 2d 20 61 29 20 6d | 61 6b 65 20 61 20 6e 6f |nu- a) m|ake a no|
|000062f0| 72 6d 61 6c 20 6d 65 6e | 75 20 68 61 6e 64 6c 65 |rmal men|u handle|
|00006300| 20 74 68 61 74 0d 09 09 | 2f 2f 20 63 61 6e 20 62 | that...|// can b|
|00006310| 65 20 69 6e 73 65 72 74 | 65 64 20 69 6e 74 6f 20 |e insert|ed into |
|00006320| 74 68 65 20 6d 65 6e 75 | 20 6d 61 6e 61 67 65 72 |the menu| manager|
|00006330| 20 6c 69 73 74 2c 20 61 | 6e 64 20 62 29 20 61 20 | list, a|nd b) a |
|00006340| 73 65 74 20 6f 66 20 6d | 65 6e 75 43 6d 64 20 72 |set of m|enuCmd r|
|00006350| 65 63 6f 72 64 73 0d 09 | 09 2f 2f 20 73 6f 20 74 |ecords..|.// so t|
|00006360| 68 61 74 20 77 65 20 63 | 61 6e 20 6c 6f 6f 6b 20 |hat we c|an look |
|00006370| 75 70 20 74 68 65 20 63 | 6f 6d 6d 61 6e 64 20 77 |up the c|ommand w|
|00006380| 68 65 6e 20 61 6e 20 69 | 74 65 6d 20 69 73 20 63 |hen an i|tem is c|
|00006390| 68 6f 73 65 6e 2e 0d 09 | 0d 09 09 46 61 69 6c 4e |hosen...|...FailN|
|000063a0| 49 4c 28 20 6d 48 20 3d | 20 4e 65 77 4d 65 6e 75 |IL( mH =| NewMenu|
|000063b0| 28 20 6d 65 6e 75 49 44 | 2c 20 28 43 6f 6e 73 74 |( menuID|, (Const|
|000063c0| 53 74 72 32 35 35 50 61 | 72 61 6d 29 20 26 28 2a |Str255Pa|ram) &(*|
|000063d0| 63 48 29 2d 3e 6d 54 69 | 74 6c 65 20 29 29 3b 0d |cH)->mTi|tle ));.|
|000063e0| 09 09 0d 09 09 2f 2f 20 | 73 65 74 20 75 70 20 69 |.....// |set up i|
|000063f0| 6e 66 6f 20 72 65 63 6f | 72 64 20 66 6f 72 20 74 |nfo reco|rd for t|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.