home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_GEN / FACETV.ZIP / HEAPVIEW.H < prev    next >
C/C++ Source or Header  |  1993-12-09  |  970b  |  44 lines

  1. /************************************************************************
  2. **
  3. ** @(#)heapview.h    04/01/92    Chris Ahlstrom
  4. **
  5. ** The THeapView from Borland's GADGETS modules.  I stole it!
  6. ** Copyright (c) 1991 by Borland International
  7. **
  8. ** Gadgets for the Turbo Vision Demo.  Includes the heap view which
  9. ** displays the current heap space at the right end of the status line.
  10. **
  11. *************************************************************************/
  12.  
  13. #if !defined( HEAPVIEW_h )                // { HEAPVIEW_h
  14. #define HEAPVIEW_h
  15.  
  16. #if !defined(Uses_TEvent)
  17. #define Uses_TEvent
  18. #define Uses_TRect
  19. #define Uses_TView
  20. #include <tv.h>
  21. #endif
  22.  
  23.  
  24. class THeapView : public TView
  25. {
  26.  
  27. public:
  28.  
  29.     THeapView( TRect& r );
  30.     virtual void update();
  31.     virtual void draw();
  32.     virtual long heapSize();
  33.     virtual void clearLine();
  34.     int turnHeapOff;
  35.  
  36. private:
  37.  
  38.     long oldMem, newMem;
  39.     char heapStr[16];
  40.  
  41. };
  42.  
  43. #endif                              // } HEAPVIEW_h
  44.