# khtml Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# dom_element.h

    00001 /*
    00002  * This file is part of the DOM implementation for KDE.
    00003  *
    00004  * (C) 1999 Lars Knoll (knoll@kde.org)
    00005  *
    00006  * This library is free software; you can redistribute it and/or
    00007  * modify it under the terms of the GNU Library General Public
    00008  * License as published by the Free Software Foundation; either
    00009  * version 2 of the License, or (at your option) any later version.
    00010  *
    00011  * This library is distributed in the hope that it will be useful,
    00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014  * Library General Public License for more details.
    00015  *
    00016  * You should have received a copy of the GNU Library General Public License
    00017  * along with this library; see the file COPYING.LIB.  If not, write to
    00018  * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00019  * Boston, MA 02111-1307, USA.
    00020  *
    00021  * This file includes excerpts from the Document Object Model (DOM)
    00022  * Level 1 Specification (Recommendation)
    00023  * http://www.w3.org/TR/REC-DOM-Level-1/
    00024  * Copyright © World Wide Web Consortium , (Massachusetts Institute of
    00025  * Technology , Institut National de Recherche en Informatique et en
    00026  * Automatique , Keio University ). All Rights Reserved.
    00027  *
    00028  */
    00029 #ifndef _DOM_ELEMENT_h_
    00030 #define _DOM_ELEMENT_h_
    00031
    00032 #include <dom/dom_node.h>
    00033 #include <dom/css_value.h>
    00034
    00035 #include <kdelibs_export.h>
    00036
    00037 namespace DOM {
    00038
    00039 class DOMString;
    00040 class AttrImpl;
    00041 class Element;
    00042 class ElementImpl;
    00043 class NamedAttrMapImpl;
    00044 class DocumentImpl;
    00045
    00089 class KHTML_EXPORT Attr : public Node
    00090 {
    00091     friend class Element;
    00092     friend class Document;
    00093     friend class DocumentImpl;
    00094     friend class HTMLDocument;
    00095     friend class ElementImpl;
    00096     friend class NamedAttrMapImpl;
    00097     friend class AttrImpl;
    00098
    00099 public:
    00100     Attr();
    00101     Attr(const Node &other) : Node()
    00102         {(*this)=other;}
    00103     Attr(const Attr &other);
    00104
    00105     Attr & operator = (const Node &other);
    00106     Attr & operator = (const Attr &other);
    00107
    00108     ~Attr();
    00109
    00114     DOMString name() const;
    00115
    00147     bool specified() const;
    00148
    00158     DOMString value() const;
    00159
    00163     void setValue( const DOMString & );
    00164
    00171     Element ownerElement() const;
    00172
    00173 protected:
    00174
    00175     Attr( AttrImpl *_impl );
    00176 };
    00177
    00178 class NodeList;
    00179 class Attr;
    00180 class DOMString;
    00181
    00210 class KHTML_EXPORT Element : public Node
    00211 {
    00212     friend class Document;
    00213     friend class HTMLDocument;
    00214 //    friend class AttrImpl;
    00215     friend class Attr;
    00216
    00217 public:
    00218     Element();
    00219     Element(const Node &other) : Node()
    00220         {(*this)=other;}
    00221     Element(const Element &other);
    00222
    00223     Element & operator = (const Node &other);
    00224     Element & operator = (const Element &other);
    00225
    00226     ~Element();
    00227
    00238     DOMString tagName() const;
    00239
    00250     DOMString getAttribute ( const DOMString &name );
    00251
    00279     void setAttribute ( const DOMString &name, const DOMString &value );
    00280
    00293     void removeAttribute ( const DOMString &name );
    00294
    00305     Attr getAttributeNode ( const DOMString &name );
    00306
    00332     Attr setAttributeNode ( const Attr &newAttr );
    00333
    00350     Attr removeAttributeNode ( const Attr &oldAttr );
    00351
    00364     NodeList getElementsByTagName ( const DOMString &name );
    00365
    00380     NodeList getElementsByTagNameNS ( const DOMString &namespaceURI,
    00381                                       const DOMString &localName );
    00382
    00398     DOMString getAttributeNS ( const DOMString &namespaceURI,
    00399                                const DOMString &localName );
    00400
    00439     void setAttributeNS ( const DOMString &namespaceURI,
    00440                           const DOMString &qualifiedName,
    00441                           const DOMString &value );
    00442
    00460     void removeAttributeNS ( const DOMString &namespaceURI,
    00461                              const DOMString &localName );
    00462
    00476     Attr getAttributeNodeNS ( const DOMString &namespaceURI,
    00477                               const DOMString &localName );
    00478
    00504     Attr setAttributeNodeNS ( const Attr &newAttr );
    00505
    00516     bool hasAttribute( const DOMString& name );
    00517
    00532     bool hasAttributeNS ( const DOMString &namespaceURI,
    00533                           const DOMString &localName );
    00534
    00541     CSSStyleDeclaration style (  );
    00542
    00555     bool contentEditable() const;
    00556
    00573     void setContentEditable(bool enabled);
    00574
    00579     bool isHTMLElement() const;
    00580
    00587     Element form() const;
    00588
    00589     static bool khtmlValidAttrName(const DOMString &name);
    00590     static bool khtmlValidPrefix(const DOMString &name);
    00591     static bool khtmlValidQualifiedName(const DOMString &name);
    00592
    00593     static bool khtmlMalformedQualifiedName(const DOMString &name);
    00594     static bool khtmlMalformedPrefix(const DOMString &name);
    00595 protected:
    00596     Element(ElementImpl *_impl);
    00597 };
    00598
    00599 } //namespace
    00600 #endif

This file is part of the documentation for khtml Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:33:10 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003