home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Sample Controls / Clock / CClockControl.h < prev    next >
Encoding:
Text File  |  1996-12-03  |  1.5 KB  |  51 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //
  3. //    CClockControl.h                ©1996 Microsoft Corporation All rights reserved.
  4. //
  5. // =================================================================================
  6.  
  7. #ifndef _H_CClockControl
  8. #define _H_CClockControl
  9. #pragma once
  10.  
  11. #include "CBaseControl.h"
  12.  
  13. class CClockControl : public CBaseControl
  14. {
  15.  
  16. public:
  17.     // *** CClockControl methods ***
  18.     CClockControl(void);
  19.     ~CClockControl(void);
  20.     
  21.     // *** IControl methods ***
  22.     STDMETHOD (Draw) (THIS_ DrawContext* inContext);
  23.     STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent);
  24.     STDMETHOD(DoIdle)(THIS_ Uint32 IdleRefCon);
  25.  
  26. protected:
  27.     virtual Boolean8    StartIdling(void);
  28.     virtual Boolean8    StopIdling(void);
  29.  
  30. private:
  31.     void DrawAllContexts();
  32.  
  33.     // *** private methods ***
  34.     void        DrawMe(Rect *BoundsRect, Int32 ContextIndex);
  35.     void        DrawHands(Rect *ClockRect, DateTimeRec *Time, RGBColor *Color, Boolean8 Erasing, Int16 Pressed);
  36.     void        FigureHandPoints(Int16 Angle, double LengthPercent, Int16 WidthPixels, Rect *ClockRect, Int16 *XArray, Int16 *YArray);
  37.     Int16        Reflection(Int16 InboundLight, Int16 StartX, Int16 StartY, Int16 EndX, Int16 EndY);
  38.     void        HighlightHands(Int16 LightAngle, Int16 HandAngle, RGBColor *Color, Boolean Erasing, Int16 *XArray, Int16 *YArray);
  39.  
  40.     // *** private members ***
  41.     DateTimeRec mTime;
  42.     DateTimeRec mEraseTime;
  43.     Int32         mHandsDirty;
  44.     Int32         mFaceDirty;
  45.     Boolean8     mIsPressed;
  46.     Boolean8    mIsIdling;
  47.     
  48. };
  49.  
  50. #endif
  51.