Пример #1
0
static boolean minidrawmsg (void) {
	
	register hdlminirecord hm = minidata;
	register boolean flbitmap;
	bigstring bs;
	Rect r;
	
	r = (**hm).msgrect;
	
	flbitmap = openbitmap (r, miniwindow);
		
	eraserect (r);
	
	pushstyle (msgfont, msgsize, msgstyle);
	
	copystring ((**hm).bsmsg, bs);
	
	centerstring (r, bs);
	
	popstyle ();
	
	framerect (r);
	
	if ((**hm).flactive && (**hm).flmsgactive) {
		
		insetrect (&r, 1, 1);
		
		#ifdef MACVERSION
		LMSetHiliteMode(LMGetHiliteMode() & ~(1 << hiliteBit));
		#endif
		
		invertrect (r);
		}
	
	if (flbitmap)
		closebitmap (miniwindow);
	
	return (true);
	} /*minidrawmsg*/
Пример #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);
}