//
//     Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
//     Earlier copyrights 1998 - 2007 Jim Bublitz also apply

//                 Generated by twine

// This file is part of PyKDE4.

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

// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.


%ModuleHeaderCode
//ctscc
#include <dom_doc.h>
#include <dom_element.h>
#include <dom_node.h>
#include <dom_text.h>
#include <dom_xml.h>
#include <html_base.h>
#include <html_block.h>
#include <html_document.h>
#include <html_element.h>
#include <html_form.h>
#include <html_head.h>
#include <html_image.h>
#include <html_inline.h>
#include <html_list.h>
#include <html_misc.h>
#include <html_object.h>
#include <html_table.h>
%End

namespace DOM
{

class Attr : DOM::Node
{
%TypeHeaderCode
#include <dom_element.h>
%End


public:
                            Attr ();
                            Attr (const DOM::Node& other);
                            Attr (const DOM::Attr& other);
    DOM::DOMString          name () const;
    bool                    specified () const;
    DOM::DOMString          value () const;
    void                    setValue (const DOM::DOMString&);
    DOM::Element            ownerElement () const;

protected:
//ig                            Attr (AttrImpl* _impl);


//  Subclasses of DOM::Node

%ConvertToSubClassCode
    // CTSCC for subclasses of 'Node'
    sipType = NULL;

