home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / VISBUILD / CALCULAT / CPPOV13 / IMYKYBRD.HPP < prev   
Text File  |  1995-05-15  |  2KB  |  70 lines

  1. //****************************************************************************
  2. // ICaptureMyKeys Class - C++ Header File (imykybrd.hpp)                     *
  3. //                                                                           *
  4. // COPYRIGHT: Copyright (C) International Business Machines Corp., 1994,1995 *
  5. //                                                                           *
  6. // DISCLAIMER OF WARRANTIES:                                                 *
  7. //   The following [enclosed] code is sample code created by IBM             *
  8. //   Corporation.  This sample code is not part of any standard IBM product  *
  9. //   and is provided to you solely for the purpose of assisting you in the   *
  10. //   development of your applications.  The code is provided "AS IS",        *
  11. //   without warranty of any kind.  IBM shall not be liable for any damages  *
  12. //   arising out of your use of the sample code, even if they have been      *
  13. //   advised of the possibility of such damages.                             *
  14. //****************************************************************************
  15. //NOTE: WE RECOMMEND USING A FIXED-SPACE FONT TO LOOK AT THE SOURCE.
  16. //
  17.  
  18. #include <istring.hpp>
  19. #include <ikeyevt.hpp>   // IKeyboardEvent
  20. #include <ikeyhdr.hpp>   // IKeyboardHandler
  21.  
  22. #ifndef _IENTRYFD_
  23. #include <ientryfd.hpp>
  24. #endif
  25.  
  26. #ifndef _IPUSHBUT_
  27. #include <ipushbut.hpp>
  28. #endif
  29.  
  30. #include "ikeypad.hpp"
  31.  
  32. //**************************************************************************
  33. // Class:   ICaptureMyKeys
  34. //
  35. // Purpose: Captures the numeric keys entered from the keyboard and the
  36. //          arithmetic operation keys plus the equal (=) sign.
  37. //
  38. //***************************************************************************
  39.  
  40. class  _Export  ICaptureMyKeys : public IKeyboardHandler
  41.  
  42. {
  43. public:
  44.  
  45.   ICaptureMyKeys :: ICaptureMyKeys(IPushButton & ipluspb,IPushButton & isubpb,
  46.                                 IPushButton & imulpb, IPushButton & idivpb,
  47.                                 IPushButton & iequalpb,IKeypad & ikeypad);
  48.   ~ICaptureMyKeys();     //destructor
  49.  
  50. // Implementor Method Functions
  51.  
  52. protected:
  53.  
  54. Boolean  characterKeyPress(IKeyboardEvent& keyevt);
  55.  
  56.  
  57. private:
  58.  
  59. // private member data
  60.  
  61. IPushButton & PlusPB;
  62. IPushButton & MinusPB;
  63. IPushButton & MultiplicationPB;
  64. IPushButton & DivisionPB;
  65. IPushButton & EqualPB;
  66. IKeypad & Keypad;
  67.  
  68. };   //ICaptureMyKeys
  69.  
  70.