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.

94 lines
2.1 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 by Salvador E. Tropea, tile, options, cursor behavior, etc.
  9. *
  10. *
  11. */
  12. #if defined( Uses_TDeskTop ) && !defined( __TDeskTop )
  13. #define __TDeskTop
  14. // SET: To set the tile partition priority
  15. const unsigned dsktTileVertical=1, dsktTileHorizontal=0;
  16. class TBackground;
  17. class TRect;
  18. struct TEvent;
  19. class TDeskInit
  20. {
  21. public:
  22. TDeskInit( TBackground *(*cBackground)( TRect ) );
  23. protected:
  24. TBackground *(*createBackground)( TRect );
  25. };
  26. class TDeskTop : public TGroup, public virtual TDeskInit
  27. {
  28. public:
  29. TDeskTop( const TRect& );
  30. void cascade( const TRect& );
  31. virtual void handleEvent( TEvent& );
  32. static TBackground *initBackground( TRect );
  33. void tile( const TRect& );
  34. virtual void tileError();
  35. virtual void shutDown();
  36. TBackground *getBackground(void) { return background; }
  37. // SET: Added to setup the tileable options
  38. unsigned getOptions() { return flagsOptions; }
  39. void setOptions(unsigned aFlags) { flagsOptions=aFlags; }
  40. virtual Boolean canShowCursor();
  41. // SET: Added to help Braille Terminals
  42. virtual ushort execView( TView *p );
  43. // SET: Made non-constant and added original
  44. static char defaultBkgrnd;
  45. static char odefaultBkgrnd;
  46. protected:
  47. TBackground *background;
  48. unsigned flagsOptions;
  49. private:
  50. #if !defined( NO_STREAM )
  51. virtual const char *streamableName() const
  52. { return name; }
  53. protected:
  54. TDeskTop( StreamableInit );
  55. public:
  56. static const char * const name;
  57. static TStreamable *build();
  58. #endif // NO_STREAM
  59. };
  60. #if !defined( NO_STREAM )
  61. inline ipstream& operator >> ( ipstream& is, TDeskTop& cl )
  62. { return is >> (TStreamable&)(TGroup&)cl; }
  63. inline ipstream& operator >> ( ipstream& is, TDeskTop*& cl )
  64. { return is >> (void *&)cl; }
  65. inline opstream& operator << ( opstream& os, TDeskTop& cl )
  66. { return os << (TStreamable&)(TGroup&)cl; }
  67. inline opstream& operator << ( opstream& os, TDeskTop* cl )
  68. { return os << (TStreamable *)(TGroup *)cl; }
  69. #endif // NO_STREAM
  70. #endif