home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-01-31 | 1.5 KB | 47 lines | [TEXT/R*ch] |
- // ===========================================================================
- // File: CExternalCmdKeyAttachment.h
- // Version: 1.0.1 - Jan 31, 1997
- // Author: Mike Shields (mshields@inconnect.com)
- //
- // Copyright ©1996 Mike Shields. All rights reserved.
- // ===========================================================================
- //
- // Class which handles drawing and responding to command keys when it is attached
- // to a button
-
- #pragma once
-
- #include "CCmdKeyAttachment.h"
-
- class CExternalCmdKeyAttachment : public CCmdKeyAttachment
-
- {
- public:
- enum { position_Top = 0x0001,
- position_Left = 0x0002,
- position_Bottom = 0x0003,
- position_Right = 0x0004 };
-
- enum { class_ID = 'EXck' };
- static CExternalCmdKeyAttachment* CreateFromStream(LStream *inStream);
-
- CExternalCmdKeyAttachment();
- CExternalCmdKeyAttachment(LStream *inStream);
- virtual ~CExternalCmdKeyAttachment();
-
- virtual void EnableCommandKey(Boolean inCmdDown);
-
- virtual void SetCommandKeyLocation(Int16 inLocation) { mCommandKeyLocation = inLocation; };
- virtual Int16 GetCommandKeyLocation(void) const { return mCommandKeyLocation; };
-
- virtual void SetCommandKeyOffset(Point& inPosition) { mCommandKeyOffset = inPosition; };
- virtual Point GetCommandKeyOffset(void) const { return mCommandKeyOffset; };
-
- protected:
- virtual void GetCommandKeyPosition(Point& outPosition);
- virtual void DrawCommandKey(Boolean inVisible);
-
- Point mCommandKeyOffset;
- Int16 mCommandKeyLocation;
- };
-