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.

107 lines
2.9 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. Added TCheckBoxes32 and code page stuff by Salvador Eduardo Tropea.
  9. *
  10. *
  11. */
  12. /* ---------------------------------------------------------------------- */
  13. /* TCheckBoxes */
  14. /* */
  15. /* Palette layout */
  16. /* 1 = Normal text */
  17. /* 2 = Selected text */
  18. /* 3 = Normal shortcut */
  19. /* 4 = Selected shortcut */
  20. /* ---------------------------------------------------------------------- */
  21. #if defined( Uses_TCheckBoxes ) && !defined( __TCheckBoxes )
  22. #define __TCheckBoxes
  23. class TRect;
  24. class TSItem;
  25. class TCheckBoxes : public TCluster
  26. {
  27. public:
  28. TCheckBoxes( const TRect& bounds, TSItem *aStrings) :
  29. TCluster( bounds, aStrings ) {};
  30. virtual void draw();
  31. virtual Boolean mark( int item );
  32. virtual void press( int item );
  33. static char button[];
  34. static char obutton[];
  35. private:
  36. #if !defined( NO_STREAM )
  37. virtual const char *streamableName() const
  38. { return name; }
  39. protected:
  40. TCheckBoxes( StreamableInit );
  41. public:
  42. static const char * const name;
  43. static TStreamable *build();
  44. #endif
  45. };
  46. // SET: That's a 32 bits version, the only difference is that it uses a
  47. // 32 bits value for set/getData
  48. class TCheckBoxes32 : public TCheckBoxes
  49. {
  50. public:
  51. TCheckBoxes32(const TRect& bounds,TSItem *aStrings) :
  52. TCheckBoxes(bounds,aStrings) {};
  53. virtual uint32 dataSize();
  54. private:
  55. #if !defined( NO_STREAM )
  56. virtual const char *streamableName() const { return name; }
  57. protected:
  58. TCheckBoxes32(StreamableInit);
  59. public:
  60. static const char * const name;
  61. static TStreamable *build();
  62. #endif
  63. };
  64. #if !defined( NO_STREAM )
  65. inline ipstream& operator >> ( ipstream& is, TCheckBoxes& cl )
  66. { return is >> (TStreamable&)cl; }
  67. inline ipstream& operator >> ( ipstream& is, TCheckBoxes*& cl )
  68. { return is >> (void *&)cl; }
  69. inline opstream& operator << ( opstream& os, TCheckBoxes& cl )
  70. { return os << (TStreamable&)cl; }
  71. inline opstream& operator << ( opstream& os, TCheckBoxes* cl )
  72. { return os << (TStreamable *)cl; }
  73. inline ipstream& operator >> ( ipstream& is, TCheckBoxes32& cl )
  74. { return is >> (TStreamable&)cl; }
  75. inline ipstream& operator >> ( ipstream& is, TCheckBoxes32*& cl )
  76. { return is >> (void *&)cl; }
  77. inline opstream& operator << ( opstream& os, TCheckBoxes32& cl )
  78. { return os << (TStreamable&)cl; }
  79. inline opstream& operator << ( opstream& os, TCheckBoxes32* cl )
  80. { return os << (TStreamable *)cl; }
  81. #endif // NO_STREAM
  82. #endif // Uses_TCheckBoxes