home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [R*ch] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 53 74 61 6e 64 61 72 |\section|{Standar|
|00000010| 64 20 6d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |d module| \sectco|
|00000020| 64 65 7b 45 61 73 79 44 | 69 61 6c 6f 67 73 7d 7d |de{EasyD|ialogs}}|
|00000030| 0d 5c 73 74 6d 6f 64 69 | 6e 64 65 78 7b 45 61 73 |.\stmodi|ndex{Eas|
|00000040| 79 44 69 61 6c 6f 67 73 | 7d 0d 0d 54 68 65 20 5c |yDialogs|}..The \|
|00000050| 63 6f 64 65 7b 45 61 73 | 79 44 69 61 6c 6f 67 73 |code{Eas|yDialogs|
|00000060| 7d 20 6d 6f 64 75 6c 65 | 20 63 6f 6e 74 61 69 6e |} module| contain|
|00000070| 73 20 73 6f 6d 65 20 73 | 69 6d 70 6c 65 20 64 69 |s some s|imple di|
|00000080| 61 6c 6f 67 73 20 66 6f | 72 0d 74 68 65 20 4d 61 |alogs fo|r.the Ma|
|00000090| 63 69 6e 74 6f 73 68 2c | 20 6d 6f 64 65 6c 6c 65 |cintosh,| modelle|
|000000a0| 64 20 61 66 74 65 72 20 | 74 68 65 20 5c 63 6f 64 |d after |the \cod|
|000000b0| 65 7b 73 74 64 77 69 6e | 7d 20 64 69 61 6c 6f 67 |e{stdwin|} dialog|
|000000c0| 73 20 77 69 74 68 20 73 | 69 6d 69 6c 61 72 0d 6e |s with s|imilar.n|
|000000d0| 61 6d 65 73 2e 0d 0d 54 | 68 65 20 5c 63 6f 64 65 |ames...T|he \code|
|000000e0| 7b 45 61 73 79 44 69 61 | 6c 6f 67 73 7d 20 6d 6f |{EasyDia|logs} mo|
|000000f0| 64 75 6c 65 20 64 65 66 | 69 6e 65 73 20 74 68 65 |dule def|ines the|
|00000100| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 66 75 6e 63 74 | followi|ng funct|
|00000110| 69 6f 6e 73 3a 0d 0d 5c | 72 65 6e 65 77 63 6f 6d |ions:..\|renewcom|
|00000120| 6d 61 6e 64 7b 5c 69 6e | 64 65 78 73 75 62 69 74 |mand{\in|dexsubit|
|00000130| 65 6d 7d 7b 28 69 6e 20 | 6d 6f 64 75 6c 65 20 45 |em}{(in |module E|
|00000140| 61 73 79 44 69 61 6c 6f | 67 73 29 7d 0d 0d 5c 62 |asyDialo|gs)}..\b|
|00000150| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 4d |egin{fun|cdesc}{M|
|00000160| 65 73 73 61 67 65 7d 7b | 73 74 72 7d 0d 41 20 6d |essage}{|str}.A m|
|00000170| 6f 64 61 6c 20 64 69 61 | 6c 6f 67 20 77 69 74 68 |odal dia|log with|
|00000180| 20 74 68 65 20 6d 65 73 | 73 61 67 65 20 74 65 78 | the mes|sage tex|
|00000190| 74 20 5c 76 61 72 7b 73 | 74 72 7d 2c 20 77 68 69 |t \var{s|tr}, whi|
|000001a0| 63 68 20 73 68 6f 75 6c | 64 20 62 65 20 61 74 0d |ch shoul|d be at.|
|000001b0| 6d 6f 73 74 20 32 35 35 | 20 63 68 61 72 61 63 74 |most 255| charact|
|000001c0| 65 72 73 20 6c 6f 6e 67 | 2c 20 69 73 20 64 69 73 |ers long|, is dis|
|000001d0| 70 6c 61 79 65 64 2e 20 | 43 6f 6e 74 72 6f 6c 20 |played. |Control |
|000001e0| 69 73 20 72 65 74 75 72 | 6e 65 64 20 77 68 65 6e |is retur|ned when|
|000001f0| 20 74 68 65 0d 75 73 65 | 72 20 63 6c 69 63 6b 73 | the.use|r clicks|
|00000200| 20 60 60 4f 4b 27 27 2e | 0d 5c 65 6e 64 7b 66 75 | ``OK''.|.\end{fu|
|00000210| 6e 63 64 65 73 63 7d 0d | 0d 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00000220| 66 75 6e 63 64 65 73 63 | 7d 7b 41 73 6b 53 74 72 |funcdesc|}{AskStr|
|00000230| 69 6e 67 7d 7b 70 72 6f | 6d 70 74 5c 6f 70 74 69 |ing}{pro|mpt\opti|
|00000240| 6f 6e 61 6c 7b 5c 2c 20 | 64 65 66 61 75 6c 74 7d |onal{\, |default}|
|00000250| 7d 0d 41 73 6b 20 74 68 | 65 20 75 73 65 72 20 74 |}.Ask th|e user t|
|00000260| 6f 20 69 6e 70 75 74 20 | 61 20 73 74 72 69 6e 67 |o input |a string|
|00000270| 20 76 61 6c 75 65 2c 20 | 69 6e 20 61 20 6d 6f 64 | value, |in a mod|
|00000280| 61 6c 20 64 69 61 6c 6f | 67 2e 20 5c 76 61 72 7b |al dialo|g. \var{|
|00000290| 50 72 6f 6d 70 74 7d 0d | 69 73 20 74 68 65 20 70 |Prompt}.|is the p|
|000002a0| 72 6f 6d 74 20 6d 65 73 | 73 61 67 65 2c 20 74 68 |romt mes|sage, th|
|000002b0| 65 20 6f 70 74 69 6f 6e | 61 6c 20 5c 76 61 72 7b |e option|al \var{|
|000002c0| 64 65 66 61 75 6c 74 7d | 20 61 72 67 20 69 73 20 |default}| arg is |
|000002d0| 74 68 65 20 69 6e 69 74 | 69 61 6c 0d 76 61 6c 75 |the init|ial.valu|
|000002e0| 65 20 66 6f 72 20 74 68 | 65 20 73 74 72 69 6e 67 |e for th|e string|
|000002f0| 2e 20 41 6c 6c 20 73 74 | 72 69 6e 67 73 20 63 61 |. All st|rings ca|
|00000300| 6e 20 62 65 20 61 74 20 | 6d 6f 73 74 20 32 35 35 |n be at |most 255|
|00000310| 20 62 79 74 65 73 0d 6c | 6f 6e 67 2e 20 5c 76 61 | bytes.l|ong. \va|
|00000320| 72 7b 41 73 6b 53 74 72 | 69 6e 67 7d 20 72 65 74 |r{AskStr|ing} ret|
|00000330| 75 72 6e 73 20 74 68 65 | 20 73 74 72 69 6e 67 20 |urns the| string |
|00000340| 65 6e 74 65 72 65 64 20 | 6f 72 20 5c 63 6f 64 65 |entered |or \code|
|00000350| 7b 4e 6f 6e 65 7d 20 69 | 6e 0d 63 61 73 65 20 74 |{None} i|n.case t|
|00000360| 68 65 20 75 73 65 72 20 | 63 61 6e 63 65 6c 6c 65 |he user |cancelle|
|00000370| 64 2e 0d 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |d..\end{|funcdesc|
|00000380| 7d 0d 0d 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|00000390| 73 63 7d 7b 41 73 6b 59 | 65 73 4e 6f 43 61 6e 63 |sc}{AskY|esNoCanc|
|000003a0| 65 6c 7d 7b 71 75 65 73 | 74 69 6f 6e 5c 6f 70 74 |el}{ques|tion\opt|
|000003b0| 69 6f 6e 61 6c 7b 5c 2c | 20 64 65 66 61 75 6c 74 |ional{\,| default|
|000003c0| 7d 7d 0d 50 72 65 73 65 | 6e 74 20 61 20 64 69 61 |}}.Prese|nt a dia|
|000003d0| 6c 6f 67 20 77 69 74 68 | 20 74 65 78 74 20 5c 76 |log with| text \v|
|000003e0| 61 72 7b 71 75 65 73 74 | 69 6f 6e 7d 20 61 6e 64 |ar{quest|ion} and|
|000003f0| 20 74 68 72 65 65 20 62 | 75 74 74 6f 6e 73 20 6c | three b|uttons l|
|00000400| 61 62 65 6c 6c 65 64 0d | 60 60 79 65 73 27 27 2c |abelled.|``yes'',|
|00000410| 20 60 60 6e 6f 27 27 20 | 61 6e 64 20 60 60 63 61 | ``no'' |and ``ca|
|00000420| 6e 63 65 6c 27 27 2e 20 | 52 65 74 75 72 6e 20 5c |ncel''. |Return \|
|00000430| 63 6f 64 65 7b 31 7d 20 | 66 6f 72 20 79 65 73 2c |code{1} |for yes,|
|00000440| 20 5c 63 6f 64 65 7b 30 | 7d 20 66 6f 72 0d 6e 6f | \code{0|} for.no|
|00000450| 20 61 6e 64 20 5c 63 6f | 64 65 7b 2d 31 7d 20 66 | and \co|de{-1} f|
|00000460| 6f 72 20 63 61 6e 63 65 | 6c 2e 20 54 68 65 20 64 |or cance|l. The d|
|00000470| 65 66 61 75 6c 74 20 72 | 65 74 75 72 6e 20 76 61 |efault r|eturn va|
|00000480| 6c 75 65 20 63 68 6f 73 | 65 6e 20 62 79 0d 68 69 |lue chos|en by.hi|
|00000490| 74 74 69 6e 67 20 72 65 | 74 75 72 6e 20 69 73 20 |tting re|turn is |
|000004a0| 5c 63 6f 64 65 7b 30 7d | 2e 20 54 68 69 73 20 63 |\code{0}|. This c|
|000004b0| 61 6e 20 62 65 20 63 68 | 61 6e 67 65 64 20 77 69 |an be ch|anged wi|
|000004c0| 74 68 20 74 68 65 20 6f | 70 74 69 6f 6e 61 6c 0d |th the o|ptional.|
|000004d0| 5c 76 61 72 7b 64 65 66 | 61 75 6c 74 7d 20 61 72 |\var{def|ault} ar|
|000004e0| 67 75 6d 65 6e 74 2e 0d | 5c 65 6e 64 7b 66 75 6e |gument..|\end{fun|
|000004f0| 63 64 65 73 63 7d 0d 0d | 4e 6f 74 65 20 74 68 61 |cdesc}..|Note tha|
|00000500| 74 20 5c 63 6f 64 65 7b | 45 61 73 79 44 69 61 6c |t \code{|EasyDial|
|00000510| 6f 67 73 7d 20 64 6f 65 | 73 20 6e 6f 74 20 63 75 |ogs} doe|s not cu|
|00000520| 72 72 65 6e 74 6c 79 20 | 75 73 65 20 74 68 65 20 |rrently |use the |
|00000530| 6e 6f 74 69 66 69 63 61 | 74 69 6f 6e 0d 6d 61 6e |notifica|tion.man|
|00000540| 61 67 65 72 2e 20 54 68 | 69 73 20 6d 65 61 6e 73 |ager. Th|is means|
|00000550| 20 74 68 61 74 20 64 69 | 73 70 6c 61 79 69 6e 67 | that di|splaying|
|00000560| 20 64 69 61 6c 6f 67 73 | 20 77 68 69 6c 65 20 74 | dialogs| while t|
|00000570| 68 65 20 70 72 6f 67 72 | 61 6d 20 69 73 20 69 6e |he progr|am is in|
|00000580| 0d 74 68 65 20 62 61 63 | 6b 67 72 6f 75 6e 64 20 |.the bac|kground |
|00000590| 77 69 6c 6c 20 6e 65 65 | 64 20 74 6f 20 75 6e 65 |will nee|d to une|
|000005a0| 78 70 65 63 74 65 64 20 | 72 65 73 75 6c 74 73 20 |xpected |results |
|000005b0| 61 6e 64 20 70 6f 73 73 | 69 62 6c 79 20 63 72 61 |and poss|ibly cra|
|000005c0| 73 68 65 73 2e 0d 0d 0d | 5c 73 65 63 74 69 6f 6e |shes....|\section|
|000005d0| 7b 53 74 61 6e 64 61 72 | 64 20 6d 6f 64 75 6c 65 |{Standar|d module|
|000005e0| 20 5c 73 65 63 74 63 6f | 64 65 7b 46 72 61 6d 65 | \sectco|de{Frame|
|000005f0| 57 6f 72 6b 7d 7d 0d 5c | 73 74 6d 6f 64 69 6e 64 |Work}}.\|stmodind|
|00000600| 65 78 7b 46 72 61 6d 65 | 57 6f 72 6b 7d 0d 0d 54 |ex{Frame|Work}..T|
|00000610| 68 65 20 5c 63 6f 64 65 | 7b 46 72 61 6d 65 57 6f |he \code|{FrameWo|
|00000620| 72 6b 7d 20 6d 6f 64 75 | 6c 65 20 63 6f 6e 74 61 |rk} modu|le conta|
|00000630| 69 6e 73 20 63 6c 61 73 | 73 65 73 20 74 68 61 74 |ins clas|ses that|
|00000640| 20 74 6f 67 65 74 68 65 | 72 20 70 72 6f 76 69 64 | togethe|r provid|
|00000650| 65 20 61 0d 66 72 61 6d | 65 77 6f 72 6b 20 66 6f |e a.fram|ework fo|
|00000660| 72 20 61 6e 20 69 6e 74 | 65 72 61 63 74 69 76 65 |r an int|eractive|
|00000670| 20 4d 61 63 69 6e 74 6f | 73 68 20 61 70 70 6c 69 | Macinto|sh appli|
|00000680| 63 61 74 69 6f 6e 2e 20 | 54 68 65 20 70 72 6f 67 |cation. |The prog|
|00000690| 72 61 6d 6d 65 72 0d 62 | 75 69 6c 64 73 20 61 6e |rammer.b|uilds an|
|000006a0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 62 79 20 | applica|tion by |
|000006b0| 63 72 65 61 74 69 6e 67 | 20 73 75 62 63 6c 61 73 |creating| subclas|
|000006c0| 73 65 73 20 74 68 61 74 | 20 6f 76 65 72 72 69 64 |ses that| overrid|
|000006d0| 65 20 76 61 72 69 6f 75 | 73 0d 6d 65 74 68 6f 64 |e variou|s.method|
|000006e0| 73 20 6f 66 20 74 68 65 | 20 62 61 73 65 73 20 63 |s of the| bases c|
|000006f0| 6c 61 73 73 65 73 2c 20 | 74 68 65 72 65 62 79 20 |lasses, |thereby |
|00000700| 69 6d 70 6c 65 6d 65 6e | 74 69 6e 67 20 74 68 65 |implemen|ting the|
|00000710| 20 66 75 6e 63 74 69 6f | 6e 61 6c 69 74 79 0d 77 | functio|nality.w|
|00000720| 61 6e 74 65 64 2e 20 4f | 76 65 72 72 69 64 69 6e |anted. O|verridin|
|00000730| 67 20 66 75 6e 63 74 69 | 6f 6e 61 6c 69 74 79 20 |g functi|onality |
|00000740| 63 61 6e 20 6f 66 74 65 | 6e 20 62 65 20 64 6f 6e |can ofte|n be don|
|00000750| 65 20 6f 6e 20 76 61 72 | 69 6f 75 73 0d 64 69 66 |e on var|ious.dif|
|00000760| 66 65 72 65 6e 74 20 6c | 65 76 65 6c 73 2c 20 69 |ferent l|evels, i|
|00000770| 2e 65 2e 20 74 6f 20 68 | 61 6e 64 6c 65 20 63 6c |.e. to h|andle cl|
|00000780| 69 63 6b 73 20 69 6e 20 | 61 20 73 69 6e 67 6c 65 |icks in |a single|
|00000790| 20 64 69 61 6c 6f 67 20 | 77 69 6e 64 6f 77 20 69 | dialog |window i|
|000007a0| 6e 20 61 0d 6e 6f 6e 2d | 73 74 61 6e 64 61 72 64 |n a.non-|standard|
|000007b0| 20 77 61 79 20 69 74 20 | 69 73 20 6e 6f 74 20 6e | way it |is not n|
|000007c0| 65 63 65 73 73 61 72 79 | 20 74 6f 20 6f 76 65 72 |ecessary| to over|
|000007d0| 72 69 64 65 20 74 68 65 | 20 63 6f 6d 70 6c 65 74 |ride the| complet|
|000007e0| 65 20 65 76 65 6e 74 0d | 68 61 6e 64 6c 69 6e 67 |e event.|handling|
|000007f0| 2e 0d 0d 54 68 65 20 5c | 63 6f 64 65 7b 46 72 61 |...The \|code{Fra|
|00000800| 6d 65 57 6f 72 6b 7d 20 | 69 73 20 73 74 69 6c 6c |meWork} |is still|
|00000810| 20 76 65 72 79 20 6d 75 | 63 68 20 77 6f 72 6b 2d | very mu|ch work-|
|00000820| 69 6e 2d 70 72 6f 67 72 | 65 73 73 2c 20 61 6e 64 |in-progr|ess, and|
|00000830| 20 74 68 65 0d 64 6f 63 | 75 6d 65 6e 74 61 74 69 | the.doc|umentati|
|00000840| 6f 6e 20 64 65 73 63 72 | 69 62 65 73 20 6f 6e 6c |on descr|ibes onl|
|00000850| 79 20 74 68 65 20 6d 6f | 73 74 20 69 6d 70 6f 72 |y the mo|st impor|
|00000860| 74 61 6e 74 20 66 75 6e | 63 74 69 6f 6e 61 6c 69 |tant fun|ctionali|
|00000870| 74 79 2c 20 61 6e 64 20 | 6e 6f 74 0d 69 6e 20 74 |ty, and |not.in t|
|00000880| 68 65 20 6d 6f 73 74 20 | 6c 6f 67 69 63 61 6c 20 |he most |logical |
|00000890| 6d 61 6e 6e 65 72 20 61 | 74 20 74 68 61 74 2e 20 |manner a|t that. |
|000008a0| 45 78 61 6d 69 6e 65 20 | 74 68 65 20 73 6f 75 72 |Examine |the sour|
|000008b0| 63 65 20 66 6f 72 20 6d | 6f 72 65 0d 65 73 6f 74 |ce for m|ore.esot|
|000008c0| 65 72 69 63 20 6e 65 65 | 64 73 2e 20 0d 0d 54 68 |eric nee|ds. ..Th|
|000008d0| 65 20 5c 63 6f 64 65 7b | 45 61 73 79 44 69 61 6c |e \code{|EasyDial|
|000008e0| 6f 67 73 7d 20 6d 6f 64 | 75 6c 65 20 64 65 66 69 |ogs} mod|ule defi|
|000008f0| 6e 65 73 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |nes the |followin|
|00000900| 67 20 66 75 6e 63 74 69 | 6f 6e 73 3a 0d 0d 5c 72 |g functi|ons:..\r|
|00000910| 65 6e 65 77 63 6f 6d 6d | 61 6e 64 7b 5c 69 6e 64 |enewcomm|and{\ind|
|00000920| 65 78 73 75 62 69 74 65 | 6d 7d 7b 28 69 6e 20 6d |exsubite|m}{(in m|
|00000930| 6f 64 75 6c 65 20 46 72 | 61 6d 65 57 6f 72 6b 29 |odule Fr|ameWork)|
|00000940| 7d 0d 0d 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |}..\begi|n{funcde|
|00000950| 73 63 7d 7b 41 70 70 6c | 69 63 61 74 69 6f 6e 7d |sc}{Appl|ication}|
|00000960| 7b 7d 0d 41 6e 20 6f 62 | 6a 65 63 74 20 72 65 70 |{}.An ob|ject rep|
|00000970| 72 65 73 65 6e 74 69 6e | 67 20 74 68 65 20 63 6f |resentin|g the co|
|00000980| 6d 70 6c 65 74 65 20 61 | 70 70 6c 69 63 61 74 69 |mplete a|pplicati|
|00000990| 6f 6e 2e 20 53 65 65 20 | 62 65 6c 6f 77 20 66 6f |on. See |below fo|
|000009a0| 72 20 61 0d 64 65 73 63 | 72 69 70 74 69 6f 6e 20 |r a.desc|ription |
|000009b0| 6f 66 20 74 68 65 20 6d | 65 74 68 6f 64 73 2e 20 |of the m|ethods. |
|000009c0| 54 68 65 20 64 65 66 61 | 75 6c 74 20 5c 63 6f 64 |The defa|ult \cod|
|000009d0| 65 7b 5f 5f 69 6e 69 74 | 5f 5f 7d 20 72 6f 75 74 |e{__init|__} rout|
|000009e0| 69 6e 65 0d 63 72 65 61 | 74 65 73 20 61 6e 20 65 |ine.crea|tes an e|
|000009f0| 6d 70 74 79 20 77 69 6e | 64 6f 77 20 64 69 63 74 |mpty win|dow dict|
|00000a00| 69 6f 6e 61 72 79 20 61 | 6e 64 20 61 20 6d 65 6e |ionary a|nd a men|
|00000a10| 75 20 62 61 72 20 77 69 | 74 68 20 61 6e 20 61 70 |u bar wi|th an ap|
|00000a20| 70 6c 65 20 6d 65 6e 75 | 2e 0d 5c 65 6e 64 7b 66 |ple menu|..\end{f|
|00000a30| 75 6e 63 64 65 73 63 7d | 0d 0d 5c 62 65 67 69 6e |uncdesc}|..\begin|
|00000a40| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 4d 65 6e 75 42 |{funcdes|c}{MenuB|
|00000a50| 61 72 7d 7b 7d 0d 41 6e | 20 6f 62 6a 65 63 74 20 |ar}{}.An| object |
|00000a60| 72 65 70 72 65 73 65 6e | 74 69 6e 67 20 74 68 65 |represen|ting the|
|00000a70| 20 6d 65 6e 75 62 61 72 | 2e 20 54 68 69 73 20 6f | menubar|. This o|
|00000a80| 62 6a 65 63 74 20 69 73 | 20 75 73 75 61 6c 6c 79 |bject is| usually|
|00000a90| 20 6e 6f 74 20 63 72 65 | 61 74 65 64 0d 62 79 20 | not cre|ated.by |
|00000aa0| 74 68 65 20 75 73 65 72 | 2e 0d 5c 65 6e 64 7b 66 |the user|..\end{f|
|00000ab0| 75 6e 63 64 65 73 63 7d | 0d 0d 5c 62 65 67 69 6e |uncdesc}|..\begin|
|00000ac0| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 4d 65 6e 75 7d |{funcdes|c}{Menu}|
|00000ad0| 7b 62 61 72 5c 2c 20 74 | 69 74 6c 65 5c 6f 70 74 |{bar\, t|itle\opt|
|00000ae0| 69 6f 6e 61 6c 7b 5c 2c | 20 61 66 74 65 72 7d 7d |ional{\,| after}}|
|00000af0| 0d 41 6e 20 6f 62 6a 65 | 63 74 20 72 65 70 72 65 |.An obje|ct repre|
|00000b00| 73 65 6e 74 69 6e 67 20 | 61 20 6d 65 6e 75 2e 20 |senting |a menu. |
|00000b10| 55 70 6f 6e 20 63 72 65 | 61 74 69 6f 6e 20 79 6f |Upon cre|ation yo|
|00000b20| 75 20 70 61 73 73 20 74 | 68 65 0d 5c 63 6f 64 65 |u pass t|he.\code|
|00000b30| 7b 4d 65 6e 75 42 61 72 | 7d 20 74 68 65 20 6d 65 |{MenuBar|} the me|
|00000b40| 6e 75 20 61 70 70 65 61 | 72 73 20 69 6e 2c 20 74 |nu appea|rs in, t|
|00000b50| 68 65 20 5c 76 61 72 7b | 74 69 74 6c 65 7d 20 73 |he \var{|title} s|
|00000b60| 74 72 69 6e 67 20 61 6e | 64 20 61 0d 70 6f 73 69 |tring an|d a.posi|
|00000b70| 74 69 6f 6e 20 28 31 2d | 62 61 73 65 64 29 20 5c |tion (1-|based) \|
|00000b80| 76 61 72 7b 61 66 74 65 | 72 7d 20 77 68 65 72 65 |var{afte|r} where|
|00000b90| 20 74 68 65 20 6d 65 6e | 75 20 73 68 6f 75 6c 64 | the men|u should|
|00000ba0| 20 61 70 70 65 61 72 20 | 28 64 65 66 61 75 6c 74 | appear |(default|
|00000bb0| 3a 0d 61 74 20 74 68 65 | 20 65 6e 64 29 2e 0d 5c |:.at the| end)..\|
|00000bc0| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0d 0d 5c |end{func|desc}..\|
|00000bd0| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00000be0| 4d 65 6e 75 49 74 65 6d | 7d 7b 6d 65 6e 75 5c 2c |MenuItem|}{menu\,|
|00000bf0| 20 74 69 74 6c 65 5c 6f | 70 74 69 6f 6e 61 6c 7b | title\o|ptional{|
|00000c00| 5c 2c 20 73 68 6f 72 74 | 63 75 74 5c 2c 20 63 61 |\, short|cut\, ca|
|00000c10| 6c 6c 62 61 63 6b 7d 7d | 0d 43 72 65 61 74 65 20 |llback}}|.Create |
|00000c20| 61 20 6d 65 6e 75 20 69 | 74 65 6d 20 6f 62 6a 65 |a menu i|tem obje|
|00000c30| 63 74 2e 20 54 68 65 20 | 61 72 67 75 6d 65 6e 74 |ct. The |argument|
|00000c40| 73 20 61 72 65 20 74 68 | 65 20 6d 65 6e 75 20 74 |s are th|e menu t|
|00000c50| 6f 20 63 72 61 74 65 20 | 74 68 65 0d 69 74 65 6d |o crate |the.item|
|00000c60| 20 69 74 2c 20 74 68 65 | 20 69 74 65 6d 20 74 69 | it, the| item ti|
|00000c70| 74 6c 65 20 73 74 72 69 | 6e 67 20 61 6e 64 20 6f |tle stri|ng and o|
|00000c80| 70 74 69 6f 6e 61 6c 6c | 79 20 74 68 65 20 6b 65 |ptionall|y the ke|
|00000c90| 79 62 6f 61 72 64 20 73 | 68 6f 72 74 63 75 74 0d |yboard s|hortcut.|
|00000ca0| 61 6e 64 20 61 20 63 61 | 6c 6c 62 61 63 6b 20 72 |and a ca|llback r|
|00000cb0| 6f 75 74 69 6e 65 2e 20 | 54 68 65 20 63 61 6c 6c |outine. |The call|
|00000cc0| 62 61 63 6b 20 69 73 20 | 63 61 6c 6c 65 64 20 77 |back is |called w|
|00000cd0| 69 74 68 20 74 68 65 20 | 61 72 67 75 6d 65 6e 74 |ith the |argument|
|00000ce0| 73 0d 6d 65 6e 75 2d 69 | 64 2c 20 69 74 65 6d 20 |s.menu-i|d, item |
|00000cf0| 6e 75 6d 62 65 72 20 77 | 69 74 68 69 6e 20 6d 65 |number w|ithin me|
|00000d00| 6e 75 20 28 31 2d 62 61 | 73 65 64 29 2c 20 63 75 |nu (1-ba|sed), cu|
|00000d10| 72 72 65 6e 74 20 66 72 | 6f 6e 74 20 77 69 6e 64 |rrent fr|ont wind|
|00000d20| 6f 77 20 61 6e 64 0d 74 | 68 65 20 65 76 65 6e 74 |ow and.t|he event|
|00000d30| 20 72 65 63 6f 72 64 2e | 0d 5c 65 6e 64 7b 66 75 | record.|.\end{fu|
|00000d40| 6e 63 64 65 73 63 7d 0d | 0d 5c 62 65 67 69 6e 7b |ncdesc}.|.\begin{|
|00000d50| 66 75 6e 63 64 65 73 63 | 7d 7b 53 65 70 61 72 61 |funcdesc|}{Separa|
|00000d60| 74 6f 72 7d 7b 6d 65 6e | 75 7d 0d 41 64 64 20 61 |tor}{men|u}.Add a|
|00000d70| 20 73 65 70 61 72 61 74 | 6f 72 20 74 6f 20 74 68 | separat|or to th|
|00000d80| 65 20 65 6e 64 20 6f 66 | 20 61 20 6d 65 6e 75 2e |e end of| a menu.|
|00000d90| 0d 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0d |.\end{fu|ncdesc}.|
|00000da0| 0d 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00000db0| 7d 7b 53 75 62 4d 65 6e | 75 7d 7b 6d 65 6e 75 5c |}{SubMen|u}{menu\|
|00000dc0| 2c 20 6c 61 62 65 6c 7d | 0d 43 72 65 61 74 65 20 |, label}|.Create |
|00000dd0| 61 20 73 75 62 6d 65 6e | 75 20 6e 61 6d 65 64 20 |a submen|u named |
|00000de0| 5c 76 61 72 7b 6c 61 62 | 65 6c 7d 20 75 6e 64 65 |\var{lab|el} unde|
|00000df0| 72 20 6d 65 6e 75 20 5c | 76 61 72 7b 6d 65 6e 75 |r menu \|var{menu|
|00000e00| 7d 2e 20 54 68 65 20 6d | 65 6e 75 0d 6f 62 6a 65 |}. The m|enu.obje|
|00000e10| 63 74 20 69 73 20 72 65 | 74 75 72 6e 65 64 2e 0d |ct is re|turned..|
|00000e20| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 0d 0d |\end{fun|cdesc}..|
|00000e30| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|00000e40| 7b 57 69 6e 64 6f 77 7d | 7b 70 61 72 65 6e 74 7d |{Window}|{parent}|
|00000e50| 0d 43 72 65 61 74 65 73 | 20 61 20 28 6d 6f 64 65 |.Creates| a (mode|
|00000e60| 6c 65 73 73 29 20 77 69 | 6e 64 6f 77 2e 20 5c 76 |less) wi|ndow. \v|
|00000e70| 61 72 7b 50 61 72 65 6e | 74 7d 20 69 73 20 74 68 |ar{Paren|t} is th|
|00000e80| 65 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 6f 62 |e applic|ation ob|
|00000e90| 6a 65 63 74 20 74 6f 0d | 77 68 69 63 68 20 74 68 |ject to.|which th|
|00000ea0| 65 20 77 69 6e 64 6f 77 | 20 62 65 6c 6f 6e 67 73 |e window| belongs|
|00000eb0| 2e 20 54 68 65 20 77 69 | 6e 64 6f 77 20 69 73 20 |. The wi|ndow is |
|00000ec0| 6e 6f 74 20 64 69 73 70 | 6c 61 79 65 64 20 75 6e |not disp|layed un|
|00000ed0| 74 69 6c 20 6c 61 74 65 | 72 2e 0d 5c 65 6e 64 7b |til late|r..\end{|
|00000ee0| 66 75 6e 63 64 65 73 63 | 7d 0d 0d 5c 62 65 67 69 |funcdesc|}..\begi|
|00000ef0| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 44 69 61 6c |n{funcde|sc}{Dial|
|00000f00| 6f 67 57 69 6e 64 6f 77 | 7d 7b 70 61 72 65 6e 74 |ogWindow|}{parent|
|00000f10| 7d 0d 43 72 65 61 74 65 | 73 20 61 20 6d 6f 64 65 |}.Create|s a mode|
|00000f20| 6c 65 73 73 20 64 69 61 | 6c 6f 67 20 77 69 6e 64 |less dia|log wind|
|00000f30| 6f 77 2e 0d 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |ow..\end|{funcdes|
|00000f40| 63 7d 0d 0d 0d 5c 73 75 | 62 73 65 63 74 69 6f 6e |c}...\su|bsection|
|00000f50| 7b 41 70 70 6c 69 63 61 | 74 69 6f 6e 20 6f 62 6a |{Applica|tion obj|
|00000f60| 65 63 74 73 7d 0d 41 70 | 70 6c 69 63 61 74 69 6f |ects}.Ap|plicatio|
|00000f70| 6e 20 6f 62 6a 65 63 74 | 73 20 68 61 76 65 20 74 |n object|s have t|
|00000f80| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 6d 65 74 |he follo|wing met|
|00000f90| 68 6f 64 73 2c 20 61 6d | 6f 6e 67 20 6f 74 68 65 |hods, am|ong othe|
|00000fa0| 72 73 3a 0d 0d 5c 72 65 | 6e 65 77 63 6f 6d 6d 61 |rs:..\re|newcomma|
|00000fb0| 6e 64 7b 5c 69 6e 64 65 | 78 73 75 62 69 74 65 6d |nd{\inde|xsubitem|
|00000fc0| 7d 7b 28 41 70 70 6c 69 | 63 61 74 69 6f 6e 20 6d |}{(Appli|cation m|
|00000fd0| 65 74 68 6f 64 29 7d 0d | 0d 5c 62 65 67 69 6e 7b |ethod)}.|.\begin{|
|00000fe0| 66 75 6e 63 64 65 73 63 | 7d 7b 6d 61 6b 65 75 73 |funcdesc|}{makeus|
|00000ff0| 65 72 6d 65 6e 75 73 7d | 7b 7d 0d 4f 76 65 72 72 |ermenus}|{}.Overr|
|00001000| 69 64 65 20 74 68 69 73 | 20 6d 65 74 68 6f 64 20 |ide this| method |
|00001010| 69 66 20 79 6f 75 20 6e | 65 65 64 20 6d 65 6e 75 |if you n|eed menu|
|00001020| 73 20 69 6e 20 79 6f 75 | 72 20 61 70 70 6c 69 63 |s in you|r applic|
|00001030| 61 74 69 6f 6e 2e 20 41 | 70 70 65 6e 64 20 74 68 |ation. A|ppend th|
|00001040| 65 0d 6d 65 6e 75 73 20 | 74 6f 20 5c 63 6f 64 65 |e.menus |to \code|
|00001050| 7b 73 65 6c 66 2e 6d 65 | 6e 75 62 61 72 7d 2e 0d |{self.me|nubar}..|
|00001060| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 0d 0d |\end{fun|cdesc}..|
|00001070| 5c 62 65 67 69 6e 7b 66 | 75 6e 63 64 65 73 63 7d |\begin{f|uncdesc}|
|00001080| 7b 67 65 74 61 62 6f 75 | 74 74 65 78 74 7d 7b 7d |{getabou|ttext}{}|
|00001090| 0d 4f 76 65 72 72 69 64 | 65 20 74 68 69 73 20 6d |.Overrid|e this m|
|000010a0| 65 74 68 6f 64 20 74 6f | 20 72 65 74 75 72 6e 20 |ethod to| return |
|000010b0| 61 20 74 65 78 74 20 73 | 74 72 69 6e 67 20 64 65 |a text s|tring de|
|000010c0| 73 63 72 69 62 69 6e 67 | 20 79 6f 75 72 0d 61 70 |scribing| your.ap|
|000010d0| 70 6c 69 63 61 74 69 6f | 6e 2e 20 41 6c 74 65 72 |plicatio|n. Alter|
|000010e0| 6e 61 74 69 76 65 6c 79 | 2c 20 6f 76 65 72 72 69 |natively|, overri|
|000010f0| 64 65 20 74 68 65 20 5c | 63 6f 64 65 7b 64 6f 5f |de the \|code{do_|
|00001100| 61 62 6f 75 74 7d 20 6d | 65 74 68 6f 64 20 66 6f |about} m|ethod fo|
|00001110| 72 0d 6d 6f 72 65 20 65 | 6c 61 62 6f 72 61 74 65 |r.more e|laborate|
|00001120| 20 61 62 6f 75 74 20 6d | 65 73 73 61 67 65 73 2e | about m|essages.|
|00001130| 0d 5c 65 6e 64 7b 66 75 | 6e 63 64 65 73 63 7d 0d |.\end{fu|ncdesc}.|
|00001140| 0d 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |.\begin{|funcdesc|
|00001150| 7d 7b 6d 61 69 6e 6c 6f | 6f 70 7d 7b 5c 6f 70 74 |}{mainlo|op}{\opt|
|00001160| 69 6f 6e 61 6c 7b 6d 61 | 73 6b 5c 2c 20 77 61 69 |ional{ma|sk\, wai|
|00001170| 74 7d 7d 0d 54 68 69 73 | 20 72 6f 75 74 69 6e 65 |t}}.This| routine|
|00001180| 20 69 73 20 74 68 65 20 | 6d 61 69 6e 20 65 76 65 | is the |main eve|
|00001190| 6e 74 20 6c 6f 6f 70 2c | 20 63 61 6c 6c 20 69 74 |nt loop,| call it|
|000011a0| 20 74 6f 20 73 65 74 20 | 79 6f 75 72 20 61 70 70 | to set |your app|
|000011b0| 6c 69 63 61 74 69 6f 6e | 0d 72 6f 6c 6c 69 6e 67 |lication|.rolling|
|000011c0| 2e 20 5c 76 61 72 7b 4d | 61 73 6b 7d 20 69 73 20 |. \var{M|ask} is |
|000011d0| 74 68 65 20 6d 61 73 6b | 20 6f 66 20 65 76 65 6e |the mask| of even|
|000011e0| 74 73 20 79 6f 75 20 77 | 61 6e 74 20 74 6f 20 68 |ts you w|ant to h|
|000011f0| 61 6e 64 6c 65 2c 0d 5c | 76 61 72 7b 77 61 69 74 |andle,.\|var{wait|
|00001200| 7d 20 69 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |} is the| number |
|00001210| 6f 66 20 74 69 63 6b 73 | 20 79 6f 75 20 77 61 6e |of ticks| you wan|
|00001220| 74 20 74 6f 20 6c 65 61 | 76 65 20 74 6f 20 6f 74 |t to lea|ve to ot|
|00001230| 68 65 72 0d 63 6f 6e 63 | 75 72 72 65 6e 74 20 61 |her.conc|urrent a|
|00001240| 70 70 6c 69 63 61 74 69 | 6f 6e 20 28 64 65 66 61 |pplicati|on (defa|
|00001250| 75 6c 74 20 30 2c 20 77 | 68 69 63 68 20 69 73 20 |ult 0, w|hich is |
|00001260| 70 72 6f 62 61 62 6c 79 | 20 6e 6f 74 20 61 20 67 |probably| not a g|
|00001270| 6f 6f 64 0d 69 64 65 61 | 29 2e 20 54 68 69 73 20 |ood.idea|). This |
|00001280| 6d 65 74 68 6f 64 20 64 | 6f 65 73 20 6e 6f 74 20 |method d|oes not |
|00001290| 72 65 74 75 72 6e 20 75 | 6e 74 69 6c 20 5c 63 6f |return u|ntil \co|
|000012a0| 64 65 7b 73 65 6c 66 7d | 20 69 73 20 72 61 69 73 |de{self}| is rais|
|000012b0| 65 64 2e 0d 0d 54 68 65 | 20 65 76 65 6e 74 20 6c |ed...The| event l|
|000012c0| 6f 6f 70 20 69 73 20 73 | 70 6c 69 74 20 69 6e 74 |oop is s|plit int|
|000012d0| 6f 20 6d 61 6e 79 20 73 | 6d 61 6c 6c 20 70 61 72 |o many s|mall par|
|000012e0| 74 73 2c 20 65 61 63 68 | 20 6f 66 20 77 68 69 63 |ts, each| of whic|
|000012f0| 68 20 63 61 6e 20 62 65 | 0d 6f 76 65 72 72 69 64 |h can be|.overrid|
|00001300| 64 65 6e 2e 20 54 68 65 | 20 64 65 66 61 75 6c 74 |den. The| default|
|00001310| 20 6d 65 74 68 6f 64 73 | 20 74 61 6b 65 20 63 61 | methods| take ca|
|00001320| 72 65 20 6f 66 20 64 69 | 73 70 61 74 63 68 69 6e |re of di|spatchin|
|00001330| 67 20 65 76 65 6e 74 73 | 20 74 6f 0d 77 69 6e 64 |g events| to.wind|
|00001340| 6f 77 73 20 61 6e 64 20 | 64 69 61 6c 6f 67 73 2c |ows and |dialogs,|
|00001350| 20 68 61 6e 64 6c 69 6e | 67 20 64 72 61 67 73 20 | handlin|g drags |
|00001360| 61 6e 64 20 72 65 73 69 | 7a 65 73 2c 20 41 70 70 |and resi|zes, App|
|00001370| 6c 65 20 45 76 65 6e 74 | 73 2c 20 65 76 65 6e 74 |le Event|s, event|
|00001380| 73 0d 66 6f 72 20 6e 6f | 6e 2d 46 72 61 6d 65 57 |s.for no|n-FrameW|
|00001390| 6f 72 6b 20 77 69 6e 64 | 6f 77 73 2c 20 65 74 63 |ork wind|ows, etc|
|000013a0| 2e 0d 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|000013b0| 0d 0d 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |..\begin|{funcdes|
|000013c0| 63 7d 7b 64 6f 5f 63 68 | 61 72 7d 7b 63 5c 2c 20 |c}{do_ch|ar}{c\, |
|000013d0| 65 76 65 6e 74 7d 0d 54 | 68 65 20 75 73 65 72 20 |event}.T|he user |
|000013e0| 74 79 70 65 64 20 63 68 | 61 72 61 63 74 65 72 20 |typed ch|aracter |
|000013f0| 5c 76 61 72 7b 63 7d 2e | 20 54 68 65 20 63 6f 6d |\var{c}.| The com|
|00001400| 70 6c 65 74 65 20 64 65 | 74 61 69 6c 73 20 6f 66 |plete de|tails of|
|00001410| 20 74 68 65 20 65 76 65 | 6e 74 0d 63 61 6e 20 62 | the eve|nt.can b|
|00001420| 65 20 66 6f 75 6e 64 20 | 69 6e 20 74 68 65 20 5c |e found |in the \|
|00001430| 76 61 72 7b 65 76 65 6e | 74 7d 20 73 74 72 75 63 |var{even|t} struc|
|00001440| 74 75 72 65 2e 20 54 68 | 69 73 20 6d 65 74 68 6f |ture. Th|is metho|
|00001450| 64 20 63 61 6e 20 61 6c | 73 6f 20 62 65 0d 70 72 |d can al|so be.pr|
|00001460| 6f 76 69 64 65 64 20 69 | 6e 20 61 20 5c 63 6f 64 |ovided i|n a \cod|
|00001470| 65 7b 57 69 6e 64 6f 77 | 7d 20 6f 62 6a 65 63 74 |e{Window|} object|
|00001480| 2c 20 77 68 69 63 68 20 | 6f 76 65 72 72 69 64 65 |, which |override|
|00001490| 73 20 74 68 65 0d 61 70 | 70 6c 69 63 61 74 69 6f |s the.ap|plicatio|
|000014a0| 6e 2d 77 69 64 65 20 68 | 61 6e 64 6c 65 72 20 69 |n-wide h|andler i|
|000014b0| 66 20 74 68 65 20 77 69 | 6e 64 6f 77 20 69 73 20 |f the wi|ndow is |
|000014c0| 66 72 6f 6e 74 6d 6f 73 | 74 2e 0d 5c 65 6e 64 7b |frontmos|t..\end{|
|000014d0| 66 75 6e 63 64 65 73 63 | 7d 0d 0d 5c 62 65 67 69 |funcdesc|}..\begi|
|000014e0| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 64 6f 5f 64 |n{funcde|sc}{do_d|
|000014f0| 69 61 6c 6f 67 65 76 65 | 6e 74 7d 7b 65 76 65 6e |ialogeve|nt}{even|
|00001500| 74 7d 0d 43 61 6c 6c 65 | 64 20 65 61 72 6c 79 20 |t}.Calle|d early |
|00001510| 69 6e 20 74 68 65 20 65 | 76 65 6e 74 20 6c 6f 6f |in the e|vent loo|
|00001520| 70 20 74 6f 20 68 61 6e | 64 6c 65 20 6d 6f 64 65 |p to han|dle mode|
|00001530| 6c 65 73 73 20 64 69 61 | 6c 6f 67 20 65 76 65 6e |less dia|log even|
|00001540| 74 73 2e 20 54 68 65 0d | 64 65 66 61 75 6c 74 20 |ts. The.|default |
|00001550| 6d 65 74 68 6f 64 20 73 | 69 6d 70 6c 79 20 64 69 |method s|imply di|
|00001560| 73 70 61 74 63 68 65 73 | 20 74 68 65 20 65 76 65 |spatches| the eve|
|00001570| 6e 74 20 74 6f 20 74 68 | 65 20 72 65 6c 65 76 61 |nt to th|e releva|
|00001580| 6e 74 20 64 69 61 6c 6f | 67 20 28 6e 6f 74 0d 74 |nt dialo|g (not.t|
|00001590| 68 72 6f 75 67 68 20 74 | 68 65 20 74 68 65 20 5c |hrough t|he the \|
|000015a0| 63 6f 64 65 7b 44 69 61 | 6c 6f 67 57 69 6e 64 6f |code{Dia|logWindo|
|000015b0| 77 7d 20 6f 62 6a 65 63 | 74 20 69 6e 76 6f 6c 76 |w} objec|t involv|
|000015c0| 65 64 29 2e 20 4f 76 65 | 72 72 69 64 65 20 69 66 |ed). Ove|rride if|
|000015d0| 20 79 6f 75 0d 6e 65 65 | 64 20 73 70 65 63 69 61 | you.nee|d specia|
|000015e0| 6c 20 68 61 6e 64 6c 69 | 6e 67 20 6f 66 20 64 69 |l handli|ng of di|
|000015f0| 61 6c 6f 67 20 65 76 65 | 6e 74 73 20 28 6b 65 79 |alog eve|nts (key|
|00001600| 62 6f 61 72 64 20 73 68 | 6f 72 74 63 75 74 73 2c |board sh|ortcuts,|
|00001610| 20 65 74 63 29 2e 0d 5c | 65 6e 64 7b 66 75 6e 63 | etc)..\|end{func|
|00001620| 64 65 73 63 7d 0d 0d 5c | 73 75 62 73 65 63 74 69 |desc}..\|subsecti|
|00001630| 6f 6e 7b 57 69 6e 64 6f | 77 20 4f 62 6a 65 63 74 |on{Windo|w Object|
|00001640| 73 7d 0d 0d 57 69 6e 64 | 6f 77 20 6f 62 6a 65 63 |s}..Wind|ow objec|
|00001650| 74 73 20 68 61 76 65 20 | 74 68 65 20 66 6f 6c 6c |ts have |the foll|
|00001660| 6f 77 69 6e 67 20 6d 65 | 74 68 6f 64 73 2c 20 61 |owing me|thods, a|
|00001670| 6d 6f 6e 67 20 6f 74 68 | 65 72 73 3a 0d 0d 5c 72 |mong oth|ers:..\r|
|00001680| 65 6e 65 77 63 6f 6d 6d | 61 6e 64 7b 5c 69 6e 64 |enewcomm|and{\ind|
|00001690| 65 78 73 75 62 69 74 65 | 6d 7d 7b 28 57 69 6e 64 |exsubite|m}{(Wind|
|000016a0| 6f 77 20 6d 65 74 68 6f | 64 29 7d 0d 0d 5c 62 65 |ow metho|d)}..\be|
|000016b0| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 6f 70 |gin{func|desc}{op|
|000016c0| 65 6e 7d 7b 7d 0d 4f 76 | 65 72 72 69 64 65 20 74 |en}{}.Ov|erride t|
|000016d0| 68 69 73 20 6d 65 74 68 | 6f 64 20 74 6f 20 6f 70 |his meth|od to op|
|000016e0| 65 6e 20 61 20 77 69 6e | 64 6f 77 2e 20 53 74 6f |en a win|dow. Sto|
|000016f0| 72 65 20 74 68 65 20 4d | 61 63 4f 53 20 77 69 6e |re the M|acOS win|
|00001700| 64 6f 77 2d 69 64 20 69 | 6e 0d 5c 63 6f 64 65 7b |dow-id i|n.\code{|
|00001710| 73 65 6c 66 2e 77 69 64 | 7d 20 61 6e 64 20 63 61 |self.wid|} and ca|
|00001720| 6c 6c 20 5c 63 6f 64 65 | 7b 73 65 6c 66 2e 64 6f |ll \code|{self.do|
|00001730| 5f 70 6f 73 74 6f 70 65 | 6e 7d 20 74 6f 20 72 65 |_postope|n} to re|
|00001740| 67 69 73 74 65 72 20 74 | 68 65 0d 77 69 6e 64 6f |gister t|he.windo|
|00001750| 77 20 77 69 74 68 20 74 | 68 65 20 70 61 72 65 6e |w with t|he paren|
|00001760| 74 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 2e 0d 5c |t applic|ation..\|
|00001770| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0d 0d 5c |end{func|desc}..\|
|00001780| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00001790| 63 6c 6f 73 65 7d 7b 7d | 0d 4f 76 65 72 72 69 64 |close}{}|.Overrid|
|000017a0| 65 20 74 68 69 73 20 6d | 65 74 68 6f 64 20 74 6f |e this m|ethod to|
|000017b0| 20 64 6f 20 61 6e 79 20 | 73 70 65 63 69 61 6c 20 | do any |special |
|000017c0| 70 72 6f 63 65 73 73 69 | 6e 67 20 6f 6e 20 77 69 |processi|ng on wi|
|000017d0| 6e 64 6f 77 0d 63 6c 6f | 73 65 2e 20 43 61 6c 6c |ndow.clo|se. Call|
|000017e0| 20 5c 63 6f 64 65 7b 73 | 65 6c 66 2e 64 6f 5f 70 | \code{s|elf.do_p|
|000017f0| 6f 73 74 63 6c 6f 73 65 | 7d 20 74 6f 20 63 6c 65 |ostclose|} to cle|
|00001800| 61 6e 75 70 20 74 68 65 | 20 70 61 72 65 6e 74 20 |anup the| parent |
|00001810| 73 74 61 74 65 2e 0d 5c | 65 6e 64 7b 66 75 6e 63 |state..\|end{func|
|00001820| 64 65 73 63 7d 0d 0d 5c | 62 65 67 69 6e 7b 66 75 |desc}..\|begin{fu|
|00001830| 6e 63 64 65 73 63 7d 7b | 64 6f 5f 70 6f 73 74 72 |ncdesc}{|do_postr|
|00001840| 65 73 69 7a 65 7d 7b 77 | 69 64 74 68 5c 2c 20 68 |esize}{w|idth\, h|
|00001850| 65 69 67 68 74 5c 2c 20 | 6d 61 63 6f 73 77 69 6e |eight\, |macoswin|
|00001860| 64 6f 77 69 64 7d 0d 43 | 61 6c 6c 65 64 20 61 66 |dowid}.C|alled af|
|00001870| 74 65 72 20 74 68 65 20 | 77 69 6e 64 6f 77 20 69 |ter the |window i|
|00001880| 73 20 72 65 73 69 7a 65 | 64 2e 20 4f 76 65 72 72 |s resize|d. Overr|
|00001890| 69 64 65 20 69 66 20 6d | 6f 72 65 20 6e 65 65 64 |ide if m|ore need|
|000018a0| 73 20 74 6f 20 62 65 20 | 64 6f 6e 65 0d 74 68 61 |s to be |done.tha|
|000018b0| 6e 20 63 61 6c 6c 69 6e | 67 20 5c 63 6f 64 65 7b |n callin|g \code{|
|000018c0| 49 6e 76 61 6c 52 65 63 | 74 7d 2e 0d 5c 65 6e 64 |InvalRec|t}..\end|
|000018d0| 7b 66 75 6e 63 64 65 73 | 63 7d 0d 0d 5c 62 65 67 |{funcdes|c}..\beg|
|000018e0| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 64 6f 5f |in{funcd|esc}{do_|
|000018f0| 63 6f 6e 74 65 6e 74 63 | 6c 69 63 6b 7d 7b 6c 6f |contentc|lick}{lo|
|00001900| 63 61 6c 5c 2c 20 6d 6f | 64 69 66 69 65 72 73 5c |cal\, mo|difiers\|
|00001910| 2c 20 65 76 65 6e 74 7d | 0d 54 68 65 20 75 73 65 |, event}|.The use|
|00001920| 72 20 63 6c 69 63 6b 65 | 64 20 69 6e 20 74 68 65 |r clicke|d in the|
|00001930| 20 63 6f 6e 74 65 6e 74 | 20 70 61 72 74 20 6f 66 | content| part of|
|00001940| 20 61 20 77 69 6e 64 6f | 77 2e 20 54 68 65 20 61 | a windo|w. The a|
|00001950| 72 67 75 6d 65 6e 74 73 | 20 61 72 65 0d 74 68 65 |rguments| are.the|
|00001960| 20 63 6f 6f 72 64 69 6e | 61 74 65 73 20 28 77 69 | coordin|ates (wi|
|00001970| 6e 64 6f 77 2d 72 65 6c | 61 74 69 76 65 29 2c 20 |ndow-rel|ative), |
|00001980| 74 68 65 20 6b 65 79 20 | 6d 6f 64 69 66 69 65 72 |the key |modifier|
|00001990| 73 20 61 6e 64 20 74 68 | 65 20 72 61 77 0d 65 76 |s and th|e raw.ev|
|000019a0| 65 6e 74 2e 0d 5c 65 6e | 64 7b 66 75 6e 63 64 65 |ent..\en|d{funcde|
|000019b0| 73 63 7d 0d 0d 5c 62 65 | 67 69 6e 7b 66 75 6e 63 |sc}..\be|gin{func|
|000019c0| 64 65 73 63 7d 7b 64 6f | 5f 75 70 64 61 74 65 7d |desc}{do|_update}|
|000019d0| 7b 6d 61 63 6f 73 77 69 | 6e 64 6f 77 69 64 5c 2c |{macoswi|ndowid\,|
|000019e0| 20 65 76 65 6e 74 7d 0d | 41 6e 20 75 70 64 61 74 | event}.|An updat|
|000019f0| 65 20 65 76 65 6e 74 20 | 66 6f 72 20 74 68 65 20 |e event |for the |
|00001a00| 77 69 6e 64 6f 77 20 77 | 61 73 20 72 65 63 65 69 |window w|as recei|
|00001a10| 76 65 64 2e 20 52 65 64 | 72 61 77 20 74 68 65 20 |ved. Red|raw the |
|00001a20| 77 69 6e 64 6f 77 2e 0d | 5c 65 6e 64 7b 66 75 6e |window..|\end{fun|
|00001a30| 63 64 65 73 63 7d 0d 0d | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00001a40| 75 6e 63 64 65 73 63 7d | 7b 64 6f 5f 61 63 74 69 |uncdesc}|{do_acti|
|00001a50| 76 61 74 65 7d 7b 61 63 | 74 69 76 61 74 65 5c 2c |vate}{ac|tivate\,|
|00001a60| 20 65 76 65 6e 74 7d 0d | 54 68 65 20 77 69 6e 64 | event}.|The wind|
|00001a70| 6f 77 20 77 61 73 20 61 | 63 74 69 76 61 74 65 64 |ow was a|ctivated|
|00001a80| 20 28 5c 63 6f 64 65 7b | 61 63 74 69 76 61 74 65 | (\code{|activate|
|00001a90| 3d 3d 31 7d 29 20 6f 72 | 20 64 65 61 63 74 69 76 |==1}) or| deactiv|
|00001aa0| 61 74 65 64 0d 28 5c 63 | 6f 64 65 7b 61 63 74 69 |ated.(\c|ode{acti|
|00001ab0| 76 61 74 65 3d 3d 30 7d | 29 2e 20 48 61 6e 64 6c |vate==0}|). Handl|
|00001ac0| 65 20 74 68 69 6e 67 73 | 20 6c 69 6b 65 20 66 6f |e things| like fo|
|00001ad0| 63 75 73 20 68 69 67 68 | 6c 69 67 68 74 69 6e 67 |cus high|lighting|
|00001ae0| 2c 20 65 74 63 2e 0d 5c | 65 6e 64 7b 66 75 6e 63 |, etc..\|end{func|
|00001af0| 64 65 73 63 7d 0d 0d 5c | 73 75 62 73 65 63 74 69 |desc}..\|subsecti|
|00001b00| 6f 6e 7b 44 69 61 6c 6f | 67 57 69 6e 64 6f 77 20 |on{Dialo|gWindow |
|00001b10| 4f 62 6a 65 63 74 73 7d | 0d 0d 44 69 61 6c 6f 67 |Objects}|..Dialog|
|00001b20| 57 69 6e 64 6f 77 20 6f | 62 6a 65 63 74 73 20 68 |Window o|bjects h|
|00001b30| 61 76 65 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ave the |followin|
|00001b40| 67 20 6d 65 74 68 6f 64 | 73 20 62 65 73 69 64 65 |g method|s beside|
|00001b50| 73 20 74 68 6f 73 65 20 | 6f 66 0d 5c 63 6f 64 65 |s those |of.\code|
|00001b60| 7b 57 69 6e 64 6f 77 7d | 20 6f 62 6a 65 63 74 73 |{Window}| objects|
|00001b70| 3a 0d 0d 5c 72 65 6e 65 | 77 63 6f 6d 6d 61 6e 64 |:..\rene|wcommand|
|00001b80| 7b 5c 69 6e 64 65 78 73 | 75 62 69 74 65 6d 7d 7b |{\indexs|ubitem}{|
|00001b90| 28 44 69 61 6c 6f 67 57 | 69 6e 64 6f 77 20 6d 65 |(DialogW|indow me|
|00001ba0| 74 68 6f 64 29 7d 0d 0d | 5c 62 65 67 69 6e 7b 66 |thod)}..|\begin{f|
|00001bb0| 75 6e 63 64 65 73 63 7d | 7b 6f 70 65 6e 7d 7b 72 |uncdesc}|{open}{r|
|00001bc0| 65 73 69 64 7d 0d 43 72 | 65 61 74 65 20 74 68 65 |esid}.Cr|eate the|
|00001bd0| 20 64 69 61 6c 6f 67 20 | 77 69 6e 64 6f 77 2c 20 | dialog |window, |
|00001be0| 66 72 6f 6d 20 74 68 65 | 20 44 4c 4f 47 20 72 65 |from the| DLOG re|
|00001bf0| 73 6f 75 72 63 65 20 77 | 69 74 68 20 69 64 0d 5c |source w|ith id.\|
|00001c00| 76 61 72 7b 72 65 73 69 | 64 7d 2e 20 54 68 65 20 |var{resi|d}. The |
|00001c10| 64 69 61 6c 6f 67 20 6f | 62 6a 65 63 74 20 69 73 |dialog o|bject is|
|00001c20| 20 73 74 6f 72 65 64 20 | 69 6e 20 5c 63 6f 64 65 | stored |in \code|
|00001c30| 7b 73 65 6c 66 2e 77 69 | 64 7d 2e 0d 5c 65 6e 64 |{self.wi|d}..\end|
|00001c40| 7b 66 75 6e 63 64 65 73 | 63 7d 0d 0d 5c 62 65 67 |{funcdes|c}..\beg|
|00001c50| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 64 6f 5f |in{funcd|esc}{do_|
|00001c60| 69 74 65 6d 68 69 74 7d | 7b 69 74 65 6d 5c 2c 20 |itemhit}|{item\, |
|00001c70| 65 76 65 6e 74 7d 0d 49 | 74 65 6d 20 6e 75 6d 62 |event}.I|tem numb|
|00001c80| 65 72 20 5c 76 61 72 7b | 69 74 65 6d 7d 20 77 61 |er \var{|item} wa|
|00001c90| 73 20 68 69 74 2e 20 59 | 6f 75 20 61 72 65 20 72 |s hit. Y|ou are r|
|00001ca0| 65 73 70 6f 6e 73 69 62 | 6c 65 20 66 6f 72 20 72 |esponsib|le for r|
|00001cb0| 65 64 72 61 77 69 6e 67 | 0d 74 6f 67 67 6c 65 20 |edrawing|.toggle |
|00001cc0| 62 75 74 74 6f 6e 73 2c | 20 65 74 63 2e 0d 5c 65 |buttons,| etc..\e|
|00001cd0| 6e 64 7b 66 75 6e 63 64 | 65 73 63 7d 0d 0d |nd{funcd|esc}.. |
+--------+-------------------------+-------------------------+--------+--------+