home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ICLUI.ZIP / MCELCV / AMCELCV.HPP < prev    next >
Text File  |  1993-03-09  |  4KB  |  78 lines

  1. #ifndef AMCELCV_HPP
  2. #define AMCELCV_HPP
  3. /******************************************************************************/
  4. /* Canvas Classes Example 3 - Multi Cell Canvas                               */
  5. /*                                                                            */
  6. /* COPYRIGHT: Copyright (C) International Business Machines Corp., 1992,1993. */
  7. /*                                                                            */
  8. /* DISCLAIMER OF WARRANTIES:                                                  */
  9. /*   The following [enclosed] code is sample code created by IBM              */
  10. /*   Corporation.  This sample code is not part of any standard IBM product   */
  11. /*   and is provided to you solely for the purpose of assisting you in the    */
  12. /*   development of your applications.  The code is provided "AS IS",         */
  13. /*   without warranty of any kind.  IBM shall not be liable for any damages   */
  14. /*   arising out of your use of the sample code, even if they have been       */
  15. /*   advised of the possibility of such damages.                              */
  16. /******************************************************************************/
  17. /* NOTE: WE RECOMMEND USING A FIXED SPACE FONT TO LOOK AT THE SOURCE          */
  18. /******************************************************************************/
  19.  
  20. #include <iframe.hpp>                   // IFrameWindow
  21. #include <istattxt.hpp>                 // IStaticText
  22. #include <ipushbut.hpp>                 // IPushButton
  23. #include <iradiobt.hpp>                 // IRadioButton
  24. #include <icheckbx.hpp>                 // ICheckBox
  25. #include <imcelcv.hpp>                  // IMultiCellCanvas
  26. #include <icmdhdr.hpp>                  // ICommandHandler
  27.  
  28. class AMultiCellCanvas;                 // forward declaration of class
  29. /******************************************************************************/
  30. /* Class   : APushButtonHandler                                               */
  31. /*                                                                            */
  32. /* Purpose : this is the command handler for the push button                  */
  33. /*           the push button handler uses the displayButtonStatus function    */
  34. /*           from the multi-cell canvas when the button is pressed            */
  35. /*           APushButtonHandler is derived from ICommandHandler               */
  36. /******************************************************************************/
  37. class APushButtonHandler : public ICommandHandler
  38. {
  39.   public:
  40.     APushButtonHandler() : window(0) {;}
  41.     setOwnerWindow(AMultiCellCanvas *pmcellcv) { window = pmcellcv; }
  42.   protected:
  43.     command( ICommandEvent& evt );
  44.   private:
  45.     AMultiCellCanvas  * window;
  46. };
  47. /******************************************************************************/
  48. /* Class   : AMultiCellCanvas                                                 */
  49. /*                                                                            */
  50. /* Purpose : main window for multi cell canvas sample application             */
  51. /*           the window contains a multi-cell canvas and the other controls   */
  52. /*           are attached to the canvas.  The pushbutton displays a           */
  53. /*           message box showing the current state of the buttons             */
  54. /*           AMultiCellCanvas is derived from IFrameWindow                    */
  55. /******************************************************************************/
  56. class AMultiCellCanvas : public IFrameWindow
  57. {
  58.   public:
  59.     AMultiCellCanvas(unsigned long windowId);
  60.  
  61. AMultiCellCanvas&
  62.     displayButtonStatus();
  63.  
  64.   private:
  65.     IMultiCellCanvas    clientCanvas;
  66.     IStaticText         status,
  67.                         title1,
  68.                         title2;
  69.     ICheckBox           check1,
  70.                         check2;
  71.     IRadioButton        radio1,
  72.                         radio2;
  73.     IPushButton         pushButton;
  74.     APushButtonHandler  pushButtonHandler;
  75. };
  76.  
  77. #endif
  78.