    if (dynamic_cast<DOM::Attr*>(sipCpp))
        sipType = sipType_DOM_Attr;
    else if (dynamic_cast<DOM::CharacterData*>(sipCpp))
        {
        sipType = sipType_DOM_CharacterData;
        if (dynamic_cast<DOM::Comment*>(sipCpp))
            sipType = sipType_DOM_Comment;
        else if (dynamic_cast<DOM::Text*>(sipCpp))
            {
            sipType = sipType_DOM_Text;
            if (dynamic_cast<DOM::CDATASection*>(sipCpp))
                sipType = sipType_DOM_CDATASection;
            }
        }
    else if (dynamic_cast<DOM::Document*>(sipCpp))
        {
        sipType = sipType_DOM_Document;
        if (dynamic_cast<DOM::HTMLDocument*>(sipCpp))
            sipType = sipType_DOM_HTMLDocument;
        }
    else if (dynamic_cast<DOM::DocumentFragment*>(sipCpp))
        sipType = sipType_DOM_DocumentFragment;
    else if (dynamic_cast<DOM::DocumentType*>(sipCpp))
        sipType = sipType_DOM_DocumentType;
    else if (dynamic_cast<DOM::Element*>(sipCpp))
        {
        sipType = sipType_DOM_Element;
        if (dynamic_cast<DOM::HTMLElement*>(sipCpp))
            {
            sipType = sipType_DOM_HTMLElement;
            if (dynamic_cast<DOM::HTMLAnchorElement*>(sipCpp))
                sipType = sipType_DOM_HTMLAnchorElement;
            else if (dynamic_cast<DOM::HTMLAppletElement*>(sipCpp))
                sipType = sipType_DOM_HTMLAppletElement;
            else if (dynamic_cast<DOM::HTMLAreaElement*>(sipCpp))
                sipType = sipType_DOM_HTMLAreaElement;
            else if (dynamic_cast<DOM::HTMLBRElement*>(sipCpp))
                sipType = sipType_DOM_HTMLBRElement;
            else if (dynamic_cast<DOM::HTMLBaseElement*>(sipCpp))
                sipType = sipType_DOM_HTMLBaseElement;
            else if (dynamic_cast<DOM::HTMLBaseFontElement*>(sipCpp))
                sipType = sipType_DOM_HTMLBaseFontElement;
            else if (dynamic_cast<DOM::HTMLBlockquoteElement*>(sipCpp))
                sipType = sipType_DOM_HTMLBlockquoteElement;
            else if (dynamic_cast<DOM::HTMLBodyElement*>(sipCpp))
                sipType = sipType_DOM_HTMLBodyElement;
            else if (dynamic_cast<DOM::HTMLButtonElement*>(sipCpp))
                sipType = sipType_DOM_HTMLButtonElement;
            else if (dynamic_cast<DOM::HTMLDListElement*>(sipCpp))
                sipType = sipType_DOM_HTMLDListElement;
            else if (dynamic_cast<DOM::HTMLDirectoryElement*>(sipCpp))
                sipType = sipType_DOM_HTMLDirectoryElement;
            else if (dynamic_cast<DOM::HTMLDivElement*>(sipCpp))
                sipType = sipType_DOM_HTMLDivElement;
            else if (dynamic_cast<DOM::HTMLFieldSetElement*>(sipCpp))
                sipType = sipType_DOM_HTMLFieldSetElement;
            else if (dynamic_cast<DOM::HTMLFontElement*>(sipCpp))
                sipType = sipType_DOM_HTMLFontElement;
            else if (dynamic_cast<DOM::HTMLFormElement*>(sipCpp))
                sipType = sipType_DOM_HTMLFormElement;
            else if (dynamic_cast<DOM::HTMLFrameElement*>(sipCpp))
                sipType = sipType_DOM_HTMLFrameElement;
            else if (dynamic_cast<DOM::HTMLFrameSetElement*>(sipCpp))
                sipType = sipType_DOM_HTMLFrameSetElement;
            else if (dynamic_cast<DOM::HTMLHRElement*>(sipCpp))
                sipType = sipType_DOM_HTMLHRElement;
            else if (dynamic_cast<DOM::HTMLHeadElement*>(sipCpp))
                sipType = sipType_DOM_HTMLHeadElement;
            else if (dynamic_cast<DOM::HTMLHeadingElement*>(sipCpp))
                sipType = sipType_DOM_HTMLHeadingElement;
            else if (dynamic_cast<DOM::HTMLHtmlElement*>(sipCpp))
                sipType = sipType_DOM_HTMLHtmlElement;
            else if (dynamic_cast<DOM::HTMLIFrameElement*>(sipCpp))
                sipType = sipType_DOM_HTMLIFrameElement;
            else if (dynamic_cast<DOM::HTMLImageElement*>(sipCpp))
                sipType = sipType_DOM_HTMLImageElement;
            else if (dynamic_cast<DOM::HTMLInputElement*>(sipCpp))
                sipType = sipType_DOM_HTMLInputElement;
            else if (dynamic_cast<DOM::HTMLIsIndexElement*>(sipCpp))
                sipType = sipType_DOM_HTMLIsIndexElement;
            else if (dynamic_cast<DOM::HTMLLIElement*>(sipCpp))
                sipType = sipType_DOM_HTMLLIElement;
            else if (dynamic_cast<DOM::HTMLLabelElement*>(sipCpp))
                sipType = sipType_DOM_HTMLLabelElement;
            else if (dynamic_cast<DOM::HTMLLayerElement*>(sipCpp))
                sipType = sipType_DOM_HTMLLayerElement;
            else if (dynamic_cast<DOM::HTMLLegendElement*>(sipCpp))
                sipType = sipType_DOM_HTMLLegendElement;
            else if (dynamic_cast<DOM::HTMLLinkElement*>(sipCpp))
                sipType = sipType_DOM_HTMLLinkElement;
            else if (dynamic_cast<DOM::HTMLMapElement*>(sipCpp))
                sipType = sipType_DOM_HTMLMapElement;
            else if (dynamic_cast<DOM::HTMLMenuElement*>(sipCpp))
                sipType = sipType_DOM_HTMLMenuElement;
            else if (dynamic_cast<DOM::HTMLMetaElement*>(sipCpp))
                sipType = sipType_DOM_HTMLMetaElement;
            else if (dynamic_cast<DOM::HTMLModElement*>(sipCpp))
                sipType = sipType_DOM_HTMLModElement;
            else if (dynamic_cast<DOM::HTMLOListElement*>(sipCpp))
                sipType = sipType_DOM_HTMLOListElement;
            else if (dynamic_cast<DOM::HTMLObjectElement*>(sipCpp))
                sipType = sipType_DOM_HTMLObjectElement;
            else if (dynamic_cast<DOM::HTMLOptGroupElement*>(sipCpp))
                sipType = sipType_DOM_HTMLOptGroupElement;
            else if (dynamic_cast<DOM::HTMLOptionElement*>(sipCpp))
                sipType = sipType_DOM_HTMLOptionElement;
            else if (dynamic_cast<DOM::HTMLParagraphElement*>(sipCpp))
                sipType = sipType_DOM_HTMLParagraphElement;
            else if (dynamic_cast<DOM::HTMLParamElement*>(sipCpp))
                sipType = sipType_DOM_HTMLParamElement;
            else if (dynamic_cast<DOM::HTMLPreElement*>(sipCpp))
                sipType = sipType_DOM_HTMLPreElement;
            else if (dynamic_cast<DOM::HTMLQuoteElement*>(sipCpp))
                sipType = sipType_DOM_HTMLQuoteElement;
            else if (dynamic_cast<DOM::HTMLScriptElement*>(sipCpp))
                sipType = sipType_DOM_HTMLScriptElement;
            else if (dynamic_cast<DOM::HTMLSelectElement*>(sipCpp))
                sipType = sipType_DOM_HTMLSelectElement;
            else if (dynamic_cast<DOM::HTMLStyleElement*>(sipCpp))
                sipType = sipType_DOM_HTMLStyleElement;
            else if (dynamic_cast<DOM::HTMLTableCaptionElement*>(sipCpp))
                sipType = sipType_DOM_HTMLTableCaptionElement;
            else if (dynamic_cast<DOM::HTMLTableCellElement*>(sipCpp))
                sipType = sipType_DOM_HTMLTableCellElement;
            else if (dynamic_cast<DOM::HTMLTableColElement*>(sipCpp))
                sipType = sipType_DOM_HTMLTableColElement;
            else if (dynamic_cast<DOM::HTMLTableElement*>(sipCpp))
                sipType = sipType_DOM_HTMLTableElement;
            else if (dynamic_cast<DOM::HTMLTableRowElement*>(sipCpp))
                sipType = sipType_DOM_HTMLTableRowElement;
            else if (dynamic_cast<DOM::HTMLTableSectionElement*>(sipCpp))
                sipType = sipType_DOM_HTMLTableSectionElement;
            else if (dynamic_cast<DOM::HTMLTextAreaElement*>(sipCpp))
                sipType = sipType_DOM_HTMLTextAreaElement;
            else if (dynamic_cast<DOM::HTMLTitleElement*>(sipCpp))
                sipType = sipType_DOM_HTMLTitleElement;
            else if (dynamic_cast<DOM::HTMLUListElement*>(sipCpp))
                sipType = sipType_DOM_HTMLUListElement;
            }
        }
    else if (dynamic_cast<DOM::Entity*>(sipCpp))
        sipType = sipType_DOM_Entity;
    else if (dynamic_cast<DOM::EntityReference*>(sipCpp))
        sipType = sipType_DOM_EntityReference;
    else if (dynamic_cast<DOM::Notation*>(sipCpp))
        sipType = sipType_DOM_Notation;
    else if (dynamic_cast<DOM::ProcessingInstruction*>(sipCpp))
        sipType = sipType_DOM_ProcessingInstruction;
%End

public:
    ~Attr ();
};
// Attr


class Element : DOM::Node
{
%TypeHeaderCode
#include <dom_element.h>
%End


public:
                            Element ();
                            Element (const DOM::Node& other);
                            Element (const DOM::Element& other);
    DOM::DOMString          tagName () const;
    DOM::DOMString          getAttribute (const DOM::DOMString& name);
    void                    setAttribute (const DOM::DOMString& name, const DOM::DOMString& value);
    void                    removeAttribute (const DOM::DOMString& name);
    DOM::Attr               getAttributeNode (const DOM::DOMString& name);
    DOM::Attr               setAttributeNode (const DOM::Attr& newAttr);
    DOM::Attr               removeAttributeNode (const DOM::Attr& oldAttr);
    DOM::NodeList           getElementsByTagName (const DOM::DOMString& name);
    DOM::NodeList           getElementsByTagNameNS (const DOM::DOMString& namespaceURI, const DOM::DOMString& localName);
    DOM::NodeList           getElementsByClassName (const DOM::DOMString& className);
    DOM::DOMString          getAttributeNS (const DOM::DOMString& namespaceURI, const DOM::DOMString& localName);
    void                    setAttributeNS (const DOM::DOMString& namespaceURI, const DOM::DOMString& qualifiedName, const DOM::DOMString& value);
    void                    removeAttributeNS (const DOM::DOMString& namespaceURI, const DOM::DOMString& localName);
    DOM::Attr               getAttributeNodeNS (const DOM::DOMString& namespaceURI, const DOM::DOMString& localName);
    DOM::Attr               setAttributeNodeNS (const DOM::Attr& newAttr);
    bool                    hasAttribute (const DOM::DOMString& name);
    bool                    hasAttributeNS (const DOM::DOMString& namespaceURI, const DOM::DOMString& localName);
    DOM::CSSStyleDeclaration  style ();
    DOM::Element            firstElementChild () const;
    DOM::Element            lastElementChild () const;
    DOM::Element            previousElementSibling () const;
    DOM::Element            nextElementSibling () const;
    unsigned long           childElementCount () const;
// FIXME no implementation???
//ig    bool                    contentEditable () const;
// FIXME no implementation???
//ig    void                    setContentEditable (bool enabled);
    bool                    isHTMLElement () const;
    DOM::Element            form () const;
    static bool             khtmlValidAttrName (const DOM::DOMString& name);
    static bool             khtmlValidPrefix (const DOM::DOMString& name);
    static bool             khtmlValidQualifiedName (const DOM::DOMString& name);
    static bool             khtmlMalformedQualifiedName (const DOM::DOMString& name);
    static bool             khtmlMalformedPrefix (const DOM::DOMString& name);

protected:
//ig                            Element (ElementImpl* _impl);
public:
    ~Element ();
    DOM::Element            querySelector (const DOM::DOMString& query) const;
    DOM::NodeList           querySelectorAll (const DOM::DOMString& query) const;
};
// Element

};
// DOM


