home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_144 / 9.ddi / TVSRC.ZIP / TRADIOBU.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  1.6 KB  |  55 lines

  1. /*------------------------------------------------------------*/
  2. /* filename -       tradiobu.cpp                              */
  3. /*                                                            */
  4. /* function(s)                                                */
  5. /*                  TRadioButton member functions             */
  6. /*------------------------------------------------------------*/
  7.  
  8. /*------------------------------------------------------------*/
  9. /*                                                            */
  10. /*    Turbo Vision -  Version 1.0                             */
  11. /*                                                            */
  12. /*                                                            */
  13. /*    Copyright (c) 1991 by Borland International             */
  14. /*    All Rights Reserved.                                    */
  15. /*                                                            */
  16. /*------------------------------------------------------------*/
  17.  
  18. #define Uses_TRadioButtons
  19. #include <tv.h>
  20.  
  21. void TRadioButtons::draw()
  22. {
  23.     drawBox( button, 7 );
  24. }
  25.  
  26. Boolean TRadioButtons::mark( int item )
  27. {
  28.     return Boolean( item == value );
  29. }
  30.  
  31. void TRadioButtons::press( int item )
  32. {
  33.     value = item;
  34. }
  35.  
  36. void TRadioButtons::movedTo( int item )
  37. {
  38.     value = item;
  39. }
  40.  
  41. void TRadioButtons::setData( void * rec )
  42. {
  43.     TCluster::setData(rec);
  44.     sel = value;
  45. }
  46.  
  47. TStreamable *TRadioButtons::build()
  48. {
  49.     return new TRadioButtons( streamableInit );
  50. }
  51.  
  52. TRadioButtons::TRadioButtons( StreamableInit ) : TCluster( streamableInit )
  53. {
  54. }
  55.