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.

108 lines
3.0 KiB

8 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 TRadioButtons32 and code page stuff by Salvador Eduardo Tropea.
  9. *
  10. *
  11. */
  12. /* ---------------------------------------------------------------------- */
  13. /* class TRadioButtons */
  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_TRadioButtons ) && !defined( __TRadioButtons )
  22. #define __TRadioButtons
  23. class TRect;
  24. class TSItem;
  25. class TRadioButtons : public TCluster
  26. {
  27. public:
  28. TRadioButtons( const TRect& bounds, TSItem *aStrings ) :
  29. TCluster( bounds, aStrings ) {};
  30. virtual void draw();
  31. virtual Boolean mark( int item );
  32. virtual void movedTo( int item );
  33. virtual void press( int item );
  34. virtual void setData( void *rec );
  35. static char button[];
  36. static char obutton[];
  37. static char check;
  38. static char ocheck;
  39. private:
  40. #if !defined( NO_STREAM )
  41. virtual const char *streamableName() const
  42. { return name; }
  43. protected:
  44. TRadioButtons( StreamableInit );
  45. public:
  46. static const char * const name;
  47. static TStreamable *build();
  48. #endif // NO_STREAM
  49. };
  50. class TRadioButtons32 : public TRadioButtons
  51. {
  52. public:
  53. TRadioButtons32(const TRect& bounds,TSItem *aStrings) :
  54. TRadioButtons(bounds,aStrings) {};
  55. virtual uint32 dataSize();
  56. private:
  57. #if !defined( NO_STREAM )
  58. virtual const char *streamableName() const { return name; }
  59. protected:
  60. TRadioButtons32(StreamableInit);
  61. public:
  62. static const char * const name;
  63. static TStreamable *build();
  64. #endif // NO_STREAM
  65. };
  66. #if !defined( NO_STREAM )
  67. inline ipstream& operator >> ( ipstream& is, TRadioButtons& cl )
  68. { return is >> (TStreamable&)cl; }
  69. inline ipstream& operator >> ( ipstream& is, TRadioButtons*& cl )
  70. { return is >> (void *&)cl; }
  71. inline opstream& operator << ( opstream& os, TRadioButtons& cl )
  72. { return os << (TStreamable&)cl; }
  73. inline opstream& operator << ( opstream& os, TRadioButtons* cl )
  74. { return os << (TStreamable *)cl; }
  75. inline ipstream& operator >> ( ipstream& is, TRadioButtons32& cl )
  76. { return is >> (TStreamable&)cl; }
  77. inline ipstream& operator >> ( ipstream& is, TRadioButtons32*& cl )
  78. { return is >> (void *&)cl; }
  79. inline opstream& operator << ( opstream& os, TRadioButtons32& cl )
  80. { return os << (TStreamable&)cl; }
  81. inline opstream& operator << ( opstream& os, TRadioButtons32* cl )
  82. { return os << (TStreamable *)cl; }
  83. #endif // NO_STREAM
  84. #endif // Uses_TRadioButtons