%! %%BoundingBox: (atend) %%Pages: (atend) %%DocumentFonts: (atend) %%EndComments %%BeginProlog % % FrameMaker postscript_prolog 3.0, for use with FrameMaker 3.0 % This postscript_prolog file is Copyright (c) 1986-1991 Frame Technology % Corporation. All rights reserved. This postscript_prolog file may be % freely copied and distributed in conjunction with documents created using % FrameMaker. % NOTE % This file fixes the problem with NeWS printers dithering color output. % Any questions should be sent to mickey@magickingdom.eng.sun.com % % Known Problems: % Due to bugs in Transcript, the 'PS-Adobe-' is omitted from line 1 /FMversion (3.0) def % Set up Color vs. Black-and-White /FMPrintInColor { % once-thru loop gimmick % See if we're a NeWSprint printer /currentcanvas where { pop systemdict /separationdict known exit } if % originally had the following, which should always be false: % /currentcanvas where { % pop currentcanvas /Color known { % currentcanvas /Color get % exit % } if % } if systemdict /colorimage known systemdict /currentcolortransfer known and exit } loop def % Uncomment the following line to force b&w on color printer % /FMPrintInColor false def /FrameDict 195 dict def systemdict /errordict known not {/errordict 10 dict def errordict /rangecheck {stop} put} if % The readline in 23.0 doesn't recognize cr's as nl's on AppleTalk FrameDict /tmprangecheck errordict /rangecheck get put errordict /rangecheck {FrameDict /bug true put} put FrameDict /bug false put mark % Some PS machines read past the CR, so keep the following 3 lines together! currentfile 5 string readline 00 0000000000 cleartomark errordict /rangecheck FrameDict /tmprangecheck get put FrameDict /bug get { /readline { /gstring exch def /gfile exch def /gindex 0 def { gfile read pop dup 10 eq {exit} if dup 13 eq {exit} if gstring exch gindex exch put /gindex gindex 1 add def } loop pop gstring 0 gindex getinterval true } def } if /FMVERSION { FMversion ne { /Times-Roman findfont 18 scalefont setfont 100 100 moveto (FrameMaker version does not match postscript_prolog!) dup = show showpage } if } def /FMLOCAL { FrameDict begin 0 def end } def /gstring FMLOCAL /gfile FMLOCAL /gindex FMLOCAL /orgxfer FMLOCAL /orgproc FMLOCAL /organgle FMLOCAL /orgfreq FMLOCAL /yscale FMLOCAL /xscale FMLOCAL /manualfeed FMLOCAL /paperheight FMLOCAL /paperwidth FMLOCAL /FMDOCUMENT { array /FMfonts exch def /#copies exch def FrameDict begin 0 ne dup {setmanualfeed} if /manualfeed exch def /paperheight exch def /paperwidth exch def /yscale exch def /xscale exch def currenttransfer cvlit /orgxfer exch def currentscreen cvlit /orgproc exch def /organgle exch def /orgfreq exch def setpapername manualfeed {true} {papersize} ifelse {manualpapersize} {false} ifelse {desperatepapersize} if end } def /pagesave FMLOCAL /orgmatrix FMLOCAL /landscape FMLOCAL /FMBEGINPAGE { FrameDict begin /pagesave save def 3.86 setmiterlimit /landscape exch 0 ne def landscape { 90 rotate 0 exch neg translate pop } {pop pop} ifelse xscale yscale scale /orgmatrix matrix def gsave } def /FMENDPAGE { grestore pagesave restore end showpage } def /FMFONTDEFINE { FrameDict begin findfont ReEncode 1 index exch definefont FMfonts 3 1 roll put end } def /FMFILLS { FrameDict begin array /fillvals exch def end } def /FMFILL { FrameDict begin fillvals 3 1 roll put end } def /FMNORMALIZEGRAPHICS { newpath 0.0 0.0 moveto 1 setlinewidth 0 setlinecap 0 0 0 sethsbcolor 0 setgray } bind def /fx FMLOCAL /fy FMLOCAL /fh FMLOCAL /fw FMLOCAL /llx FMLOCAL /lly FMLOCAL /urx FMLOCAL /ury FMLOCAL /FMBEGINEPSF { end /FMEPSF save def /showpage {} def FMNORMALIZEGRAPHICS [/fy /fx /fh /fw /ury /urx /lly /llx] {exch def} forall fx fy translate rotate fw urx llx sub div fh ury lly sub div scale llx neg lly neg translate } bind def /FMENDEPSF { FMEPSF restore FrameDict begin } bind def FrameDict begin /setmanualfeed { %%BeginFeature *ManualFeed True statusdict /manualfeed true put %%EndFeature } def /max {2 copy lt {exch} if pop} bind def /min {2 copy gt {exch} if pop} bind def /inch {72 mul} def /pagedimen { paperheight sub abs 16 lt exch paperwidth sub abs 16 lt and {/papername exch def} {pop} ifelse } def /papersizedict FMLOCAL /setpapername { /papersizedict 14 dict def papersizedict begin /papername /unknown def /Letter 8.5 inch 11.0 inch pagedimen /LetterSmall 7.68 inch 10.16 inch pagedimen /Tabloid 11.0 inch 17.0 inch pagedimen /Ledger 17.0 inch 11.0 inch pagedimen /Legal 8.5 inch 14.0 inch pagedimen /Statement 5.5 inch 8.5 inch pagedimen /Executive 7.5 inch 10.0 inch pagedimen /A3 11.69 inch 16.5 inch pagedimen /A4 8.26 inch 11.69 inch pagedimen /A4Small 7.47 inch 10.85 inch pagedimen /B4 10.125 inch 14.33 inch pagedimen /B5 7.16 inch 10.125 inch pagedimen end } def /papersize { papersizedict begin /Letter {lettertray letter} def /LetterSmall {lettertray lettersmall} def /Tabloid {11x17tray 11x17} def /Ledger {ledgertray ledger} def /Legal {legaltray legal} def /Statement {statementtray statement} def /Executive {executivetray executive} def /A3 {a3tray a3} def /A4 {a4tray a4} def /A4Small {a4tray a4small} def /B4 {b4tray b4} def /B5 {b5tray b5} def /unknown {unknown} def papersizedict dup papername known {papername} {/unknown} ifelse get end /FMdicttop countdictstack 1 add def statusdict begin stopped end countdictstack -1 FMdicttop {pop end} for } def /manualpapersize { papersizedict begin /Letter {letter} def /LetterSmall {lettersmall} def /Tabloid {11x17} def /Ledger {ledger} def /Legal {legal} def /Statement {statement} def /Executive {executive} def /A3 {a3} def /A4 {a4} def /A4Small {a4small} def /B4 {b4} def /B5 {b5} def /unknown {unknown} def papersizedict dup papername known {papername} {/unknown} ifelse get end stopped } def /desperatepapersize { statusdict /setpageparams known { paperwidth paperheight 0 1 statusdict begin {setpageparams} stopped pop end } if } def /savematrix { orgmatrix currentmatrix pop } bind def /restorematrix { orgmatrix setmatrix } bind def /dmatrix matrix def /dpi 72 0 dmatrix defaultmatrix dtransform dup mul exch dup mul add sqrt def /freq dpi 18.75 div 8 div round dup 0 eq {pop 1} if 8 mul dpi exch div def /sangle 1 0 dmatrix defaultmatrix dtransform exch atan def /DiacriticEncoding [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quotesingle /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /grave /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /Adieresis /Aring /Ccedilla /Eacute /Ntilde /Odieresis /Udieresis /aacute /agrave /acircumflex /adieresis /atilde /aring /ccedilla /eacute /egrave /ecircumflex /edieresis /iacute /igrave /icircumflex /idieresis /ntilde /oacute /ograve /ocircumflex /odieresis /otilde /uacute /ugrave /ucircumflex /udieresis /dagger /.notdef /cent /sterling /section /bullet /paragraph /germandbls /registered /copyright /trademark /acute /dieresis /.notdef /AE /Oslash /.notdef /.notdef /.notdef /.notdef /yen /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /ordfeminine /ordmasculine /.notdef /ae /oslash /questiondown /exclamdown /logicalnot /.notdef /florin /.notdef /.notdef /guillemotleft /guillemotright /ellipsis /.notdef /Agrave /Atilde /Otilde /OE /oe /endash /emdash /quotedblleft /quotedblright /quoteleft /quoteright /.notdef /.notdef /ydieresis /Ydieresis /fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl /periodcentered /quotesinglbase /quotedblbase /perthousand /Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute /Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /.notdef /Ograve /Uacute /Ucircumflex /Ugrave /dotlessi /circumflex /tilde /macron /breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron ] def /ReEncode { dup length dict begin { 1 index /FID ne {def} {pop pop} ifelse } forall 0 eq {/Encoding DiacriticEncoding def} if currentdict end } bind def /graymode true def /bwidth FMLOCAL /bpside FMLOCAL /bstring FMLOCAL /onbits FMLOCAL /offbits FMLOCAL /xindex FMLOCAL /yindex FMLOCAL /x FMLOCAL /y FMLOCAL /setpattern { /bwidth exch def /bpside exch def /bstring exch def /onbits 0 def /offbits 0 def freq sangle landscape {90 add} if {/y exch def /x exch def /xindex x 1 add 2 div bpside mul cvi def /yindex y 1 add 2 div bpside mul cvi def bstring yindex bwidth mul xindex 8 idiv add get 1 7 xindex 8 mod sub bitshift and 0 ne {/onbits onbits 1 add def 1} {/offbits offbits 1 add def 0} ifelse } setscreen {} settransfer offbits offbits onbits add div FMsetgray /graymode false def } bind def /grayness { FMsetgray graymode not { /graymode true def orgxfer cvx settransfer orgfreq organgle orgproc cvx setscreen } if } bind def /HUE FMLOCAL /SAT FMLOCAL /BRIGHT FMLOCAL /Colors FMLOCAL FMPrintInColor { /HUE 0 def /SAT 0 def /BRIGHT 0 def % array of arrays Hue and Sat values for the separations [HUE BRIGHT] /Colors [[0 0 ] % black [0 0 ] % white [0.00 1.0] % red [0.37 1.0] % green [0.60 1.0] % blue [0.50 1.0] % cyan [0.83 1.0] % magenta [0.16 1.0] % comment / yellow ] def /BEGINBITMAPCOLOR { BITMAPCOLOR} def /BEGINBITMAPCOLORc { BITMAPCOLORc} def /BEGINBITMAPTRUECOLOR { BITMAPTRUECOLOR } def /BEGINBITMAPTRUECOLORc { BITMAPTRUECOLORc } def /K { Colors exch get dup 0 get /HUE exch store 1 get /BRIGHT exch store HUE 0 eq BRIGHT 0 eq and {1.0 SAT sub setgray} {HUE SAT BRIGHT sethsbcolor} ifelse } def /FMsetgray { /SAT exch 1.0 exch sub store HUE 0 eq BRIGHT 0 eq and {1.0 SAT sub setgray} {HUE SAT BRIGHT sethsbcolor} ifelse } bind def } { /BEGINBITMAPCOLOR { BITMAPGRAY} def /BEGINBITMAPCOLORc { BITMAPGRAYc} def /BEGINBITMAPTRUECOLOR { BITMAPTRUEGRAY } def /BEGINBITMAPTRUECOLORc { BITMAPTRUEGRAYc } def /FMsetgray {setgray} bind def /K { pop } def } ifelse /normalize { transform round exch round exch itransform } bind def /dnormalize { dtransform round exch round exch idtransform } bind def /lnormalize { 0 dtransform exch cvi 2 idiv 2 mul 1 add exch idtransform pop } bind def /H { lnormalize setlinewidth } bind def /Z { setlinecap } bind def /fillvals FMLOCAL /X { fillvals exch get dup type /stringtype eq {8 1 setpattern} {grayness} ifelse } bind def /V { gsave eofill grestore } bind def /N { stroke } bind def /M {newpath moveto} bind def /E {lineto} bind def /D {curveto} bind def /O {closepath} bind def /n FMLOCAL /L { /n exch def newpath normalize moveto 2 1 n {pop normalize lineto} for } bind def /Y { L closepath } bind def /x1 FMLOCAL /x2 FMLOCAL /y1 FMLOCAL /y2 FMLOCAL /rad FMLOCAL /R { /y2 exch def /x2 exch def /y1 exch def /x1 exch def x1 y1 x2 y1 x2 y2 x1 y2 4 Y } bind def /RR { /rad exch def normalize /y2 exch def /x2 exch def normalize /y1 exch def /x1 exch def newpath x1 y1 rad add moveto x1 y2 x2 y2 rad arcto x2 y2 x2 y1 rad arcto x2 y1 x1 y1 rad arcto x1 y1 x1 y2 rad arcto closepath 16 {pop} repeat } bind def /C { grestore gsave R clip } bind def /FMpointsize FMLOCAL /F { FMfonts exch get FMpointsize scalefont setfont } bind def /Q { /FMpointsize exch def F } bind def /T { moveto show } bind def /RF { rotate 0 ne {-1 1 scale} if } bind def /TF { gsave moveto RF show grestore } bind def /P { moveto 0 32 3 2 roll widthshow } bind def /PF { gsave moveto RF 0 32 3 2 roll widthshow grestore } bind def /S { moveto 0 exch ashow } bind def /SF { gsave moveto RF 0 exch ashow grestore } bind def /B { moveto 0 32 4 2 roll 0 exch awidthshow } bind def /BF { gsave moveto RF 0 32 4 2 roll 0 exch awidthshow grestore } bind def /G { gsave newpath normalize translate 0.0 0.0 moveto dnormalize scale 0.0 0.0 1.0 5 3 roll arc closepath fill grestore } bind def /A { gsave savematrix newpath 2 index 2 div add exch 3 index 2 div sub exch normalize 2 index 2 div sub exch 3 index 2 div add exch translate scale 0.0 0.0 1.0 5 3 roll arc restorematrix stroke grestore } bind def /x FMLOCAL /y FMLOCAL /w FMLOCAL /h FMLOCAL /xx FMLOCAL /yy FMLOCAL /ww FMLOCAL /hh FMLOCAL /FMsaveobject FMLOCAL /FMoptop FMLOCAL /FMdicttop FMLOCAL /BEGINPRINTCODE { /FMdicttop countdictstack 1 add def /FMoptop count 4 sub def /FMsaveobject save def userdict begin /showpage {} def FMNORMALIZEGRAPHICS 3 index neg 3 index neg translate } bind def /ENDPRINTCODE { count -1 FMoptop {pop pop} for countdictstack -1 FMdicttop {pop end} for FMsaveobject restore } bind def /gn { 0 { 46 mul cf read pop 32 sub dup 46 lt {exit} if 46 sub add } loop add } bind def /str FMLOCAL /cfs { /str sl string def 0 1 sl 1 sub {str exch val put} for str def } bind def /ic [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0223 0 {0 hx} {1 hx} {2 hx} {3 hx} {4 hx} {5 hx} {6 hx} {7 hx} {8 hx} {9 hx} {10 hx} {11 hx} {12 hx} {13 hx} {14 hx} {15 hx} {16 hx} {17 hx} {18 hx} {19 hx} {gn hx} {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16} {17} {18} {19} {gn} {0 wh} {1 wh} {2 wh} {3 wh} {4 wh} {5 wh} {6 wh} {7 wh} {8 wh} {9 wh} {10 wh} {11 wh} {12 wh} {13 wh} {14 wh} {gn wh} {0 bl} {1 bl} {2 bl} {3 bl} {4 bl} {5 bl} {6 bl} {7 bl} {8 bl} {9 bl} {10 bl} {11 bl} {12 bl} {13 bl} {14 bl} {gn bl} {0 fl} {1 fl} {2 fl} {3 fl} {4 fl} {5 fl} {6 fl} {7 fl} {8 fl} {9 fl} {10 fl} {11 fl} {12 fl} {13 fl} {14 fl} {gn fl} ] def /sl FMLOCAL /val FMLOCAL /ws FMLOCAL /im FMLOCAL /bs FMLOCAL /cs FMLOCAL /len FMLOCAL /pos FMLOCAL /ms { /sl exch def /val 255 def /ws cfs /im cfs /val 0 def /bs cfs /cs cfs } bind def 400 ms /ip { is 0 cf cs readline pop { ic exch get exec add } forall pop } bind def /wh { /len exch def /pos exch def ws 0 len getinterval im pos len getinterval copy pop pos len } bind def /bl { /len exch def /pos exch def bs 0 len getinterval im pos len getinterval copy pop pos len } bind def /s1 1 string def /fl { /len exch def /pos exch def /val cf s1 readhexstring pop 0 get def pos 1 pos len add 1 sub {im exch val put} for pos len } bind def /hx { 3 copy getinterval cf exch readhexstring pop pop } bind def /h FMLOCAL /w FMLOCAL /d FMLOCAL /lb FMLOCAL /bitmapsave FMLOCAL /is FMLOCAL /cf FMLOCAL /wbytes { dup 8 eq {pop} {1 eq {7 add 8 idiv} {3 add 4 idiv} ifelse} ifelse } bind def /BEGINBITMAPBWc { 1 {} COMMONBITMAPc } bind def /BEGINBITMAPGRAYc { 8 {} COMMONBITMAPc } bind def /BEGINBITMAP2BITc { 2 {} COMMONBITMAPc } bind def /COMMONBITMAPc { /r exch def /d exch def gsave translate rotate scale /h exch def /w exch def /lb w d wbytes def sl lb lt {lb ms} if /bitmapsave save def r /is im 0 lb getinterval def ws 0 lb getinterval is copy pop /cf currentfile def w h d [w 0 0 h neg 0 h] {ip} image bitmapsave restore grestore } bind def /BEGINBITMAPBW { 1 {} COMMONBITMAP } bind def /BEGINBITMAPGRAY { 8 {} COMMONBITMAP } bind def /BEGINBITMAP2BIT { 2 {} COMMONBITMAP } bind def /COMMONBITMAP { /r exch def /d exch def gsave translate rotate scale /h exch def /w exch def /bitmapsave save def r /is w d wbytes string def /cf currentfile def w h d [w 0 0 h neg 0 h] {cf is readhexstring pop} image bitmapsave restore grestore } bind def /proc1 FMLOCAL /proc2 FMLOCAL /newproc FMLOCAL /Fmcc { /proc2 exch cvlit def /proc1 exch cvlit def /newproc proc1 length proc2 length add array def newproc 0 proc1 putinterval newproc proc1 length proc2 putinterval newproc cvx } bind def /ngrayt 256 array def /nredt 256 array def /nbluet 256 array def /ngreent 256 array def /gryt FMLOCAL /blut FMLOCAL /grnt FMLOCAL /redt FMLOCAL /indx FMLOCAL /cynu FMLOCAL /magu FMLOCAL /yelu FMLOCAL /k FMLOCAL /u FMLOCAL /colorsetup { currentcolortransfer /gryt exch def /blut exch def /grnt exch def /redt exch def 0 1 255 { /indx exch def /cynu 1 red indx get 255 div sub def /magu 1 green indx get 255 div sub def /yelu 1 blue indx get 255 div sub def /k cynu magu min yelu min def /u k currentundercolorremoval exec def nredt indx 1 0 cynu u sub max sub redt exec put ngreent indx 1 0 magu u sub max sub grnt exec put nbluet indx 1 0 yelu u sub max sub blut exec put ngrayt indx 1 k currentblackgeneration exec sub gryt exec put } for {255 mul cvi nredt exch get} {255 mul cvi ngreent exch get} {255 mul cvi nbluet exch get} {255 mul cvi ngrayt exch get} setcolortransfer {pop 0} setundercolorremoval {} setblackgeneration } bind def /tran FMLOCAL /fakecolorsetup { /tran 256 string def 0 1 255 {/indx exch def tran indx red indx get 77 mul green indx get 151 mul blue indx get 28 mul add add 256 idiv put} for currenttransfer {255 mul cvi tran exch get 255.0 div} exch Fmcc settransfer } bind def /BITMAPCOLOR { /d 8 def gsave translate rotate scale /h exch def /w exch def /bitmapsave save def colorsetup /is w d wbytes string def /cf currentfile def w h d [w 0 0 h neg 0 h] {cf is readhexstring pop} {is} {is} true 3 colorimage bitmapsave restore grestore } bind def /BITMAPCOLORc { /d 8 def gsave translate rotate scale /h exch def /w exch def /lb w d wbytes def sl lb lt {lb ms} if /bitmapsave save def colorsetup /is im 0 lb getinterval def ws 0 lb getinterval is copy pop /cf currentfile def w h d [w 0 0 h neg 0 h] {ip} {is} {is} true 3 colorimage bitmapsave restore grestore } bind def /BITMAPTRUECOLORc { gsave translate rotate scale /h exch def /w exch def /bitmapsave save def /is w string def ws 0 w getinterval is copy pop /cf currentfile def w h 8 [w 0 0 h neg 0 h] {ip} {gip} {bip} true 3 colorimage bitmapsave restore grestore } bind def /BITMAPTRUECOLOR { gsave translate rotate scale /h exch def /w exch def /bitmapsave save def /is w string def /gis w string def /bis w string def /cf currentfile def w h 8 [w 0 0 h neg 0 h] { cf is readhexstring pop } { cf gis readhexstring pop } { cf bis readhexstring pop } true 3 colorimage bitmapsave restore grestore } bind def /BITMAPTRUEGRAYc { gsave translate rotate scale /h exch def /w exch def /bitmapsave save def /is w string def ws 0 w getinterval is copy pop /cf currentfile def w h 8 [w 0 0 h neg 0 h] {ip gip bip w gray} image bitmapsave restore grestore } bind def /ww FMLOCAL /r FMLOCAL /g FMLOCAL /b FMLOCAL /i FMLOCAL /gray { /ww exch def /b exch def /g exch def /r exch def 0 1 ww 1 sub { /i exch def r i get .299 mul g i get .587 mul b i get .114 mul add add r i 3 -1 roll floor cvi put } for r } bind def /BITMAPTRUEGRAY { gsave translate rotate scale /h exch def /w exch def /bitmapsave save def /is w string def /gis w string def /bis w string def /cf currentfile def w h 8 [w 0 0 h neg 0 h] { cf is readhexstring pop cf gis readhexstring pop cf bis readhexstring pop w gray} image bitmapsave restore grestore } bind def /BITMAPGRAY { 8 {fakecolorsetup} COMMONBITMAP } bind def /BITMAPGRAYc { 8 {fakecolorsetup} COMMONBITMAPc } bind def /ENDBITMAP { } bind def end /ALDsave FMLOCAL /ALDmatrix matrix def ALDmatrix currentmatrix pop /StartALD { /ALDsave save def savematrix ALDmatrix setmatrix } bind def /InALD { restorematrix } bind def /DoneALD { ALDsave restore } bind def %%EndProlog %%BeginSetup (3.0) FMVERSION 1 1 612 792 0 1 14 FMDOCUMENT 0 0 /Helvetica FMFONTDEFINE 1 0 /Times-Roman FMFONTDEFINE 2 0 /Times-Italic FMFONTDEFINE 3 0 /Courier FMFONTDEFINE 4 0 /Helvetica-Bold FMFONTDEFINE 5 0 /Courier-Bold FMFONTDEFINE 32 FMFILLS 0 0 FMFILL 1 0.1 FMFILL 2 0.3 FMFILL 3 0.5 FMFILL 4 0.7 FMFILL 5 0.9 FMFILL 6 0.97 FMFILL 7 1 FMFILL 8 <0f1e3c78f0e1c387> FMFILL 9 <0f87c3e1f0783c1e> FMFILL 10 FMFILL 11 FMFILL 12 <8142241818244281> FMFILL 13 <03060c183060c081> FMFILL 14 <8040201008040201> FMFILL 16 1 FMFILL 17 0.9 FMFILL 18 0.7 FMFILL 19 0.5 FMFILL 20 0.3 FMFILL 21 0.1 FMFILL 22 0.03 FMFILL 23 0 FMFILL 24 FMFILL 25 FMFILL 26 <3333333333333333> FMFILL 27 <0000ffff0000ffff> FMFILL 28 <7ebddbe7e7dbbd7e> FMFILL 29 FMFILL 30 <7fbfdfeff7fbfdfe> FMFILL %%EndSetup %%Page: "10" 10 %%BeginPaperSize: Letter %%EndPaperSize 612 792 0 FMBEGINPAGE 0 8 Q 0 X 0 K (SlingShot 2.0 Programmer\325s Handbook) 72 37.99 T (10) 531.11 37.99 T 1 10 Q (As of this writing, the latest major release is available via ftp on) 72 713.33 T 2 F (ftp.x.or) 330.16 713.33 T (g) 358.66 713.33 T 1 F ( as /contrib/SlingShot2.1.tar) 363.66 713.33 T (.Z. This ftp) 475.28 713.33 T -0.29 (server is mirrored to various sites around the world, so check your local ftp server \336rst. Previously) 72 700.33 P -0.29 (, an automated mail) 459.81 700.33 P (archive server was set up, but this service has been discontinued.) 72 687.33 T FMENDPAGE %%EndPage: "10" 9 %%Page: "9" 9 612 792 0 FMBEGINPAGE 0 8 Q 0 X 0 K (SlingShot 2.0 Programmer\325s Handbook) 72 37.99 T (9) 535.55 37.99 T 1 10 Q (and one is created for every paint window) 72 713.33 T (. When) 239.27 713.33 T 3 F (RECTOBJ_ACCEPTS_DROP) 270.63 713.33 T 1 F ( is) 390.57 713.33 T 3 F (TRUE) 402.23 713.33 T 1 F (, the SlingShot object is) 426.21 713.33 T (noti\336ed of drag events \050inside it\325) 72 700.33 T (s dimensions\051 and of drop events by the) 202.2 700.33 T 3 F (RECTOBJ_DROP_PROC) 363.76 700.33 T 1 F (. This callback) 465.7 700.33 T (should look at the id of the event for) 72 687.33 T 3 F (ACTION_DRAG_PREVIEW) 219.96 687.33 T 1 F (,) 332.98 687.33 T 3 F (ACTION_DRAG_COPY) 337.97 687.33 T 1 F (, etc., and do the) 432.63 687.33 T (appropriate action, such as highlighting the object or calling) 72 674.33 T 2 F (dnd_decode_dr) 314.62 674.33 T (op\050\051) 376.42 674.33 T 1 F (.) 393.07 674.33 T (Examples of handling drag and drop with the SlingShot extensions can be found in the examples directory of the) 72 656.33 T (source distribution.) 72 643.33 T 4 12 Q (Lists) 72 614 T 1 10 Q (Doubly linked lists are used in the SlingShot extensions for several purposes. For example, the children of a) 72 593.33 T (SlingShot object are linked up using a linked list and the function) 72 580.33 T 2 F (r) 336.3 580.33 T (ectobj_get_selected_list\050\051) 339.81 580.33 T 1 F ( returns a linked list of) 442.52 580.33 T (SlingShot objects that are selected. In some cases, applications will need to use these list functions.) 72 567.33 T (The example in Figure 6 illustrates iterating through a list of objects. Some of the list operations used here are) 72 549.33 T (macros, as implemented in) 72 536.33 T 2 F () 181.65 536.33 T 1 F (. This example uses the) 239.85 536.33 T 2 F (list_for\050\051) 335.89 536.33 T 1 F ( macro to interate through the list of) 371.43 536.33 T (children of another SlingShot object,) 72 523.33 T 2 F (a_par) 221.91 523.33 T (ent_r) 245.41 523.33 T (ectobj) 266.14 523.33 T 1 F (.) 290.57 523.33 T 2 F (Figure 6: Iterating through a list of SlingShot objects) 199.11 300.33 T 4 12 Q (Color) 72 272 T 1 10 Q (T) 72 251.33 T (o use color with the SlingShot extensions, the application needs to create an XV) 77.41 251.33 T (iew cms and assign the) 397.15 251.33 T 3 F (WIN_CMS) 491.81 251.33 T 1 F -0.2 (attribute of the window \050Canvas_shell or Frame\051. Each object can refer to the cms colors with the) 72 238.33 P 3 F -0.49 (RECTOBJ_FG) 461.01 238.33 P 1 F -0.2 ( and) 520.98 238.33 P 3 F -0.18 (RECTOBJ_BG) 72 225.33 P 1 F 0.07 ( attributes. These attributes are indexes into the cms for the window that they are in. The default color) 131.97 225.33 P (is set by setting the attribute to -1.) 72 212.33 T -0.14 (The default colors for all objects in a canvas_shell can be set by setting the) 72 194.33 P 3 F -0.34 (RECTOBJ_FG) 371.63 194.33 P 1 F -0.14 ( and) 431.6 194.33 P 3 F -0.34 (RECTOBJ_BG) 450.75 194.33 P 1 F -0.14 ( on the) 510.71 194.33 P (canvas_shell. By default these are the last and \336rst entries of the cms.) 72 181.33 T 4 12 Q (Where to get information and sources) 72 152 T 1 10 Q (The \336rst thing to do when you have a problem or question is to peruse the examples directory) 72 131.33 T (. This handbook is) 445.27 131.33 T (admittedly brief, and the examples should prove to be illustrative in areas that are not covered in detail here. \050Also) 72 118.33 T (note the brief descriptions of the example programs in Appendix E.\051 A second place for information is Usenet. The) 72 105.33 T (Usenet newsgroups comp.windows.open-look and alt.toolkits.xview have a number of readers who are) 72 92.33 T (knowledgeable about XV) 72 79.33 T (iew and the SlingShot extensions.) 173.54 79.33 T 72 72 540 720 C 78.67 312 533.33 502 C 84.67 321.33 530 499.33 R 7 X 0 K V 0.5 H 2 Z 0 X N 89.33 325.33 526 495.33 R 7 X V 3 9 Q 0 X (Rectobj_list) 125.33 478.33 T (*my_list;) 197.33 478.33 T (Rectobj) 125.33 467.33 T (child_rectobj;) 197.33 467.33 T (my_list = \050Rectobj_list*\051 xv_get\050a_parent_rectobj, RECTOBJ_CHILDREN\051;) 125.33 445.33 T (/* iterate through all the children */) 125.33 423.33 T (list_for\050my_list\051 {) 125.33 412.33 T (/* get the child out of the list node */) 161.33 401.33 T (child_rectobj = RECTOBJ_LIST_HANDLE\050my_list\051;) 161.33 390.33 T (/* do something with it */) 161.33 379.33 T (xv_set\050child_rectobj,) 161.33 368.33 T (RECTOBJ_FG, orange,) 197.33 357.33 T (NULL\051;) 197.33 346.33 T (}) 125.33 335.33 T 72 72 540 720 C 0 0 612 792 C FMENDPAGE %%EndPage: "9" 8 %%Page: "8" 8 612 792 0 FMBEGINPAGE 0 8 Q 0 X 0 K (SlingShot 2.0 Programmer\325s Handbook) 72 37.99 T (8) 535.55 37.99 T 2 10 Q (\245) 108 713.33 T (r) 116.42 713.33 T (ectobj_toggle_event_pr) 119.94 713.33 T (oc\050\051) 213.95 713.33 T 1 F (This function toggles an object between two states, highlighted and normal.) 125.86 695.33 T 2 F (\245) 108 672.33 T (r) 116.42 672.33 T (ectobj_backgr) 119.94 672.33 T (ound_event_pr) 176.75 672.33 T (oc\050\051) 236.34 672.33 T 1 F (Supports rubberbanding and selection of objects that \336t in the rubberbanded area.) 125.86 654.33 T (All the event handlers support callbacks for handling Drag & Drop drop events, and XV) 72 631.33 T (iew help and menus are) 424.2 631.33 T (displayed autonomously) 72 618.33 T (.) 168.8 618.33 T (Many of the objects use) 72 600.33 T 2 F (r) 169.99 600.33 T (ectobj_selection_event_pr) 173.5 600.33 T (oc\050\051) 278.06 600.33 T 1 F ( by default because it supports the most general set of) 294.15 600.33 T (features. The application is free to set any of these functions for their) 72 587.33 T 3 F (RECTOBJ_EVENT_PROC) 350.12 587.33 T 1 F ( depending on the) 458.06 587.33 T (behavior that is desired.) 72 574.33 T 0.01 (There are alternatives if none of these event functions \336t your needs. One option is to write your own event proc and) 72 556.33 P -0.12 (assign it with) 72 543.33 P 3 F -0.29 (RECTOBJ_EVENT_PROC) 127.44 543.33 P 1 F -0.12 (. The advantage of this callback is that it only gets called when events occur) 235.38 543.33 P (on the object. The other option is to use) 72 530.33 T 2 F (notify_interpose_event_func\050\051) 233.01 530.33 T 1 F ( to catch events before they arrive at the event) 352.93 530.33 T (proc of the canvas_shell\325) 72 517.33 T (s paint windows. This option could require more work, but may get the ef) 171.65 517.33 T (fect you desire.) 465.99 517.33 T 0 12 Q (Selections) 72 488 T 1 10 Q (The SlingShot extensions provide for highlighting and unhighlighting of an object when the user clicks on or) 72 467.33 T -0.15 (rubberbands around the object. The list of selected objects is accessible by calling) 72 454.33 P 2 F -0.15 (r) 399.8 454.33 P -0.15 (ectobj_get_selected_list\050\051) 403.32 454.33 P 1 F -0.15 (. This is) 506.02 454.33 P (in itself not enough to interact with other desktop applications. The application has to do a little more work to) 72 441.33 T (interoperate with the XV) 72 428.33 T (iew selection interface. This can only be done by the application because the application) 171.05 428.33 T (knows about what the selected objects represent.) 72 415.33 T (T) 72 397.33 T (o use the XV) 77.41 397.33 T (iew selection interface, the application should create an XV) 129.27 397.33 T (iew Selection_owner object and set) 367.09 397.33 T (appropriate attributes, such as the conversion and done functions. It may wish to create a Selection_item also. The) 72 384.33 T (SlingShot extensions will make use of a Selection_owner object if it is informed of its existence. This is done by) 72 371.33 T (setting) 72 358.33 T 3 F (RECTOBJ_SELECTION_OWNER) 101.15 358.33 T 1 F (. Once a Selection_owner is speci\336ed for an object, the SlingShot) 239.08 358.33 T 0.02 (extensions can automatically set the) 72 345.33 P 3 F 0.04 (SEL_OWN) 218.2 345.33 P 1 F 0.02 (, and) 260.17 345.33 P 3 F 0.04 (SEL_TIME) 282.07 345.33 P 1 F 0.02 ( attributes to acquire the primary selection when the) 330.04 345.33 P (user highlights an object. The SlingShot extensions will also handle the loss of a selection and will unhighlight the) 72 332.33 T -0.14 (object. \050It does not use the) 72 319.33 P 3 F -0.34 (SEL_LOSE_PROC) 179.12 319.33 P 1 F -0.14 ( for this, so you don\325) 257.08 319.33 P -0.14 (t have to worry about it overriding the application) 339.47 319.33 P (callback.\051) 72 306.33 T 3 F (RECTOBJ_SELECTION_OWNER) 72 288.33 T 1 F ( may be set on each object that you want to have highlighted, or on a group of) 209.92 288.33 T -0.19 (objects. The rectobj hierarchy is searched upward until a selection owner is found. Only one primary selection can be) 72 275.33 P (owned at a time, so if every object has a dif) 72 262.33 T (ferent owner) 245.85 262.33 T (, simultaneous selected objects will not be possible.) 296.24 262.33 T (There is an example of interacting with selections in the examples directory of the source distribution.) 72 244.33 T 0 12 Q (Initiating Drag and Drop) 72 215 T 1 10 Q (T) 72 194.33 T (o initiate drag and drop operations, the application should have set up the selection interface by creating a) 77.41 194.33 T 3 F (DRAGDROP) 72 181.33 T 1 F ( and associated objects. T) 119.97 181.33 T (o get noti\336cation of when to begin processing the drag and drop operation, set) 221.7 181.33 T -0.21 (an object\325) 72 168.33 P -0.21 (s) 110.93 168.33 P 3 F -0.51 (RECTOBJ_START_DRAG_PROC) 117.1 168.33 P 1 F -0.21 (. This callback is invoked when a user clicks on an object and drags it a) 255.02 168.33 P (few pixels. W) 72 155.33 T (ithin this callback, the drag and drop operation can be started by calling) 127.39 155.33 T 2 F (dnd_send_dr) 416.07 155.33 T (op\050\051) 467.89 155.33 T 1 F (.) 484.54 155.33 T 3 F (RECTOBJ_DRAGGABLE) 72 142.33 T 1 F ( should be set to true to enable this callback.) 173.94 142.33 T 0 12 Q (Receiving Drag and Drops) 72 113 T 1 10 Q (Several attributes control how drag preview and drop events are processed.) 72 92.33 T 3 F (CANVAS_SHELL_AUTO_DROP_SITE) 374.53 92.33 T 1 F -0.27 (tells the canvas_shell to create and maintain a) 72 79.33 P 3 F -0.65 (DROP_SITE_ITEM) 255.26 79.33 P 1 F -0.27 (. The drop site area is the size of the paint window) 339.22 79.33 P FMENDPAGE %%EndPage: "8" 7 %%Page: "7" 7 612 792 0 FMBEGINPAGE 0 8 Q 0 X 0 K (SlingShot 2.0 Programmer\325s Handbook) 72 37.99 T (7) 535.55 37.99 T 2 10 Q (Figure 5: Setting up single and double click callbacks on an object) 172.06 382.05 T 0 12 Q (Low Level Event Handling) 72 353.71 T 1 10 Q (As mentioned, all the SlingShot extensions except the Canvas_shell are) 72 333.05 T 2 F (windowless) 360.43 333.05 T 1 F (. Because X and XV) 406.53 333.05 T (iew send) 487.8 333.05 T (events to windows only) 72 320.05 T (, the windowless SlingShot objects have to cooperate to handle events.) 166.02 320.05 T (Events that have a location, such as a mouse click event, need to be associated with the object at that location.) 72 302.05 T (Because objects can overlap, this needs to be done carefully) 72 289.05 T (. An event is) 311.16 289.05 T 2 F (mapped) 364.18 289.05 T 1 F ( to a single object if the x and y) 395.82 289.05 T (location of the event is within the bounds of the SlingShot object. Because some objects are non-rectangular) 72 276.05 T (, a) 504.36 276.05 T (callback function \050) 72 263.05 T 3 F (RECTOBJ_MAP_EVENT_PROC) 146.94 263.05 T 1 F (\051 actually implements the bounds checking.) 278.87 263.05 T (Once the event is \322mapped\323 to an object, a callback function for that object \050) 72 245.05 T 3 F (RECTOBJ_EVENT_PROC) 378.7 245.05 T 1 F (\051 is invoked.) 486.64 245.05 T -0.34 (As you might imagine, the) 72 232.05 P 3 F -0.81 (RECTOBJ_EVENT_PROC) 179.13 232.05 P 1 F -0.34 ( is a low level interface so most SlingShot classes set up default) 287.07 232.05 P (event handlers to transform events into higher level callbacks, such as the single and double click callbacks. The) 72 219.05 T (prebuilt event handlers available for application use are:) 72 206.05 T 2 F (\245) 108 188.05 T (r) 116.42 188.05 T (ectobj_selection_event_pr) 119.94 188.05 T (oc\050\051) 224.49 188.05 T 1 F -0.34 (This function supports selectable objects and invokes callbacks for selections, single click, double click,) 125.86 170.05 P (and start drag.) 126 157.05 T 2 F (\245) 108 134.05 T (r) 116.42 134.05 T (ectobj_button_event_pr) 119.94 134.05 T (oc\050\051) 214.51 134.05 T 1 F (This function makes the object act like a button: the object is highlighted while the mouse button is) 125.86 116.05 T (pressed over the object, and unhighlighted in normal conditions. It calls the) 126 103.05 T 3 F (RECTOBJ_SINGLE_CLICK_PROC) 126 90.05 T 1 F ( when the user releases the button.) 275.92 90.05 T 72 72 540 720 C 79.64 393.71 532.36 710 C 94.43 405.08 507.88 699.11 R 7 X 0 K V 3 9 Q 0 X (void my_single_click_proc\050) 130.43 682.11 T (Paint_window) 166.43 671.11 T (paint_window,) 274.43 671.11 T (Event) 166.43 660.11 T (*event,) 274.43 660.11 T (Canvas_shell) 166.43 649.11 T (canvas_shell,) 274.43 649.11 T (Rectobj) 166.43 638.11 T (click_object\051) 274.43 638.11 T ({) 130.43 627.11 T (/* user single clicked on click_object, do something */) 166.43 616.11 T (}) 130.43 605.11 T (void my_dbl_click_proc\050) 130.43 583.11 T (Paint_window) 166.43 572.11 T (paint_window,) 274.43 572.11 T (Event) 166.43 561.11 T (*event,) 274.43 561.11 T (Canvas_shell) 166.43 550.11 T (canvas_shell,) 274.43 550.11 T (Rectobj) 166.43 539.11 T (click_object\051) 274.43 539.11 T ({) 130.43 528.11 T (/* user double clicked on click_object, do something */) 166.43 517.11 T (}) 130.43 506.11 T 5 F (...) 130.43 484.11 T 3 F (xv_set\050drawtext1,) 166.43 462.11 T (RECTOBJ_SINGLE_CLICK_PROC,) 202.43 451.11 T (my_single_click_proc,) 346.43 451.11 T (RECTOBJ_DBL_CLICK_PROC,) 202.43 440.11 T (my_dbl_click_proc,) 346.43 440.11 T (NULL\051;) 202.43 429.11 T 90.29 400.57 521.71 707 R 0.5 H 2 Z N 72 72 540 720 C 0 0 612 792 C FMENDPAGE %%EndPage: "7" 6 %%Page: "6" 6 612 792 0 FMBEGINPAGE 0 8 Q 0 X 0 K (SlingShot 2.0 Programmer\325s Handbook) 72 37.99 T (6) 535.55 37.99 T 72 710 540 720 C 72 719 540 719 2 L 1 H 2 Z 0 X 0 K N 0 0 612 792 C 4 14 Q 0 X 0 K (Handling Events) 72 700.67 T 1 10 Q (In contrast to the XV) 72 674.33 T (iew Canvas, the SlingShot extensions provide higher level events. The low level event stream) 155.78 674.33 T (from the window serveris processed into higher level abstractions such as single click, double click, and drag and) 72 662.33 T (drop.) 72 650.33 T 0 12 Q (Help and Menus) 72 622 T 1 10 Q (Each SlingShot object can have help information assigned to it, and can share help with its children. An application) 72 601.33 T (associates help information with an object by setting the) 72 589.33 T 3 F (XV_HELP_DATA) 299.36 589.33 T 1 F ( attribute \050as described in the XV) 371.32 589.33 T (iew) 503.39 589.33 T -0.23 (Programming Manual.\051 When the help button is pressed, the SlingShot extensions \336nd the help information, and then) 72 577.33 P -0.33 (display it with) 72 565.33 P 2 F -0.33 (xv_help_show\050\051) 130.7 565.33 P 1 F -0.33 (. The SlingShot extensions \336nd the help data by exploiting the hierarchial relationships) 193.98 565.33 P (between objects. If there is no) 72 553.33 T 3 F (XV_HELP_DATA) 194.4 553.33 T 1 F ( attached to the object that the help event occurred on, then the) 266.36 553.33 T -0.22 (object\325) 72 541.33 P -0.22 (s owners are searched in turn until help data is found or until the canvas_shell is reached. This makes it easy to) 99.21 541.33 P (specify help information for a group of objects.) 72 529.33 T (Each SlingShot object can also have a menu assigned to it, and can share the menu with its children. An application) 72 512.33 T -0.35 (\336rst creates a menu, then associates the menu with an object by setting the) 72 500.33 P 3 F -0.85 (RECTOBJ_MENU) 366.55 500.33 P 1 F -0.35 ( attribute. When the right) 438.51 500.33 P (mouse button is pressed, the SlingShot extensions \336nd the menu and display it with XV) 72 488.33 T (iew\325) 422.05 488.33 T (s) 439.26 488.33 T 2 F (menu_show\050\051) 445.64 488.33 T 1 F (. Menus) 499.49 488.33 T (are searched for among the object\325) 72 476.33 T (s owners using the object hierarchy) 209.93 476.33 T (, in the same manner that help data is searched) 350.57 476.33 T (for) 72 464.33 T (.) 83.1 464.33 T -0.25 (In Figure 4, a menu called) 72 447.33 P 2 F -0.25 (my_menu) 177.94 447.33 P 1 F -0.25 ( is attached to) 216.24 447.33 P 2 F -0.25 (r) 272.98 447.33 P -0.25 (ectobj1) 276.5 447.33 P 1 F -0.25 ( using) 305.93 447.33 P 3 F -0.59 (RECTOBJ_MENU) 332.09 447.33 P 1 F -0.25 (, and help data is associated using) 404.05 447.33 P 3 F (XV_HELP_DATA) 72 435.33 T 1 F (. It is assumed that) 143.96 435.33 T 2 F (my_menu) 221.14 435.33 T 1 F ( was previously created.) 259.44 435.33 T 2 F (Figure 4: Assigning help and menus to an object) 208.56 250.33 T 0 12 Q (Single Click, Double Click) 72 222 T 1 10 Q -0.24 (Single click and double click callbacks are provided by the SlingShot extensions. When a user clicks on a object such) 72 201.33 P -0.15 (as the) 72 188.33 P 2 F -0.15 (drawtext1) 97.23 188.33 P 1 F -0.15 ( object in Figure 2, it becomes highlighted. When the user releases the mouse button, the single click) 137.21 188.33 P (callback function is called. If the user clicks on the object again within a certain time limit, the double click callback) 72 175.33 T (function is called.) 72 162.33 T (Figure 5 shows how these callbacks are speci\336ed with) 72 144.33 T 3 F (RECTOBJ_SINGLE_CLICK_PROC) 291.01 144.33 T 1 F ( and) 440.93 144.33 T 3 F (RECTOBJ_DOUBLE_CLICK_PROC) 72 131.33 T 1 F (. On the \336rst click,) 221.92 131.33 T 2 F (my_single_click_pr) 298.82 131.33 T (oc\050\051) 376.72 131.33 T 1 F ( will be called. On the double click,) 392.81 131.33 T 2 F (my_double_click_pr) 72 118.33 T (oc\050\051) 153.24 118.33 T 1 F ( will be called. The ar) 169.33 118.33 T (guments to the callback provide context for the click operation: The) 256.3 118.33 T 2 F -0.1 (paint_window) 72 105.33 P 1 F -0.1 ( and) 128.65 105.33 P 2 F -0.1 (canvas_shell) 147.88 105.33 P 1 F -0.1 ( are the windows that) 199.51 105.33 P 2 F -0.1 (event) 287.01 105.33 P 1 F -0.1 ( occurred on, and) 308.09 105.33 P 2 F -0.1 (click_object) 379.58 105.33 P 1 F -0.1 ( is the SlingShot object that) 427.87 105.33 P (the user) 72 92.33 T (\325) 103.73 92.33 T (s mouse was positioned over) 106.51 92.33 T (.) 220.89 92.33 T 72 72 540 720 C 75.66 261 536.34 415 C 75.66 268.86 534.66 412.86 R 7 X 0 K V 3 9 Q 0 X (Menu) 111.66 384.86 T (my_menu;) 183.66 384.86 T (Rectobj) 111.66 373.86 T (rectobj1;) 183.66 373.86 T 5 F (...) 111.66 351.86 T 3 F (xv_set\050rectobj1,) 111.66 329.86 T (RECTOBJ_MENU,) 147.66 318.86 T (my_menu,) 219.66 318.86 T (XV_HELP_DATA,) 147.66 307.86 T (\322sample_program:f) 219.66 307.86 T (ilebutton\323,) 311.33 307.86 T (NULL\051;) 147.66 296.86 T 91.08 268.86 516.66 412.86 R 0.5 H 2 Z N 72 72 540 720 C 0 0 612 792 C FMENDPAGE %%EndPage: "6" 5 %%Page: "5" 5 612 792 0 FMBEGINPAGE 0 8 Q 0 X 0 K (SlingShot 2.0 Programmer\325s Handbook) 72 37.99 T (5) 535.55 37.99 T 1 10 Q (The second object that is created,) 72 713.33 T 2 F (r) 207.73 713.33 T (ectobj1) 211.24 713.33 T 1 F (, is a) 240.67 713.33 T 3 F (BAG) 261.77 713.33 T 1 F (. This is an invisible object that serves as a place to put other) 279.76 713.33 T (objects) 72 701.33 T 1 8 Q (1) 100.31 705.33 T 1 10 Q (. The) 104.31 701.33 T 3 F (BAG) 127.35 701.33 T 1 F ( is a class that shrinks or expands to \336t the dimensions of other objects. In this example, the) 145.34 701.33 T 3 F (BAG) 513.17 701.33 T 1 F (object is used to hold two objects,) 72 689.33 T 2 F (drawr) 210.25 689.33 T (ect1) 234.32 689.33 T 1 F ( and) 250.97 689.33 T 2 F (drawtext1) 270.4 689.33 T 1 F (, which appear as a rectangle and text.) 310.38 689.33 T (Like other XV) 72 672.33 T (iew objects, SlingShot objects are or) 129.69 672.33 T (ganized into hierarchies. Each object has an owner and can have) 275.53 672.33 T (several) 72 660.33 T 2 F (childr) 102.8 660.33 T (en) 126.31 660.33 T 1 F (. In the example,) 135.74 660.33 T 2 F (r) 205.14 660.33 T (ectobj1) 208.65 660.33 T 1 F ( is a subtree or) 238.08 660.33 T 2 F (child) 298.86 660.33 T 1 F ( of) 318.85 660.33 T 2 F (shell) 332.18 660.33 T 1 F (,) 351.06 660.33 T 2 F (drawtext1) 356.05 660.33 T 1 F ( and) 396.03 660.33 T 2 F (drawr) 415.46 660.33 T (ect1) 439.53 660.33 T 1 F ( are children of) 456.18 660.33 T 2 F (r) 72 648.33 T (ectobj1.) 75.52 648.33 T 1 F ( The parent-child relationship is usually established by the \336rst ar) 107.44 648.33 T (gument to) 368.76 648.33 T 2 F (xv_cr) 411.51 648.33 T (eate\050\051) 433.34 648.33 T 1 F (.) 456.65 648.33 T 2 F (Figure 3: Execution of the sample program) 219.11 431.33 T 1 F (The position and sizes of SlingShot objects are controlled with the) 72 409.33 T 3 F (XV_X) 339.89 409.33 T 1 F (,) 363.88 409.33 T 3 F (XV_Y) 368.88 409.33 T 1 F (,) 391.57 409.33 T 3 F (XV_WIDTH) 396.57 409.33 T 1 F ( and) 444.55 409.33 T 3 F (XV_HEIGHT) 463.98 409.33 T 1 F (attributes. The positions are relative to the object\325) 72 397.33 T (s owner) 270.2 397.33 T (. In the example,) 301.01 397.33 T 2 F (r) 370.41 397.33 T (ectobj1) 373.92 397.33 T 1 F ( is positioned at \050100, 0\051 of the) 403.35 397.33 T 2 F (shell) 72 385.33 T 1 F (;) 90.88 385.33 T 2 F (drawtext1) 96.16 385.33 T 1 F ( is positioned at \05010, 60\051 of) 136.13 385.33 T 2 F (r) 246.62 385.33 T (ectobj1) 250.14 385.33 T 1 F (;) 279.57 385.33 T 2 F (drawr) 284.84 385.33 T (ect1) 308.91 385.33 T 1 F ( is positioned at \0500, 16\051 of) 325.56 385.33 T 2 F (r) 431.05 385.33 T (ectobj1) 434.57 385.33 T 1 F (. The width and) 463.99 385.33 T (height of) 72 373.33 T 2 F (drawr) 110.31 373.33 T (ect1) 134.38 373.33 T 1 F ( are set to 200. Note that the width and height of) 151.03 373.33 T 2 F (drawtext1) 346.73 373.33 T 1 F ( do not need to be set, because it is) 386.71 373.33 T (calculated by the dimensions of the text within the object.) 72 361.33 T (Whenever objects are nested, as the) 72 344.33 T 2 F (drawr) 217.15 344.33 T (ect1) 241.22 344.33 T 1 F ( and) 257.87 344.33 T 2 F (drawtext1) 277.3 344.33 T 1 F ( are within) 317.27 344.33 T 2 F (r) 362.52 344.33 T (ectobj1) 366.04 344.33 T 1 F (, the owner is involved in the) 395.46 344.33 T (positioning of its children. In the default case, as with the) 72 332.33 T 3 F (BAG) 303.79 332.33 T 1 F ( and some other rectobj subclasses, the) 321.78 332.33 T 3 F (XV_X) 479.45 332.33 T 1 F ( and) 503.43 332.33 T 3 F (XV_Y) 72 320.33 T 1 F ( attributes of the child are controlled by the application. Other classes, such as the) 95.99 320.33 T 3 F (TREE) 424.92 320.33 T 1 F ( and) 448.9 320.33 T 3 F (ARRAY_TILE) 468.33 320.33 T 1 F (,) 528.3 320.33 T (explicitly position their children according to constraints speci\336ed with other attributes. This positioning is called) 72 308.33 T (geometry management.) 72 296.33 T (Most SlingShot objects are rectangular) 72 279.33 T (. All provide) 226.9 279.33 T 3 F (XV_X) 280.21 279.33 T 1 F (,) 304.19 279.33 T 3 F (XV_Y) 309.19 279.33 T 1 F (,) 331.89 279.33 T 3 F (XV_WIDTH) 336.88 279.33 T 1 F (, and) 384.86 279.33 T 3 F (XV_HEIGHT) 406.79 279.33 T 1 F ( attributes, but for) 460.76 279.33 T (some classes these only describe the bounding rectangle. For example, a) 72 267.33 T 3 F (DRAWLINE) 363.73 267.33 T 1 F ( object, which is a line between) 411.7 267.33 T (two points cannot be described with rectangular dimensions alone.) 72 255.33 T (Objects may overlap and the changes beneath an object do not af) 72 238.33 T (fect the object on the top. Because) 331.34 238.33 T 2 F (drawtext1) 471.23 238.33 T 1 F ( was) 511.21 238.33 T (created after) 72 226.33 T 2 F (drawr) 124.16 226.33 T (ect1) 148.23 226.33 T 1 F ( and their bounding rectangles overlap,) 164.88 226.33 T 2 F (drawtext1) 323.37 226.33 T 1 F ( appears on top and obscures part of) 363.35 226.33 T 2 F (drawr) 72 214.33 T (ect1) 96.07 214.33 T 1 F (. If the color of) 112.72 214.33 T 2 F (drawr) 175.44 214.33 T (ect1) 199.51 214.33 T 1 F ( is changed later) 216.16 214.33 T (, it does not scribble on top of) 280.98 214.33 T 2 F (drawtext1) 402.86 214.33 T 1 F (.) 442.84 214.33 T (Some SlingShot objects are selectable. If you click the mouse on the \322Hello W) 72 197.33 T (orld\323 in this example, it will become) 385.99 197.33 T (highlighted. The SlingShot extensions handle these events for you and provide callback functions to let you know) 72 185.33 T -0.15 (what has happened. For example, when a user double clicks on an object, a function speci\336ed by the application with) 72 173.33 P 3 F (RECTOBJ_DOUBLE_CLICK_PROC) 72 161.33 T 1 F ( is called.) 221.92 161.33 T 72 92 540 107 C 81 105 225 105 2 L 0.5 H 2 Z 0 X 0 K N 0 0 612 792 C 1 8 Q 0 X 0 K 0.09 (1. There is a built in debugging tool that lets you view the boundaries of all the objects in a canvas_shell. Invoke this by holding down) 90 86.67 P (the keyboard control and shift buttons and clicking the left mouse button.) 90 76.67 T 72 72 540 720 C 92.25 442 519.75 628 C 0 X 0 K %%BeginBinary: 3078 415 281 252 171 0 180 449.5 /red < 00FFFFFFFFFFBFBFBFBFBF7F7F7F7F7F3F3F3F3F3F0000000000FFFFFFFFFFBF BFBFBFBF7F7F7F7F7F3F3F3F3F3F0000000000FFFFFFFFFFBFBFBFBFBF7F7F7F 7F7F3F3F3F3F3F0000000000FFFFFFFFFFBFBFBFBFBF7F7F7F7F7F3F3F3F3F3F 0000000000FFFFFFFFFFBFBFBFBFBF7F7F7F7F7F3F3F3F3F3F00000000000000 00000000000000000000000000000000FFA042788640E5E5E5E5BFBFBFBFA7B7 C6D58C98A5B2FFFFFFFFFFFFFFFFFFFFF7DFC7AF977F674F371F070000000000 000000000000000000000000000000071F374F677F97AFC7DFF7FFFFFFFFFFFF FFFFFFFF963A61F75EB0FFFF000000FFB4457470F04AD3E15A40A143788600FF > store /green < 00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFBFBFBFBFBF BFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBF7F7F7F7F7F7F7F7F7F7F7F7F7F 7F7F7F7F7F7F7F7F7F7F7F7F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F3F 3F3F3F3F3F000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000FFCF569BADA02D5B89B7264C72982D5B 89B7264C72980000000000000000000000000000000000000000000F273F576F 879FB7CFE7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFD7BFA78F77 5F472F17A7416CFF5EC4FF00FF00FFD7B4457480FF70D3E1AAA0CF569BAD00FF > store /blue < 00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FF BF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F 3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00 FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F00FFBF7F3F000000 00000000000000000000000000000000FFCB5498AAC0B7C2CEDA98A2ACB6E5E5 E5E5BFBFBFBF172F475F778FA7BFD7EFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFE7CFB79F876F573F270F0000000000000000000000000000000000 00000000BD497AFF5EDE00FFFFFF0000B4457490FF8BD3E191C0CB5498AA00FF > store BEGINBITMAPCOLORc z W!FAt"Jt FDFBVFBFBFB%C#9#J&8"D"J$ FAFDFDFDFDFBFAFDQGFDFEFDFEFDFDFDR#FDFDFDJ$:$:$J$ R+FEFEFEFDFEFDFEFEFE9FEFEFEH&J%9$9%J% FDFBFCFAFDQBFDFDFDFDFEFDFEFEFDFDFD9FDFDFDFDJ"8&J" R.FEFEFDFDFDFEBFEI$J&?'?%?& FDFAFDQBFDFEFEFEFDFDFEFEFEFDFEFEFEFEFDFDFEFEFEFDJ"J$9"9"9v9$;";$;" 4FDQDFDFDFDFDFDFDFDFDFDFDFDFDFDFD J" RFFDC"y" FDFBFDDy FD :z VGFE;Z VE J"9"J"=" QMFEFEEFEFEJ":"J"=" Q=FEFE#9%=$ QFFEFEFEFEFEFEFEFEFEFFFEFEFEFEFEJ&A%H%9$<% QEFEFFFFFFFEFEFFFFFEFEFFFFFEFEFFFFFEFFFFFFJz9%H#8#;*8#8#8"Dz P-O.FEFEFEFEFEFEFFFFFEFFFEFFFEFFFEFFFEFFFEFFFFFEFFO8FEJZ9%:$JZ P.O-FFFFFFFFFEFEFEO*O7J% QFFFFFFFFFJ"@#8#<(9#8#D" QIFEFFFEFEFFFFFEFFFFFFFEFFFFFEFEFFFEJ&A%H%B% QEFFFEFEFEFFFFFEFEFFFFFEFEFFFFFEFEFFJ":"9$:"9":#?"9"<#9";":% Q=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF Jz P.R.FEJZ P-R0 7$J% FAFAFAVGFAFAFAFA%J$ FDFDFDFBVHFDFDFD ;z VEFE:'z' FAFAFAFAFAFAV;FDFAFAFAFAFAFA9(J' FDFDFDFDFDFDFBV) 90.99 643.93 T (#include ) 90.99 632.93 T (#include ) 90.99 621.93 T (#include ) 90.99 610.93 T (main\050argc, argv\051) 90.99 588.93 T (int) 162.99 577.93 T (argc;) 234.99 577.93 T (char) 162.99 566.93 T (*argv[];) 234.99 566.93 T ({) 90.99 555.93 T (Frame) 162.99 544.93 T (frame;) 234.99 544.93 T (Canvas_shell) 162.99 533.93 T (shell;) 234.99 533.93 T (Rectobj) 162.99 522.93 T (rectobj1;) 234.99 522.93 T (Drawrect) 162.99 511.93 T (drawrect1;) 234.99 511.93 T (Drawtext) 162.99 500.93 T (drawtext1;) 234.99 500.93 T (xv_init\050XV_INIT_ARGC_PTR_ARGV, &argc, argv, NULL\051;) 162.99 478.93 T (frame = \050Frame\051 xv_create\050NULL, FRAME,) 162.99 456.93 T (FRAME_LABEL, argv[0],) 234.99 445.93 T (NULL\051;) 234.99 434.93 T (shell = \050Canvas_shell\051 xv_create\050frame, CANVAS_SHELL, NULL\051;) 162.99 412.93 T (rectobj1 = \050Rectobj\051 xv_create\050shell, BAG,) 162.99 390.93 T (XV_X, 100,) 234.99 379.93 T (NULL\051;) 234.99 368.93 T (drawrect1 = \050Drawrect\051 xv_create\050rectobj1, DRAWRECT,) 162.99 346.93 T (XV_Y, 16,) 234.99 335.93 T (XV_WIDTH, 200,) 234.99 324.93 T (XV_HEIGHT, 200,) 234.99 313.93 T (NULL\051;) 234.99 302.93 T (drawtext1 = \050Drawtext\051 xv_create\050rectobj1, DRAWTEXT,) 162.99 280.93 T (DRAWTEXT_STRING, \322Hello World\323,) 234.99 269.93 T (XV_X, 60,) 234.99 258.93 T (XV_Y, 10,) 234.99 247.93 T (NULL\051;) 234.99 236.93 T (xv_main_loop\050frame\051;) 162.99 214.93 T (}) 90.99 203.93 T 83.85 184 529.24 657.46 R 0.5 H 2 Z N 72 72 540 720 C 0 0 612 792 C FMENDPAGE %%EndPage: "4" 3 %%Page: "3" 3 612 792 0 FMBEGINPAGE 0 8 Q 0 X 0 K (SlingShot 2.0 Programmer\325s Handbook) 72 37.99 T (3) 535.55 37.99 T 72 710 540 720 C 72 719 540 719 2 L 1 H 2 Z 0 X 0 K N 0 0 612 792 C 4 14 Q 0 X 0 K (Introduction) 72 700.67 T 1 10 Q (Like many modern user interface toolkits, object oriented classes can be added to XV) 72 674.33 T (iew) 413.36 674.33 T (. The SlingShot extensions) 427.14 674.33 T (take advantage of this feature by adding 17 new object types. The SlingShot extension hierarchy and its relationship) 72 662.33 T (to the XV) 72 650.33 T (iew hierarchy is shown in Figure 1.) 110.82 650.33 T 2 F (Figure 1: The SlingShot extension hierarchy) 217.03 187.31 T 1 F (In Figure 1, the two classes in the box on the left are part of XV) 72 165.31 T (iew) 326.77 165.31 T (. The remaining classes are part of the SlingShot) 340.55 165.31 T -0.15 (extensions. The Rectobj class \050extension\051 provides the base functionality) 72 153.31 P -0.15 (, such as support for common attributes, and) 361.33 153.31 P (provides hooks for repainting, event handling, and geometry management. The remaining subclasses of the rectobj) 72 141.31 T (use the rectobj infrastructure and de\336ne additional functionality) 72 129.31 T (. Also note that the Canvas_shell is actually) 325.89 129.31 T (subclassed from the XV) 72 117.31 T (iew Canvas but shares some functionality implemented by the Rectobj.) 167.72 117.31 T 72 72 540 720 C 72 197.98 540 633 C 72.91 199.57 539.41 632.41 R 7 X 0 K V 0.5 H 2 Z 0 X N 79.13 206.85 177.7 481.86 R 6 X V 0 X N 214.02 421.33 288.45 441.62 R V N 211.61 423.71 286.03 444 R 7 X V 0 X N 0 10 Q (Rectobj) 233.09 429.02 T 92.41 421.33 166.83 441.62 R V N 90 423.71 164.42 444 R 7 X V 0 X N 335.63 216.17 410.06 236.45 R V N 333.22 218.55 407.64 238.83 R 7 X V 0 X N 457.24 536.11 531.67 556.4 R V N 454.83 538.49 529.25 558.78 R 7 X V 0 X N 335.63 262.19 410.06 282.47 R V N 333.22 264.57 407.64 284.85 R 7 X V 0 X N 335.63 320.06 410.06 340.35 R V N 333.22 322.44 407.64 342.72 R 7 X V 0 X N 335.63 348.99 410.06 369.28 R V N 333.22 351.37 407.64 371.66 R 7 X V 0 X N 335.63 377.93 410.06 398.22 R V N 333.22 380.31 407.64 400.6 R 7 X V 0 X N 335.63 406.87 410.06 427.15 R V N 333.22 409.25 407.64 429.53 R 7 X V 0 X N 335.63 435.8 410.06 456.09 R V N 333.22 438.18 407.64 458.47 R 7 X V 0 X N 335.63 464.74 410.06 485.02 R V N 333.22 467.12 407.64 487.4 R 7 X V 0 X N 335.63 493.67 410.06 513.96 R V N 333.22 496.05 407.64 516.34 R 7 X V 0 X N 335.63 522.61 410.06 542.9 R V N 333.22 524.99 407.64 545.28 R 7 X V 0 X N 335.63 551.55 410.06 571.83 R V N 333.22 553.92 407.64 574.21 R 7 X V 0 X N 335.63 580.48 410.06 600.77 R V N 333.22 582.86 407.64 603.15 R 7 X V 0 X N (XV) 95.46 429.02 T (iew Generic) 108.61 429.02 T (Canvas_shell) 341.64 223.86 T (Drawrect) 351.65 588.17 T (Drawimage) 346.37 530.3 T (Drawicon) 350.82 501.36 T (Drawarea) 349.98 443.49 T (Drawline) 352.2 472.43 T (Grip) 483.81 543.8 T (Array_tile) 350.54 356.68 T (T) 361.55 269.88 T (ree) 367.29 269.88 T (Bag) 362.75 385.62 T (Box) 363.03 327.75 T (T) 358.31 414.56 T (acho) 363.3 414.56 T (Drawtext) 351.92 559.24 T 457.24 509.11 531.67 529.4 R V N 454.83 511.49 529.25 531.78 R 7 X V 0 X N (T) 471.59 516.8 T (empGrip) 476.59 516.8 T 335.63 291.12 410.06 311.41 R V N 333.22 293.5 407.64 313.79 R 7 X V 0 X N (CBox) 359.42 298.81 T 457.24 435.8 531.67 456.09 R V N 454.83 438.18 529.25 458.47 R 7 X V 0 X N (Clockobj) 474.09 443.49 T 92.41 216.17 166.83 236.45 R V N 90 218.55 164.42 238.83 R 7 X V 0 X N (XV) 96.01 223.86 T (iew Canvas) 109.17 223.86 T 310.82 591.67 310.82 231.67 2 L N 310.82 562.8 333 562.87 R N 311.11 591.67 333.29 591.74 R N 310.82 533.86 333 533.93 R N 310.82 504.91 333 504.98 R N 310.82 475.97 333 476.04 R N 310.82 418.15 333 418.22 R N 310.82 447.1 333 447.17 R N 288.58 432.62 310.75 432.7 R N 310.82 389.21 333 389.28 R N 310.82 360.26 333 360.34 R N 310.68 231.53 332.86 231.6 R N 310.82 273.43 333 273.5 R N 310.82 302.38 333 302.45 R N 310.82 331.32 333 331.39 R N 410.04 533.28 432.72 533.35 R N 410.04 447.1 454.82 447.17 R N 166.1 227.64 333.22 227.71 R N 432.58 547.39 454.75 547.46 R N 432.43 520.39 454.61 520.46 R N 432.86 520.9 432.94 547.46 R N 164.81 432.62 211.61 432.7 R N (XV) 95.18 459 T (iew Classes) 108.34 459 T 72 72 540 720 C 0 0 612 792 C FMENDPAGE %%EndPage: "3" 2 %%Page: "2" 2 612 792 0 FMBEGINPAGE 0 8 Q 0 X 0 K (SlingShot 2.0 Programmer\325s Handbook) 72 37.99 T (2) 535.55 37.99 T 72 710 540 720 C 72 719 540 719 2 L 1 H 2 Z 0 X 0 K N 0 0 612 792 C 4 14 Q 0 X 0 K (Preface) 72 700.67 T 1 10 Q (The XV) 72 674.33 T (iew toolkit provides a number of user interface objects such as Frames, Icons, and Panel items. While these) 103.87 674.33 T (are necessary and appropriate for many types applications, programmers are forced to use Xlib to implement other) 72 662.33 T (types of user interfaces. Unfortunately) 72 650.33 T (, Xlib programming is dif) 224.84 650.33 T (\336cult and tedious. The SlingShot extensions provide) 327.1 650.33 T (one answer to this dilemma, by supplying a set of objects and event handling routines that implement commonly) 72 638.33 T (needed functionality) 72 626.33 T (.) 153.24 626.33 T -0.35 (The SlingShot extensions to XV) 72 609.33 P -0.35 (iew are based on the XV) 199.38 609.33 P -0.35 (iew toolkit. Programmers who already know XV) 295.57 609.33 P -0.35 (iew will \336nd) 488.02 609.33 P (the SlingShot extensions very familiar because the XV) 72 597.33 T (iew API \050) 290.42 597.33 T 2 F (xv_cr) 329.28 597.33 T (eate\050\051) 351.11 597.33 T 1 F (,) 374.41 597.33 T 2 F (xv_set\050\051) 379.41 597.33 T 1 F (,) 411.04 597.33 T 2 F (xv_get\050\051) 416.04 597.33 T 1 F (, etc.\051 is used.) 448.78 597.33 T (This document describes release 2.1 of SlingShot extensions. Release 2.1 is based on XV) 72 580.33 T (iew 3.0 \050or later\051 and) 428.38 580.33 T (incorporates the XV) 72 568.33 T (iew 3.0 selections and drag and drop interfaces. This document is intended as a guide to) 152.45 568.33 T (application developers who want to write applications using the SlingShot extensions. Readers should have an) 72 556.33 T (understanding of XV) 72 544.33 T (iew programming.) 155.78 544.33 T FMENDPAGE %%EndPage: "2" 1 %%Page: "1" 1 612 792 0 FMBEGINPAGE 1 18 Q 0 X 0 K (SlingShot Extensions to XV) 191.7 648 T (iew) 394.04 648 T 1 14 Q (Programmer) 191.54 610.67 T (\325) 262.01 610.67 T (s Handbook for V) 265.89 610.67 T (ersion 2.1) 364.99 610.67 T 2 12 Q (Brian W) 263.6 468 T (arkentine) 302.81 468 T 1 10 Q (October 25, 1993) 271.02 359.33 T FMENDPAGE %%EndPage: "1" 0 %%Trailer %%BoundingBox: 0 0 612 792 %%Pages: 10 -1 %%DocumentFonts: Helvetica %%+ Times-Roman %%+ Times-Italic %%+ Courier %%+ Helvetica-Bold %%+ Courier-Bold