Design notes

Editable text with embedded components

WebRunner Sample creates a new stationery, presenter state, and model to allow access to editable text with embedded components. By representing hypertext links as embedded components, this program allows users to transfer links into other documents that support component embedding.

HandleModelChanged

To notify the view of changes to its own model, you can simply override TDocumentView::HandleModelChanged which is called whenever the model calls NotifyOfChange. TWebView takes advantage of this notification each time the model follows a hypertext link to a new destination.

TWebModel persistence

When WebRunner Sample opens a page, it displays to users current information for a site. It restores a persistent web document from a stream and reconnects to the destination page to access the latest information. With this approach, the only information that needs to be persistent is the URL for the distant site. To accomplish this, the parent model is streamed to properly store the compound document hierarchy, but the title of the page doesn't need to be streamed in operator >>= and operator <<=.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker