/***************************************************************************
                            HTMLTableElement.m -  description
                             -------------------
    begin                : Fri Mar  8 13:55:08 2002
    copyright            : (C) 2000-2002 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Fri Mar  8 13:55:08 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

#include <qtc/qt_QString.h>
#include <qtc/qt_QCString.h>
#include <kdec/kde_HTMLTableElement.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/HTMLTableElement.h>
#include <kdeobjc/HTMLTableCaptionElement.h>
#include <kdeobjc/HTMLTableSectionElement.h>


@implementation  HTMLTableElement


- init
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_HTMLTableElement()];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- copyWithZone: (NSZone *) zone
{
	HTMLTableElement * aCopy;
	aCopy = [[(HTMLTableElement *)[[self class] allocWithZone: zone] setQt: kde_new_HTMLTableElement1([self qt])] init];
	[aCopy setAllocatedInObjcWorld: YES];
	[QtSupport setObject: aCopy forQtKey: [aCopy qt]];
	return aCopy;
}

- initWithDOMNode: (DOMNode*)other
{
	if ([self qt] == 0L) {
		[self setQt: kde_new_HTMLTableElement2((kde_DOMNode*) [other qt])];
		[self setAllocatedInObjcWorld: YES];
		[QtSupport setObject: self forQtKey: [self qt]];
	}
	[super init];
	return self;
}

- (void) dealloc
{
	if ([self qt] != 0L) {
		if ([self allocatedInObjcWorld]) {
			kde_del_HTMLTableElement((kde_HTMLTableElement *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- (HTMLTableCaptionElement*) caption
{
	return (HTMLTableCaptionElement*) [QtSupport objectForQtKey: kde_HTMLTableElement_caption((kde_HTMLTableElement *)[self qt]) withClass: [HTMLTableCaptionElement class] allocatedInObjcWorld: YES];
}

- setCaption: (HTMLTableCaptionElement*)arg1
{
	kde_HTMLTableElement_setCaption((kde_HTMLTableElement *)[self qt], (kde_HTMLTableCaptionElement*) [arg1 qt]);
	return self;
}

- (HTMLTableSectionElement*) tHead
{
	return (HTMLTableSectionElement*) [QtSupport objectForQtKey: kde_HTMLTableElement_tHead((kde_HTMLTableElement *)[self qt]) withClass: [HTMLTableSectionElement class] allocatedInObjcWorld: YES];
}

- setTHead: (HTMLTableSectionElement*)arg1
{
	kde_HTMLTableElement_setTHead((kde_HTMLTableElement *)[self qt], (kde_HTMLTableSectionElement*) [arg1 qt]);
	return self;
}

- (HTMLTableSectionElement*) tFoot
{
	return (HTMLTableSectionElement*) [QtSupport objectForQtKey: kde_HTMLTableElement_tFoot((kde_HTMLTableElement *)[self qt]) withClass: [HTMLTableSectionElement class] allocatedInObjcWorld: YES];
}

- setTFoot: (HTMLTableSectionElement*)arg1
{
	kde_HTMLTableElement_setTFoot((kde_HTMLTableElement *)[self qt], (kde_HTMLTableSectionElement*) [arg1 qt]);
	return self;
}

- (HTMLCollection*) rows
{
	return (HTMLCollection*) [QtSupport objectForQtKey: kde_HTMLTableElement_rows((kde_HTMLTableElement *)[self qt]) withClass: [HTMLCollection class] allocatedInObjcWorld: YES];
}

- (HTMLCollection*) tBodies
{
	return (HTMLCollection*) [QtSupport objectForQtKey: kde_HTMLTableElement_tBodies((kde_HTMLTableElement *)[self qt]) withClass: [HTMLCollection class] allocatedInObjcWorld: YES];
}

- (NSString *) align
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLTableElement_align((kde_HTMLTableElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

- setAlign: (NSString *)arg1
{
static kde_DOMString * _domstring_arg1 = 0L;
	kde_HTMLTableElement_setAlign((kde_HTMLTableElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
	return self;
}

- (NSString *) bgColor
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLTableElement_bgColor((kde_HTMLTableElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

- setBgColor: (NSString *)arg1
{
static kde_DOMString * _domstring_arg1 = 0L;
	kde_HTMLTableElement_setBgColor((kde_HTMLTableElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
	return self;
}

- (NSString *) border
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLTableElement_border((kde_HTMLTableElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

- setBorder: (NSString *)arg1
{
static kde_DOMString * _domstring_arg1 = 0L;
	kde_HTMLTableElement_setBorder((kde_HTMLTableElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
	return self;
}

- (NSString *) cellPadding
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLTableElement_cellPadding((kde_HTMLTableElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

- setCellPadding: (NSString *)arg1
{
static kde_DOMString * _domstring_arg1 = 0L;
	kde_HTMLTableElement_setCellPadding((kde_HTMLTableElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
	return self;
}

- (NSString *) cellSpacing
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLTableElement_cellSpacing((kde_HTMLTableElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

- setCellSpacing: (NSString *)arg1
{
static kde_DOMString * _domstring_arg1 = 0L;
	kde_HTMLTableElement_setCellSpacing((kde_HTMLTableElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
	return self;
}

- (NSString *) frame
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLTableElement_frame((kde_HTMLTableElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

- setFrame: (NSString *)arg1
{
static kde_DOMString * _domstring_arg1 = 0L;
	kde_HTMLTableElement_setFrame((kde_HTMLTableElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
	return self;
}

- (NSString *) rules
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLTableElement_rules((kde_HTMLTableElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

- setRules: (NSString *)arg1
{
static kde_DOMString * _domstring_arg1 = 0L;
	kde_HTMLTableElement_setRules((kde_HTMLTableElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
	return self;
}

- (NSString *) summary
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLTableElement_summary((kde_HTMLTableElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

- setSummary: (NSString *)arg1
{
static kde_DOMString * _domstring_arg1 = 0L;
	kde_HTMLTableElement_setSummary((kde_HTMLTableElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
	return self;
}

- (NSString *) width
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLTableElement_width((kde_HTMLTableElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

- setWidth: (NSString *)arg1
{
static kde_DOMString * _domstring_arg1 = 0L;
	kde_HTMLTableElement_setWidth((kde_HTMLTableElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
	return self;
}

- (HTMLElement*) createTHead
{
	return (HTMLElement*) [QtSupport objectForQtKey: kde_HTMLTableElement_createTHead((kde_HTMLTableElement *)[self qt]) withClass: [HTMLElement class] allocatedInObjcWorld: YES];
}

- deleteTHead
{
	kde_HTMLTableElement_deleteTHead((kde_HTMLTableElement *)[self qt]);
	return self;
}

- (HTMLElement*) createTFoot
{
	return (HTMLElement*) [QtSupport objectForQtKey: kde_HTMLTableElement_createTFoot((kde_HTMLTableElement *)[self qt]) withClass: [HTMLElement class] allocatedInObjcWorld: YES];
}

- deleteTFoot
{
	kde_HTMLTableElement_deleteTFoot((kde_HTMLTableElement *)[self qt]);
	return self;
}

- (HTMLElement*) createCaption
{
	return (HTMLElement*) [QtSupport objectForQtKey: kde_HTMLTableElement_createCaption((kde_HTMLTableElement *)[self qt]) withClass: [HTMLElement class] allocatedInObjcWorld: YES];
}

- deleteCaption
{
	kde_HTMLTableElement_deleteCaption((kde_HTMLTableElement *)[self qt]);
	return self;
}

- (HTMLElement*) insertRow: (long)index
{
	return (HTMLElement*) [QtSupport objectForQtKey: kde_HTMLTableElement_insertRow((kde_HTMLTableElement *)[self qt], (long)index) withClass: [HTMLElement class] allocatedInObjcWorld: YES];
}

- deleteRow: (long)index
{
	kde_HTMLTableElement_deleteRow((kde_HTMLTableElement *)[self qt], (long)index);
	return self;
}

@end
