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
| Corel 10 Texture (image/corel10Texture)
| ext
| Unsupported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| C++ source text
| default
| |
99%
| file
| LaTeX 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 68 65 6c 70 69 67 6e | 6f 72 65 7b 0a 5c 63 68 |\helpign|ore{.\ch|
|00000010| 61 70 74 65 72 7b 43 6c | 61 73 73 65 73 20 61 6e |apter{Cl|asses an|
|00000020| 64 20 64 61 74 61 20 74 | 79 70 65 73 7d 0a 0a 5c |d data t|ypes}..\|
|00000030| 73 65 63 74 69 6f 6e 7b | 43 6c 61 73 73 20 68 69 |section{|Class hi|
|00000040| 65 72 61 72 63 68 79 7d | 0a 0a 54 68 65 20 47 55 |erarchy}|..The GU|
|00000050| 49 2d 73 70 65 63 69 66 | 69 63 20 77 78 57 69 6e |I-specif|ic wxWin|
|00000060| 64 6f 77 73 20 63 6c 61 | 73 73 20 68 69 65 72 61 |dows cla|ss hiera|
|00000070| 72 63 68 79 20 69 73 20 | 73 68 6f 77 6e 20 69 6e |rchy is |shown in|
|00000080| 20 46 69 67 75 72 65 20 | 35 2e 31 2e 0a 4d 61 6e | Figure |5.1..Man|
|00000090| 79 20 6f 74 68 65 72 2c | 20 6e 6f 6e 2d 47 55 49 |y other,| non-GUI|
|000000a0| 20 63 6c 61 73 73 65 73 | 20 68 61 76 65 20 62 65 | classes| have be|
|000000b0| 65 6e 20 6f 6d 69 74 74 | 65 64 2e 0a 0a 5c 76 73 |en omitt|ed...\vs|
|000000c0| 6b 69 70 20 31 63 6d 0a | 24 24 5c 70 73 62 6f 78 |kip 1cm.|$$\psbox|
|000000d0| 74 6f 28 31 34 63 6d 3b | 30 63 6d 29 7b 77 78 63 |to(14cm;|0cm){wxc|
|000000e0| 6c 61 73 73 65 73 2e 70 | 73 7d 24 24 0a 5c 76 73 |lasses.p|s}$$.\vs|
|000000f0| 6b 69 70 20 31 63 6d 0a | 5c 63 65 6e 74 65 72 6c |kip 1cm.|\centerl|
|00000100| 69 6e 65 7b 46 69 67 75 | 72 65 20 35 2e 31 3a 20 |ine{Figu|re 5.1: |
|00000110| 77 78 57 69 6e 64 6f 77 | 73 20 63 6c 61 73 73 20 |wxWindow|s class |
|00000120| 68 69 65 72 61 72 63 68 | 79 7d 0a 0a 5c 6e 65 77 |hierarch|y}..\new|
|00000130| 70 61 67 65 0a 0a 49 6e | 20 74 68 65 20 66 6f 6c |page..In| the fol|
|00000140| 6c 6f 77 69 6e 67 20 64 | 65 73 63 72 69 70 74 69 |lowing d|escripti|
|00000150| 6f 6e 73 20 6f 66 20 74 | 68 65 20 77 78 57 69 6e |ons of t|he wxWin|
|00000160| 64 6f 77 73 20 63 6c 61 | 73 73 65 73 20 61 6e 64 |dows cla|sses and|
|00000170| 20 74 68 65 69 72 20 6d | 65 6d 62 65 72 0a 66 75 | their m|ember.fu|
|00000180| 6e 63 74 69 6f 6e 73 2c | 20 6e 6f 74 65 20 74 68 |nctions,| note th|
|00000190| 61 74 20 64 65 73 63 72 | 69 70 74 69 6f 6e 73 20 |at descr|iptions |
|000001a0| 6f 66 20 69 6e 68 65 72 | 69 74 65 64 20 6d 65 6d |of inher|ited mem|
|000001b0| 62 65 72 20 66 75 6e 63 | 74 69 6f 6e 73 20 61 72 |ber func|tions ar|
|000001c0| 65 20 6e 6f 74 0a 64 75 | 70 6c 69 63 61 74 65 64 |e not.du|plicated|
|000001d0| 20 69 6e 20 64 65 72 69 | 76 65 64 20 63 6c 61 73 | in deri|ved clas|
|000001e0| 73 65 73 20 75 6e 6c 65 | 73 73 20 74 68 65 69 72 |ses unle|ss their|
|000001f0| 20 62 65 68 61 76 69 6f | 75 72 20 69 73 20 64 69 | behavio|ur is di|
|00000200| 66 66 65 72 65 6e 74 2e | 20 53 6f 20 69 6e 0a 75 |fferent.| So in.u|
|00000210| 73 69 6e 67 20 61 20 63 | 6c 61 73 73 20 73 75 63 |sing a c|lass suc|
|00000220| 68 20 61 73 20 77 78 43 | 61 6e 76 61 73 2c 20 62 |h as wxC|anvas, b|
|00000230| 65 20 61 77 61 72 65 20 | 74 68 61 74 20 77 78 57 |e aware |that wxW|
|00000240| 69 6e 64 6f 77 20 66 75 | 6e 63 74 69 6f 6e 73 20 |indow fu|nctions |
|00000250| 6d 61 79 20 62 65 0a 72 | 65 6c 65 76 61 6e 74 2e |may be.r|elevant.|
|00000260| 0a 0a 4e 6f 74 65 20 61 | 6c 73 6f 20 74 68 61 74 |..Note a|lso that|
|00000270| 20 61 72 67 75 6d 65 6e | 74 73 20 77 69 74 68 20 | argumen|ts with |
|00000280| 64 65 66 61 75 6c 74 20 | 76 61 6c 75 65 73 20 6d |default |values m|
|00000290| 61 79 20 62 65 20 6f 6d | 69 74 74 65 64 20 66 72 |ay be om|itted fr|
|000002a0| 6f 6d 20 61 0a 66 75 6e | 63 74 69 6f 6e 20 63 61 |om a.fun|ction ca|
|000002b0| 6c 6c 2c 20 66 6f 72 20 | 62 72 65 76 69 74 79 2e |ll, for |brevity.|
|000002c0| 20 53 69 7a 65 20 61 6e | 64 20 70 6f 73 69 74 69 | Size an|d positi|
|000002d0| 6f 6e 20 61 72 67 75 6d | 65 6e 74 73 20 6d 61 79 |on argum|ents may|
|000002e0| 20 75 73 75 61 6c 6c 79 | 20 62 65 0a 67 69 76 65 | usually| be.give|
|000002f0| 6e 20 61 20 76 61 6c 75 | 65 20 6f 66 20 2d 31 20 |n a valu|e of -1 |
|00000300| 28 74 68 65 20 64 65 66 | 61 75 6c 74 29 2c 20 69 |(the def|ault), i|
|00000310| 6e 20 77 68 69 63 68 20 | 63 61 73 65 20 77 78 57 |n which |case wxW|
|00000320| 69 6e 64 6f 77 73 20 77 | 69 6c 6c 20 63 68 6f 6f |indows w|ill choo|
|00000330| 73 65 20 61 0a 73 75 69 | 74 61 62 6c 65 20 76 61 |se a.sui|table va|
|00000340| 6c 75 65 2e 0a 0a 54 68 | 65 20 6d 65 6d 62 65 72 |lue...Th|e member|
|00000350| 20 66 75 6e 63 74 69 6f | 6e 73 20 61 72 65 20 67 | functio|ns are g|
|00000360| 69 76 65 6e 20 69 6e 20 | 61 6c 70 68 61 62 65 74 |iven in |alphabet|
|00000370| 69 63 61 6c 20 6f 72 64 | 65 72 20 65 78 63 65 70 |ical ord|er excep|
|00000380| 74 20 66 6f 72 20 74 68 | 65 0a 63 6f 6e 73 74 72 |t for th|e.constr|
|00000390| 75 63 74 6f 72 73 20 61 | 6e 64 20 64 65 73 74 72 |uctors a|nd destr|
|000003a0| 75 63 74 6f 72 73 20 77 | 68 69 63 68 20 61 70 70 |uctors w|hich app|
|000003b0| 65 61 72 20 66 69 72 73 | 74 2e 0a 7d 0a 0a 5c 73 |ear firs|t..}..\s|
|000003c0| 65 63 74 69 6f 6e 7b 5c | 63 6c 61 73 73 7b 77 78 |ection{\|class{wx|
|000003d0| 41 70 70 7d 3a 20 77 78 | 4f 62 6a 65 63 74 7d 0a |App}: wx|Object}.|
|000003e0| 0a 54 68 65 20 7b 5c 62 | 66 20 77 78 41 70 70 7d |.The {\b|f wxApp}|
|000003f0| 20 63 6c 61 73 73 20 72 | 65 70 72 65 73 65 6e 74 | class r|epresent|
|00000400| 73 20 74 68 65 20 61 70 | 70 6c 69 63 61 74 69 6f |s the ap|plicatio|
|00000410| 6e 20 69 74 73 65 6c 66 | 2e 20 20 41 20 77 78 57 |n itself|. A wxW|
|00000420| 69 6e 64 6f 77 73 0a 61 | 70 70 6c 69 63 61 74 69 |indows.a|pplicati|
|00000430| 6f 6e 20 64 6f 65 73 20 | 6e 6f 74 20 68 61 76 65 |on does |not have|
|00000440| 20 61 20 7b 5c 69 74 20 | 6d 61 69 6e 7d 20 70 72 | a {\it |main} pr|
|00000450| 6f 63 65 64 75 72 65 3b | 20 74 68 65 20 65 71 75 |ocedure;| the equ|
|00000460| 69 76 61 6c 65 6e 74 20 | 69 73 20 74 68 65 20 7b |ivalent |is the {|
|00000470| 5c 69 74 20 4f 6e 49 6e | 69 74 7d 0a 6d 65 6d 62 |\it OnIn|it}.memb|
|00000480| 65 72 20 64 65 66 69 6e | 65 64 20 66 6f 72 20 61 |er defin|ed for a|
|00000490| 20 63 6c 61 73 73 20 64 | 65 72 69 76 65 64 20 66 | class d|erived f|
|000004a0| 72 6f 6d 20 7b 5c 62 66 | 20 77 78 41 70 70 7d 2e |rom {\bf| wxApp}.|
|000004b0| 20 7b 5c 69 74 0a 4f 6e | 49 6e 69 74 7d 20 6d 75 | {\it.On|Init} mu|
|000004c0| 73 74 20 63 72 65 61 74 | 65 20 61 6e 64 20 72 65 |st creat|e and re|
|000004d0| 74 75 72 6e 20 61 20 6d | 61 69 6e 20 77 69 6e 64 |turn a m|ain wind|
|000004e0| 6f 77 20 66 72 61 6d 65 | 20 61 73 20 61 20 62 61 |ow frame| as a ba|
|000004f0| 72 65 20 6d 69 6e 69 6d | 75 6d 2e 0a 49 66 20 4e |re minim|um..If N|
|00000500| 55 4c 4c 20 69 73 20 72 | 65 74 75 72 6e 65 64 20 |ULL is r|eturned |
|00000510| 66 72 6f 6d 20 7b 5c 69 | 74 20 4f 6e 49 6e 69 74 |from {\i|t OnInit|
|00000520| 7d 2c 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |}, the a|pplicati|
|00000530| 6f 6e 20 77 69 6c 6c 20 | 65 78 69 74 2e 0a 4e 6f |on will |exit..No|
|00000540| 74 65 20 74 68 61 74 20 | 74 68 65 20 70 72 6f 67 |te that |the prog|
|00000550| 72 61 6d 27 73 20 63 6f | 6d 6d 61 6e 64 20 6c 69 |ram's co|mmand li|
|00000560| 6e 65 20 61 72 67 75 6d | 65 6e 74 73 2c 20 72 65 |ne argum|ents, re|
|00000570| 70 72 65 73 65 6e 74 65 | 64 20 62 79 20 7b 5c 69 |presente|d by {\i|
|00000580| 74 0a 61 72 67 63 7d 20 | 61 6e 64 20 7b 5c 69 74 |t.argc} |and {\it|
|00000590| 20 61 72 67 76 7d 2c 20 | 61 72 65 20 61 76 61 69 | argv}, |are avai|
|000005a0| 6c 61 62 6c 65 20 66 72 | 6f 6d 20 77 69 74 68 69 |lable fr|om withi|
|000005b0| 6e 20 7b 5c 62 66 20 77 | 78 41 70 70 7d 20 6d 65 |n {\bf w|xApp} me|
|000005c0| 6d 62 65 72 20 66 75 6e | 63 74 69 6f 6e 73 2e 0a |mber fun|ctions..|
|000005d0| 0a 41 6e 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |.An appl|ication |
|000005e0| 63 6c 6f 73 65 73 20 62 | 79 20 64 65 73 74 72 6f |closes b|y destro|
|000005f0| 79 69 6e 67 20 61 6c 6c | 20 77 69 6e 64 6f 77 73 |ying all| windows|
|00000600| 2e 20 42 65 63 61 75 73 | 65 20 61 6c 6c 20 66 72 |. Becaus|e all fr|
|00000610| 61 6d 65 73 0a 6d 75 73 | 74 20 62 65 20 64 65 73 |ames.mus|t be des|
|00000620| 74 72 6f 79 65 64 20 66 | 6f 72 20 74 68 65 20 61 |troyed f|or the a|
|00000630| 70 70 6c 69 63 61 74 69 | 6f 6e 20 74 6f 20 65 78 |pplicati|on to ex|
|00000640| 69 74 2c 20 69 74 20 69 | 73 20 61 64 76 69 73 61 |it, it i|s advisa|
|00000650| 62 6c 65 20 74 6f 20 75 | 73 65 0a 70 61 72 65 6e |ble to u|se.paren|
|00000660| 74 20 66 72 61 6d 65 73 | 20 77 68 65 72 65 76 65 |t frames| whereve|
|00000670| 72 20 70 6f 73 73 69 62 | 6c 65 20 77 68 65 6e 20 |r possib|le when |
|00000680| 63 72 65 61 74 69 6e 67 | 20 6e 65 77 20 66 72 61 |creating| new fra|
|00000690| 6d 65 73 2c 20 73 6f 20 | 74 68 61 74 0a 64 65 6c |mes, so |that.del|
|000006a0| 65 74 69 6e 67 20 74 68 | 65 20 74 6f 70 20 6c 65 |eting th|e top le|
|000006b0| 76 65 6c 20 66 72 61 6d | 65 20 77 69 6c 6c 20 61 |vel fram|e will a|
|000006c0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 64 65 6c |utomatic|ally del|
|000006d0| 65 74 65 20 63 68 69 6c | 64 20 66 72 61 6d 65 73 |ete chil|d frames|
|000006e0| 2e 0a 49 6e 20 65 6d 65 | 72 67 65 6e 63 69 65 73 |..In eme|rgencies|
|000006f0| 20 74 68 65 20 7b 5c 69 | 74 20 77 78 45 78 69 74 | the {\i|t wxExit|
|00000700| 7d 20 66 75 6e 63 74 69 | 6f 6e 20 63 61 6e 20 62 |} functi|on can b|
|00000710| 65 20 63 61 6c 6c 65 64 | 20 74 6f 20 6b 69 6c 6c |e called| to kill|
|00000720| 20 74 68 65 0a 61 70 70 | 6c 69 63 61 74 69 6f 6e | the.app|lication|
|00000730| 2e 0a 0a 41 6e 20 65 78 | 61 6d 70 6c 65 20 6f 66 |...An ex|ample of|
|00000740| 20 64 65 66 69 6e 69 6e | 67 20 61 6e 20 61 70 70 | definin|g an app|
|00000750| 6c 69 63 61 74 69 6f 6e | 20 66 6f 6c 6c 6f 77 73 |lication| follows|
|00000760| 3a 0a 0a 5c 62 65 67 69 | 6e 7b 76 65 72 62 61 74 |:..\begi|n{verbat|
|00000770| 69 6d 7d 0a 63 6c 61 73 | 73 20 44 65 72 69 76 65 |im}.clas|s Derive|
|00000780| 64 41 70 70 3a 20 70 75 | 62 6c 69 63 20 77 78 41 |dApp: pu|blic wxA|
|00000790| 70 70 0a 7b 0a 20 70 75 | 62 6c 69 63 3a 0a 20 20 |pp.{. pu|blic:. |
|000007a0| 77 78 46 72 61 6d 65 20 | 2a 4f 6e 49 6e 69 74 28 |wxFrame |*OnInit(|
|000007b0| 76 6f 69 64 29 3b 0a 7d | 3b 0a 0a 77 78 46 72 61 |void);.}|;..wxFra|
|000007c0| 6d 65 20 2a 44 65 72 69 | 76 65 64 41 70 70 3a 3a |me *Deri|vedApp::|
|000007d0| 4f 6e 49 6e 69 74 28 76 | 6f 69 64 29 0a 7b 0a 20 |OnInit(v|oid).{. |
|000007e0| 20 77 78 46 72 61 6d 65 | 20 2a 74 68 65 5f 66 72 | wxFrame| *the_fr|
|000007f0| 61 6d 65 20 3d 20 6e 65 | 77 20 77 78 46 72 61 6d |ame = ne|w wxFram|
|00000800| 65 28 61 72 67 76 5b 30 | 5d 29 3b 0a 20 20 2e 2e |e(argv[0|]);. ..|
|00000810| 2e 0a 20 20 72 65 74 75 | 72 6e 20 74 68 65 5f 66 |.. retu|rn the_f|
|00000820| 72 61 6d 65 3b 0a 7d 0a | 0a 4d 79 41 70 70 20 44 |rame;.}.|.MyApp D|
|00000830| 65 72 69 76 65 64 41 70 | 70 3b 0a 5c 65 6e 64 7b |erivedAp|p;.\end{|
|00000840| 76 65 72 62 61 74 69 6d | 7d 0a 0a 5c 6d 65 6d 62 |verbatim|}..\memb|
|00000850| 65 72 73 65 63 74 69 6f | 6e 7b 77 78 41 70 70 3a |ersectio|n{wxApp:|
|00000860| 3a 77 78 41 70 70 7d 0a | 0a 5c 66 75 6e 63 7b 76 |:wxApp}.|.\func{v|
|00000870| 6f 69 64 7d 7b 77 78 41 | 70 70 7d 7b 5c 76 6f 69 |oid}{wxA|pp}{\voi|
|00000880| 64 7d 0a 0a 43 6f 6e 73 | 74 72 75 63 74 6f 72 2e |d}..Cons|tructor.|
|00000890| 20 43 61 6c 6c 20 69 6d | 70 6c 69 63 69 74 6c 79 | Call im|plicitly|
|000008a0| 20 77 69 74 68 20 61 20 | 64 65 66 69 6e 69 74 69 | with a |definiti|
|000008b0| 6f 6e 20 6f 66 20 61 20 | 77 78 41 70 70 20 6f 62 |on of a |wxApp ob|
|000008c0| 6a 65 63 74 2e 0a 0a 5c | 6d 65 6d 62 65 72 73 65 |ject...\|memberse|
|000008d0| 63 74 69 6f 6e 7b 77 78 | 41 70 70 3a 3a 5c 64 65 |ction{wx|App::\de|
|000008e0| 73 74 72 75 63 74 7b 77 | 78 41 70 70 7d 7d 0a 0a |struct{w|xApp}}..|
|000008f0| 5c 66 75 6e 63 7b 76 6f | 69 64 7d 7b 5c 64 65 73 |\func{vo|id}{\des|
|00000900| 74 72 75 63 74 7b 77 78 | 41 70 70 7d 7d 7b 5c 76 |truct{wx|App}}{\v|
|00000910| 6f 69 64 7d 0a 0a 44 65 | 73 74 72 75 63 74 6f 72 |oid}..De|structor|
|00000920| 2e 20 57 69 6c 6c 20 62 | 65 20 63 61 6c 6c 65 64 |. Will b|e called|
|00000930| 20 69 6d 70 6c 69 63 69 | 74 6c 79 20 69 66 20 74 | implici|tly if t|
|00000940| 68 65 20 77 78 41 70 70 | 20 6f 62 6a 65 63 74 20 |he wxApp| object |
|00000950| 69 73 20 63 72 65 61 74 | 65 64 20 6f 6e 20 74 68 |is creat|ed on th|
|00000960| 65 20 73 74 61 63 6b 2e | 0a 0a 5c 6d 65 6d 62 65 |e stack.|..\membe|
|00000970| 72 73 65 63 74 69 6f 6e | 7b 77 78 41 70 70 3a 3a |rsection|{wxApp::|
|00000980| 61 72 67 63 7d 0a 0a 5c | 6d 65 6d 62 65 72 7b 69 |argc}..\|member{i|
|00000990| 6e 74 7d 7b 61 72 67 63 | 7d 0a 0a 4e 75 6d 62 65 |nt}{argc|}..Numbe|
|000009a0| 72 20 6f 66 20 63 6f 6d | 6d 61 6e 64 20 6c 69 6e |r of com|mand lin|
|000009b0| 65 20 61 72 67 75 6d 65 | 6e 74 73 20 28 61 66 74 |e argume|nts (aft|
|000009c0| 65 72 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 2d 73 |er envir|onment-s|
|000009d0| 70 65 63 69 66 69 63 20 | 70 72 6f 63 65 73 73 69 |pecific |processi|
|000009e0| 6e 67 29 2e 0a 0a 5c 6d | 65 6d 62 65 72 73 65 63 |ng)...\m|embersec|
|000009f0| 74 69 6f 6e 7b 77 78 41 | 70 70 3a 3a 61 72 67 76 |tion{wxA|pp::argv|
|00000a00| 7d 0a 0a 5c 6d 65 6d 62 | 65 72 7b 63 68 61 72 20 |}..\memb|er{char |
|00000a10| 2a 2a 7d 7b 61 72 67 76 | 7d 0a 0a 43 6f 6d 6d 61 |**}{argv|}..Comma|
|00000a20| 6e 64 20 6c 69 6e 65 20 | 61 72 67 75 6d 65 6e 74 |nd line |argument|
|00000a30| 73 20 28 61 66 74 65 72 | 20 65 6e 76 69 72 6f 6e |s (after| environ|
|00000a40| 6d 65 6e 74 2d 73 70 65 | 63 69 66 69 63 20 70 72 |ment-spe|cific pr|
|00000a50| 6f 63 65 73 73 69 6e 67 | 29 2e 0a 0a 5c 6d 65 6d |ocessing|)...\mem|
|00000a60| 62 65 72 73 65 63 74 69 | 6f 6e 7b 77 78 41 70 70 |bersecti|on{wxApp|
|00000a70| 3a 3a 49 6e 69 74 69 61 | 6c 69 7a 65 64 7d 0a 0a |::Initia|lized}..|
|00000a80| 5c 66 75 6e 63 7b 42 6f | 6f 6c 7d 7b 49 6e 69 74 |\func{Bo|ol}{Init|
|00000a90| 69 61 6c 69 7a 65 64 7d | 7b 5c 76 6f 69 64 7d 0a |ialized}|{\void}.|
|00000aa0| 0a 52 65 74 75 72 6e 73 | 20 54 52 55 45 20 69 66 |.Returns| TRUE if|
|00000ab0| 20 74 68 65 20 61 70 70 | 6c 69 63 61 74 69 6f 6e | the app|lication|
|00000ac0| 20 68 61 73 20 62 65 65 | 6e 20 69 6e 69 74 69 61 | has bee|n initia|
|00000ad0| 6c 69 7a 65 64 20 28 69 | 2e 65 2e 20 69 66 20 7b |lized (i|.e. if {|
|00000ae0| 5c 62 66 0a 4f 6e 49 6e | 69 74 7d 20 68 61 73 20 |\bf.OnIn|it} has |
|00000af0| 72 65 74 75 72 6e 65 64 | 20 73 75 63 63 65 73 73 |returned| success|
|00000b00| 66 75 6c 6c 79 29 2e 20 | 20 54 68 69 73 20 63 61 |fully). | This ca|
|00000b10| 6e 20 62 65 20 75 73 65 | 66 75 6c 20 66 6f 72 20 |n be use|ful for |
|00000b20| 65 72 72 6f 72 0a 6d 65 | 73 73 61 67 65 20 72 6f |error.me|ssage ro|
|00000b30| 75 74 69 6e 65 73 20 74 | 6f 20 64 65 74 65 72 6d |utines t|o determ|
|00000b40| 69 6e 65 20 77 68 69 63 | 68 20 6d 65 74 68 6f 64 |ine whic|h method|
|00000b50| 20 6f 66 20 6f 75 74 70 | 75 74 20 69 73 20 62 65 | of outp|ut is be|
|00000b60| 73 74 20 66 6f 72 20 74 | 68 65 0a 63 75 72 72 65 |st for t|he.curre|
|00000b70| 6e 74 20 73 74 61 74 65 | 20 6f 66 20 74 68 65 20 |nt state| of the |
|00000b80| 70 72 6f 67 72 61 6d 20 | 28 73 6f 6d 65 20 77 69 |program |(some wi|
|00000b90| 6e 64 6f 77 69 6e 67 20 | 73 79 73 74 65 6d 73 20 |ndowing |systems |
|00000ba0| 6d 61 79 20 6e 6f 74 20 | 6c 69 6b 65 0a 64 69 61 |may not |like.dia|
|00000bb0| 6c 6f 67 73 20 74 6f 20 | 70 6f 70 20 75 70 20 62 |logs to |pop up b|
|00000bc0| 65 66 6f 72 65 20 74 68 | 65 20 6d 61 69 6e 20 6c |efore th|e main l|
|00000bd0| 6f 6f 70 20 68 61 73 20 | 62 65 65 6e 20 65 6e 74 |oop has |been ent|
|00000be0| 65 72 65 64 29 2e 0a 0a | 5c 6d 65 6d 62 65 72 73 |ered)...|\members|
|00000bf0| 65 63 74 69 6f 6e 7b 77 | 78 41 70 70 3a 3a 4d 61 |ection{w|xApp::Ma|
|00000c00| 69 6e 4c 6f 6f 70 7d 0a | 0a 5c 66 75 6e 63 7b 76 |inLoop}.|.\func{v|
|00000c10| 6f 69 64 7d 7b 4d 61 69 | 6e 4c 6f 6f 70 7d 7b 5c |oid}{Mai|nLoop}{\|
|00000c20| 76 6f 69 64 7d 0a 0a 43 | 61 6c 6c 65 64 20 62 79 |void}..C|alled by|
|00000c30| 20 77 78 57 69 6e 64 6f | 77 73 20 6f 6e 20 63 72 | wxWindo|ws on cr|
|00000c40| 65 61 74 69 6f 6e 20 6f | 66 20 74 68 65 20 61 70 |eation o|f the ap|
|00000c50| 70 6c 69 63 61 74 69 6f | 6e 2e 20 20 4f 76 65 72 |plicatio|n. Over|
|00000c60| 72 69 64 65 20 74 68 69 | 73 20 69 66 20 79 6f 75 |ride thi|s if you|
|00000c70| 20 77 69 73 68 0a 74 6f | 20 70 72 6f 76 69 64 65 | wish.to| provide|
|00000c80| 20 79 6f 75 72 20 6f 77 | 6e 20 28 65 6e 76 69 72 | your ow|n (envir|
|00000c90| 6f 6e 6d 65 6e 74 2d 64 | 65 70 65 6e 64 65 6e 74 |onment-d|ependent|
|00000ca0| 29 20 6d 61 69 6e 20 6c | 6f 6f 70 2e 0a 0a 5c 6d |) main l|oop...\m|
|00000cb0| 65 6d 62 65 72 73 65 63 | 74 69 6f 6e 7b 77 78 41 |embersec|tion{wxA|
|00000cc0| 70 70 3a 3a 4f 6e 45 78 | 69 74 7d 0a 0a 5c 66 75 |pp::OnEx|it}..\fu|
|00000cd0| 6e 63 7b 76 6f 69 64 7d | 7b 4f 6e 45 78 69 74 7d |nc{void}|{OnExit}|
|00000ce0| 7b 5c 76 6f 69 64 7d 0a | 0a 50 72 6f 76 69 64 65 |{\void}.|.Provide|
|00000cf0| 20 74 68 69 73 20 6d 65 | 6d 62 65 72 20 66 75 6e | this me|mber fun|
|00000d00| 63 74 69 6f 6e 20 66 6f | 72 20 61 6e 79 20 70 72 |ction fo|r any pr|
|00000d10| 6f 63 65 73 73 69 6e 67 | 20 77 68 69 63 68 20 6e |ocessing| which n|
|00000d20| 65 65 64 73 20 74 6f 20 | 62 65 20 64 6f 6e 65 20 |eeds to |be done |
|00000d30| 61 73 0a 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |as.the a|pplicati|
|00000d40| 6f 6e 20 69 73 20 61 62 | 6f 75 74 20 74 6f 20 65 |on is ab|out to e|
|00000d50| 78 69 74 2e 0a 0a 5c 6d | 65 6d 62 65 72 73 65 63 |xit...\m|embersec|
|00000d60| 74 69 6f 6e 7b 77 78 41 | 70 70 3a 3a 4f 6e 49 6e |tion{wxA|pp::OnIn|
|00000d70| 69 74 7d 0a 0a 5c 66 75 | 6e 63 7b 77 78 46 72 61 |it}..\fu|nc{wxFra|
|00000d80| 6d 65 20 2a 7d 7b 4f 6e | 49 6e 69 74 7d 7b 5c 76 |me *}{On|Init}{\v|
|00000d90| 6f 69 64 7d 0a 0a 54 68 | 69 73 20 6d 75 73 74 20 |oid}..Th|is must |
|00000da0| 62 65 20 70 72 6f 76 69 | 64 65 64 20 62 79 20 74 |be provi|ded by t|
|00000db0| 68 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 2c 20 |he appli|cation, |
|00000dc0| 61 6e 64 20 6d 75 73 74 | 20 63 72 65 61 74 65 20 |and must| create |
|00000dd0| 61 6e 64 20 72 65 74 75 | 72 6e 20 74 68 65 0a 61 |and retu|rn the.a|
|00000de0| 70 70 6c 69 63 61 74 69 | 6f 6e 27 73 20 6d 61 69 |pplicati|on's mai|
|00000df0| 6e 20 77 69 6e 64 6f 77 | 2e 0a 0a 5c 73 65 63 74 |n window|...\sect|
|00000e00| 69 6f 6e 7b 5c 63 6c 61 | 73 73 7b 77 78 42 72 75 |ion{\cla|ss{wxBru|
|00000e10| 73 68 7d 3a 20 77 78 4f | 62 6a 65 63 74 7d 0a 0a |sh}: wxO|bject}..|
|00000e20| 41 20 62 72 75 73 68 20 | 69 73 20 61 20 64 72 61 |A brush |is a dra|
|00000e30| 77 69 6e 67 20 74 6f 6f | 6c 20 66 6f 72 20 66 69 |wing too|l for fi|
|00000e40| 6c 6c 69 6e 67 20 69 6e | 20 61 72 65 61 73 2e 20 |lling in| areas. |
|00000e50| 49 74 20 69 73 20 75 73 | 65 64 20 66 6f 72 0a 70 |It is us|ed for.p|
|00000e60| 61 69 6e 74 69 6e 67 20 | 74 68 65 20 62 61 63 6b |ainting |the back|
|00000e70| 67 72 6f 75 6e 64 20 6f | 66 20 72 65 63 74 61 6e |ground o|f rectan|
|00000e80| 67 6c 65 73 2c 20 65 6c | 6c 69 70 73 65 73 2c 20 |gles, el|lipses, |
|00000e90| 65 74 63 2e 20 20 49 74 | 20 68 61 73 20 61 20 63 |etc. It| has a c|
|00000ea0| 6f 6c 6f 75 72 0a 61 6e | 64 20 61 20 73 74 79 6c |olour.an|d a styl|
|00000eb0| 65 20 2d 20 74 68 65 20 | 73 74 79 6c 65 20 6d 61 |e - the |style ma|
|00000ec0| 79 20 62 65 20 77 78 53 | 4f 4c 49 44 20 28 6e 6f |y be wxS|OLID (no|
|00000ed0| 72 6d 61 6c 29 20 6f 72 | 20 77 78 54 52 41 4e 53 |rmal) or| wxTRANS|
|00000ee0| 50 41 52 45 4e 54 20 28 | 74 68 65 0a 62 72 75 73 |PARENT (|the.brus|
|00000ef0| 68 20 69 73 6e 27 74 20 | 75 73 65 64 29 2e 20 4f |h isn't |used). O|
|00000f00| 6e 20 61 20 6d 6f 6e 6f | 63 68 72 6f 6d 65 20 64 |n a mono|chrome d|
|00000f10| 69 73 70 6c 61 79 2c 20 | 74 68 65 20 64 65 66 61 |isplay, |the defa|
|00000f20| 75 6c 74 20 62 65 68 61 | 76 69 6f 75 72 20 69 73 |ult beha|viour is|
|00000f30| 0a 74 6f 20 73 68 6f 77 | 20 61 6c 6c 20 62 72 75 |.to show| all bru|
|00000f40| 73 68 65 73 20 61 73 20 | 77 68 69 74 65 2e 20 49 |shes as |white. I|
|00000f50| 66 20 79 6f 75 20 77 69 | 73 68 20 74 68 65 20 70 |f you wi|sh the p|
|00000f60| 6f 6c 69 63 79 20 74 6f | 20 62 65 20 60 61 6c 6c |olicy to| be `all|
|00000f70| 0a 6e 6f 6e 2d 77 68 69 | 74 65 20 63 6f 6c 6f 75 |.non-whi|te colou|
|00000f80| 72 73 20 61 72 65 20 62 | 6c 61 63 6b 27 2c 20 61 |rs are b|lack', a|
|00000f90| 73 20 77 69 74 68 20 70 | 65 6e 73 2c 20 75 6e 63 |s with p|ens, unc|
|00000fa0| 6f 6d 6d 65 6e 74 20 74 | 68 65 20 70 69 65 63 65 |omment t|he piece|
|00000fb0| 20 6f 66 0a 63 6f 64 65 | 20 64 6f 63 75 6d 65 6e | of.code| documen|
|00000fc0| 74 65 64 20 69 6e 20 7b | 5c 62 66 20 53 65 74 42 |ted in {|\bf SetB|
|00000fd0| 72 75 73 68 7d 20 69 6e | 20 77 78 5c 5f 64 63 2e |rush} in| wx\_dc.|
|00000fe0| 63 63 2e 20 41 6c 74 65 | 72 6e 61 74 69 76 65 6c |cc. Alte|rnativel|
|00000ff0| 79 2c 20 73 65 74 20 74 | 68 65 0a 7b 5c 62 66 20 |y, set t|he.{\bf |
|00001000| 43 6f 6c 6f 75 72 7d 20 | 6d 65 6d 62 65 72 20 6f |Colour} |member o|
|00001010| 66 20 74 68 65 20 64 65 | 76 69 63 65 20 63 6f 6e |f the de|vice con|
|00001020| 74 65 78 74 20 74 6f 20 | 54 52 55 45 2c 20 61 6e |text to |TRUE, an|
|00001030| 64 20 73 65 6c 65 63 74 | 0a 61 70 70 72 6f 70 72 |d select|.appropr|
|00001040| 69 61 74 65 20 63 6f 6c | 6f 75 72 73 2e 0a 0a 44 |iate col|ours...D|
|00001050| 6f 20 6e 6f 74 20 69 6e | 69 74 69 61 6c 69 7a 65 |o not in|itialize|
|00001060| 20 6f 62 6a 65 63 74 73 | 20 6f 6e 20 74 68 65 20 | objects| on the |
|00001070| 73 74 61 63 6b 20 62 65 | 66 6f 72 65 20 74 68 65 |stack be|fore the|
|00001080| 20 70 72 6f 67 72 61 6d | 20 63 6f 6d 6d 65 6e 63 | program| commenc|
|00001090| 65 73 2c 0a 73 69 6e 63 | 65 20 6f 74 68 65 72 20 |es,.sinc|e other |
|000010a0| 72 65 71 75 69 72 65 64 | 20 73 74 72 75 63 74 75 |required| structu|
|000010b0| 72 65 73 20 6d 61 79 20 | 6e 6f 74 20 68 61 76 65 |res may |not have|
|000010c0| 20 62 65 65 6e 20 73 65 | 74 20 75 70 20 79 65 74 | been se|t up yet|
|000010d0| 2e 20 49 6e 73 74 65 61 | 64 2c 0a 64 65 66 69 6e |. Instea|d,.defin|
|000010e0| 65 20 67 6c 6f 62 61 6c | 20 70 6f 69 6e 74 65 72 |e global| pointer|
|000010f0| 73 20 74 6f 20 6f 62 6a | 65 63 74 73 20 61 6e 64 |s to obj|ects and|
|00001100| 20 63 72 65 61 74 65 20 | 74 68 65 6d 20 69 6e 20 | create |them in |
|00001110| 7b 5c 69 74 20 4f 6e 49 | 6e 69 74 7d 20 6f 72 0a |{\it OnI|nit} or.|
|00001120| 77 68 65 6e 20 72 65 71 | 75 69 72 65 64 2e 0a 0a |when req|uired...|
|00001130| 41 6e 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 6d |An appli|cation m|
|00001140| 61 79 20 77 69 73 68 20 | 74 6f 20 63 72 65 61 74 |ay wish |to creat|
|00001150| 65 20 62 72 75 73 68 65 | 73 20 77 69 74 68 20 64 |e brushe|s with d|
|00001160| 69 66 66 65 72 65 6e 74 | 0a 63 68 61 72 61 63 74 |ifferent|.charact|
|00001170| 65 72 69 73 74 69 63 73 | 20 64 79 6e 61 6d 69 63 |eristics| dynamic|
|00001180| 61 6c 6c 79 2c 20 61 6e | 64 20 74 68 65 72 65 20 |ally, an|d there |
|00001190| 69 73 20 74 68 65 20 63 | 6f 6e 73 65 71 75 65 6e |is the c|onsequen|
|000011a0| 74 20 64 61 6e 67 65 72 | 20 74 68 61 74 20 61 0a |t danger| that a.|
|000011b0| 6c 61 72 67 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |large nu|mber of |
|000011c0| 64 75 70 6c 69 63 61 74 | 65 20 62 72 75 73 68 65 |duplicat|e brushe|
|000011d0| 73 20 77 69 6c 6c 20 62 | 65 20 63 72 65 61 74 65 |s will b|e create|
|000011e0| 64 2e 20 54 68 65 72 65 | 66 6f 72 65 20 61 6e 0a |d. There|fore an.|
|000011f0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 6d 61 79 20 |applicat|ion may |
|00001200| 77 69 73 68 20 74 6f 20 | 67 65 74 20 61 20 70 6f |wish to |get a po|
|00001210| 69 6e 74 65 72 20 74 6f | 20 61 20 62 72 75 73 68 |inter to| a brush|
|00001220| 20 62 79 20 75 73 69 6e | 67 20 74 68 65 20 67 6c | by usin|g the gl|
|00001230| 6f 62 61 6c 0a 6c 69 73 | 74 20 6f 66 20 62 72 75 |obal.lis|t of bru|
|00001240| 73 68 65 73 20 7b 5c 62 | 66 20 77 78 54 68 65 42 |shes {\b|f wxTheB|
|00001250| 72 75 73 68 4c 69 73 74 | 7d 2c 20 61 6e 64 20 63 |rushList|}, and c|
|00001260| 61 6c 6c 69 6e 67 20 74 | 68 65 20 6d 65 6d 62 65 |alling t|he membe|
|00001270| 72 20 66 75 6e 63 74 69 | 6f 6e 0a 7b 5c 62 66 20 |r functi|on.{\bf |
|00001280| 46 69 6e 64 4f 72 43 72 | 65 61 74 65 42 72 75 73 |FindOrCr|eateBrus|
|00001290| 68 7d 2e 20 53 65 65 20 | 74 68 65 20 65 6e 74 72 |h}. See |the entr|
|000012a0| 79 20 66 6f 72 20 74 68 | 65 20 5c 68 65 6c 70 72 |y for th|e \helpr|
|000012b0| 65 66 7b 77 78 42 72 75 | 73 68 4c 69 73 74 7d 0a |ef{wxBru|shList}.|
|000012c0| 63 6c 61 73 73 2e 0a 0a | 5c 6d 65 6d 62 65 72 73 |class...|\members|
|000012d0| 65 63 74 69 6f 6e 7b 77 | 78 42 72 75 73 68 3a 3a |ection{w|xBrush::|
|000012e0| 77 78 42 72 75 73 68 7d | 0a 0a 5c 66 75 6e 63 7b |wxBrush}|..\func{|
|000012f0| 76 6f 69 64 7d 7b 77 78 | 42 72 75 73 68 7d 7b 5c |void}{wx|Brush}{\|
|00001300| 76 6f 69 64 7d 0a 0a 5c | 66 75 6e 63 7b 76 6f 69 |void}..\|func{voi|
|00001310| 64 7d 7b 77 78 42 72 75 | 73 68 7d 7b 5c 70 61 72 |d}{wxBru|sh}{\par|
|00001320| 61 6d 7b 77 78 43 6f 6c | 6f 75 72 20 5c 26 7d 7b |am{wxCol|our \&}{|
|00001330| 63 6f 6c 6f 75 72 7d 2c | 20 5c 70 61 72 61 6d 7b |colour},| \param{|
|00001340| 69 6e 74 7d 7b 20 73 74 | 79 6c 65 7d 7d 0a 0a 5c |int}{ st|yle}}..\|
|00001350| 66 75 6e 63 7b 76 6f 69 | 64 7d 7b 77 78 42 72 75 |func{voi|d}{wxBru|
|00001360| 73 68 7d 7b 5c 70 61 72 | 61 6d 7b 63 68 61 72 20 |sh}{\par|am{char |
|00001370| 2a 7d 7b 63 6f 6c 6f 75 | 72 5c 5f 6e 61 6d 65 7d |*}{colou|r\_name}|
|00001380| 2c 20 5c 70 61 72 61 6d | 7b 69 6e 74 7d 7b 20 73 |, \param|{int}{ s|
|00001390| 74 79 6c 65 7d 7d 0a 0a | 43 6f 6e 73 74 72 75 63 |tyle}}..|Construc|
|000013a0| 74 73 20 61 20 62 72 75 | 73 68 3a 20 75 6e 69 6e |ts a bru|sh: unin|
|000013b0| 69 74 69 61 6c 69 7a 65 | 64 2c 20 69 6e 69 74 69 |itialize|d, initi|
|000013c0| 61 6c 69 7a 65 64 20 77 | 69 74 68 20 61 6e 20 52 |alized w|ith an R|
|000013d0| 47 42 20 63 6f 6c 6f 75 | 72 20 61 6e 64 0a 61 20 |GB colou|r and.a |
|000013e0| 73 74 79 6c 65 2c 20 6f | 72 20 69 6e 69 74 69 61 |style, o|r initia|
|000013f0| 6c 69 7a 65 64 20 75 73 | 69 6e 67 20 61 20 63 6f |lized us|ing a co|
|00001400| 6c 6f 75 72 20 6e 61 6d | 65 20 61 6e 64 20 61 20 |lour nam|e and a |
|00001410| 73 74 79 6c 65 2e 20 20 | 49 66 20 74 68 65 20 6e |style. |If the n|
|00001420| 61 6d 65 64 0a 63 6f 6c | 6f 75 72 20 66 6f 72 6d |amed.col|our form|
|00001430| 20 69 73 20 75 73 65 64 | 2c 20 61 6e 20 61 70 70 | is used|, an app|
|00001440| 72 6f 70 72 69 61 74 65 | 20 7b 5c 62 66 20 77 78 |ropriate| {\bf wx|
|00001450| 43 6f 6c 6f 75 72 7d 20 | 73 74 72 75 63 74 75 72 |Colour} |structur|
|00001460| 65 20 69 73 20 66 6f 75 | 6e 64 0a 69 6e 20 74 68 |e is fou|nd.in th|
|00001470| 65 20 63 6f 6c 6f 75 72 | 20 64 61 74 61 62 61 73 |e colour| databas|
|00001480| 65 2e 0a 0a 5c 6d 65 6d | 62 65 72 73 65 63 74 69 |e...\mem|bersecti|
|00001490| 6f 6e 7b 77 78 42 72 75 | 73 68 3a 3a 5c 64 65 73 |on{wxBru|sh::\des|
|000014a0| 74 72 75 63 74 7b 77 78 | 42 72 75 73 68 7d 7d 0a |truct{wx|Brush}}.|
|000014b0| 0a 5c 66 75 6e 63 7b 76 | 6f 69 64 7d 7b 5c 64 65 |.\func{v|oid}{\de|
|000014c0| 73 74 72 75 63 74 7b 77 | 78 42 72 75 73 68 7d 7d |struct{w|xBrush}}|
|000014d0| 7b 5c 76 6f 69 64 7d 0a | 0a 44 65 73 74 72 75 63 |{\void}.|.Destruc|
|000014e0| 74 6f 72 2c 20 64 65 73 | 74 72 6f 79 69 6e 67 20 |tor, des|troying |
|000014f0| 74 68 65 20 62 72 75 73 | 68 2e 20 4e 6f 74 65 20 |the brus|h. Note |
|00001500| 74 68 61 74 20 62 72 75 | 73 68 65 73 20 73 68 6f |that bru|shes sho|
|00001510| 75 6c 64 20 76 65 72 79 | 20 72 61 72 65 6c 79 0a |uld very| rarely.|
|00001520| 62 65 20 64 65 6c 65 74 | 65 64 20 73 69 6e 63 65 |be delet|ed since|
|00001530| 20 77 69 6e 64 6f 77 73 | 20 6d 61 79 20 63 6f 6e | windows| may con|
|00001540| 74 61 69 6e 20 70 6f 69 | 6e 74 65 72 73 20 74 6f |tain poi|nters to|
|00001550| 20 74 68 65 6d 2e 20 41 | 6c 6c 20 62 72 75 73 68 | them. A|ll brush|
|00001560| 65 73 0a 77 69 6c 6c 20 | 62 65 20 64 65 6c 65 74 |es.will |be delet|
|00001570| 65 64 20 77 68 65 6e 20 | 74 68 65 20 61 70 70 6c |ed when |the appl|
|00001580| 69 63 61 74 69 6f 6e 20 | 74 65 72 6d 69 6e 61 74 |ication |terminat|
|00001590| 65 73 2e 0a 0a 5c 6d 65 | 6d 62 65 72 73 65 63 74 |es...\me|mbersect|
|000015a0| 69 6f 6e 7b 77 78 42 72 | 75 73 68 3a 3a 47 65 74 |ion{wxBr|ush::Get|
|000015b0| 43 6f 6c 6f 75 72 7d 0a | 0a 5c 66 75 6e 63 7b 77 |Colour}.|.\func{w|
|000015c0| 78 43 6f 6c 6f 75 72 5c | 26 7d 7b 47 65 74 43 6f |xColour\|&}{GetCo|
|000015d0| 6c 6f 75 72 7d 7b 5c 76 | 6f 69 64 7d 0a 0a 52 65 |lour}{\v|oid}..Re|
|000015e0| 74 75 72 6e 73 20 61 20 | 72 65 66 65 72 65 6e 63 |turns a |referenc|
|000015f0| 65 20 74 6f 20 74 68 65 | 20 62 72 75 73 68 20 63 |e to the| brush c|
|00001600| 6f 6c 6f 75 72 2e 0a 0a | 5c 6d 65 6d 62 65 72 73 |olour...|\members|
|00001610| 65 63 74 69 6f 6e 7b 77 | 78 42 72 75 73 68 3a 3a |ection{w|xBrush::|
|00001620| 47 65 74 53 74 79 6c 65 | 7d 0a 0a 5c 66 75 6e 63 |GetStyle|}..\func|
|00001630| 7b 69 6e 74 7d 7b 47 65 | 74 53 74 79 6c 65 7d 7b |{int}{Ge|tStyle}{|
|00001640| 5c 76 6f 69 64 7d 0a 0a | 52 65 74 75 72 6e 73 20 |\void}..|Returns |
|00001650| 74 68 65 20 62 72 75 73 | 68 20 73 74 79 6c 65 20 |the brus|h style |
|00001660| 28 77 78 53 4f 4c 49 44 | 20 6f 72 20 77 78 54 52 |(wxSOLID| or wxTR|
|00001670| 41 4e 53 50 41 52 45 4e | 54 29 2e 0a 0a 5c 6d 65 |ANSPAREN|T)...\me|
|00001680| 6d 62 65 72 73 65 63 74 | 69 6f 6e 7b 77 78 42 72 |mbersect|ion{wxBr|
|00001690| 75 73 68 3a 3a 53 65 74 | 43 6f 6c 6f 75 72 7d 0a |ush::Set|Colour}.|
|000016a0| 0a 5c 66 75 6e 63 7b 76 | 6f 69 64 7d 7b 53 65 74 |.\func{v|oid}{Set|
|000016b0| 43 6f 6c 6f 75 72 7d 7b | 5c 70 61 72 61 6d 7b 77 |Colour}{|\param{w|
|000016c0| 78 43 6f 6c 6f 75 72 20 | 5c 26 7d 7b 63 6f 6c 6f |xColour |\&}{colo|
|000016d0| 75 72 7d 7d 0a 0a 5c 66 | 75 6e 63 7b 76 6f 69 64 |ur}}..\f|unc{void|
|000016e0| 7d 7b 53 65 74 43 6f 6c | 6f 75 72 7d 7b 5c 70 61 |}{SetCol|our}{\pa|
|000016f0| 72 61 6d 7b 63 68 61 72 | 20 2a 7d 7b 63 6f 6c 6f |ram{char| *}{colo|
|00001700| 75 72 5c 5f 6e 61 6d 65 | 7d 7d 0a 0a 5c 66 75 6e |ur\_name|}}..\fun|
|00001710| 63 7b 76 6f 69 64 7d 7b | 53 65 74 43 6f 6c 6f 75 |c{void}{|SetColou|
|00001720| 72 7d 7b 5c 70 61 72 61 | 6d 7b 69 6e 74 7d 7b 20 |r}{\para|m{int}{ |
|00001730| 72 65 64 7d 2c 20 5c 70 | 61 72 61 6d 7b 69 6e 74 |red}, \p|aram{int|
|00001740| 7d 7b 20 67 72 65 65 6e | 7d 2c 20 5c 70 61 72 61 |}{ green|}, \para|
|00001750| 6d 7b 69 6e 74 7d 7b 20 | 62 6c 75 65 7d 7d 0a 0a |m{int}{ |blue}}..|
|00001760| 54 68 65 20 62 72 75 73 | 68 27 73 20 63 6f 6c 6f |The brus|h's colo|
|00001770| 75 72 20 69 73 20 63 68 | 61 6e 67 65 64 20 74 6f |ur is ch|anged to|
|00001780| 20 74 68 65 20 67 69 76 | 65 6e 20 63 6f 6c 6f 75 | the giv|en colou|
|00001790| 72 2e 0a 0a 5c 6d 65 6d | 62 65 72 73 65 63 74 69 |r...\mem|bersecti|
|000017a0| 6f 6e 7b 77 78 42 72 75 | 73 68 3a 3a 53 65 74 53 |on{wxBru|sh::SetS|
|000017b0| 74 79 6c 65 7d 0a 0a 5c | 66 75 6e 63 7b 76 6f 69 |tyle}..\|func{voi|
|000017c0| 64 7d 7b 53 65 74 53 74 | 79 6c 65 7d 7b 5c 70 61 |d}{SetSt|yle}{\pa|
|000017d0| 72 61 6d 7b 69 6e 74 7d | 7b 20 73 74 79 6c 65 7d |ram{int}|{ style}|
|000017e0| 7d 0a 0a 53 65 74 73 20 | 74 68 65 20 62 72 75 73 |}..Sets |the brus|
|000017f0| 68 20 73 74 79 6c 65 20 | 28 77 78 53 4f 4c 49 44 |h style |(wxSOLID|
|00001800| 20 6f 72 20 77 78 54 52 | 41 4e 53 50 41 52 45 4e | or wxTR|ANSPAREN|
|00001810| 54 29 2e 0a 0a 5c 73 65 | 63 74 69 6f 6e 7b 5c 63 |T)...\se|ction{\c|
|00001820| 6c 61 73 73 7b 77 78 42 | 72 75 73 68 4c 69 73 74 |lass{wxB|rushList|
|00001830| 7d 3a 20 77 78 4c 69 73 | 74 7d 0a 0a 41 20 62 72 |}: wxLis|t}..A br|
|00001840| 75 73 68 20 6c 69 73 74 | 20 69 73 20 61 20 6c 69 |ush list| is a li|
|00001850| 73 74 20 63 6f 6e 74 61 | 69 6e 69 6e 67 20 61 6c |st conta|ining al|
|00001860| 6c 20 62 72 75 73 68 65 | 73 20 77 68 69 63 68 20 |l brushe|s which |
|00001870| 68 61 76 65 20 62 65 65 | 6e 20 63 72 65 61 74 65 |have bee|n create|
|00001880| 64 2e 0a 54 68 65 72 65 | 20 69 73 20 6f 6e 6c 79 |d..There| is only|
|00001890| 20 6f 6e 65 20 69 6e 73 | 74 61 6e 63 65 20 6f 66 | one ins|tance of|
|000018a0| 20 74 68 69 73 20 63 6c | 61 73 73 3a 20 7b 5c 62 | this cl|ass: {\b|
|000018b0| 66 20 77 78 54 68 65 42 | 72 75 73 68 4c 69 73 74 |f wxTheB|rushList|
|000018c0| 7d 2e 20 20 55 73 65 0a | 74 68 69 73 20 6f 62 6a |}. Use.|this obj|
|000018d0| 65 63 74 20 74 6f 20 73 | 65 61 72 63 68 20 66 6f |ect to s|earch fo|
|000018e0| 72 20 61 20 70 72 65 76 | 69 6f 75 73 6c 79 20 63 |r a prev|iously c|
|000018f0| 72 65 61 74 65 64 20 62 | 72 75 73 68 20 6f 66 20 |reated b|rush of |
|00001900| 74 68 65 20 64 65 73 69 | 72 65 64 0a 74 79 70 65 |the desi|red.type|
|00001910| 20 61 6e 64 20 63 72 65 | 61 74 65 20 69 74 20 69 | and cre|ate it i|
|00001920| 66 20 6e 6f 74 20 61 6c | 72 65 61 64 79 20 66 6f |f not al|ready fo|
|00001930| 75 6e 64 2e 20 49 6e 20 | 73 6f 6d 65 20 77 69 6e |und. In |some win|
|00001940| 64 6f 77 69 6e 67 20 73 | 79 73 74 65 6d 73 2c 0a |dowing s|ystems,.|
|00001950| 74 68 65 20 62 72 75 73 | 68 20 6d 61 79 20 62 65 |the brus|h may be|
|00001960| 20 61 20 73 63 61 72 63 | 65 20 72 65 73 6f 75 72 | a scarc|e resour|
|00001970| 63 65 2c 20 73 6f 20 69 | 74 20 69 73 20 62 65 73 |ce, so i|t is bes|
|00001980| 74 20 74 6f 20 72 65 75 | 73 65 20 6f 6c 64 0a 72 |t to reu|se old.r|
|00001990| 65 73 6f 75 72 63 65 73 | 20 69 66 20 70 6f 73 73 |esources| if poss|
|000019a0| 69 62 6c 65 2e 20 20 57 | 68 65 6e 20 61 6e 20 61 |ible. W|hen an a|
|000019b0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 66 69 6e 69 73 |pplicati|on finis|
|000019c0| 68 65 73 2c 20 61 6c 6c | 20 62 72 75 73 68 65 73 |hes, all| brushes|
|000019d0| 20 77 69 6c 6c 0a 62 65 | 20 64 65 6c 65 74 65 64 | will.be| deleted|
|000019e0| 20 61 6e 64 20 74 68 65 | 69 72 20 72 65 73 6f 75 | and the|ir resou|
|000019f0| 72 63 65 73 20 66 72 65 | 65 64 2c 20 65 6c 69 6d |rces fre|ed, elim|
|00001a00| 69 6e 61 74 69 6e 67 20 | 74 68 65 20 70 6f 73 73 |inating |the poss|
|00001a10| 69 62 69 6c 69 74 79 20 | 6f 66 0a 60 6d 65 6d 6f |ibility |of.`memo|
|00001a20| 72 79 20 6c 65 61 6b 73 | 27 2e 0a 0a 5c 6d 65 6d |ry leaks|'...\mem|
|00001a30| 62 65 72 73 65 63 74 69 | 6f 6e 7b 77 78 42 72 75 |bersecti|on{wxBru|
|00001a40| 73 68 4c 69 73 74 3a 3a | 77 78 42 72 75 73 68 4c |shList::|wxBrushL|
|00001a50| 69 73 74 7d 0a 0a 5c 66 | 75 6e 63 7b 76 6f 69 64 |ist}..\f|unc{void|
|00001a60| 7d 7b 77 78 42 72 75 73 | 68 4c 69 73 74 7d 7b 5c |}{wxBrus|hList}{\|
|00001a70| 76 6f 69 64 7d 0a 0a 43 | 6f 6e 73 74 72 75 63 74 |void}..C|onstruct|
|00001a80| 6f 72 2e 20 20 54 68 65 | 20 61 70 70 6c 69 63 61 |or. The| applica|
|00001a90| 74 69 6f 6e 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 |tion sho|uld not |
|00001aa0| 63 6f 6e 73 74 72 75 63 | 74 20 69 74 73 20 6f 77 |construc|t its ow|
|00001ab0| 6e 20 62 72 75 73 68 20 | 6c 69 73 74 3a 0a 75 73 |n brush |list:.us|
|00001ac0| 65 20 74 68 65 20 6f 62 | 6a 65 63 74 20 70 6f 69 |e the ob|ject poi|
|00001ad0| 6e 74 65 72 20 7b 5c 62 | 66 20 77 78 54 68 65 42 |nter {\b|f wxTheB|
|00001ae0| 72 75 73 68 4c 69 73 74 | 7d 2e 0a 0a 5c 6d 65 6d |rushList|}...\mem|
|00001af0| 62 65 72 73 65 63 74 69 | 6f 6e 7b 77 78 42 72 75 |bersecti|on{wxBru|
|00001b00| 73 68 4c 69 73 74 3a 3a | 41 64 64 42 72 75 73 68 |shList::|AddBrush|
|00001b10| 7d 0a 0a 5c 66 75 6e 63 | 7b 76 6f 69 64 7d 7b 41 |}..\func|{void}{A|
|00001b20| 64 64 42 72 75 73 68 7d | 7b 5c 70 61 72 61 6d 7b |ddBrush}|{\param{|
|00001b30| 77 78 42 72 75 73 68 20 | 2a 7d 7b 62 72 75 73 68 |wxBrush |*}{brush|
|00001b40| 7d 7d 0a 0a 55 73 65 64 | 20 62 79 20 77 78 57 69 |}}..Used| by wxWi|
|00001b50| 6e 64 6f 77 73 20 74 6f | 20 61 64 64 20 61 20 62 |ndows to| add a b|
|00001b60| 72 75 73 68 20 74 6f 20 | 74 68 65 20 6c 69 73 74 |rush to |the list|
|00001b70| 2c 20 63 61 6c 6c 65 64 | 20 69 6e 20 74 68 65 20 |, called| in the |
|00001b80| 62 72 75 73 68 20 63 6f | 6e 73 74 72 75 63 74 6f |brush co|nstructo|
|00001b90| 72 2e 0a 0a 5c 6d 65 6d | 62 65 72 73 65 63 74 69 |r...\mem|bersecti|
|00001ba0| 6f 6e 7b 77 78 42 72 75 | 73 68 4c 69 73 74 3a 3a |on{wxBru|shList::|
|00001bb0| 46 69 6e 64 4f 72 43 72 | 65 61 74 65 42 72 75 73 |FindOrCr|eateBrus|
|00001bc0| 68 7d 0a 0a 5c 66 75 6e | 63 7b 77 78 42 72 75 73 |h}..\fun|c{wxBrus|
|00001bd0| 68 20 2a 7d 7b 46 69 6e | 64 4f 72 43 72 65 61 74 |h *}{Fin|dOrCreat|
|00001be0| 65 42 72 75 73 68 7d 7b | 5c 70 61 72 61 6d 7b 77 |eBrush}{|\param{w|
|00001bf0| 78 43 6f 6c 6f 75 72 20 | 2a 7d 7b 63 6f 6c 6f 75 |xColour |*}{colou|
|00001c00| 72 7d 2c 20 5c 70 61 72 | 61 6d 7b 69 6e 74 7d 7b |r}, \par|am{int}{|
|00001c10| 20 73 74 79 6c 65 7d 7d | 0a 0a 5c 66 75 6e 63 7b | style}}|..\func{|
|00001c20| 77 78 42 72 75 73 68 20 | 2a 7d 7b 46 69 6e 64 4f |wxBrush |*}{FindO|
|00001c30| 72 43 72 65 61 74 65 42 | 72 75 73 68 7d 7b 5c 70 |rCreateB|rush}{\p|
|00001c40| 61 72 61 6d 7b 63 68 61 | 72 20 2a 7d 7b 63 6f 6c |aram{cha|r *}{col|
|00001c50| 6f 75 72 5c 5f 6e 61 6d | 65 7d 2c 20 5c 70 61 72 |our\_nam|e}, \par|
|00001c60| 61 6d 7b 69 6e 74 7d 7b | 20 73 74 79 6c 65 7d 7d |am{int}{| style}}|
|00001c70| 0a 0a 46 69 6e 64 73 20 | 61 20 62 72 75 73 68 20 |..Finds |a brush |
|00001c80| 6f 66 20 74 68 65 20 67 | 69 76 65 6e 20 73 70 65 |of the g|iven spe|
|00001c90| 63 69 66 69 63 61 74 69 | 6f 6e 2c 20 6f 72 20 63 |cificati|on, or c|
|00001ca0| 72 65 61 74 65 73 20 6f | 6e 65 20 61 6e 64 20 61 |reates o|ne and a|
|00001cb0| 64 64 73 20 69 74 20 74 | 6f 20 74 68 65 20 6c 69 |dds it t|o the li|
|00001cc0| 73 74 2e 0a 0a 5c 6d 65 | 6d 62 65 72 73 65 63 74 |st...\me|mbersect|
|00001cd0| 69 6f 6e 7b 77 78 42 72 | 75 73 68 4c 69 73 74 3a |ion{wxBr|ushList:|
|00001ce0| 3a 52 65 6d 6f 76 65 42 | 72 75 73 68 7d 0a 0a 5c |:RemoveB|rush}..\|
|00001cf0| 66 75 6e 63 7b 76 6f 69 | 64 7d 7b 52 65 6d 6f 76 |func{voi|d}{Remov|
|00001d00| 65 42 72 75 73 68 7d 7b | 5c 70 61 72 61 6d 7b 77 |eBrush}{|\param{w|
|00001d10| 78 42 72 75 73 68 20 2a | 7d 7b 62 72 75 73 68 7d |xBrush *|}{brush}|
|00001d20| 7d 0a 0a 55 73 65 64 20 | 62 79 20 77 78 57 69 6e |}..Used |by wxWin|
|00001d30| 64 6f 77 73 20 74 6f 20 | 72 65 6d 6f 76 65 20 61 |dows to |remove a|
|00001d40| 20 62 72 75 73 68 20 66 | 72 6f 6d 20 74 68 65 20 | brush f|rom the |
|00001d50| 6c 69 73 74 2e 0a 0a 0a | 5c 73 65 63 74 69 6f 6e |list....|\section|
|00001d60| 7b 5c 63 6c 61 73 73 7b | 77 78 42 75 74 74 6f 6e |{\class{|wxButton|
|00001d70| 7d 3a 20 77 78 49 74 65 | 6d 7d 0a 0a 5c 6d 65 6d |}: wxIte|m}..\mem|
|00001d80| 62 65 72 73 65 63 74 69 | 6f 6e 7b 77 78 42 75 74 |bersecti|on{wxBut|
|00001d90| 74 6f 6e 3a 3a 77 78 42 | 75 74 74 6f 6e 7d 0a 0a |ton::wxB|utton}..|
|00001da0| 5c 66 75 6e 63 7b 76 6f | 69 64 7d 7b 77 78 42 75 |\func{vo|id}{wxBu|
|00001db0| 74 74 6f 6e 7d 7b 5c 70 | 61 72 61 6d 7b 77 78 50 |tton}{\p|aram{wxP|
|00001dc0| 61 6e 65 6c 20 2a 7d 7b | 70 61 72 65 6e 74 7d 2c |anel *}{|parent},|
|00001dd0| 20 5c 70 61 72 61 6d 7b | 77 78 46 75 6e 63 74 69 | \param{|wxFuncti|
|00001de0| 6f 6e 7d 7b 20 66 75 6e | 63 7d 2c 20 5c 70 61 72 |on}{ fun|c}, \par|
|00001df0| 61 6d 7b 63 68 61 72 20 | 2a 7d 7b 6c 61 62 65 6c |am{char |*}{label|
|00001e00| 7d 2c 5c 5c 0a 20 20 5c | 70 61 72 61 6d 7b 69 6e |},\\. \|param{in|
|00001e10| 74 7d 7b 20 78 20 3d 20 | 2d 31 7d 2c 20 5c 70 61 |t}{ x = |-1}, \pa|
|00001e20| 72 61 6d 7b 69 6e 74 7d | 7b 20 79 20 3d 20 2d 31 |ram{int}|{ y = -1|
|00001e30| 7d 2c 20 5c 70 61 72 61 | 6d 7b 69 6e 74 7d 7b 20 |}, \para|m{int}{ |
|00001e40| 77 69 64 74 68 20 3d 20 | 2d 31 7d 2c 20 5c 70 61 |width = |-1}, \pa|
|00001e50| 72 61 6d 7b 69 6e 74 7d | 7b 20 68 65 69 67 68 74 |ram{int}|{ height|
|00001e60| 20 3d 20 2d 31 7d 7d 0a | 0a 43 6f 6e 73 74 72 75 | = -1}}.|.Constru|
|00001e70| 63 74 6f 72 2c 20 63 72 | 65 61 74 69 6e 67 20 61 |ctor, cr|eating a|
|00001e80| 6e 64 20 73 68 6f 77 69 | 6e 67 20 61 20 62 75 74 |nd showi|ng a but|
|00001e90| 74 6f 6e 2e 20 20 49 66 | 20 7b 5c 69 74 20 77 69 |ton. If| {\it wi|
|00001ea0| 64 74 68 7d 20 6f 72 20 | 7b 5c 69 74 0a 68 65 69 |dth} or |{\it.hei|
|00001eb0| 67 68 74 7d 20 61 72 65 | 20 6f 6d 69 74 74 65 64 |ght} are| omitted|
|00001ec0| 20 28 6f 72 20 61 72 65 | 20 6c 65 73 73 20 74 68 | (or are| less th|
|00001ed0| 61 6e 20 7a 65 72 6f 29 | 2c 20 61 6e 20 61 70 70 |an zero)|, an app|
|00001ee0| 72 6f 70 72 69 61 74 65 | 20 73 69 7a 65 20 77 69 |ropriate| size wi|
|00001ef0| 6c 6c 0a 62 65 20 75 73 | 65 64 20 66 6f 72 20 74 |ll.be us|ed for t|
|00001f00| 68 65 20 62 75 74 74 6f | 6e 2e 20 20 7b 5c 69 74 |he butto|n. {\it|
|00001f10| 20 66 75 6e 63 7d 20 6d | 61 79 20 62 65 20 4e 55 | func} m|ay be NU|
|00001f20| 4c 4c 3b 20 6f 74 68 65 | 72 77 69 73 65 20 69 74 |LL; othe|rwise it|
|00001f30| 20 69 73 20 75 73 65 64 | 0a 61 73 20 74 68 65 20 | is used|.as the |
|00001f40| 63 61 6c 6c 62 61 63 6b | 20 66 6f 72 20 74 68 65 |callback| for the|
|00001f50| 20 62 75 74 74 6f 6e 2e | 20 20 4e 6f 74 65 20 74 | button.| Note t|
|00001f60| 68 61 74 20 74 68 65 20 | 63 61 73 74 20 28 77 78 |hat the |cast (wx|
|00001f70| 46 75 6e 63 74 69 6f 6e | 29 20 6d 75 73 74 0a 62 |Function|) must.b|
|00001f80| 65 20 75 73 65 64 20 77 | 68 65 6e 20 70 61 73 73 |e used w|hen pass|
|00001f90| 69 6e 67 20 79 6f 75 72 | 20 63 61 6c 6c 62 61 63 |ing your| callbac|
|00001fa0| 6b 20 66 75 6e 63 74 69 | 6f 6e 20 6e 61 6d 65 2c |k functi|on name,|
|00001fb0| 20 6f 72 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 | or the |compiler|
|00001fc0| 20 6d 61 79 0a 63 6f 6d | 70 6c 61 69 6e 20 74 68 | may.com|plain th|
|00001fd0| 61 74 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |at the f|unction |
|00001fe0| 64 6f 65 73 20 6e 6f 74 | 20 6d 61 74 63 68 20 74 |does not| match t|
|00001ff0| 68 65 20 63 6f 6e 73 74 | 72 75 63 74 6f 72 20 64 |he const|ructor d|
|00002000| 65 63 6c 61 72 61 74 69 | 6f 6e 2e 0a 0a 5c 6d 65 |eclarati|on...\me|
|00002010| 6d 62 65 72 73 65 63 74 | 69 6f 6e 7b 77 78 42 75 |mbersect|ion{wxBu|
|00002020| 74 74 6f 6e 3a 3a 5c 64 | 65 73 74 72 75 63 74 7b |tton::\d|estruct{|
|00002030| 77 78 42 75 74 74 6f 6e | 7d 7d 0a 0a 5c 66 75 6e |wxButton|}}..\fun|
|00002040| 63 7b 76 6f 69 64 7d 7b | 5c 64 65 73 74 72 75 63 |c{void}{|\destruc|
|00002050| 74 7b 77 78 42 75 74 74 | 6f 6e 7d 7d 7b 5c 76 6f |t{wxButt|on}}{\vo|
|00002060| 69 64 7d 0a 0a 44 65 73 | 74 72 75 63 74 6f 72 2c |id}..Des|tructor,|
|00002070| 20 64 65 73 74 72 6f 79 | 69 6e 67 20 74 68 65 20 | destroy|ing the |
|00002080| 62 75 74 74 6f 6e 2e 0a | 0a 5c 73 65 63 74 69 6f |button..|.\sectio|
|00002090| 6e 7b 5c 63 6c 61 73 73 | 7b 77 78 43 61 6e 76 61 |n{\class|{wxCanva|
|000020a0| 73 7d 3a 20 77 78 57 69 | 6e 64 6f 77 7d 0a 0a 41 |s}: wxWi|ndow}..A|
|000020b0| 20 63 61 6e 76 61 73 20 | 69 73 20 61 20 73 75 62 | canvas |is a sub|
|000020c0| 77 69 6e 64 6f 77 20 6f | 6e 74 6f 20 77 68 69 63 |window o|nto whic|
|000020d0| 68 20 67 72 61 70 68 69 | 63 73 20 61 6e 64 20 74 |h graphi|cs and t|
|000020e0| 65 78 74 20 63 61 6e 20 | 62 65 20 64 72 61 77 6e |ext can |be drawn|
|000020f0| 2c 20 61 6e 64 20 6d 6f | 75 73 65 0a 61 6e 64 20 |, and mo|use.and |
|00002100| 6b 65 79 62 6f 61 72 64 | 20 69 6e 70 75 74 20 63 |keyboard| input c|
|00002110| 61 6e 20 62 65 20 69 6e | 74 65 72 63 65 70 74 65 |an be in|tercepte|
|00002120| 64 2e 20 20 41 74 20 70 | 72 65 73 65 6e 74 2c 20 |d. At p|resent, |
|00002130| 70 61 6e 65 6c 20 69 74 | 65 6d 73 20 63 61 6e 6e |panel it|ems cann|
|00002140| 6f 74 20 62 65 0a 70 6c | 61 63 65 64 20 6f 6e 20 |ot be.pl|aced on |
|00002150| 61 20 63 61 6e 76 61 73 | 2e 0a 0a 54 6f 20 64 65 |a canvas|...To de|
|00002160| 74 65 72 6d 69 6e 65 20 | 77 68 65 74 68 65 72 20 |termine |whether |
|00002170| 61 20 63 61 6e 76 61 73 | 20 69 73 20 63 6f 6c 6f |a canvas| is colo|
|00002180| 75 72 20 6f 72 20 6d 6f | 6e 6f 63 68 72 6f 6d 65 |ur or mo|nochrome|
|00002190| 2c 20 74 65 73 74 20 74 | 68 65 20 63 61 6e 76 61 |, test t|he canva|
|000021a0| 73 27 73 0a 64 65 76 69 | 63 65 20 63 6f 6e 74 65 |s's.devi|ce conte|
|000021b0| 78 74 20 7b 5c 62 66 20 | 63 6f 6c 6f 75 72 7d 20 |xt {\bf |colour} |
|000021c0| 42 6f 6f 6c 20 6d 65 6d | 62 65 72 20 76 61 72 69 |Bool mem|ber vari|
|000021d0| 61 62 6c 65 2e 0a 0a 5c | 6d 65 6d 62 65 72 73 65 |able...\|memberse|
|000021e0| 63 74 69 6f 6e 7b 77 78 | 43 61 6e 76 61 73 3a 3a |ction{wx|Canvas::|
|000021f0| 77 78 43 61 6e 76 61 73 | 7d 0a 0a 5c 66 75 6e 63 |wxCanvas|}..\func|
|00002200| 7b 76 6f 69 64 7d 7b 77 | 78 43 61 6e 76 61 73 7d |{void}{w|xCanvas}|
|00002210| 7b 5c 70 61 72 61 6d 7b | 77 78 46 72 61 6d 65 20 |{\param{|wxFrame |
|00002220| 2a 7d 7b 70 61 72 65 6e | 74 7d 2c 20 5c 70 61 72 |*}{paren|t}, \par|
|00002230| 61 6d 7b 69 6e 74 7d 7b | 20 78 20 3d 20 2d 31 7d |am{int}{| x = -1}|
|00002240| 2c 20 5c 70 61 72 61 6d | 7b 69 6e 74 7d 7b 20 79 |, \param|{int}{ y|
|00002250| 20 3d 20 2d 31 7d 2c 0a | 20 20 5c 70 61 72 61 6d | = -1},.| \param|
|00002260| 7b 69 6e 74 7d 7b 20 77 | 69 64 74 68 20 3d 20 2d |{int}{ w|idth = -|
|00002270| 31 7d 2c 20 5c 70 61 72 | 61 6d 7b 69 6e 74 7d 7b |1}, \par|am{int}{|
|00002280| 20 68 65 69 67 68 74 20 | 3d 20 2d 31 7d 2c 5c 5c | height |= -1},\\|
|00002290| 20 5c 70 61 72 61 6d 7b | 69 6e 74 7d 7b 20 73 74 | \param{|int}{ st|
|000022a0| 79 6c 65 20 3d 20 77 78 | 52 45 54 41 49 4e 45 44 |yle = wx|RETAINED|
|000022b0| 7d 7d 0a 0a 43 6f 6e 73 | 74 72 75 63 74 6f 72 2e |}}..Cons|tructor.|
|000022c0| 20 54 68 65 20 73 74 79 | 6c 65 20 70 61 72 61 6d | The sty|le param|
|000022d0| 65 74 65 72 20 6d 61 79 | 20 62 65 20 61 20 63 6f |eter may| be a co|
|000022e0| 6d 62 69 6e 61 74 69 6f | 6e 20 28 75 73 69 6e 67 |mbinatio|n (using|
|000022f0| 20 74 68 65 20 43 2b 2b | 0a 6c 6f 67 69 63 61 6c | the C++|.logical|
|00002300| 20 60 6f 72 27 20 6f 70 | 65 72 61 74 6f 72 29 20 | `or' op|erator) |
|00002310| 6f 66 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |of the f|ollowing|
|00002320| 20 66 6c 61 67 73 3a 0a | 0a 5c 62 65 67 69 6e 7b | flags:.|.\begin{|
|00002330| 69 74 65 6d 69 7a 65 7d | 0a 5c 69 74 65 6d 20 77 |itemize}|.\item w|
|00002340| 78 42 4f 52 44 45 52 2c | 20 74 6f 20 67 69 76 65 |xBORDER,| to give|
|00002350| 20 74 68 65 20 63 61 6e | 76 61 73 20 61 20 74 68 | the can|vas a th|
|00002360| 69 6e 20 62 6f 72 64 65 | 72 20 28 57 69 6e 64 6f |in borde|r (Windo|
|00002370| 77 73 20 33 20 6f 6e 6c | 79 29 0a 5c 69 74 65 6d |ws 3 onl|y).\item|
|00002380| 20 77 78 52 45 54 41 49 | 4e 45 44 2c 20 74 6f 20 | wxRETAI|NED, to |
|00002390| 67 69 76 65 20 74 68 65 | 20 63 61 6e 76 61 73 20 |give the| canvas |
|000023a0| 61 20 62 61 63 6b 69 6e | 67 20 73 74 6f 72 65 2c |a backin|g store,|
|000023b0| 20 6d 61 6b 69 6e 67 20 | 72 65 70 61 69 6e 74 69 | making |repainti|
|000023c0| 6e 67 20 6d 75 63 68 20 | 66 61 73 74 65 72 20 62 |ng much |faster b|
|000023d0| 75 74 0a 61 74 20 61 20 | 6d 65 6d 6f 72 79 20 70 |ut.at a |memory p|
|000023e0| 72 65 6d 69 75 6d 20 28 | 58 56 69 65 77 20 61 6e |remium (|XView an|
|000023f0| 64 20 4d 6f 74 69 66 20 | 6f 6e 6c 79 29 0a 5c 65 |d Motif |only).\e|
|00002400| 6e 64 7b 69 74 65 6d 69 | 7a 65 7d 0a 0a 5c 6d 65 |nd{itemi|ze}..\me|
|00002410| 6d 62 65 72 73 65 63 74 | 69 6f 6e 7b 77 78 43 61 |mbersect|ion{wxCa|
|00002420| 6e 76 61 73 3a 3a 5c 64 | 65 73 74 72 75 63 74 7b |nvas::\d|estruct{|
|00002430| 77 78 43 61 6e 76 61 73 | 7d 7d 0a 0a 5c 66 75 6e |wxCanvas|}}..\fun|
|00002440| 63 7b 76 6f 69 64 7d 7b | 5c 64 65 73 74 72 75 63 |c{void}{|\destruc|
|00002450| 74 7b 77 78 43 61 6e 76 | 61 73 7d 7d 7b 5c 76 6f |t{wxCanv|as}}{\vo|
|00002460| 69 64 7d 0a 0a 44 65 73 | 74 72 75 63 74 6f 72 2e |id}..Des|tructor.|
|00002470| 0a 0a 5c 6d 65 6d 62 65 | 72 73 65 63 74 69 6f 6e |..\membe|rsection|
|00002480| 7b 77 78 43 61 6e 76 61 | 73 3a 3a 43 6c 65 61 72 |{wxCanva|s::Clear|
|00002490| 7d 0a 0a 5c 66 75 6e 63 | 7b 76 6f 69 64 7d 7b 43 |}..\func|{void}{C|
|000024a0| 6c 65 61 72 7d 7b 5c 76 | 6f 69 64 7d 0a 0a 43 6c |lear}{\v|oid}..Cl|
|000024b0| 65 61 72 73 20 74 68 65 | 20 63 61 6e 76 61 73 20 |ears the| canvas |
|000024c0| 28 66 69 6c 6c 73 20 69 | 74 20 77 69 74 68 20 74 |(fills i|t with t|
|000024d0| 68 65 20 63 75 72 72 65 | 6e 74 20 62 61 63 6b 67 |he curre|nt backg|
|000024e0| 72 6f 75 6e 64 20 62 72 | 75 73 68 29 2e 0a 0a 5c |round br|ush)...\|
|000024f0| 6d 65 6d 62 65 72 73 65 | 63 74 69 6f 6e 7b 77 78 |memberse|ction{wx|
|00002500| 43 61 6e 76 61 73 3a 3a | 44 65 73 74 72 6f 79 43 |Canvas::|DestroyC|
|00002510| 6c 69 70 70 69 6e 67 52 | 65 67 69 6f 6e 7d 0a 0a |lippingR|egion}..|
|00002520| 5c 66 75 6e 63 7b 76 6f | 69 64 7d 7b 44 65 73 74 |\func{vo|id}{Dest|
|00002530| 72 6f 79 43 6c 69 70 70 | 69 6e 67 52 65 67 69 6f |royClipp|ingRegio|
|00002540| 6e 7d 7b 5c 76 6f 69 64 | 7d 0a 0a 44 65 73 74 72 |n}{\void|}..Destr|
|00002550| 6f 79 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |oys the |current |
|00002560| 63 6c 69 70 70 69 6e 67 | 20 72 65 67 69 6f 6e 20 |clipping| region |
|00002570| 73 6f 20 74 68 61 74 20 | 6e 6f 6e 65 20 6f 66 20 |so that |none of |
|00002580| 74 68 65 20 63 61 6e 76 | 61 73 20 69 73 20 63 6c |the canv|as is cl|
|00002590| 69 70 70 65 64 2e 0a 0a | 5c 6d 65 6d 62 65 72 73 |ipped...|\members|
|000025a0| 65 63 74 69 6f 6e 7b 77 | 78 43 61 6e 76 61 73 3a |ection{w|xCanvas:|
|000025b0| 3a 44 72 61 77 45 6c 6c | 69 70 73 65 7d 0a 0a 5c |:DrawEll|ipse}..\|
|000025c0| 66 75 6e 63 7b 76 6f 69 | 64 7d 7b 44 72 61 77 45 |func{voi|d}{DrawE|
|000025d0| 6c 6c 69 70 73 65 7d 7b | 5c 70 61 72 61 6d 7b 66 |llipse}{|\param{f|
|000025e0| 6c 6f 61 74 7d 7b 20 78 | 7d 2c 20 5c 70 61 72 61 |loat}{ x|}, \para|
|000025f0| 6d 7b 66 6c 6f 61 74 7d | 7b 20 79 7d 2c 20 5c 70 |m{float}|{ y}, \p|
|00002600| 61 72 61 6d 7b 66 6c 6f | 61 74 7d 7b 20 77 69 64 |aram{flo|at}{ wid|
|00002610| 74 68 7d 2c 0a 5c 70 61 | 72 61 6d 7b 66 6c 6f 61 |th},.\pa|ram{floa|
|00002620| 74 7d 7b 20 68 65 69 67 | 68 74 7d 7d 0a 0a 44 72 |t}{ heig|ht}}..Dr|
|00002630| 61 77 73 20 61 6e 20 65 | 6c 6c 69 70 73 65 20 63 |aws an e|llipse c|
|00002640| 6f 6e 74 61 69 6e 65 64 | 20 69 6e 20 74 68 65 20 |ontained| in the |
|00002650| 72 65 63 74 61 6e 67 6c | 65 20 77 69 74 68 20 74 |rectangl|e with t|
|00002660| 68 65 20 67 69 76 65 6e | 20 74 6f 70 20 6c 65 66 |he given| top lef|
|00002670| 74 0a 63 6f 72 6e 65 72 | 2c 20 61 6e 64 20 77 69 |t.corner|, and wi|
|00002680| 74 68 20 74 68 65 20 67 | 69 76 65 6e 20 73 69 7a |th the g|iven siz|
|00002690| 65 2e 20 20 54 68 65 20 | 63 75 72 72 65 6e 74 20 |e. The |current |
|000026a0| 70 65 6e 20 69 73 20 75 | 73 65 64 20 66 6f 72 20 |pen is u|sed for |
|000026b0| 74 68 65 0a 6f 75 74 6c | 69 6e 65 20 61 6e 64 20 |the.outl|ine and |
|000026c0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 62 72 75 73 |the curr|ent brus|
|000026d0| 68 20 66 6f 72 20 66 69 | 6c 6c 69 6e 67 20 74 68 |h for fi|lling th|
|000026e0| 65 20 73 68 61 70 65 2e | 0a 0a 5c 6d 65 6d 62 65 |e shape.|..\membe|
|000026f0| 72 73 65 63 74 69 6f 6e | 7b 77 78 43 61 6e 76 61 |rsection|{wxCanva|
|00002700| 73 3a 3a 44 72 61 77 4c | 69 6e 65 7d 0a 0a 5c 66 |s::DrawL|ine}..\f|
|00002710| 75 6e 63 7b 76 6f 69 64 | 7d 7b 44 72 61 77 4c 69 |unc{void|}{DrawLi|
|00002720| 6e 65 7d 7b 5c 70 61 72 | 61 6d 7b 66 6c 6f 61 74 |ne}{\par|am{float|
|00002730| 7d 7b 20 78 31 7d 2c 20 | 5c 70 61 72 61 6d 7b 66 |}{ x1}, |\param{f|
|00002740| 6c 6f 61 74 7d 7b 20 79 | 31 7d 2c 20 5c 70 61 72 |loat}{ y|1}, \par|
|00002750| 61 6d 7b 66 6c 6f 61 74 | 7d 7b 20 78 32 7d 2c 0a |am{float|}{ x2},.|
|00002760| 5c 70 61 72 61 6d 7b 66 | 6c 6f 61 74 7d 7b 20 79 |\param{f|loat}{ y|
|00002770| 32 7d 7d 0a 0a 44 72 61 | 77 73 20 61 20 6c 69 6e |2}}..Dra|ws a lin|
|00002780| 65 20 66 72 6f 6d 20 74 | 68 65 20 66 69 72 73 74 |e from t|he first|
|00002790| 20 70 6f 69 6e 74 20 74 | 6f 20 74 68 65 20 73 65 | point t|o the se|
|000027a0| 63 6f 6e 64 2e 20 54 68 | 65 20 63 75 72 72 65 6e |cond. Th|e curren|
|000027b0| 74 20 70 65 6e 20 69 73 | 0a 75 73 65 64 20 66 6f |t pen is|.used fo|
|000027c0| 72 20 64 72 61 77 69 6e | 67 20 74 68 65 20 6c 69 |r drawin|g the li|
|000027d0| 6e 65 2e 0a 0a 5c 6d 65 | 6d 62 65 72 73 65 63 74 |ne...\me|mbersect|
|000027e0| 69 6f 6e 7b 77 78 43 61 | 6e 76 61 73 3a 3a 44 72 |ion{wxCa|nvas::Dr|
|000027f0| 61 77 4c 69 6e 65 73 7d | 0a 0a 5c 66 75 6e 63 7b |awLines}|..\func{|
|00002800| 76 6f 69 64 7d 7b 44 72 | 61 77 4c 69 6e 65 73 7d |void}{Dr|awLines}|
|00002810| 7b 5c 70 61 72 61 6d 7b | 69 6e 74 7d 7b 20 6e 7d |{\param{|int}{ n}|
|00002820| 2c 20 5c 70 61 72 61 6d | 7b 77 78 50 6f 69 6e 74 |, \param|{wxPoint|
|00002830| 7d 7b 20 70 6f 69 6e 74 | 73 5b 5d 7d 2c 20 5c 70 |}{ point|s[]}, \p|
|00002840| 61 72 61 6d 7b 66 6c 6f | 61 74 7d 7b 20 78 6f 66 |aram{flo|at}{ xof|
|00002850| 66 73 65 74 20 3d 20 30 | 7d 2c 20 5c 70 61 72 61 |fset = 0|}, \para|
|00002860| 6d 7b 66 6c 6f 61 74 7d | 7b 20 79 6f 66 66 73 65 |m{float}|{ yoffse|
|00002870| 74 20 3d 20 30 7d 7d 0a | 0a 5c 66 75 6e 63 7b 76 |t = 0}}.|.\func{v|
|00002880| 6f 69 64 7d 7b 44 72 61 | 77 4c 69 6e 65 73 7d 7b |oid}{Dra|wLines}{|
|00002890| 5c 70 61 72 61 6d 7b 77 | 78 4c 69 73 74 20 2a 7d |\param{w|xList *}|
|000028a0| 7b 70 6f 69 6e 74 73 7d | 2c 20 5c 70 61 72 61 6d |{points}|, \param|
|000028b0| 7b 66 6c 6f 61 74 7d 7b | 20 78 6f 66 66 73 65 74 |{float}{| xoffset|
|000028c0| 20 3d 20 30 7d 2c 20 5c | 70 61 72 61 6d 7b 66 6c | = 0}, \|param{fl|
|000028d0| 6f 61 74 7d 7b 20 79 6f | 66 66 73 65 74 20 3d 20 |oat}{ yo|ffset = |
|000028e0| 30 7d 7d 0a 0a 44 72 61 | 77 20 6c 69 6e 65 73 20 |0}}..Dra|w lines |
|000028f0| 75 73 69 6e 67 20 61 6e | 20 61 72 72 61 79 20 6f |using an| array o|
|00002900| 66 20 7b 5c 69 74 20 70 | 6f 69 6e 74 73 7d 20 6f |f {\it p|oints} o|
|00002910| 66 20 73 69 7a 65 20 7b | 5c 69 74 20 6e 7d 2c 20 |f size {|\it n}, |
|00002920| 6f 72 20 6c 69 73 74 20 | 6f 66 0a 70 6f 69 6e 74 |or list |of.point|
|00002930| 65 72 73 20 74 6f 20 70 | 6f 69 6e 74 73 2c 20 61 |ers to p|oints, a|
|00002940| 64 64 69 6e 67 20 74 68 | 65 20 6f 70 74 69 6f 6e |dding th|e option|
|00002950| 61 6c 20 6f 66 66 73 65 | 74 20 63 6f 6f 72 64 69 |al offse|t coordi|
|00002960| 6e 61 74 65 2e 20 54 68 | 65 20 63 75 72 72 65 6e |nate. Th|e curren|
|00002970| 74 0a 70 65 6e 20 69 73 | 20 75 73 65 64 20 66 6f |t.pen is| used fo|
|00002980| 72 20 64 72 61 77 69 6e | 67 20 74 68 65 20 6c 69 |r drawin|g the li|
|00002990| 6e 65 73 2e 20 20 54 68 | 65 20 70 72 6f 67 72 61 |nes. Th|e progra|
|000029a0| 6d 6d 65 72 20 69 73 20 | 72 65 73 70 6f 6e 73 69 |mmer is |responsi|
|000029b0| 62 6c 65 20 66 6f 72 0a | 64 65 6c 65 74 69 6e 67 |ble for.|deleting|
|000029c0| 20 74 68 65 20 6c 69 73 | 74 20 6f 66 20 70 6f 69 | the lis|t of poi|
|000029d0| 6e 74 73 2e 0a 0a 5c 6d | 65 6d 62 65 72 73 65 63 |nts...\m|embersec|
|000029e0| 74 69 6f 6e 7b 77 78 43 | 61 6e 76 61 73 3a 3a 44 |tion{wxC|anvas::D|
|000029f0| 72 61 77 50 6f 6c 79 67 | 6f 6e 7d 0a 0a 5c 66 75 |rawPolyg|on}..\fu|
|00002a00| 6e 63 7b 76 6f 69 64 7d | 7b 44 72 61 77 50 6f 6c |nc{void}|{DrawPol|
|00002a10| 79 67 6f 6e 7d 7b 5c 70 | 61 72 61 6d 7b 69 6e 74 |ygon}{\p|aram{int|
|00002a20| 7d 7b 20 6e 7d 2c 20 5c | 70 61 72 61 6d 7b 77 78 |}{ n}, \|param{wx|
|00002a30| 50 6f 69 6e 74 7d 7b 20 | 70 6f 69 6e 74 73 5b 5d |Point}{ |points[]|
|00002a40| 7d 2c 20 5c 70 61 72 61 | 6d 7b 66 6c 6f 61 74 7d |}, \para|m{float}|
|00002a50| 7b 20 78 6f 66 66 73 65 | 74 20 3d 20 30 7d 2c 20 |{ xoffse|t = 0}, |
|00002a60| 5c 70 61 72 61 6d 7b 66 | 6c 6f 61 74 7d 7b 20 79 |\param{f|loat}{ y|
|00002a70| 6f 66 66 73 65 74 20 3d | 20 30 7d 7d 0a 0a 5c 66 |offset =| 0}}..\f|
|00002a80| 75 6e 63 7b 76 6f 69 64 | 7d 7b 44 72 61 77 50 6f |unc{void|}{DrawPo|
|00002a90| 6c 79 67 6f 6e 7d 7b 5c | 70 61 72 61 6d 7b 77 78 |lygon}{\|param{wx|
|00002aa0| 4c 69 73 74 20 2a 7d 7b | 70 6f 69 6e 74 73 7d 2c |List *}{|points},|
|00002ab0| 20 5c 70 61 72 61 6d 7b | 66 6c 6f 61 74 7d 7b 20 | \param{|float}{ |
|00002ac0| 78 6f 66 66 73 65 74 20 | 3d 20 30 7d 2c 0a 5c 70 |xoffset |= 0},.\p|
|00002ad0| 61 72 61 6d 7b 66 6c 6f | 61 74 7d 7b 20 79 6f 66 |aram{flo|at}{ yof|
|00002ae0| 66 73 65 74 20 3d 20 30 | 7d 7d 0a 0a 44 72 61 77 |fset = 0|}}..Draw|
|00002af0| 20 61 20 66 69 6c 6c 65 | 64 20 70 6f 6c 79 67 6f | a fille|d polygo|
|00002b00| 6e 20 75 73 69 6e 67 20 | 61 6e 20 61 72 72 61 79 |n using |an array|
|00002b10| 20 6f 66 20 7b 5c 69 74 | 20 70 6f 69 6e 74 73 7d | of {\it| points}|
|00002b20| 20 6f 66 20 73 69 7a 65 | 20 7b 5c 69 74 20 6e 7d | of size| {\it n}|
|00002b30| 2c 0a 6f 72 20 6c 69 73 | 74 20 6f 66 20 70 6f 69 |,.or lis|t of poi|
|00002b40| 6e 74 65 72 73 20 74 6f | 20 70 6f 69 6e 74 73 2c |nters to| points,|
|00002b50| 20 61 64 64 69 6e 67 20 | 74 68 65 20 6f 70 74 69 | adding |the opti|
|00002b60| 6f 6e 61 6c 20 6f 66 66 | 73 65 74 20 63 6f 6f 72 |onal off|set coor|
|00002b70| 64 69 6e 61 74 65 2e 0a | 54 68 65 20 63 75 72 72 |dinate..|The curr|
|00002b80| 65 6e 74 20 70 65 6e 20 | 69 73 20 75 73 65 64 20 |ent pen |is used |
|00002b90| 66 6f 72 20 64 72 61 77 | 69 6e 67 20 74 68 65 20 |for draw|ing the |
|00002ba0| 6f 75 74 6c 69 6e 65 2c | 20 61 6e 64 20 74 68 65 |outline,| and the|
|00002bb0| 20 63 75 72 72 65 6e 74 | 20 62 72 75 73 68 0a 66 | current| brush.f|
|00002bc0| 6f 72 20 66 69 6c 6c 69 | 6e 67 20 74 68 65 20 73 |or filli|ng the s|
|00002bd0| 68 61 70 65 2e 20 20 55 | 73 69 6e 67 20 61 20 74 |hape. U|sing a t|
|00002be0| 72 61 6e 73 70 61 72 65 | 6e 74 20 62 72 75 73 68 |ranspare|nt brush|
|00002bf0| 20 73 75 70 70 72 65 73 | 73 65 73 20 66 69 6c 6c | suppres|ses fill|
|00002c00| 69 6e 67 2e 0a 54 68 65 | 20 70 72 6f 67 72 61 6d |ing..The| program|
|00002c10| 6d 65 72 20 69 73 20 72 | 65 73 70 6f 6e 73 69 62 |mer is r|esponsib|
|00002c20| 6c 65 20 66 6f 72 20 64 | 65 6c 65 74 69 6e 67 20 |le for d|eleting |
|00002c30| 74 68 65 20 6c 69 73 74 | 20 6f 66 20 70 6f 69 6e |the list| of poin|
|00002c40| 74 73 2e 0a 0a 4e 6f 74 | 65 20 74 68 61 74 20 77 |ts...Not|e that w|
|00002c50| 78 57 69 6e 64 6f 77 73 | 20 64 6f 65 73 20 6e 6f |xWindows| does no|
|00002c60| 74 20 63 6c 6f 73 65 20 | 74 68 65 20 66 69 72 73 |t close |the firs|
|00002c70| 74 20 61 6e 64 20 6c 61 | 73 74 20 70 6f 69 6e 74 |t and la|st point|
|00002c80| 73 0a 61 75 74 6f 6d 61 | 74 69 63 61 6c 6c 79 2e |s.automa|tically.|
|00002c90| 0a 0a 5c 6d 65 6d 62 65 | 72 73 65 63 74 69 6f 6e |..\membe|rsection|
|00002ca0| 7b 77 78 43 61 6e 76 61 | 73 3a 3a 44 72 61 77 50 |{wxCanva|s::DrawP|
|00002cb0| 6f 69 6e 74 7d 0a 0a 5c | 66 75 6e 63 7b 76 6f 69 |oint}..\|func{voi|
|00002cc0| 64 7d 7b 44 72 61 77 50 | 6f 69 6e 74 7d 7b 5c 70 |d}{DrawP|oint}{\p|
|00002cd0| 61 72 61 6d 7b 66 6c 6f | 61 74 7d 7b 20 78 7d 2c |aram{flo|at}{ x},|
|00002ce0| 20 5c 70 61 72 61 6d 7b | 66 6c 6f 61 74 7d 7b 20 | \param{|float}{ |
|00002cf0| 79 7d 7d 0a 0a 44 72 61 | 77 73 20 61 20 70 6f 69 |y}}..Dra|ws a poi|
|00002d00| 6e 74 20 75 73 69 6e 67 | 20 74 68 65 20 63 75 72 |nt using| the cur|
|00002d10| 72 65 6e 74 20 70 65 6e | 2e 0a 0a 5c 6d 65 6d 62 |rent pen|...\memb|
|00002d20| 65 72 73 65 63 74 69 6f | 6e 7b 77 78 43 61 6e 76 |ersectio|n{wxCanv|
|00002d30| 61 73 3a 3a 44 72 61 77 | 52 65 63 74 61 6e 67 6c |as::Draw|Rectangl|
|00002d40| 65 7d 0a 0a 5c 66 75 6e | 63 7b 76 6f 69 64 7d 7b |e}..\fun|c{void}{|
|00002d50| 44 72 61 77 52 65 63 74 | 61 6e 67 6c 65 7d 7b 5c |DrawRect|angle}{\|
|00002d60| 70 61 72 61 6d 7b 66 6c | 6f 61 74 7d 7b 20 78 7d |param{fl|oat}{ x}|
|00002d70| 2c 20 5c 70 61 72 61 6d | 7b 66 6c 6f 61 74 7d 7b |, \param|{float}{|
|00002d80| 20 79 7d 2c 20 5c 70 61 | 72 61 6d 7b 66 6c 6f 61 | y}, \pa|ram{floa|
|00002d90| 74 7d 7b 20 77 69 64 74 | 68 7d 2c 20 5c 70 61 72 |t}{ widt|h}, \par|
|00002da0| 61 6d 7b 66 6c 6f 61 74 | 7d 7b 20 68 65 69 67 68 |am{float|}{ heigh|
|00002db0| 74 7d 7d 0a 0a 44 72 61 | 77 73 20 61 20 72 65 63 |t}}..Dra|ws a rec|
|00002dc0| 74 61 6e 67 6c 65 20 77 | 69 74 68 20 74 68 65 20 |tangle w|ith the |
|00002dd0| 67 69 76 65 6e 20 74 6f | 70 20 6c 65 66 74 20 63 |given to|p left c|
|00002de0| 6f 72 6e 65 72 2c 20 61 | 6e 64 20 77 69 74 68 20 |orner, a|nd with |
|00002df0| 74 68 65 20 67 69 76 65 | 6e 0a 73 69 7a 65 2e 20 |the give|n.size. |
|00002e00| 20 54 68 65 20 63 75 72 | 72 65 6e 74 20 70 65 6e | The cur|rent pen|
|00002e10| 20 69 73 20 75 73 65 64 | 20 66 6f 72 20 74 68 65 | is used| for the|
|00002e20| 20 6f 75 74 6c 69 6e 65 | 20 61 6e 64 20 74 68 65 | outline| and the|
|00002e30| 20 63 75 72 72 65 6e 74 | 20 62 72 75 73 68 20 66 | current| brush f|
|00002e40| 6f 72 0a 66 69 6c 6c 69 | 6e 67 20 74 68 65 20 73 |or.filli|ng the s|
|00002e50| 68 61 70 65 2e 0a 0a 5c | 6d 65 6d 62 65 72 73 65 |hape...\|memberse|
|00002e60| 63 74 69 6f 6e 7b 77 78 | 43 61 6e 76 61 73 3a 3a |ction{wx|Canvas::|
|00002e70| 44 72 61 77 52 6f 75 6e | 64 65 64 52 65 63 74 61 |DrawRoun|dedRecta|
|00002e80| 6e 67 6c 65 7d 0a 0a 5c | 66 75 6e 63 7b 76 6f 69 |ngle}..\|func{voi|
|00002e90| 64 7d 7b 44 72 61 77 52 | 6f 75 6e 64 65 64 52 65 |d}{DrawR|oundedRe|
|00002ea0| 63 74 61 6e 67 6c 65 7d | 7b 5c 70 61 72 61 6d 7b |ctangle}|{\param{|
|00002eb0| 66 6c 6f 61 74 7d 7b 20 | 78 7d 2c 20 5c 70 61 72 |float}{ |x}, \par|
|00002ec0| 61 6d 7b 66 6c 6f 61 74 | 7d 7b 20 79 7d 2c 20 5c |am{float|}{ y}, \|
|00002ed0| 70 61 72 61 6d 7b 66 6c | 6f 61 74 7d 7b 20 77 69 |param{fl|oat}{ wi|
|00002ee0| 64 74 68 7d 2c 0a 20 20 | 5c 70 61 72 61 6d 7b 66 |dth},. |\param{f|
|00002ef0| 6c 6f 61 74 7d 7b 20 68 | 65 69 67 68 74 7d 2c 20 |loat}{ h|eight}, |
|00002f00| 5c 70 61 72 61 6d 7b 66 | 6c 6f 61 74 7d 7b 20 72 |\param{f|loat}{ r|
|00002f10| 61 64 69 75 73 20 3d 20 | 32 30 7d 7d 0a 0a 44 72 |adius = |20}}..Dr|
|00002f20| 61 77 73 20 61 20 72 65 | 63 74 61 6e 67 6c 65 20 |aws a re|ctangle |
|00002f30| 77 69 74 68 20 74 68 65 | 20 67 69 76 65 6e 20 74 |with the| given t|
|00002f40| 6f 70 20 6c 65 66 74 20 | 63 6f 72 6e 65 72 2c 20 |op left |corner, |
|00002f50| 61 6e 64 20 77 69 74 68 | 20 74 68 65 20 67 69 76 |and with| the giv|
|00002f60| 65 6e 0a 73 69 7a 65 2e | 20 20 54 68 65 20 63 6f |en.size.| The co|
|00002f70| 72 6e 65 72 73 20 61 72 | 65 20 71 75 61 72 74 65 |rners ar|e quarte|
|00002f80| 72 2d 63 69 72 63 6c 65 | 73 20 75 73 69 6e 67 20 |r-circle|s using |
|00002f90| 74 68 65 20 67 69 76 65 | 6e 20 72 61 64 69 75 73 |the give|n radius|
|00002fa0| 2e 20 54 68 65 0a 63 75 | 72 72 65 6e 74 20 70 65 |. The.cu|rrent pe|
|00002fb0| 6e 20 69 73 20 75 73 65 | 64 20 66 6f 72 20 74 68 |n is use|d for th|
|00002fc0| 65 20 6f 75 74 6c 69 6e | 65 20 61 6e 64 20 74 68 |e outlin|e and th|
|00002fd0| 65 20 63 75 72 72 65 6e | 74 20 62 72 75 73 68 20 |e curren|t brush |
|00002fe0| 66 6f 72 20 66 69 6c 6c | 69 6e 67 0a 74 68 65 20 |for fill|ing.the |
|00002ff0| 73 68 61 70 65 2e 0a 0a | 5c 6d 65 6d 62 65 72 73 |shape...|\members|
|00003000| 65 63 74 69 6f 6e 7b 77 | 78 43 61 6e 76 61 73 3a |ection{w|xCanvas:|
|00003010| 3a 44 72 61 77 53 70 6c | 69 6e 65 7d 0a 0a 5c 66 |:DrawSpl|ine}..\f|
|00003020| 75 6e 63 7b 76 6f 69 64 | 7d 7b 44 72 61 77 53 70 |unc{void|}{DrawSp|
|00003030| 6c 69 6e 65 7d 7b 5c 70 | 61 72 61 6d 7b 77 78 4c |line}{\p|aram{wxL|
|00003040| 69 73 74 20 2a 7d 7b 70 | 6f 69 6e 74 73 7d 7d 0a |ist *}{p|oints}}.|
|00003050| 0a 44 72 61 77 73 20 61 | 20 73 70 6c 69 6e 65 20 |.Draws a| spline |
|00003060| 62 65 74 77 65 65 6e 20 | 61 6c 6c 20 67 69 76 65 |between |all give|
|00003070| 6e 20 63 6f 6e 74 72 6f | 6c 20 70 6f 69 6e 74 73 |n contro|l points|
|00003080| 2c 20 75 73 69 6e 67 20 | 74 68 65 20 63 75 72 72 |, using |the curr|
|00003090| 65 6e 74 0a 70 65 6e 2e | 20 20 44 6f 65 73 6e 27 |ent.pen.| Doesn'|
|000030a0| 74 20 64 65 6c 65 74 65 | 20 74 68 65 20 77 78 4c |t delete| the wxL|
|000030b0| 69 73 74 20 61 6e 64 20 | 63 6f 6e 74 65 6e 74 73 |ist and |contents|
|000030c0| 2e 20 54 68 65 20 73 70 | 6c 69 6e 65 20 69 73 20 |. The sp|line is |
|000030d0| 64 72 61 77 6e 0a 75 73 | 69 6e 67 20 61 20 73 65 |drawn.us|ing a se|
|000030e0| 72 69 65 73 20 6f 66 20 | 6c 69 6e 65 73 2c 20 75 |ries of |lines, u|
|000030f0| 73 69 6e 67 20 61 6e 20 | 61 6c 67 6f 72 69 74 68 |sing an |algorith|
|00003100| 6d 20 74 61 6b 65 6e 20 | 66 72 6f 6d 20 74 68 65 |m taken |from the|
|00003110| 20 58 20 64 72 61 77 69 | 6e 67 0a 70 72 6f 67 72 | X drawi|ng.progr|
|00003120| 61 6d 20 60 58 46 49 47 | 27 2e 0a 0a 5c 66 75 6e |am `XFIG|'...\fun|
|00003130| 63 7b 76 6f 69 64 7d 7b | 44 72 61 77 53 70 6c 69 |c{void}{|DrawSpli|
|00003140| 6e 65 7d 7b 5c 70 61 72 | 61 6d 7b 66 6c 6f 61 74 |ne}{\par|am{float|
|00003150| 7d 7b 20 78 31 7d 2c 20 | 5c 70 61 72 61 6d 7b 66 |}{ x1}, |\param{f|
|00003160| 6c 6f 61 74 7d 7b 20 79 | 31 7d 2c 20 5c 70 61 72 |loat}{ y|1}, \par|
|00003170| 61 6d 7b 66 6c 6f 61 74 | 7d 7b 20 78 32 7d 2c 20 |am{float|}{ x2}, |
|00003180| 5c 70 61 72 61 6d 7b 66 | 6c 6f 61 74 7d 7b 20 79 |\param{f|loat}{ y|
|00003190| 32 7d 2c 0a 20 20 5c 70 | 61 72 61 6d 7b 66 6c 6f |2},. \p|aram{flo|
|000031a0| 61 74 7d 7b 20 78 33 7d | 2c 20 5c 70 61 72 61 6d |at}{ x3}|, \param|
|000031b0| 7b 66 6c 6f 61 74 7d 7b | 20 79 33 7d 7d 0a 0a 44 |{float}{| y3}}..D|
|000031c0| 72 61 77 73 20 61 20 74 | 68 72 65 65 2d 70 6f 69 |raws a t|hree-poi|
|000031d0| 6e 74 20 73 70 6c 69 6e | 65 20 75 73 69 6e 67 20 |nt splin|e using |
|000031e0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 70 65 6e 2e |the curr|ent pen.|
|000031f0| 0a 0a 5c 6d 65 6d 62 65 | 72 73 65 63 74 69 6f 6e |..\membe|rsection|
|00003200| 7b 77 78 43 61 6e 76 61 | 73 3a 3a 44 72 61 77 54 |{wxCanva|s::DrawT|
|00003210| 65 78 74 7d 0a 0a 5c 66 | 75 6e 63 7b 76 6f 69 64 |ext}..\f|unc{void|
|00003220| 7d 7b 44 72 61 77 54 65 | 78 74 7d 7b 5c 70 61 72 |}{DrawTe|xt}{\par|
|00003230| 61 6d 7b 63 68 61 72 20 | 2a 7d 7b 74 65 78 74 7d |am{char |*}{text}|
|00003240| 2c 20 5c 70 61 72 61 6d | 7b 66 6c 6f 61 74 7d 7b |, \param|{float}{|
|00003250| 20 78 7d 2c 20 5c 70 61 | 72 61 6d 7b 66 6c 6f 61 | x}, \pa|ram{floa|
|00003260| 74 7d 7b 20 79 7d 7d 0a | 0a 44 72 61 77 73 20 61 |t}{ y}}.|.Draws a|
|00003270| 20 74 65 78 74 20 73 74 | 72 69 6e 67 20 61 74 20 | text st|ring at |
|00003280| 74 68 65 20 73 70 65 63 | 69 66 69 65 64 20 70 6f |the spec|ified po|
|00003290| 69 6e 74 2c 20 75 73 69 | 6e 67 20 74 68 65 20 63 |int, usi|ng the c|
|000032a0| 75 72 72 65 6e 74 20 74 | 65 78 74 20 66 6f 6e 74 |urrent t|ext font|
|000032b0| 2c 0a 61 6e 64 20 74 68 | 65 20 63 75 72 72 65 6e |,.and th|e curren|
|000032c0| 74 20 74 65 78 74 20 66 | 6f 72 65 67 72 6f 75 6e |t text f|oregroun|
|000032d0| 64 20 61 6e 64 20 62 61 | 63 6b 67 72 6f 75 6e 64 |d and ba|ckground|
|000032e0| 20 63 6f 6c 6f 75 72 73 | 2e 0a 0a 5c 6d 65 6d 62 | colours|...\memb|
|000032f0| 65 72 73 65 63 74 69 6f | 6e 7b 77 78 43 61 6e 76 |ersectio|n{wxCanv|
|00003300| 61 73 3a 3a 47 65 74 44 | 43 7d 0a 0a 5c 66 75 6e |as::GetD|C}..\fun|
|00003310| 63 7b 77 78 44 43 20 2a | 7d 7b 47 65 74 44 43 7d |c{wxDC *|}{GetDC}|
|00003320| 7b 5c 76 6f 69 64 7d 0a | 0a 47 65 74 20 61 20 70 |{\void}.|.Get a p|
|00003330| 6f 69 6e 74 65 72 20 74 | 6f 20 74 68 65 20 63 61 |ointer t|o the ca|
|00003340| 6e 76 61 73 27 73 20 64 | 65 76 69 63 65 20 63 6f |nvas's d|evice co|
|00003350| 6e 74 65 78 74 2e 20 4e | 6f 74 65 20 74 68 61 74 |ntext. N|ote that|
|00003360| 20 74 68 65 20 63 61 6e | 76 61 73 27 73 0a 61 70 | the can|vas's.ap|
|00003370| 70 61 72 65 6e 74 20 64 | 65 76 69 63 65 20 63 6f |parent d|evice co|
|00003380| 6e 74 65 78 74 20 6d 61 | 79 20 62 65 20 74 65 6d |ntext ma|y be tem|
|00003390| 70 6f 72 61 72 69 6c 79 | 20 72 65 70 6c 61 63 65 |porarily| replace|
|000033a0| 64 20 62 79 20 74 68 65 | 20 61 70 70 6c 69 63 61 |d by the| applica|
|000033b0| 74 69 6f 6e 0a 75 73 69 | 6e 67 20 7b 5c 69 74 20 |tion.usi|ng {\it |
|000033c0| 53 65 74 43 6f 6e 74 65 | 78 74 7d 2c 20 73 6f 20 |SetConte|xt}, so |
|000033d0| 66 6f 72 20 65 78 61 6d | 70 6c 65 20 61 20 70 72 |for exam|ple a pr|
|000033e0| 69 6e 74 65 72 20 63 6f | 6e 74 65 78 74 20 63 61 |inter co|ntext ca|
|000033f0| 6e 20 62 65 0a 73 75 62 | 73 74 69 74 75 74 65 64 |n be.sub|stituted|
|00003400| 20 61 6e 64 20 70 72 6f | 67 72 61 6d 73 20 75 73 | and pro|grams us|
|00003410| 69 6e 67 20 74 68 65 20 | 63 61 6e 76 61 73 27 73 |ing the |canvas's|
|00003420| 20 64 65 76 69 63 65 20 | 63 6f 6e 74 65 78 74 20 | device |context |
|00003430| 77 69 6c 6c 20 72 65 61 | 6c 6c 79 0a 77 72 69 74 |will rea|lly.writ|
|00003440| 65 20 74 6f 20 74 68 65 | 20 70 72 69 6e 74 65 72 |e to the| printer|
|00003450| 2e 20 54 68 65 20 63 61 | 6e 76 61 73 27 73 20 7b |. The ca|nvas's {|
|00003460| 5c 69 74 20 72 65 61 6c | 7d 20 64 65 76 69 63 65 |\it real|} device|
|00003470| 20 63 6f 6e 74 65 78 74 | 20 69 73 0a 75 6e 61 66 | context| is.unaf|
|00003480| 66 65 63 74 65 64 20 62 | 79 20 7b 5c 69 74 20 53 |fected b|y {\it S|
|00003490| 65 74 43 6f 6e 74 65 78 | 74 7d 2e 0a 0a 5c 6d 65 |etContex|t}...\me|
|000034a0| 6d 62 65 72 73 65 63 74 | 69 6f 6e 7b 77 78 43 61 |mbersect|ion{wxCa|
|000034b0| 6e 76 61 73 3a 3a 52 65 | 73 65 74 43 6f 6e 74 65 |nvas::Re|setConte|
|000034c0| 78 74 7d 0a 0a 5c 66 75 | 6e 63 7b 76 6f 69 64 7d |xt}..\fu|nc{void}|
|000034d0| 7b 52 65 73 65 74 43 6f | 6e 74 65 78 74 7d 7b 5c |{ResetCo|ntext}{\|
|000034e0| 76 6f 69 64 7d 0a 0a 52 | 65 73 65 74 20 61 20 63 |void}..R|eset a c|
|000034f0| 61 6e 76 61 73 27 73 20 | 63 6f 6e 74 65 78 74 20 |anvas's |context |
|00003500| 73 65 74 20 62 79 20 7b | 5c 69 74 20 53 65 74 43 |set by {|\it SetC|
|00003510| 6f 6e 74 65 78 74 7d 2e | 0a 0a 5c 6d 65 6d 62 65 |ontext}.|..\membe|
|00003520| 72 73 65 63 74 69 6f 6e | 7b 77 78 43 61 6e 76 61 |rsection|{wxCanva|
|00003530| 73 3a 3a 53 63 72 6f 6c | 6c 7d 0a 0a 5c 66 75 6e |s::Scrol|l}..\fun|
|00003540| 63 7b 76 6f 69 64 7d 7b | 53 63 72 6f 6c 6c 7d 7b |c{void}{|Scroll}{|
|00003550| 5c 70 61 72 61 6d 7b 69 | 6e 74 7d 7b 20 78 5c 5f |\param{i|nt}{ x\_|
|00003560| 70 6f 73 7d 2c 20 5c 70 | 61 72 61 6d 7b 69 6e 74 |pos}, \p|aram{int|
|00003570| 7d 7b 20 79 5c 5f 70 6f | 73 7d 7d 0a 0a 53 63 72 |}{ y\_po|s}}..Scr|
|00003580| 6f 6c 6c 73 20 61 20 63 | 61 6e 76 61 73 20 73 6f |olls a c|anvas so|
|00003590| 20 74 68 65 20 76 69 65 | 77 20 73 74 61 72 74 20 | the vie|w start |
|000035a0| 69 73 20 61 74 20 74 68 | 65 20 67 69 76 65 6e 20 |is at th|e given |
|000035b0| 70 6f 69 6e 74 2e 20 54 | 68 65 0a 70 6f 73 69 74 |point. T|he.posit|
|000035c0| 69 6f 6e 73 20 61 72 65 | 20 69 6e 20 73 63 72 6f |ions are| in scro|
|000035d0| 6c 6c 20 75 6e 69 74 73 | 2c 20 6e 6f 74 20 70 69 |ll units|, not pi|
|000035e0| 78 65 6c 73 2c 20 73 6f | 20 74 6f 20 63 6f 6e 76 |xels, so| to conv|
|000035f0| 65 72 74 20 74 6f 20 70 | 69 78 65 6c 73 20 79 6f |ert to p|ixels yo|
|00003600| 75 0a 77 69 6c 6c 20 68 | 61 76 65 20 74 6f 20 6d |u.will h|ave to m|
|00003610| 75 6c 74 69 70 6c 79 20 | 62 79 20 74 68 65 20 6e |ultiply |by the n|
|00003620| 75 6d 62 65 72 20 6f 66 | 20 70 69 78 65 6c 73 20 |umber of| pixels |
|00003630| 70 65 72 20 73 63 72 6f | 6c 6c 20 69 6e 63 72 65 |per scro|ll incre|
|00003640| 6d 65 6e 74 2e 0a 49 66 | 20 65 69 74 68 65 72 20 |ment..If| either |
|00003650| 70 61 72 61 6d 65 74 65 | 72 20 69 73 20 2d 31 2c |paramete|r is -1,|
|00003660| 20 74 68 61 74 20 70 6f | 73 69 74 69 6f 6e 20 77 | that po|sition w|
|00003670| 69 6c 6c 20 62 65 20 69 | 67 6e 6f 72 65 64 20 28 |ill be i|gnored (|
|00003680| 6e 6f 20 63 68 61 6e 67 | 65 20 69 6e 0a 74 68 61 |no chang|e in.tha|
|00003690| 74 20 64 69 72 65 63 74 | 69 6f 6e 29 2e 0a 0a 5c |t direct|ion)...\|
|000036a0| 6d 65 6d 62 65 72 73 65 | 63 74 69 6f 6e 7b 77 78 |memberse|ction{wx|
|000036b0| 43 61 6e 76 61 73 3a 3a | 53 65 74 42 61 63 6b 67 |Canvas::|SetBackg|
|000036c0| 72 6f 75 6e 64 7d 0a 0a | 5c 66 75 6e 63 7b 76 6f |round}..|\func{vo|
|000036d0| 69 64 7d 7b 53 65 74 42 | 61 63 6b 67 72 6f 75 6e |id}{SetB|ackgroun|
|000036e0| 64 7d 7b 5c 70 61 72 61 | 6d 7b 77 78 42 72 75 73 |d}{\para|m{wxBrus|
|000036f0| 68 20 2a 7d 7b 62 72 75 | 73 68 7d 7d 0a 0a 53 65 |h *}{bru|sh}}..Se|
|00003700| 74 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 62 |ts the c|urrent b|
|00003710| 61 63 6b 67 72 6f 75 6e | 64 20 62 72 75 73 68 20 |ackgroun|d brush |
|00003720| 66 6f 72 20 74 68 65 20 | 63 61 6e 76 61 73 2e 20 |for the |canvas. |
|00003730| 20 54 68 65 20 62 72 75 | 73 68 20 73 68 6f 75 6c | The bru|sh shoul|
|00003740| 64 0a 6e 6f 74 20 62 65 | 20 64 65 6c 65 74 65 64 |d.not be| deleted|
|00003750| 20 77 68 69 6c 65 20 62 | 65 69 6e 67 20 75 73 65 | while b|eing use|
|00003760| 64 20 62 79 20 61 20 63 | 61 6e 76 61 73 2e 20 41 |d by a c|anvas. A|
|00003770| 6c 6c 20 62 72 75 73 68 | 65 73 20 61 72 65 20 64 |ll brush|es are d|
|00003780| 65 6c 65 74 65 64 0a 61 | 75 74 6f 6d 61 74 69 63 |eleted.a|utomatic|
|00003790| 61 6c 6c 79 20 77 68 65 | 6e 20 74 68 65 20 61 70 |ally whe|n the ap|
|000037a0| 70 6c 69 63 61 74 69 6f | 6e 20 74 65 72 6d 69 6e |plicatio|n termin|
|000037b0| 61 74 65 73 2e 0a 0a 5c | 6d 65 6d 62 65 72 73 65 |ates...\|memberse|
|000037c0| 63 74 69 6f 6e 7b 77 78 | 43 61 6e 76 61 73 3a 3a |ction{wx|Canvas::|
|000037d0| 53 65 74 43 6c 69 70 70 | 69 6e 67 52 65 67 69 6f |SetClipp|ingRegio|
|000037e0| 6e 7d 0a 0a 5c 66 75 6e | 63 7b 76 6f 69 64 7d 7b |n}..\fun|c{void}{|
|000037f0| 53 65 74 43 6c 69 70 70 | 69 6e 67 52 65 67 69 6f |SetClipp|ingRegio|
|00003800| 6e 7d 7b 5c 70 61 72 61 | 6d 7b 66 6c 6f 61 74 7d |n}{\para|m{float}|
|00003810| 7b 20 78 7d 2c 20 5c 70 | 61 72 61 6d 7b 66 6c 6f |{ x}, \p|aram{flo|
|00003820| 61 74 7d 7b 20 79 7d 2c | 20 5c 70 61 72 61 6d 7b |at}{ y},| \param{|
|00003830| 66 6c 6f 61 74 7d 7b 20 | 77 69 64 74 68 7d 2c 20 |float}{ |width}, |
|00003840| 5c 70 61 72 61 6d 7b 66 | 6c 6f 61 74 7d 7b 20 68 |\param{f|loat}{ h|
|00003850| 65 69 67 68 74 7d 7d 0a | 0a 53 65 74 73 20 74 68 |eight}}.|.Sets th|
|00003860| 65 20 63 6c 69 70 70 69 | 6e 67 20 72 65 67 69 6f |e clippi|ng regio|
|00003870| 6e 20 66 6f 72 20 74 68 | 65 20 63 61 6e 76 61 73 |n for th|e canvas|
|00003880| 2e 20 54 68 65 20 63 6c | 69 70 70 69 6e 67 20 72 |. The cl|ipping r|
|00003890| 65 67 69 6f 6e 20 69 73 | 20 61 0a 72 65 63 74 61 |egion is| a.recta|
|000038a0| 6e 67 75 6c 61 72 20 61 | 72 65 61 20 74 6f 20 77 |ngular a|rea to w|
|000038b0| 68 69 63 68 20 64 72 61 | 77 69 6e 67 20 69 73 20 |hich dra|wing is |
|000038c0| 72 65 73 74 72 69 63 74 | 65 64 2e 20 20 50 6f 73 |restrict|ed. Pos|
|000038d0| 73 69 62 6c 65 20 75 73 | 65 73 20 66 6f 72 0a 74 |sible us|es for.t|
|000038e0| 68 65 20 63 6c 69 70 70 | 69 6e 67 20 72 65 67 69 |he clipp|ing regi|
|000038f0| 6f 6e 20 61 72 65 20 66 | 6f 72 20 63 6c 69 70 70 |on are f|or clipp|
|00003900| 69 6e 67 20 74 65 78 74 | 20 6f 72 20 66 6f 72 20 |ing text| or for |
|00003910| 73 70 65 65 64 69 6e 67 | 20 75 70 20 63 61 6e 76 |speeding| up canv|
|00003920| 61 73 0a 72 65 64 72 61 | 77 73 20 77 68 65 6e 20 |as.redra|ws when |
|00003930| 6f 6e 6c 79 20 61 20 6b | 6e 6f 77 6e 20 61 72 65 |only a k|nown are|
|00003940| 61 20 6f 66 20 74 68 65 | 20 73 63 72 65 65 6e 20 |a of the| screen |
|00003950| 69 73 20 64 61 6d 61 67 | 65 64 2e 0a 0a 5c 6d 65 |is damag|ed...\me|
|00003960| 6d 62 65 72 73 65 63 74 | 69 6f 6e 7b 77 78 43 61 |mbersect|ion{wxCa|
|00003970| 6e 76 61 73 3a 3a 53 65 | 74 43 6f 6e 74 65 78 74 |nvas::Se|tContext|
|00003980| 7d 0a 0a 5c 66 75 6e 63 | 7b 76 6f 69 64 7d 7b 53 |}..\func|{void}{S|
|00003990| 65 74 43 6f 6e 74 65 78 | 74 7d 7b 5c 70 61 72 61 |etContex|t}{\para|
|000039a0| 6d 7b 77 78 44 43 20 2a | 7d 7b 64 63 7d 7d 0a 0a |m{wxDC *|}{dc}}..|
|000039b0| 53 65 74 20 61 20 73 75 | 62 73 74 69 74 75 74 65 |Set a su|bstitute|
|000039c0| 20 63 6f 6e 74 65 78 74 | 20 66 6f 72 20 74 68 65 | context| for the|
|000039d0| 20 63 61 6e 76 61 73 2c | 20 73 6f 20 61 70 70 6c | canvas,| so appl|
|000039e0| 69 63 61 74 69 6f 6e 73 | 20 77 68 69 63 68 20 74 |ications| which t|
|000039f0| 68 69 6e 6b 0a 74 68 65 | 79 27 72 65 20 64 72 61 |hink.the|y're dra|
|00003a00| 77 69 6e 67 20 74 6f 20 | 63 61 6e 76 61 73 65 73 |wing to |canvases|
|00003a10| 20 63 61 6e 20 62 65 20 | 66 6f 6f 6c 65 64 20 69 | can be |fooled i|
|00003a20| 6e 74 6f 20 64 72 61 77 | 69 6e 67 20 74 6f 20 74 |nto draw|ing to t|
|00003a30| 68 65 20 70 72 69 6e 74 | 65 72 2e 0a 52 65 73 65 |he print|er..Rese|
|00003a40| 74 20 77 69 74 68 20 7b | 5c 69 74 20 52 65 73 65 |t with {|\it Rese|
|00003a50| 74 43 6f 6e 74 65 78 74 | 7d 2e 0a 0a 5c 6d 65 6d |tContext|}...\mem|
|00003a60| 62 65 72 73 65 63 74 69 | 6f 6e 7b 77 78 43 61 6e |bersecti|on{wxCan|
|00003a70| 76 61 73 3a 3a 53 65 74 | 42 72 75 73 68 7d 0a 0a |vas::Set|Brush}..|
|00003a80| 5c 66 75 6e 63 7b 76 6f | 69 64 7d 7b 53 65 74 42 |\func{vo|id}{SetB|
|00003a90| 72 75 73 68 7d 7b 5c 70 | 61 72 61 6d 7b 77 78 42 |rush}{\p|aram{wxB|
|00003aa0| 72 75 73 68 20 2a 7d 7b | 62 72 75 73 68 7d 7d 0a |rush *}{|brush}}.|
|00003ab0| 0a 53 65 74 73 20 74 68 | 65 20 63 75 72 72 65 6e |.Sets th|e curren|
|00003ac0| 74 20 62 72 75 73 68 20 | 66 6f 72 20 74 68 65 20 |t brush |for the |
|00003ad0| 63 61 6e 76 61 73 2e 20 | 20 54 68 65 20 62 72 75 |canvas. | The bru|
|00003ae0| 73 68 20 69 73 20 6e 6f | 74 20 63 6f 70 69 65 64 |sh is no|t copied|
|00003af0| 2c 20 73 6f 0a 79 6f 75 | 20 73 68 6f 75 6c 64 20 |, so.you| should |
|00003b00| 6e 6f 74 20 64 65 6c 65 | 74 65 20 74 68 65 20 62 |not dele|te the b|
|00003b10| 72 75 73 68 20 75 6e 6c | 65 73 73 20 74 68 65 20 |rush unl|ess the |
|00003b20| 63 61 6e 76 61 73 20 70 | 65 6e 20 68 61 73 20 62 |canvas p|en has b|
|00003b30| 65 65 6e 20 73 65 74 20 | 74 6f 0a 61 6e 6f 74 68 |een set |to.anoth|
|00003b40| 65 72 20 62 72 75 73 68 | 2c 20 6f 72 20 74 6f 20 |er brush|, or to |
|00003b50| 4e 55 4c 4c 2e 20 4e 6f | 74 65 20 74 68 61 74 20 |NULL. No|te that |
|00003b60| 61 6c 6c 20 70 65 6e 73 | 20 61 6e 64 20 62 72 75 |all pens| and bru|
|00003b70| 73 68 65 73 20 61 72 65 | 0a 61 75 74 6f 6d 61 74 |shes are|.automat|
|00003b80| 69 63 61 6c 6c 79 20 64 | 65 6c 65 74 65 64 20 77 |ically d|eleted w|
|00003b90| 68 65 6e 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |hen the |program |
|00003ba0| 69 73 20 65 78 69 74 65 | 64 2e 0a 0a 5c 6d 65 6d |is exite|d...\mem|
|00003bb0| 62 65 72 73 65 63 74 69 | 6f 6e 7b 77 78 43 61 6e |bersecti|on{wxCan|
|00003bc0| 76 61 73 3a 3a 53 65 74 | 46 6f 6e 74 7d 0a 0a 5c |vas::Set|Font}..\|
|00003bd0| 66 75 6e 63 7b 76 6f 69 | 64 7d 7b 53 65 74 46 6f |func{voi|d}{SetFo|
|00003be0| 6e 74 7d 7b 5c 70 61 72 | 61 6d 7b 77 78 46 6f 6e |nt}{\par|am{wxFon|
|00003bf0| 74 20 2a 7d 7b 66 6f 6e | 74 7d 7d 0a 0a 53 65 74 |t *}{fon|t}}..Set|
|00003c00| 73 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 66 6f |s the cu|rrent fo|
|00003c10| 6e 74 20 66 6f 72 20 74 | 68 65 20 63 61 6e 76 61 |nt for t|he canva|
|00003c20| 73 2e 20 54 68 65 20 66 | 6f 6e 74 20 69 73 20 6e |s. The f|ont is n|
|00003c30| 6f 74 20 63 6f 70 69 65 | 64 2c 20 73 6f 20 79 6f |ot copie|d, so yo|
|00003c40| 75 0a 73 68 6f 75 6c 64 | 20 6e 6f 74 20 64 65 6c |u.should| not del|
|00003c50| 65 74 65 20 74 68 65 20 | 66 6f 6e 74 20 75 6e 6c |ete the |font unl|
|00003c60| 65 73 73 20 74 68 65 20 | 63 61 6e 76 61 73 20 70 |ess the |canvas p|
|00003c70| 65 6e 20 68 61 73 20 62 | 65 65 6e 20 73 65 74 20 |en has b|een set |
|00003c80| 74 6f 0a 61 6e 6f 74 68 | 65 72 20 66 6f 6e 74 2c |to.anoth|er font,|
|00003c90| 20 6f 72 20 74 6f 20 4e | 55 4c 4c 2e 0a 0a 5c 6d | or to N|ULL...\m|
|00003ca0| 65 6d 62 65 72 73 65 63 | 74 69 6f 6e 7b 77 78 43 |embersec|tion{wxC|
|00003cb0| 61 6e 76 61 73 3a 3a 53 | 65 74 4c 6f 67 69 63 61 |anvas::S|etLogica|
|00003cc0| 6c 46 75 6e 63 74 69 6f | 6e 7d 0a 0a 5c 66 75 6e |lFunctio|n}..\fun|
|00003cd0| 63 7b 76 6f 69 64 7d 7b | 53 65 74 4c 6f 67 69 63 |c{void}{|SetLogic|
|00003ce0| 61 6c 46 75 6e 63 74 69 | 6f 6e 7d 7b 5c 70 61 72 |alFuncti|on}{\par|
|00003cf0| 61 6d 7b 69 6e 74 7d 7b | 20 66 75 6e 63 74 69 6f |am{int}{| functio|
|00003d00| 6e 7d 7d 0a 0a 53 65 74 | 73 20 74 68 65 20 63 75 |n}}..Set|s the cu|
|00003d10| 72 72 65 6e 74 20 6c 6f | 67 69 63 61 6c 20 66 75 |rrent lo|gical fu|
|00003d20| 6e 63 74 69 6f 6e 20 66 | 6f 72 20 74 68 65 20 63 |nction f|or the c|
|00003d30| 61 6e 76 61 73 2e 20 54 | 68 65 20 70 6f 73 73 69 |anvas. T|he possi|
|00003d40| 62 6c 65 20 76 61 6c 75 | 65 73 0a 61 72 65 3a 0a |ble valu|es.are:.|
|00003d50| 0a 5c 62 65 67 69 6e 7b | 69 74 65 6d 69 7a 65 7d |.\begin{|itemize}|
|00003d60| 0a 5c 69 74 65 6d 20 77 | 78 58 4f 52 0a 5c 69 74 |.\item w|xXOR.\it|
|00003d70| 65 6d 20 77 78 49 4e 56 | 45 52 54 0a 5c 69 74 65 |em wxINV|ERT.\ite|
|00003d80| 6d 20 77 78 4f 52 5c 5f | 52 45 56 45 52 53 45 0a |m wxOR\_|REVERSE.|
|00003d90| 5c 69 74 65 6d 20 77 78 | 41 4e 44 5c 5f 52 45 56 |\item wx|AND\_REV|
|00003da0| 45 52 53 45 0a 5c 69 74 | 65 6d 20 77 78 43 4f 50 |ERSE.\it|em wxCOP|
|00003db0| 59 0a 5c 65 6e 64 7b 69 | 74 65 6d 69 7a 65 7d 0a |Y.\end{i|temize}.|
|00003dc0| 0a 54 68 65 20 64 65 66 | 61 75 6c 74 20 69 73 20 |.The def|ault is |
|00003dd0| 77 78 43 4f 50 59 2c 20 | 77 68 69 63 68 20 73 69 |wxCOPY, |which si|
|00003de0| 6d 70 6c 79 20 64 72 61 | 77 73 20 77 69 74 68 20 |mply dra|ws with |
|00003df0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 63 6f 6c 6f |the curr|ent colo|
|00003e00| 75 72 2e 0a 54 68 65 20 | 6f 74 68 65 72 73 20 63 |ur..The |others c|
|00003e10| 6f 6d 62 69 6e 65 20 74 | 68 65 20 63 75 72 72 65 |ombine t|he curre|
|00003e20| 6e 74 20 63 6f 6c 6f 75 | 72 20 61 6e 64 20 74 68 |nt colou|r and th|
|00003e30| 65 20 62 61 63 6b 67 72 | 6f 75 6e 64 20 75 73 69 |e backgr|ound usi|
|00003e40| 6e 67 20 61 0a 6c 6f 67 | 69 63 61 6c 20 6f 70 65 |ng a.log|ical ope|
|00003e50| 72 61 74 69 6f 6e 2e 20 | 20 77 78 58 4f 52 20 69 |ration. | wxXOR i|
|00003e60| 73 20 63 6f 6d 6d 6f 6e | 6c 79 20 75 73 65 64 20 |s common|ly used |
|00003e70| 66 6f 72 20 64 72 61 77 | 69 6e 67 20 72 75 62 62 |for draw|ing rubb|
|00003e80| 65 72 20 62 61 6e 64 73 | 20 6f 72 0a 6d 6f 76 69 |er bands| or.movi|
|00003e90| 6e 67 20 6f 75 74 6c 69 | 6e 65 73 2c 20 73 69 6e |ng outli|nes, sin|
|00003ea0| 63 65 20 64 72 61 77 69 | 6e 67 20 74 77 69 63 65 |ce drawi|ng twice|
|00003eb0| 20 72 65 76 65 72 74 73 | 20 74 6f 20 74 68 65 20 | reverts| to the |
|00003ec0| 6f 72 69 67 69 6e 61 6c | 20 63 6f 6c 6f 75 72 2e |original| colour.|
|00003ed0| 0a 0a 5c 6d 65 6d 62 65 | 72 73 65 63 74 69 6f 6e |..\membe|rsection|
|00003ee0| 7b 77 78 43 61 6e 76 61 | 73 3a 3a 53 65 74 50 65 |{wxCanva|s::SetPe|
|00003ef0| 6e 7d 0a 0a 5c 66 75 6e | 63 7b 76 6f 69 64 7d 7b |n}..\fun|c{void}{|
|00003f00| 53 65 74 50 65 6e 7d 7b | 5c 70 61 72 61 6d 7b 77 |SetPen}{|\param{w|
|00003f10| 78 50 65 6e 20 2a 7d 7b | 70 65 6e 7d 7d 0a 0a 53 |xPen *}{|pen}}..S|
|00003f20| 65 74 73 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 |ets the |current |
|00003f30| 70 65 6e 20 66 6f 72 20 | 74 68 65 20 63 61 6e 76 |pen for |the canv|
|00003f40| 61 73 2e 20 20 54 68 65 | 20 70 65 6e 20 69 73 20 |as. The| pen is |
|00003f50| 6e 6f 74 20 63 6f 70 69 | 65 64 2c 20 73 6f 20 79 |not copi|ed, so y|
|00003f60| 6f 75 0a 73 68 6f 75 6c | 64 20 6e 6f 74 20 64 65 |ou.shoul|d not de|
|00003f70| 6c 65 74 65 20 74 68 65 | 20 70 65 6e 20 75 6e 6c |lete the| pen unl|
|00003f80| 65 73 73 20 74 68 65 20 | 63 61 6e 76 61 73 20 70 |ess the |canvas p|
|00003f90| 65 6e 20 68 61 73 20 62 | 65 65 6e 20 73 65 74 20 |en has b|een set |
|00003fa0| 74 6f 0a 61 6e 6f 74 68 | 65 72 20 70 65 6e 2c 20 |to.anoth|er pen, |
|00003fb0| 6f 72 20 74 6f 20 4e 55 | 4c 4c 2e 20 4e 6f 74 65 |or to NU|LL. Note|
|00003fc0| 20 74 68 61 74 20 61 6c | 6c 20 70 65 6e 73 20 61 | that al|l pens a|
|00003fd0| 6e 64 20 62 72 75 73 68 | 65 73 20 61 72 65 0a 61 |nd brush|es are.a|
|00003fe0| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 64 65 6c |utomatic|ally del|
|00003ff0| 65 74 65 64 20 77 68 65 | 6e 20 74 68 65 20 70 72 |eted whe|n the pr|
|00004000| 6f 67 72 61 6d 20 69 73 | 20 65 78 69 74 65 64 2e |ogram is| exited.|
|00004010| 0a 0a 5c 6d 65 6d 62 65 | 72 73 65 63 74 69 6f 6e |..\membe|rsection|
|00004020| 7b 77 78 43 61 6e 76 61 | 73 3a 3a 53 65 74 53 63 |{wxCanva|s::SetSc|
|00004030| 72 6f 6c 6c 62 61 72 73 | 7d 0a 0a 5c 66 75 6e 63 |rollbars|}..\func|
|00004040| 7b 76 6f 69 64 7d 7b 53 | 65 74 53 63 72 6f 6c 6c |{void}{S|etScroll|
|00004050| 62 61 72 73 7d 7b 5c 70 | 61 72 61 6d 7b 69 6e 74 |bars}{\p|aram{int|
|00004060| 7d 7b 20 68 6f 72 69 7a | 5c 5f 70 69 78 65 6c 73 |}{ horiz|\_pixels|
|00004070| 7d 2c 20 5c 70 61 72 61 | 6d 7b 69 6e 74 7d 7b 20 |}, \para|m{int}{ |
|00004080| 76 65 72 74 5c 5f 70 69 | 78 65 6c 73 7d 2c 20 5c |vert\_pi|xels}, \|
|00004090| 70 61 72 61 6d 7b 69 6e | 74 7d 7b 20 78 5c 5f 6c |param{in|t}{ x\_l|
|000040a0| 65 6e 67 74 68 7d 2c 20 | 5c 70 61 72 61 6d 7b 69 |ength}, |\param{i|
|000040b0| 6e 74 7d 7b 20 79 5c 5f | 6c 65 6e 67 74 68 7d 2c |nt}{ y\_|length},|
|000040c0| 5c 5c 0a 20 20 5c 70 61 | 72 61 6d 7b 69 6e 74 20 |\\. \pa|ram{int |
|000040d0| 7d 7b 78 5c 5f 70 61 67 | 65 7d 2c 20 5c 70 61 72 |}{x\_pag|e}, \par|
|000040e0| 61 6d 7b 69 6e 74 7d 7b | 20 79 5c 5f 70 61 67 65 |am{int}{| y\_page|
|000040f0| 7d 7d 0a 0a 53 65 74 73 | 20 75 70 20 76 65 72 74 |}}..Sets| up vert|
|00004100| 69 63 61 6c 20 61 6e 64 | 2f 6f 72 20 68 6f 72 69 |ical and|/or hori|
|00004110| 7a 6f 6e 74 61 6c 20 73 | 63 72 6f 6c 6c 62 61 72 |zontal s|crollbar|
|00004120| 73 2e 20 54 68 65 20 66 | 69 72 73 74 20 70 61 69 |s. The f|irst pai|
|00004130| 72 20 6f 66 0a 70 61 72 | 61 6d 65 74 65 72 73 20 |r of.par|ameters |
|00004140| 67 69 76 65 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |give the| number |
|00004150| 6f 66 20 70 69 78 65 6c | 73 20 70 65 72 20 60 73 |of pixel|s per `s|
|00004160| 63 72 6f 6c 6c 20 73 74 | 65 70 27 2c 20 69 2e 65 |croll st|ep', i.e|
|00004170| 2e 20 61 6d 6f 75 6e 74 | 0a 6d 6f 76 65 64 20 77 |. amount|.moved w|
|00004180| 68 65 6e 20 74 68 65 20 | 75 70 20 6f 72 20 64 6f |hen the |up or do|
|00004190| 77 6e 20 73 63 72 6f 6c | 6c 20 61 72 72 6f 77 73 |wn scrol|l arrows|
|000041a0| 20 61 72 65 20 70 72 65 | 73 73 65 64 2e 20 54 68 | are pre|ssed. Th|
|000041b0| 65 73 65 20 6d 61 79 20 | 62 65 20 30 20 6f 72 0a |ese may |be 0 or.|
|000041c0| 6c 65 73 73 20 66 6f 72 | 20 6e 6f 20 73 63 72 6f |less for| no scro|
|000041d0| 6c 6c 62 61 72 2e 20 54 | 68 65 20 73 65 63 6f 6e |llbar. T|he secon|
|000041e0| 64 20 70 61 69 72 20 67 | 69 76 65 73 20 74 68 65 |d pair g|ives the|
|000041f0| 20 6c 65 6e 67 74 68 20 | 6f 66 20 73 63 72 6f 6c | length |of scrol|
|00004200| 6c 62 61 72 0a 69 6e 20 | 73 63 72 6f 6c 6c 20 73 |lbar.in |scroll s|
|00004210| 74 65 70 73 2c 20 77 68 | 69 63 68 20 65 66 66 65 |teps, wh|ich effe|
|00004220| 63 74 69 76 65 6c 79 20 | 73 65 74 73 20 74 68 65 |ctively |sets the|
|00004230| 20 73 69 7a 65 20 6f 66 | 20 74 68 65 20 60 76 69 | size of| the `vi|
|00004240| 72 74 75 61 6c 0a 63 61 | 6e 76 61 73 27 2e 20 20 |rtual.ca|nvas'. |
|00004250| 54 68 65 20 74 68 69 72 | 64 20 70 61 69 72 20 67 |The thir|d pair g|
|00004260| 69 76 65 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |ives the| number |
|00004270| 6f 66 20 73 63 72 6f 6c | 6c 20 73 74 65 70 73 20 |of scrol|l steps |
|00004280| 69 6e 20 61 20 60 70 61 | 67 65 27 2c 0a 69 2e 65 |in a `pa|ge',.i.e|
|00004290| 2e 20 61 6d 6f 75 6e 74 | 20 6d 6f 76 65 64 20 77 |. amount| moved w|
|000042a0| 68 65 6e 20 70 72 65 73 | 73 69 6e 67 20 61 62 6f |hen pres|sing abo|
|000042b0| 76 65 20 6f 72 20 62 65 | 6c 6f 77 20 74 68 65 20 |ve or be|low the |
|000042c0| 73 63 72 6f 6c 6c 62 61 | 72 20 63 6f 6e 74 72 6f |scrollba|r contro|
|000042d0| 6c 2c 0a 6f 72 20 75 73 | 69 6e 67 20 70 61 67 65 |l,.or us|ing page|
|000042e0| 20 75 70 2f 70 61 67 65 | 20 64 6f 77 6e 20 28 6e | up/page| down (n|
|000042f0| 6f 74 20 79 65 74 20 69 | 6d 70 6c 65 6d 65 6e 74 |ot yet i|mplement|
|00004300| 65 64 29 2e 0a 0a 46 6f | 72 20 65 78 61 6d 70 6c |ed)...Fo|r exampl|
|00004310| 65 2c 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |e, the f|ollowing|
|00004320| 20 67 69 76 65 73 20 61 | 20 63 61 6e 76 61 73 20 | gives a| canvas |
|00004330| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 61 6e 64 20 76 |horizont|al and v|
|00004340| 65 72 74 69 63 61 6c 0a | 73 63 72 6f 6c 6c 62 61 |ertical.|scrollba|
|00004350| 72 73 20 77 69 74 68 20 | 32 30 20 70 69 78 65 6c |rs with |20 pixel|
|00004360| 73 20 70 65 72 20 73 63 | 72 6f 6c 6c 20 73 74 65 |s per sc|roll ste|
|00004370| 70 2c 20 61 20 73 69 7a | 65 20 6f 66 20 35 30 20 |p, a siz|e of 50 |
|00004380| 73 74 65 70 73 20 28 31 | 30 30 30 0a 70 69 78 65 |steps (1|000.pixe|
|00004390| 6c 73 29 20 69 6e 20 65 | 61 63 68 20 64 69 72 65 |ls) in e|ach dire|
|000043a0| 63 74 69 6f 6e 2c 20 61 | 6e 64 20 34 20 73 74 65 |ction, a|nd 4 ste|
|000043b0| 70 73 20 28 38 30 20 70 | 69 78 65 6c 73 29 20 74 |ps (80 p|ixels) t|
|000043c0| 6f 20 61 20 70 61 67 65 | 2e 0a 0a 5c 62 65 67 69 |o a page|...\begi|
|000043d0| 6e 7b 76 65 72 62 61 74 | 69 6d 7d 0a 63 61 6e 76 |n{verbat|im}.canv|
|000043e0| 61 73 2d 3e 53 65 74 53 | 63 72 6f 6c 6c 62 61 72 |as->SetS|crollbar|
|000043f0| 73 28 32 30 2c 20 32 30 | 2c 20 35 30 2c 20 35 30 |s(20, 20|, 50, 50|
|00004400| 2c 20 34 2c 20 34 29 3b | 0a 5c 65 6e 64 7b 76 65 |, 4, 4);|.\end{ve|
|00004410| 72 62 61 74 69 6d 7d 0a | 0a 0a 5c 6d 65 6d 62 65 |rbatim}.|..\membe|
|00004420| 72 73 65 63 74 69 6f 6e | 7b 77 78 43 61 6e 76 61 |rsection|{wxCanva|
|00004430| 73 3a 3a 53 65 74 54 65 | 78 74 42 61 63 6b 67 72 |s::SetTe|xtBackgr|
|00004440| 6f 75 6e 64 7d 0a 0a 5c | 66 75 6e 63 7b 76 6f 69 |ound}..\|func{voi|
|00004450| 64 7d 7b 53 65 74 54 65 | 78 74 42 61 63 6b 67 72 |d}{SetTe|xtBackgr|
|00004460| 6f 75 6e 64 7d 7b 5c 70 | 61 72 61 6d 7b 77 78 43 |ound}{\p|aram{wxC|
|00004470| 6f 6c 6f 75 72 20 2a 7d | 7b 63 6f 6c 6f 75 72 7d |olour *}|{colour}|
|00004480| 7d 0a 0a 53 65 74 73 20 | 74 68 65 20 63 75 72 72 |}..Sets |the curr|
|00004490| 65 6e 74 20 74 65 78 74 | 20 62 61 63 6b 67 72 6f |ent text| backgro|
|000044a0| 75 6e 64 20 63 6f 6c 6f | 75 72 20 66 6f 72 20 74 |und colo|ur for t|
|000044b0| 68 65 20 63 61 6e 76 61 | 73 2e 20 20 44 6f 20 6e |he canva|s. Do n|
|000044c0| 6f 74 0a 64 65 6c 65 74 | 65 20 7b 5c 69 74 20 63 |ot.delet|e {\it c|
|000044d0| 6f 6c 6f 75 72 7d 2e 0a | 0a 5c 6d 65 6d 62 65 72 |olour}..|.\member|
|000044e0| 73 65 63 74 69 6f 6e 7b | 77 78 43 61 6e 76 61 73 |section{|wxCanvas|
|000044f0| 3a 3a 53 65 74 54 65 78 | 74 46 6f 72 65 67 72 6f |::SetTex|tForegro|
|00004500| 75 6e 64 7d 0a 0a 5c 66 | 75 6e 63 7b 76 6f 69 64 |und}..\f|unc{void|
|00004510| 7d 7b 53 65 74 54 65 78 | 74 46 6f 72 65 67 72 6f |}{SetTex|tForegro|
|00004520| 75 6e 64 7d 7b 5c 70 61 | 72 61 6d 7b 77 78 43 6f |und}{\pa|ram{wxCo|
|00004530| 6c 6f 75 72 20 2a 7d 7b | 63 6f 6c 6f 75 72 7d 7d |lour *}{|colour}}|
|00004540| 0a 0a 53 65 74 73 20 74 | 68 65 20 63 75 72 72 65 |..Sets t|he curre|
|00004550| 6e 74 20 74 65 78 74 20 | 66 6f 72 65 67 72 6f 75 |nt text |foregrou|
|00004560| 6e 64 20 63 6f 6c 6f 75 | 72 20 66 6f 72 20 74 68 |nd colou|r for th|
|00004570| 65 20 63 61 6e 76 61 73 | 2e 20 44 6f 20 6e 6f 74 |e canvas|. Do not|
|00004580| 0a 64 65 6c 65 74 65 20 | 7b 5c 69 74 20 63 6f 6c |.delete |{\it col|
|00004590| 6f 75 72 7d 2e 0a 0a 5c | 6d 65 6d 62 65 72 73 65 |our}...\|memberse|
|000045a0| 63 74 69 6f 6e 7b 77 78 | 43 61 6e 76 61 73 3a 3a |ction{wx|Canvas::|
|000045b0| 56 69 65 77 53 74 61 72 | 74 7d 0a 0a 5c 66 75 6e |ViewStar|t}..\fun|
|000045c0| 63 7b 76 6f 69 64 7d 7b | 56 69 65 77 53 74 61 72 |c{void}{|ViewStar|
|000045d0| 74 7d 7b 5c 70 61 72 61 | 6d 7b 69 6e 74 20 2a 7d |t}{\para|m{int *}|
|000045e0| 7b 78 7d 2c 20 5c 70 61 | 72 61 6d 7b 69 6e 74 20 |{x}, \pa|ram{int |
|000045f0| 2a 7d 7b 20 79 7d 7d 0a | 0a 47 65 74 20 74 68 65 |*}{ y}}.|.Get the|
|00004600| 20 70 6f 73 69 74 69 6f | 6e 20 61 74 20 77 68 69 | positio|n at whi|
|00004610| 63 68 20 74 68 65 20 76 | 69 73 69 62 6c 65 20 70 |ch the v|isible p|
|00004620| 6f 72 74 69 6f 6e 20 6f | 66 20 74 68 65 20 63 61 |ortion o|f the ca|
|00004630| 6e 76 61 73 20 73 74 61 | 72 74 73 2e 20 49 66 0a |nvas sta|rts. If.|
|00004640| 65 69 74 68 65 72 20 6f | 66 20 74 68 65 20 73 63 |either o|f the sc|
|00004650| 72 6f 6c 6c 62 61 72 73 | 20 69 73 20 6e 6f 74 20 |rollbars| is not |
|00004660| 61 74 20 74 68 65 20 68 | 6f 6d 65 20 70 6f 73 69 |at the h|ome posi|
|00004670| 74 69 6f 6e 2c 20 7b 5c | 69 74 20 78 7d 20 61 6e |tion, {\|it x} an|
|00004680| 64 2f 6f 72 0a 7b 5c 69 | 74 20 79 7d 20 77 69 6c |d/or.{\i|t y} wil|
|00004690| 6c 20 62 65 20 67 72 65 | 61 74 65 72 20 74 68 61 |l be gre|ater tha|
|000046a0| 6e 20 7a 65 72 6f 2e 20 | 20 43 6f 6d 62 69 6e 65 |n zero. | Combine|
|000046b0| 64 20 77 69 74 68 20 7b | 5c 62 66 20 47 65 74 43 |d with {|\bf GetC|
|000046c0| 6c 69 65 6e 74 53 69 7a | 65 7d 2c 0a 74 68 65 20 |lientSiz|e},.the |
|000046d0| 61 70 70 6c 69 63 61 74 | 69 6f 6e 20 63 61 6e 20 |applicat|ion can |
|000046e0| 75 73 65 20 74 68 69 73 | 20 66 75 6e 63 74 69 6f |use this| functio|
|000046f0| 6e 20 74 6f 20 65 66 66 | 69 63 69 65 6e 74 6c 79 |n to eff|iciently|
|00004700| 20 72 65 64 72 61 77 20 | 6f 6e 6c 79 20 74 68 65 | redraw |only the|
|00004710| 0a 76 69 73 69 62 6c 65 | 20 70 6f 72 74 69 6f 6e |.visible| portion|
|00004720| 20 6f 66 20 74 68 65 20 | 63 61 6e 76 61 73 2e 20 | of the |canvas. |
|00004730| 20 54 68 65 20 70 6f 73 | 69 74 69 6f 6e 73 20 61 | The pos|itions a|
|00004740| 72 65 20 69 6e 20 6c 6f | 67 69 63 61 6c 20 73 63 |re in lo|gical sc|
|00004750| 72 6f 6c 6c 0a 75 6e 69 | 74 73 2c 20 6e 6f 74 20 |roll.uni|ts, not |
|00004760| 70 69 78 65 6c 73 2c 20 | 73 6f 20 74 6f 20 63 6f |pixels, |so to co|
|00004770| 6e 76 65 72 74 20 74 6f | 20 70 69 78 65 6c 73 20 |nvert to| pixels |
|00004780| 79 6f 75 20 77 69 6c 6c | 20 68 61 76 65 20 74 6f |you will| have to|
|00004790| 20 6d 75 6c 74 69 70 6c | 79 0a 62 79 20 74 68 65 | multipl|y.by the|
|000047a0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 70 69 78 65 6c | number |of pixel|
|000047b0| 73 20 70 65 72 20 73 63 | 72 6f 6c 6c 20 69 6e 63 |s per sc|roll inc|
|000047c0| 72 65 6d 65 6e 74 2e 0a | 0a 5c 73 65 63 74 69 6f |rement..|.\sectio|
|000047d0| 6e 7b 5c 63 6c 61 73 73 | 7b 77 78 43 68 65 63 6b |n{\class|{wxCheck|
|000047e0| 42 6f 78 7d 3a 20 77 78 | 49 74 65 6d 7d 0a 0a 41 |Box}: wx|Item}..A|
|000047f0| 20 63 68 65 63 6b 62 6f | 78 20 69 73 20 61 20 6c | checkbo|x is a l|
|00004800| 61 62 65 6c 6c 65 64 20 | 62 6f 78 20 77 68 69 63 |abelled |box whic|
|00004810| 68 20 69 73 20 65 69 74 | 68 65 72 20 6f 6e 20 28 |h is eit|her on (|
|00004820| 63 68 65 63 6b 6d 61 72 | 6b 20 69 73 20 76 69 73 |checkmar|k is vis|
|00004830| 69 62 6c 65 29 20 6f 72 | 20 6f 66 66 20 28 6e 6f |ible) or| off (no|
|00004840| 20 63 68 65 63 6b 6d 61 | 72 6b 29 2e 0a 0a 5c 6d | checkma|rk)...\m|
|00004850| 65 6d 62 65 72 73 65 63 | 74 69 6f 6e 7b 77 78 43 |embersec|tion{wxC|
|00004860| 68 65 63 6b 42 6f 78 3a | 3a 77 78 43 68 65 63 6b |heckBox:|:wxCheck|
|00004870| 42 6f 78 7d 0a 0a 5c 66 | 75 6e 63 7b 76 6f 69 64 |Box}..\f|unc{void|
|00004880| 7d 7b 77 78 43 68 65 63 | 6b 42 6f 78 7d 7b 5c 70 |}{wxChec|kBox}{\p|
|00004890| 61 72 61 6d 7b 77 78 50 | 61 6e 65 6c 20 2a 7d 7b |aram{wxP|anel *}{|
|000048a0| 70 61 72 65 6e 74 7d 2c | 20 5c 70 61 72 61 6d 7b |parent},| \param{|
|000048b0| 77 78 46 75 6e 63 74 69 | 6f 6e 7d 7b 20 66 75 6e |wxFuncti|on}{ fun|
|000048c0| 63 7d 2c 0a 5c 70 61 72 | 61 6d 7b 63 68 61 72 20 |c},.\par|am{char |
|000048d0| 2a 7d 7b 6c 61 62 65 6c | 7d 2c 5c 5c 20 5c 70 61 |*}{label|},\\ \pa|
|000048e0| 72 61 6d 7b 69 6e 74 7d | 7b 20 78 20 3d 20 2d 31 |ram{int}|{ x = -1|
|000048f0| 7d 2c 20 5c 70 61 72 61 | 6d 7b 69 6e 74 7d 7b 20 |}, \para|m{int}{ |
|00004900| 79 20 3d 20 2d 31 7d 2c | 20 5c 70 61 72 61 6d 7b |y = -1},| \param{|
|00004910| 69 6e 74 7d 7b 20 77 69 | 64 74 68 20 3d 20 2d 31 |int}{ wi|dth = -1|
|00004920| 7d 2c 20 5c 70 61 72 61 | 6d 7b 69 6e 74 7d 7b 20 |}, \para|m{int}{ |
|00004930| 68 65 69 67 68 74 20 3d | 20 2d 31 7d 7d 0a 0a 43 |height =| -1}}..C|
|00004940| 6f 6e 73 74 72 75 63 74 | 6f 72 2c 20 63 72 65 61 |onstruct|or, crea|
|00004950| 74 69 6e 67 20 61 6e 64 | 20 73 68 6f 77 69 6e 67 |ting and| showing|
|00004960| 20 61 20 63 68 65 63 6b | 62 6f 78 2e 20 20 49 66 | a check|box. If|
|00004970| 20 7b 5c 69 74 20 77 69 | 64 74 68 7d 20 6f 72 20 | {\it wi|dth} or |
|00004980| 7b 5c 69 74 0a 68 65 69 | 67 68 74 7d 20 61 72 65 |{\it.hei|ght} are|
|00004990| 20 6f 6d 69 74 74 65 64 | 20 28 6f 72 20 61 72 65 | omitted| (or are|
|000049a0| 20 6c 65 73 73 20 74 68 | 61 6e 20 7a 65 72 6f 29 | less th|an zero)|
|000049b0| 2c 20 61 6e 20 61 70 70 | 72 6f 70 72 69 61 74 65 |, an app|ropriate|
|000049c0| 20 73 69 7a 65 20 77 69 | 6c 6c 0a 62 65 20 75 73 | size wi|ll.be us|
|000049d0| 65 64 20 66 6f 72 20 74 | 68 65 20 63 68 65 63 6b |ed for t|he check|
|000049e0| 20 62 6f 78 2e 20 20 7b | 5c 69 74 20 66 75 6e 63 | box. {|\it func|
|000049f0| 7d 20 6d 61 79 20 62 65 | 20 4e 55 4c 4c 3b 20 6f |} may be| NULL; o|
|00004a00| 74 68 65 72 77 69 73 65 | 20 69 74 20 69 73 0a 75 |therwise| it is.u|
|00004a10| 73 65 64 20 61 73 20 74 | 68 65 20 63 61 6c 6c 62 |sed as t|he callb|
|00004a20| 61 63 6b 20 66 6f 72 20 | 74 68 65 20 63 68 65 63 |ack for |the chec|
|00004a30| 6b 20 62 6f 78 2e 20 20 | 4e 6f 74 65 20 74 68 61 |k box. |Note tha|
|00004a40| 74 20 74 68 65 20 63 61 | 73 74 0a 28 77 78 46 75 |t the ca|st.(wxFu|
|00004a50| 6e 63 74 69 6f 6e 29 20 | 6d 75 73 74 20 62 65 20 |nction) |must be |
|00004a60| 75 73 65 64 20 77 68 65 | 6e 20 70 61 73 73 69 6e |used whe|n passin|
|00004a70| 67 20 79 6f 75 72 20 63 | 61 6c 6c 62 61 63 6b 20 |g your c|allback |
|00004a80| 66 75 6e 63 74 69 6f 6e | 20 6e 61 6d 65 2c 20 6f |function| name, o|
|00004a90| 72 0a 74 68 65 20 63 6f | 6d 70 69 6c 65 72 20 6d |r.the co|mpiler m|
|00004aa0| 61 79 20 63 6f 6d 70 6c | 61 69 6e 20 74 68 61 74 |ay compl|ain that|
|00004ab0| 20 74 68 65 20 66 75 6e | 63 74 69 6f 6e 20 64 6f | the fun|ction do|
|00004ac0| 65 73 20 6e 6f 74 20 6d | 61 74 63 68 20 74 68 65 |es not m|atch the|
|00004ad0| 0a 63 6f 6e 73 74 72 75 | 63 74 6f 72 20 64 65 63 |.constru|ctor dec|
|00004ae0| 6c 61 72 61 74 69 6f 6e | 2e 0a 0a 5c 6d 65 6d 62 |laration|...\memb|
|00004af0| 65 72 73 65 63 74 69 6f | 6e 7b 77 78 43 68 65 63 |ersectio|n{wxChec|
|00004b00| 6b 42 6f 78 3a 3a 5c 64 | 65 73 74 72 75 63 74 7b |kBox::\d|estruct{|
|00004b10| 77 78 43 68 65 63 6b 42 | 6f 78 7d 7d 0a 0a 5c 66 |wxCheckB|ox}}..\f|
|00004b20| 75 6e 63 7b 76 6f 69 64 | 7d 7b 5c 64 65 73 74 72 |unc{void|}{\destr|
|00004b30| 75 63 74 7b 77 78 43 68 | 65 63 6b 42 6f 78 7d 7d |uct{wxCh|eckBox}}|
|00004b40| 7b 5c 76 6f 69 64 7d 0a | 0a 44 65 73 74 72 75 63 |{\void}.|.Destruc|
|00004b50| 74 6f 72 2c 20 64 65 73 | 74 72 6f 79 69 6e 67 20 |tor, des|troying |
|00004b60| 74 68 65 20 63 68 65 63 | 6b 62 6f 78 2e 0a 0a 5c |the chec|kbox...\|
|00004b70| 6d 65 6d 62 65 72 73 65 | 63 74 69 6f 6e 7b 77 78 |memberse|ction{wx|
|00004b80| 43 68 65 63 6b 42 6f 78 | 3a 3a 47 65 74 56 61 6c |CheckBox|::GetVal|
|00004b90| 75 65 7d 0a 0a 5c 66 75 | 6e 63 7b 42 6f 6f 6c 7d |ue}..\fu|nc{Bool}|
|00004ba0| 7b 47 65 74 56 61 6c 75 | 65 7d 7b 5c 76 6f 69 64 |{GetValu|e}{\void|
|00004bb0| 7d 0a 0a 47 65 74 73 20 | 74 68 65 20 73 74 61 74 |}..Gets |the stat|
|00004bc0| 65 20 6f 66 20 74 68 65 | 20 63 68 65 63 6b 62 6f |e of the| checkbo|
|00004bd0| 78 2c 20 54 52 55 45 20 | 69 66 20 69 74 20 69 73 |x, TRUE |if it is|
|00004be0| 20 63 68 65 63 6b 65 64 | 2c 20 46 41 4c 53 45 20 | checked|, FALSE |
|00004bf0| 6f 74 68 65 72 77 69 73 | 65 2e 0a 0a 5c 6d 65 6d |otherwis|e...\mem|
|00004c00| 62 65 72 73 65 63 74 69 | 6f 6e 7b 77 78 43 68 65 |bersecti|on{wxChe|
|00004c10| 63 6b 42 6f 78 3a 3a 53 | 65 74 56 61 6c 75 65 7d |ckBox::S|etValue}|
|00004c20| 0a 0a 5c 66 75 6e 63 7b | 76 6f 69 64 7d 7b 53 65 |..\func{|void}{Se|
|00004c30| 74 56 61 6c 75 65 7d 7b | 5c 70 61 72 61 6d 7b 42 |tValue}{|\param{B|
|00004c40| 6f 6f 6c 7d 7b 20 73 74 | 61 74 65 7d 7d 0a 0a 53 |ool}{ st|ate}}..S|
|00004c50| 65 74 73 20 74 68 65 20 | 63 68 65 63 6b 62 6f 78 |ets the |checkbox|
|00004c60| 20 74 6f 20 74 68 65 20 | 67 69 76 65 6e 20 73 74 | to the |given st|
|00004c70| 61 74 65 3a 20 69 66 20 | 74 68 65 20 73 74 61 74 |ate: if |the stat|
|00004c80| 65 20 69 73 20 54 52 55 | 45 2c 20 74 68 65 20 63 |e is TRU|E, the c|
|00004c90| 68 65 63 6b 20 69 73 20 | 6f 6e 2c 0a 6f 74 68 65 |heck is |on,.othe|
|00004ca0| 72 77 69 73 65 20 69 74 | 20 69 73 20 6f 66 66 2e |rwise it| is off.|
|00004cb0| 0a 0a 0a 5c 73 65 63 74 | 69 6f 6e 7b 5c 63 6c 61 |...\sect|ion{\cla|
|00004cc0| 73 73 7b 77 78 43 68 6f | 69 63 65 7d 3a 20 77 78 |ss{wxCho|ice}: wx|
|00004cd0| 49 74 65 6d 7d 0a 0a 41 | 20 63 68 6f 69 63 65 20 |Item}..A| choice |
|00004ce0| 69 74 65 6d 20 69 73 20 | 75 73 65 64 20 74 6f 20 |item is |used to |
|00004cf0| 73 65 6c 65 63 74 20 6f | 6e 65 20 6f 66 20 61 20 |select o|ne of a |
|00004d00| 6c 69 73 74 20 6f 66 20 | 73 74 72 69 6e 67 73 2e |list of |strings.|
|00004d10| 20 55 6e 6c 69 6b 65 20 | 61 0a 6c 69 73 74 62 6f | Unlike |a.listbo|
|00004d20| 78 2c 20 6f 6e 6c 79 20 | 74 68 65 20 73 65 6c 65 |x, only |the sele|
|00004d30| 63 74 69 6f 6e 20 69 73 | 20 76 69 73 69 62 6c 65 |ction is| visible|
|00004d40| 20 75 6e 74 69 6c 20 74 | 68 65 20 75 73 65 72 20 | until t|he user |
|00004d50| 70 75 6c 6c 73 20 64 6f | 77 6e 20 74 68 65 0a 6d |pulls do|wn the.m|
|00004d60| 65 6e 75 20 6f 66 20 63 | 68 6f 69 63 65 73 2e 20 |enu of c|hoices. |
|00004d70| 55 6e 64 65 72 20 58 56 | 69 65 77 20 61 6e 64 20 |Under XV|iew and |
|00004d80| 4d 6f 74 69 66 2c 20 61 | 6c 6c 20 73 65 6c 65 63 |Motif, a|ll selec|
|00004d90| 74 69 6f 6e 73 20 61 72 | 65 20 76 69 73 69 62 6c |tions ar|e visibl|
|00004da0| 65 0a 77 68 65 6e 20 74 | 68 65 20 6d 65 6e 75 20 |e.when t|he menu |
|00004db0| 69 73 20 64 69 73 70 6c | 61 79 65 64 2e 20 55 6e |is displ|ayed. Un|
|00004dc0| 64 65 72 20 57 69 6e 64 | 6f 77 73 20 33 2c 20 61 |der Wind|ows 3, a|
|00004dd0| 20 73 63 72 6f 6c 6c 69 | 6e 67 20 6c 69 73 74 20 | scrolli|ng list |
|00004de0| 69 73 0a 64 69 73 70 6c | 61 79 65 64 20 77 68 65 |is.displ|ayed whe|
|00004df0| 6e 20 74 68 65 20 75 73 | 65 72 20 77 61 6e 74 73 |n the us|er wants|
|00004e00| 20 74 6f 20 63 68 61 6e | 67 65 20 74 68 65 20 73 | to chan|ge the s|
|00004e10| 65 6c 65 63 74 69 6f 6e | 2e 20 4e 6f 74 65 20 74 |election|. Note t|
|00004e20| 68 61 74 20 75 6e 64 65 | 72 0a 58 56 69 65 77 2c |hat unde|r.XView,|
|00004e30| 20 63 72 65 61 74 69 6e | 67 20 61 20 63 68 6f 69 | creatin|g a choi|
|00004e40| 63 65 20 69 74 65 6d 20 | 77 69 74 68 20 61 20 6c |ce item |with a l|
|00004e50| 61 72 67 65 20 6e 75 6d | 62 65 72 20 6f 66 20 73 |arge num|ber of s|
|00004e60| 74 72 69 6e 67 73 20 74 | 61 6b 65 73 20 61 0a 6c |trings t|akes a.l|
|00004e70| 6f 6e 67 20 74 69 6d 65 | 20 64 75 65 20 74 6f 20 |ong time| due to |
|00004e80| 74 68 65 20 69 6e 65 66 | 66 69 63 69 65 6e 63 79 |the inef|ficiency|
|00004e90| 20 6f 66 20 53 75 6e 27 | 73 20 69 6d 70 6c 65 6d | of Sun'|s implem|
|00004ea0| 65 6e 74 61 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |entation| of the |
|00004eb0| 58 56 69 65 77 0a 63 68 | 6f 69 63 65 20 69 74 65 |XView.ch|oice ite|
|00004ec0| 6d 2e 0a 0a 5c 6d 65 6d | 62 65 72 73 65 63 74 69 |m...\mem|bersecti|
|00004ed0| 6f 6e 7b 77 78 43 68 6f | 69 63 65 3a 3a 77 78 43 |on{wxCho|ice::wxC|
|00004ee0| 68 6f 69 63 65 7d 0a 0a | 5c 66 75 6e 63 7b 76 6f |hoice}..|\func{vo|
|00004ef0| 69 64 7d 7b 77 78 43 68 | 6f 69 63 65 7d 7b 5c 70 |id}{wxCh|oice}{\p|
|00004f00| 61 72 61 6d 7b 77 78 50 | 61 6e 65 6c 20 2a 7d 7b |aram{wxP|anel *}{|
|00004f10| 70 61 72 65 6e 74 7d 2c | 20 5c 70 61 72 61 6d 7b |parent},| \param{|
|00004f20| 77 78 46 75 6e 63 74 69 | 6f 6e 7d 7b 20 66 75 6e |wxFuncti|on}{ fun|
|00004f30| 63 7d 2c 0a 5c 70 61 72 | 61 6d 7b 63 68 61 72 20 |c},.\par|am{char |
|00004f40| 2a 7d 7b 6c 61 62 65 6c | 7d 2c 20 5c 5c 5c 70 61 |*}{label|}, \\\pa|
|00004f50| 72 61 6d 7b 69 6e 74 7d | 7b 20 78 20 3d 20 2d 31 |ram{int}|{ x = -1|
|00004f60| 7d 2c 20 5c 70 61 72 61 | 6d 7b 69 6e 74 7d 7b 20 |}, \para|m{int}{ |
|00004f70| 79 20 3d 20 2d 31 7d 2c | 20 5c 70 61 72 61 6d 7b |y = -1},| \param{|
|00004f80| 69 6e 74 7d 7b 20 77 69 | 64 74 68 20 3d 20 2d 31 |int}{ wi|dth = -1|
|00004f90| 7d 2c 20 5c 70 61 72 61 | 6d 7b 69 6e 74 7d 7b 20 |}, \para|m{int}{ |
|00004fa0| 68 65 69 67 68 74 20 3d | 20 2d 31 7d 2c 20 5c 70 |height =| -1}, \p|
|00004fb0| 61 72 61 6d 7b 69 6e 74 | 7d 7b 20 6e 7d 2c 20 5c |aram{int|}{ n}, \|
|00004fc0| 70 61 72 61 6d 7b 63 68 | 61 72 20 2a 7d 7b 63 68 |param{ch|ar *}{ch|
|00004fd0| 6f 69 63 65 73 5b 5d 7d | 7d 0a 0a 43 6f 6e 73 74 |oices[]}|}..Const|
|00004fe0| 72 75 63 74 6f 72 2c 20 | 63 72 65 61 74 69 6e 67 |ructor, |creating|
|00004ff0| 20 61 6e 64 20 73 68 6f | 77 69 6e 67 20 61 20 63 | and sho|wing a c|
|00005000| 68 6f 69 63 65 2e 20 49 | 66 20 7b 5c 69 74 20 77 |hoice. I|f {\it w|
|00005010| 69 64 74 68 7d 20 6f 72 | 20 7b 5c 69 74 0a 68 65 |idth} or| {\it.he|
|00005020| 69 67 68 74 7d 20 61 72 | 65 20 6f 6d 69 74 74 65 |ight} ar|e omitte|
|00005030| 64 20 28 6f 72 20 61 72 | 65 20 6c 65 73 73 20 74 |d (or ar|e less t|
|00005040| 68 61 6e 20 7a 65 72 6f | 29 2c 20 61 6e 20 61 70 |han zero|), an ap|
|00005050| 70 72 6f 70 72 69 61 74 | 65 20 73 69 7a 65 20 77 |propriat|e size w|
|00005060| 69 6c 6c 20 62 65 0a 75 | 73 65 64 20 66 6f 72 20 |ill be.u|sed for |
|00005070| 74 68 65 20 63 68 6f 69 | 63 65 2e 20 7b 5c 69 74 |the choi|ce. {\it|
|00005080| 20 66 75 6e 63 7d 20 6d | 61 79 20 62 65 20 4e 55 | func} m|ay be NU|
|00005090| 4c 4c 3b 20 6f 74 68 65 | 72 77 69 73 65 20 69 74 |LL; othe|rwise it|
|000050a0| 20 69 73 20 75 73 65 64 | 20 61 73 0a 74 68 65 20 | is used| as.the |
|000050b0| 63 61 6c 6c 62 61 63 6b | 20 66 6f 72 20 74 68 65 |callback| for the|
|000050c0| 20 63 68 6f 69 63 65 2e | 20 20 4e 6f 74 65 20 74 | choice.| Note t|
|000050d0| 68 61 74 20 74 68 65 20 | 63 61 73 74 20 28 77 78 |hat the |cast (wx|
|000050e0| 46 75 6e 63 74 69 6f 6e | 29 20 6d 75 73 74 20 62 |Function|) must b|
|000050f0| 65 0a 75 73 65 64 20 77 | 68 65 6e 20 70 61 73 73 |e.used w|hen pass|
|00005100| 69 6e 67 20 79 6f 75 72 | 20 63 61 6c 6c 62 61 63 |ing your| callbac|
|00005110| 6b 20 66 75 6e 63 74 69 | 6f 6e 20 6e 61 6d 65 2c |k functi|on name,|
|00005120| 20 6f 72 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 | or the |compiler|
|00005130| 20 6d 61 79 0a 63 6f 6d | 70 6c 61 69 6e 20 74 68 | may.com|plain th|
|00005140| 61 74 20 74 68 65 20 66 | 75 6e 63 74 69 6f 6e 20 |at the f|unction |
|00005150| 64 6f 65 73 20 6e 6f 74 | 20 6d 61 74 63 68 20 74 |does not| match t|
|00005160| 68 65 20 63 6f 6e 73 74 | 72 75 63 74 6f 72 20 64 |he const|ructor d|
|00005170| 65 63 6c 61 72 61 74 69 | 6f 6e 2e 0a 0a 7b 5c 69 |eclarati|on...{\i|
|00005180| 74 20 6e 7d 20 69 73 20 | 74 68 65 20 6e 75 6d 62 |t n} is |the numb|
|00005190| 65 72 20 6f 66 20 70 6f | 73 73 69 62 6c 65 20 63 |er of po|ssible c|
|000051a0| 68 6f 69 63 65 73 2c 20 | 61 6e 64 20 7b 5c 69 74 |hoices, |and {\it|
|000051b0| 20 63 68 6f 69 63 65 73 | 7d 20 69 73 20 61 6e 0a | choices|} is an.|
|000051c0| 61 72 72 61 79 20 6f 66 | 20 73 74 72 69 6e 67 73 |array of| strings|
|000051d0| 20 6f 66 20 73 69 7a 65 | 20 7b 5c 69 74 20 6e 7d | of size| {\it n}|
|000051e0| 2e 20 77 78 57 69 6e 64 | 6f 77 73 20 61 6c 6c 6f |. wxWind|ows allo|
|000051f0| 63 61 74 65 73 20 69 74 | 73 20 6f 77 6e 20 6d 65 |cates it|s own me|
|00005200| 6d 6f 72 79 0a 66 6f 72 | 20 74 68 65 73 65 20 73 |mory.for| these s|
|00005210| 74 72 69 6e 67 73 20 73 | 6f 20 74 68 65 20 63 61 |trings s|o the ca|
|00005220| 6c 6c 69 6e 67 20 70 72 | 6f 67 72 61 6d 20 6d 75 |lling pr|ogram mu|
|00005230| 73 74 20 64 65 61 6c 6c | 6f 63 61 74 65 20 74 68 |st deall|ocate th|
|00005240| 65 20 61 72 72 61 79 0a | 69 74 73 65 6c 66 2e 0a |e array.|itself..|
|00005250| 0a 5c 6d 65 6d 62 65 72 | 73 65 63 74 69 6f 6e 7b |.\member|section{|
|00005260| 77 78 43 68 6f 69 63 65 | 3a 3a 5c 64 65 73 74 72 |wxChoice|::\destr|
|00005270| 75 63 74 7b 77 78 43 68 | 6f 69 63 65 7d 7d 0a 0a |uct{wxCh|oice}}..|
|00005280| 5c 66 75 6e 63 7b 76 6f | 69 64 7d 7b 5c 64 65 73 |\func{vo|id}{\des|
|00005290| 74 72 75 63 74 7b 77 78 | 43 68 6f 69 63 65 7d 7d |truct{wx|Choice}}|
|000052a0| 7b 5c 76 6f 69 64 7d 0a | 0a 44 65 73 74 72 75 63 |{\void}.|.Destruc|
|000052b0| 74 6f 72 2c 20 64 65 73 | 74 72 6f 79 69 6e 67 20 |tor, des|troying |
|000052c0| 74 68 65 20 63 68 6f 69 | 63 65 20 69 74 65 6d 2e |the choi|ce item.|
|000052d0| 0a 0a 5c 6d 65 6d 62 65 | 72 73 65 63 74 69 6f 6e |..\membe|rsection|
|000052e0| 7b 77 78 43 68 6f 69 63 | 65 3a 3a 41 70 70 65 6e |{wxChoic|e::Appen|
|000052f0| 64 7d 0a 0a 5c 66 75 6e | 63 7b 76 6f 69 64 7d 7b |d}..\fun|c{void}{|
|00005300| 41 70 70 65 6e 64 7d 7b | 5c 70 61 72 61 6d 7b 63 |Append}{|\param{c|
|00005310| 68 61 72 20 2a 7d 7b 20 | 69 74 65 6d 7d 7d 0a 0a |har *}{ |item}}..|
|00005320| 41 64 64 73 20 74 68 65 | 20 69 74 65 6d 20 74 6f |Adds the| item to|
|00005330| 20 74 68 65 20 65 6e 64 | 20 6f 66 20 74 68 65 20 | the end| of the |
|00005340| 63 68 6f 69 63 65 20 69 | 74 65 6d 2e 20 7b 5c 69 |choice i|tem. {\i|
|00005350| 74 20 69 74 65 6d 7d 20 | 6d 75 73 74 20 62 65 0a |t item} |must be.|
|00005360| 64 65 61 6c 6c 6f 63 61 | 74 65 64 20 62 79 20 74 |dealloca|ted by t|
|00005370| 68 65 20 63 61 6c 6c 69 | 6e 67 20 70 72 6f 67 72 |he calli|ng progr|
|00005380| 61 6d 2c 20 69 2e 65 2e | 20 77 78 57 69 6e 64 6f |am, i.e.| wxWindo|
|00005390| 77 73 20 6d 61 6b 65 73 | 20 69 74 73 20 6f 77 6e |ws makes| its own|
|000053a0| 20 63 6f 70 79 2e 0a 0a | 5c 6d 65 6d 62 65 72 73 | copy...|\members|
|000053b0| 65 63 74 69 6f 6e 7b 77 | 78 43 68 6f 69 63 65 3a |ection{w|xChoice:|
|000053c0| 3a 43 6c 65 61 72 7d 0a | 0a 5c 66 75 6e 63 7b 76 |:Clear}.|.\func{v|
|000053d0| 6f 69 64 7d 7b 43 6c 65 | 61 72 7d 7b 5c 76 6f 69 |oid}{Cle|ar}{\voi|
|000053e0| 64 7d 0a 0a 43 6c 65 61 | 72 73 20 74 68 65 20 73 |d}..Clea|rs the s|
|000053f0| 74 72 69 6e 67 73 20 66 | 72 6f 6d 20 74 68 65 20 |trings f|rom the |
|00005400| 63 68 6f 69 63 65 20 69 | 74 65 6d 2e 20 55 6e 64 |choice i|tem. Und|
|00005410| 65 72 20 58 56 69 65 77 | 2c 20 74 68 69 73 20 69 |er XView|, this i|
|00005420| 73 20 64 6f 6e 65 0a 62 | 79 20 64 65 6c 65 74 69 |s done.b|y deleti|
|00005430| 6e 67 20 61 6e 64 20 72 | 65 63 6f 6e 73 74 72 75 |ng and r|econstru|
|00005440| 63 74 69 6e 67 20 74 68 | 65 20 69 74 65 6d 2c 20 |cting th|e item, |
|00005450| 62 75 74 20 69 74 20 64 | 6f 65 73 6e 27 74 20 72 |but it d|oesn't r|
|00005460| 65 64 69 73 70 6c 61 79 | 0a 70 72 6f 70 65 72 6c |edisplay|.properl|
|00005470| 79 20 75 6e 74 69 6c 20 | 74 68 65 20 75 73 65 72 |y until |the user|
|00005480| 20 72 65 66 72 65 73 68 | 65 73 20 74 68 65 20 77 | refresh|es the w|
|00005490| 69 6e 64 6f 77 2e 0a 0a | 5c 6d 65 6d 62 65 72 73 |indow...|\members|
|000054a0| 65 63 74 69 6f 6e 7b 77 | 78 43 68 6f 69 63 65 3a |ection{w|xChoice:|
|000054b0| 3a 46 69 6e 64 53 74 72 | 69 6e 67 7d 0a 0a 5c 66 |:FindStr|ing}..\f|
|000054c0| 75 6e 63 7b 69 6e 74 7d | 7b 46 69 6e 64 53 74 72 |unc{int}|{FindStr|
|000054d0| 69 6e 67 7d 7b 5c 70 61 | 72 61 6d 7b 63 68 61 72 |ing}{\pa|ram{char|
|000054e0| 20 2a 7d 7b 73 7d 7d 0a | 0a 46 69 6e 64 73 20 61 | *}{s}}.|.Finds a|
|000054f0| 20 63 68 6f 69 63 65 20 | 6d 61 74 63 68 69 6e 67 | choice |matching|
|00005500| 20 74 68 65 20 67 69 76 | 65 6e 20 73 74 72 69 6e | the giv|en strin|
|00005510| 67 2c 20 72 65 74 75 72 | 6e 69 6e 67 20 74 68 65 |g, retur|ning the|
|00005520| 20 70 6f 73 69 74 69 6f | 6e 20 69 66 20 66 6f 75 | positio|n if fou|
|00005530| 6e 64 2c 20 6f 72 0a 2d | 31 20 69 66 20 6e 6f 74 |nd, or.-|1 if not|
|00005540| 20 66 6f 75 6e 64 2e 0a | 0a 5c 6d 65 6d 62 65 72 | found..|.\member|
|00005550| 73 65 63 74 69 6f 6e 7b | 77 78 43 68 6f 69 63 65 |section{|wxChoice|
|00005560| 3a 3a 47 65 74 53 65 6c | 65 63 74 69 6f 6e 7d 0a |::GetSel|ection}.|
|00005570| 0a 5c 66 75 6e 63 7b 69 | 6e 74 7d 7b 47 65 74 53 |.\func{i|nt}{GetS|
|00005580| 65 6c 65 63 74 69 6f 6e | 7d 7b 5c 76 6f 69 64 7d |election|}{\void}|
|00005590| 0a 0a 47 65 74 73 20 74 | 68 65 20 69 64 20 28 70 |..Gets t|he id (p|
|000055a0| 6f 73 69 74 69 6f 6e 29 | 20 6f 66 20 74 68 65 20 |osition)| of the |
|000055b0| 73 65 6c 65 63 74 65 64 | 20 73 74 72 69 6e 67 2e |selected| string.|
|000055c0| 0a 0a 5c 6d 65 6d 62 65 | 72 73 65 63 74 69 6f 6e |..\membe|rsection|
|000055d0| 7b 77 78 43 68 6f 69 63 | 65 3a 3a 47 65 74 53 74 |{wxChoic|e::GetSt|
|000055e0| 72 69 6e 67 53 65 6c 65 | 63 74 69 6f 6e 7d 0a 0a |ringSele|ction}..|
|000055f0| 5c 66 75 6e 63 7b 63 68 | 61 72 20 2a 7d 7b 47 65 |\func{ch|ar *}{Ge|
|00005600| 74 53 74 72 69 6e 67 53 | 65 6c 65 63 74 69 6f 6e |tStringS|election|
|00005610| 7d 7b 5c 76 6f 69 64 7d | 0a 0a 47 65 74 73 20 74 |}{\void}|..Gets t|
|00005620| 68 65 20 73 65 6c 65 63 | 74 65 64 20 73 74 72 69 |he selec|ted stri|
|00005630| 6e 67 2e 20 54 68 69 73 | 20 6d 75 73 74 20 62 65 |ng. This| must be|
|00005640| 20 63 6f 70 69 65 64 20 | 62 79 20 74 68 65 20 63 | copied |by the c|
|00005650| 61 6c 6c 69 6e 67 20 70 | 72 6f 67 72 61 6d 0a 69 |alling p|rogram.i|
|00005660| 66 20 6c 6f 6e 67 20 74 | 65 72 6d 20 75 73 65 20 |f long t|erm use |
|00005670| 69 73 20 74 6f 20 62 65 | 20 6d 61 64 65 20 6f 66 |is to be| made of|
|00005680| 20 69 74 2e 0a 0a 5c 6d | 65 6d 62 65 72 73 65 63 | it...\m|embersec|
|00005690| 74 69 6f 6e 7b 77 78 43 | 68 6f 69 63 65 3a 3a 53 |tion{wxC|hoice::S|
|000056a0| 65 74 53 65 6c 65 63 74 | 69 6f 6e 7d 0a 0a 5c 66 |etSelect|ion}..\f|
|000056b0| 75 6e 63 7b 76 6f 69 64 | 7d 7b 53 65 74 53 65 6c |unc{void|}{SetSel|
|000056c0| 65 63 74 69 6f 6e 7d 7b | 5c 70 61 72 61 6d 7b 69 |ection}{|\param{i|
|000056d0| 6e 74 7d 7b 20 6e 7d 7d | 0a 0a 53 65 74 73 20 74 |nt}{ n}}|..Sets t|
|000056e0| 68 65 20 63 68 6f 69 63 | 65 20 62 79 20 70 61 73 |he choic|e by pas|
|000056f0| 73 69 6e 67 20 74 68 65 | 20 64 65 73 69 72 65 64 |sing the| desired|
|00005700| 20 73 74 72 69 6e 67 20 | 70 6f 73 69 74 69 6f 6e | string |position|
|00005710| 2e 0a 0a 5c 6d 65 6d 62 | 65 72 73 65 63 74 69 6f |...\memb|ersectio|
|00005720| 6e 7b 77 78 43 68 6f 69 | 63 65 3a 3a 53 65 74 53 |n{wxChoi|ce::SetS|
|00005730| 74 72 69 6e 67 53 65 6c | 65 63 74 69 6f 6e 7d 0a |tringSel|ection}.|
|00005740| 0a 5c 66 75 6e 63 7b 76 | 6f 69 64 7d 7b 53 65 74 |.\func{v|oid}{Set|
|00005750| 53 74 72 69 6e 67 53 65 | 6c 65 63 74 69 6f 6e 7d |StringSe|lection}|
|00005760| 7b 5c 70 61 72 61 6d 7b | 63 68 61 72 20 2a 7d 7b |{\param{|char *}{|
|00005770| 20 73 7d 7d 0a 0a 53 65 | 74 73 20 74 68 65 20 63 | s}}..Se|ts the c|
|00005780| 68 6f 69 63 65 20 62 79 | 20 70 61 73 73 69 6e 67 |hoice by| passing|
|00005790| 20 74 68 65 20 64 65 73 | 69 72 65 64 20 73 74 72 | the des|ired str|
|000057a0| 69 6e 67 2e 0a 0a 5c 6d | 65 6d 62 65 72 73 65 63 |ing...\m|embersec|
|000057b0| 74 69 6f 6e 7b 77 78 43 | 68 6f 69 63 65 3a 3a 53 |tion{wxC|hoice::S|
|000057c0| 74 72 69 6e 67 7d 0a 0a | 5c 66 75 6e 63 7b 63 68 |tring}..|\func{ch|
|000057d0| 61 72 20 2a 7d 7b 53 74 | 72 69 6e 67 7d 7b 5c 70 |ar *}{St|ring}{\p|
|000057e0| 61 72 61 6d 7b 69 6e 74 | 7d 7b 20 6e 7d 7d 0a 0a |aram{int|}{ n}}..|
|000057f0| 52 65 74 75 72 6e 73 20 | 61 20 74 65 6d 70 6f 72 |Returns |a tempor|
|00005800| 61 72 79 20 70 6f 69 6e | 74 65 72 20 74 6f 20 74 |ary poin|ter to t|
|00005810| 68 65 20 73 74 72 69 6e | 67 20 61 74 20 70 6f 73 |he strin|g at pos|
|00005820| 69 74 69 6f 6e 20 7b 5c | 69 74 20 6e 7d 2e 0a 0a |ition {\|it n}...|
|00005830| 5c 73 65 63 74 69 6f 6e | 7b 5c 63 6c 61 73 73 7b |\section|{\class{|
|00005840| 77 78 43 6c 69 65 6e 74 | 7d 3a 20 77 78 49 50 43 |wxClient|}: wxIPC|
|00005850| 4f 62 6a 65 63 74 7d 0a | 0a 41 20 77 78 43 6c 69 |Object}.|.A wxCli|
|00005860| 65 6e 74 20 6f 62 6a 65 | 63 74 20 72 65 70 72 65 |ent obje|ct repre|
|00005870| 73 65 6e 74 73 20 74 68 | 65 20 63 6c 69 65 6e 74 |sents th|e client|
|00005880| 20 70 61 72 74 20 6f 66 | 20 61 20 63 6c 69 65 6e | part of| a clien|
|00005890| 74 2d 73 65 72 76 65 72 | 20 44 44 45 0a 28 44 79 |t-server| DDE.(Dy|
|000058a0| 6e 61 6d 69 63 20 44 61 | 74 61 20 45 78 63 68 61 |namic Da|ta Excha|
|000058b0| 6e 67 65 29 20 63 6f 6e | 76 65 72 73 61 74 69 6f |nge) con|versatio|
|000058c0| 6e 20 28 61 76 61 69 6c | 61 62 6c 65 20 69 6e 20 |n (avail|able in |
|000058d0| 7b 5c 69 74 20 62 6f 74 | 68 7d 5c 2f 0a 57 69 6e |{\it bot|h}\/.Win|
|000058e0| 64 6f 77 73 20 61 6e 64 | 20 55 4e 49 58 29 2e 20 |dows and| UNIX). |
|000058f0| 5c 68 65 6c 70 69 67 6e | 6f 72 65 7b 53 65 65 20 |\helpign|ore{See |
|00005900| 73 65 63 74 69 6f 6e 20 | 5c 72 65 66 7b 69 70 63 |section |\ref{ipc|
|00005910| 7d 2e 7d 0a 0a 5c 6d 65 | 6d 62 65 72 73 65 63 74 |}.}..\me|mbersect|
|00005920| 69 6f 6e 7b 77 78 43 6c | 69 65 6e 74 3a 3a 77 78 |ion{wxCl|ient::wx|
|00005930| 43 6c 69 65 6e 74 7d 0a | 0a 5c 66 75 6e 63 7b 76 |Client}.|.\func{v|
|00005940| 6f 69 64 7d 7b 77 78 43 | 6c 69 65 6e 74 7d 7b 5c |oid}{wxC|lient}{\|
|00005950| 76 6f 69 64 7d 0a 0a 43 | 6f 6e 73 74 72 75 63 74 |void}..C|onstruct|
|00005960| 73 20 61 20 63 6c 69 65 | 6e 74 20 6f 62 6a 65 63 |s a clie|nt objec|
|00005970| 74 2e 0a 0a 5c 6d 65 6d | 62 65 72 73 65 63 74 69 |t...\mem|bersecti|
|00005980| 6f 6e 7b 77 78 43 6c 69 | 65 6e 74 3a 3a 4d 61 6b |on{wxCli|ent::Mak|
|00005990| 65 43 6f 6e 6e 65 63 74 | 69 6f 6e 7d 0a 0a 5c 66 |eConnect|ion}..\f|
|000059a0| 75 6e 63 7b 77 78 43 6f | 6e 6e 65 63 74 69 6f 6e |unc{wxCo|nnection|
|000059b0| 20 2a 7d 7b 4d 61 6b 65 | 43 6f 6e 6e 65 63 74 69 | *}{Make|Connecti|
|000059c0| 6f 6e 7d 7b 5c 70 61 72 | 61 6d 7b 63 68 61 72 20 |on}{\par|am{char |
|000059d0| 2a 7d 7b 68 6f 73 74 7d | 2c 20 5c 70 61 72 61 6d |*}{host}|, \param|
|000059e0| 7b 63 68 61 72 20 2a 7d | 7b 73 65 72 76 69 63 65 |{char *}|{service|
|000059f0| 7d 2c 20 5c 70 61 72 61 | 6d 7b 63 68 61 72 20 2a |}, \para|m{char *|
|00005a00| 7d 7b 74 6f 70 69 63 7d | 7d 0a 0a 54 72 69 65 73 |}{topic}|}..Tries|
|00005a10| 20 74 6f 20 6d 61 6b 65 | 20 61 20 63 6f 6e 6e 65 | to make| a conne|
|00005a20| 63 74 69 6f 6e 20 77 69 | 74 68 20 61 20 73 65 72 |ction wi|th a ser|
|00005a30| 76 65 72 20 73 70 65 63 | 69 66 69 65 64 20 62 79 |ver spec|ified by|
|00005a40| 20 74 68 65 20 68 6f 73 | 74 0a 28 6d 61 63 68 69 | the hos|t.(machi|
|00005a50| 6e 65 20 6e 61 6d 65 20 | 75 6e 64 65 72 20 55 4e |ne name |under UN|
|00005a60| 49 58 2c 20 69 67 6e 6f | 72 65 64 20 75 6e 64 65 |IX, igno|red unde|
|00005a70| 72 20 57 69 6e 64 6f 77 | 73 29 2c 20 73 65 72 76 |r Window|s), serv|
|00005a80| 69 63 65 20 6e 61 6d 65 | 20 28 6d 75 73 74 0a 63 |ice name| (must.c|
|00005a90| 6f 6e 74 61 69 6e 20 61 | 6e 20 69 6e 74 65 67 65 |ontain a|n intege|
|00005aa0| 72 20 70 6f 72 74 20 6e | 75 6d 62 65 72 20 75 6e |r port n|umber un|
|00005ab0| 64 65 72 20 55 4e 49 58 | 29 2c 20 61 6e 64 20 74 |der UNIX|), and t|
|00005ac0| 6f 70 69 63 20 73 74 72 | 69 6e 67 2e 20 49 66 20 |opic str|ing. If |
|00005ad0| 74 68 65 0a 73 65 72 76 | 65 72 20 61 6c 6c 6f 77 |the.serv|er allow|
|00005ae0| 73 20 61 20 63 6f 6e 6e | 65 63 74 69 6f 6e 2c 20 |s a conn|ection, |
|00005af0| 61 20 77 78 43 6f 6e 6e | 65 63 74 69 6f 6e 20 6f |a wxConn|ection o|
|00005b00| 62 6a 65 63 74 20 77 69 | 6c 6c 20 62 65 20 72 65 |bject wi|ll be re|
|00005b10| 74 75 72 6e 65 64 2e 0a | 54 68 65 20 74 79 70 65 |turned..|The type|
|00005b20| 20 6f 66 20 77 78 43 6f | 6e 6e 65 63 74 69 6f 6e | of wxCo|nnection|
|00005b30| 20 72 65 74 75 72 6e 65 | 64 20 63 61 6e 20 62 65 | returne|d can be|
|00005b40| 20 61 6c 74 65 72 65 64 | 20 62 79 20 64 65 72 69 | altered| by deri|
|00005b50| 76 69 6e 67 20 74 68 65 | 20 7b 5c 62 66 0a 4f 6e |ving the| {\bf.On|
|00005b60| 4d 61 6b 65 43 6f 6e 6e | 65 63 74 69 6f 6e 7d 20 |MakeConn|ection} |
|00005b70| 6d 65 6d 62 65 72 20 74 | 6f 20 72 65 74 75 72 6e |member t|o return|
|00005b80| 20 79 6f 75 72 20 6f 77 | 6e 20 64 65 72 69 76 65 | your ow|n derive|
|00005b90| 64 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 6f 62 6a |d connec|tion obj|
|00005ba0| 65 63 74 2e 0a 0a 5c 6d | 65 6d 62 65 72 73 65 63 |ect...\m|embersec|
|00005bb0| 74 69 6f 6e 7b 77 78 43 | 6c 69 65 6e 74 3a 3a 4f |tion{wxC|lient::O|
|00005bc0| 6e 4d 61 6b 65 43 6f 6e | 6e 65 63 74 69 6f 6e 7d |nMakeCon|nection}|
|00005bd0| 0a 0a 5c 66 75 6e 63 7b | 77 78 43 6f 6e 6e 65 63 |..\func{|wxConnec|
|00005be0| 74 69 6f 6e 20 2a 7d 7b | 4f 6e 4d 61 6b 65 43 6f |tion *}{|OnMakeCo|
|00005bf0| 6e 6e 65 63 74 69 6f 6e | 7d 7b 5c 76 6f 69 64 7d |nnection|}{\void}|
|00005c00| 0a 0a 54 68 65 20 74 79 | 70 65 20 6f 66 20 77 78 |..The ty|pe of wx|
|00005c10| 43 6f 6e 6e 65 63 74 69 | 6f 6e 20 72 65 74 75 72 |Connecti|on retur|
|00005c20| 6e 65 64 20 66 72 6f 6d | 20 61 20 7b 5c 62 66 20 |ned from| a {\bf |
|00005c30| 4d 61 6b 65 43 6f 6e 6e | 65 63 74 69 6f 6e 7d 20 |MakeConn|ection} |
|00005c40| 63 61 6c 6c 20 63 61 6e | 0a 62 65 20 61 6c 74 65 |call can|.be alte|
|00005c50| 72 65 64 20 62 79 20 64 | 65 72 69 76 69 6e 67 20 |red by d|eriving |
|00005c60| 74 68 65 20 7b 5c 62 66 | 20 4f 6e 4d 61 6b 65 43 |the {\bf| OnMakeC|
|00005c70| 6f 6e 6e 65 63 74 69 6f | 6e 7d 20 6d 65 6d 62 65 |onnectio|n} membe|
|00005c80| 72 20 74 6f 20 72 65 74 | 75 72 6e 20 79 6f 75 72 |r to ret|urn your|
|00005c90| 0a 6f 77 6e 20 64 65 72 | 69 76 65 64 20 63 6f 6e |.own der|ived con|
|00005ca0| 6e 65 63 74 69 6f 6e 20 | 6f 62 6a 65 63 74 2e 20 |nection |object. |
|00005cb0| 42 79 20 64 65 66 61 75 | 6c 74 2c 20 61 6e 20 6f |By defau|lt, an o|
|00005cc0| 72 64 69 6e 61 72 79 20 | 77 78 43 6f 6e 6e 65 63 |rdinary |wxConnec|
|00005cd0| 74 69 6f 6e 0a 6f 62 6a | 65 63 74 20 69 73 20 72 |tion.obj|ect is r|
|00005ce0| 65 74 75 72 6e 65 64 2e | 0a 0a 5c 73 65 63 74 69 |eturned.|..\secti|
|00005cf0| 6f 6e 7b 5c 63 6c 61 73 | 73 7b 77 78 43 6f 6c 6f |on{\clas|s{wxColo|
|00005d00| 75 72 7d 3a 20 77 78 4f | 62 6a 65 63 74 7d 0a 0a |ur}: wxO|bject}..|
|00005d10| 41 20 63 6f 6c 6f 75 72 | 20 69 73 20 61 6e 20 6f |A colour| is an o|
|00005d20| 62 6a 65 63 74 20 72 65 | 70 72 65 73 65 6e 74 69 |bject re|presenti|
|00005d30| 6e 67 20 61 20 52 65 64 | 2c 20 47 72 65 65 6e 2c |ng a Red|, Green,|
|00005d40| 20 42 6c 75 65 20 28 52 | 47 42 29 20 63 6f 6d 62 | Blue (R|GB) comb|
|00005d50| 69 6e 61 74 69 6f 6e 0a | 6f 66 20 70 72 69 6d 61 |ination.|of prima|
|00005d60| 72 79 20 63 6f 6c 6f 75 | 72 73 2c 20 61 6e 64 20 |ry colou|rs, and |
|00005d70| 69 73 20 75 73 65 64 20 | 74 6f 20 64 65 74 65 72 |is used |to deter|
|00005d80| 6d 69 6e 65 20 64 72 61 | 77 69 6e 67 20 63 6f 6c |mine dra|wing col|
|00005d90| 6f 75 72 73 2e 20 53 65 | 65 20 74 68 65 0a 65 6e |ours. Se|e the.en|
|00005da0| 74 72 79 20 66 6f 72 20 | 5c 68 65 6c 70 72 65 66 |try for |\helpref|
|00005db0| 7b 77 78 43 6f 6c 6f 75 | 72 44 61 74 61 62 61 73 |{wxColou|rDatabas|
|00005dc0| 65 7d 20 66 6f 72 20 68 | 6f 77 20 61 20 70 6f 69 |e} for h|ow a poi|
|00005dd0| 6e 74 65 72 20 74 6f 20 | 61 20 70 72 65 64 65 66 |nter to |a predef|
|00005de0| 69 6e 65 64 2c 0a 6e 61 | 6d 65 64 20 63 6f 6c 6f |ined,.na|med colo|
|00005df0| 75 72 20 6d 61 79 20 62 | 65 20 72 65 74 75 72 6e |ur may b|e return|
|00005e00| 65 64 20 69 6e 73 74 65 | 61 64 20 6f 66 20 63 72 |ed inste|ad of cr|
|00005e10| 65 61 74 69 6e 67 20 61 | 20 6e 65 77 20 63 6f 6c |eating a| new col|
|00005e20| 6f 75 72 2e 0a 0a 5c 6d | 65 6d 62 65 72 73 65 63 |our...\m|embersec|
|00005e30| 74 69 6f 6e 7b 77 78 43 | 6f 6c 6f 75 72 3a 3a 77 |tion{wxC|olour::w|
|00005e40| 78 43 6f 6c 6f 75 72 7d | 0a 0a 5c 66 75 6e 63 7b |xColour}|..\func{|
|00005e50| 76 6f 69 64 7d 7b 77 78 | 43 6f 6c 6f 75 72 7d 7b |void}{wx|Colour}{|
|00005e60| 5c 70 61 72 61 6d 7b 63 | 68 61 72 7d 7b 20 72 65 |\param{c|har}{ re|
|00005e70| 64 7d 2c 20 5c 70 61 72 | 61 6d 7b 63 68 61 72 7d |d}, \par|am{char}|
|00005e80| 7b 20 67 72 65 65 6e 7d | 2c 20 5c 70 61 72 61 6d |{ green}|, \param|
|00005e90| 7b 63 68 61 72 7d 7b 20 | 62 6c 75 65 7d 7d 0a 0a |{char}{ |blue}}..|
|00005ea0| 5c 66 75 6e 63 7b 76 6f | 69 64 7d 7b 77 78 43 6f |\func{vo|id}{wxCo|
|00005eb0| 6c 6f 75 72 7d 7b 5c 70 | 61 72 61 6d 7b 63 68 61 |lour}{\p|aram{cha|
|00005ec0| 72 20 2a 7d 7b 20 63 6f | 6c 6f 75 72 5c 5f 6e 61 |r *}{ co|lour\_na|
|00005ed0| 6d 65 7d 7d 0a 0a 43 6f | 6e 73 74 72 75 63 74 20 |me}}..Co|nstruct |
|00005ee0| 61 20 63 6f 6c 6f 75 72 | 20 6f 62 6a 65 63 74 20 |a colour| object |
|00005ef0| 66 72 6f 6d 20 74 68 65 | 20 52 47 42 20 76 61 6c |from the| RGB val|
|00005f00| 75 65 73 20 6f 72 20 75 | 73 69 6e 67 20 61 20 63 |ues or u|sing a c|
|00005f10| 6f 6c 6f 75 72 20 6e 61 | 6d 65 0a 28 75 73 65 73 |olour na|me.(uses|
|00005f20| 20 7b 5c 62 66 20 77 78 | 54 68 65 43 6f 6c 6f 75 | {\bf wx|TheColou|
|00005f30| 72 44 61 74 61 62 61 73 | 65 7d 29 2e 0a 0a 5c 6d |rDatabas|e})...\m|
|00005f40| 65 6d 62 65 72 73 65 63 | 74 69 6f 6e 7b 77 78 43 |embersec|tion{wxC|
|00005f50| 6f 6c 6f 75 72 3a 3a 47 | 65 74 7d 0a 0a 5c 66 75 |olour::G|et}..\fu|
|00005f60| 6e 63 7b 76 6f 69 64 7d | 7b 47 65 74 7d 7b 5c 70 |nc{void}|{Get}{\p|
|00005f70| 61 72 61 6d 7b 63 68 61 | 72 20 2a 7d 7b 20 72 65 |aram{cha|r *}{ re|
|00005f80| 64 7d 2c 20 5c 70 61 72 | 61 6d 7b 63 68 61 72 20 |d}, \par|am{char |
|00005f90| 2a 7d 7b 20 67 72 65 65 | 6e 7d 2c 20 5c 70 61 72 |*}{ gree|n}, \par|
|00005fa0| 61 6d 7b 63 68 61 72 20 | 2a 7d 7b 20 62 6c 75 65 |am{char |*}{ blue|
|00005fb0| 7d 7d 0a 0a 47 65 74 73 | 20 74 68 65 20 52 47 42 |}}..Gets| the RGB|
|00005fc0| 20 76 61 6c 75 65 73 20 | 2d 20 70 61 73 73 20 70 | values |- pass p|
|00005fd0| 6f 69 6e 74 65 72 73 20 | 74 6f 20 74 68 72 65 65 |ointers |to three|
|00005fe0| 20 63 68 61 72 20 76 61 | 72 69 61 62 6c 65 73 2e | char va|riables.|
|00005ff0| 0a 0a 5c 6d 65 6d 62 65 | 72 73 65 63 74 69 6f 6e |..\membe|rsection|
|00006000| 7b 77 78 43 6f 6c 6f 75 | 72 3a 3a 53 65 74 7d 0a |{wxColou|r::Set}.|
|00006010| 0a 5c 66 75 6e 63 7b 76 | 6f 69 64 7d 7b 53 65 74 |.\func{v|oid}{Set|
|00006020| 7d 7b 5c 70 61 72 61 6d | 7b 63 68 61 72 7d 7b 20 |}{\param|{char}{ |
|00006030| 72 65 64 7d 2c 20 5c 70 | 61 72 61 6d 7b 63 68 61 |red}, \p|aram{cha|
|00006040| 72 7d 7b 20 67 72 65 65 | 6e 7d 2c 20 5c 70 61 72 |r}{ gree|n}, \par|
|00006050| 61 6d 7b 63 68 61 72 7d | 7b 20 62 6c 75 65 7d 7d |am{char}|{ blue}}|
|00006060| 0a 0a 53 65 74 73 20 74 | 68 65 20 52 47 42 20 76 |..Sets t|he RGB v|
|00006070| 61 6c 75 65 2e 0a 0a 5c | 73 65 63 74 69 6f 6e 7b |alue...\|section{|
|00006080| 5c 63 6c 61 73 73 7b 77 | 78 43 6f 6c 6f 75 72 44 |\class{w|xColourD|
|00006090| 61 74 61 62 61 73 65 7d | 3a 20 77 78 4f 62 6a 65 |atabase}|: wxObje|
|000060a0| 63 74 7d 0a 0a 77 78 57 | 69 6e 64 6f 77 73 20 6d |ct}..wxW|indows m|
|000060b0| 61 69 6e 74 61 69 6e 73 | 20 61 20 64 61 74 61 62 |aintains| a datab|
|000060c0| 61 73 65 20 6f 66 20 73 | 74 61 6e 64 61 72 64 20 |ase of s|tandard |
|000060d0| 52 47 42 20 63 6f 6c 6f | 75 72 73 20 66 6f 72 20 |RGB colo|urs for |
|000060e0| 61 20 70 72 65 64 65 66 | 69 6e 65 64 0a 73 65 74 |a predef|ined.set|
|000060f0| 20 6f 66 20 6e 61 6d 65 | 64 20 63 6f 6c 6f 75 72 | of name|d colour|
|00006100| 73 20 28 73 75 63 68 20 | 61 73 20 60 60 42 4c 41 |s (such |as ``BLA|
|00006110| 43 4b 27 27 2c 20 60 60 | 4c 49 47 48 54 20 47 52 |CK'', ``|LIGHT GR|
|00006120| 45 59 27 27 29 2e 20 54 | 68 65 0a 61 70 70 6c 69 |EY''). T|he.appli|
|00006130| 63 61 74 69 6f 6e 20 6d | 61 79 20 61 64 64 20 74 |cation m|ay add t|
|00006140| 6f 20 74 68 69 73 20 73 | 65 74 20 69 66 20 64 65 |o this s|et if de|
|00006150| 73 69 72 65 64 20 62 79 | 20 75 73 69 6e 67 20 7b |sired by| using {|
|00006160| 5c 69 74 20 41 70 70 65 | 6e 64 7d 2e 20 20 54 68 |\it Appe|nd}. Th|
|00006170| 65 72 65 0a 69 73 20 6f | 6e 6c 79 20 6f 6e 65 20 |ere.is o|nly one |
|00006180| 69 6e 73 74 61 6e 63 65 | 20 6f 66 20 74 68 69 73 |instance| of this|
|00006190| 20 63 6c 61 73 73 3a 20 | 7b 5c 62 66 20 77 78 54 | class: |{\bf wxT|
|000061a0| 68 65 43 6f 6c 6f 75 72 | 44 61 74 61 62 61 73 65 |heColour|Database|
|000061b0| 7d 2e 0a 0a 54 68 65 20 | 63 6f 6c 6f 75 72 73 20 |}...The |colours |
|000061c0| 69 6e 20 74 68 65 20 73 | 74 61 6e 64 61 72 64 20 |in the s|tandard |
|000061d0| 64 61 74 61 62 61 73 65 | 20 61 72 65 20 61 73 20 |database| are as |
|000061e0| 66 6f 6c 6c 6f 77 73 3a | 0a 0a 41 51 55 41 4d 41 |follows:|..AQUAMA|
|000061f0| 52 49 4e 45 2c 20 42 4c | 41 43 4b 2c 20 42 4c 55 |RINE, BL|ACK, BLU|
|00006200| 45 2c 20 42 4c 55 45 20 | 56 49 4f 4c 45 54 2c 20 |E, BLUE |VIOLET, |
|00006210| 42 52 4f 57 4e 2c 20 43 | 41 44 45 54 20 42 4c 55 |BROWN, C|ADET BLU|
|00006220| 45 2c 20 43 4f 52 41 4c | 2c 0a 43 4f 52 4e 46 4c |E, CORAL|,.CORNFL|
|00006230| 4f 57 45 52 20 42 4c 55 | 45 2c 20 43 59 41 4e 2c |OWER BLU|E, CYAN,|
|00006240| 20 44 41 52 4b 20 47 52 | 45 59 2c 20 44 41 52 4b | DARK GR|EY, DARK|
|00006250| 20 47 52 45 45 4e 2c 20 | 44 41 52 4b 20 4f 4c 49 | GREEN, |DARK OLI|
|00006260| 56 45 20 47 52 45 45 4e | 2c 20 44 41 52 4b 0a 4f |VE GREEN|, DARK.O|
|00006270| 52 43 48 49 44 2c 20 44 | 41 52 4b 20 53 4c 41 54 |RCHID, D|ARK SLAT|
|00006280| 45 20 42 4c 55 45 2c 20 | 44 41 52 4b 20 53 4c 41 |E BLUE, |DARK SLA|
|00006290| 54 45 20 47 52 45 59 20 | 44 41 52 4b 20 54 55 52 |TE GREY |DARK TUR|
|000062a0| 51 55 4f 49 53 45 2c 20 | 44 49 4d 20 47 52 45 59 |QUOISE, |DIM GREY|
|000062b0| 2c 0a 46 49 52 45 42 52 | 49 43 4b 2c 20 46 4f 52 |,.FIREBR|ICK, FOR|
|000062c0| 45 53 54 20 47 52 45 45 | 4e 2c 20 47 4f 4c 44 2c |EST GREE|N, GOLD,|
|000062d0| 20 47 4f 4c 44 45 4e 52 | 4f 44 2c 20 47 52 45 59 | GOLDENR|OD, GREY|
|000062e0| 2c 20 47 52 45 45 4e 2c | 20 47 52 45 45 4e 20 59 |, GREEN,| GREEN Y|
|000062f0| 45 4c 4c 4f 57 2c 0a 49 | 4e 44 49 41 4e 20 52 45 |ELLOW,.I|NDIAN RE|
|00006300| 44 2c 20 4b 48 41 4b 49 | 2c 20 4c 49 47 48 54 20 |D, KHAKI|, LIGHT |
|00006310| 42 4c 55 45 2c 20 4c 49 | 47 48 54 20 47 52 45 59 |BLUE, LI|GHT GREY|
|00006320| 2c 20 4c 49 47 48 54 20 | 53 54 45 45 4c 20 42 4c |, LIGHT |STEEL BL|
|00006330| 55 45 2c 20 4c 49 4d 45 | 20 47 52 45 45 4e 2c 0a |UE, LIME| GREEN,.|
|00006340| 4d 41 47 45 4e 54 41 2c | 20 4d 41 52 4f 4f 4e 2c |MAGENTA,| MAROON,|
|00006350| 20 4d 45 44 49 55 4d 20 | 41 51 55 41 4d 41 52 49 | MEDIUM |AQUAMARI|
|00006360| 4e 45 2c 20 4d 45 44 49 | 55 4d 20 42 4c 55 45 2c |NE, MEDI|UM BLUE,|
|00006370| 20 4d 45 44 49 55 4d 20 | 46 4f 52 45 53 54 20 47 | MEDIUM |FOREST G|
|00006380| 52 45 45 4e 2c 0a 4d 45 | 44 49 55 4d 20 47 4f 4c |REEN,.ME|DIUM GOL|
|00006390| 44 45 4e 52 4f 44 2c 20 | 4d 45 44 49 55 4d 20 4f |DENROD, |MEDIUM O|
|000063a0| 52 43 48 49 44 2c 20 4d | 45 44 49 55 4d 20 53 45 |RCHID, M|EDIUM SE|
|000063b0| 41 20 47 52 45 45 4e 2c | 20 4d 45 44 49 55 4d 20 |A GREEN,| MEDIUM |
|000063c0| 53 4c 41 54 45 20 42 4c | 55 45 2c 0a 4d 45 44 49 |SLATE BL|UE,.MEDI|
|000063d0| 55 4d 20 53 50 52 49 4e | 47 20 47 52 45 45 4e 2c |UM SPRIN|G GREEN,|
|000063e0| 20 4d 45 44 49 55 4d 20 | 54 55 52 51 55 4f 49 53 | MEDIUM |TURQUOIS|
|000063f0| 45 2c 20 4d 45 44 49 55 | 4d 20 56 49 4f 4c 45 54 |E, MEDIU|M VIOLET|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.