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.

74 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_TColorGroupList ) && !defined( __TColorGroupList )
  12. #define __TColorGroupList
  13. class TRect;
  14. class TScrollBar;
  15. class TColorGroup;
  16. class TColorItem;
  17. class TColorGroupList : public TListViewer
  18. {
  19. public:
  20. TColorGroupList( const TRect& bounds,
  21. TScrollBar *aScrollBar,
  22. TColorGroup *aGroups
  23. );
  24. virtual ~TColorGroupList();
  25. virtual void focusItem( ccIndex item );
  26. virtual void getText( char *dest, ccIndex item, short maxLen );
  27. protected:
  28. TColorGroup *groups;
  29. #if !defined( NO_STREAM )
  30. private:
  31. virtual const char *streamableName() const
  32. { return name; }
  33. static void writeItems( opstream&, TColorItem * );
  34. static void writeGroups( opstream&, TColorGroup * );
  35. static TColorItem *readItems( ipstream& );
  36. static TColorGroup *readGroups( ipstream& );
  37. protected:
  38. TColorGroupList( StreamableInit );
  39. virtual void write( opstream& );
  40. virtual void *read( ipstream& );
  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, TColorGroupList& cl )
  48. { return is >> (TStreamable&)cl; }
  49. inline ipstream& operator >> ( ipstream& is, TColorGroupList*& cl )
  50. { return is >> (void *&)cl; }
  51. inline opstream& operator << ( opstream& os, TColorGroupList& cl )
  52. { return os << (TStreamable&)cl; }
  53. inline opstream& operator << ( opstream& os, TColorGroupList* cl )
  54. { return os << (TStreamable *)cl; }
  55. #endif
  56. #endif // Uses_TColorGroupList