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.4 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_TBackground ) && !defined( __TBackground )
  12. #define __TBackground
  13. class TRect;
  14. class TBackground : public TView
  15. {
  16. public:
  17. TBackground( const TRect& bounds, char aPattern );
  18. virtual void draw();
  19. virtual TPalette& getPalette() const;
  20. void changePattern(char newP) { pattern=newP; draw(); }
  21. char getPattern(void) { return pattern; }
  22. protected:
  23. char pattern;
  24. #if !defined( NO_STREAM )
  25. private:
  26. virtual const char *streamableName() const
  27. { return name; }
  28. protected:
  29. TBackground( StreamableInit );
  30. virtual void write( opstream& );
  31. virtual void *read( ipstream& );
  32. public:
  33. static const char * const name;
  34. static TStreamable *build();
  35. #endif
  36. };
  37. #if !defined( NO_STREAM )
  38. inline ipstream& operator >> ( ipstream& is, TBackground& cl )
  39. { return is >> (TStreamable&)cl; }
  40. inline ipstream& operator >> ( ipstream& is, TBackground*& cl )
  41. { return is >> (void *&)cl; }
  42. inline opstream& operator << ( opstream& os, TBackground& cl )
  43. { return os << (TStreamable&)cl; }
  44. inline opstream& operator << ( opstream& os, TBackground* cl )
  45. { return os << (TStreamable *)cl; }
  46. #endif // NO_STREAM
  47. #endif // Uses_TBackground