// $Revision: 1.9 $ //------------------------------------------------------------------------------ // // Copyright (C) 1994, 1995 Taligent, Inc. All rights reserved. // // Project: StockBrowser // File: TitleDrawer.h // Build/Version: 1.0.0 // // Description: TTitleDrawer draws an axis-title aligned with either the // x- or y-axis of a TStandardGraph. // //------------------------------------------------------------------------------ #ifndef TaligentSamples_TITLEDRAWER #define TaligentSamples_TITLEDRAWER class TTitleDrawer; #ifndef TaligentSamples_GRAPHDRAWER #include "GraphDrawer.h" #endif #ifndef Taligent_FONTSTYLES #include #endif #ifndef Taligent_TEXTDISPLAY #include #endif //============================================================================== // TTitleDrawer class TTitleDrawer : public TGraphDrawer { public: enum ETitleType { kInvalidType, kXAxisTitle, kYAxisTitle }; TTitleDrawer( ETitleType xOrYAxisTitle, const GCoordinate& distanceFromAxis, const TStandardText& titleText, const TFontPointSizeStyle& fontSize = TFontPointSizeStyle::GetDefaultFontPointSizeStyle(), const TFontFamilyStyle& font = TFontFamilyStyle::GetDefaultFontFamilyStyle()); TTitleDrawer(const TTitleDrawer& source); virtual ~TTitleDrawer(); TTitleDrawer& operator=(const TTitleDrawer& source); virtual TStream& operator>>=(TStream& toStream) const; virtual TStream& operator<<=(TStream& fromStream); // TGraphDrawer overrides virtual void Prepare(const TStandardGraph& theGraph); virtual void DrawIntoGraph(TGrafPort& port) const; virtual TGRect GetBounds() const; protected: TTitleDrawer(); private: enum {kOriginalVersion}; TTextDisplay fTitle; GCoordinate fDistance; ETitleType fType; }; #endif