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 / Events / CEventClient.h < prev    next >
Encoding:
Text File  |  1996-11-19  |  1.6 KB  |  55 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //
  3. //    CEventClient.h                ©1996 Microsoft Corporation All rights reserved.
  4. //
  5. // =================================================================================
  6.  
  7. #ifndef _H_CEventClient
  8. #define _H_CEventClient
  9. #pragma once
  10.  
  11. #include "CBaseControl.h"
  12.  
  13. class CEventClient :  
  14.     public CBaseControl,
  15.     public IStandardEvents
  16. {
  17. public:
  18.     //  *** CEventClient methods ***
  19.     CEventClient(void);
  20.     virtual ~CEventClient(void);
  21.  
  22.     //  *** IUnknown methods ***
  23.     STDMETHOD (QueryInterface)(REFIID inRefID, void** outObj);
  24.     STDMETHOD_(Uint32,AddRef)(THIS) {return CBaseControl::AddRef();}
  25.     STDMETHOD_(Uint32,Release)(THIS) {return CBaseControl::Release();}
  26.     
  27.     // *** IObjectWithSite methods ***
  28.     STDMETHOD (SetSite)(THIS_ IUnknown* inUnkSite);
  29.  
  30.     // *** IControl methods ***
  31.     STDMETHOD (Draw) (THIS_ DrawContext* inContext);
  32.     STDMETHOD (DoIdle)(THIS_ Uint32 inIdleRefCon);
  33.  
  34.     // **** IStandardEvents methods
  35.     STDMETHOD (OnDoubleClick)(THIS_ IUnknown* inSource, PlatformEvent* inEvent);
  36.     STDMETHOD (OnKeyDown)(THIS_ IUnknown* inSource, PlatformEvent* inEvent);
  37.     STDMETHOD (OnAutoKey)(THIS_ IUnknown* inSource, PlatformEvent* inEvent);
  38.     STDMETHOD (OnKeyUp)(THIS_ IUnknown* inSource, PlatformEvent* inEvent);
  39.     STDMETHOD (OnMouseDown)(THIS_ IUnknown* inSource, PlatformEvent* inEvent);
  40.     STDMETHOD (OnMouseUp)(THIS_ IUnknown* inSource, PlatformEvent* inEvent);
  41.     
  42.  
  43. private:
  44.     Str255**         mMessage;
  45.     Int16            mNumMsgs;
  46.     Int16            mCurrentMsg;
  47.     Uint32            mCookie;
  48.  
  49.     void    FinishEvent(void);
  50.     void    AddMessage(Str255 inMessage);
  51.     void    InitMessages(void);  
  52. };
  53.  
  54. #endif
  55.