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 / PictPlayer / CPictControl.h < prev    next >
Encoding:
Text File  |  1996-12-20  |  1.6 KB  |  65 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //
  3. //    CPictControl.h                ©1996 Microsoft Corporation All rights reserved.
  4. //
  5. // =================================================================================
  6.  
  7. #ifndef _H_CPictControl
  8. #define _H_CPictControl
  9. #pragma once
  10.  
  11. #include "CBaseControl.h"
  12.  
  13. class CPictControlBSC;
  14.  
  15. typedef struct
  16. {
  17.     CPictControlBSC*    BSC;
  18.     Rect                PicRect;
  19.     PicHandle            Pic;
  20. }
  21. pictinfo;
  22.  
  23. class CPictControl:
  24.         public CBaseControl
  25. {
  26.     friend CPictControlBSC;    //    needs access to our private SetData method
  27.  
  28. public:
  29.     // *** CPictControl methods ***
  30.     CPictControl();
  31.     ~CPictControl();
  32.  
  33.     // *** IControl methods ***
  34.     STDMETHOD (Draw) (THIS_ DrawContext* inContext);
  35.     STDMETHOD (SetFocus) (THIS_ FocusCommand inCommand, FocusSet inFocus);
  36.     STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent);
  37.     STDMETHOD (DoIdle)(THIS_ Uint32 IdleRefCon);
  38.  
  39.     //  *** IPersistPropertyBag methods ***
  40.     STDMETHOD (Load)(IPropertyBag* PropBag, IErrorLog* ErrorLog);
  41.  
  42. protected:
  43.     //    *** CBaseControl method overrides ***
  44.     virtual Boolean8    StartIdling(void);
  45.     virtual Boolean8    StopIdling(void);
  46.  
  47.     //  *** CPictControl methods ***
  48.     void         DrawPict(GrafPtr pGrafDraw, Rect* lprect, PicHandle Pic, Rect* PictRect);
  49.     Boolean8    HandlePopUpMenuClick(PlatformPoint inEventLocation);
  50.     void        SetData(Handle Data, Uint32 PictIndex);
  51.     void        AdvancePict(void);
  52.  
  53.     //  *** CPictControl members ***
  54.     Point                mSize;
  55.     Int32                mCycleWaitTime;
  56.     Handle                mDataURLBuffer;
  57.     pictinfo**            mPicts;
  58.     Int16                mCurrentPict;
  59.     Int16                mPictCount;
  60.     Boolean8            mAutoCycle;
  61.     FocusSet            mOwnedFoci;
  62. };
  63.  
  64. #endif
  65.