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.

90 lines
2.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. /* ---------------------------------------------------------------------- */
  12. /* class TFrame */
  13. /* */
  14. /* Palette layout */
  15. /* 1 = Passive frame */
  16. /* 2 = Passive title */
  17. /* 3 = Active frame */
  18. /* 4 = Active title */
  19. /* 5 = Icons */
  20. /* ---------------------------------------------------------------------- */
  21. #if defined( Uses_TFrame ) && !defined( __TFrame )
  22. #define __TFrame
  23. class TRect;
  24. struct TEvent;
  25. class TDrawBuffer;
  26. class TFrame : public TView
  27. {
  28. public:
  29. TFrame( const TRect& bounds );
  30. virtual void draw();
  31. virtual TPalette& getPalette() const;
  32. virtual void handleEvent( TEvent& event );
  33. virtual void setState( ushort aState, Boolean enable );
  34. static char frameChars[33];
  35. static char closeIcon[];
  36. static char zoomIcon[];
  37. static char unZoomIcon[];
  38. static char dragIcon[];
  39. static char oframeChars[33];
  40. static char ocloseIcon[];
  41. static char ozoomIcon[];
  42. static char ounZoomIcon[];
  43. static char odragIcon[];
  44. private:
  45. void frameLine( TDrawBuffer& frameBuf, short y, short n, uchar color );
  46. void dragWindow( TEvent& event, uchar dragMode );
  47. friend class TDisplay;
  48. static const char initFrame[19];
  49. #if !defined( NO_STREAM )
  50. virtual const char *streamableName() const
  51. { return name; }
  52. protected:
  53. TFrame( StreamableInit );
  54. public:
  55. static const char * const name;
  56. static TStreamable *build();
  57. #endif // NO_STREAM
  58. };
  59. #if !defined( NO_STREAM )
  60. inline ipstream& operator >> ( ipstream& is, TFrame& cl )
  61. { return is >> (TStreamable&)cl; }
  62. inline ipstream& operator >> ( ipstream& is, TFrame*& cl )
  63. { return is >> (void *&)cl; }
  64. inline opstream& operator << ( opstream& os, TFrame& cl )
  65. { return os << (TStreamable&)cl; }
  66. inline opstream& operator << ( opstream& os, TFrame* cl )
  67. { return os << (TStreamable *)cl; }
  68. #endif // NO_STREAM
  69. #endif // Uses_TFrame