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

  1. /******************************************************************************
  2. * .FILE:         asetcv.hpp                                                   *
  3. *                                                                             *
  4. * .DESCRIPTION:  Set Canvas Example:  Class Headers                           *
  5. *                                                                             *
  6. * .CLASSES:      AButtonHandler                                               *
  7. *                ASetCanvas                                                   *
  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 ASETCV_HPP
  26. #define ASETCV_HPP
  27.  
  28. #include <iframe.hpp>                   // IFrameWindow
  29. #include <istattxt.hpp>                 // IStaticText
  30. #include <iradiobt.hpp>                 // IRadioButton
  31. #include <isetcv.hpp>                   // ISetCanvas
  32. #include <isplitcv.hpp>                 // ISplitCanvas
  33. #include <iselhdr.hpp>                  // ISelectHandler
  34.  
  35. /******************************************************************************
  36. * Class AButtonHandler - Select handler to handle radio buttons               *                                                                          *
  37. ******************************************************************************/
  38. class AButtonHandler : public ISelectHandler
  39. {
  40.   public:
  41. /*------------------------------ Constructor ---------------------------------|
  42. | Constructs the object with:                                                 |
  43. | 1) a pointer to the static text string of the status area                   |
  44. -----------------------------------------------------------------------------*/
  45.     AButtonHandler(IStaticText * pstatus) : output(pstatus) {}
  46.  
  47.   protected:
  48. /*--------------------------- Overloaded Functions ---------------------------|
  49. | selected -- handles selections of the radio buttons                         |
  50. -----------------------------------------------------------------------------*/
  51.     virtual Boolean
  52.       selected( IControlEvent& evt );
  53.  
  54.   private:
  55.     IStaticText
  56.      *output;
  57. };
  58.  
  59. /******************************************************************************
  60. * Class ASetCanvas -- Main window for set canvas sample                       *
  61. ******************************************************************************/
  62. class ASetCanvas : public IFrameWindow
  63. {
  64.   public:
  65. /*------------------------------ Constructor ---------------------------------|
  66. | Constructs the object with:                                                 |
  67. | 1) the window id                                                            |
  68. -----------------------------------------------------------------------------*/
  69.     ASetCanvas(unsigned long windowId);
  70.  
  71. /*------------------------------- Destructor ---------------------------------|
  72. | Destructs the object with:                                                  |
  73. | 1) No Parameters                                                            |
  74. -----------------------------------------------------------------------------*/
  75.    ~ASetCanvas();
  76.  
  77.   private:
  78.     ISplitCanvas
  79.       clientCanvas;
  80.     IStaticText
  81.       status;
  82.     ISetCanvas
  83.       vSetCanvas,
  84.       hSetCanvas;
  85.     IRadioButton
  86.      *radiobut[NUMBER_OF_BUTTONS];
  87.     AButtonHandler
  88.       buttonHandler;
  89. };
  90.  
  91. #endif
  92.