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

tdehtml

  • tdehtml
  • dom
dom_node.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 * This file includes excerpts from the Document Object Model (DOM)
29 * Level 3 Core Specification (Recommendation)
30 * http://www.w3.org/TR/DOM-Level-3-Core/
31 * Copyright ©2004 W3C® (MIT, ERCIM, Keio), All Rights Reserved.
32 */
33#ifndef _DOM_Node_h_
34#define _DOM_Node_h_
35
36#include <tqstring.h>
37#include <tdelibs_export.h>
38
39class TQRect;
40
41namespace KJS {
42 class HTMLDocument;
43 class Window;
44}
45namespace DOM {
46
47class Node;
48class DOMString;
49class NodeImpl;
50class NamedNodeMapImpl;
51class EventListener;
52class Event;
53
66class TDEHTML_EXPORT NamedNodeMap
67{
68public:
69 NamedNodeMap();
70 NamedNodeMap(const NamedNodeMap &other);
71
72 NamedNodeMap & operator = (const NamedNodeMap &other);
73
74 ~NamedNodeMap();
75
81 unsigned long length() const;
82
93 Node getNamedItem ( const DOMString &name ) const;
94
127 Node setNamedItem ( const Node &arg );
128
144 Node removeNamedItem ( const DOMString &name );
145
158 Node item ( unsigned long index ) const;
159
173 Node getNamedItemNS( const DOMString &namespaceURI,
174 const DOMString &localName ) const;
175
200 Node setNamedItemNS( const Node &arg );
201
226 Node removeNamedItemNS( const DOMString &namespaceURI,
227 const DOMString &localName );
228
233 NamedNodeMapImpl *handle() const { return impl; }
234 bool isNull() const { return !impl; }
235
236protected:
237 NamedNodeMap( NamedNodeMapImpl *i);
238 NamedNodeMapImpl *impl;
239
240 friend class Node;
241 friend class DocumentType;
242 friend class NodeImpl;
243};
244
245class NamedNodeMap;
246class NodeList;
247class Document;
248class DOMString;
249class StyleSheet;
250
251class NodeImpl;
252
274class TDEHTML_EXPORT Node
275{
276 friend class NamedNodeMap;
277 friend class NodeList;
278 friend class HTMLCollection;
279 friend class StyleSheet;
280
281public:
282 Node() : impl(0) {}
283 Node(const Node &other);
284
288 Node( NodeImpl *_impl);
289
290 Node & operator = (const Node &other);
291
292 bool operator == (const Node &other) const;
293
294 bool operator != (const Node &other) const;
295
296 virtual ~Node();
385 enum NodeType {
386 ELEMENT_NODE = 1,
387 ATTRIBUTE_NODE = 2,
388 TEXT_NODE = 3,
389 CDATA_SECTION_NODE = 4,
390 ENTITY_REFERENCE_NODE = 5,
391 ENTITY_NODE = 6,
392 PROCESSING_INSTRUCTION_NODE = 7,
393 COMMENT_NODE = 8,
394 DOCUMENT_NODE = 9,
395 DOCUMENT_TYPE_NODE = 10,
396 DOCUMENT_FRAGMENT_NODE = 11,
397 NOTATION_NODE = 12
398 };
399
405 DOMString nodeName() const;
406
417 DOMString nodeValue() const;
418
425 void setNodeValue( const DOMString & );
426
432 unsigned short nodeType() const;
433
442 Node parentNode() const;
443
457 NodeList childNodes() const;
458
464 Node firstChild() const;
465
471 Node lastChild() const;
472
478 Node previousSibling() const;
479
485 Node nextSibling() const;
486
493 NamedNodeMap attributes() const;
494
502 Document ownerDocument() const;
503
538 Node insertBefore ( const Node &newChild, const Node &refChild );
539
568 Node replaceChild ( const Node &newChild, const Node &oldChild );
569
585 Node removeChild ( const Node &oldChild );
586
613 Node appendChild ( const Node &newChild );
614
623 bool hasChildNodes ( );
624
645 Node cloneNode ( bool deep );
646
664 void normalize ( );
665
683 bool isSupported( const DOMString &feature,
684 const DOMString &version ) const;
685
702 DOMString namespaceURI( ) const;
703
719 DOMString prefix( ) const;
720
738 void setPrefix(const DOMString &prefix );
739
748 DOMString localName( ) const;
749
755 bool hasAttributes ( );
756
765 DOMString textContent( ) const;
766
783 void setTextContent(const DOMString &content) const;
784
813 void addEventListener(const DOMString &type,
814 EventListener *listener,
815 const bool useCapture);
816
842 void removeEventListener(const DOMString &type,
843 EventListener *listener,
844 bool useCapture);
845
869 bool dispatchEvent(const Event &evt);
870
871
872
878 TQ_UINT32 elementId() const;
879
892 bool isNull() const { return !impl; }
893
897 NodeImpl *handle() const { return impl; }
898
902 unsigned long index() const;
903 TQString toHTML() TDE_DEPRECATED;
904 void applyChanges();
908 void getCursor(int offset, int &_x, int &_y, int &height) TDE_DEPRECATED;
913 TQRect getRect();
914
915protected:
916 NodeImpl *impl;
917};
918
919
920class NodeListImpl;
921
931class TDEHTML_EXPORT NodeList
932{
933 friend class Element;
934 friend class Node;
935 friend class Document;
936 friend class HTMLDocument;
937 friend class KJS::HTMLDocument;
938 friend class KJS::Window;
939
940public:
941 NodeList();
942 NodeList(const NodeList &other);
943
944 NodeList & operator = (const NodeList &other);
945
946 ~NodeList();
947
953 unsigned long length() const;
954
967 Node item ( unsigned long index ) const;
968
973 NodeListImpl *handle() const { return impl; }
974 bool isNull() const { return !impl; }
975
976protected:
977 NodeList(const NodeListImpl *i);
978 NodeListImpl *impl;
979};
980
981
982
987typedef unsigned long long DOMTimeStamp;
988
989
990} //namespace
991#endif
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::DocumentType
Each Document has a doctype attribute whose value is either null or a DocumentType object.
Definition: dom_doc.h:1029
DOM::Document
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:246
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::EventListener
Introduced in DOM Level 2.
Definition: dom2_events.h:64
DOM::Event
Introduced in DOM Level 2.
Definition: dom2_events.h:111
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:127
DOM::HTMLDocument
An HTMLDocument is the root of the HTML hierarchy and holds the entire content.
Definition: html_document.h:74
DOM::NamedNodeMap
Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can b...
Definition: dom_node.h:67
DOM::NodeList
The NodeList interface provides the abstraction of an ordered collection of nodes,...
Definition: dom_node.h:932
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:275
DOM::Node::NodeType
NodeType
An integer indicating which type of node this is.
Definition: dom_node.h:385
DOM::Node::isNull
bool isNull() const
tests if this Node is 0.
Definition: dom_node.h:892
DOM::StyleSheet
The StyleSheet interface is the abstract base interface for any type of style sheet.
Definition: css_stylesheet.h:59
DOM
The Document Object Model (DOM) is divided into two parts, the COREDOM core DOM, specifying some core...
Definition: design.h:57
DOM::DOMTimeStamp
unsigned long long DOMTimeStamp
A DOMTimeStamp represents a number of milliseconds.
Definition: dom_node.h:987

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.9.4
This website is maintained by Timothy Pearson.