home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tv20cpp.zip / tvision / stddlg.h < prev    next >
C/C++ Source or Header  |  1998-01-19  |  18KB  |  726 lines

  1. /*
  2.  * stddlg.h
  3.  *
  4.  * Turbo Vision - Version 2.0
  5.  *
  6.  * Copyright (c) 1994 by Borland International
  7.  * All Rights Reserved.
  8.  *
  9.  * Modified by Sergio Sigala <ssigala@globalnet.it>
  10.  */
  11.  
  12. #if !defined( __FILE_CMDS )
  13. #define __FILE_CMDS
  14.  
  15. const
  16.  
  17. //  Commands
  18.  
  19.     cmFileOpen    = 1001,   // Returned from TFileDialog when Open pressed
  20.     cmFileReplace = 1002,   // Returned from TFileDialog when Replace pressed
  21.     cmFileClear   = 1003,   // Returned from TFileDialog when Clear pressed
  22.     cmFileInit    = 1004,   // Used by TFileDialog internally
  23.     cmChangeDir   = 1005,   //
  24.     cmRevert      = 1006,   // Used by TChDirDialog internally
  25. #ifndef __UNPATCHED
  26.     cmDirSelection= 1007,   //!! New event - Used by TChDirDialog internally
  27. #endif
  28.  
  29. //  Messages
  30.  
  31.     cmFileFocused = 102,    // A new file was focused in the TFileList
  32.     cmFileDoubleClicked     // A file was selected in the TFileList
  33.             = 103;
  34.  
  35. #endif  // __FILE_CMDS
  36.  
  37. #if defined( Uses_TSearchRec ) && !defined( __TSearchRec )
  38. #define __TSearchRec
  39.  
  40. #include <limits.h>
  41.  
  42. /* SS: dos stuff */
  43.  
  44. #define FA_ARCH        0x01
  45. #define FA_DIREC    0x02
  46. #define FA_RDONLY    0x04
  47.  
  48. struct  ftime   {
  49.     unsigned    ft_tsec  : 5;   /* Two second interval */
  50.     unsigned    ft_min   : 6;   /* Minutes */
  51.     unsigned    ft_hour  : 5;   /* Hours */
  52.     unsigned    ft_day   : 5;   /* Days */
  53.     unsigned    ft_month : 4;   /* Months */
  54.     unsigned    ft_year  : 7;   /* Year */
  55. };
  56.  
  57. struct TSearchRec
  58. {
  59.     uchar attr;
  60.     long time;
  61.     long size;
  62.     char name[PATH_MAX];
  63. };
  64.  
  65. #endif  // Uses_TSearchRec
  66.  
  67. #if defined( Uses_TFileInputLine ) && !defined( __TFileInputLine )
  68. #define __TFileInputLine
  69.  
  70. class TRect;
  71. class TEvent;
  72.  
  73. class TFileInputLine : public TInputLine
  74. {
  75.  
  76. public:
  77.  
  78.     TFileInputLine( const TRect& bounds, short aMaxLen );
  79.  
  80.     virtual void handleEvent( TEvent& event );
  81.  
  82. private:
  83.  
  84.     virtual const char *streamableName() const
  85.         { return name; }
  86.  
  87. protected:
  88.  
  89.     TFileInputLine( StreamableInit );
  90.  
  91. public:
  92.  
  93.     static const char * const name;
  94.     static TStreamable *build();
  95.  
  96. };
  97.  
  98. inline ipstream& operator >> ( ipstream& is, TFileInputLine& cl )
  99.     { return is >> (TStreamable&)cl; }
  100. inline ipstream& operator >> ( ipstream& is, TFileInputLine*& cl )
  101.     { return is >> (void *&)cl; }
  102.  
  103. inline opstream& operator << ( opstream& os, TFileInputLine& cl )
  104.     { return os << (TStreamable&)cl; }
  105. inline opstream& operator << ( opstream& os, TFileInputLine* cl )
  106.     { return os << (TStreamable *)cl; }
  107.  
  108. #endif  // Uses_TFileInputLine
  109.  
  110. #if defined( Uses_TFileCollection ) && !defined( __TFileCollection )
  111. #define __TFileCollection
  112.  
  113. class TSearchRec;
  114.  
  115. class TFileCollection: public TSortedCollection
  116. {
  117.  
  118. public:
  119.  
  120.     TFileCollection( ccIndex aLimit, ccIndex aDelta) :
  121.         TSortedCollection( aLimit, aDelta ) {}
  122.  
  123.     TSearchRec *at( ccIndex index )
  124.         { return (TSearchRec *)TSortedCollection::at( index ); }
  125.     virtual ccIndex indexOf( TSearchRec *item )
  126.         { return TSortedCollection::indexOf( item ); }
  127.  
  128.     void remove( TSearchRec *item )
  129.         { TSortedCollection::remove( item ); }
  130.     void free( TSearchRec *item )
  131.         { TSortedCollection::free( item ); }
  132.     void atInsert( ccIndex index, TSearchRec *item )
  133.         { TSortedCollection::atInsert( index, item ); }
  134.     void atPut( ccIndex index, TSearchRec *item )
  135.         { TSortedCollection::atPut( index, item ); }
  136.     virtual ccIndex insert( TSearchRec *item )
  137.         { return TSortedCollection::insert( item ); }
  138.  
  139.     TSearchRec *firstThat( ccTestFunc Test, void *arg );
  140.     TSearchRec *lastThat( ccTestFunc Test, void *arg );
  141.  
  142. private:
  143.  
  144.     virtual void freeItem( void *item )
  145.         { delete (TSearchRec *)item; }
  146.  
  147.     virtual int compare( void *key1, void *key2 );
  148.  
  149.     virtual const char *streamableName() const
  150.         { return name; }
  151.  
  152.     virtual void *readItem( ipstream& );
  153.     virtual void writeItem( void *, opstream& );
  154.  
  155. protected:
  156.  
  157.     TFileCollection( StreamableInit ) : TSortedCollection ( streamableInit ) {}
  158.  
  159. public:
  160.  
  161.     static const char * const name;
  162.     static TStreamable *build();
  163.  
  164. };
  165.  
  166. inline ipstream& operator >> ( ipstream& is, TFileCollection& cl )
  167.     { return is >> (TStreamable&)cl; }
  168. inline ipstream& operator >> ( ipstream& is, TFileCollection*& cl )
  169.     { return is >> (void *&)cl; }
  170.  
  171. inline opstream& operator << ( opstream& os, TFileCollection& cl )
  172.     { return os << (TStreamable&)cl; }
  173. inline opstream& operator << ( opstream& os, TFileCollection* cl )
  174.     { return os << (TStreamable *)cl; }
  175.  
  176. inline TSearchRec *TFileCollection::firstThat( ccTestFunc func, void *arg )
  177. {
  178.     return (TSearchRec *)TSortedCollection::firstThat( ccTestFunc(func), arg );
  179. }
  180.  
  181. inline TSearchRec *TFileCollection::lastThat( ccTestFunc func, void *arg )
  182. {
  183.     return (TSearchRec *)TSortedCollection::lastThat( ccTestFunc(func), arg );
  184. }
  185.  
  186. #endif  // Uses_TFileCollection
  187.  
  188.  
  189. #if defined( Uses_TSortedListBox ) && !defined( __TSortedListBox )
  190. #define __TSortedListBox
  191.  
  192. class TRect;
  193. class TScrollBar;
  194. class TEvent;
  195. class TSortedCollection;
  196.  
  197. class TSortedListBox: public TListBox
  198. {
  199.  
  200. public:
  201.  
  202.     TSortedListBox( const TRect& bounds,
  203.                     ushort aNumCols,
  204.                     TScrollBar *aScrollBar
  205.                   );
  206.  
  207.     virtual void handleEvent( TEvent& event );
  208.     void newList( TSortedCollection *aList );
  209. #ifndef __UNPATCHED
  210.     void *read( ipstream& is );
  211. #endif
  212.  
  213.     TSortedCollection *list();
  214.  
  215. protected:
  216.  
  217.     uchar shiftState;
  218.  
  219. private:
  220.  
  221.     virtual void *getKey( const char *s );
  222.  
  223.     short searchPos;
  224.  
  225.     virtual const char *streamableName() const
  226.         { return name; }
  227.  
  228. protected:
  229.  
  230.     TSortedListBox( StreamableInit ) : TListBox ( streamableInit ) {}
  231.  
  232. public:
  233.  
  234.     static const char * const name;
  235.     static TStreamable *build();
  236.  
  237. };
  238.  
  239. inline ipstream& operator >> ( ipstream& is, TSortedListBox& cl )
  240.     { return is >> (TStreamable&)cl; }
  241. inline ipstream& operator >> ( ipstream& is, TSortedListBox*& cl )
  242.     { return is >> (void *&)cl; }
  243.  
  244. inline opstream& operator << ( opstream& os, TSortedListBox& cl )
  245.     { return os << (TStreamable&)cl; }
  246. inline opstream& operator << ( opstream& os, TSortedListBox* cl )
  247.     { return os << (TStreamable *)cl; }
  248.  
  249. inline TSortedCollection *TSortedListBox::list()
  250. {
  251.     return (TSortedCollection *)TListBox::list();
  252. }
  253.  
  254. #endif  // Uses_TSortedListBox
  255.  
  256. #if defined( Uses_TFileList ) && !defined( __TFileList )
  257. #define __TFileList
  258.  
  259. class TRect;
  260. class TScrollBar;
  261. class TEvent;
  262.  
  263. class TFileList : public TSortedListBox
  264. {
  265.  
  266. public:
  267.  
  268.     TFileList( const TRect& bounds,
  269.                TScrollBar *aScrollBar
  270.              );
  271.     ~TFileList();
  272.  
  273.     virtual void focusItem( short item );
  274.     virtual void selectItem( short item );
  275.     virtual void getText( char *dest, short item, short maxLen );
  276.     void newList( TFileCollection *aList );
  277.     void readDirectory( const char *dir, const char *wildCard );
  278.     void readDirectory( const char *wildCard );
  279.  
  280.     virtual ushort dataSize();
  281.     virtual void getData( void *rec );
  282.     virtual void setData( void *rec );
  283.  
  284.     TFileCollection *list();
  285.  
  286. private:
  287.  
  288.     virtual void *getKey( const char *s );
  289.  
  290.     static const char * tooManyFiles;
  291.  
  292.     virtual const char *streamableName() const
  293.         { return name; }
  294.  
  295. protected:
  296.  
  297.     TFileList( StreamableInit ) : TSortedListBox ( streamableInit ) {}
  298.  
  299. public:
  300.  
  301.     static const char * const name;
  302.     static TStreamable *build();
  303.  
  304. };
  305.  
  306. inline ipstream& operator >> ( ipstream& is, TFileList& cl )
  307.     { return is >> (TStreamable&)cl; }
  308. inline ipstream& operator >> ( ipstream& is, TFileList*& cl )
  309.     { return is >> (void *&)cl; }
  310.  
  311. inline opstream& operator << ( opstream& os, TFileList& cl )
  312.     { return os << (TStreamable&)cl; }
  313. inline opstream& operator << ( opstream& os, TFileList* cl )
  314.     { return os << (TStreamable *)cl; }
  315.  
  316. inline void TFileList::newList( TFileCollection *f )
  317. {
  318.     TSortedListBox::newList( f );
  319. }
  320.  
  321. inline TFileCollection *TFileList::list()
  322. {
  323.     return (TFileCollection *)TSortedListBox::list();
  324. }
  325.  
  326. #endif  // Uses_TFileList
  327.  
  328.  
  329. #if defined( Uses_TFileInfoPane ) && !defined( __TFileInfoPane )
  330. #define __TFileInfoPane
  331.  
  332. class TRect;
  333. class TEvent;
  334.  
  335. class TFileInfoPane : public TView
  336. {
  337.  
  338. public:
  339.  
  340.     TFileInfoPane( const TRect& bounds );
  341.  
  342.     virtual void draw();
  343.     virtual TPalette& getPalette() const;
  344.     virtual void handleEvent( TEvent& event );
  345.  
  346. private:
  347.  
  348.     TSearchRec file_block;
  349.  
  350.     static const char * const months[13];
  351.     static const char * pmText;
  352.     static const char * amText;
  353.  
  354.     virtual const char *streamableName() const
  355.         { return name; }
  356.  
  357. protected:
  358.  
  359.     TFileInfoPane( StreamableInit ) : TView ( streamableInit ) {}
  360.  
  361. public:
  362.  
  363.     static const char * const name;
  364.     static TStreamable *build();
  365.  
  366. };
  367.  
  368. inline ipstream& operator >> ( ipstream& is, TFileInfoPane& cl )
  369.     { return is >> (TStreamable&)cl; }
  370. inline ipstream& operator >> ( ipstream& is, TFileInfoPane*& cl )
  371.     { return is >> (void *&)cl; }
  372.  
  373. inline opstream& operator << ( opstream& os, TFileInfoPane& cl )
  374.     { return os << (TStreamable&)cl; }
  375. inline opstream& operator << ( opstream& os, TFileInfoPane* cl )
  376.     { return os << (TStreamable *)cl; }
  377.  
  378. #endif  // Uses_TFileInfoPane
  379.  
  380. #if defined( Uses_TFileDialog ) && !defined( __TFileDialog )
  381. #define __TFileDialog
  382.  
  383. const
  384.     fdOKButton      = 0x0001,      // Put an OK button in the dialog
  385.     fdOpenButton    = 0x0002,      // Put an Open button in the dialog
  386.     fdReplaceButton = 0x0004,      // Put a Replace button in the dialog
  387.     fdClearButton   = 0x0008,      // Put a Clear button in the dialog
  388.     fdHelpButton    = 0x0010,      // Put a Help button in the dialog
  389.     fdNoLoadDir     = 0x0100;      // Do not load the current directory
  390.                                    // contents into the dialog at Init.
  391.                                    // This means you intend to change the
  392.                                    // WildCard by using SetData or store
  393.                                    // the dialog on a stream.
  394.  
  395. class TEvent;
  396. class TFileInputLine;
  397. class TFileList;
  398.  
  399. class TFileDialog : public TDialog
  400. {
  401.  
  402. public:
  403.  
  404.     TFileDialog( const char *aWildCard, const char *aTitle,
  405.                  const char *inputName, ushort aOptions, uchar histId );
  406.     ~TFileDialog();
  407.  
  408.     virtual void getData( void *rec );
  409.     void getFileName( char *s );
  410.     virtual void handleEvent( TEvent& event );
  411.     virtual void setData( void *rec );
  412.     virtual Boolean valid( ushort command );
  413.     virtual void shutDown();
  414.  
  415.     TFileInputLine *fileName;
  416.     TFileList *fileList;
  417.     char wildCard[PATH_MAX];
  418.     const char *directory;
  419.  
  420. private:
  421.  
  422.     void readDirectory();
  423.  
  424.     Boolean checkDirectory( const char * );
  425.  
  426.     static const char * filesText;
  427.     static const char * openText;
  428.     static const char * okText;
  429.     static const char * replaceText;
  430.     static const char * clearText;
  431.     static const char * cancelText;
  432.     static const char * helpText;
  433.     static const char * invalidDriveText;
  434.     static const char * invalidFileText;
  435.  
  436.     virtual const char *streamableName() const
  437.         { return name; }
  438.  
  439. protected:
  440.  
  441.     TFileDialog( StreamableInit ) : TDialog ( streamableInit ),
  442.         TWindowInit( TFileDialog::initFrame ) {}
  443.     virtual void write( opstream& );
  444.     virtual void *read( ipstream& );
  445.  
  446. public:
  447.  
  448.     static const char * const name;
  449.     static TStreamable *build();
  450.  
  451. };
  452.  
  453. inline ipstream& operator >> ( ipstream& is, TFileDialog& cl )
  454.     { return is >> (TStreamable&)cl; }
  455. inline ipstream& operator >> ( ipstream& is, TFileDialog*& cl )
  456.     { return is >> (void *&)cl; }
  457.  
  458. inline opstream& operator << ( opstream& os, TFileDialog& cl )
  459.     { return os << (TStreamable&)cl; }
  460. inline opstream& operator << ( opstream& os, TFileDialog* cl )
  461.     { return os << (TStreamable *)cl; }
  462.  
  463. #endif  // Uses_TFileDialog
  464.  
  465.  
  466. #if defined( Uses_TDirEntry ) && !defined( __TDirEntry )
  467. #define __TDirEntry
  468.  
  469. class TDirEntry
  470. {
  471.  
  472. public:
  473.  
  474.     TDirEntry( const char *, const char * );
  475.     ~TDirEntry();
  476.     char *dir() { return directory; }
  477.     char *text() { return displayText; }
  478.  
  479. private:
  480.  
  481.     char *displayText;
  482.     char *directory;
  483.  
  484. };
  485.  
  486. inline TDirEntry::TDirEntry( const char *txt, const char *dir ) :
  487.     displayText( newStr( txt ) ), directory( newStr( dir ) )
  488. {
  489. }
  490.  
  491. inline TDirEntry::~TDirEntry()
  492. {
  493.     delete displayText;
  494.     delete directory;
  495. }
  496.  
  497. #endif  // Uses_TDirEntry
  498.  
  499. #if defined( Uses_TDirCollection ) && !defined( __TDirCollection )
  500. #define __TDirCollection
  501.  
  502. class TDirEntry;
  503.  
  504. class TDirCollection : public TCollection
  505. {
  506.  
  507. public:
  508.  
  509.     TDirCollection( ccIndex aLimit, ccIndex aDelta) :
  510.         TCollection( aLimit, aDelta ) {}
  511.  
  512.     TDirEntry *at( ccIndex index )
  513.         { return (TDirEntry *)TCollection::at( index );}
  514.     virtual ccIndex indexOf( TDirEntry *item )
  515.         { return TCollection::indexOf( item ); }
  516.  
  517.     void remove( TDirEntry *item )
  518.         { TCollection::remove( item ); }
  519.     void free( TDirEntry *item )
  520.         { TCollection::free( item ); }
  521.     void atInsert( ccIndex index, TDirEntry *item )
  522.         { TCollection::atInsert( index, item ); }
  523.     void atPut( ccIndex index, TDirEntry *item )
  524.         { TCollection::atPut( index, item ); }
  525.     virtual ccIndex insert( TDirEntry *item )
  526.         { return TCollection::insert( item ); }
  527.  
  528.     TDirEntry *firstThat( ccTestFunc Test, void *arg );
  529.     TDirEntry *lastThat( ccTestFunc Test, void *arg );
  530.  
  531. private:
  532.  
  533.     virtual void freeItem( void *item )
  534.         { delete (TDirEntry *)item; }
  535.  
  536.     virtual const char *streamableName() const
  537.         { return name; }
  538.     virtual void *readItem( ipstream& );
  539.     virtual void writeItem( void *, opstream& );
  540.  
  541. protected:
  542.  
  543.     TDirCollection( StreamableInit ) : TCollection ( streamableInit ) {}
  544.  
  545. public:
  546.  
  547.     static const char * const name;
  548.     static TStreamable *build();
  549.  
  550. };
  551.  
  552. inline ipstream& operator >> ( ipstream& is, TDirCollection& cl )
  553.     { return is >> (TStreamable&)cl; }
  554. inline ipstream& operator >> ( ipstream& is, TDirCollection*& cl )
  555.     { return is >> (void *&)cl; }
  556.  
  557. inline opstream& operator << ( opstream& os, TDirCollection& cl )
  558.     { return os << (TStreamable&)cl; }
  559. inline opstream& operator << ( opstream& os, TDirCollection* cl )
  560.     { return os << (TStreamable *)cl; }
  561.  
  562. inline TDirEntry *TDirCollection::firstThat( ccTestFunc func, void *arg )
  563. {
  564.     return (TDirEntry *)TCollection::firstThat( ccTestFunc(func), arg );
  565. }
  566.  
  567. inline TDirEntry *TDirCollection::lastThat( ccTestFunc func, void *arg )
  568. {
  569.     return (TDirEntry *)TCollection::lastThat( ccTestFunc(func), arg );
  570. }
  571.  
  572. #endif  // Uses_TDirCollection
  573.  
  574.  
  575. #if defined( Uses_TDirListBox ) && !defined( __TDirListBox )
  576. #define __TDirListBox
  577.  
  578. class TRect;
  579. class TScrollBar;
  580. class TEvent;
  581. class TDirCollection;
  582.  
  583. class TDirListBox : public TListBox
  584. {
  585.  
  586. public:
  587.  
  588.     TDirListBox( const TRect& bounds, TScrollBar *aScrollBar );
  589.     ~TDirListBox();
  590.  
  591.     virtual void getText( char *, short, short );
  592. //    virtual void handleEvent( TEvent& );
  593.     virtual Boolean isSelected( short );
  594.     virtual void selectItem( short item );
  595.     void newDirectory( const char * );
  596.     virtual void setState( ushort aState, Boolean enable );
  597.  
  598.     TDirCollection *list();
  599.     static const char * pathDir;
  600.     static const char * firstDir;
  601.     static const char * middleDir;
  602.     static const char * lastDir;
  603.     static const char * graphics;
  604.  
  605. private:
  606.  
  607.     void showDrives( TDirCollection * );
  608.     void showDirs( TDirCollection * );
  609.  
  610.     char dir[PATH_MAX];
  611.     ushort cur;
  612.  
  613. //    static const char * pathDir;
  614. //    static const char * firstDir;
  615. //    static const char * middleDir;
  616. //    static const char * lastDir;
  617.     static const char * drives;
  618. //    static const char * graphics;
  619.  
  620.     virtual const char *streamableName() const
  621.         { return name; }
  622.  
  623. protected:
  624.  
  625.     TDirListBox( StreamableInit ): TListBox( streamableInit ) {}
  626.  
  627. public:
  628.  
  629.     static const char * const name;
  630.     static TStreamable *build();
  631.  
  632. };
  633.  
  634. inline ipstream& operator >> ( ipstream& is, TDirListBox& cl )
  635.     { return is >> (TStreamable&)cl; }
  636. inline ipstream& operator >> ( ipstream& is, TDirListBox*& cl )
  637.     { return is >> (void *&)cl; }
  638.  
  639. inline opstream& operator << ( opstream& os, TDirListBox& cl )
  640.     { return os << (TStreamable&)cl; }
  641. inline opstream& operator << ( opstream& os, TDirListBox* cl )
  642.     { return os << (TStreamable *)cl; }
  643.  
  644. inline TDirCollection *TDirListBox::list()
  645. {
  646.     return (TDirCollection *)TListBox::list();
  647. }
  648.  
  649. #endif  // Uses_TDirListBox
  650.  
  651. #if defined( Uses_TChDirDialog ) && !defined( __TChDirDialog )
  652. #define __TChDirDialog
  653.  
  654. const
  655.     cdNormal     = 0x0000, // Option to use dialog immediately
  656.     cdNoLoadDir  = 0x0001, // Option to init the dialog to store on a stream
  657.     cdHelpButton = 0x0002; // Put a help button in the dialog
  658.  
  659. class TEvent;
  660. class TInputLine;
  661. class TDirListBox;
  662. class TButton;
  663.  
  664. class TChDirDialog : public TDialog
  665. {
  666.  
  667. public:
  668.  
  669.     friend class TDirListBox;
  670.  
  671.     TChDirDialog( ushort aOptions, ushort histId );
  672.     virtual ushort dataSize();
  673.     virtual void getData( void *rec );
  674.     virtual void handleEvent( TEvent& );
  675.     virtual void setData( void *rec );
  676.     virtual Boolean valid( ushort );
  677.     virtual void shutDown();
  678.  
  679. private:
  680.  
  681.     void setUpDialog();
  682.  
  683.     TInputLine *dirInput;
  684.     TDirListBox *dirList;
  685.     TButton *okButton;
  686.     TButton *chDirButton;
  687.  
  688.     static const char * changeDirTitle;
  689.     static const char * dirNameText;
  690.     static const char * dirTreeText;
  691.     static const char * okText;
  692.     static const char * chdirText;
  693.     static const char * revertText;
  694.     static const char * helpText;
  695.     static const char * drivesText;
  696.     static const char * invalidText;
  697.  
  698.     virtual const char *streamableName() const
  699.         { return name; }
  700.  
  701. protected:
  702.  
  703.     TChDirDialog( StreamableInit ) : TDialog( streamableInit ),
  704.         TWindowInit( TChDirDialog::initFrame ) {}
  705.     virtual void write( opstream& );
  706.     virtual void *read( ipstream& );
  707.  
  708. public:
  709.  
  710.     static const char * const name;
  711.     static TStreamable *build();
  712.  
  713. };
  714.  
  715. inline ipstream& operator >> ( ipstream& is, TChDirDialog& cl )
  716.     { return is >> (TStreamable&)cl; }
  717. inline ipstream& operator >> ( ipstream& is, TChDirDialog*& cl )
  718.     { return is >> (void *&)cl; }
  719.  
  720. inline opstream& operator << ( opstream& os, TChDirDialog& cl )
  721.     { return os << (TStreamable&)cl; }
  722. inline opstream& operator << ( opstream& os, TChDirDialog* cl )
  723.     { return os << (TStreamable *)cl; }
  724.  
  725. #endif  // Uses_TChDirDialog
  726.