// $Revision: 1.4 $ // Copyright (C) 1994 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_GRAPHICDOCUMENTVIEW #define TaligentSamples_GRAPHICDOCUMENTVIEW //----------------------------------------------------------------------------- // // Copyright (C) 1995 Taligent, Inc. All rights reserved. // // Project: WebRunner Sample // File: WebPresenter.h // Build/Version: 1.0.0 // //----------------------------------------------------------------------------- #ifndef TaligentSamples_DROPACCEPTOR #include #endif #ifndef TaligentSamples_GUICOMPOUNDDOCUMENT #include #endif #ifndef TaligentSamples_ATOMICMODEL #include #endif //============================================================================= // TGraphicDocumentView class TGraphicDocumentView : public TDocumentComponentView, public MDropAcceptor, public MMouseEventHandler { public: VersionDeclarationsMacro(TGraphicDocumentView); public: TGraphicDocumentView(TGUIBundle* bundle); virtual TStream& operator>>=(TStream& toStream) const; virtual TStream& operator<<=(TStream& fromStream); virtual void DrawContents(TGrafPort& port) const; void HandleAllocatedAreaChanged(const TGArea& newArea); virtual bool MouseDown(TMouseDownEvent& event); protected: TGraphicDocumentView(); TGraphicDocumentView( const TGraphicDocumentView& source); virtual bool ChoosePreferredType(const TGPoint& whereDropped, const TSequenceOf& availableTypes, TTypeDescription& chosenType) const; bool AcceptDrop(const TGPoint& droppedAt, const TTypeDescription& type, const TScrapItem& item); const MGraphic* LookupGraphic() const; void AdoptGraphic(MGraphic* toGraphic) const; private: enum {kOriginalVersion}; TGrafMatrix fGrafMatrix; }; #endif