home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / tvision / fields / fields.hpp < prev   
Encoding:
C/C++ Source or Header  |  1994-01-02  |  553 b   |  28 lines

  1.  
  2. #define Uses_TInputLine
  3. #define Uses_TDialog
  4.  
  5. #include <string.h>
  6. #include <tv.h>
  7.  
  8. class InputField:TInputLine
  9. {
  10.   public:
  11.     InputField(TDialog *pd, int x, int y, int w, float *data);
  12.     InputField(TDialog *pd, int x, int y, int w, char *data);
  13.  
  14.     ~InputField(void);
  15.  
  16.     virtual void handleEvent( TEvent& event);
  17.  
  18.   private:
  19.     int          Validate(    void);
  20.  
  21.     void *ptrData;
  22.     int  dataType; // 0: float, 1: Integer, 4: String
  23. };
  24.  
  25.  
  26.  
  27. #define PutText(x,y,s) insert(new TStaticText(TRect(x,y,x+strlen(s),y+1),s))
  28.