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.

75 lines
1.5 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_TColorSelector ) && !defined( __TColorSelector )
  12. #define __TColorSelector
  13. class TRect;
  14. struct TEvent;
  15. class TColorSelector : public TView
  16. {
  17. public:
  18. enum ColorSel { csBackground, csForeground };
  19. TColorSelector( const TRect& Bounds, ColorSel ASelType );
  20. virtual void draw();
  21. virtual void handleEvent( TEvent& event );
  22. static char icon;
  23. static char oicon;
  24. static char mark;
  25. static char omark;
  26. protected:
  27. uchar color;
  28. ColorSel selType;
  29. private:
  30. void colorChanged();
  31. #if !defined( NO_STREAM )
  32. virtual const char *streamableName() const
  33. { return name; }
  34. protected:
  35. TColorSelector( StreamableInit );
  36. virtual void write( opstream& );
  37. virtual void *read( ipstream& );
  38. public:
  39. static const char * const name;
  40. static TStreamable *build();
  41. #endif // NO_STREAM
  42. };
  43. #if !defined( NO_STREAM )
  44. inline ipstream& operator >> ( ipstream& is, TColorSelector& cl )
  45. { return is >> (TStreamable&)cl; }
  46. inline ipstream& operator >> ( ipstream& is, TColorSelector*& cl )
  47. { return is >> (void *&)cl; }
  48. inline opstream& operator << ( opstream& os, TColorSelector& cl )
  49. { return os << (TStreamable&)cl; }
  50. inline opstream& operator << ( opstream& os, TColorSelector* cl )
  51. { return os << (TStreamable *)cl; }
  52. #endif // NO_STREAM
  53. #endif // Uses_TColorSelector