• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdehtml
 

tdehtml

  • tdehtml
  • dom
dom_element.h
1/*
2 * This file is part of the DOM implementation for KDE.
3 *
4 * (C) 1999 Lars Knoll (knoll@kde.org)
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 * This file includes excerpts from the Document Object Model (DOM)
22 * Level 1 Specification (Recommendation)
23 * http://www.w3.org/TR/REC-DOM-Level-1/
24 * Copyright © World Wide Web Consortium , (Massachusetts Institute of
25 * Technology , Institut National de Recherche en Informatique et en
26 * Automatique , Keio University ). All Rights Reserved.
27 *
28 */
29#ifndef _DOM_ELEMENT_h_
30#define _DOM_ELEMENT_h_
31
32#include <dom/dom_node.h>
33#include <dom/css_value.h>
34
35#include <tdelibs_export.h>
36
37namespace DOM {
38
39class DOMString;
40class AttrImpl;
41class Element;
42class ElementImpl;
43class NamedAttrMapImpl;
44class DocumentImpl;
45
89class TDEHTML_EXPORT Attr : public Node
90{
91 friend class Element;
92 friend class Document;
93 friend class DocumentImpl;
94 friend class HTMLDocument;
95 friend class ElementImpl;
96 friend class NamedAttrMapImpl;
97 friend class AttrImpl;
98
99public:
100 Attr();
101 Attr(const Node &other) : Node()
102 {(*this)=other;}
103 Attr(const Attr &other);
104
105 Attr & operator = (const Node &other);
106 Attr & operator = (const Attr &other);
107
108 ~Attr();
109
114 DOMString name() const;
115
147 bool specified() const;
148
158 DOMString value() const;
159
163 void setValue( const DOMString & );
164
171 Element ownerElement() const;
172
173protected:
174
175 Attr( AttrImpl *_impl );
176};
177
178class NodeList;
179class Attr;
180class DOMString;
181
210class TDEHTML_EXPORT Element : public Node
211{
212 friend class Document;
213 friend class HTMLDocument;
214// friend class AttrImpl;
215 friend class Attr;
216
217public:
218 Element();
219 Element(const Node &other) : Node()
220 {(*this)=other;}
221 Element(const Element &other);
222
223 Element & operator = (const Node &other);
224 Element & operator = (const Element &other);
225
226 ~Element();
227
238 DOMString tagName() const;
239
250 DOMString getAttribute ( const DOMString &name );
251
279 void setAttribute ( const DOMString &name, const DOMString &value );
280
293 void removeAttribute ( const DOMString &name );
294
305 Attr getAttributeNode ( const DOMString &name );
306
332 Attr setAttributeNode ( const Attr &newAttr );
333
350 Attr removeAttributeNode ( const Attr &oldAttr );
351
364 NodeList getElementsByTagName ( const DOMString &name );
365
380 NodeList getElementsByTagNameNS ( const DOMString &namespaceURI,
381 const DOMString &localName );
382
398 DOMString getAttributeNS ( const DOMString &namespaceURI,
399 const DOMString &localName );
400
439 void setAttributeNS ( const DOMString &namespaceURI,
440 const DOMString &qualifiedName,
441 const DOMString &value );
442
460 void removeAttributeNS ( const DOMString &namespaceURI,
461 const DOMString &localName );
462
476 Attr getAttributeNodeNS ( const DOMString &namespaceURI,
477 const DOMString &localName );
478
504 Attr setAttributeNodeNS ( const Attr &newAttr );
505
516 bool hasAttribute( const DOMString& name );
517
532 bool hasAttributeNS ( const DOMString &namespaceURI,
533 const DOMString &localName );
534
541 CSSStyleDeclaration style ( );
542
555 bool contentEditable() const;
556
573 void setContentEditable(bool enabled);
574
579 bool isHTMLElement() const;
580
587 Element form() const;
588
589 static bool tdehtmlValidAttrName(const DOMString &name);
590 static bool tdehtmlValidPrefix(const DOMString &name);
591 static bool tdehtmlValidQualifiedName(const DOMString &name);
592
593 static bool tdehtmlMalformedQualifiedName(const DOMString &name);
594 static bool tdehtmlMalformedPrefix(const DOMString &name);
595protected:
596 Element(ElementImpl *_impl);
597};
598
599} //namespace
600#endif
DOM::Attr
The Attr interface represents an attribute in an Element object.
Definition dom_element.h:90
DOM::Attr::name
DOMString name() const
Returns the name of this attribute.
Definition dom_element.cpp:68
DOM::Attr::ownerElement
Element ownerElement() const
Introduced in DOM Level 2.
Definition dom_element.cpp:80
DOM::Attr::specified
bool specified() const
If this attribute was explicitly given a value in the original document, this is true ; otherwise,...
Definition dom_element.cpp:74
DOM::Attr::value
DOMString value() const
On retrieval, the value of the attribute is returned as a string.
Definition dom_element.cpp:86
DOM::Attr::setValue
void setValue(const DOMString &)
see value
Definition dom_element.cpp:92
DOM::CSSStyleDeclaration
The CSSStyleDeclaration interface represents a single CSS declaration block .
Definition css_value.h:61
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition dom_string.h:44
DOM::Element
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition dom_element.h:211
DOM::Element::tagName
DOMString tagName() const
The name of the element.
Definition dom_element.cpp:141
DOM::Element::getAttributeNS
DOMString getAttributeNS(const DOMString &namespaceURI, const DOMString &localName)
Introduced in DOM Level 2.
Definition dom_element.cpp:249
DOM::Element::setAttributeNode
Attr setAttributeNode(const Attr &newAttr)
Adds a new attribute.
Definition dom_element.cpp:201
DOM::Element::hasAttribute
bool hasAttribute(const DOMString &name)
Returns true when an attribute with a given name is specified on this element or has a default value,...
Definition dom_element.cpp:312
DOM::Element::getAttribute
DOMString getAttribute(const DOMString &name)
Retrieves an attribute value by name.
Definition dom_element.cpp:147
DOM::Element::removeAttribute
void removeAttribute(const DOMString &name)
Removes an attribute by name.
Definition dom_element.cpp:174
DOM::Element::setAttributeNodeNS
Attr setAttributeNodeNS(const Attr &newAttr)
Introduced in DOM Level 2.
Definition dom_element.cpp:297
DOM::Element::getElementsByTagName
NodeList getElementsByTagName(const DOMString &name)
Returns a NodeList of all descendant elements with a given tag name, in the order in which they would...
Definition dom_element.cpp:231
DOM::Element::getAttributeNode
Attr getAttributeNode(const DOMString &name)
Retrieves an Attr node by name.
Definition dom_element.cpp:188
DOM::Element::style
CSSStyleDeclaration style()
Introduced in DOM Level 2 This method is from the CSSStyleDeclaration interface.
Definition dom_element.cpp:349
DOM::Element::hasAttributeNS
bool hasAttributeNS(const DOMString &namespaceURI, const DOMString &localName)
Introduced in DOM Level 2.
Definition dom_element.cpp:322
DOM::Element::contentEditable
bool contentEditable() const
not part of the official DOM
Definition dom_element.cpp:355
DOM::Element::setAttribute
void setAttribute(const DOMString &name, const DOMString &value)
Adds a new attribute.
Definition dom_element.cpp:162
DOM::Element::getAttributeNodeNS
Attr getAttributeNodeNS(const DOMString &namespaceURI, const DOMString &localName)
Introduced in DOM Level 2.
Definition dom_element.cpp:284
DOM::Element::getElementsByTagNameNS
NodeList getElementsByTagNameNS(const DOMString &namespaceURI, const DOMString &localName)
Introduced in DOM Level 2 Returns a NodeList of all the descendant Elements with a given local name a...
Definition dom_element.cpp:242
DOM::Element::removeAttributeNS
void removeAttributeNS(const DOMString &namespaceURI, const DOMString &localName)
Introduced in DOM Level 2.
Definition dom_element.cpp:271
DOM::Element::setAttributeNS
void setAttributeNS(const DOMString &namespaceURI, const DOMString &qualifiedName, const DOMString &value)
Introduced in DOM Level 2.
Definition dom_element.cpp:259
DOM::Element::setContentEditable
void setContentEditable(bool enabled)
not part of the official DOM
Definition dom_element.cpp:360
DOM::Element::removeAttributeNode
Attr removeAttributeNode(const Attr &oldAttr)
Removes the specified attribute.
Definition dom_element.cpp:216
DOM::Element::form
Element form() const
TDEHTML extension to DOM This method returns the associated form element.
Definition dom_element.cpp:338
DOM::NodeList
The NodeList interface provides the abstraction of an ordered collection of nodes,...
Definition dom_node.h:932
DOM::Node::localName
DOMString localName() const
Introduced in DOM Level 2.
Definition dom_node.cpp:359
DOM::Node::namespaceURI
DOMString namespaceURI() const
Introduced in DOM Level 2.
Definition dom_node.cpp:338
DOM
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
Definition design.h:57

tdehtml

Skip menu "tdehtml"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.15.0
This website is maintained by Timothy Pearson.