home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-12-20 | 1.8 KB | 62 lines | [TEXT/CWIE] |
-
- ///////////////////////////////////////////////////////////////////////////////
- //
- // Constants
- //
-
-
- const short NUM_CONNECTIONS = 1; // This control only has one connection point
-
- ///////////////////////////////////////////////////////////////////////////////
- //
- // Class declaration
- //
-
- class CConsoleControl :
- public CBaseControl,
- public IDidMenuEvents
- {
- public:
- // *** CConsoleControl methods ***
- CConsoleControl(void);
- ~CConsoleControl(void);
-
- // *** IUnknown methods ***
- STDMETHOD (QueryInterface)(REFIID RefID, void** Obj);
- STDMETHOD_(ULONG,AddRef)(THIS) {CBaseControl::AddRef();}
- STDMETHOD_(ULONG,Release)(THIS) {CBaseControl::Release();}
-
- // *** IObjectWithSite methods ***
- STDMETHOD (SetSite)(THIS_ IUnknown* inUnkSite);
-
- // *** IControl methods ***
- STDMETHOD (Draw) (THIS_ DrawContext* Context);
- STDMETHOD (DoIdle)(THIS_ Uint32 IdleRefCon);
-
- // *** IDidMenuEvents methods ***
- STDMETHOD (Click)(THIS_ IUnknown* Source, PlatformEvent* Event, char * originatorName, const CMenuItem & Item);
-
- // *** IPersistPropertyBag methods ***
- STDMETHOD (Load)(IPropertyBag* propertyBag, IErrorLog* errorLog);
-
- // Event sending
- STDMETHOD (FireEvent)(REFIID RefID, long EventID, PlatformEvent* Event);
- STDMETHOD (FireOneEvent)(REFIID RefID, long EventID, IUnknown* EventTarget, EventRecord* Event);
-
- protected:
- void FinishEvent(void);
- void AddMessage(Str255 inMessage);
- void InitMessages(DrawContext* inContext);
- long ParseMenuItem(const CMenuItem & item);
-
- private:
- Str255** m_Message;
- short m_NumMsgs;
- short m_CurrentMsg;
- DWORD m_Cookie;
- CMenuItem mTempMenuItem;
- IUnknown * mClickSource; // the object that sent us the Click message
- Boolean mIsIdling; // True if we're getting idle time
- };
-
-