Path: utzoo!attcan!utgpu!watmath!iuvax!purdue!decwrl!asente From: asente@decwrl.dec.com (Paul Asente) Newsgroups: comp.windows.x Subject: Re: XtNreverseVideo --again-- Message-ID: <1351@bacchus.dec.com> Date: 20 Apr 89 16:47:20 GMT References: <12671@pasteur.Berkeley.EDU> Organization: DEC Western Software Lab Lines: 34 In article <12671@pasteur.Berkeley.EDU> dheller@cory.Berkeley.EDU (Dan Heller) writes: >The question is: what exactly is supposed to happen when the -rv option >is specified on the command line (or the reverseVideo resource is set to >"on")? In the toolkit, specifying reverse video means that the pixel values for XtDefaultForeground and XtDefaultBackground are swapped. No more, no less. >My app-defaults file says: > >*foreground: green >*background: blue > >Yet the user invokes the program with the -rv flag expecting his >foreground to be blue and background to be green. What happens now? Things aren't quite that simple. While the toolkit knows about backgrounds, it has no notion of foreground (many widgets don't even have a foreground). This may have been a mistake, but we're stuck with it now. A widget may have more than one "foreground" color (say, if it draws both text and graphics) and it may have none. If you've specified foreground and background like you did there, it might make sense to swap them, but what if the colors are different for each widget? I use five different colors in my mail handling window; what does it mean to specify reverse video for it? -rv is supposed to be a simple convenience for people who don't specify colors explicitly. If you want to achieve the kind of effect you specified, you can change the screen's BlackPixel and WhitePixel at server invocation time (and maybe later -- SGN implies on page thirteen that they can be set but provides no method for actually doing it). -paul asente asente@decwrl.dec.com decwrl!asente