// $Revision: 1.5 $ #ifndef TaligentSamples_LIBWWWINTERFACE #define TaligentSamples_LIBWWWINTERFACE //----------------------------------------------------------------------------- // // Copyright (C) 1995 Taligent, Inc. All rights reserved. // // Project: WebRunner Sample // File: LibWWWInterface.h // Build/Version: 1.0.0 // //----------------------------------------------------------------------------- #ifndef Taligent_TEXT #include #endif #ifndef Taligent_STREAM #include #endif #ifndef Taligent_FOREIGNDATA #include #endif #ifndef Taligent_STYLESET #include #endif #ifndef TaligentSamples_HYPERTEXTSCRAPITEM #include "HypertextScrapItem.h" #endif extern "C" { #include #include #undef MIN #undef MAX } void AddTaligentConversions(HTList* conversionList); struct _HTStream { public: _HTStream(TStream* taligentStreamAlias, THypertextScrapItem* taligentTextAlias, TMIMEForeignDataType* mimeDataTypeAlias); ~_HTStream(); TStream* GetTaligentStreamAlias() const; THypertextScrapItem* GetHypertextAlias() const; TMIMEForeignDataType* GetMIMETypeAlias() const; private: // since the library accesses this variable at run time by assuming it // is the first element in the struct, you must leave this as the // first member variable. This also rules out the possibility of // virtual member functions on this structure. HTStreamClass* fLibWWWClass; TStream* fStreamAlias; THypertextScrapItem* fTextAlias; TMIMEForeignDataType* fMIMEDataTypeAlias; }; struct _HText { public: _HText(THypertextScrapItem* taligentTextAlias, HTParentAnchor* anchor); ~_HText(); void AppendToCurrent(const TText& text); void AppendToCurrent(char); void AppendLineBreakToCurrent(); void AppendImage(const TURL& imageURL); void AddStyleToCurrentText(const TStyle& style); void ApplyCurrentText(); void BeginAnchor(const TURL& destination); void EndAnchor(); void EndAppend(); private: THypertextScrapItem* fHypertextAlias; TStandardText fCurrentText; TStyleSet fCurrentStyles; TURL fCurrentAnchorDestination; TTextOffset fCurrentAnchorBeginning; HTParentAnchor* fParentAnchor; }; #endif