// $Revision: 1.4 $ // Copyright (c) 1994-1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_GRAPHICVIEW #define TaligentSamples_GRAPHICVIEW #ifndef Taligent_ACTIVATIBLEVIEW #include #endif #ifndef Taligent_MOUSEINPUT #include #endif class TGraphicView : public TContentView, public MMouseEventHandler { public: MCollectibleDeclarationsMacro(TGraphicView); TGraphicView(); TGraphicView(const TGPoint& size, const TGPoint& location = TGPoint::kOrigin); virtual ~TGraphicView(); virtual void HandleAfterConnectionToViewRoot(); virtual void HandleBeforeDisconnectionFromViewRoot(); virtual void DrawContents(TGrafPort&) const; virtual bool MouseDown(TMouseDownEvent&); virtual void AdoptGraphic(MGraphic*); virtual void AddInteractor(TInteractor*); // these two used by interactor only. virtual void RemoveInteractor(const TInteractor&); protected: virtual void HandleDeactivate(); virtual void HandleAllocatedAreaChanged(const TGArea&); private: MGraphic* fGraphic; TInteractor* fInteractor; enum EVersion { kOriginalVersion }; }; #endif // TaligentSamples_GRAPHICVIEW