// $Revision: 1.4 $ // Copyright (C) 1995 Taligent, Inc. All rights reserved. #ifndef Taligent_WEBPRESENTER #include "WebPresenter.h" #endif #ifndef Taligent_WEBVIEW #include "WebView.h" #endif #ifndef Taligent_EMBEDDERTEXT #include #endif #ifndef Taligent_SCROLLINGVIEW #include #endif VersionDefinitionsMacro(TWebPresenter, kOriginalVersion); TWebPresenter::TWebPresenter(const TGUIBundle& bundle) : TTextPresenter(bundle) { } TWebPresenter::~TWebPresenter() { } TStream& TWebPresenter::operator>>=(TStream& toStream) const { ::WriteVersion(toStream); TTextPresenter::operator>>=(toStream); return toStream; } TStream& TWebPresenter::operator<<=(TStream& fromStream) { ::ReadVersion(fromStream, kOriginalVersion, kOriginalVersion); TTextPresenter::operator<<=(fromStream); return fromStream; } TView* TWebPresenter::HandleCreateMainView(TGUIBundle* bundle) const { TDocumentTextView* textView = HandleCreateContentTextView(bundle); TView* clippingView = HandleCreateContentClippingView(textView); TWebView* webView = new TWebView(bundle); webView->SetAllocatedAreaInParent(TGRect(0,0,500,600)); webView->AdoptHypertextView(clippingView, textView); return webView; } TDocumentTextView* TWebPresenter::HandleCreateContentTextView(TGUIBundle* bundle) const { TEmbedderTextView* textView = NIL; textView = new TEmbedderTextView(bundle); textView->SetAllocatedAreaInParent(TGRect(0,0,500,3000)); return textView; } TView* TWebPresenter::HandleCreateContentClippingView(TDocumentTextView* adoptedView) const { TScrollingView* clippingView = new TScrollingView; clippingView->AdoptViewToScroll(adoptedView); return clippingView; }