home *** CD-ROM | disk | FTP | other *** search
- /*
- * Attach an instance of LButtonKeyAtt to an LStdButton in a PowerPlant
- * window. If the user holds down the command key, a "*X" symbol will
- * appear next to the button - where * is the symbol on the command key
- * and X is the uppercase version of the first letter of the button.
- * If the user presses this key combination, the button is clicked.
- *
- * Placed in the public domain by Roger Pantos, Sept. 24 1995.
- */
-
- #pragma once
-
- #include <LAttachable.h>
- #include <LPeriodical.h>
-
- class LCommander;
-
-
- class LButtonKeyAtt : public LAttachment, private LPeriodical
- {
- public:
- enum { class_ID = 'BKAt' };
- static LButtonKeyAtt *CreateFrom( LStream *inStream);
-
- LButtonKeyAtt();
- virtual ~LButtonKeyAtt();
-
- virtual void SetOwnerHost( LAttachable *inOwnerHost);
-
- protected:
- virtual void SpendTime( const EventRecord &inMacEvent);
-
- virtual void ExecuteSelf( MessageT inMessage, void *ioParam);
-
- void SetHint( Boolean visible);
- void GetHintPos( const Rect& localPaneR, Point *pPos);
-
- LCommander *fKeyHandler;
- Byte fKeyChar;
- Boolean fHintVis;
- };
-
-
-