//
//  WebHTMLDocumentRepresentation.h
//  mySTEP
//
//  Created by Dr. H. Nikolaus Schaller on Tue Sep 01 2005.
//  Copyright (c) 2005 DSITRI. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <WebKit/WebFrameView.h>
#import <WebKit/WebFrame.h>
#import <WebKit/WebDataSource.h>
#import <WebKit/WebDocument.h>
#import <WebKit/WebHistoryItem.h>
#import <WebKit/WebView.h>

// all DOM interfaces should be moved to those headers...

@interface DOMHTMLElement : DOMObject
{
	NSString *_html;	// temporary string for collecting characters
	id _parent;			// previous delegate of parser
}
- (void) setParent:(id) parent;
@end

@interface DOMHTMLHeadElement : DOMHTMLElement
{
	NSString *_title;
	DOMNode *_meta;	
}
- (NSString *) title;
@end

@interface DOMHTMLBodyElement : DOMHTMLElement
{
	NSArray *_bodyContent;	// list of body elements (lines, headers, lists, tables, frames, forms etc.)
}
@end

// we should have DOMHTMLFrameElement, DOMHTMLIFrameElement, DOMHTMLObjectElement according to WebFrame -frameElement

@interface DOMHTMLDocument : DOMDocument
{
	DOMHTMLHeadElement *_head;
	DOMHTMLBodyElement *_body;
}
- (DOMHTMLHeadElement *) head;
- (void) setBody:(DOMHTMLBodyElement *) body;
@end

@interface _WebHTMLDocumentRepresentation : NSObject <WebDocumentRepresentation>
{
	WebDataSource *_dataSource;
	NSString *_title;			// as soon as we received the <title>
	NSXMLParser *_parser;
	NSString *_html;			// used during HTML tag processing
	DOMHTMLDocument *_root;				// here we build a parse tree of objects (i.e. lines, fragments, frames, images etc.)
}
@end

@interface _HTMLDocumentView : NSView <WebDocumentView>
// really used?? or is it the WebView
@end

