// $Revision: 1.5 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TGraphDrawer > Taxonomy Category: | Documented Samples | Stock Browser:Graphing Framework > Interface Category: | Sample. > Inherits From: | None. > Inherited By: | TAxisDrawer | TBarDrawer | TLabelDrawer | TMarkDrawer | TPriceDrawer | TTitleDrawer > Purpose: | An abstract class that provides a protocol for drawing into a TStandardGraph. > Instantiation: | Normally allocated on the heap because the whole purpose of this object is to be adopted by a TStandardGraph. > Deriving Classes: | The idea is to derive from this class and override Draw, GetGeometricBounds, and GetLooseFitBounds. The function GetTargetGraph is supplied to access the graph that's being drawn into. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::TGraphDrawer ; | 1. TGraphDrawer () | 2. TGraphDrawer (const TGraphDrawer & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Copy constructor. > Calling Context: | 1. Called by the stream-in operators and derived classes. | 2. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. const TGraphDrawer & source -The object to be copied. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::~ TGraphDrawer ; | virtual ~ TGraphDrawer () > Interface Category: | Sample. > Purpose: | Destructor. > Calling Context: | Called to destroy an object. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::operator =; | TGraphDrawer & operator =(const TGraphDrawer & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TGraphDrawer & source -The object to be copied. > Return Value: | A non-const reference to the left-hand side object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::operator >>=; | virtual TStream & operator >>=(TStream & toStream) const > Interface Category: | Sample. > Purpose: | Stream-out operator. > Calling Context: | Called to stream out data. > Parameters: = TStream & toStream -The stream the object streams itself out to. > Return Value: | Returns a reference to the stream the object streams itself out to. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::operator <<= ; | virtual TStream & operator <<= (TStream & fromStream) > Interface Category: | Sample. > Purpose: | Stream-in operator. > Calling Context: | Called to stream in data. > Parameters: = TStream & fromStream -The stream the object streams itself in from. > Return Value: | Returns a reference to the stream the object streams itself in from. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::GetTargetGraph ; | virtual const TStandardGraph & GetTargetGraph () const > Interface Category: | Sample. > Purpose: | Accesses the graph derived classes are drawing into. It only allows _const_ access to the TStandardGraph because TGraphDrawer objects are not intended to modify the graphs they reside in. > Calling Context: | Usually called in the Draw, GetGeometricBounds, and GetLooseFitBounds functions to get at TStandardGraph::MapValuesToPoint. > Parameters: = Takes no parameters. > Return Value: | Returns a const reference to the graph that owns this drawer. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::DrawIntoGraph ; | virtual void DrawIntoGraph (TGrafPort & port) const > Interface Category: | Sample. > Purpose: | Allows the TGraphDrawer to draw into the graph. > Calling Context: | This function shouldn't be called by most clients. TStandardGraph objects call this function in their own Draw routines. > Parameters: = TGrafPort & port -The port to draw to. This port has already taken into account transformations to the TStandardGraph. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | Derived classes should be sure to call TStandardGraph::MapValuesToPoint in this function. This makes sure that they are drawing at the correct place in the graph. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::GetBounds ; | virtual TGRect GetBounds () const > Interface Category: | Sample. > Purpose: | Returns the aggregate bounds of the items that it draws. > Calling Context: | Generally called by TStandardGraph::GetGeometricBounds. > Parameters: = Takes no parameters. > Return Value: | Returns a TGRect of the aggregate bounds of the items that it draws. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::Prepare ; | virtual void Prepare (const TStandardGraph & graph) > Interface Category: | Sample. > Purpose: | A hook function for drawers to override in order to perform any preprocessing necessary before drawing. > Calling Context: | Called by the Graphing framework. > Parameters: = const TStandardGraph & graph -The graph object this drawer is set to draw into. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphDrawer::SetTargetGraph ; | virtual void SetTargetGraph (const TStandardGraph * graph) > Interface Category: | Sample. > Purpose: | Allows TStandardGraph objects to set themselves as the target graph when they adopt TGraphDrawers. It's not intended to be used in other ways. > Calling Context: | Called by TStandardGraph::AdoptDrawer. It sets itself as the target graph. > Parameters: = const TStandardGraph * graph -The graph that this drawer will draw into. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif