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 |
99%
| dexvert
| Texinfo Document (document/texInfo)
| magic
| Supported |
1%
| dexvert
| Corel 10 Texture (image/corel10Texture)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| TeX document text
| default
| |
98%
| file
| LaTeX document, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 64 6f 63 75 6d 65 6e | 74 73 74 79 6c 65 5b 61 |\documen|tstyle[a|
|00000010| 34 77 69 64 65 2c 6d 61 | 6b 65 69 64 78 2c 76 65 |4wide,ma|keidx,ve|
|00000020| 72 62 61 74 69 6d 5d 7b | 61 72 74 69 63 6c 65 7d |rbatim]{|article}|
|00000030| 0a 5c 69 6e 70 75 74 20 | 70 73 62 6f 78 2e 74 65 |.\input |psbox.te|
|00000040| 78 0a 25 20 52 65 6d 6f | 76 65 20 74 68 69 73 20 |x.% Remo|ve this |
|00000050| 66 6f 72 20 70 72 6f 63 | 65 73 73 69 6e 67 20 77 |for proc|essing w|
|00000060| 69 74 68 20 64 76 69 32 | 70 73 20 69 6e 73 74 65 |ith dvi2|ps inste|
|00000070| 61 64 20 6f 66 20 64 76 | 69 70 73 0a 25 20 5c 73 |ad of dv|ips.% \s|
|00000080| 70 65 63 69 61 6c 7b 21 | 2f 40 73 63 61 6c 65 75 |pecial{!|/@scaleu|
|00000090| 6e 69 74 20 31 20 64 65 | 66 7d 0a 0a 5c 70 61 72 |nit 1 de|f}..\par|
|000000a0| 73 6b 69 70 3d 31 30 70 | 74 0a 0a 5c 74 69 74 6c |skip=10p|t..\titl|
|000000b0| 65 7b 54 75 74 6f 72 69 | 61 6c 20 66 6f 72 20 77 |e{Tutori|al for w|
|000000c0| 78 57 69 6e 64 6f 77 73 | 3a 20 61 20 70 6f 72 74 |xWindows|: a port|
|000000d0| 61 62 6c 65 20 47 55 49 | 20 74 6f 6f 6c 6b 69 74 |able GUI| toolkit|
|000000e0| 20 66 6f 72 20 43 2b 2b | 7d 0a 5c 61 75 74 68 6f | for C++|}.\autho|
|000000f0| 72 7b 4a 75 6c 69 61 6e | 20 53 6d 61 72 74 5c 5c |r{Julian| Smart\\|
|00000100| 41 72 74 69 66 69 63 69 | 61 6c 20 49 6e 74 65 6c |Artifici|al Intel|
|00000110| 6c 69 67 65 6e 63 65 20 | 41 70 70 6c 69 63 61 74 |ligence |Applicat|
|00000120| 69 6f 6e 73 20 49 6e 73 | 74 69 74 75 74 65 5c 5c |ions Ins|titute\\|
|00000130| 0a 55 6e 69 76 65 72 73 | 69 74 79 20 6f 66 20 45 |.Univers|ity of E|
|00000140| 64 69 6e 62 75 72 67 68 | 5c 5c 45 48 31 20 31 48 |dinburgh|\\EH1 1H|
|00000150| 4e 7d 0a 5c 64 61 74 65 | 7b 4a 61 6e 75 61 72 79 |N}.\date|{January|
|00000160| 20 31 39 39 33 7d 0a 0a | 25 5c 70 61 72 69 6e 64 | 1993}..|%\parind|
|00000170| 65 6e 74 3d 30 20 70 74 | 0a 0a 5c 6e 65 77 63 6f |ent=0 pt|..\newco|
|00000180| 6d 6d 61 6e 64 7b 5c 66 | 75 6e 63 7d 5b 33 5d 7b |mmand{\f|unc}[3]{|
|00000190| 5c 68 61 6e 67 61 66 74 | 65 72 3d 31 5c 6e 6f 69 |\hangaft|er=1\noi|
|000001a0| 6e 64 65 6e 74 5c 68 61 | 6e 67 69 6e 64 65 6e 74 |ndent\ha|ngindent|
|000001b0| 3d 31 30 6d 6d 0a 7b 5c | 62 66 20 23 31 20 23 32 |=10mm.{\|bf #1 #2|
|000001c0| 5c 69 6e 64 65 78 7b 23 | 32 7d 7d 28 23 33 29 7d |\index{#|2}}(#3)}|
|000001d0| 0a 0a 25 20 46 6f 72 20 | 66 75 6e 63 74 69 6f 6e |..% For |function|
|000001e0| 2f 74 79 70 65 20 64 65 | 66 69 6e 69 74 69 6f 6e |/type de|finition|
|000001f0| 20 77 68 65 72 65 20 74 | 68 65 20 6e 61 6d 65 20 | where t|he name |
|00000200| 69 73 20 61 20 70 6f 69 | 6e 74 65 72 2c 0a 25 20 |is a poi|nter,.% |
|00000210| 65 2e 67 2e 20 74 6f 20 | 74 79 70 65 73 65 74 0a |e.g. to |typeset.|
|00000220| 25 0a 25 20 74 79 70 65 | 64 65 66 20 76 6f 69 64 |%.% type|def void|
|00000230| 20 28 2a 77 78 46 75 6e | 63 74 69 6f 6e 29 28 77 | (*wxFun|ction)(w|
|00000240| 78 4f 62 6a 65 63 74 26 | 29 0a 25 0a 25 20 77 72 |xObject&|).%.% wr|
|00000250| 69 74 65 3a 0a 25 0a 25 | 20 5c 70 66 75 6e 63 7b |ite:.%.%| \pfunc{|
|00000260| 74 79 70 65 64 65 66 20 | 76 6f 69 64 7d 7b 77 78 |typedef |void}{wx|
|00000270| 46 75 6e 63 74 69 6f 6e | 7d 7b 70 61 72 61 6d 7b |Function|}{param{|
|00000280| 77 78 4f 62 6a 65 63 74 | 26 7d 7d 0a 0a 5c 6e 65 |wxObject|&}}..\ne|
|00000290| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 70 66 75 6e 63 7d |wcommand|{\pfunc}|
|000002a0| 5b 33 5d 7b 5c 68 61 6e | 67 61 66 74 65 72 3d 31 |[3]{\han|gafter=1|
|000002b0| 5c 6e 6f 69 6e 64 65 6e | 74 5c 68 61 6e 67 69 6e |\noinden|t\hangin|
|000002c0| 64 65 6e 74 3d 31 30 6d | 6d 0a 7b 5c 62 66 20 23 |dent=10m|m.{\bf #|
|000002d0| 31 20 28 2a 23 32 29 5c | 69 6e 64 65 78 7b 23 32 |1 (*#2)\|index{#2|
|000002e0| 7d 7d 28 23 33 29 7d 0a | 0a 5c 6e 65 77 63 6f 6d |}}(#3)}.|.\newcom|
|000002f0| 6d 61 6e 64 7b 5c 6d 65 | 6d 62 65 72 7d 5b 32 5d |mand{\me|mber}[2]|
|00000300| 7b 7b 5c 62 66 20 23 31 | 20 5c 69 74 20 23 32 7d |{{\bf #1| \it #2}|
|00000310| 7d 0a 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |}..\newc|ommand{\|
|00000320| 70 61 72 61 6d 7d 5b 32 | 5d 7b 7b 5c 62 66 20 23 |param}[2|]{{\bf #|
|00000330| 31 7d 7b 5c 69 74 20 23 | 32 7d 7d 0a 0a 5c 6e 65 |1}{\it #|2}}..\ne|
|00000340| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 63 6c 61 73 73 7d |wcommand|{\class}|
|00000350| 5b 31 5d 7b 23 31 5c 69 | 6e 64 65 78 7b 23 31 7d |[1]{#1\i|ndex{#1}|
|00000360| 7d 0a 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |}..\newc|ommand{\|
|00000370| 76 6f 69 64 7d 7b 7b 5c | 62 66 20 76 6f 69 64 7d |void}{{\|bf void}|
|00000380| 7d 0a 0a 5c 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |}..\newc|ommand{\|
|00000390| 64 65 73 74 72 75 63 74 | 7d 5b 31 5d 7b 7b 24 5c |destruct|}[1]{{$\|
|000003a0| 73 69 6d 24 7d 23 31 7d | 0a 0a 5c 6d 61 6b 65 69 |sim$}#1}|..\makei|
|000003b0| 6e 64 65 78 0a 5c 62 65 | 67 69 6e 7b 64 6f 63 75 |ndex.\be|gin{docu|
|000003c0| 6d 65 6e 74 7d 0a 5c 6d | 61 6b 65 74 69 74 6c 65 |ment}.\m|aketitle|
|000003d0| 0a 0a 5c 73 65 63 74 69 | 6f 6e 7b 49 6e 74 72 6f |..\secti|on{Intro|
|000003e0| 64 75 63 74 69 6f 6e 7d | 0a 0a 54 68 69 73 20 73 |duction}|..This s|
|000003f0| 68 6f 72 74 20 74 75 74 | 6f 72 69 61 6c 20 61 63 |hort tut|orial ac|
|00000400| 63 6f 6d 70 61 6e 69 65 | 73 20 74 68 65 20 6d 61 |companie|s the ma|
|00000410| 69 6e 20 77 78 57 69 6e | 64 6f 77 73 20 31 2e 33 |in wxWin|dows 1.3|
|00000420| 30 20 6d 61 6e 75 61 6c | 2c 20 61 6e 64 20 74 61 |0 manual|, and ta|
|00000430| 6b 65 73 0a 61 20 6c 6f | 6f 6b 20 61 74 20 73 6f |kes.a lo|ok at so|
|00000440| 6d 65 20 6f 66 20 74 68 | 65 20 73 75 70 70 6c 69 |me of th|e suppli|
|00000450| 65 64 20 64 65 6d 6f 6e | 73 74 72 61 74 69 6f 6e |ed demon|stration|
|00000460| 20 70 72 6f 67 72 61 6d | 73 2e 20 20 54 68 65 20 | program|s. The |
|00000470| 74 75 74 6f 72 69 61 6c | 0a 69 73 20 69 6e 63 6f |tutorial|.is inco|
|00000480| 6d 70 6c 65 74 65 20 61 | 6e 64 20 6d 61 79 20 62 |mplete a|nd may b|
|00000490| 65 20 65 78 70 61 6e 64 | 65 64 20 69 6e 20 6c 61 |e expand|ed in la|
|000004a0| 74 65 72 20 72 65 6c 65 | 61 73 65 73 2e 0a 0a 5c |ter rele|ases...\|
|000004b0| 73 65 63 74 69 6f 6e 7b | 54 68 65 20 64 65 6d 6f |section{|The demo|
|000004c0| 20 70 72 6f 67 72 61 6d | 73 7d 0a 0a 5c 73 75 62 | program|s}..\sub|
|000004d0| 73 65 63 74 69 6f 6e 7b | 41 20 6d 69 6e 69 6d 61 |section{|A minima|
|000004e0| 6c 20 77 78 57 69 6e 64 | 6f 77 73 20 70 72 6f 67 |l wxWind|ows prog|
|000004f0| 72 61 6d 7d 0a 0a 54 68 | 65 20 62 65 73 74 20 77 |ram}..Th|e best w|
|00000500| 61 79 20 74 6f 20 67 65 | 74 20 61 20 66 65 65 6c |ay to ge|t a feel|
|00000510| 20 66 6f 72 20 68 6f 77 | 20 74 6f 20 75 73 65 20 | for how| to use |
|00000520| 61 20 74 6f 6f 6c 20 69 | 73 20 74 6f 20 73 65 65 |a tool i|s to see|
|00000530| 20 61 20 73 6d 61 6c 6c | 0a 65 78 61 6d 70 6c 65 | a small|.example|
|00000540| 2e 20 20 54 68 65 20 73 | 75 70 70 6c 69 65 64 20 |. The s|upplied |
|00000550| 64 65 6d 6f 20 60 6d 69 | 6e 69 6d 61 6c 27 20 28 |demo `mi|nimal' (|
|00000560| 73 6f 75 72 63 65 20 66 | 69 6c 65 20 7b 5c 74 74 |source f|ile {\tt|
|00000570| 20 6d 69 6e 69 6d 61 6c | 2e 63 63 7d 29 0a 73 68 | minimal|.cc}).sh|
|00000580| 6f 77 73 20 61 20 72 75 | 64 69 6d 65 6e 74 61 72 |ows a ru|dimentar|
|00000590| 79 20 77 78 57 69 6e 64 | 6f 77 73 20 70 72 6f 67 |y wxWind|ows prog|
|000005a0| 72 61 6d 2e 20 49 74 20 | 68 61 73 20 61 20 6d 61 |ram. It |has a ma|
|000005b0| 69 6e 20 77 69 6e 64 6f | 77 20 77 69 74 68 20 61 |in windo|w with a|
|000005c0| 20 70 61 6e 65 6c 0a 69 | 6e 73 69 64 65 20 69 74 | panel.i|nside it|
|000005d0| 2c 20 64 69 73 70 6c 61 | 79 69 6e 67 20 61 20 6d |, displa|ying a m|
|000005e0| 65 73 73 61 67 65 2e 20 | 54 68 65 72 65 20 69 73 |essage. |There is|
|000005f0| 20 61 20 6d 65 6e 75 20 | 62 61 72 20 77 69 74 68 | a menu |bar with|
|00000600| 20 61 20 7b 5c 62 66 20 | 46 69 6c 65 7d 20 6d 65 | a {\bf |File} me|
|00000610| 6e 75 0a 77 68 69 63 68 | 20 69 6e 20 74 75 72 6e |nu.which| in turn|
|00000620| 20 68 61 73 20 61 20 7b | 5c 62 66 20 51 75 69 74 | has a {|\bf Quit|
|00000630| 7d 20 6f 70 74 69 6f 6e | 2c 20 61 6e 64 20 74 68 |} option|, and th|
|00000640| 65 20 70 72 6f 67 72 61 | 6d 20 68 61 73 20 69 74 |e progra|m has it|
|00000650| 73 20 6f 77 6e 20 69 63 | 6f 6e 2e 20 55 6e 64 65 |s own ic|on. Unde|
|00000660| 72 0a 57 69 6e 64 6f 77 | 73 20 33 2c 20 74 68 65 |r.Window|s 3, the|
|00000670| 20 73 79 73 74 65 6d 20 | 6d 65 6e 75 20 73 68 6f | system |menu sho|
|00000680| 77 73 20 74 68 65 20 75 | 73 75 61 6c 20 6f 70 74 |ws the u|sual opt|
|00000690| 69 6f 6e 73 20 69 6e 63 | 6c 75 64 69 6e 67 20 4d |ions inc|luding M|
|000006a0| 69 6e 69 6d 69 7a 65 2c | 0a 4d 61 78 69 6d 69 7a |inimize,|.Maximiz|
|000006b0| 65 20 61 6e 64 20 43 6c | 6f 73 65 2c 20 61 6e 64 |e and Cl|ose, and|
|000006c0| 20 75 6e 64 65 72 20 58 | 2c 20 74 68 65 72 65 20 | under X|, there |
|000006d0| 69 73 20 61 20 73 69 6d | 69 6c 61 72 20 70 75 6c |is a sim|ilar pul|
|000006e0| 6c 2d 64 6f 77 6e 20 73 | 79 73 74 65 6d 0a 6d 65 |l-down s|ystem.me|
|000006f0| 6e 75 20 70 72 6f 76 69 | 64 65 64 20 62 79 20 74 |nu provi|ded by t|
|00000700| 68 65 20 63 75 72 72 65 | 6e 74 20 77 69 6e 64 6f |he curre|nt windo|
|00000710| 77 20 6d 61 6e 61 67 65 | 72 2e 20 54 68 65 20 77 |w manage|r. The w|
|00000720| 69 6e 64 6f 77 20 69 73 | 20 72 65 73 69 7a 65 61 |indow is| resizea|
|00000730| 62 6c 65 2c 0a 61 6e 64 | 20 74 68 65 20 70 61 6e |ble,.and| the pan|
|00000740| 65 6c 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |el autom|atically|
|00000750| 20 72 65 73 69 7a 65 73 | 20 74 6f 20 66 69 74 20 | resizes| to fit |
|00000760| 69 74 73 20 70 61 72 65 | 6e 74 2e 0a 0a 4c 6f 6f |its pare|nt...Loo|
|00000770| 6b 20 61 74 20 7b 5c 74 | 74 20 6d 69 6e 69 6d 61 |k at {\t|t minima|
|00000780| 6c 2e 63 63 7d 2e 0a 0a | 5c 76 65 72 62 61 74 69 |l.cc}...|\verbati|
|00000790| 6d 69 6e 70 75 74 7b 2e | 2e 2f 73 61 6d 70 6c 65 |minput{.|./sample|
|000007a0| 73 2f 6d 69 6e 69 6d 61 | 6c 2f 6d 69 6e 69 6d 61 |s/minima|l/minima|
|000007b0| 6c 2e 63 63 7d 0a 0a 54 | 68 65 20 73 74 61 74 65 |l.cc}..T|he state|
|000007c0| 6d 65 6e 74 20 7b 5c 74 | 74 20 5c 23 69 6e 63 6c |ment {\t|t \#incl|
|000007d0| 75 64 65 20 22 77 78 2e | 68 22 7d 20 70 72 6f 76 |ude "wx.|h"} prov|
|000007e0| 69 64 65 73 20 74 68 65 | 20 70 72 6f 67 72 61 6d |ides the| program|
|000007f0| 20 77 69 74 68 20 61 63 | 63 65 73 73 20 74 6f 0a | with ac|cess to.|
|00000800| 61 6c 6c 20 74 68 65 20 | 77 78 57 69 6e 64 6f 77 |all the |wxWindow|
|00000810| 73 20 63 6c 61 73 73 65 | 73 20 61 6e 64 20 66 75 |s classe|s and fu|
|00000820| 6e 63 74 69 6f 6e 73 2e | 0a 0a 54 68 65 20 66 69 |nctions.|..The fi|
|00000830| 72 73 74 20 63 6c 61 73 | 73 20 64 65 63 6c 61 72 |rst clas|s declar|
|00000840| 61 74 69 6f 6e 2c 20 7b | 5c 62 66 20 4d 79 41 70 |ation, {|\bf MyAp|
|00000850| 70 7d 2c 20 64 65 63 6c | 61 72 65 73 20 61 20 6e |p}, decl|ares a n|
|00000860| 65 77 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2c 0a |ew appli|cation,.|
|00000870| 6f 76 65 72 72 69 64 69 | 6e 67 20 6f 6e 65 20 6d |overridi|ng one m|
|00000880| 65 6d 62 65 72 20 66 75 | 6e 63 74 69 6f 6e 20 7b |ember fu|nction {|
|00000890| 5c 62 66 20 4f 6e 49 6e | 69 74 7d 2e 20 54 68 69 |\bf OnIn|it}. Thi|
|000008a0| 73 20 69 73 20 61 6e 20 | 65 73 73 65 6e 74 69 61 |s is an |essentia|
|000008b0| 6c 20 70 61 72 74 0a 6f | 66 20 77 72 69 74 69 6e |l part.o|f writin|
|000008c0| 67 20 61 20 77 78 57 69 | 6e 64 6f 77 73 20 70 72 |g a wxWi|ndows pr|
|000008d0| 6f 67 72 61 6d 2c 20 73 | 69 6e 63 65 20 7b 5c 62 |ogram, s|ince {\b|
|000008e0| 66 20 4f 6e 49 6e 69 74 | 7d 20 69 73 20 74 68 65 |f OnInit|} is the|
|000008f0| 20 65 71 75 69 76 61 6c | 65 6e 74 20 6f 66 0a 7b | equival|ent of.{|
|00000900| 5c 62 66 20 6d 61 69 6e | 7d 20 69 6e 20 61 20 6e |\bf main|} in a n|
|00000910| 6f 72 6d 61 6c 20 43 2b | 2b 20 70 72 6f 67 72 61 |ormal C+|+ progra|
|00000920| 6d 2e 0a 0a 54 68 65 20 | 63 6c 61 73 73 20 7b 5c |m...The |class {\|
|00000930| 62 66 20 4d 79 46 72 61 | 6d 65 7d 20 64 65 63 6c |bf MyFra|me} decl|
|00000940| 61 72 65 73 20 61 20 63 | 6f 6e 73 74 72 75 63 74 |ares a c|onstruct|
|00000950| 6f 72 2c 20 61 6e 64 20 | 61 20 6d 65 73 73 61 67 |or, and |a messag|
|00000960| 65 20 68 61 6e 64 6c 65 | 72 0a 66 6f 72 20 69 6e |e handle|r.for in|
|00000970| 74 65 72 63 65 70 74 69 | 6e 67 20 6d 65 6e 75 20 |tercepti|ng menu |
|00000980| 63 6f 6d 6d 61 6e 64 73 | 2e 0a 0a 54 68 65 20 64 |commands|...The d|
|00000990| 65 66 69 6e 69 74 69 6f | 6e 20 6f 66 20 74 68 65 |efinitio|n of the|
|000009a0| 20 67 6c 6f 62 61 6c 20 | 76 61 72 69 61 62 6c 65 | global |variable|
|000009b0| 20 7b 5c 62 66 20 6d 79 | 41 70 70 7d 20 6c 6f 6f | {\bf my|App} loo|
|000009c0| 6b 73 20 69 6e 6e 6f 63 | 75 6f 75 73 20 65 6e 6f |ks innoc|uous eno|
|000009d0| 75 67 68 0a 62 75 74 20 | 74 68 69 73 20 73 74 61 |ugh.but |this sta|
|000009e0| 72 74 73 20 74 68 65 20 | 77 68 6f 6c 65 20 61 70 |rts the |whole ap|
|000009f0| 70 6c 69 63 61 74 69 6f | 6e 20 67 6f 69 6e 67 20 |plicatio|n going |
|00000a00| 73 69 6d 70 6c 79 20 62 | 79 20 62 65 69 6e 67 20 |simply b|y being |
|00000a10| 64 65 66 69 6e 65 64 2e | 0a 0a 54 68 65 20 7b 5c |defined.|..The {\|
|00000a20| 62 66 20 4f 6e 49 6e 69 | 74 7d 20 4d 79 41 70 70 |bf OnIni|t} MyApp|
|00000a30| 20 6d 65 6d 62 65 72 20 | 66 75 6e 63 74 69 6f 6e | member |function|
|00000a40| 20 64 6f 65 73 20 74 68 | 65 20 69 6e 69 74 69 61 | does th|e initia|
|00000a50| 6c 69 7a 61 74 69 6f 6e | 20 6f 66 0a 74 68 65 20 |lization| of.the |
|00000a60| 70 72 6f 67 72 61 6d 2e | 20 49 74 20 63 72 65 61 |program.| It crea|
|00000a70| 74 65 73 20 61 20 6d 61 | 69 6e 20 66 72 61 6d 65 |tes a ma|in frame|
|00000a80| 2c 20 73 65 74 73 20 74 | 68 65 20 69 63 6f 6e 2c |, sets t|he icon,|
|00000a90| 0a 63 72 65 61 74 65 73 | 20 61 20 6d 65 6e 75 20 |.creates| a menu |
|00000aa0| 62 61 72 2c 20 61 20 70 | 61 6e 65 6c 2c 20 61 6e |bar, a p|anel, an|
|00000ab0| 64 20 61 20 70 61 6e 65 | 6c 20 69 74 65 6d 2e 0a |d a pane|l item..|
|00000ac0| 0a 54 68 65 20 7b 5c 62 | 66 20 4d 79 46 72 61 6d |.The {\b|f MyFram|
|00000ad0| 65 7d 20 63 6f 6e 73 74 | 72 75 63 74 6f 72 20 6d |e} const|ructor m|
|00000ae0| 61 79 20 73 65 65 6d 20 | 61 20 6c 69 74 74 6c 65 |ay seem |a little|
|00000af0| 20 70 6f 69 6e 74 6c 65 | 73 73 2c 20 62 75 74 20 | pointle|ss, but |
|00000b00| 69 74 0a 66 75 6c 66 69 | 6c 73 20 74 68 65 20 72 |it.fulfi|ls the r|
|00000b10| 65 71 75 69 72 65 6d 65 | 6e 74 73 20 6f 66 20 4d |equireme|nts of M|
|00000b20| 69 63 72 6f 73 6f 66 74 | 20 43 2f 43 2b 2b 20 73 |icrosoft| C/C++ s|
|00000b30| 79 6e 74 61 78 20 69 6e | 20 64 65 66 69 6e 69 6e |yntax in| definin|
|00000b40| 67 0a 74 68 65 20 63 6f | 6e 73 74 72 75 63 74 6f |g.the co|nstructo|
|00000b50| 72 20 69 6e 20 74 65 72 | 6d 73 20 6f 66 20 69 74 |r in ter|ms of it|
|00000b60| 73 20 70 61 72 65 6e 74 | 27 73 20 63 6f 6e 73 74 |s parent|'s const|
|00000b70| 72 75 63 74 6f 72 2e 0a | 0a 54 68 65 20 7b 5c 62 |ructor..|.The {\b|
|00000b80| 66 20 4f 6e 4d 65 6e 75 | 43 6f 6d 6d 61 6e 64 7d |f OnMenu|Command}|
|00000b90| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 69 6e 74 65 | definit|ion inte|
|00000ba0| 72 63 65 70 74 73 20 6d | 65 6e 75 20 63 6f 6d 6d |rcepts m|enu comm|
|00000bb0| 61 6e 64 73 20 66 6f 72 | 20 74 68 65 20 6d 61 69 |ands for| the mai|
|00000bc0| 6e 0a 66 72 61 6d 65 2e | 20 49 66 20 74 68 65 20 |n.frame.| If the |
|00000bd0| 6f 70 74 69 6f 6e 20 63 | 68 6f 73 65 6e 20 69 73 |option c|hosen is|
|00000be0| 20 7b 5c 62 66 20 51 75 | 69 74 7d 2c 20 74 68 65 | {\bf Qu|it}, the|
|00000bf0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 74 65 72 | applica|tion ter|
|00000c00| 6d 69 6e 61 74 65 73 20 | 62 79 0a 64 65 6c 65 74 |minates |by.delet|
|00000c10| 69 6e 67 20 74 68 65 20 | 6d 61 69 6e 20 66 72 61 |ing the |main fra|
|00000c20| 6d 65 2e 20 4e 6f 72 6d | 61 6c 6c 79 20 61 6e 79 |me. Norm|ally any|
|00000c30| 20 6f 74 68 65 72 20 65 | 78 69 73 74 69 6e 67 20 | other e|xisting |
|00000c40| 66 72 61 6d 65 73 20 73 | 68 6f 75 6c 64 20 62 65 |frames s|hould be|
|00000c50| 0a 64 65 6c 65 74 65 64 | 20 28 73 75 62 66 72 61 |.deleted| (subfra|
|00000c60| 6d 65 73 20 61 72 65 20 | 64 65 6c 65 74 65 64 20 |mes are |deleted |
|00000c70| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 29 3b 20 |automati|cally); |
|00000c80| 74 68 65 73 65 20 63 61 | 6c 6c 73 20 61 72 65 20 |these ca|lls are |
|00000c90| 75 73 75 61 6c 6c 79 20 | 70 75 74 0a 69 6e 20 74 |usually |put.in t|
|00000ca0| 68 65 20 66 72 61 6d 65 | 27 73 20 7b 5c 62 66 20 |he frame|'s {\bf |
|00000cb0| 4f 6e 43 6c 6f 73 65 7d | 20 68 61 6e 64 6c 65 72 |OnClose}| handler|
|00000cc0| 20 73 6f 20 74 68 61 74 | 20 61 20 73 79 73 74 65 | so that| a syste|
|00000cd0| 6d 2d 67 65 6e 65 72 61 | 74 65 64 20 7b 5c 62 66 |m-genera|ted {\bf|
|00000ce0| 0a 4f 6e 43 6c 6f 73 65 | 7d 20 65 76 65 6e 74 20 |.OnClose|} event |
|00000cf0| 77 69 6c 6c 20 65 6e 61 | 62 6c 65 20 74 68 65 20 |will ena|ble the |
|00000d00| 70 72 6f 67 72 61 6d 20 | 74 6f 20 63 6c 65 61 6e |program |to clean|
|00000d10| 20 69 74 73 65 6c 66 20 | 75 70 20 66 69 72 73 74 | itself |up first|
|00000d20| 2e 0a 53 79 73 74 65 6d | 2d 67 65 6e 65 72 61 74 |..System|-generat|
|00000d30| 65 64 20 7b 5c 62 66 20 | 4f 6e 43 6c 6f 73 65 7d |ed {\bf |OnClose}|
|00000d40| 20 65 76 65 6e 74 73 20 | 64 65 6c 65 74 65 20 74 | events |delete t|
|00000d50| 68 65 20 6d 61 69 6e 20 | 66 72 61 6d 65 20 61 66 |he main |frame af|
|00000d60| 74 65 72 20 63 61 6c 6c | 69 6e 67 0a 7b 5c 62 66 |ter call|ing.{\bf|
|00000d70| 20 4f 6e 43 6c 6f 73 65 | 7d 2c 20 73 6f 20 74 68 | OnClose|}, so th|
|00000d80| 69 73 20 73 68 6f 75 6c | 64 20 6e 6f 74 20 62 65 |is shoul|d not be|
|00000d90| 20 64 6f 6e 65 20 66 72 | 6f 6d 20 77 69 74 68 69 | done fr|om withi|
|00000da0| 6e 20 7b 5c 62 66 20 4f | 6e 43 6c 6f 73 65 7d 2e |n {\bf O|nClose}.|
|00000db0| 0a 0a 5c 73 75 62 73 65 | 63 74 69 6f 6e 7b 4d 6f |..\subse|ction{Mo|
|00000dc0| 72 65 20 61 64 76 61 6e | 63 65 64 20 66 65 61 74 |re advan|ced feat|
|00000dd0| 75 72 65 73 3a 20 74 68 | 65 20 7b 5c 69 74 20 68 |ures: th|e {\it h|
|00000de0| 65 6c 6c 6f 7d 20 64 65 | 6d 6f 7d 0a 0a 54 68 65 |ello} de|mo}..The|
|00000df0| 20 60 68 65 6c 6c 6f 27 | 20 28 73 6f 75 72 63 65 | `hello'| (source|
|00000e00| 20 66 69 6c 65 73 2c 20 | 7b 5c 74 74 20 68 65 6c | files, |{\tt hel|
|00000e10| 6c 6f 2e 63 63 7d 20 61 | 6e 64 20 7b 5c 74 74 20 |lo.cc} a|nd {\tt |
|00000e20| 68 65 6c 6c 6f 2e 68 7d | 20 73 68 6f 77 73 20 6f |hello.h}| shows o|
|00000e30| 66 66 0a 73 6f 6d 65 20 | 6d 6f 72 65 20 77 78 57 |ff.some |more wxW|
|00000e40| 69 6e 64 6f 77 73 20 66 | 65 61 74 75 72 65 73 20 |indows f|eatures |
|00000e50| 28 73 65 65 20 46 69 67 | 75 72 65 73 20 5c 72 65 |(see Fig|ures \re|
|00000e60| 66 7b 64 65 6d 6f 2d 78 | 7d 20 61 6e 64 0a 5c 72 |f{demo-x|} and.\r|
|00000e70| 65 66 7b 64 65 6d 6f 2d | 6d 73 7d 29 2e 20 20 57 |ef{demo-|ms}). W|
|00000e80| 68 65 6e 20 72 75 6e 2c | 20 74 77 6f 20 77 69 6e |hen run,| two win|
|00000e90| 64 6f 77 73 20 70 6f 70 | 20 75 70 2e 20 4f 6e 65 |dows pop| up. One|
|00000ea0| 20 69 73 20 74 68 65 20 | 60 6d 61 69 6e 20 77 69 | is the |`main wi|
|00000eb0| 6e 64 6f 77 27 2c 0a 77 | 69 74 68 20 74 77 6f 20 |ndow',.w|ith two |
|00000ec0| 73 75 62 77 69 6e 64 6f | 77 73 20 2d 20 61 20 70 |subwindo|ws - a p|
|00000ed0| 61 6e 65 6c 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 |anel con|taining |
|00000ee0| 76 61 72 69 6f 75 73 20 | 60 77 69 64 67 65 74 73 |various |`widgets|
|00000ef0| 27 2c 20 61 6e 64 20 61 | 20 74 65 78 74 0a 77 69 |', and a| text.wi|
|00000f00| 6e 64 6f 77 2e 20 20 54 | 68 65 20 6f 74 68 65 72 |ndow. T|he other|
|00000f10| 20 63 6f 6e 74 61 69 6e | 73 20 61 20 63 61 6e 76 | contain|s a canv|
|00000f20| 61 73 2c 20 64 72 61 77 | 69 6e 67 20 73 6f 6d 65 |as, draw|ing some|
|00000f30| 20 73 69 6d 70 6c 65 20 | 73 68 61 70 65 73 2c 20 | simple |shapes, |
|00000f40| 61 6e 64 0a 61 6c 6c 6f | 77 69 6e 67 20 74 68 65 |and.allo|wing the|
|00000f50| 20 75 73 65 72 20 74 6f | 20 64 6f 6f 64 6c 65 20 | user to| doodle |
|00000f60| 6f 6e 20 69 74 20 62 79 | 20 64 72 61 67 67 69 6e |on it by| draggin|
|00000f70| 67 20 77 69 74 68 20 74 | 68 65 20 6c 65 66 74 20 |g with t|he left |
|00000f80| 6d 6f 75 73 65 0a 62 75 | 74 74 6f 6e 2e 20 20 54 |mouse.bu|tton. T|
|00000f90| 68 65 20 63 61 6e 76 61 | 73 20 63 6f 6e 74 65 6e |he canva|s conten|
|00000fa0| 74 73 20 63 61 6e 20 62 | 65 20 73 63 61 6c 65 64 |ts can b|e scaled|
|00000fb0| 20 61 6e 64 20 70 72 69 | 6e 74 65 64 20 6f 75 74 | and pri|nted out|
|00000fc0| 2c 20 65 69 74 68 65 72 | 20 74 6f 20 61 0a 70 72 |, either| to a.pr|
|00000fd0| 69 6e 74 65 72 20 73 75 | 70 70 6f 72 74 65 64 20 |inter su|pported |
|00000fe0| 62 79 20 57 69 6e 64 6f | 77 73 20 6f 72 20 74 6f |by Windo|ws or to|
|00000ff0| 20 50 6f 73 74 53 63 72 | 69 70 74 2c 20 77 72 69 | PostScr|ipt, wri|
|00001000| 74 69 6e 67 20 74 6f 20 | 61 0a 66 69 6c 65 20 6f |ting to |a.file o|
|00001010| 72 20 69 6e 76 6f 6b 69 | 6e 67 20 74 68 65 20 70 |r invoki|ng the p|
|00001020| 72 69 6e 74 65 72 20 64 | 69 72 65 63 74 6c 79 2e |rinter d|irectly.|
|00001030| 20 55 6e 64 65 72 20 57 | 69 6e 64 6f 77 73 2c 20 | Under W|indows, |
|00001040| 74 68 65 20 67 72 61 70 | 68 69 63 20 6d 61 79 20 |the grap|hic may |
|00001050| 62 65 0a 63 6f 70 69 65 | 64 20 74 6f 20 74 68 65 |be.copie|d to the|
|00001060| 20 63 6c 69 70 62 6f 61 | 72 64 20 61 73 20 61 20 | clipboa|rd as a |
|00001070| 6d 65 74 61 66 69 6c 65 | 2e 0a 0a 5c 62 65 67 69 |metafile|...\begi|
|00001080| 6e 7b 66 69 67 75 72 65 | 7d 0a 24 24 5c 70 73 62 |n{figure|}.$$\psb|
|00001090| 6f 78 74 6f 28 31 31 63 | 6d 3b 30 63 6d 29 7b 68 |oxto(11c|m;0cm){h|
|000010a0| 65 6c 6c 6f 5f 78 2e 65 | 70 73 7d 0a 24 24 0a 5c |ello_x.e|ps}.$$.\|
|000010b0| 63 61 70 74 69 6f 6e 7b | 44 65 6d 6f 20 70 72 6f |caption{|Demo pro|
|000010c0| 67 72 61 6d 20 72 75 6e | 6e 69 6e 67 20 75 6e 64 |gram run|ning und|
|000010d0| 65 72 20 58 7d 5c 6c 61 | 62 65 6c 7b 64 65 6d 6f |er X}\la|bel{demo|
|000010e0| 2d 78 7d 0a 0a 5c 65 6e | 64 7b 66 69 67 75 72 65 |-x}..\en|d{figure|
|000010f0| 7d 0a 5c 62 65 67 69 6e | 7b 66 69 67 75 72 65 7d |}.\begin|{figure}|
|00001100| 0a 24 24 5c 70 73 62 6f | 78 74 6f 28 31 31 63 6d |.$$\psbo|xto(11cm|
|00001110| 3b 30 63 6d 29 7b 68 65 | 6c 6c 6f 5f 77 2e 65 70 |;0cm){he|llo_w.ep|
|00001120| 73 7d 0a 24 24 0a 5c 63 | 61 70 74 69 6f 6e 7b 44 |s}.$$.\c|aption{D|
|00001130| 65 6d 6f 20 70 72 6f 67 | 72 61 6d 20 72 75 6e 6e |emo prog|ram runn|
|00001140| 69 6e 67 20 75 6e 64 65 | 72 20 57 69 6e 64 6f 77 |ing unde|r Window|
|00001150| 73 20 33 7d 5c 6c 61 62 | 65 6c 7b 64 65 6d 6f 2d |s 3}\lab|el{demo-|
|00001160| 6d 73 7d 0a 5c 65 6e 64 | 7b 66 69 67 75 72 65 7d |ms}.\end|{figure}|
|00001170| 0a 0a 42 6f 74 68 20 66 | 72 61 6d 65 73 20 63 61 |..Both f|rames ca|
|00001180| 6e 20 62 65 20 72 65 73 | 69 7a 65 64 2c 20 61 6e |n be res|ized, an|
|00001190| 64 20 74 68 65 20 73 75 | 62 77 69 6e 64 6f 77 73 |d the su|bwindows|
|000011a0| 20 77 69 6c 6c 20 62 65 | 20 72 65 73 69 7a 65 64 | will be| resized|
|000011b0| 0a 69 6e 20 61 6e 20 61 | 70 70 72 6f 70 72 69 61 |.in an a|ppropria|
|000011c0| 74 65 20 6d 61 6e 6e 65 | 72 2e 20 54 68 65 20 74 |te manne|r. The t|
|000011d0| 65 78 74 20 73 75 62 77 | 69 6e 64 6f 77 20 63 61 |ext subw|indow ca|
|000011e0| 6e 20 62 65 20 73 63 72 | 6f 6c 6c 65 64 3b 0a 6f |n be scr|olled;.o|
|000011f0| 6e 20 74 68 65 20 70 61 | 6e 65 6c 2c 20 61 20 62 |n the pa|nel, a b|
|00001200| 75 74 74 6f 6e 20 63 61 | 6e 20 62 65 20 70 72 65 |utton ca|n be pre|
|00001210| 73 73 65 64 20 66 6f 72 | 20 74 68 65 20 70 72 6f |ssed for| the pro|
|00001220| 67 72 61 6d 20 74 6f 20 | 70 72 6f 6d 70 74 20 74 |gram to |prompt t|
|00001230| 68 65 20 75 73 65 72 0a | 77 69 74 68 20 74 65 78 |he user.|with tex|
|00001240| 74 20 77 69 74 68 20 77 | 68 69 63 68 20 74 6f 20 |t with w|hich to |
|00001250| 73 65 74 20 74 68 65 20 | 73 74 61 74 75 73 20 62 |set the |status b|
|00001260| 61 72 2e 20 43 6c 69 63 | 6b 69 6e 67 20 6f 6e 20 |ar. Clic|king on |
|00001270| 74 68 65 0a 6c 69 73 74 | 20 62 6f 78 20 77 72 69 |the.list| box wri|
|00001280| 74 65 73 20 61 20 6c 69 | 6e 65 20 6f 66 20 74 65 |tes a li|ne of te|
|00001290| 78 74 20 69 6e 74 6f 20 | 74 68 65 20 74 65 78 74 |xt into |the text|
|000012a0| 20 77 69 6e 64 6f 77 2e | 0a 0a 54 68 65 20 7b 5c | window.|..The {\|
|000012b0| 62 66 20 46 69 6c 65 7d | 20 6d 65 6e 75 20 68 61 |bf File}| menu ha|
|000012c0| 73 20 6f 70 74 69 6f 6e | 73 20 66 6f 72 20 73 65 |s option|s for se|
|000012d0| 6c 65 63 74 69 6e 67 20 | 74 68 65 20 60 6d 61 70 |lecting |the `map|
|000012e0| 70 69 6e 67 20 6d 6f 64 | 65 27 20 28 6c 6f 67 69 |ping mod|e' (logi|
|000012f0| 63 61 6c 0a 64 69 6d 65 | 6e 73 69 6f 6e 73 29 20 |cal.dime|nsions) |
|00001300| 75 73 65 64 20 69 6e 20 | 64 72 61 77 69 6e 67 20 |used in |drawing |
|00001310| 67 72 61 70 68 69 63 73 | 2c 20 61 20 7a 6f 6f 6d |graphics|, a zoom|
|00001320| 20 6f 70 74 69 6f 6e 2c | 20 61 6e 64 20 61 6e 20 | option,| and an |
|00001330| 6f 70 74 69 6f 6e 20 66 | 6f 72 0a 6c 6f 61 64 69 |option f|or.loadi|
|00001340| 6e 67 20 61 20 66 69 6c | 65 20 69 6e 74 6f 20 74 |ng a fil|e into t|
|00001350| 68 65 20 74 65 78 74 20 | 73 75 62 77 69 6e 64 6f |he text |subwindo|
|00001360| 77 20 75 73 69 6e 67 20 | 61 20 66 69 6c 65 20 73 |w using |a file s|
|00001370| 65 6c 65 63 74 6f 72 20 | 74 6f 6f 6c 2e 0a 0a 54 |elector |tool...T|
|00001380| 68 65 20 7b 5c 62 66 20 | 54 69 6d 65 72 7d 20 6d |he {\bf |Timer} m|
|00001390| 65 6e 75 20 61 6c 6c 6f | 77 73 20 74 68 65 20 75 |enu allo|ws the u|
|000013a0| 73 65 72 20 74 6f 20 73 | 77 69 74 63 68 20 61 20 |ser to s|witch a |
|000013b0| 74 69 6d 65 72 20 6f 6e | 20 61 6e 64 20 6f 66 66 |timer on| and off|
|000013c0| 3b 20 77 68 65 6e 20 6f | 6e 2c 0a 73 6f 6d 65 20 |; when o|n,.some |
|000013d0| 74 65 78 74 20 67 65 74 | 73 20 77 72 69 74 74 65 |text get|s writte|
|000013e0| 6e 20 74 6f 20 74 68 65 | 20 74 65 78 74 20 73 75 |n to the| text su|
|000013f0| 62 77 69 6e 64 6f 77 20 | 65 76 65 72 79 20 66 69 |bwindow |every fi|
|00001400| 76 65 20 73 65 63 6f 6e | 64 73 2e 0a 0a 54 68 65 |ve secon|ds...The|
|00001410| 20 7b 5c 62 66 20 43 75 | 72 73 6f 72 7d 20 6d 65 | {\bf Cu|rsor} me|
|00001420| 6e 75 20 65 6e 61 62 6c | 65 73 20 74 68 65 20 63 |nu enabl|es the c|
|00001430| 61 6e 76 61 73 20 63 75 | 72 73 6f 72 20 74 6f 20 |anvas cu|rsor to |
|00001440| 62 65 20 63 68 61 6e 67 | 65 64 2c 20 61 6e 64 20 |be chang|ed, and |
|00001450| 6c 65 74 73 0a 74 68 65 | 20 70 6f 74 65 6e 74 69 |lets.the| potenti|
|00001460| 61 6c 20 77 78 57 69 6e | 64 6f 77 73 20 70 72 6f |al wxWin|dows pro|
|00001470| 67 72 61 6d 6d 65 72 20 | 76 69 65 77 20 74 68 65 |grammer |view the|
|00001480| 20 61 76 61 69 6c 61 62 | 6c 65 20 73 74 61 6e 64 | availab|le stand|
|00001490| 61 72 64 20 63 75 72 73 | 6f 72 73 2e 0a 0a 54 68 |ard curs|ors...Th|
|000014a0| 65 20 7b 5c 62 66 20 41 | 62 6f 75 74 7d 20 6f 70 |e {\bf A|bout} op|
|000014b0| 74 69 6f 6e 20 6f 66 20 | 74 68 65 20 48 65 6c 70 |tion of |the Help|
|000014c0| 20 6d 65 6e 75 20 70 6f | 70 73 20 75 70 20 61 20 | menu po|ps up a |
|000014d0| 64 69 61 6c 6f 67 20 62 | 6f 78 20 77 69 74 68 20 |dialog b|ox with |
|000014e0| 73 6f 6d 65 0a 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |some.inf|ormation|
|000014f0| 2e 0a 0a 54 68 69 73 20 | 72 65 70 72 65 73 65 6e |...This |represen|
|00001500| 74 73 20 61 20 66 61 69 | 72 20 61 6d 6f 75 6e 74 |ts a fai|r amount|
|00001510| 20 6f 66 20 47 55 49 20 | 66 75 6e 63 74 69 6f 6e | of GUI |function|
|00001520| 61 6c 69 74 79 20 66 6f | 72 20 61 20 72 65 6c 61 |ality fo|r a rela|
|00001530| 74 69 76 65 6c 79 0a 73 | 6d 61 6c 6c 20 70 72 6f |tively.s|mall pro|
|00001540| 67 72 61 6d 2e 20 54 68 | 69 73 20 69 73 20 62 65 |gram. Th|is is be|
|00001550| 63 61 75 73 65 20 77 78 | 57 69 6e 64 6f 77 73 20 |cause wx|Windows |
|00001560| 63 61 6c 6c 73 20 61 72 | 65 20 68 69 67 68 20 6c |calls ar|e high l|
|00001570| 65 76 65 6c 20 28 63 72 | 65 61 74 69 6e 67 0a 61 |evel (cr|eating.a|
|00001580| 20 77 6f 72 6b 69 6e 67 | 20 74 65 78 74 20 77 69 | working| text wi|
|00001590| 6e 64 6f 77 20 69 73 20 | 61 20 73 69 6e 67 6c 65 |ndow is |a single|
|000015a0| 20 63 61 6c 6c 29 20 61 | 6e 64 20 62 65 63 61 75 | call) a|nd becau|
|000015b0| 73 65 20 61 6e 20 6f 62 | 6a 65 63 74 2d 6f 72 69 |se an ob|ject-ori|
|000015c0| 65 6e 74 65 64 0a 61 70 | 70 72 6f 61 63 68 20 69 |ented.ap|proach i|
|000015d0| 73 20 74 61 6b 65 6e 2c | 20 77 68 65 72 65 20 6d |s taken,| where m|
|000015e0| 75 63 68 20 64 65 66 61 | 75 6c 74 20 66 75 6e 63 |uch defa|ult func|
|000015f0| 74 69 6f 6e 61 6c 69 74 | 79 20 69 73 20 70 72 6f |tionalit|y is pro|
|00001600| 76 69 64 65 64 2e 0a 0a | 4e 6f 74 65 20 61 6c 73 |vided...|Note als|
|00001610| 6f 20 74 68 65 20 6c 61 | 63 6b 20 6f 66 20 65 78 |o the la|ck of ex|
|00001620| 70 6c 69 63 69 74 20 63 | 6f 6f 72 64 69 6e 61 74 |plicit c|oordinat|
|00001630| 65 73 20 6f 72 20 73 69 | 7a 65 73 20 69 6e 20 74 |es or si|zes in t|
|00001640| 68 65 20 70 61 6e 65 6c | 20 69 74 65 6d 0a 63 72 |he panel| item.cr|
|00001650| 65 61 74 69 6f 6e 20 63 | 61 6c 6c 73 2e 20 54 68 |eation c|alls. Th|
|00001660| 69 73 20 69 73 20 74 68 | 65 20 70 72 65 66 65 72 |is is th|e prefer|
|00001670| 72 65 64 20 61 70 70 72 | 6f 61 63 68 2c 20 6c 65 |red appr|oach, le|
|00001680| 61 76 69 6e 67 20 77 78 | 57 69 6e 64 6f 77 73 20 |aving wx|Windows |
|00001690| 74 6f 20 6c 61 79 0a 6f | 75 74 20 74 68 65 20 69 |to lay.o|ut the i|
|000016a0| 74 65 6d 73 20 66 72 6f | 6d 20 6c 65 66 74 20 74 |tems fro|m left t|
|000016b0| 6f 20 72 69 67 68 74 20 | 61 6e 64 20 74 6f 70 20 |o right |and top |
|000016c0| 74 6f 20 62 6f 74 74 6f | 6d 2c 20 77 69 74 68 20 |to botto|m, with |
|000016d0| 74 68 65 20 75 73 65 72 | 0a 69 6e 74 65 72 6a 65 |the user|.interje|
|000016e0| 63 74 69 6e 67 20 74 68 | 65 20 6f 63 63 61 73 69 |cting th|e occasi|
|000016f0| 6f 6e 61 6c 20 7b 5c 62 | 66 20 4e 65 77 4c 69 6e |onal {\b|f NewLin|
|00001700| 65 7d 20 63 61 6c 6c 2e | 20 20 45 78 70 6c 69 63 |e} call.| Explic|
|00001710| 69 74 20 70 6f 73 69 74 | 69 6f 6e 69 6e 67 20 69 |it posit|ioning i|
|00001720| 73 0a 6e 6f 74 20 72 65 | 63 6f 6d 6d 65 6e 64 65 |s.not re|commende|
|00001730| 64 20 73 69 6e 63 65 20 | 69 74 20 69 73 20 6c 65 |d since |it is le|
|00001740| 73 73 20 64 65 76 69 63 | 65 20 69 6e 64 65 70 65 |ss devic|e indepe|
|00001750| 6e 64 65 6e 74 2c 20 62 | 75 74 20 63 61 6e 20 62 |ndent, b|ut can b|
|00001760| 65 20 61 63 68 69 65 76 | 65 64 0a 62 79 20 75 73 |e achiev|ed.by us|
|00001770| 69 6e 67 20 6d 6f 72 65 | 20 70 61 72 61 6d 65 74 |ing more| paramet|
|00001780| 65 72 73 20 74 6f 20 74 | 68 65 20 63 72 65 61 74 |ers to t|he creat|
|00001790| 69 6f 6e 20 63 61 6c 6c | 73 2c 20 6f 72 20 62 79 |ion call|s, or by|
|000017a0| 20 75 73 69 6e 67 20 7b | 5c 62 66 0a 53 65 74 53 | using {|\bf.SetS|
|000017b0| 69 7a 65 7d 20 61 66 74 | 65 72 20 61 6e 20 69 74 |ize} aft|er an it|
|000017c0| 65 6d 20 68 61 73 20 62 | 65 65 6e 20 63 72 65 61 |em has b|een crea|
|000017d0| 74 65 64 2e 20 20 43 6f | 6f 72 64 69 6e 61 74 65 |ted. Co|ordinate|
|000017e0| 73 20 61 6e 64 20 73 69 | 7a 65 73 20 64 65 66 61 |s and si|zes defa|
|000017f0| 75 6c 74 0a 74 6f 20 2d | 31 2c 20 77 68 69 63 68 |ult.to -|1, which|
|00001800| 20 74 65 6c 6c 73 20 77 | 78 57 69 6e 64 6f 77 73 | tells w|xWindows|
|00001810| 20 74 6f 20 63 68 6f 6f | 73 65 20 61 70 70 72 6f | to choo|se appro|
|00001820| 70 72 69 61 74 65 20 70 | 6f 73 69 74 69 6f 6e 69 |priate p|ositioni|
|00001830| 6e 67 20 61 6e 64 0a 73 | 69 7a 69 6e 67 2e 20 20 |ng and.s|izing. |
|00001840| 49 6e 20 74 68 69 73 20 | 65 78 61 6d 70 6c 65 2c |In this |example,|
|00001850| 20 74 68 65 20 77 69 6e | 64 6f 77 73 20 61 72 65 | the win|dows are|
|00001860| 20 65 78 70 6c 69 63 69 | 74 6c 79 20 73 69 7a 65 | explici|tly size|
|00001870| 64 2c 20 62 75 74 20 79 | 6f 75 20 6d 61 79 0a 73 |d, but y|ou may.s|
|00001880| 69 7a 65 20 61 20 66 72 | 61 6d 65 20 6f 72 20 70 |ize a fr|ame or p|
|00001890| 61 6e 65 6c 20 74 6f 20 | 66 69 74 20 61 72 6f 75 |anel to |fit arou|
|000018a0| 6e 64 20 69 74 73 20 63 | 6f 6e 74 65 6e 74 73 20 |nd its c|ontents |
|000018b0| 62 79 20 63 61 6c 6c 69 | 6e 67 20 7b 5c 62 66 20 |by calli|ng {\bf |
|000018c0| 46 69 74 7d 2e 0a 0a 7b | 5c 62 66 20 4d 79 46 72 |Fit}...{|\bf MyFr|
|000018d0| 61 6d 65 27 73 7d 20 7b | 5c 62 66 20 4f 6e 53 69 |ame's} {|\bf OnSi|
|000018e0| 7a 65 7d 20 6d 65 6d 62 | 65 72 20 73 69 7a 65 73 |ze} memb|er sizes|
|000018f0| 20 65 61 63 68 20 73 75 | 62 77 69 6e 64 6f 77 20 | each su|bwindow |
|00001900| 69 6e 20 70 72 6f 70 6f | 72 74 69 6f 6e 0a 74 6f |in propo|rtion.to|
|00001910| 20 74 68 65 20 6e 65 77 | 20 73 69 7a 65 20 6f 66 | the new| size of|
|00001920| 20 74 68 65 20 66 72 61 | 6d 65 2e 20 7b 5c 62 66 | the fra|me. {\bf|
|00001930| 20 4d 79 43 61 6e 76 61 | 73 27 73 7d 20 7b 5c 62 | MyCanva|s's} {\b|
|00001940| 66 20 4f 6e 50 61 69 6e | 74 7d 20 64 72 61 77 73 |f OnPain|t} draws|
|00001950| 20 61 0a 63 6f 75 70 6c | 65 20 6f 66 20 6c 69 6e | a.coupl|e of lin|
|00001960| 65 73 2c 20 61 20 72 65 | 63 74 61 6e 67 6c 65 20 |es, a re|ctangle |
|00001970| 61 6e 64 20 61 20 73 70 | 6c 69 6e 65 20 77 68 65 |and a sp|line whe|
|00001980| 6e 65 76 65 72 20 74 68 | 65 20 63 61 6e 76 61 73 |never th|e canvas|
|00001990| 20 72 65 71 75 69 72 65 | 73 0a 72 65 70 61 69 6e | require|s.repain|
|000019a0| 74 69 6e 67 20 28 65 2e | 67 2e 20 6f 6e 20 63 72 |ting (e.|g. on cr|
|000019b0| 65 61 74 69 6f 6e 2c 20 | 61 6e 64 20 77 68 65 6e |eation, |and when|
|000019c0| 20 65 78 70 6f 73 65 64 | 29 2e 20 54 68 65 20 7b | exposed|). The {|
|000019d0| 5c 62 66 20 4f 6e 45 76 | 65 6e 74 7d 0a 6d 65 6d |\bf OnEv|ent}.mem|
|000019e0| 62 65 72 20 63 68 65 63 | 6b 73 20 66 6f 72 20 6d |ber chec|ks for m|
|000019f0| 6f 75 73 65 20 64 72 61 | 67 67 69 6e 67 2c 20 61 |ouse dra|gging, a|
|00001a00| 6e 64 20 64 72 61 77 73 | 20 61 20 6c 69 6e 65 20 |nd draws| a line |
|00001a10| 66 72 6f 6d 20 74 68 65 | 20 6c 61 73 74 20 70 6f |from the| last po|
|00001a20| 69 6e 74 0a 74 6f 20 74 | 68 65 20 63 75 72 72 65 |int.to t|he curre|
|00001a30| 6e 74 20 70 6f 73 69 74 | 69 6f 6e 2e 20 20 53 63 |nt posit|ion. Sc|
|00001a40| 72 6f 6c 6c 69 6e 67 20 | 74 68 65 20 63 61 6e 76 |rolling |the canv|
|00001a50| 61 73 20 61 6e 64 20 73 | 75 62 73 65 71 75 65 6e |as and s|ubsequen|
|00001a60| 74 0a 72 65 70 61 69 6e | 74 69 6e 67 20 69 73 20 |t.repain|ting is |
|00001a70| 68 61 6e 64 6c 65 64 20 | 61 75 74 6f 6d 61 74 69 |handled |automati|
|00001a80| 63 61 6c 6c 79 20 62 79 | 20 77 78 57 69 6e 64 6f |cally by| wxWindo|
|00001a90| 77 73 2e 0a 0a 46 69 6e | 61 6c 6c 79 2c 20 74 77 |ws...Fin|ally, tw|
|00001aa0| 6f 20 63 61 6c 6c 62 61 | 63 6b 20 66 75 6e 63 74 |o callba|ck funct|
|00001ab0| 69 6f 6e 73 20 64 65 6d | 6f 6e 73 74 72 61 74 65 |ions dem|onstrate|
|00001ac0| 20 70 6f 70 70 69 6e 67 | 20 75 70 20 64 69 61 6c | popping| up dial|
|00001ad0| 6f 67 20 62 6f 78 65 73 | 2c 0a 73 65 74 74 69 6e |og boxes|,.settin|
|00001ae0| 67 20 74 68 65 20 73 74 | 61 74 75 73 20 6c 69 6e |g the st|atus lin|
|00001af0| 65 2c 20 61 6e 64 20 69 | 6e 73 65 72 74 69 6e 67 |e, and i|nserting|
|00001b00| 20 74 65 78 74 20 69 6e | 74 6f 20 61 20 74 65 78 | text in|to a tex|
|00001b10| 74 20 77 69 6e 64 6f 77 | 2e 0a 0a 54 68 69 73 20 |t window|...This |
|00001b20| 64 65 6d 6f 20 63 61 6e | 20 70 72 6f 76 69 64 65 |demo can| provide|
|00001b30| 20 61 20 74 65 6d 70 6c | 61 74 65 20 66 6f 72 20 | a templ|ate for |
|00001b40| 79 6f 75 72 20 6f 77 6e | 20 61 70 70 6c 69 63 61 |your own| applica|
|00001b50| 74 69 6f 6e 2e 0a 47 72 | 61 64 75 61 6c 6c 79 20 |tion..Gr|adually |
|00001b60| 6d 6f 64 69 66 79 20 69 | 74 20 66 6f 72 20 79 6f |modify i|t for yo|
|00001b70| 75 72 20 6f 77 6e 20 6e | 65 65 64 73 2c 20 61 6e |ur own n|eeds, an|
|00001b80| 64 20 79 6f 75 20 77 69 | 6c 6c 20 72 61 70 69 64 |d you wi|ll rapid|
|00001b90| 6c 79 20 62 65 0a 77 72 | 69 74 69 6e 67 20 70 6f |ly be.wr|iting po|
|00001ba0| 72 74 61 62 6c 65 20 58 | 20 61 6e 64 20 57 69 6e |rtable X| and Win|
|00001bb0| 64 6f 77 73 20 33 20 70 | 72 6f 67 72 61 6d 73 21 |dows 3 p|rograms!|
|00001bc0| 0a 0a 5c 73 75 62 73 65 | 63 74 69 6f 6e 7b 54 68 |..\subse|ction{Th|
|00001bd0| 65 20 4d 44 49 20 64 65 | 6d 6f 7d 0a 0a 41 73 20 |e MDI de|mo}..As |
|00001be0| 65 78 70 6c 61 69 6e 65 | 64 20 69 6e 20 74 68 65 |explaine|d in the|
|00001bf0| 20 6d 61 6e 75 61 6c 2c | 20 77 78 57 69 6e 64 6f | manual,| wxWindo|
|00001c00| 77 73 20 74 61 6b 65 73 | 20 61 6e 20 61 75 74 6f |ws takes| an auto|
|00001c10| 6d 61 74 65 64 20 76 69 | 65 77 20 6f 66 0a 4d 69 |mated vi|ew of.Mi|
|00001c20| 63 72 6f 73 6f 66 74 20 | 57 69 6e 64 6f 77 73 27 |crosoft |Windows'|
|00001c30| 73 20 4d 44 49 20 28 4d | 75 6c 74 69 70 6c 65 20 |s MDI (M|ultiple |
|00001c40| 44 6f 63 75 6d 65 6e 74 | 20 49 6e 74 65 72 66 61 |Document| Interfa|
|00001c50| 63 65 29 20 73 69 6e 63 | 65 20 69 74 20 69 73 20 |ce) sinc|e it is |
|00001c60| 61 20 76 65 72 79 0a 70 | 6c 61 74 66 6f 72 6d 2d |a very.p|latform-|
|00001c70| 73 70 65 63 69 66 69 63 | 20 66 65 61 74 75 72 65 |specific| feature|
|00001c80| 2e 20 54 68 65 20 73 70 | 65 63 69 61 6c 20 4d 44 |. The sp|ecial MD|
|00001c90| 49 20 60 57 69 6e 64 6f | 77 27 20 6d 65 6e 75 2c |I `Windo|w' menu,|
|00001ca0| 20 61 6c 6c 6f 77 69 6e | 67 20 74 68 65 0a 75 73 | allowin|g the.us|
|00001cb0| 65 72 20 74 6f 20 73 77 | 69 74 63 68 20 62 65 74 |er to sw|itch bet|
|00001cc0| 77 65 65 6e 20 63 68 69 | 6c 64 20 77 69 6e 64 6f |ween chi|ld windo|
|00001cd0| 77 73 2c 20 69 73 20 70 | 72 6f 76 69 64 65 64 20 |ws, is p|rovided |
|00001ce0| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 2c 20 74 |automati|cally, t|
|00001cf0| 68 6f 75 67 68 0a 77 69 | 74 68 6f 75 74 20 61 6e |hough.wi|thout an|
|00001d00| 79 20 61 63 63 65 6c 65 | 72 61 74 6f 72 73 20 61 |y accele|rators a|
|00001d10| 6e 64 20 77 69 74 68 6f | 75 74 20 61 20 63 68 6f |nd witho|ut a cho|
|00001d20| 69 63 65 20 6f 66 20 70 | 6f 73 69 74 69 6f 6e 2e |ice of p|osition.|
|00001d30| 20 41 6c 73 6f 2c 20 69 | 6e 73 74 65 61 64 0a 6f | Also, i|nstead.o|
|00001d40| 66 20 64 65 72 69 76 69 | 6e 67 20 66 72 61 6d 65 |f derivi|ng frame|
|00001d50| 73 20 66 72 6f 6d 20 64 | 69 73 74 69 6e 63 74 20 |s from d|istinct |
|00001d60| 63 6c 61 73 73 65 73 20 | 66 6f 72 20 4d 44 49 20 |classes |for MDI |
|00001d70| 76 65 72 73 75 73 20 53 | 44 49 2c 20 74 68 65 0a |versus S|DI, the.|
|00001d80| 61 70 70 72 6f 61 63 68 | 20 74 61 6b 65 6e 20 69 |approach| taken i|
|00001d90| 6e 20 4d 69 63 72 6f 73 | 6f 66 74 27 73 20 63 6c |n Micros|oft's cl|
|00001da0| 61 73 73 20 6c 69 62 72 | 61 72 79 2c 20 77 78 57 |ass libr|ary, wxW|
|00001db0| 69 6e 64 6f 77 73 20 75 | 73 65 73 20 61 6e 20 6f |indows u|ses an o|
|00001dc0| 70 74 69 6f 6e 20 69 6e | 20 74 68 65 20 66 72 61 |ption in| the fra|
|00001dd0| 6d 65 0a 63 6f 6e 73 74 | 72 75 63 74 6f 72 20 74 |me.const|ructor t|
|00001de0| 6f 20 73 77 69 74 63 68 | 20 62 65 74 77 65 65 6e |o switch| between|
|00001df0| 20 73 74 79 6c 65 73 2e | 20 54 68 69 73 20 61 6c | styles.| This al|
|00001e00| 6c 6f 77 73 20 74 68 65 | 20 70 72 6f 67 72 61 6d |lows the| program|
|00001e10| 6d 65 72 20 74 6f 0a 64 | 65 6c 61 79 20 74 68 65 |mer to.d|elay the|
|00001e20| 20 4d 44 49 2f 53 44 49 | 20 64 65 63 69 73 69 6f | MDI/SDI| decisio|
|00001e30| 6e 2c 20 70 65 72 68 61 | 70 73 20 65 76 65 6e 20 |n, perha|ps even |
|00001e40| 70 72 6f 76 69 64 69 6e | 67 20 61 20 63 6f 6d 6d |providin|g a comm|
|00001e50| 61 6e 64 2d 6c 69 6e 65 | 20 73 77 69 74 63 68 0a |and-line| switch.|
|00001e60| 74 6f 20 6c 65 74 20 74 | 68 65 20 75 73 65 72 20 |to let t|he user |
|00001e70| 64 65 63 69 64 65 2e 0a | 0a 54 68 65 20 7b 5c 62 |decide..|.The {\b|
|00001e80| 66 20 6d 64 69 7d 20 65 | 78 61 6d 70 6c 65 20 70 |f mdi} e|xample p|
|00001e90| 72 6f 67 72 61 6d 20 73 | 68 6f 77 73 20 74 68 69 |rogram s|hows thi|
|00001ea0| 73 20 72 75 6e 2d 74 69 | 6d 65 20 73 77 69 74 63 |s run-ti|me switc|
|00001eb0| 68 69 6e 67 2e 20 49 6e | 76 6f 6b 65 64 0a 77 69 |hing. In|voked.wi|
|00001ec0| 74 68 6f 75 74 20 61 20 | 63 6f 6d 6d 61 6e 64 20 |thout a |command |
|00001ed0| 6c 69 6e 65 20 73 77 69 | 74 63 68 2c 20 69 74 20 |line swi|tch, it |
|00001ee0| 64 65 66 61 75 6c 74 73 | 20 74 6f 20 53 44 49 2e |defaults| to SDI.|
|00001ef0| 20 49 6e 76 6f 6b 65 64 | 20 77 69 74 68 20 74 68 | Invoked| with th|
|00001f00| 65 0a 73 77 69 74 63 68 | 20 7b 5c 74 74 20 2d 6d |e.switch| {\tt -m|
|00001f10| 64 69 7d 20 69 74 20 72 | 75 6e 73 20 61 73 20 61 |di} it r|uns as a|
|00001f20| 6e 20 4d 44 49 20 70 72 | 6f 67 72 61 6d 2c 20 62 |n MDI pr|ogram, b|
|00001f30| 75 74 20 6f 6e 6c 79 20 | 75 6e 64 65 72 20 57 69 |ut only |under Wi|
|00001f40| 6e 64 6f 77 73 20 33 2e | 0a 0a 54 68 65 72 65 20 |ndows 3.|..There |
|00001f50| 61 72 65 20 61 20 66 65 | 77 20 65 78 74 72 61 20 |are a fe|w extra |
|00001f60| 63 6f 6e 73 69 64 65 72 | 61 74 69 6f 6e 73 20 77 |consider|ations w|
|00001f70| 68 65 6e 20 70 72 6f 67 | 72 61 6d 6d 69 6e 67 20 |hen prog|ramming |
|00001f80| 61 6e 20 4d 44 49 0a 61 | 70 70 6c 69 63 61 74 69 |an MDI.a|pplicati|
|00001f90| 6f 6e 73 2e 20 4f 6e 65 | 20 69 73 20 74 68 65 20 |ons. One| is the |
|00001fa0| 63 68 6f 69 63 65 20 6f | 66 20 6d 65 6e 75 20 69 |choice o|f menu i|
|00001fb0| 74 65 6d 73 2e 20 41 6e | 20 53 44 49 20 70 72 6f |tems. An| SDI pro|
|00001fc0| 67 72 61 6d 20 6d 69 67 | 68 74 20 68 61 76 65 0a |gram mig|ht have.|
|00001fd0| 61 20 6d 61 69 6e 20 77 | 69 6e 64 6f 77 20 61 6e |a main w|indow an|
|00001fe0| 64 20 73 65 76 65 72 61 | 6c 20 63 68 69 6c 64 20 |d severa|l child |
|00001ff0| 77 69 6e 64 6f 77 73 2c | 20 77 68 65 72 65 20 74 |windows,| where t|
|00002000| 68 65 20 6d 61 69 6e 20 | 77 69 6e 64 6f 77 20 6d |he main |window m|
|00002010| 65 6e 75 20 68 61 73 0a | 6f 70 74 69 6f 6e 73 20 |enu has.|options |
|00002020| 66 6f 72 20 71 75 69 74 | 74 69 6e 67 20 74 68 65 |for quit|ting the|
|00002030| 20 70 72 6f 67 72 61 6d | 20 61 6e 64 20 6f 74 68 | program| and oth|
|00002040| 65 72 20 67 6c 6f 62 61 | 6c 20 6d 61 74 74 65 72 |er globa|l matter|
|00002050| 73 2c 20 77 68 69 6c 65 | 20 63 68 69 6c 64 0a 77 |s, while| child.w|
|00002060| 69 6e 64 6f 77 20 6d 65 | 6e 75 73 20 68 61 76 65 |indow me|nus have|
|00002070| 20 63 68 69 6c 64 2d 73 | 70 65 63 69 66 69 63 20 | child-s|pecific |
|00002080| 6f 70 74 69 6f 6e 73 2e | 20 49 6e 20 4d 44 49 2c |options.| In MDI,|
|00002090| 20 74 68 65 20 63 68 69 | 6c 64 20 77 69 6e 64 6f | the chi|ld windo|
|000020a0| 77 20 6d 65 6e 75 0a 76 | 69 73 75 61 6c 6c 79 20 |w menu.v|isually |
|000020b0| 72 65 70 6c 61 63 65 73 | 20 74 68 65 20 6d 61 69 |replaces| the mai|
|000020c0| 6e 20 77 69 6e 64 6f 77 | 20 6d 65 6e 75 20 77 68 |n window| menu wh|
|000020d0| 65 6e 20 61 63 74 69 76 | 61 74 65 64 2c 20 61 6e |en activ|ated, an|
|000020e0| 64 20 73 6f 20 69 74 20 | 6d 75 73 74 0a 64 75 70 |d so it |must.dup|
|000020f0| 6c 69 63 61 74 65 20 73 | 6f 6d 65 20 6d 61 69 6e |licate s|ome main|
|00002100| 20 77 69 6e 64 6f 77 20 | 6d 65 6e 75 20 6f 70 74 | window |menu opt|
|00002110| 69 6f 6e 73 2e 20 4f 6e | 65 20 73 6f 6c 75 74 69 |ions. On|e soluti|
|00002120| 6f 6e 20 69 73 20 74 6f | 0a 69 6e 63 6c 75 64 65 |on is to|.include|
|00002130| 20 6c 6f 67 69 63 20 74 | 6f 20 61 64 64 20 65 78 | logic t|o add ex|
|00002140| 74 72 61 20 6d 65 6e 75 | 20 69 74 65 6d 73 20 64 |tra menu| items d|
|00002150| 65 70 65 6e 64 69 6e 67 | 20 6f 6e 20 77 68 65 74 |epending| on whet|
|00002160| 68 65 72 20 4d 44 49 20 | 6f 72 0a 53 44 49 20 69 |her MDI |or.SDI i|
|00002170| 73 20 73 70 65 63 69 66 | 69 65 64 2c 20 61 73 20 |s specif|ied, as |
|00002180| 74 68 65 20 7b 5c 62 66 | 20 6d 64 69 7d 20 65 78 |the {\bf| mdi} ex|
|00002190| 61 6d 70 6c 65 20 64 6f | 65 73 2e 0a 0a 41 6c 73 |ample do|es...Als|
|000021a0| 6f 2c 20 66 6f 72 20 70 | 72 6f 67 72 61 6d 73 20 |o, for p|rograms |
|000021b0| 77 68 69 63 68 20 6d 75 | 73 74 20 62 65 20 62 6f |which mu|st be bo|
|000021c0| 74 68 20 53 44 49 20 61 | 6e 64 20 4d 44 49 20 28 |th SDI a|nd MDI (|
|000021d0| 6f 6e 20 6e 6f 6e 2d 57 | 69 6e 64 6f 77 73 20 33 |on non-W|indows 3|
|000021e0| 0a 70 6c 61 74 66 6f 72 | 6d 73 20 53 44 49 20 6d |.platfor|ms SDI m|
|000021f0| 6f 64 65 20 69 73 20 6d | 61 6e 64 61 74 6f 72 79 |ode is m|andatory|
|00002200| 29 2c 20 74 68 65 20 6d | 61 69 6e 20 77 69 6e 64 |), the m|ain wind|
|00002210| 6f 77 20 6d 75 73 74 20 | 6e 6f 74 20 68 61 76 65 |ow must |not have|
|00002220| 0a 73 75 62 77 69 6e 64 | 6f 77 73 20 28 69 2e 65 |.subwind|ows (i.e|
|00002230| 2e 20 70 61 6e 65 6c 73 | 2c 20 63 61 6e 76 61 73 |. panels|, canvas|
|00002240| 65 73 20 6f 72 20 74 65 | 78 74 20 73 75 62 77 69 |es or te|xt subwi|
|00002250| 6e 64 6f 77 73 29 20 73 | 69 6e 63 65 20 74 68 65 |ndows) s|ince the|
|00002260| 20 63 6c 69 65 6e 74 0a | 61 72 65 61 20 6d 61 79 | client.|area may|
|00002270| 20 62 65 20 6f 63 63 75 | 70 69 65 64 20 77 69 74 | be occu|pied wit|
|00002280| 68 20 63 68 69 6c 64 20 | 4d 44 49 20 77 69 6e 64 |h child |MDI wind|
|00002290| 6f 77 73 20 75 6e 64 65 | 72 20 57 69 6e 64 6f 77 |ows unde|r Window|
|000022a0| 73 20 33 2e 0a 0a 4d 44 | 49 20 69 63 6f 6e 73 20 |s 3...MD|I icons |
|000022b0| 70 6f 73 65 20 61 20 73 | 6d 61 6c 6c 20 74 65 63 |pose a s|mall tec|
|000022c0| 68 6e 69 63 61 6c 20 64 | 69 66 66 69 63 75 6c 74 |hnical d|ifficult|
|000022d0| 79 2c 20 69 6e 20 74 68 | 61 74 20 66 6f 72 20 73 |y, in th|at for s|
|000022e0| 6f 6d 65 20 72 65 61 73 | 6f 6e 20 69 74 0a 69 73 |ome reas|on it.is|
|000022f0| 20 6e 6f 74 20 70 6f 73 | 73 69 62 6c 65 20 74 6f | not pos|sible to|
|00002300| 20 75 73 65 20 74 68 65 | 20 73 61 6d 65 20 74 65 | use the| same te|
|00002310| 63 68 6e 69 71 75 65 20 | 6f 66 20 64 79 6e 61 6d |chnique |of dynam|
|00002320| 69 63 61 6c 6c 79 20 70 | 61 69 6e 74 69 6e 67 20 |ically p|ainting |
|00002330| 74 68 65 0a 69 63 6f 6e | 20 6f 6e 74 6f 20 74 68 |the.icon| onto th|
|00002340| 65 20 69 63 6f 6e 69 7a | 65 64 20 66 72 61 6d 65 |e iconiz|ed frame|
|00002350| 20 63 6c 69 65 6e 74 20 | 61 72 65 61 20 61 73 20 | client |area as |
|00002360| 77 69 74 68 20 53 44 49 | 20 66 72 61 6d 65 73 2e |with SDI| frames.|
|00002370| 0a 43 6f 6e 73 65 71 75 | 65 6e 74 6c 79 20 74 68 |.Consequ|ently th|
|00002380| 65 20 70 72 6f 67 72 61 | 6d 6d 65 72 20 6d 75 73 |e progra|mmer mus|
|00002390| 74 20 69 6e 73 65 72 74 | 20 73 6f 6d 65 20 6c 69 |t insert| some li|
|000023a0| 6e 65 73 20 69 6e 74 6f | 20 74 68 65 20 72 65 73 |nes into| the res|
|000023b0| 6f 75 72 63 65 0a 66 69 | 6c 65 20 66 6f 72 20 70 |ource.fi|le for p|
|000023c0| 72 6f 76 69 64 69 6e 67 | 20 69 63 6f 6e 73 20 28 |roviding| icons (|
|000023d0| 73 65 65 20 6d 64 69 2e | 72 63 29 20 61 73 20 77 |see mdi.|rc) as w|
|000023e0| 65 6c 6c 20 61 73 20 75 | 73 69 6e 67 20 74 68 65 |ell as u|sing the|
|000023f0| 20 53 65 74 49 63 6f 6e | 20 63 61 6c 6c 0a 69 6e | SetIcon| call.in|
|00002400| 20 74 68 65 20 70 72 6f | 67 72 61 6d 20 66 6f 72 | the pro|gram for|
|00002410| 20 6e 6f 6e 2d 57 69 6e | 64 6f 77 73 20 33 20 70 | non-Win|dows 3 p|
|00002420| 6c 61 74 66 6f 72 6d 73 | 2e 20 4f 6e 6c 79 20 6f |latforms|. Only o|
|00002430| 6e 65 20 69 63 6f 6e 20 | 69 6d 61 67 65 20 66 6f |ne icon |image fo|
|00002440| 72 20 63 68 69 6c 64 0a | 4d 44 49 20 66 72 61 6d |r child.|MDI fram|
|00002450| 65 73 20 6d 61 79 20 62 | 65 20 70 72 6f 76 69 64 |es may b|e provid|
|00002460| 65 64 2e 0a 0a 5c 73 75 | 62 73 65 63 74 69 6f 6e |ed...\su|bsection|
|00002470| 7b 54 68 65 20 49 50 43 | 20 64 65 6d 6f 7d 0a 0a |{The IPC| demo}..|
|00002480| 54 68 65 20 64 65 6d 6f | 20 69 6e 20 74 68 65 20 |The demo| in the |
|00002490| 7b 5c 74 74 20 64 69 72 | 65 63 74 6f 72 79 20 73 |{\tt dir|ectory s|
|000024a0| 61 6d 70 6c 65 73 2f 69 | 70 63 7d 20 73 68 6f 77 |amples/i|pc} show|
|000024b0| 73 20 68 6f 77 20 70 72 | 6f 63 65 73 73 65 73 0a |s how pr|ocesses.|
|000024c0| 6d 61 79 20 65 61 73 69 | 6c 79 20 74 61 6c 6b 73 |may easi|ly talks|
|000024d0| 20 74 6f 20 65 61 63 68 | 20 6f 74 68 65 72 20 73 | to each| other s|
|000024e0| 79 6e 63 68 72 6f 6e 6f | 75 73 6c 79 20 28 69 2e |ynchrono|usly (i.|
|000024f0| 65 2e 20 77 68 65 6e 20 | 41 20 73 65 6e 64 73 20 |e. when |A sends |
|00002500| 61 20 6d 65 73 73 61 67 | 65 0a 74 6f 20 42 2c 20 |a messag|e.to B, |
|00002510| 41 20 77 61 69 74 73 20 | 66 6f 72 20 61 6e 20 61 |A waits |for an a|
|00002520| 6e 73 77 65 72 29 2e 20 | 49 66 20 79 6f 75 20 73 |nswer). |If you s|
|00002530| 74 61 72 74 20 7b 5c 74 | 74 20 73 65 72 76 65 72 |tart {\t|t server|
|00002540| 7d 2c 20 74 68 65 6e 20 | 7b 5c 74 74 20 63 6c 69 |}, then |{\tt cli|
|00002550| 65 6e 74 7d 2c 0a 61 20 | 6e 65 77 20 77 69 6e 64 |ent},.a |new wind|
|00002560| 6f 77 20 73 68 6f 75 6c | 64 20 61 70 70 65 61 72 |ow shoul|d appear|
|00002570| 20 6f 6e 20 74 6f 70 20 | 6f 66 20 74 68 65 20 73 | on top |of the s|
|00002580| 65 72 76 65 72 20 77 69 | 6e 64 6f 77 2c 20 77 68 |erver wi|ndow, wh|
|00002590| 69 63 68 20 72 65 70 72 | 65 73 65 6e 74 73 0a 74 |ich repr|esents.t|
|000025a0| 68 65 20 63 6f 6e 6e 65 | 63 74 69 6f 6e 20 62 65 |he conne|ction be|
|000025b0| 74 77 65 65 6e 20 73 65 | 72 76 65 72 20 61 6e 64 |tween se|rver and|
|000025c0| 20 63 6c 69 65 6e 74 2e | 20 51 75 69 74 74 69 6e | client.| Quittin|
|000025d0| 67 20 74 68 65 20 63 6c | 69 65 6e 74 20 63 61 75 |g the cl|ient cau|
|000025e0| 73 65 73 0a 74 68 65 20 | 63 6f 6e 6e 65 63 74 69 |ses.the |connecti|
|000025f0| 6f 6e 20 74 6f 20 62 65 | 20 62 72 6f 6b 65 6e 20 |on to be| broken |
|00002600| 61 6e 64 20 74 68 69 73 | 20 77 69 6e 64 6f 77 20 |and this| window |
|00002610| 74 6f 20 64 69 73 61 70 | 70 65 61 72 2e 0a 0a 54 |to disap|pear...T|
|00002620| 6f 20 69 6c 6c 75 73 74 | 72 61 74 65 20 60 68 6f |o illust|rate `ho|
|00002630| 74 20 6c 69 6e 6b 69 6e | 67 27 2c 20 63 6c 69 63 |t linkin|g', clic|
|00002640| 6b 20 6f 6e 20 74 68 65 | 20 73 65 72 76 65 72 27 |k on the| server'|
|00002650| 73 20 6c 69 73 74 62 6f | 78 2e 20 54 68 69 73 20 |s listbo|x. This |
|00002660| 73 65 6e 64 73 0a 61 6e | 20 7b 5c 69 74 20 61 64 |sends.an| {\it ad|
|00002670| 76 69 73 65 7d 20 6d 65 | 73 73 61 67 65 20 74 6f |vise} me|ssage to|
|00002680| 20 74 68 65 20 63 6c 69 | 65 6e 74 2c 20 74 65 6c | the cli|ent, tel|
|00002690| 6c 69 6e 67 20 69 74 20 | 74 6f 20 75 70 64 61 74 |ling it |to updat|
|000026a0| 65 20 69 74 73 20 6f 77 | 6e 0a 6c 69 73 74 62 6f |e its ow|n.listbo|
|000026b0| 78 2e 20 54 68 65 20 72 | 65 76 65 72 73 65 20 69 |x. The r|everse i|
|000026c0| 73 20 6e 6f 74 20 74 72 | 75 65 2c 20 68 6f 77 65 |s not tr|ue, howe|
|000026d0| 76 65 72 2e 0a 0a 41 20 | 63 6c 69 65 6e 74 20 6d |ver...A |client m|
|000026e0| 61 79 20 72 65 71 75 65 | 73 74 20 69 6e 66 6f 72 |ay reque|st infor|
|000026f0| 6d 61 74 69 6f 6e 20 66 | 72 6f 6d 20 74 68 65 20 |mation f|rom the |
|00002700| 73 65 72 76 65 72 2e 20 | 53 65 6c 65 63 74 20 74 |server. |Select t|
|00002710| 68 65 20 7b 5c 62 66 20 | 52 65 71 75 65 73 74 7d |he {\bf |Request}|
|00002720| 0a 6d 65 6e 75 20 69 74 | 65 6d 20 66 72 6f 6d 20 |.menu it|em from |
|00002730| 74 68 65 20 63 6c 69 65 | 6e 74 27 73 20 7b 5c 62 |the clie|nt's {\b|
|00002740| 66 20 46 69 6c 65 7d 20 | 6d 65 6e 75 2e 20 54 68 |f File} |menu. Th|
|00002750| 65 20 77 69 6e 64 6f 77 | 20 77 68 69 63 68 20 70 |e window| which p|
|00002760| 6f 70 73 20 75 70 0a 69 | 73 20 63 72 65 61 74 65 |ops up.i|s create|
|00002770| 64 20 62 79 20 74 68 65 | 20 63 6c 69 65 6e 74 20 |d by the| client |
|00002780| 61 6e 64 20 63 6f 6e 74 | 61 69 6e 73 20 61 20 6d |and cont|ains a m|
|00002790| 65 73 73 61 67 65 20 74 | 68 61 74 20 74 68 65 20 |essage t|hat the |
|000027a0| 73 65 72 76 65 72 20 73 | 65 6e 74 20 62 61 63 6b |server s|ent back|
|000027b0| 2e 0a 0a 53 65 6c 65 63 | 74 69 6e 67 20 7b 5c 62 |...Selec|ting {\b|
|000027c0| 66 20 45 78 65 63 75 74 | 65 7d 20 66 72 6f 6d 20 |f Execut|e} from |
|000027d0| 74 68 65 20 63 6c 69 65 | 6e 74 27 73 20 6d 65 6e |the clie|nt's men|
|000027e0| 75 20 6d 61 6b 65 73 20 | 74 68 65 20 73 65 72 76 |u makes |the serv|
|000027f0| 65 72 20 70 6f 70 20 75 | 70 20 61 20 77 69 6e 64 |er pop u|p a wind|
|00002800| 6f 77 2e 0a 4e 6f 72 6d | 61 6c 6c 79 20 74 68 69 |ow..Norm|ally thi|
|00002810| 73 20 77 6f 75 6c 64 20 | 65 78 65 63 75 74 65 20 |s would |execute |
|00002820| 73 6f 6d 65 20 63 6f 6d | 6d 61 6e 64 20 74 68 61 |some com|mand tha|
|00002830| 74 20 74 68 65 20 63 6c | 69 65 6e 74 20 77 69 73 |t the cl|ient wis|
|00002840| 68 65 73 20 74 68 65 20 | 73 65 72 76 65 72 20 74 |hes the |server t|
|00002850| 6f 20 72 75 6e 2e 0a 0a | 54 68 65 20 7b 5c 62 66 |o run...|The {\bf|
|00002860| 20 50 6f 6b 65 7d 20 6d | 65 6e 75 20 69 74 65 6d | Poke} m|enu item|
|00002870| 20 73 65 6e 64 73 20 61 | 20 7b 5c 69 74 20 70 6f | sends a| {\it po|
|00002880| 6b 65 7d 20 6d 65 73 73 | 61 67 65 20 74 6f 20 74 |ke} mess|age to t|
|00002890| 68 65 20 73 65 72 76 65 | 72 3b 20 6e 6f 72 6d 61 |he serve|r; norma|
|000028a0| 6c 6c 79 0a 74 68 69 73 | 20 77 6f 75 6c 64 20 69 |lly.this| would i|
|000028b0| 6e 73 65 72 74 20 73 6f | 6d 65 20 64 61 74 61 20 |nsert so|me data |
|000028c0| 69 6e 74 6f 20 74 68 65 | 20 73 65 72 76 65 72 27 |into the| server'|
|000028d0| 73 20 6d 65 6d 6f 72 79 | 2e 0a 0a 49 6e 74 65 72 |s memory|...Inter|
|000028e0| 70 72 6f 63 65 73 73 20 | 63 6f 6d 6d 75 6e 69 63 |process |communic|
|000028f0| 61 74 69 6f 6e 20 69 6e | 20 77 78 57 69 6e 64 6f |ation in| wxWindo|
|00002900| 77 73 20 75 73 65 73 20 | 61 20 73 75 62 73 65 74 |ws uses |a subset|
|00002910| 20 6f 66 20 44 44 45 20 | 28 44 79 6e 61 6d 69 63 | of DDE |(Dynamic|
|00002920| 20 44 61 74 61 20 45 78 | 63 68 61 6e 67 65 29 0a | Data Ex|change).|
|00002930| 77 68 69 63 68 20 69 73 | 20 4d 69 63 72 6f 73 6f |which is| Microso|
|00002940| 66 74 27 73 20 73 74 61 | 6e 64 61 72 64 20 66 6f |ft's sta|ndard fo|
|00002950| 72 20 6c 6f 77 2d 6c 65 | 76 65 6c 20 49 50 43 20 |r low-le|vel IPC |
|00002960| 75 6e 64 65 72 20 57 69 | 6e 64 6f 77 73 2e 20 77 |under Wi|ndows. w|
|00002970| 78 57 69 6e 64 6f 77 73 | 0a 67 69 76 65 73 20 79 |xWindows|.gives y|
|00002980| 6f 75 20 44 44 45 20 75 | 6e 64 65 72 20 55 4e 49 |ou DDE u|nder UNI|
|00002990| 58 20 61 73 20 77 65 6c | 6c 20 61 73 20 57 69 6e |X as wel|l as Win|
|000029a0| 64 6f 77 73 2c 20 61 6e | 64 20 6d 61 6b 65 73 20 |dows, an|d makes |
|000029b0| 69 74 20 65 61 73 69 65 | 72 20 74 6f 20 70 72 6f |it easie|r to pro|
|000029c0| 67 72 61 6d 0a 69 6e 74 | 6f 20 74 68 65 20 62 61 |gram.int|o the ba|
|000029d0| 72 67 61 69 6e 20 62 79 | 20 75 73 69 6e 67 20 61 |rgain by| using a|
|000029e0| 6e 20 69 6e 74 75 69 74 | 69 76 65 20 6f 62 6a 65 |n intuit|ive obje|
|000029f0| 63 74 2d 6f 72 69 65 6e | 74 65 64 20 6d 6f 64 65 |ct-orien|ted mode|
|00002a00| 6c 20 6f 66 20 63 6f 6d | 6d 75 6e 69 63 61 74 69 |l of com|municati|
|00002a10| 6f 6e 2e 0a 0a 5c 73 75 | 62 73 65 63 74 69 6f 6e |on...\su|bsection|
|00002a20| 7b 54 68 65 20 4f 62 6a | 65 63 74 20 47 72 61 70 |{The Obj|ect Grap|
|00002a30| 68 69 63 73 20 64 65 6d | 6f 7d 0a 0a 4e 65 77 20 |hics dem|o}..New |
|00002a40| 74 6f 20 76 65 72 73 69 | 6f 6e 20 31 2e 32 30 20 |to versi|on 1.20 |
|00002a50| 6f 66 20 77 78 57 69 6e | 64 6f 77 73 20 69 73 20 |of wxWin|dows is |
|00002a60| 61 20 6c 69 62 72 61 72 | 79 20 6f 66 20 67 72 61 |a librar|y of gra|
|00002a70| 70 68 69 63 20 63 61 6c | 6c 73 20 74 6f 20 68 65 |phic cal|ls to he|
|00002a80| 6c 70 20 77 69 74 68 0a | 6d 61 6e 69 70 75 6c 61 |lp with.|manipula|
|00002a90| 74 69 6e 67 20 6f 62 6a | 65 63 74 73 20 6f 6e 20 |ting obj|ects on |
|00002aa0| 61 20 63 61 6e 76 61 73 | 2e 20 54 68 65 20 64 65 |a canvas|. The de|
|00002ab0| 6d 6f 20 69 6e 20 7b 5c | 74 74 20 73 61 6d 70 6c |mo in {\|tt sampl|
|00002ac0| 65 73 2f 6f 62 6a 65 63 | 74 73 7d 20 73 68 6f 77 |es/objec|ts} show|
|00002ad0| 73 0a 61 20 73 69 6d 70 | 6c 65 20 61 70 70 6c 69 |s.a simp|le appli|
|00002ae0| 63 61 74 69 6f 6e 20 77 | 68 65 72 65 20 74 68 65 |cation w|here the|
|00002af0| 20 75 73 65 72 20 63 61 | 6e 20 63 72 65 61 74 65 | user ca|n create|
|00002b00| 20 6e 65 77 20 72 65 63 | 74 61 6e 67 6c 65 73 20 | new rec|tangles |
|00002b10| 61 6e 64 20 65 6c 6c 69 | 70 73 65 73 2c 0a 6a 6f |and elli|pses,.jo|
|00002b20| 69 6e 20 74 68 65 6d 20 | 75 70 2c 20 6c 61 62 65 |in them |up, labe|
|00002b30| 6c 20 74 68 65 6d 2c 20 | 6d 6f 76 65 20 74 68 65 |l them, |move the|
|00002b40| 6d 20 61 62 6f 75 74 2c | 20 72 65 73 69 7a 65 20 |m about,| resize |
|00002b50| 74 68 65 6d 2c 20 61 6e | 64 20 64 65 6c 65 74 65 |them, an|d delete|
|00002b60| 20 74 68 65 6d 2e 0a 0a | 54 68 69 73 20 6c 69 62 | them...|This lib|
|00002b70| 72 61 72 79 20 69 73 20 | 6e 6f 74 20 79 65 74 20 |rary is |not yet |
|00002b80| 64 6f 63 75 6d 65 6e 74 | 65 64 20 62 75 74 20 49 |document|ed but I|
|00002b90| 20 68 6f 70 65 20 74 68 | 61 74 20 6d 6f 73 74 20 | hope th|at most |
|00002ba0| 6f 66 20 69 74 20 69 73 | 0a 72 65 61 73 6f 6e 61 |of it is|.reasona|
|00002bb0| 62 6c 79 20 69 6e 74 75 | 69 74 69 76 65 20 66 72 |bly intu|itive fr|
|00002bc0| 6f 6d 20 74 68 65 20 68 | 65 61 64 65 72 20 66 69 |om the h|eader fi|
|00002bd0| 6c 65 20 7b 5c 74 74 20 | 67 72 61 70 68 69 63 73 |le {\tt |graphics|
|00002be0| 2e 68 7d 20 61 6e 64 20 | 66 72 6f 6d 0a 74 68 65 |.h} and |from.the|
|00002bf0| 20 64 65 6d 6f 20 73 6f | 75 72 63 65 20 63 6f 64 | demo so|urce cod|
|00002c00| 65 2e 20 20 53 6f 6d 65 | 20 6f 66 20 74 68 65 20 |e. Some| of the |
|00002c10| 66 65 61 74 75 72 65 73 | 20 6d 61 79 20 62 65 20 |features| may be |
|00002c20| 74 72 69 63 6b 79 20 74 | 6f 20 73 70 6f 74 2c 0a |tricky t|o spot,.|
|00002c30| 68 6f 77 65 76 65 72 2c | 20 73 75 63 68 20 61 73 |however,| such as|
|00002c40| 20 6d 75 6c 74 69 70 6c | 65 2d 73 65 67 6d 65 6e | multipl|e-segmen|
|00002c50| 74 20 6c 69 6e 65 73 20 | 61 6e 64 20 73 70 6c 69 |t lines |and spli|
|00002c60| 6e 65 73 2c 20 61 74 74 | 61 63 68 6d 65 6e 74 20 |nes, att|achment |
|00002c70| 70 6f 69 6e 74 73 20 6f | 6e 0a 73 68 61 70 65 73 |points o|n.shapes|
|00002c80| 2c 20 61 75 74 6f 2d 73 | 74 72 61 69 67 68 74 65 |, auto-s|traighte|
|00002c90| 6e 69 6e 67 20 6f 66 20 | 6c 69 6e 65 20 73 65 67 |ning of |line seg|
|00002ca0| 6d 65 6e 74 73 2c 20 6d | 61 6e 75 61 6c 20 72 65 |ments, m|anual re|
|00002cb0| 70 6f 73 69 74 69 6f 6e | 69 6e 67 20 6f 66 0a 6c |position|ing of.l|
|00002cc0| 69 6e 65 20 65 6e 64 70 | 6f 69 6e 74 73 2c 20 6e |ine endp|oints, n|
|00002cd0| 65 77 6c 69 6e 65 73 20 | 69 6e 20 74 65 78 74 20 |ewlines |in text |
|00002ce0| 6c 61 62 65 6c 73 20 28 | 5c 25 6e 29 2e 0a 0a 5c |labels (|\%n)...\|
|00002cf0| 65 6e 64 7b 64 6f 63 75 | 6d 65 6e 74 7d 0a |end{docu|ment}. |
+--------+-------------------------+-------------------------+--------+--------+