sjs@jcricket.ctt.bellcore.com (Stan Switzer) (10/21/88)
While I'm at it, I figure I might as well post my mono.ps and color.ps files. Snazzy, yet tasteful and understated. I find that they wear well. If you want to "test-drive" these colors, just getcolors >savecolors psh stanscolor.ps If you don't like it: psh savecolors Stan Switzer sjs@ctt.bellcore.com "KeySee 1.1 coming soon" P.S.: Ignore article's reply address since my poster mungs it; use signature address instead. P.P.S.: While I'm at it I might as well ask if "backgroundcolor" and "textcolor" are really good ideas or whether (window) class variables like ClientFillColor and (the hypothetical) ClientTextColor make more sense. P.P.P.S.: Does anyone know any tricks that would let me aim "setcolor" at a *particular* window. I suppose I could add another interest to LiteWindow that is called /Execute and which executes its /Action. Then I'd create a framebuffer overlay, make its cursor a crosshair (neatness counts), wait for a SelectButton event, mutate it to a /Execute event, stick a procedure to see if we found a window (gotta be careful!) and change some color attribute in the /Action, and redistribute the event. Two questions: 1) is there an easier way? and 2) Can I do it without modifying the window class? P.P.P.P.S: These PP*S's are getting out of hand. -----------mono.ps-------------------------------------------------- /DefaultRootGrayOrColor 0.88 0.88 0.88 rgbcolor store /backgroundcolor 1 1 1 rgbcolor store /textcolor 0.00 0.00 0.00 rgbcolor store LiteWindow begin /ClientFillColor backgroundcolor store /FrameFillColor 0.50 0.50 0.50 rgbcolor store /KeyFocusColor 0.00 0.00 0.00 rgbcolor store end UserProfile begin /NtermTextColor 0.00 0.00 0.00 rgbcolor store /NtermFillColor 1 1 1 rgbcolor store /NtermCaretColor 0.00 0.00 0.00 rgbcolor store end { framebuffer setcanvas PaintRoot { /setfgcolor where { pop % Hack Warning (find nterm windows) /NtermTextColor UserProfile 1 index known { UserProfile exch get dup /setfgcolor Text send /setfgcolor Win send } { pop } ifelse /NtermFillColor UserProfile 1 index known { UserProfile exch get dup /setbgcolor Text send /setbgcolor Win send } { pop } ifelse /NtermCaretColor UserProfile 1 index known { UserProfile exch get /setcaretcolor Text send } { pop } ifelse } if /paint self send} AllWin } fork pop -----------color.ps------------------------------------------------- /DefaultRootGrayOrColor 0.00 0.63 0.68 rgbcolor store /backgroundcolor 0.82 1 1 rgbcolor store /textcolor 0.00 0.00 0.00 rgbcolor store LiteWindow begin /ClientFillColor backgroundcolor store /FrameFillColor 0.70 0.50 0.50 rgbcolor store /KeyFocusColor 0.00 1 1 rgbcolor store end UserProfile begin /NtermFillColor 0.82 1 1 rgbcolor store end { framebuffer setcanvas PaintRoot { /setfgcolor where { pop % Hack Warning (find nterm windows) /NtermTextColor UserProfile 1 index known { UserProfile exch get dup /setfgcolor Text send /setfgcolor Win send } { pop } ifelse /NtermFillColor UserProfile 1 index known { UserProfile exch get dup /setbgcolor Text send /setbgcolor Win send } { pop } ifelse /NtermCaretColor UserProfile 1 index known { UserProfile exch get /setcaretcolor Text send } { pop } ifelse } if /paint self send} AllWin } fork pop -----------END------------------------------------------------------