// $Revision: 1.6 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TViewerContentView > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Inherits From: | TDOMDocumentComponentView > Inherited By: | None. > Purpose: | Displays the name of the current stock and keeps, in a scrolling view, a graph of the stock data. > Instantiation: | Always allocate on the heap. > Deriving Classes: | Derived classes can add more graph views. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::TViewerContentView ; | 1. TViewerContentView () | 2. TViewerContentView (TGUIBundle * guiBundleToAlias, const TPaint & backgroundColor =TColorPaint :: GetWhite ()) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Standard constructor. > Calling Context: | 1. Called by derived classes and to construct an object. | 2. Called to construct a valid object. > Parameters: = 1. Takes no parameters. = 2. TGUIBundle * guiBundleToAlias -A pointer to a bundle object needed by many Presentation framework classes. This constructor passes the bundle to the base class. = 2. const TPaint & backgroundColor =TColorPaint :: GetWhite () -The color to fill the background of the view with. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::~ TViewerContentView ; | virtual ~ TViewerContentView () > 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: TViewerContentView::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: TViewerContentView::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: TViewerContentView::AdoptGraphView ; | virtual void AdoptGraphView (TGraphView * theGraphView) > Interface Category: | Sample. > Purpose: | Adopts a new graph view into the scrolling view. > Calling Context: | Called by users of the TViewerContentView class. > Parameters: = TGraphView * theGraphView -The view to install in the scrolling view. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::DrawContents ; | virtual void DrawContents (TGrafPort & port) const > Interface Category: | Sample. > Purpose: | Draws the contents of the view. > Calling Context: | Called by the View system. > Parameters: = TGrafPort & port -The grafport in which to draw. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::HandleAfterConnectionToViewRoot ; | virtual void HandleAfterConnectionToViewRoot () > Interface Category: | Sample. > Purpose: | Connects for notification from the model and presenter state and sets up initial state. > Calling Context: | Called by the View system. > 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: TViewerContentView::HandleBeforeDisconnectionFromViewRoot ; | virtual void HandleBeforeDisconnectionFromViewRoot () > Interface Category: | Sample. > Purpose: | Destroys the notification connection. > Calling Context: | Called by the View system. > 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: TViewerContentView::HandleCurrentSelectionChanged ; | virtual void HandleCurrentSelectionChanged (const TNotification & note) > Interface Category: | Sample. > Purpose: | Responds to a change in the current selection. > Calling Context: | Called by the Presentation framework. > Parameters: = const TNotification & note -The notification sent by the Presentation framework. Ignored by this function. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::HandleAllocatedAreaChanged ; | virtual void HandleAllocatedAreaChanged (const TGArea & newArea) > Interface Category: | Sample. > Purpose: | Responds to a change in the allocated area of this view. > Calling Context: | Called by the View system. > Parameters: = const TGArea & newArea -The new area allocated to the view. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::HandleModelOrPresenterStateChanged ; | virtual void HandleModelOrPresenterStateChanged (const TNotification & note) > Interface Category: | Sample. > Purpose: | Responds to a change in the model or presenter state. Sets a flag and causes a "Please wait..." message to be displayed. > Calling Context: | Called by the Notification framework in response to a change notification by the model or presenter state. > Parameters: = const TNotification & note -The notification object sent by the model or presenter state. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::HandleGraphViewReady ; | virtual void HandleGraphViewReady (const TNotification & note) > Interface Category: | Sample. > Purpose: | Responds to a notification from the graph view that it is finished reconstructing the graph. Sets a flag and causes the name of the stock to be displayed. > Calling Context: | Called by the Notification framework in response to a notification by the graph view. > Parameters: = const TNotification & note -The notification object sent by the TGraphView object. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::Update ; | virtual void Update () > Interface Category: | Sample. > Purpose: | Gets the graph constructor from the presenter state and hands it to the graph view, which reconstructs the graph. > Calling Context: | Called by HandleAfterConnectionToViewRoot to set up the initial state of this view, and by HandleModelOrPresenterStateChanged when the state of the view needs to be updated. > Parameters: = Takes no parameters. > Return Value: | None. > Exceptions: | Throws no exceptions, passes most exceptions through. Catches TCompoundDocumentExceptions and does not rethrow them. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::GetNameAreaHeight ; | virtual GCoordinate GetNameAreaHeight () const > Interface Category: | Sample. > Purpose: | Returns the height of the area at the top of this view reserved for messages and the stock name. > Calling Context: | Called by this class to set up state. > Parameters: = Takes no parameters. > Return Value: | The height of the area reserved for text at the top of the view. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::GetTextSize ; | virtual GCoordinate GetTextSize () const > Interface Category: | Sample. > Purpose: | Returns the font point size to be used for displaying text. > Calling Context: | Called by this class to set up state. > Parameters: = Takes no parameters. > Return Value: | The font point size for displayed text. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::GetExtraSpace ; | virtual GCoordinate GetExtraSpace () const > Interface Category: | Sample. > Purpose: | Returns the amount of padding around the text at the top of the view. > Calling Context: | Called by this class to set up state. > Parameters: = Takes no parameters. > Return Value: | A GCoordinate specifying the amount of extra space to use. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::GetWaitingText ; | virtual void GetWaitingText (TStandardText & text) const > Interface Category: | Sample. > Purpose: | Returns the text to use as a "Please wait..." message. > Calling Context: | Called in response to a notification from the model or presenter state. > Parameters: = TStandardText & text -The text object to receive the message. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TViewerContentView::CreateSelectionFromPoint ; | virtual TModelSelection * CreateSelectionFromPoint (const TGPoint & where) const > Interface Category: | Sample. > Purpose: | This is an obsolete override of an MSelectionMapping function. See the Taligent Selection Tool sample. > Calling Context: | Called by the Taligent Selection Tool. > Parameters: = const TGPoint & where -A point inside the view which specifies the location of the data to create a selection for. > Return Value: | This obsolete function calls TDOMDocumentComponentView::CreateSelectionFromPoint and returns the result of that call. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Class: | TGraphView > Taxonomy Category: | Documented Samples | Stock Browser > Interface Category: | Sample. > Inherits From: | TSimpleView > Inherited By: | None. > Purpose: | Displays and initializes one TStandardGraph object. > Instantiation: | Always allocate on the heap. > Deriving Classes: | No special instructions. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphView::TGraphView ; | 1. TGraphView () | 2. TGraphView (TStandardGraph * adoptedGraph, const TPaint & backgroundColor =TColorPaint :: GetWhite ()) > Interface Category: | Sample. > Purpose: | 1. Default constructor. | 2. Standard constructor. > Calling Context: | 1. Called by derived classes and to construct an object. | 2. Called to construct a valid object. > Parameters: = 1. Takes no parameters. = 2. TStandardGraph * adoptedGraph -The TStandardGraph object to adopt and initialize when model data or the presenter state's graph constructor change. = 2. const TPaint & backgroundColor =TColorPaint :: GetWhite () -The background color to paint the view and graph with. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphView::~ TGraphView ; | virtual ~ TGraphView () > 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: TGraphView::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: TGraphView::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: TGraphView::ReconstructGraph ; | virtual void ReconstructGraph (TStockGraphConstructor & graphConstructor, const TStockData & stock) > Interface Category: | Sample. > Purpose: | Reinitializes the graph with drawer objects. > Calling Context: | Called by TViewerContentView::Update in response to new model data or a presenter state graph constructor being set. > Parameters: = TStockGraphConstructor & graphConstructor -The graph constructor to use for reconstructing the graph. It is non-const because the graph constructor might need to set internal state during operation. = const TStockData & stock -The stock from which to copy and then plot data. > Return Value: | None. > Exceptions: | Catches TStockException and passes all other through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphView::GetReadyInterest ; | virtual TInterest GetReadyInterest () const > Interface Category: | Sample. > Purpose: | Returns a TInterest object that can be used to connect for notification when the graph view finishes setting up a graph. > Calling Context: | Called by TViewerContentView::AdoptGraphView. > Parameters: = Takes no parameters. > Return Value: | A TInterest object. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphView::DrawContents ; | virtual void DrawContents (TGrafPort & port) const > Interface Category: | Sample. > Purpose: | Draws the graph. > Calling Context: | Called by the View system. > Parameters: = TGrafPort & port -The port in which to draw. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TGraphView::GetErrorMessage ; | virtual void GetErrorMessage (TStandardText & fillThisIn) const > Interface Category: | Sample. > Purpose: | Gets the text to use if an error occurs during graph setup. > Calling Context: | Called by DrawContents. > Parameters: = TStandardText & fillThisIn -The text object to fill with an error message. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif