fix logic
[personal-kdelibs.git] / khtml / dom / html_head.h
blobdc2aefcff31936024118e435bd6b3f25aaea607d
1 /*
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.
29 #ifndef HTML_HEAD_H
30 #define HTML_HEAD_H
32 #include <dom/html_element.h>
33 #include <dom/css_stylesheet.h>
35 namespace DOM {
37 class HTMLBaseElementImpl;
38 class DOMString;
40 /**
41 * Document base URI. See the <a
42 * href="http://www.w3.org/TR/REC-html40/struct/links.html#edef-BASE">
43 * BASE element definition </a> in HTML 4.0.
46 class KHTML_EXPORT HTMLBaseElement : public HTMLElement
48 public:
49 HTMLBaseElement();
50 HTMLBaseElement(const HTMLBaseElement &other);
51 HTMLBaseElement(const Node &other) : HTMLElement()
52 {(*this)=other;}
53 protected:
54 HTMLBaseElement(HTMLBaseElementImpl *impl);
55 public:
57 HTMLBaseElement & operator = (const HTMLBaseElement &other);
58 HTMLBaseElement & operator = (const Node &other);
60 ~HTMLBaseElement();
62 /**
63 * The base URI See the <a
64 * href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-href-BASE">
65 * href attribute definition </a> in HTML 4.0.
68 DOMString href() const;
70 /**
71 * see href
73 void setHref( const DOMString & );
75 /**
76 * The default target frame. See the <a
77 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">
78 * target attribute definition </a> in HTML 4.0.
81 DOMString target() const;
83 /**
84 * see target
86 void setTarget( const DOMString & );
89 // --------------------------------------------------------------------------
91 class HTMLLinkElementImpl;
93 /**
94 * The \c LINK element specifies a link to an external
95 * resource, and defines this document's relationship to that resource
96 * (or vice versa). See the <a
97 * href="http://www.w3.org/TR/REC-html40/struct/links.html#edef-LINK">
98 * LINK element definition </a> in HTML 4.0.
101 class KHTML_EXPORT HTMLLinkElement : public HTMLElement
103 public:
104 HTMLLinkElement();
105 HTMLLinkElement(const HTMLLinkElement &other);
106 HTMLLinkElement(const Node &other) : HTMLElement()
107 {(*this)=other;}
108 protected:
109 HTMLLinkElement(HTMLLinkElementImpl *impl);
110 public:
112 HTMLLinkElement & operator = (const HTMLLinkElement &other);
113 HTMLLinkElement & operator = (const Node &other);
115 ~HTMLLinkElement();
118 * Enables/disables the link. This is currently only used for
119 * style sheet links, and may be used to activate or deactivate
120 * style sheets.
123 bool disabled() const;
126 * see disabled
128 void setDisabled( bool );
131 * The character encoding of the resource being linked to. See the
132 * <a
133 * href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-charset">
134 * charset attribute definition </a> in HTML 4.0.
137 DOMString charset() const;
140 * see charset
142 void setCharset( const DOMString & );
145 * The URI of the linked resource. See the <a
146 * href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-href">
147 * href attribute definition </a> in HTML 4.0.
150 DOMString href() const;
153 * see href
155 void setHref( const DOMString & );
158 * Language code of the linked resource. See the <a
159 * href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-hreflang">
160 * hreflang attribute definition </a> in HTML 4.0.
163 DOMString hreflang() const;
166 * see hreflang
168 void setHreflang( const DOMString & );
171 * Designed for use with one or more target media. See the <a
172 * href="http://www.w3.org/TR/REC-html40/present/styles.html#adef-media">
173 * media attribute definition </a> in HTML 4.0.
176 DOMString media() const;
179 * see media
181 void setMedia( const DOMString & );
184 * Forward link type. See the <a
185 * href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-rel">
186 * rel attribute definition </a> in HTML 4.0.
189 DOMString rel() const;
192 * see rel
194 void setRel( const DOMString & );
197 * Reverse link type. See the <a
198 * href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-rev">
199 * rev attribute definition </a> in HTML 4.0.
202 DOMString rev() const;
205 * see rev
207 void setRev( const DOMString & );
210 * Frame to render the resource in. See the <a
211 * href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">
212 * target attribute definition </a> in HTML 4.0.
215 DOMString target() const;
218 * see target
220 void setTarget( const DOMString & );
223 * Advisory content type. See the <a
224 * href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-type-A">
225 * type attribute definition </a> in HTML 4.0.
228 DOMString type() const;
231 * see type
233 void setType( const DOMString & );
236 * Introduced in DOM Level 2
237 * This method is from the LinkStyle interface
239 * The style sheet.
241 StyleSheet sheet() const;
245 // --------------------------------------------------------------------------
247 class HTMLMetaElementImpl;
250 * This contains generic meta-information about the document. See the
251 * <a
252 * href="http://www.w3.org/TR/REC-html40/struct/global.html#edef-META">
253 * META element definition </a> in HTML 4.0.
256 class KHTML_EXPORT HTMLMetaElement : public HTMLElement
258 public:
259 HTMLMetaElement();
260 HTMLMetaElement(const HTMLMetaElement &other);
261 HTMLMetaElement(const Node &other) : HTMLElement()
262 {(*this)=other;}
263 protected:
264 HTMLMetaElement(HTMLMetaElementImpl *impl);
265 public:
267 HTMLMetaElement & operator = (const HTMLMetaElement &other);
268 HTMLMetaElement & operator = (const Node &other);
270 ~HTMLMetaElement();
273 * Associated information. See the <a
274 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-content">
275 * content attribute definition </a> in HTML 4.0.
278 DOMString content() const;
281 * see content
283 void setContent( const DOMString & );
286 * HTTP response header name. See the <a
287 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-http-equiv">
288 * http-equiv attribute definition </a> in HTML 4.0.
291 DOMString httpEquiv() const;
294 * see httpEquiv
296 void setHttpEquiv( const DOMString & );
299 * Meta information name. See the <a
300 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-name-META">
301 * name attribute definition </a> in HTML 4.0.
304 DOMString name() const;
307 * see name
309 void setName( const DOMString & );
312 * Select form of content. See the <a
313 * href="http://www.w3.org/TR/REC-html40/struct/global.html#adef-scheme">
314 * scheme attribute definition </a> in HTML 4.0.
317 DOMString scheme() const;
320 * see scheme
322 void setScheme( const DOMString & );
325 // --------------------------------------------------------------------------
327 class HTMLScriptElementImpl;
330 * Script statements. See the <a
331 * href="http://www.w3.org/TR/REC-html40/interact/scripts.html#edef-SCRIPT">
332 * SCRIPT element definition </a> in HTML 4.0.
335 class KHTML_EXPORT HTMLScriptElement : public HTMLElement
337 public:
338 HTMLScriptElement();
339 HTMLScriptElement(const HTMLScriptElement &other);
340 HTMLScriptElement(const Node &other) : HTMLElement()
341 {(*this)=other;}
342 protected:
343 HTMLScriptElement(HTMLScriptElementImpl *impl);
344 public:
346 HTMLScriptElement & operator = (const HTMLScriptElement &other);
347 HTMLScriptElement & operator = (const Node &other);
349 ~HTMLScriptElement();
352 * The script content of the element.
355 DOMString text() const;
358 * see text
360 void setText( const DOMString & );
363 * Reserved for future use.
366 DOMString htmlFor() const;
369 * see htmlFor
371 void setHtmlFor( const DOMString & );
374 * Reserved for future use.
377 DOMString event() const;
380 * see event
382 void setEvent( const DOMString & );
385 * The character encoding of the linked resource. See the <a
386 * href="http://www.w3.org/TR/REC-html40/struct/links.html#adef-charset">
387 * charset attribute definition </a> in HTML 4.0.
390 DOMString charset() const;
393 * see charset
395 void setCharset( const DOMString & );
398 * Indicates that the user agent can defer processing of the
399 * script. See the <a
400 * href="http://www.w3.org/TR/REC-html40/interact/scripts.html#adef-defer">
401 * defer attribute definition </a> in HTML 4.0.
404 bool defer() const;
407 * see defer
409 void setDefer( bool );
412 * URI designating an external script. See the <a
413 * href="http://www.w3.org/TR/REC-html40/interact/scripts.html#adef-src-SCRIPT">
414 * src attribute definition </a> in HTML 4.0.
417 DOMString src() const;
420 * see src
422 void setSrc( const DOMString & );
425 * The content type of the script language. See the <a
426 * href="http://www.w3.org/TR/REC-html40/interact/scripts.html#adef-type-SCRIPT">
427 * type attribute definition </a> in HTML 4.0.
430 DOMString type() const;
433 * see type
435 void setType( const DOMString & );
438 // --------------------------------------------------------------------------
440 class HTMLStyleElementImpl;
443 * Style information. A more detailed style sheet object model is
444 * planned to be defined in a separate document. See the <a
445 * href="http://www.w3.org/TR/REC-html40/present/styles.html#edef-STYLE">
446 * STYLE element definition </a> in HTML 4.0.
449 class KHTML_EXPORT HTMLStyleElement : public HTMLElement
451 public:
452 HTMLStyleElement();
453 HTMLStyleElement(const HTMLStyleElement &other);
454 HTMLStyleElement(const Node &other) : HTMLElement()
455 {(*this)=other;}
456 protected:
457 HTMLStyleElement(HTMLStyleElementImpl *impl);
458 public:
460 HTMLStyleElement & operator = (const HTMLStyleElement &other);
461 HTMLStyleElement & operator = (const Node &other);
463 ~HTMLStyleElement();
466 * Enables/disables the style sheet.
469 bool disabled() const;
472 * see disabled
474 void setDisabled( bool );
477 * Designed for use with one or more target media. See the <a
478 * href="http://www.w3.org/TR/REC-html40/present/styles.html#adef-media">
479 * media attribute definition </a> in HTML 4.0.
482 DOMString media() const;
485 * see media
487 void setMedia( const DOMString & );
490 * The style sheet language (Internet media type). See the <a
491 * href="http://www.w3.org/TR/REC-html40/present/styles.html#adef-type-STYLE">
492 * type attribute definition </a> in HTML 4.0.
495 DOMString type() const;
498 * see type
500 void setType( const DOMString & );
503 * Introduced in DOM Level 2
504 * This method is from the LinkStyle interface
506 * The style sheet.
508 StyleSheet sheet() const;
512 // --------------------------------------------------------------------------
514 class HTMLTitleElementImpl;
517 * The document title. See the <a
518 * href="http://www.w3.org/TR/REC-html40/struct/global.html#edef-TITLE">
519 * TITLE element definition </a> in HTML 4.0.
522 class KHTML_EXPORT HTMLTitleElement : public HTMLElement
524 public:
525 HTMLTitleElement();
526 HTMLTitleElement(const HTMLTitleElement &other);
527 HTMLTitleElement(const Node &other) : HTMLElement()
528 {(*this)=other;}
529 protected:
530 HTMLTitleElement(HTMLTitleElementImpl *impl);
531 public:
533 HTMLTitleElement & operator = (const HTMLTitleElement &other);
534 HTMLTitleElement & operator = (const Node &other);
536 ~HTMLTitleElement();
539 * The specified title as a string.
542 DOMString text() const;
545 * see text
547 void setText( const DOMString & );
550 } //namespace
552 #endif