home *** CD-ROM | disk | FTP | other *** search
/ ...taking it to the Macs! / ...taking it to the Macs!.iso / Extras / ActiveX Mac SDK / ActiveX SDK / Containers / ContainerControl / CControlContainer.h < prev    next >
Encoding:
Text File  |  1996-12-15  |  2.6 KB  |  77 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //    CControlContainer.h            ©1996-97 Microsoft Corporation All rights reserved.
  3. // =================================================================================
  4.  
  5. #ifndef _H_CControlContainer
  6. #define _H_CControlContainer
  7. #pragma once
  8.  
  9. #include "CBaseSite.h"
  10. #include "download.h"
  11. #define    __HEADERS_H__
  12. #include "ccontainer.h"
  13. #include "CBaseControl.h"
  14.  
  15. class CControlSite;
  16.  
  17. typedef struct
  18. {
  19.     CControlSite*    Control;
  20.     Uint32            ControlRefCon;
  21.     Uint32            ContainerRefCon;
  22. }
  23. SchedControlMap;
  24.  
  25. class CControlContainer : 
  26.     public CBaseControl, 
  27.     public CContainer
  28. {
  29.  
  30. public:
  31.     // *** CControlContainer methods ***
  32.     CControlContainer(void);
  33.     ~CControlContainer(void);
  34.  
  35.     virtual CControlSite*    FindSiteHitBy (Point inWhere);
  36.     virtual ErrorCode        RequestFocus (CControlSite* inSiteP, Boolean inAcquire, FocusSet inFocusSet);
  37.     virtual    ErrorCode        SetIdleTime(CControlSite* inSiteP, Int32 WaitTicks, Uint32 IdleRefCon);
  38.     
  39.     //  *** IUnknown methods ***
  40.     STDMETHOD (QueryInterface) (REFIID inRefID, void** outObj);
  41.     STDMETHOD_(Uint32,AddRef) (THIS) {return CBaseControl::AddRef();}
  42.     STDMETHOD_(Uint32,Release) (THIS) {return CBaseControl::Release();}
  43.  
  44.     // *** IControl methods ***
  45.     STDMETHOD (Draw) (THIS_ DrawContext* inContext);
  46.     STDMETHOD (OnContextChange) (THIS_ UInt32 inContextID, ContextCommand inCommand);
  47.     STDMETHOD (SetFocus) (THIS_ FocusCommand inCommand, FocusSet inFocus);
  48.     STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent);
  49.     STDMETHOD (DoKey)(THIS_ KeyEventType inKeyET, Char8 inChar, PlatformEvent* inEvent);
  50.     STDMETHOD (DoActivate)(THIS_ ActivateEventType inActiveET, UInt32 inContextID, PlatformEvent* inEvent);
  51.     STDMETHOD (DoIdle)(THIS_ Uint32 IdleRefCon);
  52.  
  53. private:
  54.  
  55.     // *** private methods ***
  56.     void        CreateTextEditControl (Uint32 inTop, Uint32 inLeft, Uint32 inHeight, Uint32 inWidth);
  57.     ArrayIndexT    FirstFocus (FocusSet Focus, Boolean8 forward);
  58.     void        FocusTaken (FocusSet inFocus, CControlSite* inSiteP);
  59.     Boolean8    HaveFocus (FocusSet Focus);
  60.     ArrayIndexT    NextFocus (Boolean8 forward, ArrayIndexT index);
  61.     void        ReleaseFocus (FocusSet Focus);
  62.     ErrorCode    RequestReleaseFocus (FocusSet Focus);
  63.     ErrorCode    RemoveControlIdler (CControlSite* inSiteP);
  64.     ErrorCode    RemoveRefConIdler (CControlSite* inSiteP, Uint32 inIdleRefCon);
  65.     ErrorCode    SetIdleTimeSelf (CControlSite* inSiteP, Int32 inWaitTicks, Uint32 inIdleRefCon);
  66.     ErrorCode    TakeFocus (FocusCommand Command, FocusSet Focus);
  67.  
  68.     // *** private members ***
  69.     CControlSite*    mFocusSite;
  70.     CControlSite*    mModalFocusSite;
  71.     CControlSite*    mLastSiteClicked;
  72.     LArray*            mScheduledControlsMap;
  73.     Uint32            mMapRefCon;
  74. };
  75.  
  76. #endif
  77.