-+-+-+-+-+-+-+-+ START OF PART 55 -+-+-+-+-+-+-+-+ XFi(n)p Fq(\272)j(where)e Fi(n)h Fq(is)e(the)104 1725 y(menu)e(identi\256er)n X(.)0 1894 y Fr(8.5)59 b(Menu)17 b(attributes)0 2016 y Fq(Menu)12 Xb(items)g(may)h(be)g(highlighted)c(by)j(changing)f(the)h(attributes)f(that)h X(apply)f(to)h(a)g(speci\256c)h(item.)18 b(Figure)12 b(8.3)g(shows)g(item)0 X2066 y(2)f(of)f(a)i(box)e(menu)h(highlighted)d(by)i(swapping)g(the)h(text)f X(and)h(interior)e(colours.)15 b(Only)10 b(one)h(menu)g(item)g(may)g(be)g X(highlighted)0 2115 y(at)g(a)h(time.)0 2284 y Fr(8.6)59 b(The)17 Xb(format)e(of)h(menu)g(structur)o(es)0 2406 y Fq(A)i(menu)h(structure)f(has) Vg X(a)h(\256xed)f(format,)j(which)c(is)h(documented)h(below)m(.)36 Xb(Each)19 b(dif)o(ferent)f(part)g(of)g(the)g(structure)f(is)0 X2456 y(marked)f(using)e(a)i(LABEL)h(element,)g(where)f(the)f(label)g X(identi\256er)g(is)g(obtained)f(by)h(hashing)g(a)h(string)e(into)g(the)i X(standard)0 2506 y(hashtable)i(called)h("label".)37 b(The)20 Xb(`60menu)e(name')i(used)f(in)f(the)g(ADD_NAMES_T)o(O_SET)i(element)f(is)f X(derived)g(from)0 2555 y(the)f(string)e Fi("name$menuN")p Fq(,)21 Xb(where)d(where)f Fi(N)g Fq(is)g(the)g(menu)g(identi\256er)f(speci\256ed)i X(in)e(the)h Fi(ptk_createusermenu)j Fq(and)0 2605 y Fi(ptk_createboxmenu)14 Xb Fq(functions.)g(This)d(string)f(is)h(then)g(hashed)h(using)e(the)h("name") Vh X(hashtable,)g(and)f(the)g(integer)g(returned)0 2655 y(is)g(used)h(in)e(the)h X(ADD_NAMES_T)o(O_SET)i(element.)0 2956 y(13th)22 b(May)m(,)12 Xb(1992)636 b(47)839 b(2.01)p eop X%%Page: 48 49 Xbop 0 -137 a Fq(PHIGS)11 b(T)m(oolkit)f(User)i(Manual)1235 Xb(PTK/100)54 8 y Fi(ADD_NAMES_TO_SET)21 b(\(menu)e(name\))54 X108 y(LABEL\("globaltran"\))108 158 y(SET_GLOBAL_TRANSFORM)q(ATION_)q(3)i X(\(to)d(position)i(menu\))54 257 y(LABEL\("charheight"\))108 X307 y(SET_CHARACTER_HEIGHT)i(\(character)d(height)g(of)g(text)f(items\))54 X407 y(SET_TEXT_FONT)54 506 y(LABEL\("begin-menu"\))108 556 Xy(`5Bthe)h(following)g(elements)h(are)e(repeated)i(for)e(each)h(box)f(menu)h X(item:`5D)108 606 y(SET_PICK_IDENTIFIER)i(\(item)e(number\))108 X656 y(SET_LOCAL_TRANSFORMA)q(TION_3)j(\(to)c(position)h(menu)g(item\))108 X756 y(SET_INTERIOR_COLOUR_)q(INDEX)108 805 y(FILL_AREA)108 X855 y(SET_INTERIOR_COLOUR_)q(INDEX)108 905 y(FILL_AREA)108 X955 y(SET_INTERIOR_COLOUR_)q(INDEX)108 1005 y(SET_EDGE_COLOUR_INDE)q(X)108 X1054 y(FILL_AREA_SET)108 1154 y(`5Bfor)g(a)f(text)h(menu)f(item:`5D)108 X1204 y(TEXT)108 1303 y(`5Bfor)h(a)f(structure)i(menu)e(item:`5D)108 X1353 y(EXECUTE_STRUCTURE)108 1453 y(`5Bthe)h(following)g(elements)h(are)e X(repeated)i(for)e(each)h(user)g(menu)f(item:`5D)108 1503 y(SET_PICK_IDENTIFI VER) Xj(\(item)e(number\))108 1553 y(EXECUTE_STRUCTURE)54 1652 y X(LABEL\("end-menu"\))54 1752 y(REMOVE_NAMES_FROM_SET)j(\(menu)d(name\))0 X1921 y Fr(8.7)59 b(Example)16 b(pr)o(ogram)0 2042 y Fq(The)c(demonstration)e X(program)h Fi(menutest)i Fq(illustates)d(the)h(use)h(of)f(the)g(functions)f X(in)g(this)h(library)m(.)0 2956 y(13th)22 b(May)m(,)12 b(1992)636 Xb(48)839 b(2.01)p eop X%%Page: 49 50 Xbop 0 349 a Fj(Chapter)24 b(9)0 585 y Fs(The)29 b(PHIGS)g(W)n(indows)g X(Library)0 835 y Fq(This)15 b(tool)g(provides)f(facilities)h(for)g X(developing)f(window-oriented)f(applications,)j(using)f(only)f(PHIGS)i X(functions.)27 b(The)0 885 y(module)11 b(provides)f(functions)g(for:)64 X1005 y Fl(\267)21 b Fq(Creating)12 b(windows)h(\(implemented)g(as)i(PHIGS)e X(structures\))g(in)g(which)g(arbitrary)g(PHIGS)h(structures)f(may)h(be)g X(dis-)104 1055 y(played.)64 1138 y Fl(\267)21 b Fq(Opening,)11 Xb(closing,)f(moving,)h(resizing)g(and)g(stacking)g(windows.)64 X1221 y Fl(\267)21 b Fq(V)n(iewing)10 b(structures)g(using)h(an)g(interactive V) Xg(`60virtual)f(camera')j(interface.)64 1304 y Fl(\267)21 b Fq(Special)15 Xb(types)h(of)f(windows)f(for)h(viewing)f(diagrams)i(created)g(by)f(the)g(T)m X(opology)f(Drawer)i(tool)e(\(Chapter)h(7\),)h(the)104 1354 Xy(Structure)10 b(Content)g(tool)g(\(Chapter)h(6\))g(and)g(for)g(scrolling)f X(textual)g(output.)0 1474 y(In)g(addition)f(to)h(window)f(management,)k(the) Vd X(module)g(also)h(provides)f(a)h(`60virtual)e(camera',)k(to)d(facilitate)g X(viewing)f(of)h(PHIGS)0 1524 y(structures.)23 b(Structures)13 Xb(may)i(be)f(posted)f(to)h(windows)f(in)g(much)h(the)g(same)h(way)f(that)g X(they)f(are)i(posted)e(to)h(workstations.)0 1574 y(Each)f(window)e(has)i(a)g X(virtual)e(camera)j(which)e(de\256nes)h(the)f(view)g(within)e(the)j(window)m X(.)k(If)12 b(necessary)i(the)e(camera)i(may)f(be)0 1624 y(switched)f(of)o(f) Vg X(and)g(the)g(view)f(may)i(be)f(speci\256ed)h(explicitly)d(using)h(the)h X(normal)g(PHIGS)g(viewing)f(parameters.)19 b(Figure)11 b(9.1)0 X1674 y(shows)g(two)g(windows)f(displaying)g(dif)o(ferent)g(views)h(of)g(the) Vh X(lamp)f(structure.)0 1842 y Fr(9.1)59 b(W)o(indow)17 b(types)0 X1964 y Fq(There)12 b(are)g(four)f(diferent)f(types)h(of)g(windows,)g X(according)g(to)g(the)g(types)g(of)g(structures)g(which)g(may)h(be)f(viewed) Vh X(within)d(it:)64 2084 y Fl(\267)21 b Fp(Structur)o(e)14 b(window)p XFq(.)19 b(This)12 b(is)g(the)g(default)g(window)f(type)h(and)h(may)g(be)g X(used)f(for)g(viewing)g(any)g(PHIGS)h(structure.)104 2134 y(The)g(structures V) Xf(should)f(not)g(contain)h(any)h(SET)g(VIEW)g(INDEX)f(elements)h(since)g X(they)f(will)f(override)h(the)g(window)104 2184 y(view)m(.)64 X2267 y Fl(\267)21 b Fp(T)l(opology)8 b(window)p Fq(.)15 b(This)10 Xb(window)f(type)h(may)g(be)h(used)f(for)f(viewing)g(topologies)g(generated)h X(by)g(the)g(PHIGS)g(topol-)104 2317 y(ogy)g(module.)64 2400 Xy Fl(\267)21 b Fp(Structur)o(e)12 b(content)f(window)g Fq(This)f(window)g X(type)g(may)h(be)g(used)g(for)f(viewing)f(structure)h(content)g(diagrams)h X(gener)o(-)104 2450 y(ated)g(by)g(the)g(PHIGS)h(structure)e(content)h X(module.)64 2533 y Fl(\267)21 b Fp(T)l(erminal)10 b(window)n(.)15 Xb Fq(This)c(window)f(type)h(simulates)g(a)h(terminal)f(window)f(by)g X(displaying)g(text)g(which)h(is)g(automati-)104 2583 y(cally)g(scrolled.)912 X2956 y(49)p eop X%%Page: 50 51 Xbop 0 -137 a Fq(PHIGS)11 b(T)m(oolkit)f(User)i(Manual)1235 Xb(PTK/100)50 -33 y X 27895600 14917438 4604723 11840716 37890293 29601792 startTexFig X50 -33 a X%%BeginDocument: wind.ps Xsave /DEC_VAXGFX_save exch def Xgsave /pixel_matrix 72 300 div dup scale matrix currentmatrix def grestore X72 300 div dup scale X118 118 translate X/DEC_VAXGFX_dict 60 dict def DEC_VAXGFX_dict begin X10 dict dup begin /FontType 3 def /FontMatrix `5B 1.0 60.0 div X dup 0 exch 0 exch 0 0 `5D def X/Encoding 256 array def /FontBBox `5B0 0 60 60 `5Ddef 0 1 255 `7BEncoding ex Vch /.notdef X put `7D for XEncoding dup (1) 0 get /cross put dup (2) 0 get /d45 put dup X (3) 0 get /d135 put dup (4) 0 get /horiz put Xdup (5) 0 get /vert put dup (6) 0 get /d45w put dup (7) 0 get X /d135w put dup (8) 0 get /horizw put (9) 0 get /vertw put X/Metrics 10 dict def Metrics begin /.notdef 0 def /cross 60 def X /d45 60 def /d135 60 def X/horiz 60 def /vert 60 def /d45w 60 def /d135w 60 def /horizw X 60 def /vertw 60 def end X/BBox 10 dict def BBox begin /.notdef `5B0 0 0 0 `5D def /cross `5B0 0 59 59 V `5D def /d45 `5B0 0 59 59 `5D def X/d135 `5B0 0 59 59 `5D def /horiz `5B0 0 60 60 `5D def /vert `5B0 0 60 X 60 `5D def X/d45w `5B0 0 59 59 `5D def /d135w `5B0 0 59 59 `5D def X/horizw `5B0 0 60 60 `5D def /vertw `5B0 0 60 60 `5D def end X/CharacterDefs 10 dict def CharacterDefs begin /.notdef `7B`7D def X/horiz `7B0 15 59 `7Bdup newpath 0 exch moveto 60 exch lineto stroke X `7D for `7D def X/horizw `7B0 30 59 `7Bdup newpath 0 exch moveto 60 exch lineto stroke X `7D for `7D def X/vert `7B0 15 59 `7Bdup newpath 0 moveto 60 lineto stroke `7D for `7D def X/vertw `7B0 30 59 `7Bdup newpath 0 moveto 60 lineto stroke `7D for X `7D def X/d45 `7B15 15 59 `7Bdup newpath 0 exch moveto dup 59 exch sub 59 X lineto stroke Xdup 0 moveto 59 exch 59 exch sub lineto stroke `7D for newpath X 0 0 moveto 59 59 lineto stroke `7D def X/d135 `7B15 15 59 `7Bdup newpath 59 exch moveto dup 59 lineto stroke Xdup 59 exch sub 0 moveto 0 exch 59 exch sub lineto stroke `7D for X newpath 0 59 moveto 59 0 lineto stroke `7D def X/d45w `7B30 30 59 `7Bdup newpath 0 exch moveto dup 59 exch sub 59 X lineto stroke Xdup 0 moveto 59 exch 59 exch sub lineto stroke `7D for newpath 0 0 moveto 59 V 59 X lineto stroke `7D def X/d135w `7B 30 30 59 `7Bdup newpath 59 exch moveto dup 59 lineto stroke Xdup 59 exch sub 0 moveto 0 exch 59 exch sub lineto stroke `7D for X newpath 0 59 moveto 59 0 lineto stroke `7D def X/cross `7B 20 20 59 `7Bdup newpath 0 exch moveto dup 59 exch sub X 59 lineto stroke Xdup 0 moveto 59 exch 59 exch sub lineto stroke `7D for newpath X 0 0 moveto 59 59 lineto stroke X20 20 59 `7Bdup newpath 59 exch moveto dup 59 lineto stroke dup X 59 exch sub 0 moveto 0 exch 59 exch sub lineto stroke `7D for Xnewpath 0 59 moveto 59 0 lineto stroke `7D def end X/BuildChar `7B0 begin /char exch def /fontdict exch def /charname X fontdict /Encoding get char get def Xfontdict begin Metrics charname get 0 BBox charname get aload X pop setcachedevice `5B`5D 0 setdash 1 setlinewidth XCharacterDefs charname get exec end end `7D def /BuildChar load X 0 3 dict put Xend /DEC_VAXGFX_Hatchstyles exch definefont pop X/Currenthatch 1 string def X10 dict dup begin /FontType 3 def /FontMatrix `5B.001 0 0 .001 0 0 `5D def / VEncoding 256 array X def X/FontBBox `5B-500 -500 500 500`5D def 0 1 255 `7B Encoding exch /.notdef X put `7D for XEncoding dup 48 /dot put dup 49 /plus put dup 50 /star put dup X 51 /circle put dup 52 /cross put dup 53 /triangleup put Xdup 54 /square put dup 55 /diamond put dup 56 /triangledown put X dup 57 /bowtie put dup 58 /hourglass put Xdup 59 /solidtriangledown put dup 60 /solidtriangleup put dup X 61 /solidsquare put dup 62 /soliddiamond put Xdup 63 /solidcircle put dup 64 /solidhourglass put 65 /solidbowtie put X/Metrics 19 dict def Metrics begin /.notdef 0 def /dot 0 def X /plus 0 def /star 0 def X/circle 0 def /cross 0 def /triangleup 0 def /square 0 def /diamond X 0 def /triangledown 0 def X/bowtie 0 def /hourglass 0 def /solidtriangleup 0 def /solidtriangledown 0 d Vef /solidsquare 0 def X/soliddiamond 0 def /solidcircle 0 def /solidhourglass 0 def X /solidbowtie 0 def end X/BBox 19 dict def BBox begin /.notdef `5B0 0 0 0 `5D def /dot `5B-20 X -20 20 20 `5D def X/plus `5B-500 -500 500 500 `5D def /star `5B-500 -500 500 500 `5D def /circl Ve `5B-500 -500 500 500 `5D def /cross X `5B-500 -500 500 500 `5D def X/triangleup `5B-500 -433 500 433`5D def /square `5B-500 -500 500 500`5D X def /diamond `5B-500 -500 500 500`5D def X/triangledown `5B-500 -433 500 433`5D def /solidtriangleup `5B-500 X -433 500 433`5D def /solidtriangledown `5B-500 -433 500 433`5D def X/solidsquare `5B-500 -500 500 500`5D def /soliddiamond `5B-500 -500 X 500 500`5D def /solidcircle `5B-500 -500 500 500`5D def X/hourglass `5B-500 -500 500 500`5D def /solidhourglass `5B-500 -500 X 500 500`5D def /bowtie `5B-500 -500 500 500`5D def X/solidbowtie `5B-500 -500 500 500`5D def end X/CharacterDefs 19 dict def CharacterDefs begin /.notdef `7B`7D def X/dot `7B newpath 0 0 moveto 0 0 rlineto pixel_matrix setmatrix X 2 setlinewidth 1 setlinecap stroke `7D def X/plus `7B newpath 0 500 moveto 0 -500 lineto 500 0 moveto -500 0 lineto Xpixel_matrix setmatrix 1 setlinewidth stroke `7D def X/star `7B newpath 0 500 moveto 0 -500 lineto 500 0 moveto -500 X 0 lineto 350 350 moveto -350 -350 lineto 350 -350 moveto X-350 350 lineto pixel_matrix setmatrix 1 setlinewidth stroke `7D def X/circle `7B newpath 0 0 500 0 360 arc closepath pixel_matrix setmatrix X 1 setlinewidth stroke `7D def X/solidcircle `7B newpath 0 0 500 0 360 arc closepath fill`7D def X/cross `7B newpath 500 500 moveto -500 -500 lineto 500 -500 moveto X -500 500 lineto Xpixel_matrix setmatrix 1 setlinewidth stroke `7D def X/square `7B newpath -500 -500 moveto 500 -500 lineto 500 500 lineto X -500 500 lineto closepath Xpixel_matrix setmatrix 1 setlinewidth stroke `7D def X/solidsquare `7B newpath -500 -500 moveto 500 -500 lineto 500 500 lineto -50 V0 500 lineto closepath fill`7D def X/diamond `7B newpath 0 -500 moveto 500 0 lineto 0 500 lineto -500 X 0 lineto closepath Xpixel_matrix setmatrix 1 setlinewidth stroke `7D def X/soliddiamond `7B newpath 0 -500 moveto 500 0 lineto 0 500 lineto X -500 0 lineto closepath fill `7Ddef X/triangleup `7B newpath -500 -433 moveto 500 -433 lineto 0 433 X lineto closepath pixel_matrix setmatrix 1 setlinewidth stroke X `7Ddef X/solidtriangleup `7B newpath -500 -433 moveto 500 -433 lineto 0 X 433 lineto closepath fill `7Ddef X/triangledown `7B newpath -500 433 moveto 500 433 lineto 0 -433 lineto close Vpath Xpixel_matrix setmatrix 1 setlinewidth stroke `7D def X/solidtriangledown `7B newpath -500 433 moveto 500 433 lineto 0 X -433 lineto closepath fill `7D def X/hourglass `7B newpath 500 500 moveto -500 500 lineto 500 -500 lineto -500 - V500 lineto closepath Xpixel_matrix setmatrix 1 setlinewidth stroke `7D def X/bowtie `7B newpath 500 500 moveto 500 -500 lineto -500 500 lineto X -500 -500 lineto closepath Xpixel_matrix setmatrix 1 setlinewidth stroke `7D def X/solidhourglass `7B newpath 500 500 moveto -500 500 lineto 500 -500 X lineto -500 -500 lineto closepath fill `7D def X/solidbowtie `7B newpath 500 500 moveto 500 -500 lineto -500 500 X lineto -500 -500 lineto closepath fill `7D def end X/BuildChar `7B 0 begin /char exch def /fontdict exch def /charname fontdict V /Encoding get char get def Xfontdict begin Metrics charname get 0 BBox charname get aload X pop setcachedevice CharacterDefs charname get exec Xend end `7D def /BuildChar load 0 3 dict put Xend /DEC_VAXGFX_Markers exch definefont pop Xsystemdict /setpacking known `7B/savepacking currentpacking def X true setpacking `7Dif X/m `7Bmoveto`7D bind def X/nmr `7B newpath gsave translate rotate 0 0 moveto `7D bind def X/sfnt `7B findfont exch scalefont setfont `7D bind def X/mfnt `7B findfont exch makefont setfont `7D bind def X/dh `7Bmark exch `7BCurrenthatch cvs pop eoclip newpath Xpixel_matrix setmatrix /DEC_VAXGFX_Hatchstyles findfont 60 scalefont X setfont clippath pathbbox newpath X4 2 roll 60 div floor exch 60 div floor exch 60 mul /y0 exch def dup /x1 exc Vh def X60 mul /x0 exch def x0 y0 moveto 60 div ceiling 60 mul exch 60 X div ceiling x1 sub cvi /nc exch def Xy0 exch 60 exch `7Bnc `7BCurrenthatch show `7Drepeat x0 exch moveto X `7Dfor `7D Xstopped pop cleartomark grestore `7Dbind def X/pl `7B moveto `7B rlineto `7D repeat stroke `7D bind def X /l `7B lineto `7D bind def /ls `7B lineto stroke `7D bind def /mls `7B X moveto rlineto stroke `7D bind def`20 X/n `7B newpath `7D bind def X/pth `7B`7Brlineto`7D repeat`7D bind def X/cry `7B /y0 exch def /x0 exch def /e1 (Cell array reached end-of-file) def +-+-+-+-+-+-+-+- END OF PART 55 +-+-+-+-+-+-+-+-