You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
1.9 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Turbo Vision - Version 2.0
  3. *
  4. * Copyright (c) 1994 by Borland International
  5. * All Rights Reserved.
  6. *
  7. Modified by Robert H�hne to be used for RHIDE.
  8. *
  9. *
  10. */
  11. #if defined( Uses_TChDirDialog ) && !defined( __TChDirDialog )
  12. #define __TChDirDialog
  13. const ushort
  14. cdNormal = 0x0000, // Option to use dialog immediately
  15. cdNoLoadDir = 0x0001, // Option to init the dialog to store on a stream
  16. cdHelpButton = 0x0002; // Put a help button in the dialog
  17. struct TEvent;
  18. class TInputLine;
  19. class TDirListBox;
  20. class TButton;
  21. class TChDirDialog : public TDialog
  22. {
  23. public:
  24. friend class TDirListBox;
  25. TChDirDialog( ushort aOptions, ushort histId );
  26. virtual uint32 dataSize();
  27. virtual void getData( void *rec );
  28. virtual void handleEvent( TEvent& );
  29. virtual void setData( void *rec );
  30. virtual Boolean valid( ushort );
  31. virtual void shutDown();
  32. private:
  33. void setUpDialog();
  34. TInputLine *dirInput;
  35. TDirListBox *dirList;
  36. TButton *okButton;
  37. TButton *chDirButton;
  38. #if !defined( NO_STREAM )
  39. virtual const char *streamableName() const
  40. { return name; }
  41. protected:
  42. TChDirDialog( StreamableInit ) :
  43. TWindowInit( &TChDirDialog::initFrame )
  44. , TDialog( streamableInit ) {}
  45. virtual void write( opstream& );
  46. virtual void *read( ipstream& );
  47. public:
  48. static const char * const name;
  49. static TStreamable *build();
  50. #endif // NO_STREAM
  51. };
  52. #if !defined( NO_STREAM )
  53. inline ipstream& operator >> ( ipstream& is, TChDirDialog& cl )
  54. { return is >> (TStreamable&)cl; }
  55. inline ipstream& operator >> ( ipstream& is, TChDirDialog*& cl )
  56. { return is >> (void *&)cl; }
  57. inline opstream& operator << ( opstream& os, TChDirDialog& cl )
  58. { return os << (TStreamable&)cl; }
  59. inline opstream& operator << ( opstream& os, TChDirDialog* cl )
  60. { return os << (TStreamable *)cl; }
  61. #endif // NO_STREAM
  62. #endif // Uses_TChDirDialog