home *** CD-ROM | disk | FTP | other *** search
- /*
- * HideShow.c - Blob hide and show operations
- *
- * 23 Dec 93
- * - Fix bug in HideBlob with filling regions with port->bkPat. That
- * fails if port is a CGrafPort. Just EraseRect() instead, which knows
- * how to do the correct thing.
- */
-
- # include "BlobMgr.h"
-
-
- /*
- * If blob not already hidden, hide it by filling both the bounds
- * box of each region with current grafport's background pattern,
- * and accumulate the boxes into the update region.
- */
-
- pascal void
- HideBlob (BlobHandle b)
- {
- GrafPtr thePort;
- Rect r;
-
- if (BlobEnabled (b)) /* ignore if already disabled */
- {
- DisableBlob (b);
- GetPort (&thePort);
-
- r = BStatBox (b);
- EraseRect (&r);
- InvalRect (&r);
-
- r = BDragBox (b);
- EraseRect (&r);
- InvalRect (&r);
- }
- }
-
-
- pascal void
- HideBlobSet (BlobSetHandle bSet)
- {
- BlobLoopProc1 (&HideBlob, bSet);
- }
-
-
- /*
- * If blob is not already enabled, show it.
- */
-
- pascal void
- ShowBlob (BlobHandle b)
- {
- if (BlobEnabled (b) == false) /* ignore if already enabled */
- {
- EnableBlob (b);
- DrawBlob (b, inFullBlob);
- }
- }
-
-
- pascal void
- ShowBlobSet (BlobSetHandle bSet)
- {
- BlobLoopProc1 (&ShowBlob, bSet);
- }
-