home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Add-Ons / BBEdit / MacBob 1.0ß2 / Source / CSavePort.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-27  |  462 b   |  22 lines  |  [TEXT/KAHL]

  1. /***
  2.   *
  3.   *    CSavePort.h - Save a automatically restore the current port
  4.   *    Copyright © 1995 by Christopher E. Hyde.  All rights reserved.
  5.   *
  6.   *    Version 1.1.1    11/95
  7.   *
  8.   ***/
  9.  
  10. #pragma once
  11.  
  12. #include <Quickdraw.h>
  13.  
  14. class CSavePort {
  15.     GrafPtr    fPort;
  16. public:
  17.             CSavePort    (void) { GetPort(&fPort); }
  18.             CSavePort    (GrafPtr aPort) { GetPort(&fPort); SetPort(aPort); }
  19.            ~CSavePort    (void) { SetPort(fPort); }
  20.     GrafPtr ThePort        (void) const { return fPort; }
  21. };
  22.