dom_element.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
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 namespace DOM {
00036
00037 class DOMString;
00038 class AttrImpl;
00039 class Element;
00040 class ElementImpl;
00041 class NamedAttrMapImpl;
00042 class DocumentImpl;
00043
00087 class Attr : public Node
00088 {
00089 friend class Element;
00090 friend class Document;
00091 friend class DocumentImpl;
00092 friend class HTMLDocument;
00093 friend class ElementImpl;
00094 friend class NamedAttrMapImpl;
00095 friend class AttrImpl;
00096
00097 public:
00098 Attr();
00099 Attr(const Node &other) : Node()
00100 {(*this)=other;}
00101 Attr(const Attr &other);
00102
00103 Attr & operator = (const Node &other);
00104 Attr & operator = (const Attr &other);
00105
00106 ~Attr();
00107
00112 DOMString name() const;
00113
00145 bool specified() const;
00146
00156 DOMString value() const;
00157
00161 void setValue( const DOMString & );
00162
00169 Element ownerElement() const;
00170
00171 protected:
00172
00173 Attr( AttrImpl *_impl );
00174 };
00175
00176 class NodeList;
00177 class Attr;
00178 class DOMString;
00179
00208 class Element : public Node
00209 {
00210 friend class Document;
00211 friend class HTMLDocument;
00212
00213 friend class Attr;
00214
00215 public:
00216 Element();
00217 Element(const Node &other) : Node()
00218 {(*this)=other;}
00219 Element(const Element &other);
00220
00221 Element & operator = (const Node &other);
00222 Element & operator = (const Element &other);
00223
00224 ~Element();
00225
00236 DOMString tagName() const;
00237
00248 DOMString getAttribute ( const DOMString &name );
00249
00277 void setAttribute ( const DOMString &name, const DOMString &value );
00278
00291 void removeAttribute ( const DOMString &name );
00292
00303 Attr getAttributeNode ( const DOMString &name );
00304
00330 Attr setAttributeNode ( const Attr &newAttr );
00331
00348 Attr removeAttributeNode ( const Attr &oldAttr );
00349
00362 NodeList getElementsByTagName ( const DOMString &name );
00363
00378 NodeList getElementsByTagNameNS ( const DOMString &namespaceURI,
00379 const DOMString &localName );
00380
00396 DOMString getAttributeNS ( const DOMString &namespaceURI,
00397 const DOMString &localName );
00398
00437 void setAttributeNS ( const DOMString &namespaceURI,
00438 const DOMString &qualifiedName,
00439 const DOMString &value );
00440
00458 void removeAttributeNS ( const DOMString &namespaceURI,
00459 const DOMString &localName );
00460
00474 Attr getAttributeNodeNS ( const DOMString &namespaceURI,
00475 const DOMString &localName );
00476
00502 Attr setAttributeNodeNS ( const Attr &newAttr );
00503
00514 bool hasAttribute( const DOMString& name );
00515
00530 bool hasAttributeNS ( const DOMString &namespaceURI,
00531 const DOMString &localName );
00532
00539 CSSStyleDeclaration style ( );
00540
00553 bool contentEditable() const;
00554
00571 void setContentEditable(bool enabled);
00572
00577 bool isHTMLElement() const;
00578
00585 Element form() const;
00586
00587 static bool khtmlValidAttrName(const DOMString &name);
00588 static bool khtmlValidPrefix(const DOMString &name);
00589 static bool khtmlValidQualifiedName(const DOMString &name);
00590
00591 static bool khtmlMalformedQualifiedName(const DOMString &name);
00592 static bool khtmlMalformedPrefix(const DOMString &name);
00593 protected:
00594 Element(ElementImpl *_impl);
00595 };
00596
00597 }
00598 #endif
This file is part of the documentation for khtml Library Version 3.3.0.