home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_10_11 / 1011052a < prev    next >
Text File  |  1992-09-08  |  785b  |  46 lines

  1.  
  2. **************************************************
  3.  
  4. // REGION.H (Listing 7)
  5. // Header for screen regions -- Williams
  6. #ifndef _REGIONDEF
  7. #define _REGIONDEF
  8. #include <stddef.h>
  9. #include <conio.h>
  10.  
  11. // This class saves and releases a region of the screen
  12. class region
  13. {
  14. protected:
  15. // Screen coordinates
  16. int left;
  17. int top;
  18. int right;
  19. int bot;
  20. // Storage area
  21. char *buf;
  22. public:
  23. // Methods:
  24.  
  25. // Constructor -- if save is 0, the screen region
  26. // isn't saved. You'd save it later with the reinit()
  27. // method.
  28. region(int x0,int y0,int x1,int y1,int save=1);
  29.  
  30. // Destructor
  31. ~region();
  32.  
  33. // Force the region to reread its area and save it
  34. void reinit(void);
  35.  
  36. // Restore screen data and destroy it
  37. void restore(void);
  38.  
  39. // Destroy screen data with out restoring it
  40. void destroy(void);
  41. };
  42.  
  43. #endif
  44.  
  45.  
  46.