home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 December / VPR9712B.ISO / Nsos2 / OS2PLUG.EXE / SAMPLE / NPCLOCK / clock.hpp < prev    next >
Text File  |  1996-09-18  |  2KB  |  61 lines

  1. /***************************************************************************
  2.  *
  3.  * File name   :  clock.hpp
  4.  *
  5.  *  Copyright (C) 1996 IBM Corporation
  6.  *
  7.  *      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  8.  *      sample code created by IBM Corporation. This sample code is not
  9.  *      part of any standard or IBM product and is provided to you solely
  10.  *      for  the purpose of assisting you in the development of your
  11.  *      applications.  The code is provided "AS IS", without
  12.  *      warranty of any kind.  IBM shall not be liable for any damages
  13.  *      arising out of your use of the sample code, even if they have been
  14.  *      advised of the possibility of such damages.                            
  15.  *
  16.  ***************************************************************************/
  17.  
  18. #ifndef _CLOCK_HPP_
  19. #define _CLOCK_HPP_
  20.  
  21. #ifndef _CLOCK_
  22. #include "Clock.h"
  23. #endif
  24.  
  25. class Clock
  26. {
  27. public:
  28.        Clock();
  29.        ~Clock();
  30.   HRGN CreateRegion( HPS hps );
  31.   HRGN CreateFaceRegion( HPS hps );
  32.   void Size( RECTL& rcl, HRGN *hrgnUsed);
  33.   void Draw( HPS hps, PRECTL rclFrame, BOOL toScreen, BOOL fTransparent );
  34.   void DrawAnalog(HPS hps, BOOL fTransparent);
  35.   void DrawDigitalTime(HPS hps, RECTL& rcl, BOOL fTransparent);
  36.   BOOL Timer( HPS hps, PRECTL rclFrame);
  37.   void UpdateScreen(HPS hps, PRECTL rclFrame);
  38.   void DrawHand( HPS hps , SHORT sHandType , SHORT sAngle, LONG vclrFace[], LONG vclrHands[] );
  39.   void DrawFace( HPS hps, LONG vclrFace[] );
  40.   void DrawRing( HPS hps, LONG vclrRing[], LONG vclrFace[] );
  41.   void DrawFullCircle( HPS hps, PPOINTL pptlCenter, FIXED fxRad);
  42.   void DrawDate( HPS hps, USHORT usDrawMode);
  43.   void GetArrangedDate( CHAR achFinalDate[]);
  44.   void DrawTicks ( HPS hps , USHORT usTicks, LONG vclrMajorTicks[], LONG vclrMinorTicks[] );
  45.   void DrawTrapez( HPS hps,POINTL *aptl,LONG color);
  46.   void DrawFullRing( HPS hps,PPOINTL pptlCenter,FIXED fxRadIn, FIXED fxRadOut, LONG lColor);
  47.   void SetRGBColors();
  48.   void ShadeLight( PLONG nplColors);
  49.   BYTE ShadeRGBByte( BYTE brgb);
  50.   BYTE LightRGBByte( BYTE brgb);
  51.   void FillRect(HPS hps, RECTL & rcl);
  52.   void SetMode(USHORT dispMode);
  53.  
  54. private:
  55.   CLKDATA data;
  56.   RECTL rcl;
  57.   RECTL rclPage;
  58.  
  59. };
  60. #endif
  61.