// $Revision: 1.4 $ // Copyright (c) 1994-1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_MOUSEINPUTVIEW #define TaligentSamples_MOUSEINPUTVIEW #ifndef Taligent_ACTIVATIBLEVIEW #include #endif #ifndef Taligent_MOUSEINPUT #include #endif class TMouseInputView : public TContentView, public MMouseEventHandler { public: MCollectibleDeclarationsMacro(TMouseInputView); TMouseInputView(); TMouseInputView(const TGPoint& size, const TGPoint& location = TGPoint::kOrigin); virtual ~TMouseInputView(); virtual void HandleAfterConnectionToViewRoot(); virtual void HandleBeforeDisconnectionFromViewRoot(); virtual void DrawContents(TGrafPort&) const; virtual bool MouseEntered(TMouseMovedEvent&); virtual bool MouseExited(TMouseMovedEvent&); virtual bool MouseMoved(TMouseMovedEvent&); protected: virtual void HandleAllocatedAreaChanged(const TGArea&); private: TMouseInputDevice* fTrackedMouse; TGPoint fLastLocation; enum EVersion { kOriginalVersion }; }; #endif // TaligentSamples_MOUSEINPUTVIEW