// $Revision: 1.5 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TBarDrawer > Taxonomy Category: | Documented Samples | Stock Browser:Graphing Framework > Interface Category: | Sample. > Inherits From: | TGraphDrawer > Inherited By: | TVolumeDrawer > Purpose: | This class derives from TGraphDrawer. It takes a TRawArray of graph values and draws a bar graph representing those values. > Instantiation: | Always allocate on the heap. > Deriving Classes: | None. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::TBarDrawer ; | 1. TBarDrawer (GraphValue xAxisLocation, GraphValue barWidth, GraphValue barInterval, TRawArray < GraphValue > * valuesForAdoption) | 2. TBarDrawer (const TBarDrawer & source) | 3. TBarDrawer () > Interface Category: | Sample. > Purpose: | 1. Constructor that properly initializes the TBarDrawer. | 2. Copy constructor. | 3. Default constructor. > Calling Context: | 1. Called by most clients. | 2. Called to copy an object. | 3. Called by the stream-in operators and clients who know that the x-axis draws from y-value zero. > Parameters: = 1. GraphValue xAxisLocation -The position (y-value) of the x-axis. = 1. GraphValue barWidth -The width of the bar in points. = 1. GraphValue barInterval -The interval at which the bars are drawn. The interval is in values, not points. = 1. TRawArray < GraphValue > * valuesForAdoption -The values that the bars will represent. = 2. const TBarDrawer & source -The object to be copied. = 3. 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: TBarDrawer::~ TBarDrawer ; | virtual ~ TBarDrawer () > 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: TBarDrawer::operator =; | TBarDrawer & operator =(const TBarDrawer & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TBarDrawer & 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: TBarDrawer::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: TBarDrawer::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: TBarDrawer::AdoptValues ; | virtual void AdoptValues (TRawArray < GraphValue > * valuesForAdoption) > Interface Category: | Sample. > Purpose: | Adopts arrays of values. The values in the array are used to determine the height of the bars. > Calling Context: | Called when the TBarDrawer needs to represent new data. > Parameters: = TRawArray < GraphValue > * valuesForAdoption -The array of values that the TBarDrawer uses to determine the height of the bars. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::OrphanValues ; | virtual TRawArray < GraphValue > * OrphanValues () > Interface Category: | Sample. > Purpose: | Removes all of the data that is being used to draw bars with, and hands it to the client. TBarDrawer does not draw anything else until it adopts another TRawArray. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the data used for drawing the bars. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::GetBarWidth ; | virtual GraphValue GetBarWidth () const > Interface Category: | Sample. > Purpose: | Gets the width of the bars in points. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the width of the bars in points. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::GetBarInterval ; | virtual GraphValue GetBarInterval () const > Interface Category: | Sample. > Purpose: | Gets the interval at which the bars will be drawn. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the interval at which the bars will be drawn. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::SetBarWidth ; | virtual void SetBarWidth (const GraphValue & width) > Interface Category: | Sample. > Purpose: | Sets the width of the bars in points. > Calling Context: | Call this function directly. > Parameters: = const GraphValue & width -The new width of the bars. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::SetBarInterval ; | virtual void SetBarInterval (const GraphValue & interval) > Interface Category: | Sample. > Purpose: | Sets the interval at which the bars will be drawn. > Calling Context: | Call this function directly. > Parameters: = const GraphValue & interval -The new interval at which the bars will be drawn. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::SetBarColor ; | virtual void SetBarColor (const TRGBColor & color) > Interface Category: | Sample. > Purpose: | Sets the color of the bars. > Calling Context: | Call this function directly. > Parameters: = const TRGBColor & color -The new color of the bars. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::DrawIntoGraph ; | virtual void DrawIntoGraph (TGrafPort & port) const > Interface Category: | Sample. > Purpose: | Draws the bars into the graph. > Calling Context: | Called only by TStandardGraph::Draw. > Parameters: = TGrafPort & port -The port that the bars are drawn into. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::GetBounds ; | virtual TGRect GetBounds () const > Interface Category: | Sample. > Purpose: | Gets the bounds of the area that this drawer draws to. > Calling Context: | Called mainly by TStandardGraph::GetGeometricBounds. > Parameters: = Takes no parameters. > Return Value: | Returns 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 --------------------------------------------------------------------------- > Member Function: TBarDrawer::SetBar ; | virtual void SetBar (GraphValue xValue, GraphValue yValue, TArea & bar) const > Interface Category: | Sample. > Purpose: | Transforms the bar passed in according to the x- and y-values. > Calling Context: | Called only by Draw, GetGeometricBounds, and GetLooseFitBounds. This is a private member function. > Parameters: = GraphValue xValue -The x-value associated with the center of the bar. = GraphValue yValue -The y-value associated with the top of the bar. = TArea & bar -The bar to transform. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::GetXAxisLocation ; | virtual GraphValue GetXAxisLocation () const > Interface Category: | Sample. > Purpose: | Uses the axis-drawer that is passed in through the constructor or SetAxisDrawer. It asks the axis-drawer where the location of the x-axis is and passes it along here. > Calling Context: | Called by this class and derived classes to determine the location of the x-axis. > Parameters: = Takes no parameters. > Return Value: | Returns the y-value of the x-axis. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | Derived classes can choose to override this function if they don't want to base the bars off of the x-axis' location. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TBarDrawer::SetXAxisLocation ; | virtual void SetXAxisLocation (GraphValue xAxisLocation) > Interface Category: | Sample. > Purpose: | Sets the y-value that this drawer thinks is the x-axis position. The bottom of the bar is anchored to this y-value. > Calling Context: | Call this function directly. > Parameters: = GraphValue xAxisLocation -The x-axis position, as far as this drawer is concerned. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif