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.

65 lines
1.3 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_TColorDisplay ) && !defined( __TColorDisplay )
  12. #define __TColorDisplay
  13. class TRect;
  14. struct TEvent;
  15. class TColorDisplay : public TView
  16. {
  17. public:
  18. TColorDisplay( const TRect& bounds, const char *aText );
  19. virtual ~TColorDisplay();
  20. virtual void draw();
  21. virtual void handleEvent( TEvent& event );
  22. virtual void setColor( uchar *aColor );
  23. protected:
  24. uchar *color;
  25. const char *text;
  26. private:
  27. virtual const char *streamableName() const
  28. { return name; }
  29. protected:
  30. TColorDisplay( StreamableInit );
  31. virtual void write( opstream& );
  32. virtual void *read( ipstream& );
  33. public:
  34. static const char * const name;
  35. static TStreamable *build();
  36. };
  37. inline ipstream& operator >> ( ipstream& is, TColorDisplay& cl )
  38. { return is >> (TStreamable&)cl; }
  39. inline ipstream& operator >> ( ipstream& is, TColorDisplay*& cl )
  40. { return is >> (void *&)cl; }
  41. inline opstream& operator << ( opstream& os, TColorDisplay& cl )
  42. { return os << (TStreamable&)cl; }
  43. inline opstream& operator << ( opstream& os, TColorDisplay* cl )
  44. { return os << (TStreamable *)cl; }
  45. #endif // Uses_TColorDisplay