// $Revision: 1.4 $ // Copyright (c) 1994-1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_KEYINPUTVIEW #define TaligentSamples_KEYINPUTVIEW #ifndef Taligent_ACTIVATIBLEVIEW #include #endif #ifndef Taligent_KEYBOARDINPUT #include #endif class TKeyInputView : public TContentView, public MKeyEventHandler { public: MCollectibleDeclarationsMacro(TKeyInputView); TKeyInputView(); TKeyInputView(const TGPoint& size, const TGPoint& location = TGPoint::kOrigin); virtual ~TKeyInputView(); virtual void HandleAfterConnectionToViewRoot(); virtual void HandleBeforeDisconnectionFromViewRoot(); virtual void DrawContents(TGrafPort&) const; virtual bool KeyDown(TKeyDownEvent&); protected: virtual void HandleAllocatedAreaChanged(const TGArea&); private: TVirtualKeyCode::EVirtualKey fLastKey; TModifierKeys fLastModifiers; enum EVersion { kOriginalVersion }; }; #endif // TaligentSamples_KEYINPUTVIEW