home *** CD-ROM | disk | FTP | other *** search
- /***********************************************************************************
- * Highlights default buttons - Written by Janet Barrett at USGS, Flagstaff
- ***********************************************************************************/
- /* Standard C includes */
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-
- /* Macintosh toolbox includes */
- #include <Packages.h>
- #include <asm.h>
- #include <Traps.h>
-
- void FrmDefItem(DialogPtr theDialog)
- {
- short theItemID;
- short itemType;
- Rect itemRect;
- Handle itemHandle;
- PenState penStuff;
- short curveFactor;
- GrafPtr savePort;
- short hasColor = 0;
- SysEnvRec sysEnvRec;
- #define SysEnvironsTrap 0xA090
- #define UnknownTrap 0xA89F
-
- if ((long)NGetTrapAddress(SysEnvironsTrap,OSTrap) !=
- (long)NGetTrapAddress(UnknownTrap,ToolTrap)) {
- SysEnvirons(1,&sysEnvRec);
- hasColor = sysEnvRec.hasColorQD;
- }
- theItemID = 1;
- GetPort(&savePort);
- SetPort(theDialog);
- GetPenState(&penStuff);
- GetDItem(theDialog,theItemID,&itemType,&itemHandle,&itemRect);
- PenNormal();
- PenSize(3,3);
- InsetRect(&itemRect,-4,-4);
- curveFactor = (itemRect.bottom+8-itemRect.top)/2;
- FrameRoundRect(&itemRect,curveFactor,curveFactor);
- SetPenState(&penStuff);
- SetPort(savePort);
- }
-