home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-15 | 2.6 KB | 77 lines | [TEXT/CWIE] |
- // =================================================================================
- // CControlContainer.h ©1996-97 Microsoft Corporation All rights reserved.
- // =================================================================================
-
- #ifndef _H_CControlContainer
- #define _H_CControlContainer
- #pragma once
-
- #include "CBaseSite.h"
- #include "download.h"
- #define __HEADERS_H__
- #include "ccontainer.h"
- #include "CBaseControl.h"
-
- class CControlSite;
-
- typedef struct
- {
- CControlSite* Control;
- Uint32 ControlRefCon;
- Uint32 ContainerRefCon;
- }
- SchedControlMap;
-
- class CControlContainer :
- public CBaseControl,
- public CContainer
- {
-
- public:
- // *** CControlContainer methods ***
- CControlContainer(void);
- ~CControlContainer(void);
-
- virtual CControlSite* FindSiteHitBy (Point inWhere);
- virtual ErrorCode RequestFocus (CControlSite* inSiteP, Boolean inAcquire, FocusSet inFocusSet);
- virtual ErrorCode SetIdleTime(CControlSite* inSiteP, Int32 WaitTicks, Uint32 IdleRefCon);
-
- // *** IUnknown methods ***
- STDMETHOD (QueryInterface) (REFIID inRefID, void** outObj);
- STDMETHOD_(Uint32,AddRef) (THIS) {return CBaseControl::AddRef();}
- STDMETHOD_(Uint32,Release) (THIS) {return CBaseControl::Release();}
-
- // *** IControl methods ***
- STDMETHOD (Draw) (THIS_ DrawContext* inContext);
- STDMETHOD (OnContextChange) (THIS_ UInt32 inContextID, ContextCommand inCommand);
- STDMETHOD (SetFocus) (THIS_ FocusCommand inCommand, FocusSet inFocus);
- STDMETHOD (DoMouse)(THIS_ MouseEventType inMouseET, PlatformEvent* inEvent);
- STDMETHOD (DoKey)(THIS_ KeyEventType inKeyET, Char8 inChar, PlatformEvent* inEvent);
- STDMETHOD (DoActivate)(THIS_ ActivateEventType inActiveET, UInt32 inContextID, PlatformEvent* inEvent);
- STDMETHOD (DoIdle)(THIS_ Uint32 IdleRefCon);
-
- private:
-
- // *** private methods ***
- void CreateTextEditControl (Uint32 inTop, Uint32 inLeft, Uint32 inHeight, Uint32 inWidth);
- ArrayIndexT FirstFocus (FocusSet Focus, Boolean8 forward);
- void FocusTaken (FocusSet inFocus, CControlSite* inSiteP);
- Boolean8 HaveFocus (FocusSet Focus);
- ArrayIndexT NextFocus (Boolean8 forward, ArrayIndexT index);
- void ReleaseFocus (FocusSet Focus);
- ErrorCode RequestReleaseFocus (FocusSet Focus);
- ErrorCode RemoveControlIdler (CControlSite* inSiteP);
- ErrorCode RemoveRefConIdler (CControlSite* inSiteP, Uint32 inIdleRefCon);
- ErrorCode SetIdleTimeSelf (CControlSite* inSiteP, Int32 inWaitTicks, Uint32 inIdleRefCon);
- ErrorCode TakeFocus (FocusCommand Command, FocusSet Focus);
-
- // *** private members ***
- CControlSite* mFocusSite;
- CControlSite* mModalFocusSite;
- CControlSite* mLastSiteClicked;
- LArray* mScheduledControlsMap;
- Uint32 mMapRefCon;
- };
-
- #endif
-