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

  1. /******************************************************************************
  2. * .FILE:         ownhdr.hpp                                                   *
  3. *                                                                             *
  4. * .DESCRIPTION:  Create your own handler window :  Class Definitions          *
  5. *                                                                             *
  6. * .CLASSES:      MyTimeHandler                                                *
  7. *                MyWindow                                                     *
  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 _TIMEWIN_
  26. #define _TIMEWIN_
  27. #include <iframe.hpp>
  28. #include <istattxt.hpp>
  29. #include "timehdr.hpp"
  30.  
  31.  
  32. /******************************************************************************
  33. * Class MyTimeHandler - Time handler                                          *
  34. ******************************************************************************/
  35. class MyTimeHandler : public ATimeHandler
  36. {
  37.   public:
  38. /*------------------------ Constructors/Destructor ----------------------------
  39. | Construct the object in only one way:                                       |
  40. | 1) Parameter for updating static text                                       |
  41. -----------------------------------------------------------------------------*/
  42.     MyTimeHandler( IStaticText* staticText );
  43.  
  44.   protected:
  45. /*----------------------------- Override Callbacks ----------------------------
  46. | These functions provide a means of getting notification of events:           |
  47. |   tick                - Called when a timed event occur                      |
  48. -----------------------------------------------------------------------------*/
  49.     virtual Boolean
  50.       tick( IEvent& event );
  51.  
  52.   private:
  53.     IStaticText
  54.      *pText;
  55. };
  56.  
  57.  
  58. /******************************************************************************
  59. * Class MyWindow - Main window                                                *
  60. ******************************************************************************/
  61. class MyWindow : public IFrameWindow
  62. {
  63.   public:
  64. /*------------------------ Constructors/Destructor ----------------------------
  65. | Construct the object in only one way:                                       |
  66. | 1) No parameters.                                                           |
  67. -----------------------------------------------------------------------------*/
  68.     MyWindow();
  69.     virtual
  70.      ~MyWindow();
  71.  
  72.   private:
  73.     IStaticText
  74.       staticText;
  75.     MyTimeHandler
  76.       timeHdr;
  77. };
  78. #endif
  79.