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.

113 lines
3.0 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. Modified for i18n support by Salvador Eduardo Tropea.
  9. *
  10. *
  11. */
  12. #if defined( Uses_TWindow ) && !defined( __TWindow )
  13. #define __TWindow
  14. class TFrame;
  15. class TRect;
  16. class TPoint;
  17. struct TEvent;
  18. class TFrame;
  19. class TScrollBar;
  20. class TWindowInit
  21. {
  22. public:
  23. TWindowInit( TFrame *(*cFrame)( TRect ) );
  24. protected:
  25. TFrame *(*createFrame)( TRect );
  26. };
  27. /* ---------------------------------------------------------------------- */
  28. /* class TWindow */
  29. /* */
  30. /* Palette layout */
  31. /* 1 = Frame passive */
  32. /* 2 = Frame active */
  33. /* 3 = Frame icon */
  34. /* 4 = ScrollBar page area */
  35. /* 5 = ScrollBar controls */
  36. /* 6 = Scroller normal text */
  37. /* 7 = Scroller selected text */
  38. /* 8 = Reserved */
  39. /* ---------------------------------------------------------------------- */
  40. class TWindow: public TGroup, public virtual TWindowInit
  41. {
  42. public:
  43. TWindow( const TRect& bounds,
  44. const char *aTitle,
  45. short aNumber
  46. );
  47. ~TWindow();
  48. virtual void close();
  49. virtual TPalette& getPalette() const;
  50. virtual const char *getTitle( short maxSize );
  51. virtual void handleEvent( TEvent& event );
  52. static TFrame *initFrame( TRect );
  53. virtual void setState( ushort aState, Boolean enable );
  54. virtual void sizeLimits( TPoint& min, TPoint& max );
  55. TScrollBar *standardScrollBar( ushort aOptions );
  56. virtual void zoom();
  57. virtual void shutDown();
  58. uchar flags;
  59. TRect zoomRect;
  60. short number;
  61. short palette;
  62. TFrame *frame;
  63. const char *title;
  64. stTVIntl *intlTitle;
  65. #if !defined( NO_STREAM )
  66. private:
  67. virtual const char *streamableName() const
  68. { return name; }
  69. protected:
  70. TWindow( StreamableInit );
  71. virtual void write( opstream& );
  72. virtual void *read( ipstream& );
  73. public:
  74. static const char * const name;
  75. static TStreamable *build();
  76. #endif // NO_STREAM
  77. };
  78. #if !defined( NO_STREAM )
  79. inline ipstream& operator >> ( ipstream& is, TWindow& cl )
  80. { return is >> (TStreamable&)cl; }
  81. inline ipstream& operator >> ( ipstream& is, TWindow*& cl )
  82. { return is >> (void *&)cl; }
  83. inline opstream& operator << ( opstream& os, TWindow& cl )
  84. { return os << (TStreamable&)cl; }
  85. inline opstream& operator << ( opstream& os, TWindow* cl )
  86. { return os << (TStreamable *)cl; }
  87. #endif // NO_STREAM
  88. #endif // Uses_TWindow