home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / kwclass.zip / KVALDATE.HPP < prev    next >
C/C++ Source or Header  |  1994-04-18  |  948b  |  47 lines

  1. #ifndef _KVALDATE_
  2. #define _KVALDATE_
  3.  
  4. #ifndef _KVALMASK_
  5.    #include <kvalmask.hpp>
  6. #endif
  7.  
  8. #ifndef _ISTRING_
  9.    #include <istring.hpp>
  10. #endif
  11.  
  12. /*----------------------------------------------------------------------
  13.  * Class: KDateValidator
  14.  *
  15.  * Implementation File: kvalid.cpp
  16.  *
  17.  * Base Class: Derived from KValidator
  18.  *
  19.  * Purpose: Allows the user to enter date values in an entry field.
  20.  *
  21.  * Notes:
  22.  *--------------------------------------------------------------------*/
  23. class _Export KDateValidator : public KMaskValidator
  24. {
  25.    public:
  26.       KDateValidator();
  27.  
  28.    protected:
  29.       Boolean isValid(const char *text, Boolean fill=false) const;
  30.  
  31.    private:
  32.       struct Settings
  33.       {
  34.          Settings();
  35.          IString mask;
  36.          IString separator;
  37.          unsigned dayPos;
  38.          unsigned monthPos;
  39.          unsigned yearPos;
  40.       };
  41.       static Settings settings;
  42. };
  43.  
  44.  
  45.  
  46. #endif
  47.