// $Revision: 1.7 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TLabelDrawer > Taxonomy Category: | Documented Samples | Stock Browser:Graphing Framework > Interface Category: | Sample. > Inherits From: | TGraphDrawer > Inherited By: | TXLabelDrawer | TYLabelDrawer > Purpose: | This class derives from TGraphDrawer. It draws numbers along the axes at a particular interval. This class is abstract. > Instantiation: | Always allocate on the heap. > Deriving Classes: | Deriving classes should override PositionLabel and GetRange. In PositionLabel, they are required to position the label according to a particular x-value. In GetRange, they are required to return the range of the axis they are drawing the labels along. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::~ TLabelDrawer ; | virtual ~ TLabelDrawer () > 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: TLabelDrawer::operator =; | TLabelDrawer & operator =(const TLabelDrawer & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TLabelDrawer & 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: TLabelDrawer::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: TLabelDrawer::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: TLabelDrawer::GetLabelColor ; | virtual const TTextColorStyle & GetLabelColor () const > Interface Category: | Sample. > Purpose: | Returns the color of the labels. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the color of the labels. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::GetLabelSize ; | virtual GraphValue GetLabelSize () const > Interface Category: | Sample. > Purpose: | Returns the point size of the labels. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the point size of the labels. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::GetLabelDistance ; | virtual GraphValue GetLabelDistance () const > Interface Category: | Sample. > Purpose: | Returns the distance, in points, from the axis. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the distance, in points, from the axis. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::GetLabelInterval ; | virtual GraphValue GetLabelInterval () const > Interface Category: | Sample. > Purpose: | Returns the interval between the centers of the labels. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the interval between the centers of the labels. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::SetLabelColor ; | virtual void SetLabelColor (const TTextColorStyle & color) > Interface Category: | Sample. > Purpose: | Sets the color of the labels. > Calling Context: | Call this function directly. > Parameters: = const TTextColorStyle & color -The new color of the labels. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::SetLabelSize ; | virtual void SetLabelSize (GraphValue pointSize) > Interface Category: | Sample. > Purpose: | Sets the point size of the labels. > Calling Context: | Call this function directly. > Parameters: = GraphValue pointSize -The new point size of the labels. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::SetLabelDistance ; | virtual void SetLabelDistance (GraphValue distance) > Interface Category: | Sample. > Purpose: | Sets the distance from the axis in points. This is the distance of the closest point of the label to the axis. > Calling Context: | Call this function directly. > Parameters: = GraphValue distance -The new distance from the axis. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::SetLabelInterval ; | virtual void SetLabelInterval (GraphValue interval) > Interface Category: | Sample. > Purpose: | Sets the interval between the centers of the labels. > Calling Context: | Call this function directly. > Parameters: = GraphValue interval -The new interval between the labels. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::DrawIntoGraph ; | virtual void DrawIntoGraph (TGrafPort & port) const > Interface Category: | Sample. > Purpose: | Draws the labels. It relies on GetRange and PositionLabel. > Calling Context: | Called only by TStandardGraph::Draw. > Parameters = TGrafPort & port -The port that should be 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: TLabelDrawer::GetBounds ; | virtual TGRect GetBounds () const > Interface Category: | Sample. > Purpose: | Returns the aggregate bounds of the labels. > Calling Context: | Typically called by TStandardGraph::GetGeometricBounds. > Parameters: = Takes no parameters. > Return Value: | Returns a TGRect, which is the aggregate bounds of the labels. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::SetLabelFont ; | virtual void SetLabelFont (const TFontFamilyStyle & font) > Interface Category: | Sample. > Purpose: | Sets the font of the labels. > Calling Context: | Call this function directly. > Parameters: = const TFontFamilyStyle & font -The new font. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::GetLabelFont ; | virtual const TFontFamilyStyle & GetLabelFont () const > Interface Category: | Sample. > Purpose: | Returns the font used to draw the numbers. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the font used to draw the numbers. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::TLabelDrawer ; | 1. TLabelDrawer () | 2. TLabelDrawer (GraphValue labelDistanceFromAxis, GraphValue labelInterval, GraphValue pointSize, const TFontFamilyStyle & font =TFontFamilyStyle :: GetDefaultFontFamilyStyle (), const TTextColorStyle & labelColor =TTextColorStyle :: GetBlack ()) | 3. TLabelDrawer (const TLabelDrawer & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Constructor that properly initializes the drawer. | 3. Copy constructor. > Calling Context: | 1. Called by the stream-in operators. | 2. Called by most clients.. | 3. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. GraphValue labelDistanceFromAxis -The distance, in points, from the axis. = 2. GraphValue labelInterval -The interval between the centers of the labels. = 2. GraphValue pointSize -The point size of the font that is used to draw the labels. = 2. const TFontFamilyStyle & font -The font that is used to draw the labels. = 2. const TTextColorStyle & labelColor -The color of the labels. = 3. const TLabelDrawer & 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: TLabelDrawer::GetRange ; | virtual const TGraphRange & GetRange () const > Interface Category: | Sample. > Purpose: | Pure virtual function. Returns the range of the axis this object draws it labels along. > Calling Context: | Called by DrawIntoGraph. > Parameters: = Takes no parameters. > Return Value: | A const reference to a TGraphRange object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TLabelDrawer::PositionLabel ; | virtual void PositionLabel (TTextDisplay & label, GraphValue value) const > Interface Category: | Sample. > Purpose: | Pure virtual function. Positions and sets up the given TTextDisplay object to display the specified value label. > Calling Context: | Called by DrawIntoGraph. > Parameters: = TTextDisplay & label -The label to set up. = GraphValue value -The value to be displayed by the label. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Class: | TXLabelDrawer > Taxonomy Category: | Documented Samples | Stock Browser:Graphing Framework > Interface Category: | Sample. > Inherits From: | TLabelDrawer > Inherited By: | None. > Purpose: | This class derives from TLabelDrawer. This class draws labels along the x-axis. > 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: TXLabelDrawer::~ TXLabelDrawer ; | virtual ~ TXLabelDrawer () > 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: TXLabelDrawer::operator =; | TXLabelDrawer & operator =(const TXLabelDrawer & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TXLabelDrawer & 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: TXLabelDrawer::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: TXLabelDrawer::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: TXLabelDrawer::TXLabelDrawer ; | 1. TXLabelDrawer () | 2. TXLabelDrawer (GraphValue labelDistanceFromAxis, GraphValue labelInterval, GraphValue pointSize, const TFontFamilyStyle & font =TFontFamilyStyle :: GetDefaultFontFamilyStyle ()) | 3. TXLabelDrawer (const TXLabelDrawer & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Constructor that properly initializes the drawer. | 3. Copy constructor. > Calling Context: | 1. Called by the stream-in operators. | 2. Called by most clients. | 3. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. GraphValue labelDistanceFromAxis -The distance from the axis in points. = 2. GraphValue labelInterval -The interval between the labels. = 2. GraphValue pointSize -The point size of the labels. = 2. const TFontFamilyStyle & font -The font of the labels. = 3. const TXLabelDrawer & 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: TXLabelDrawer::GetRange ; | virtual const TGraphRange & GetRange () const > Interface Category: | Sample. > Purpose: | Returns the range of the axis this object draws its labels along. > Calling Context: | Called by TLabelDrawer::DrawIntoGraph. > Parameters: = Takes no parameters. > Return Value: | A const reference to a TGraphRange object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TXLabelDrawer::PositionLabel ; | virtual void PositionLabel (TTextDisplay & label, GraphValue value) const > Interface Category: | Sample. > Purpose: | Positions the given label according to the given value. > Calling Context: | Called by TLabelDrawer::DrawIntoGraph. > Parameters: = TTextDisplay & label -The label to set up. = GraphValue value -The value to be displayed by the label. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Class: | TYLabelDrawer > Taxonomy Category: | Documented Samples | Stock Browser:Graphing Framework > Interface Category: | Sample. > Inherits From: | TLabelDrawer > Inherited By: | None. > Purpose: | Derives from TLabelDrawer. This class draws labels along the y-axis. > 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: TYLabelDrawer::~ TYLabelDrawer ; | virtual ~ TYLabelDrawer () > 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: TYLabelDrawer::operator =; | TYLabelDrawer & operator =(const TYLabelDrawer & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TYLabelDrawer & 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: TYLabelDrawer::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: TYLabelDrawer::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: TYLabelDrawer::TYLabelDrawer ; | 1. TYLabelDrawer () | 2. TYLabelDrawer (GraphValue labelDistanceFromAxis, GraphValue labelInterval, GraphValue pointSize, const TFontFamilyStyle & font =TFontFamilyStyle :: GetDefaultFontFamilyStyle ()) | 3. TYLabelDrawer (const TYLabelDrawer & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Constructor that properly initializes the drawer. | 3. Copy constructor. > Calling Context: | 1. Called by the stream-in operators. | 2. Called by most clients. | 3. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. GraphValue labelDistanceFromAxis -The distance, in points, from the y-axis. = 2. GraphValue labelInterval -The interval between the labels. = 2. GraphValue pointSize -The point size of the labels. = 2. const TFontFamilyStyle & font -The font used to draw the labels. = 3. const TYLabelDrawer & 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: TYLabelDrawer::GetRange ; | virtual const TGraphRange & GetRange () const > Interface Category: | Sample. > Purpose: | Returns the range of the axis this object draws its labels along. > Calling Context: | Called by TLabelDrawer::DrawIntoGraph. > Parameters: = Takes no parameters. > Return Value: | A const reference to a TGraphRange object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TYLabelDrawer::PositionLabel ; | virtual void PositionLabel (TTextDisplay & label, GraphValue value) const > Interface Category: | Sample. > Purpose: | Positions the given label according to the given value. > Calling Context: | Called by TLabelDrawer::DrawIntoGraph. > Parameters: = TTextDisplay & label -The label to set up. = GraphValue value -The value to be displayed by the label. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif