Example #1
0
static void SetHiliteColor(FXWindow*w)
{
  FXColor c=w->getApp()->getHiliteColor();
  HiliteColor(FXDragCorner);
  HiliteColor(FXFrame);
  HiliteColor(FXMDIChild);
  HiliteColor(FXMenuCaption);
  HiliteColor(FXMenuSeparator);
  HiliteColor(FXPacker);
  HiliteColor(FXPopup);
  HiliteColor(FXScrollBar);
  HiliteColor(FXTable);
  HiliteColor(FXToolBarShell);
}
Example #2
0
/****************************************************************
  PopInvert() inverts the given popup.
****************************************************************/
void PopInvert(DialogPtr theDialog, short itemNum)
{
   GrafPtr savePort;
   short itemType;
   Handle itemHandle;
   Rect itemBox;
   //SysEnvRec theWorld;
   RGBColor SaveBack, DefaultBack, DefaultFore, saveHilite;
	
   GetPortGrafPtr(&savePort);
   SetPortDialogPort(theDialog);

   GetDialogItem(theDialog, itemNum, &itemType, &itemHandle, &itemBox);

  // SysEnvirons(curSysEnvVers,&theWorld);

   //if (!theWorld.hasColorQD) {
   if (ColorQDAvailable()) {
      InvertRect( &itemBox );
      return;
   }

   GetBackColor(&SaveBack);
	LMGetHiliteRGB(&saveHilite);
   DefaultMenuColors(&DefaultFore, &DefaultBack);

   RGBBackColor(&DefaultBack);
   HiliteColor(&DefaultFore);
	LMSetHiliteMode(LMGetHiliteMode() & 0x7F); // clear 0th bit = pHiliteBit
   InvertRect( &itemBox );
	
   HiliteColor(&saveHilite);
   RGBBackColor(&SaveBack);
	
   SetPortGrafPort(savePort);
}