home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / hpp.z / WMaskEdit.hpp < prev    next >
C/C++ Source or Header  |  1996-06-21  |  3KB  |  92 lines

  1. /*
  2.     WMaskEdit.hpp
  3.  
  4.     NOTE: This file is a generated file.
  5.           Do not modify it by hand!
  6. */
  7.  
  8. #ifndef WMaskEdit_hpp_included
  9. #define WMaskEdit_hpp_included
  10.  
  11.  
  12. // Declarations added here will be included at the top of the .HPP file
  13.  
  14. #include "sformat.hpp"
  15. #include <ctype.h>
  16.  
  17. #define DEFAULT_PROMPT_CHAR              '_'
  18. #define MASK_DIGIT                       '#'
  19. #define MASK_ALPHANUM                    '?'
  20. #define MASK_UPPERCASE                   'U'
  21. #define MASK_LOWERCASE                   'L'
  22. #define MASK_DECIMAL_SEP                 '.'
  23. #define MASK_THOUSANDS_SEP               ','
  24. #define MASK_TIME_SEP                    ':'
  25. #define MASK_DATE_SEP                    '/'
  26. #define MASK_WILD                        '*'
  27. #define MASK_LITERAL                     '\\'
  28.  
  29. class WMaskEdit : public WTextBox
  30. {
  31.     public:
  32.     public:
  33.         // add your public instance data here
  34.     private:
  35.         // add your private instance data here
  36.         WString                    _inputMask;
  37.         WString                    _outputFormat;
  38.         WString                    _promptStr;
  39.         WString                    _rawText;
  40.         WString                    _maskNoLiterals;
  41.         WChar                      _promptChar;
  42.         WInt                       _maskLen;
  43.         WBool                      _useCurDate;
  44.         WBool                      _restore;
  45.         WDateOrder                 _dateOrder;
  46.         char                      *_literalPos;    
  47.  
  48.         
  49.     protected:
  50.         // add your protected instance data here
  51.     public:
  52.         WMaskEdit();
  53.     public:
  54.         ~WMaskEdit();
  55.     public:
  56.         WBool CreateEventHandler( WWindow *, WCreateEventData * );
  57.     public:
  58.         WBool LostFocusHandler( WWindow *, WFocusEventData * );
  59.     public:
  60.         WBool GotFocusHandler( WWindow *, WFocusEventData * );
  61.     public:
  62.         WString GetInputMask() const;
  63.     public:
  64.         void SetInputMask( WString mask );
  65.     public:
  66.         WString GetOutputFormat() const;
  67.     public:
  68.         void SetOutputFormat( WString format );
  69.     public:
  70.         WChar GetPromptChar() const;
  71.     public:
  72.         void SetPromptChar( WChar newchar );
  73.     public:
  74.         void SetUseCurrentDate( WBool val );
  75.     public:
  76.         WBool GetUseCurrentDate() const;
  77.     public:
  78.         void SetDateOrder( WDateOrder order );
  79.     public:
  80.         WBool ProcessMessage( const WMessage &msg, WLong &returns );
  81.     private:
  82.         WBool ProcessKeyPress( WInt key );
  83.     private:
  84.         WBool ProcessCharacter( WInt pos, WInt key );
  85.     private:
  86.         void PasteText();
  87.     public:
  88.         WBool ChangeEventHandler( WWindow *, WEventData * );
  89. };
  90.  
  91. #endif
  92.