home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 2.ddi / TVDEMOS.ZIP / FORMS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.7 KB  |  64 lines

  1. /*-------------------------------------------------------*/
  2. /*                                                       */
  3. /*   Turbo Vision 1.0                                    */
  4. /*   Turbo Vision Forms Demo                             */
  5. /*   Copyright (c) 1991 by Borland International         */
  6. /*                                                       */
  7. /*   Forms.h: Header file for Forms.cpp                  */
  8. /*            (Support header file for TVFORMS Demo)     */
  9. /*-------------------------------------------------------*/
  10.  
  11. #if !defined( __FORMS_H )
  12. #define __FORMS_H
  13.  
  14. #define Uses_TStreamable
  15. #define Uses_TEvent
  16. #define Uses_TRect
  17. #define Uses_TDialog
  18. #define Uses_TView
  19. #include <tv.h>
  20.  
  21. class TForm : public TDialog
  22. {
  23.  
  24. public:
  25.  
  26.     TForm( StreamableInit ) : TDialog (streamableInit), TWindowInit(&TForm::initFrame) {};
  27.     TForm( const TRect&, const char* );
  28.     virtual Boolean changed();
  29.     virtual void handleEvent( TEvent& );
  30.     virtual Boolean valid( ushort );
  31.  
  32.     TView *listDialog;
  33.     void *prevData;
  34.     ushort keyWidth;
  35.  
  36. private:
  37.  
  38.     virtual const char *streamableName() const
  39.         { return name; }
  40.  
  41. protected:
  42.  
  43.     virtual void write( opstream& );
  44.     virtual void *read( ipstream& );
  45.  
  46. public:
  47.  
  48.     static const char * const name;
  49.     static TStreamable *build();
  50.  
  51. };
  52.  
  53. inline ipstream& operator >> ( ipstream& is, TForm& cl )
  54.     { return is >> (TStreamable&)cl; }
  55. inline ipstream& operator >> ( ipstream& is, TForm*& cl )
  56.     { return is >> (void *&)cl; }
  57. inline opstream& operator << ( opstream& os, TForm& cl )
  58.     { return os << (TStreamable&)cl; }
  59. inline opstream& operator << ( opstream& os, TForm* cl )
  60.     { return os << (TStreamable *)cl; }
  61.  
  62.  
  63. #endif  // __FORMS_H
  64.