home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-10-10 | 2.8 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 04 44 44 2e 63 00 00 | 00 00 00 00 00 00 00 00 |..DD.c..|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 08 68 00 | 00 01 9a ac a0 de 9d ac |......h.|........|
|00000060| a0 de 9d 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 82 c4 00 00 |........|........|
|00000080| 23 69 6e 63 6c 75 64 65 | 20 22 4d 50 44 69 61 6c |#include| "MPDial|
|00000090| 6f 67 73 2e 68 22 0d 23 | 69 6e 63 6c 75 64 65 20 |ogs.h".#|include |
|000000a0| 22 44 44 2e 68 22 0d 0d | 2f 2a 20 44 69 73 70 6c |"DD.h"..|/* Displ|
|000000b0| 61 79 20 61 20 64 69 61 | 6c 6f 67 20 77 68 69 63 |ay a dia|log whic|
|000000c0| 68 20 64 69 73 70 6c 61 | 79 73 20 74 68 65 20 76 |h displa|ys the v|
|000000d0| 61 6c 75 65 73 20 6f 66 | 20 74 68 65 20 64 69 61 |alues of| the dia|
|000000e0| 6c 6f 67 20 69 74 65 6d | 73 0d 20 2a 20 73 74 6f |log item|s. * sto|
|000000f0| 72 65 64 20 62 79 20 74 | 68 65 20 6d 75 6c 74 69 |red by t|he multi|
|00000100| 2d 70 61 6e 65 20 64 69 | 61 6c 6f 67 20 63 6f 64 |-pane di|alog cod|
|00000110| 65 0d 20 2a 2f 0d 76 6f | 69 64 20 44 69 61 6c 6f |e. */.vo|id Dialo|
|00000120| 67 44 69 73 70 6c 61 79 | 28 48 61 6e 64 6c 65 20 |gDisplay|(Handle |
|00000130| 74 68 65 44 61 74 61 29 | 0d 7b 0d 09 44 69 61 6c |theData)|.{..Dial|
|00000140| 6f 67 50 74 72 20 64 6c | 6f 67 3b 0d 09 73 68 6f |ogPtr dl|og;..sho|
|00000150| 72 74 20 69 74 65 6d 48 | 69 74 3b 0d 09 45 76 65 |rt itemH|it;..Eve|
|00000160| 6e 74 52 65 63 6f 72 64 | 20 74 68 65 45 76 65 6e |ntRecord| theEven|
|00000170| 74 3b 0d 09 44 69 61 6c | 6f 67 50 74 72 20 77 68 |t;..Dial|ogPtr wh|
|00000180| 69 63 68 44 6c 6f 67 3b | 0d 09 47 72 61 66 50 74 |ichDlog;|..GrafPt|
|00000190| 72 20 6f 6c 64 50 6f 72 | 74 3b 0d 09 0d 09 69 66 |r oldPor|t;....if|
|000001a0| 20 28 21 28 64 6c 6f 67 | 20 3d 20 47 65 74 4e 65 | (!(dlog| = GetNe|
|000001b0| 77 44 69 61 6c 6f 67 28 | 35 30 30 2c 20 4e 55 4c |wDialog(|500, NUL|
|000001c0| 4c 2c 20 28 57 69 6e 64 | 6f 77 50 74 72 29 20 2d |L, (Wind|owPtr) -|
|000001d0| 31 29 29 29 20 72 65 74 | 75 72 6e 3b 0d 09 47 65 |1))) ret|urn;..Ge|
|000001e0| 74 50 6f 72 74 28 26 6f | 6c 64 50 6f 72 74 29 3b |tPort(&o|ldPort);|
|000001f0| 0d 09 53 65 74 50 6f 72 | 74 28 64 6c 6f 67 29 3b |..SetPor|t(dlog);|
|00000200| 0d 09 54 65 78 74 46 6f | 6e 74 28 67 65 6e 65 76 |..TextFo|nt(genev|
|00000210| 61 29 3b 0d 09 53 68 6f | 77 57 69 6e 64 6f 77 28 |a);..Sho|wWindow(|
|00000220| 64 6c 6f 67 29 3b 0d 09 | 0d 09 64 6f 20 7b 0d 09 |dlog);..|..do {..|
|00000230| 09 69 66 28 21 47 65 74 | 4e 65 78 74 45 76 65 6e |.if(!Get|NextEven|
|00000240| 74 28 65 76 65 72 79 45 | 76 65 6e 74 2c 20 26 74 |t(everyE|vent, &t|
|00000250| 68 65 45 76 65 6e 74 29 | 29 20 63 6f 6e 74 69 6e |heEvent)|) contin|
|00000260| 75 65 3b 0d 09 09 69 66 | 28 21 49 73 44 69 61 6c |ue;...if|(!IsDial|
|00000270| 6f 67 45 76 65 6e 74 28 | 26 74 68 65 45 76 65 6e |ogEvent(|&theEven|
|00000280| 74 29 29 20 63 6f 6e 74 | 69 6e 75 65 3b 0d 09 09 |t)) cont|inue;...|
|00000290| 28 76 6f 69 64 29 20 44 | 69 61 6c 6f 67 53 65 6c |(void) D|ialogSel|
|000002a0| 65 63 74 28 26 74 68 65 | 45 76 65 6e 74 2c 20 26 |ect(&the|Event, &|
|000002b0| 77 68 69 63 68 44 6c 6f | 67 2c 20 26 69 74 65 6d |whichDlo|g, &item|
|000002c0| 48 69 74 29 3b 0d 09 09 | 0d 09 09 2f 2f 20 55 70 |Hit);...|...// Up|
|000002d0| 64 61 74 65 20 74 68 65 | 20 64 69 73 70 6c 61 79 |date the| display|
|000002e0| 20 6f 66 20 74 68 65 20 | 64 69 61 6c 6f 67 2e 0d | of the |dialog..|
|000002f0| 09 09 69 66 20 28 74 68 | 65 45 76 65 6e 74 2e 77 |..if (th|eEvent.w|
|00000300| 68 61 74 20 3d 3d 20 75 | 70 64 61 74 65 45 76 74 |hat == u|pdateEvt|
|00000310| 20 26 26 20 77 68 69 63 | 68 44 6c 6f 67 20 3d 3d | && whic|hDlog ==|
|00000320| 20 64 6c 6f 67 29 0d 09 | 09 09 44 6f 55 70 64 61 | dlog)..|..DoUpda|
|00000330| 74 65 28 64 6c 6f 67 2c | 20 74 68 65 44 61 74 61 |te(dlog,| theData|
|00000340| 29 3b 0d 09 09 0d 09 09 | 2f 2f 20 49 66 20 74 68 |);......|// If th|
|00000350| 65 20 75 73 65 72 20 63 | 68 61 6e 67 65 64 20 76 |e user c|hanged v|
|00000360| 69 65 77 73 2c 20 73 65 | 74 20 69 74 20 75 70 20 |iews, se|t it up |
|00000370| 66 6f 72 20 72 65 64 72 | 61 77 0d 09 09 69 66 20 |for redr|aw...if |
|00000380| 28 69 74 65 6d 48 69 74 | 20 3d 3d 20 32 29 0d 09 |(itemHit| == 2)..|
|00000390| 09 09 49 6e 76 61 6c 52 | 65 63 74 28 26 64 6c 6f |..InvalR|ect(&dlo|
|000003a0| 67 2d 3e 70 6f 72 74 52 | 65 63 74 29 3b 0d 09 7d |g->portR|ect);..}|
|000003b0| 20 77 68 69 6c 65 20 28 | 69 74 65 6d 48 69 74 20 | while (|itemHit |
|000003c0| 21 3d 20 31 29 3b 0d 09 | 0d 09 44 69 73 70 6f 73 |!= 1);..|..Dispos|
|000003d0| 65 44 69 61 6c 6f 67 28 | 64 6c 6f 67 29 3b 0d 09 |eDialog(|dlog);..|
|000003e0| 53 65 74 50 6f 72 74 28 | 6f 6c 64 50 6f 72 74 29 |SetPort(|oldPort)|
|000003f0| 3b 0d 7d 0d 0d 2f 2a 20 | 44 72 61 77 20 74 68 65 |;.}../* |Draw the|
|00000400| 20 64 69 61 6c 6f 67 27 | 73 20 63 6f 6e 74 65 6e | dialog'|s conten|
|00000410| 74 73 2e 0d 20 2a 2f 0d | 76 6f 69 64 20 44 6f 55 |ts.. */.|void DoU|
|00000420| 70 64 61 74 65 28 44 69 | 61 6c 6f 67 50 74 72 20 |pdate(Di|alogPtr |
|00000430| 64 6c 6f 67 2c 20 48 61 | 6e 64 6c 65 20 74 68 65 |dlog, Ha|ndle the|
|00000440| 44 61 74 61 29 0d 7b 0d | 09 73 68 6f 72 74 20 69 |Data).{.|.short i|
|00000450| 2c 20 69 54 79 70 65 2c | 20 70 61 6e 65 2c 20 76 |, iType,| pane, v|
|00000460| 61 6c 2c 20 65 72 72 3b | 0d 09 48 61 6e 64 6c 65 |al, err;|..Handle|
|00000470| 20 69 48 61 6e 64 6c 65 | 3b 0d 09 52 65 63 74 20 | iHandle|;..Rect |
|00000480| 69 52 65 63 74 3b 0d 09 | 53 74 72 32 35 35 20 74 |iRect;..|Str255 t|
|00000490| 68 65 53 74 72 3b 0d 09 | 0d 09 70 61 6e 65 20 3d |heStr;..|..pane =|
|000004a0| 20 47 65 74 44 69 61 6c | 6f 67 49 74 65 6d 56 61 | GetDial|ogItemVa|
|000004b0| 6c 75 65 28 64 6c 6f 67 | 2c 20 32 29 3b 0d 09 66 |lue(dlog|, 2);..f|
|000004c0| 6f 72 28 69 3d 30 3b 20 | 69 3c 31 32 3b 20 69 2b |or(i=0; |i<12; i+|
|000004d0| 2b 29 20 7b 0d 09 09 2f | 2f 20 44 72 61 77 20 69 |+) {.../|/ Draw i|
|000004e0| 74 65 6d 20 6e 75 6d 62 | 65 72 0d 09 09 47 65 74 |tem numb|er...Get|
|000004f0| 44 49 74 65 6d 28 64 6c | 6f 67 2c 20 69 2a 32 2b |DItem(dl|og, i*2+|
|00000500| 33 2c 20 26 69 54 79 70 | 65 2c 20 26 69 48 61 6e |3, &iTyp|e, &iHan|
|00000510| 64 6c 65 2c 20 26 69 52 | 65 63 74 29 3b 0d 09 09 |dle, &iR|ect);...|
|00000520| 4e 75 6d 54 6f 53 74 72 | 69 6e 67 28 69 2b 31 2c |NumToStr|ing(i+1,|
|00000530| 20 74 68 65 53 74 72 29 | 3b 0d 09 09 54 65 78 74 | theStr)|;...Text|
|00000540| 42 6f 78 28 26 74 68 65 | 53 74 72 5b 31 5d 2c 20 |Box(&the|Str[1], |
|00000550| 74 68 65 53 74 72 5b 30 | 5d 2c 20 26 69 52 65 63 |theStr[0|], &iRec|
|00000560| 74 2c 20 30 29 3b 0d 0d | 09 09 2f 2f 20 44 72 61 |t, 0);..|..// Dra|
|00000570| 77 20 76 61 6c 75 65 20 | 6f 66 20 74 68 65 20 69 |w value |of the i|
|00000580| 74 65 6d 2c 20 6f 72 20 | 61 20 6d 65 73 73 61 67 |tem, or |a messag|
|00000590| 65 20 69 66 20 61 6e 20 | 65 72 72 6f 72 20 77 61 |e if an |error wa|
|000005a0| 73 20 72 65 74 75 72 6e | 65 64 0d 09 09 47 65 74 |s return|ed...Get|
|000005b0| 44 49 74 65 6d 28 64 6c | 6f 67 2c 20 69 2a 32 2b |DItem(dl|og, i*2+|
|000005c0| 34 2c 20 26 69 54 79 70 | 65 2c 20 26 69 48 61 6e |4, &iTyp|e, &iHan|
|000005d0| 64 6c 65 2c 20 26 69 52 | 65 63 74 29 3b 0d 09 09 |dle, &iR|ect);...|
|000005e0| 69 66 20 28 65 72 72 20 | 3d 20 47 65 74 4d 50 44 |if (err |= GetMPD|
|000005f0| 49 74 65 6d 28 74 68 65 | 44 61 74 61 2c 20 70 61 |Item(the|Data, pa|
|00000600| 6e 65 2c 20 69 2b 31 2c | 20 28 63 68 61 72 20 2a |ne, i+1,| (char *|
|00000610| 29 20 26 76 61 6c 2c 20 | 73 69 7a 65 6f 66 28 73 |) &val, |sizeof(s|
|00000620| 68 6f 72 74 29 29 29 20 | 7b 0d 09 09 09 2f 2f 20 |hort))) |{....// |
|00000630| 48 61 6e 64 6c 65 20 74 | 68 61 74 20 73 74 72 69 |Handle t|hat stri|
|00000640| 6e 67 20 70 72 65 66 65 | 72 65 6e 63 65 0d 09 09 |ng prefe|rence...|
|00000650| 09 69 66 20 28 65 72 72 | 20 3d 3d 20 6b 65 57 72 |.if (err| == keWr|
|00000660| 6f 6e 67 53 69 7a 65 29 | 20 7b 0d 09 09 09 09 6c |ongSize)| {.....l|
|00000670| 6f 6e 67 20 6c 76 61 6c | 3b 0d 09 09 09 09 69 66 |ong lval|;.....if|
|00000680| 20 28 21 28 65 72 72 20 | 3d 20 47 65 74 4d 50 44 | (!(err |= GetMPD|
|00000690| 49 74 65 6d 28 74 68 65 | 44 61 74 61 2c 20 70 61 |Item(the|Data, pa|
|000006a0| 6e 65 2c 20 69 2b 31 2c | 20 28 63 68 61 72 20 2a |ne, i+1,| (char *|
|000006b0| 29 20 26 6c 76 61 6c 2c | 20 73 69 7a 65 6f 66 28 |) &lval,| sizeof(|
|000006c0| 6c 6f 6e 67 29 29 29 29 | 20 7b 0d 09 09 09 09 09 |long))))| {......|
|000006d0| 4e 75 6d 54 6f 53 74 72 | 69 6e 67 28 6c 76 61 6c |NumToStr|ing(lval|
|000006e0| 2c 20 74 68 65 53 74 72 | 29 3b 0d 09 09 09 09 7d |, theStr|);.....}|
|000006f0| 20 65 6c 73 65 20 69 66 | 20 28 65 72 72 20 3d 3d | else if| (err ==|
|00000700| 20 6b 65 57 72 6f 6e 67 | 53 69 7a 65 29 20 7b 0d | keWrong|Size) {.|
|00000710| 09 09 09 09 09 65 72 72 | 20 3d 20 47 65 74 4d 50 |.....err| = GetMP|
|00000720| 44 49 74 65 6d 28 74 68 | 65 44 61 74 61 2c 20 70 |DItem(th|eData, p|
|00000730| 61 6e 65 2c 20 69 2b 31 | 2c 20 28 63 68 61 72 20 |ane, i+1|, (char |
|00000740| 2a 29 20 74 68 65 53 74 | 72 2c 20 73 69 7a 65 6f |*) theSt|r, sizeo|
|00000750| 66 28 53 74 72 32 35 35 | 29 29 3b 0d 09 09 09 09 |f(Str255|));.....|
|00000760| 7d 0d 09 09 09 7d 0d 09 | 09 09 73 77 69 74 63 68 |}....}..|..switch|
|00000770| 28 65 72 72 29 20 7b 0d | 09 09 09 09 63 61 73 65 |(err) {.|....case|
|00000780| 20 6b 65 4e 75 6c 6c 44 | 61 74 61 3a 0d 09 09 09 | keNullD|ata:....|
|00000790| 09 09 50 73 74 72 63 70 | 79 28 74 68 65 53 74 72 |..Pstrcp|y(theStr|
|000007a0| 2c 20 22 5c 70 4e 75 6c | 6c 20 50 74 72 21 22 29 |, "\pNul|l Ptr!")|
|000007b0| 3b 0d 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |;......b|reak;...|
|000007c0| 09 09 63 61 73 65 20 6b | 65 42 61 64 50 61 6e 65 |..case k|eBadPane|
|000007d0| 3a 0d 09 09 09 09 09 50 | 73 74 72 63 70 79 28 74 |:......P|strcpy(t|
|000007e0| 68 65 53 74 72 2c 20 22 | 5c 70 42 61 64 20 50 61 |heStr, "|\pBad Pa|
|000007f0| 6e 65 22 29 3b 0d 09 09 | 09 09 09 62 72 65 61 6b |ne");...|...break|
|00000800| 3b 0d 09 09 09 09 63 61 | 73 65 20 6b 65 42 61 64 |;.....ca|se keBad|
|00000810| 49 74 65 6d 3a 0d 09 09 | 09 09 09 50 73 74 72 63 |Item:...|...Pstrc|
|00000820| 70 79 28 74 68 65 53 74 | 72 2c 20 22 5c 70 42 61 |py(theSt|r, "\pBa|
|00000830| 64 20 49 74 65 6d 22 29 | 3b 0d 09 09 09 09 09 62 |d Item")|;......b|
|00000840| 72 65 61 6b 3b 0d 09 09 | 09 09 63 61 73 65 20 6b |reak;...|..case k|
|00000850| 65 57 72 6f 6e 67 53 69 | 7a 65 3a 0d 09 09 09 09 |eWrongSi|ze:.....|
|00000860| 09 50 73 74 72 63 70 79 | 28 74 68 65 53 74 72 2c |.Pstrcpy|(theStr,|
|00000870| 20 22 5c 70 57 72 6f 6e | 67 20 53 69 7a 65 22 29 | "\pWron|g Size")|
|00000880| 3b 0d 09 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |;......b|reak;...|
|00000890| 09 7d 0d 09 09 7d 20 65 | 6c 73 65 20 4e 75 6d 54 |.}...} e|lse NumT|
|000008a0| 6f 53 74 72 69 6e 67 28 | 76 61 6c 2c 20 74 68 65 |oString(|val, the|
|000008b0| 53 74 72 29 3b 0d 09 09 | 54 65 78 74 42 6f 78 28 |Str);...|TextBox(|
|000008c0| 26 74 68 65 53 74 72 5b | 31 5d 2c 20 74 68 65 53 |&theStr[|1], theS|
|000008d0| 74 72 5b 30 5d 2c 20 26 | 69 52 65 63 74 2c 20 30 |tr[0], &|iRect, 0|
|000008e0| 29 3b 0d 09 7d 0d 7d 0d | 00 00 00 00 00 00 00 00 |);..}.}.|........|
|000008f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000900| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000910| 00 7f ff fe 00 ff ff ff | 00 ff ff ff 00 ff ff ff |........|........|
|00000920| 00 ff ff ff 00 ff ff ff | 00 ff ff ff 00 ff ff ff |........|........|
|00000930| 04 44 44 2e 63 81 02 00 | 00 00 54 45 58 54 4d 4d |.DD.c...|..TEXTMM|
|00000940| 43 43 01 00 00 00 00 40 | 00 00 00 00 05 60 00 00 |CC.....@|.....`..|
|00000950| 00 00 54 45 58 54 4d 4d | 43 43 01 00 00 00 00 40 |..TEXTMM|CC.....@|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 aa 5b 1e a3 00 00 | 08 68 00 00 01 9a 00 00 |...[....|.h......|
|00000980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000990| 00 00 00 00 00 7f ff fe | 00 ff ff fd 00 c0 00 01 |........|........|
|000009a0| 00 c6 00 01 00 ce ff f1 | 00 ca 80 11 00 c2 b6 d1 |........|........|
|000009b0| 00 c6 80 11 00 ce b6 d1 | 00 ca 80 11 00 c2 b6 d1 |........|........|
|000009c0| 00 c6 80 11 00 ce ff f1 | 00 ce 00 01 00 c0 00 01 |........|........|
|000009d0| 00 c0 00 01 00 80 00 01 | 00 7f ff fe 00 00 00 00 |........|........|
|000009e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000009f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a00| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000a20| 00 00 00 00 00 00 00 03 | 00 04 00 57 00 0a 01 f1 |........|...W....|
|00000a30| 02 80 00 57 00 0a 01 f1 | 02 80 ac a0 a6 64 00 00 |...W....|.....d..|
|00000a40| 04 2a 00 00 04 2a 00 00 | 03 0f 01 00 00 00 00 04 |.*...*..|........|
|00000a50| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|00000a60| 00 00 00 46 00 c6 f4 e4 | 14 34 00 00 00 1c 00 46 |...F....|.4.....F|
|00000a70| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000a80| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000a90| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00000aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+