home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / cb / setup / cbuilder / data.z / COUNTER.H < prev    next >
C/C++ Source or Header  |  1997-02-28  |  1KB  |  27 lines

  1. //----------------------------------------------------------------------------
  2. //Borland C++Builder
  3. //Copyright (c) 1987, 1997 Borland International Inc. All Rights Reserved.
  4. //----------------------------------------------------------------------------
  5. //-------------------------------------------------------------------------
  6. //    counter.h. - example of a small, non-visual counter component
  7. //-------------------------------------------------------------------------
  8. class TCounter;         // forward
  9.  
  10. typedef void (__closure *TCounterEvent)(TCounter *Sender);
  11. //-------------------------------------------------------------------------
  12. class TCounter 
  13. {
  14. private:
  15.   TCounterEvent FOnMultiple;
  16.   int FVal;
  17.   int FMultiple;
  18. public:
  19.   __property int Val = {read=FVal, write=FVal};
  20.   __property int Multiple = {read=FMultiple};
  21.   __property TCounterEvent OnMultiple = {read=FOnMultiple, write=FOnMultiple};
  22.   void Clear();
  23.   void Increment();
  24.   TCounter(int Multiple);
  25. };
  26. //-------------------------------------------------------------------------
  27.