home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-01-31 | 1.4 KB | 46 lines | [TEXT/R*ch] |
- // ===========================================================================
- // File: CCmdKeyAttachment.h
- // Version: 1.0.1 - Jan 31, 1997
- // Author: Mike Shields (mshields@inconnect.com)
- //
- // Copyright ©1996 Mike Shields. All rights reserved.
- // ===========================================================================
- //
- // Abstract class to handle drawing and responding to command keys when it is attached
- // to a button
-
- #pragma once
-
- #include <LPeriodical.h>
- #include <LAttachment.h>
-
- class LControl;
- class LCommander;
-
- class CCmdKeyAttachment : public LAttachment,
- public LPeriodical
-
- {
- public:
- static CCmdKeyAttachment* CreateFromStream(LStream *inStream);
-
- CCmdKeyAttachment();
- CCmdKeyAttachment(LStream *inStream);
- virtual ~CCmdKeyAttachment();
-
- virtual void SetOwnerHost(LAttachable *inOwnerHost);
- virtual void SpendTime(const EventRecord& inMacEvent);
- virtual void EnableCommandKey(Boolean inCmdDown) = 0;
- virtual void SetCommandKey(Uchar inCmdKey) { mCommandKey = inCmdKey; };
- virtual Uchar GetCommandKey(void) const { return mCommandKey; };
-
- protected:
- virtual void SetOwnerHostSelf(LAttachable *inOwnerHost);
- virtual void ExecuteSelf(MessageT inMessage, void* ioParam);
- virtual void DrawCommandKey(Boolean inVisible) = 0;
-
- LControl* mMyControl;
- LCommander* mSuperCommander;
- Uchar mCommandKey;
- };
-