dom_element.h
/*
* This file is part of the DOM implementation for KDE.
*
* (C) 1999 Lars Knoll (knoll@kde.org)
*
* 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.
*
* This library 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* This file includes excerpts from the Document Object Model (DOM)
* Level 1 Specification (Recommendation)
* http://www.w3.org/TR/REC-DOM-Level-1/
* Copyright © World Wide Web Consortium , (Massachusetts Institute of
* Technology , Institut National de Recherche en Informatique et en
* Automatique , Keio University ). All Rights Reserved.
*
*/
#ifndef _DOM_ELEMENT_h_
#define _DOM_ELEMENT_h_
#include <dom/dom_node.h>
#include <dom/css_value.h>
#include <kdelibs_export.h>
namespace DOM {
class DOMString;
class AttrImpl;
class Element;
class ElementImpl;
class NamedAttrMapImpl;
class DocumentImpl;
class KHTML_EXPORT Attr : public Node
{
friend class Element;
friend class Document;
friend class DocumentImpl;
friend class HTMLDocument;
friend class ElementImpl;
friend class NamedAttrMapImpl;
friend class AttrImpl;
public:
Attr();
Attr(const Node &other) : Node()
{(*this)=other;}
Attr(const Attr &other);
Attr & operator = (const Node &other);
Attr & operator = (const Attr &other);
~Attr();
DOMString name() const;
bool specified() const;
DOMString value() const;
void setValue( const DOMString & );
Element ownerElement() const;
protected:
Attr( AttrImpl *_impl );
};
class NodeList;
class Attr;
class DOMString;
class KHTML_EXPORT Element : public Node
{
friend class Document;
friend class HTMLDocument;
// friend class AttrImpl;
friend class Attr;
public:
Element();
Element(const Node &other) : Node()
{(*this)=other;}
Element(const Element &other);
Element & operator = (const Node &other);
Element & operator = (const Element &other);
~Element();
DOMString tagName() const;
DOMString getAttribute ( const DOMString &name );
void setAttribute ( const DOMString &name, const DOMString &value );
void removeAttribute ( const DOMString &name );
Attr getAttributeNode ( const DOMString &name );
Attr setAttributeNode ( const Attr &newAttr );
Attr removeAttributeNode ( const Attr &oldAttr );
NodeList getElementsByTagName ( const DOMString &name );
NodeList getElementsByTagNameNS ( const DOMString &namespaceURI,
const DOMString &localName );
DOMString getAttributeNS ( const DOMString &namespaceURI,
const DOMString &localName );
void setAttributeNS ( const DOMString &namespaceURI,
const DOMString &qualifiedName,
const DOMString &value );
void removeAttributeNS ( const DOMString &namespaceURI,
const DOMString &localName );
Attr getAttributeNodeNS ( const DOMString &namespaceURI,
const DOMString &localName );
Attr setAttributeNodeNS ( const Attr &newAttr );
bool hasAttribute( const DOMString& name );
bool hasAttributeNS ( const DOMString &namespaceURI,
const DOMString &localName );
CSSStyleDeclaration style ( );
bool contentEditable() const;
void setContentEditable(bool enabled);
bool isHTMLElement() const;
Element form() const;
static bool khtmlValidAttrName(const DOMString &name);
static bool khtmlValidPrefix(const DOMString &name);
static bool khtmlValidQualifiedName(const DOMString &name);
static bool khtmlMalformedQualifiedName(const DOMString &name);
static bool khtmlMalformedPrefix(const DOMString &name);
protected:
Element(ElementImpl *_impl);
};
} //namespace
#endif
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::HTMLDocument
An HTMLDocument is the root of the HTML hierarchy and holds the entire content.
Definition: html_document.h:73
DOM::CSSStyleDeclaration
The CSSStyleDeclaration interface represents a single CSS declaration block .
Definition: css_value.h:60
DOM::Element
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: dom_element.h:210
DOM::Attr
The Attr interface represents an attribute in an Element object.
Definition: dom_element.h:89
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::Document
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:245
DOM::NodeList
The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented.
Definition: dom_node.h:931

KDE Home | KDE Accessibility Home | Description of Access Keys