home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C / Frameworks / Grant's CGI Framework 1.0b14 / Util / IconUtil.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-11  |  1.0 KB  |  54 lines  |  [TEXT/CWIE]

  1. /*****
  2.  *
  3.  *    IconUtil.c
  4.  *
  5.  *    This is a support file for "Grant's CGI Framework".
  6.  *    Please see the license agreement that accompanies the distribution package
  7.  *    for licensing details.
  8.  *
  9.  *    Copyright ©1995,1996 by Grant Neufeld
  10.  *    grant@acm.com
  11.  *    http://arpp.carleton.ca/grant/
  12.  *
  13.  *****/
  14.  
  15. #include "MyConfiguration.h"
  16. #if kCompileWithForeground
  17.  
  18. #include <Icons.h>
  19.  
  20. #include "compiler_stuff.h"
  21.  
  22. #include "IconUtil.h"
  23.  
  24.  
  25. /***  FUNCTIONS  ***/
  26.  
  27. /* IM-MoreMTB: 5-10 */
  28. void
  29. IconDrawFromFamily ( short resID, Rect *destRect, Handle *iconSuiteHdl )
  30. {
  31.     IconSelectorValue    iconType;
  32.     IconAlignmentType    align;
  33.     IconTransformType    transform;
  34.     OSErr                theErr;
  35.     
  36.     if ( *iconSuiteHdl == NULL )
  37.     {
  38.         iconType    = svAllAvailableData;
  39.         theErr        = GetIconSuite ( iconSuiteHdl, resID, iconType );
  40.     }
  41.     
  42.     if ( *iconSuiteHdl != NULL )
  43.     {
  44.         align        = atAbsoluteCenter;
  45.         transform    = ttNone;
  46.         theErr        = PlotIconSuite ( destRect, align, transform, *iconSuiteHdl );
  47.     }
  48. } /* IconDrawFromFamily */
  49.  
  50.  
  51. #endif    /* kCompileWithForeground */
  52.  
  53. /*****  EOF  *****/
  54.