home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / ioc / lancelot / lgeneric.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-22  |  2.8 KB  |  51 lines

  1. /******************************************************************************
  2. * .FILE:         lgeneric.hpp                                                 *
  3. *                                                                             *
  4. * .DESCRIPTION:  Lancelot Sample Program:              Class Definition       *
  5. *                                                                             *
  6. * .CLASSES:      ACheckBoxHandler                                             *
  7. *                                                                             *
  8. * .COPYRIGHT:                                                                 *
  9. *    Licensed Material - Program-Property of IBM                              *
  10. *    (C) Copyright IBM Corp. 1992, 1996 - All Rights Reserved                 *
  11. *                                                                             *
  12. * .DISCLAIMER:                                                                *
  13. *   The following [enclosed] code is sample code created by IBM               *
  14. *   Corporation.  This sample code is not part of any standard IBM product    *
  15. *   and is provided to you solely for the purpose of assisting you in the     *
  16. *   development of your applications.  The code is provided 'AS IS',          *
  17. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  18. *   arising out of your use of the sample code, even if they have been        *
  19. *   advised of the possibility of such damages.                               *
  20. *                                                                             *
  21. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  22. *                                                                             *
  23. ******************************************************************************/
  24. #ifndef _LGENERIC_
  25. #define _LGENERIC_
  26.  
  27.  
  28. #include <iselhdr.hpp>
  29. /******************************************************************************/
  30. /* Class   : ACheckBoxHandler                                                 */
  31. /*                                                                            */
  32. /* Purpose : this is the select handler for a check box.                      */
  33. /*           The button handler is called when a radio button is selected.    */
  34. /*           ACheckBoxHandler is derived from ISelectHandler                  */
  35. /******************************************************************************/
  36. class ACheckBoxHandler : public ISelectHandler
  37. {
  38. public:
  39.    enum Toggle { false, true };
  40.    ACheckBoxHandler() : toggle(true) {};
  41.    inline ACheckBoxHandler&  setToggle(Toggle tog ) { toggle = tog;return *this;};
  42.    Toggle getToggle() { return toggle; };
  43. protected:
  44.    Boolean selected      ( IControlEvent& evt );
  45. private:
  46.    Toggle   toggle;
  47. };
  48.  
  49.  
  50. #endif
  51.