// $Revision: 1.7 $ // Copyright (c) 1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_COLORACCEPTORVIEW #define TaligentSamples_COLORACCEPTORVIEW #ifndef Taligent_SIMPLEVIEW #include #endif #ifndef Taligent_RGBCOLOR #include #endif #ifndef Taligent_DROPACCEPTOR #include #endif class TColorAcceptorView : public TSimpleView, public MDropAcceptor { public: MCollectibleDeclarationsMacro(TColorAcceptorView); TColorAcceptorView(); TColorAcceptorView(const TGPoint&, const TColor& = TRGBColor(1, 1, 1)); virtual ~TColorAcceptorView(); virtual void DrawContents(TGrafPort&) const; virtual bool ChoosePreferredType(const TGPoint& whereDropped, const TSequenceOf& availableTypes, TTypeDescription& chosenType) const; virtual bool AcceptDrop(const TGPoint& whereDropped, const TTypeDescription& theType, const TScrapItem &theItem); protected: TColorAcceptorView(const TColorAcceptorView&); // Do not use. virtual void HandleAllocatedAreaChanged(const TGArea&); private: TRGBColor fColor; }; #endif // TaligentSamples_COLORVIEW