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

  1. /******************************************************************************
  2. * .FILE:         amcelcv.hpp                                                  *
  3. *                                                                             *
  4. * .DESCRIPTION:  Canvas Classes Example 3 - Multi Cell Canvas : Class Header  *
  5. *                                                                             *
  6. * .CLASSES:      APushButtonHandler                                           *
  7. *                AMultiCellCanvas                                             *
  8. *                                                                             *
  9. * .COPYRIGHT:                                                                 *
  10. *    Licensed Material - Program-Property of IBM                              *
  11. *    (C) Copyright IBM Corp. 1992, 1996 - All Rights Reserved                 *
  12. *                                                                             *
  13. * .DISCLAIMER:                                                                *
  14. *   The following [enclosed] code is sample code created by IBM               *
  15. *   Corporation.  This sample code is not part of any standard IBM product    *
  16. *   and is provided to you solely for the purpose of assisting you in the     *
  17. *   development of your applications.  The code is provided 'AS IS',          *
  18. *   without warranty of any kind.  IBM shall not be liable for any damages    *
  19. *   arising out of your use of the sample code, even if they have been        *
  20. *   advised of the possibility of such damages.                               *
  21. *                                                                             *
  22. * .NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          *
  23. *                                                                             *
  24. ******************************************************************************/
  25. #ifndef AMCELCV_HPP
  26. #define AMCELCV_HPP
  27.  
  28. #include <iframe.hpp>
  29. #include <istattxt.hpp>
  30. #include <ipushbut.hpp>
  31. #include <iradiobt.hpp>
  32. #include <icheckbx.hpp>
  33. #include <imcelcv.hpp>
  34. #include <icmdhdr.hpp>
  35.  
  36. class AMultiCellCanvas;
  37.  
  38. /******************************************************************************
  39. * Class APushButtonHandler - Push button handler                              *
  40. ******************************************************************************/
  41. class APushButtonHandler : public ICommandHandler
  42. {
  43.   public:
  44.     APushButtonHandler() : window(0) {;}
  45.  
  46.     inline APushButtonHandler
  47.      &setOwnerWindow(AMultiCellCanvas *pmcellcv) { window = pmcellcv; return *this; };
  48.   protected:
  49.     virtual Boolean
  50.       command( ICommandEvent& evt );
  51.   private:
  52.     AMultiCellCanvas
  53.      *window;
  54. };
  55.  
  56. /*******************************************************************************
  57. * Class AMultiCellCanvas - main window for multicell canvas sample application *
  58. *******************************************************************************/
  59. class AMultiCellCanvas : public IFrameWindow
  60. {
  61.   public:
  62.     AMultiCellCanvas(unsigned long windowId);
  63.  
  64.   AMultiCellCanvas&
  65.     displayButtonStatus();
  66.  
  67.   private:
  68.     IMultiCellCanvas
  69.       clientCanvas;
  70.     IStaticText
  71.       status,
  72.       title1,
  73.       title2;
  74.     ICheckBox
  75.       check1,
  76.       check2;
  77.     IRadioButton
  78.       radio1,
  79.       radio2;
  80.     IPushButton
  81.       pushButton;
  82.     APushButtonHandler
  83.       pushButtonHandler;
  84. };
  85.  
  86. #endif
  87.