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 / PowerPlant View / CPPActiveX.h < prev    next >
Encoding:
Text File  |  1996-12-14  |  1.6 KB  |  64 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //
  3. //    CPPActiveX.h                ©1996 Microsoft Corporation All rights reserved.
  4. //
  5. // =================================================================================
  6.  
  7. #ifndef _H_CPPActiveX
  8. #define _H_CPPActiveX
  9. #pragma once
  10.  
  11. #include "CBaseControl.h"
  12. #include <LGrafPortView.h>
  13.  
  14. #define CControl CPPActiveX
  15.  
  16. class    CPPActiveX;
  17.  
  18. class CPPContextInfo :    public CBaseContextInfo
  19. {
  20. public:
  21.                 CPPContextInfo(CPPActiveX* inControlP, Uint32 ContextID);
  22.     virtual     ~CPPContextInfo(void);
  23.  
  24.     virtual ErrorCode    Activate(Boolean8 Acquired);
  25.     virtual ErrorCode    Deactivate(Boolean8 Acquired);
  26. };
  27.  
  28. class CPPActiveX :    public CBaseControl,
  29.                     public LGrafPortView
  30. {
  31. friend CPPContextInfo;
  32. public:
  33.  
  34.     static void        InitModule();
  35.      
  36.                     CPPActiveX(void);
  37.     virtual            ~CPPActiveX(void);
  38.     
  39.     // *** IObjectWithSite methods ***
  40.     STDMETHOD (SetSite)(THIS_ IUnknown* inUnkSite);
  41.  
  42.     // *** IControl methods ***
  43.     STDMETHOD (Draw) (THIS_ DrawContext* inContext);
  44.     STDMETHOD (SetFocus)(THIS_ FocusCommand inCommand, FocusSet inFocus);
  45.     STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent);
  46.     STDMETHOD (DoKey)(THIS_ KeyEventType inKeyET, Char8 inChar, PlatformEvent* inEvent);
  47.     STDMETHOD (DoIdle)(THIS_ Uint32 IdleRefCon);
  48.     
  49.     // *** LCommander methods ***
  50.     virtual void    PutOnDuty();
  51.     virtual void    TakeOffDuty();
  52.  
  53.     virtual    void     RealignSelf(DrawContext*);
  54.     virtual    LView*    CreateMainView();
  55.     virtual void    DrawSelf();
  56.     virtual CBaseContextInfo*    NewContext(Uint32 inContextID);
  57.  
  58. private:
  59.     LView*            mMainView;
  60.     FocusSet        mOwnedFoci;
  61. };
  62.  
  63. #endif
  64.