// Copyright (C) 1995 Taligent, Inc. All rights reserved. #if 0 --------------------------------------------------------------------------- > Class: | TWebModel > Taxonomy Category: | Documented Samples | WebRunner Sample > Interface Category: | Sample. > Inherits From: | TEmbedderTextModel > Inherited By: | None. > Purpose: | The TWebModel class encapsulates all of the persistent state needed to store a hypertext document full of clickable links and multimedia components. > Instantiation: | Allocate on the heap or the stack. > Deriving Classes: | Deriving classes need to be aware of the effects of embedded components that can lock the parent and fire commands at it. > Concurrency: | _Not_ multithread safe. > Resource Use: | No special requirements. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TWebModel::OpenWebDocument ; | static TDocumentReference OpenWebDocument (const TURL & URL) > Interface Category: | Sample. > Purpose: | This static member functions provides a convenient helper to create and open a new WebRunner Sample document on the desktop. The document is created using a random document name to prevent clashes, and a reference to it is returned to the caller. > Calling Context: | Call this function directly. > Parameters: = const TURL & URL -An address of the hypertext information to display. > Return Value: | Returns a reference to the opened document if successful, or an invalid reference if unsuccessful. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TWebModel::TWebModel ; | 1. TWebModel () | 2. TWebModel (const TURL & firstURL) | 3. TWebModel (const TWebModel & source) > Interface Category: | Sample. > Purpose: | 1. Default constructor. Displays the default URL. | 2. Creates a page displaying the information pointed to by this URL. | 3. Copy constructor. > Calling Context: | 1. Called by the stream-in operators and by clients that want the default page. | 2. Call this function directly. | 3. Called to copy an object. > Parameters: = 1. Takes no parameters. = 2. const TURL & firstURL -The URL to fetch and display. = 3. const TWebModel & 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: TWebModel::~ TWebModel ; | virtual ~ TWebModel () > 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: TWebModel::operator =; | TWebModel & operator =(const TWebModel & source) > Interface Category: | Sample. > Purpose: | Assignment operator. > Calling Context: | Called when an object is assigned to another compatible object. > Parameters: = const TWebModel & source -The object to assign. > 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: TWebModel::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: TWebModel::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 TInvalidVersionError if the object version isn't known. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TWebModel::FollowURL ; | TURL FollowURL (const TURL & newURL) > Interface Category: | Sample. > Purpose: | Causes the model to fetch the data referred to by the URL argument and display it. If the information is a hypertext page, it displays it as text with embedded components; but if the information is some other form of data, it attempts to translate it into a document component, which it displays in an embedded form. This action destroys the current contents of the browser window. > Calling Context: | Called directly, but primarily accessed through TFollowURLCommand. > Parameters: = const TURL & newURL -The locator of the information to display. > Return Value: | Returns the location of the previously displayed page. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TWebModel::GetPageTitle ; | TStandardText GetPageTitle () const > Interface Category: | Sample. > Purpose: | Retrieves the title of the currently displayed page of information. > Calling Context: | Call this function directly. > Parameters: = Takes no parameters. > Return Value: | Returns the title of the currently displayed page of information. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TWebModel::AcceptModelScrap ; | virtual void AcceptModelScrap (const TModelScrapItem & item) > Interface Category: | Sample. > Purpose: | Processes a TModelScrapItem that contains an embedded component. The contents of this model are discarded and the component is extracted from the scrap item and inserted into this item. > Calling Context: | Called internally when information is retrieved upon following a URL that leads to an embeddable document component. > Parameters: = const TModelScrapItem & item -The item embedding a document component. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif #if 0 --------------------------------------------------------------------------- > Member Function: TWebModel::AcceptHypertextScrap ; | virtual void AcceptHypertextScrap (const THypertextScrapItem & scrapItem) > Interface Category: | Sample. > Purpose: | Processes a scrap item that contains a block of text along with a document title and a list of web links to be created. This model discards its old text and replaces it with that of the hypertext scrap item, then creates all of the embedded links by iterating through the scrap item's link queue. > Calling Context: | Called internally when FollowURL finds it has created a scrap item that can be dynamically cast to THypertextScrapItem. > Parameters: = const THypertextScrapItem & scrapItem -The hypertext scrap item used. > Return Value: | None. > Exceptions: | Throws no exceptions, passes all exceptions through. > Concurrency: | _Not_ multithread safe. > Other Considerations: | None. --------------------------------------------------------------------------- #endif