2 * This file is part of the DOM implementation for KDE.
4 * Copyright 1999 Lars Knoll (knoll@kde.org)
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.
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.
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.
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.
33 #include <khtml_export.h>
34 #include <dom/html_element.h>
38 class HTMLBodyElementImpl
;
42 * The HTML document body. This element is always present in the DOM
43 * API, even if the tags are not present in the source document. See
45 * href="http://www.w3.org/TR/REC-html40/struct/global.html#edef-BODY">
46 * BODY element definition </a> in HTML 4.0.
49 class KHTML_EXPORT HTMLBodyElement
: public HTMLElement
53 HTMLBodyElement(const HTMLBodyElement
&other
);
54 HTMLBodyElement(const Node
&other
) : HTMLElement()
57 HTMLBodyElement(HTMLBodyElementImpl
*impl
);
60 HTMLBodyElement
& operator = (const HTMLBodyElement
&other
);
61 HTMLBodyElement
& operator = (const Node
&other
);
66 * Color of active links (after mouse-button down, but before
67 * mouse-button up). See the <a
68 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-alink">
69 * alink attribute definition </a> in HTML 4.0. This attribute is
70 * deprecated in HTML 4.0.
73 DOMString
aLink() const;
78 void setALink( const DOMString
& );
81 * URI of the background texture tile image. See the <a
82 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-background">
83 * background attribute definition </a> in HTML 4.0. This
84 * attribute is deprecated in HTML 4.0.
87 DOMString
background() const;
92 void setBackground( const DOMString
& );
95 * Document background color. See the <a
96 * href="http://www.w3.org/TR/REC-html40/present/graphics.html#adef-bgcolor">
97 * bgcolor attribute definition </a> in HTML 4.0. This attribute
98 * is deprecated in HTML 4.0.
101 DOMString
bgColor() const;
106 void setBgColor( const DOMString
& );
109 * Color of links that are not active and unvisited. See the <a
110 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-link">
111 * link attribute definition </a> in HTML 4.0. This attribute is
112 * deprecated in HTML 4.0.
115 DOMString
link() const;
120 void setLink( const DOMString
& );
123 * Document text color. See the <a
124 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-text">
125 * text attribute definition </a> in HTML 4.0. This attribute is
126 * deprecated in HTML 4.0.
129 DOMString
text() const;
134 void setText( const DOMString
& );
137 * Color of links that have been visited by the user. See the <a
138 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-vlink">
139 * vlink attribute definition </a> in HTML 4.0. This attribute is
140 * deprecated in HTML 4.0.
143 DOMString
vLink() const;
148 void setVLink( const DOMString
& );
151 // --------------------------------------------------------------------------
153 class HTMLFrameElementImpl
;
157 * Create a frame. See the <a
158 * href="http://www.w3.org/TR/REC-html40/present/frames.html#edef-FRAME">
159 * FRAME element definition </a> in HTML 4.0.
162 class KHTML_EXPORT HTMLFrameElement
: public HTMLElement
166 HTMLFrameElement(const HTMLFrameElement
&other
);
167 HTMLFrameElement(const Node
&other
) : HTMLElement()
170 HTMLFrameElement(HTMLFrameElementImpl
*impl
);
173 HTMLFrameElement
& operator = (const HTMLFrameElement
&other
);
174 HTMLFrameElement
& operator = (const Node
&other
);
179 * Request frame borders. See the <a
180 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-frameborder">
181 * frameborder attribute definition </a> in HTML 4.0.
184 DOMString
frameBorder() const;
189 void setFrameBorder( const DOMString
& );
192 * URI designating a long description of this image or frame. See
194 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-longdesc-FRAME">
195 * longdesc attribute definition </a> in HTML 4.0.
198 DOMString
longDesc() const;
203 void setLongDesc( const DOMString
& );
206 * Frame margin height, in pixels. See the <a
207 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-marginheight">
208 * marginheight attribute definition </a> in HTML 4.0.
211 DOMString
marginHeight() const;
216 void setMarginHeight( const DOMString
& );
219 * Frame margin width, in pixels. See the <a
220 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-marginwidth">
221 * marginwidth attribute definition </a> in HTML 4.0.
224 DOMString
marginWidth() const;
229 void setMarginWidth( const DOMString
& );
232 * The frame name (object of the \c target attribute).
234 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-name-FRAME">
235 * name attribute definition </a> in HTML 4.0.
238 DOMString
name() const;
243 void setName( const DOMString
& );
246 * When true, forbid user from resizing frame. See the <a
247 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-noresize">
248 * noresize attribute definition </a> in HTML 4.0.
251 bool noResize() const;
256 void setNoResize( bool );
259 * Specify whether or not the frame should have scrollbars. See
261 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-scrolling">
262 * scrolling attribute definition </a> in HTML 4.0.
265 DOMString
scrolling() const;
270 void setScrolling( const DOMString
& );
273 * A URI designating the initial frame contents. See the <a
274 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-src-FRAME">
275 * src attribute definition </a> in HTML 4.0.
278 DOMString
src() const;
283 void setSrc( const DOMString
& );
286 * Introduced in DOM Level 2
288 * Returns the document this frame contains, if there is any and
289 * it is available, a Null document otherwise. The attribute is
292 * @return The content Document if available.
294 Document
contentDocument() const;
297 // --------------------------------------------------------------------------
299 class HTMLFrameSetElementImpl
;
303 * Create a grid of frames. See the <a
304 * href="http://www.w3.org/TR/REC-html40/present/frames.html#edef-FRAMESET">
305 * FRAMESET element definition </a> in HTML 4.0.
308 class KHTML_EXPORT HTMLFrameSetElement
: public HTMLElement
311 HTMLFrameSetElement();
312 HTMLFrameSetElement(const HTMLFrameSetElement
&other
);
313 HTMLFrameSetElement(const Node
&other
) : HTMLElement()
316 HTMLFrameSetElement(HTMLFrameSetElementImpl
*impl
);
319 HTMLFrameSetElement
& operator = (const HTMLFrameSetElement
&other
);
320 HTMLFrameSetElement
& operator = (const Node
&other
);
322 ~HTMLFrameSetElement();
325 * The number of columns of frames in the frameset. See the <a
326 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-cols-FRAMESET">
327 * cols attribute definition </a> in HTML 4.0.
330 DOMString
cols() const;
335 void setCols( const DOMString
& );
338 * The number of rows of frames in the frameset. See the <a
339 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-rows-FRAMESET">
340 * rows attribute definition </a> in HTML 4.0.
343 DOMString
rows() const;
348 void setRows( const DOMString
& );
351 // --------------------------------------------------------------------------
353 class HTMLIFrameElementImpl
;
356 * Inline subwindows. See the <a
357 * href="http://www.w3.org/TR/REC-html40/present/frames.html#edef-IFRAME">
358 * IFRAME element definition </a> in HTML 4.0.
361 class KHTML_EXPORT HTMLIFrameElement
: public HTMLElement
365 HTMLIFrameElement(const HTMLIFrameElement
&other
);
366 HTMLIFrameElement(const Node
&other
) : HTMLElement()
369 HTMLIFrameElement(HTMLIFrameElementImpl
*impl
);
372 HTMLIFrameElement
& operator = (const HTMLIFrameElement
&other
);
373 HTMLIFrameElement
& operator = (const Node
&other
);
375 ~HTMLIFrameElement();
378 * Aligns this object (vertically or horizontally) with respect to
379 * its surrounding text. See the <a
380 * href="http://www.w3.org/TR/REC-html40/struct/objects.html#adef-align-IMG">
381 * align attribute definition </a> in HTML 4.0. This attribute is
382 * deprecated in HTML 4.0.
385 DOMString
align() const;
390 void setAlign( const DOMString
& );
393 * Request frame borders. See the <a
394 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-frameborder">
395 * frameborder attribute definition </a> in HTML 4.0.
398 DOMString
frameBorder() const;
403 void setFrameBorder( const DOMString
& );
406 * Frame height. See the <a
407 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-height-IFRAME">
408 * height attribute definition </a> in HTML 4.0.
411 DOMString
height() const;
416 void setHeight( const DOMString
& );
419 * URI designating a long description of this image or frame. See
421 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-longdesc-IFRAME">
422 * longdesc attribute definition </a> in HTML 4.0.
425 DOMString
longDesc() const;
430 void setLongDesc( const DOMString
& );
433 * Frame margin height, in pixels. See the <a
434 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-marginheight">
435 * marginheight attribute definition </a> in HTML 4.0.
438 DOMString
marginHeight() const;
443 void setMarginHeight( const DOMString
& );
446 * Frame margin width, in pixels. See the <a
447 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-marginwidth">
448 * marginwidth attribute definition </a> in HTML 4.0.
451 DOMString
marginWidth() const;
456 void setMarginWidth( const DOMString
& );
459 * The frame name (object of the \c target attribute).
461 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-name-IFRAME">
462 * name attribute definition </a> in HTML 4.0.
465 DOMString
name() const;
470 void setName( const DOMString
& );
473 * Specify whether or not the frame should have scrollbars. See
475 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-scrolling">
476 * scrolling attribute definition </a> in HTML 4.0.
479 DOMString
scrolling() const;
484 void setScrolling( const DOMString
& );
487 * A URI designating the initial frame contents. See the <a
488 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-src-FRAME">
489 * src attribute definition </a> in HTML 4.0.
492 DOMString
src() const;
497 void setSrc( const DOMString
& );
500 * Frame width. See the <a
501 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-width-IFRAME">
502 * width attribute definition </a> in HTML 4.0.
505 DOMString
width() const;
510 void setWidth( const DOMString
& );
513 * Introduced in DOM Level 2
515 * Returns the document this iframe contains, if there is any and
516 * it is available, a Null document otherwise. The attribute is
519 * @return The content Document if available.
521 Document
contentDocument() const;
524 // --------------------------------------------------------------------------
526 class HTMLHeadElementImpl
;
530 * Document head information. See the <a
531 * href="http://www.w3.org/TR/REC-html40/struct/global.html#edef-HEAD">
532 * HEAD element definition </a> in HTML 4.0.
535 class KHTML_EXPORT HTMLHeadElement
: public HTMLElement
539 HTMLHeadElement(const HTMLHeadElement
&other
);
540 HTMLHeadElement(const Node
&other
) : HTMLElement()
543 HTMLHeadElement(HTMLHeadElementImpl
*impl
);
546 HTMLHeadElement
& operator = (const HTMLHeadElement
&other
);
547 HTMLHeadElement
& operator = (const Node
&other
);
552 * URI designating a metadata profile. See the <a
553 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-profile">
554 * profile attribute definition </a> in HTML 4.0.
557 DOMString
profile() const;
562 void setProfile( const DOMString
& );
565 // --------------------------------------------------------------------------
567 class HTMLHtmlElementImpl
;
571 * Root of an HTML document. See the <a
572 * href="http://www.w3.org/TR/REC-html40/struct/global.html#edef-HTML">
573 * HTML element definition </a> in HTML 4.0.
576 class KHTML_EXPORT HTMLHtmlElement
: public HTMLElement
580 HTMLHtmlElement(const HTMLHtmlElement
&other
);
581 HTMLHtmlElement(const Node
&other
) : HTMLElement()
584 HTMLHtmlElement(HTMLHtmlElementImpl
*impl
);
587 HTMLHtmlElement
& operator = (const HTMLHtmlElement
&other
);
588 HTMLHtmlElement
& operator = (const Node
&other
);
593 * Version information about the document's DTD. See the <a
594 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-version">
595 * version attribute definition </a> in HTML 4.0. This attribute
596 * is deprecated in HTML 4.0.
599 DOMString
version() const;
604 void setVersion( const DOMString
& );