home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / IOC / LANCELOT / LGENERIC.HPP < prev    next >
C/C++ Source or Header  |  1995-04-01  |  2KB  |  45 lines

  1. /*******************************************************************************
  2. * FILE NAME: lgeneric.hpp                                                      *
  3. *                                                                              *
  4. * DESCRIPTION:                                                                 *
  5. *                                                                              *
  6. * Class                                                                        *
  7. *   AcheckBoxHandler                                                           *
  8. *                                                                              *
  9. * COPYRIGHT:                                                                   *
  10. *   Licensed Materials - Property of IBM                                       *
  11. *   (C) Copyright IBM Corporation 1992, 1995                                   *
  12. *   All Rights Reserved                                                        *
  13. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  14. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  15. *                                                                              *
  16. * CHANGE HISTORY:                                                              *
  17. *******************************************************************************/
  18. #ifndef _LGENERIC_
  19. #define _LGENERIC_
  20.  
  21.  
  22. #include <iselhdr.hpp>
  23. /******************************************************************************/
  24. /* Class   : ACheckBoxHandler                                                 */
  25. /*                                                                            */
  26. /* Purpose : this is the select handler for a check box.                      */
  27. /*           The button handler is called when a radio button is selected.    */
  28. /*           ACheckBoxHandler is derived from ISelectHandler                  */
  29. /******************************************************************************/
  30. class ACheckBoxHandler : public ISelectHandler
  31. {
  32. public:
  33.    enum Toggle { false, true };
  34.    ACheckBoxHandler() : toggle(true) {};
  35.    inline ACheckBoxHandler&  setToggle(Toggle tog ) { toggle = tog;return *this;};
  36.    Toggle getToggle() { return toggle; };
  37. protected:
  38.    Boolean selected      ( IControlEvent& evt );
  39. private:
  40.    Toggle   toggle;
  41. };
  42.  
  43.  
  44. #endif
  45.