home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / source / caftrdrk.sit / CAfterDark.c next >
Text File  |  1990-08-01  |  2KB  |  63 lines

  1. /*
  2.  * CAfterDark is a base class for developing graphic modules
  3.  * for After Dark.  This class defines the default behaviour
  4.  * for a graphics module - to blank the screen.  Subclasses
  5.  * can add additional behavior. 
  6.  */
  7.  
  8. #include "CAfterDark.h"
  9.  
  10. /*
  11.  * Init does nothing.  Subclasses should override this method to
  12.  * initialize any instance variables and setup the initial state
  13.  * of their graphics module.
  14.  */
  15. OSErr CAfterDark::Init(RgnHandle blankRgn, GMParamBlockPtr params)
  16. {
  17.     return noErr;
  18. }
  19.  
  20.  
  21. /*
  22.  * Blank fills the blankRgn with black thus blanking the screen(s).
  23.  * Subclasses should override this method is they a) don't want to
  24.  * blank the screen or b) want to do something else.
  25.  */
  26. OSErr CAfterDark::Blank(RgnHandle blankRgn, GMParamBlockPtr params)
  27. {
  28.     FillRgn(blankRgn, params->qdGlobalsCopy->qdBlack);
  29.     return noErr;
  30. }
  31.  
  32.  
  33. /*
  34.  * DrawFrame does nothing.  Subclasses should override this method
  35.  * to perform animation.
  36.  */
  37. OSErr CAfterDark::DrawFrame(RgnHandle blankRgn, GMParamBlockPtr params)
  38. {
  39.     return noErr;
  40. }
  41.  
  42.  
  43. /*
  44.  * Close does nothing.  Subclasses should override this method
  45.  * to release any memory allocated by their subclass and to clean
  46.  * things up before closing.  NOTE: you shouldn't delete the
  47.  * instance of your object (i.e., this).
  48.  */
  49.  
  50. OSErr CAfterDark::Close(RgnHandle blankRgn, GMParamBlockPtr params)
  51. {
  52.     return noErr;
  53. }
  54.  
  55.  
  56. /*
  57.  * SetUp does nothing.  Subclasses should override this method to
  58.  * handle button messages.
  59.  */ 
  60. OSErr CAfterDark::SetUp(RgnHandle blankRgn, short message, GMParamBlockPtr params)
  61. {
  62.     return noErr;
  63. }