// $Revision: 1.7 $ //------------------------------------------------------------------------------ // // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. // // Project: StockBrowser // File: MarkDrawer.h // Build/Version: 1.0.0 // // Description: TMarkDrawer holds all of the pertinent data about // drawing marks except for exact location; that is up to // the derived class. // // TXMarkDrawer draws marks along the x-axis. TYMarkDrawer // draws marks along the y-axis. // //------------------------------------------------------------------------------ #ifndef TaligentSamples_MARKDRAWER #define TaligentSamples_MARKDRAWER class TMarkDrawer; class TXMarkDrawer; class TYMarkDrawer; #ifndef TaligentSamples_GRAPHDRAWER #include "GraphDrawer.h" #endif #ifndef Taligent_RGBCOLOR #include #endif #ifndef Taligent_GRAFATTRIBUTE #include #endif //============================================================================== // TMarkDrawer class TMarkDrawer : public TGraphDrawer { public: TaligentTypeExtensionDeclarationsMacro_Abstract(TMarkDrawer) public: virtual const TRGBColor& GetMarkColor() const; virtual GraphValue GetMarkLength() const; virtual GraphValue GetMarkInterval() const; virtual void SetMarkColor(const TRGBColor& color); virtual void SetMarkLength(GraphValue length); virtual void SetMarkInterval(GraphValue interval); virtual void DrawIntoGraph(TGrafPort& port) const = 0; protected: TMarkDrawer(); TMarkDrawer(GraphValue markLength, GraphValue markInterval, const TPaint& markColor = TColorPaint::GetBlack()); TMarkDrawer(const TMarkDrawer& source); virtual ~TMarkDrawer(); TMarkDrawer& operator=(const TMarkDrawer& source); virtual TStream& operator>>=(TStream& toStream) const; virtual TStream& operator<<=(TStream& fromStream); private: enum {kOriginalVersion}; TRGBColor fMarkColor; GraphValue fMarkLength; GraphValue fMarkInterval; }; //============================================================================== // TXMarkDrawer class TXMarkDrawer : public TMarkDrawer { public: TaligentTypeExtensionDeclarationsMacro(TXMarkDrawer) public: TXMarkDrawer(); TXMarkDrawer(GraphValue markLength, GraphValue markInterval); TXMarkDrawer(const TXMarkDrawer& source); virtual ~TXMarkDrawer(); TXMarkDrawer& operator=(const TXMarkDrawer& source); virtual TStream& operator>>=(TStream& toStream) const; virtual TStream& operator<<=(TStream& fromStream); virtual void DrawIntoGraph(TGrafPort& port) const; virtual TGRect GetBounds() const; private: enum {kOriginalVersion}; }; //============================================================================== // TYMarkDrawer class TYMarkDrawer : public TMarkDrawer { public: TaligentTypeExtensionDeclarationsMacro(TYMarkDrawer) public: TYMarkDrawer(); TYMarkDrawer(GraphValue markLength, GraphValue markInterval); TYMarkDrawer(const TYMarkDrawer& source); virtual ~TYMarkDrawer(); TYMarkDrawer& operator=(const TYMarkDrawer& source); virtual TStream& operator>>=(TStream& toStream) const; virtual TStream& operator<<=(TStream& fromStream); virtual void DrawIntoGraph(TGrafPort& port) const; virtual TGRect GetBounds() const; private: enum {kOriginalVersion}; }; #endif