Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!caen!zaphod.mps.ohio-state.edu!usc!apple!agate!ucbvax!ANDREW.CMU.EDU!gk5g+ From: gk5g+@ANDREW.CMU.EDU (Gary Keim) Newsgroups: comp.soft-sys.andrew Subject: Re: ATK Color Support Message-ID: Date: 15 Nov 90 21:41:38 GMT References: <8bEjVTw91E4vAkNGZk@rchland.ibm.com> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 43 Excerpts from misc: 15-Nov-90 ATK Color Support Mark Turner@rchland.ibm. (1036+0) > Is there a faster way of using colors? For any particular window I may > set foreground and background colors hundreds of times while painting > the window. Is the slow painting due to the R3 X server? I know R4 is > faster. The only way I can see to speed it up would be to not make a call to set the fore- or background color unless the current settings are not what you want: #define myview_ForegroundColor(self) \ self->header.view.drawable->foreName #define myview_BackgroundColor(self) \ self->header.view.drawable->backName #define SetForeground(self,foreground) \ if(strcmp(foreground,myview_ForegroundColor(self)) \ myview_SetForegroundColor(self,foreground,0,0,0); #define SetBackground(self,background) \ if(strcmp(background,myview_BackgroundColor(self)) \ myview_SetBackgroundColor(self,background,0,0,0); Excerpts from misc: 15-Nov-90 ATK Color Support Mark Turner@rchland.ibm. (1036+0) > Also, Is there a way to set colors on menu cards? on scroll bars? Scoll bars get the color that is set for the application via the preferences *.ForegroundColor & *.BackgroundColor or through the command-line switches -bg & -fg. Try 'help cmenu' for info on how to set menu colors. Brief synopsis: in ~/.XDefaults add the lines: *MenuBackground: red *MenuForeground: blue There is no programatic way to set the menu colors.