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.

79 lines
1.7 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_TSortedListBox ) && !defined( __TSortedListBox )
  12. #define __TSortedListBox
  13. class TRect;
  14. class TScrollBar;
  15. struct TEvent;
  16. class TSortedCollection;
  17. class TSortedListBox: public TListBox
  18. {
  19. public:
  20. TSortedListBox( const TRect& bounds,
  21. ushort aNumCols,
  22. TScrollBar *aScrollBar
  23. );
  24. TSortedListBox( const TRect& bounds, ushort aNumCols,
  25. TScrollBar *aHScrollBar, TScrollBar *aVScrollBar );
  26. virtual void handleEvent( TEvent& event );
  27. void newList( TSortedCollection *aList );
  28. TSortedCollection *list();
  29. protected:
  30. uchar shiftState;
  31. ushort searchPos; // SET: made protected not private
  32. virtual void *getKey( const char *s );
  33. private:
  34. #if !defined( NO_STREAM )
  35. virtual const char *streamableName() const
  36. { return name; }
  37. protected:
  38. TSortedListBox( StreamableInit ) : TListBox ( streamableInit ) {}
  39. virtual void *read( ipstream & is);
  40. public:
  41. static const char * const name;
  42. static TStreamable *build();
  43. #endif // NO_STREAM
  44. };
  45. inline ipstream& operator >> ( ipstream& is, TSortedListBox& cl )
  46. { return is >> (TStreamable&)cl; }
  47. inline ipstream& operator >> ( ipstream& is, TSortedListBox*& cl )
  48. { return is >> (void *&)cl; }
  49. inline opstream& operator << ( opstream& os, TSortedListBox& cl )
  50. { return os << (TStreamable&)cl; }
  51. inline opstream& operator << ( opstream& os, TSortedListBox* cl )
  52. { return os << (TStreamable *)cl; }
  53. inline TSortedCollection *TSortedListBox::list()
  54. {
  55. return (TSortedCollection *)TListBox::list();
  56. }
  57. #endif // Uses_TSortedListBox