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.

89 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_TFileList ) && !defined( __TFileList )
  12. #define __TFileList
  13. class TRect;
  14. class TScrollBar;
  15. struct TEvent;
  16. class TFileList : public TSortedListBox
  17. {
  18. public:
  19. TFileList( const TRect& bounds,
  20. TScrollBar *aScrollBar
  21. );
  22. ~TFileList();
  23. virtual void focusItem( ccIndex item );
  24. virtual void getText( char *dest, ccIndex item, short maxLen );
  25. virtual void selectItem( ccIndex item );
  26. void newList( TFileCollection *aList );
  27. void readDirectory( const char *dir, const char *wildCard );
  28. void readDirectory( const char *wildCard );
  29. virtual uint32 dataSize();
  30. virtual void getData( void *rec );
  31. virtual void setData( void *rec );
  32. TFileCollection *list();
  33. private:
  34. virtual void *getKey( const char *s );
  35. // static const char * tooManyFiles;
  36. #if !defined( NO_STREAM )
  37. virtual const char *streamableName() const
  38. { return name; }
  39. protected:
  40. TFileList( StreamableInit ) : TSortedListBox ( streamableInit ) {}
  41. public:
  42. static const char * const name;
  43. static TStreamable *build();
  44. #endif // NO_STREAM
  45. };
  46. #if !defined( NO_STREAM )
  47. inline ipstream& operator >> ( ipstream& is, TFileList& cl )
  48. { return is >> (TStreamable&)cl; }
  49. inline ipstream& operator >> ( ipstream& is, TFileList*& cl )
  50. { return is >> (void *&)cl; }
  51. inline opstream& operator << ( opstream& os, TFileList& cl )
  52. { return os << (TStreamable&)cl; }
  53. inline opstream& operator << ( opstream& os, TFileList* cl )
  54. { return os << (TStreamable *)cl; }
  55. #endif // NO_STREAM
  56. inline void TFileList::newList( TFileCollection *f )
  57. {
  58. TSortedListBox::newList( f );
  59. }
  60. inline TFileCollection *TFileList::list()
  61. {
  62. return (TFileCollection *)TSortedListBox::list();
  63. }
  64. #endif // Uses_TFileList