home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / visbuild / calculat / cppwv13 / imykybrd.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-16  |  3.1 KB  |  78 lines

  1. /******************************************************************************
  2. * .FILE:        imykybrd.hpp                                                  *
  3. *                                                                             *
  4. * .DESCRIPTION: Header file for the class, ICaptureMyKeys                     *
  5. *                                                                             *
  6. * .CLASSES:     ICaptureMyKeys                                                *
  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.  
  25. #include <istring.hpp>
  26. #include <ikeyevt.hpp>   // IKeyboardEvent
  27. #include <ikeyhdr.hpp>   // IKeyboardHandler
  28.  
  29. #ifndef _IENTRYFD_
  30. #include <ientryfd.hpp>
  31. #endif
  32.  
  33. #ifndef _IPUSHBUT_
  34. #include <ipushbut.hpp>
  35. #endif
  36.  
  37. #include "ivbsamps.h"
  38. #include "ikeypad.hpp"
  39.  
  40. //**************************************************************************
  41. // Class:   ICaptureMyKeys
  42. //
  43. // Purpose: Captures the numeric keys entered from the keyboard and the
  44. //          arithmetic operation keys plus the equal (=) sign.
  45. //
  46. //***************************************************************************
  47.  
  48. class IVBSAMP_IMPORT ICaptureMyKeys : public IKeyboardHandler
  49.  
  50. {
  51. public:
  52.  
  53.   ICaptureMyKeys :: ICaptureMyKeys(IPushButton & ipluspb,IPushButton & isubpb,
  54.                                 IPushButton & imulpb, IPushButton & idivpb,
  55.                                 IPushButton & iequalpb,IKeypad & ikeypad);
  56.   ~ICaptureMyKeys();     //destructor
  57.  
  58. // Implementor Method Functions
  59.  
  60. protected:
  61.  
  62. Boolean  characterKeyPress(IKeyboardEvent& keyevt);
  63.  
  64.  
  65. private:
  66.  
  67. // private member data
  68.  
  69. IPushButton & PlusPB;
  70. IPushButton & MinusPB;
  71. IPushButton & MultiplicationPB;
  72. IPushButton & DivisionPB;
  73. IPushButton & EqualPB;
  74. IKeypad & Keypad;
  75.  
  76. };   //ICaptureMyKeys
  77.  
  78.