// $Revision: 1.5 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TPriceDrawer > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Inherits From: | TGraphDrawer > Inherited By: | None. > Purpose: | Adopts a collection of TStockDay objects and draws a graphic representing each TStockDay. > Instantiation: | Always allocate on the heap (see TGraphDrawer). > Deriving Classes: | No special instructions. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TPriceDrawer::TPriceDrawer ; | 1. TPriceDrawer () | 2. TPriceDrawer (GraphValue dataPointWidth, GraphValue dataPointInterval, TCollectionOf < TStockDay > * stocksForAdoption) | 3. TPriceDrawer (const TPriceDrawer & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Standard constructor. | 3. Copy constructor. > Calling Context: | 1. Called by derived classes and to construct an object. | 2. Called to construct a valid object. | 3. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. GraphValue dataPointWidth -The width, in points, of the graphics that represent the TStockDay objects. = 2. GraphValue dataPointInterval -How often the TStockDay objects are drawn on the graph. The interval is not in points, it's in values. = 2. TCollectionOf < TStockDay > * stocksForAdoption -The TStockDay objects that the drawing is based off of. = 3. const TPriceDrawer & source -The object to copy. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TPriceDrawer::~ TPriceDrawer ; | virtual ~ TPriceDrawer () > 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: TPriceDrawer::operator =; | TPriceDrawer & operator =(const TPriceDrawer & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TPriceDrawer & source -The object to copy. > 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: TPriceDrawer::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: TPriceDrawer::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: TPriceDrawer::GetDataPointWidth ; | virtual GraphValue GetDataPointWidth () const > Interface Category: | Sample. > Purpose: | Returns the width of the graphics that represent the TStockDay objects. The return value is in points, not values. > Calling Context: | None. > Parameters: = Takes no parameters. > Return Value: | Returns a GraphValue that is the width in points of the graphics representing the TStockDays. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TPriceDrawer::GetDataPointInterval ; | virtual GraphValue GetDataPointInterval () const > Interface Category: | Sample. > Purpose: | Returns the interval at which the graphics are being drawn. The interval is in values, not points. If the graph's x-axis is 100 points long, but its range is TGraphRange(0, 2) (only two values, 1 and 2), and the data point interval is 1, a TStockDay is drawn at 50 points and 100 points down the axis. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the interval at which the TStockDay graphics are drawn. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TPriceDrawer::SetDataPointWidth ; | virtual void SetDataPointWidth (GraphValue width) > Interface Category: | Sample. > Purpose: | Sets the width of the data points. > Calling Context: | Call this function directly. > Parameters: = GraphValue width -The new width of the data points. This parameter must be in points, not values. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TPriceDrawer::SetDataPointInterval ; | virtual void SetDataPointInterval (GraphValue interval) > Interface Category: | Sample. > Purpose: | Sets the interval at which the data points are drawn. > Calling Context: | Call this function directly. > Parameters: = GraphValue interval -The interval between the data points. This is in values, not points. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TPriceDrawer::SetLineColor ; | virtual void SetLineColor (const TColor & color) > Interface Category: | Sample. > Purpose: | Sets the color of the high and low price lines as well as the vertical line connecting them. > Calling Context: | Call this function directly. > Parameters: = const TColor & color -The new color of the lines. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TPriceDrawer::SetBoxColor ; | virtual void SetBoxColor (const TColor & color) > Interface Category: | Sample. > Purpose: | Sets the color of the close-price box. > Calling Context: | Call this function directly. > Parameters: = const TColor & color -The new color of the close-price box. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TPriceDrawer::SetBoxSize ; | virtual void SetBoxSize (const TGPoint & size) > Interface Category: | Sample. > Purpose: | Sets the size of the close-price box. The value is in points. > Calling Context: | Call this function directly. > Parameters: = const TGPoint & size -The size of the close-price box in points. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TPriceDrawer::DrawIntoGraph ; | virtual void DrawIntoGraph (TGrafPort & port) const > Interface Category: | Sample. > Purpose: | Draws stock data into the port. > Calling Context: | Call this function directly. > Parameters: = TGrafPort & port -The port that the graph has handed this object 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: TPriceDrawer::GetBounds ; | virtual TGRect GetBounds () const > Interface Category: | Sample. > Purpose: | Returns the bounds of the area that this drawer draws to. > Calling Context: | Called mainly by TStandardGraph::GetGeometricBounds. > Parameters: = Takes no parameters. > Return Value: | A rectangle that encompasses all of the drawing that was done by the Draw member function. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Class: | TVolumeDrawer > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Inherits From: | TBarDrawer > Inherited By: | None. > Purpose: | Users of this class can just pass in all of their stock data and TVolumeDrawer will turns it into the TRawArray that TBarDrawer needs. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | None. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TVolumeDrawer::TVolumeDrawer ; | 1. TVolumeDrawer () | 2. TVolumeDrawer (GraphValue xAxisLocation, GraphValue barWidth, GraphValue barInterval, const TCollectionOf < TStockDay > & stocks) | 3. TVolumeDrawer (const TVolumeDrawer & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Standard constructor. | 3. Copy constructor. > Calling Context: | 1. Called by derived classes and to construct an object. | 2. Called to construct a valid object. | 3. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. GraphValue xAxisLocation -The location of the x-axis. = 2. GraphValue barWidth -The width of the bar in points. = 2. GraphValue barInterval -The interval between the center of the bars. = 2. const TCollectionOf < TStockDay > & stocks -The collection of stocks that TVolumeDrawer takes the volume information from. It does not adopt these stocks. = 3. const TVolumeDrawer & 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: TVolumeDrawer::~ TVolumeDrawer ; | virtual ~ TVolumeDrawer () > 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: TVolumeDrawer::operator =; | TVolumeDrawer & operator =(const TVolumeDrawer & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TVolumeDrawer & source -The object to copy. > 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: TVolumeDrawer::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: TVolumeDrawer::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: TVolumeDrawer::SetVolumeInformation ; | void SetVolumeInformation (const TCollectionOf < TStockDay > & stocks) > Interface Category: | Sample. > Purpose: | Takes a collection of TStockDay objects and copies all of the volume information into a TRawArray. It does not adopt the collection, it just uses it for the duration of the function call. > Calling Context: | Call this function directly. > Parameters: = const TCollectionOf < TStockDay > & stocks -The stocks from which to extract volume information. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif