KHtml

html_misc.h
1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * Copyright 1999 Lars Knoll ([email protected])
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  * https://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 HTML_MISC_H
30 #define HTML_MISC_H
31 
32 #include <khtml_export.h>
33 #include <dom/html_element.h>
34 
35 namespace DOM
36 {
37 
38 class HTMLBaseFontElementImpl;
39 class DOMString;
40 class HTMLCollectionImpl;
41 
49 class KHTML_EXPORT HTMLBaseFontElement : public HTMLElement
50 {
51 public:
54  HTMLBaseFontElement(const Node &other) : HTMLElement()
55  {
56  (*this) = other;
57  }
58 protected:
59  HTMLBaseFontElement(HTMLBaseFontElementImpl *impl);
60 public:
61 
62  HTMLBaseFontElement &operator = (const HTMLBaseFontElement &other);
63  HTMLBaseFontElement &operator = (const Node &other);
64 
66 
73  DOMString color() const;
74 
78  void setColor(const DOMString &);
79 
87  DOMString face() const;
88 
92  void setFace(const DOMString &);
93 
101  long getSize() const;
102 
106  void setSize(long);
107 
111 #ifndef KHTML_NO_DEPRECATED
112  KHTML_DEPRECATED DOMString size() const;
113 #endif
114 
118 #ifndef KHTML_NO_DEPRECATED
119  KHTML_DEPRECATED void setSize(const DOMString &);
120 #endif
121 };
122 
123 // --------------------------------------------------------------------------
124 
133 class KHTML_EXPORT HTMLCollection
134 {
135  friend class HTMLDocument;
136  friend class HTMLSelectElement;
137  friend class HTMLImageElement;
138  friend class HTMLMapElement;
139  friend class HTMLTableElement;
140  friend class HTMLTableRowElement;
141  friend class HTMLTableSectionElement;
142  friend class HTMLLayerElement;
143  friend class HTMLElement;
144 
145 public:
146  HTMLCollection();
147  HTMLCollection(const HTMLCollection &other);
148 protected:
149  HTMLCollection(HTMLCollectionImpl *impl);
150  HTMLCollection(NodeImpl *base, int type);
151 public:
152 
153  HTMLCollection &operator = (const HTMLCollection &other);
154 
155  ~HTMLCollection();
156 
161  unsigned long length() const;
162 
175  Node item(unsigned long index) const;
176 
193  Node namedItem(const DOMString &name) const;
194 
199  Node base() const;
200  HTMLCollectionImpl *handle() const;
201  bool isNull() const;
202  // Fast iteration
203  Node firstItem() const;
204  Node nextItem() const;
205  // In case of multiple items named the same way
206  Node nextNamedItem(const DOMString &name) const;
207 
208 protected:
209  HTMLCollectionImpl *impl;
210 };
211 
212 class KHTML_EXPORT HTMLFormCollection : public HTMLCollection
213 {
214  friend class HTMLFormElement;
215 protected:
216  HTMLFormCollection(NodeImpl *base);
217 };
218 
219 } //namespace
220 
221 #endif
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:278
An HTMLDocument is the root of the HTML hierarchy and holds the entire content.
Definition: html_document.h:74
The select element allows the selection of an option.
Definition: html_form.h:883
Layer container for Netscape 4.x compatibility.
Definition: html_block.h:349
The THEAD , TFOOT , and TBODY elements.
Definition: html_table.h:906
The FORM element encompasses behavior similar to a collection and an element.
Definition: html_form.h:207
An HTMLCollection is a list of nodes.
Definition: html_misc.h:133
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
Embedded image.
Definition: html_image.h:186
This library provides a full-featured HTML parser and widget.
A row in a table.
Definition: html_table.h:734
Client-side image map.
Definition: html_image.h:399
The create* and delete* methods on the table allow authors to construct and modify tables...
Definition: html_table.h:448
All HTML element interfaces derive from this class.
Definition: html_element.h:70
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 11 2020 22:47:50 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.