/***************************************************************************
                            HTMLScriptElement.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_HTMLScriptElement.h>
#include <kdeobjc/KDESupport.h>
#include <kdeobjc/HTMLScriptElement.h>

@implementation  HTMLScriptElement


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

- copyWithZone: (NSZone *) zone
{
	HTMLScriptElement * aCopy;
	aCopy = [[(HTMLScriptElement *)[[self class] allocWithZone: zone] setQt: kde_new_HTMLScriptElement1([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_HTMLScriptElement2((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_HTMLScriptElement((kde_HTMLScriptElement *)[self qt]);
		}
		[QtSupport removeQtKey: [self qt]];
		[self setQt: 0L];
	}
	[super dealloc];
}

- (NSString *) text
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLScriptElement_text((kde_HTMLScriptElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

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

- (NSString *) htmlFor
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLScriptElement_htmlFor((kde_HTMLScriptElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

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

- (NSString *) event
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLScriptElement_event((kde_HTMLScriptElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

//- setEvent: (NSString *)arg1
//{
//static kde_DOMString * _domstring_arg1 = 0L;
//	kde_HTMLScriptElement_setEvent((kde_HTMLScriptElement *)[self qt], (kde_DOMString*) [arg1 toDOMString: &_domstring_arg1]);
//	return self;
//}

- (NSString *) charset
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLScriptElement_charset((kde_HTMLScriptElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

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

- (BOOL) defer
{
	return (BOOL) kde_HTMLScriptElement_defer((kde_HTMLScriptElement *)[self qt]);
}

- setDefer: (BOOL)arg1
{
	kde_HTMLScriptElement_setDefer((kde_HTMLScriptElement *)[self qt], (int)arg1);
	return self;
}

- (NSString *) src
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLScriptElement_src((kde_HTMLScriptElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

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

- (NSString *) type
{
static kde_DOMString * _domstring = 0L;
	_domstring = kde_HTMLScriptElement_type((kde_HTMLScriptElement *)[self qt]);
	return [NSString fromDOMString: _domstring];
}

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

@end
