home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional Developers Kit 1992 November / Disc01 / Disc01.mdf / cppbeta / ibmcli / icmdhdr.hp_ / ICMDHDR.HPP
Encoding:
C/C++ Source or Header  |  1992-10-26  |  3.2 KB  |  65 lines

  1. #ifndef _ICMDHDR_
  2. #define _ICMDHDR_
  3. /*******************************************************************************
  4. * FILE NAME: icmdhdr.hpp                                                       *
  5. *                                                                              *
  6. * DESCRIPTION:                                                                 *
  7. *   Declaration of the class(es):                                              *
  8. *     ICommandHandler - the command event handler class                        *
  9. *                                                                              *
  10. * COPYRIGHT:                                                                   *
  11. *   Licensed Materials - Property of IBM                                       *
  12. *   (C) Copyright IBM Corporation 1992, 1993                                   *
  13. *   All Rights Reserved                                                        *
  14. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  15. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  16. *                                                                              *
  17. *$Log:   R:/IBMCLASS/IBASEAPP/VCS/ICMDHDR.HPV  $                                                                         *
  18. // 
  19. //    Rev 1.22   25 Oct 1992 17:59:38   nunn
  20. // Brad Broyles changes for external beta
  21.  
  22.       Rev 1.1   08 Aug 1992 12:00:00   KKL
  23.    Design/code
  24.       Rev 1.2   22 Oct 1992 12:00:00   WBB
  25.    Amend to match skeleton.hpp
  26. *******************************************************************************/
  27.  
  28. // Forward declarations for other classes:
  29. class ICommandHandler;
  30. #if !defined( _IHANDLER_ ) && !defined( I_NO_RELATED_HPP )
  31.  #include <ihandler.hpp>
  32. #endif
  33. #if !defined( _ICMDEVT_ ) && !defined( I_NO_RELATED_HPP )
  34.  #include <icmdevt.hpp>
  35. #endif
  36.  
  37. class ICommandHandler : public IHandler {
  38. /*******************************************************************************
  39. * The ICommandHandler class dispatches WM_COMMAND messages as                  *
  40. * command(ICommandEvent&) functions.                                           *
  41. *******************************************************************************/
  42. typedef IHandler Inherited;
  43. public:
  44. /*------------------------ CONSTRUCTORS/DESTRUCTORS ----------------------------
  45. | There is one way to construct instances of this class:                       |
  46. |   1. default                                                                 |
  47. ------------------------------------------------------------------------------*/
  48.   ICommandHandler() {;}
  49.  
  50. /*-------------------------------- FUNCTIONS -----------------------------------
  51. | dispatchHandlerEvent - dispatch command events for this handler              |
  52. ------------------------------------------------------------------------------*/
  53. Boolean
  54.   dispatchHandlerEvent(IEvent& evt);
  55.  
  56. protected:
  57. /*----------------------------- IMPLEMENTATION ---------------------------------
  58. | command - implemented by subclasses to handle the command events             |
  59. ------------------------------------------------------------------------------*/
  60. virtual Boolean
  61.   command(ICommandEvent& cmdevt) = 0;
  62. }; // ICommandHandler
  63.  
  64. #endif /* ICMDHDR */
  65.