khtml Library API Documentation

html_head.cpp

00001 
00023 // --------------------------------------------------------------------------
00024 
00025 #include "dom/html_head.h"
00026 #include "html/html_headimpl.h"
00027 #include "misc/htmlhashes.h"
00028 
00029 using namespace DOM;
00030 
00031 HTMLBaseElement::HTMLBaseElement() : HTMLElement()
00032 {
00033 }
00034 
00035 HTMLBaseElement::HTMLBaseElement(const HTMLBaseElement &other) : HTMLElement(other)
00036 {
00037 }
00038 
00039 HTMLBaseElement::HTMLBaseElement(HTMLBaseElementImpl *impl) : HTMLElement(impl)
00040 {
00041 }
00042 
00043 HTMLBaseElement &HTMLBaseElement::operator = (const Node &other)
00044 {
00045     assignOther( other, ID_BASE );
00046     return *this;
00047 }
00048 
00049 HTMLBaseElement &HTMLBaseElement::operator = (const HTMLBaseElement &other)
00050 {
00051     HTMLElement::operator = (other);
00052     return *this;
00053 }
00054 
00055 HTMLBaseElement::~HTMLBaseElement()
00056 {
00057 }
00058 
00059 DOMString HTMLBaseElement::href() const
00060 {
00061     if(!impl) return DOMString();
00062     return ((ElementImpl *)impl)->getAttribute(ATTR_HREF);
00063 }
00064 
00065 void HTMLBaseElement::setHref( const DOMString &value )
00066 {
00067     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
00068 }
00069 
00070 DOMString HTMLBaseElement::target() const
00071 {
00072     if(!impl) return DOMString();
00073     return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
00074 }
00075 
00076 void HTMLBaseElement::setTarget( const DOMString &value )
00077 {
00078     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
00079 }
00080 
00081 // --------------------------------------------------------------------------
00082 
00083 HTMLLinkElement::HTMLLinkElement() : HTMLElement()
00084 {
00085 }
00086 
00087 HTMLLinkElement::HTMLLinkElement(const HTMLLinkElement &other) : HTMLElement(other)
00088 {
00089 }
00090 
00091 HTMLLinkElement::HTMLLinkElement(HTMLLinkElementImpl *impl) : HTMLElement(impl)
00092 {
00093 }
00094 
00095 HTMLLinkElement &HTMLLinkElement::operator = (const Node &other)
00096 {
00097     assignOther( other, ID_LINK );
00098     return *this;
00099 }
00100 
00101 HTMLLinkElement &HTMLLinkElement::operator = (const HTMLLinkElement &other)
00102 {
00103     HTMLElement::operator = (other);
00104     return *this;
00105 }
00106 
00107 HTMLLinkElement::~HTMLLinkElement()
00108 {
00109 }
00110 
00111 bool HTMLLinkElement::disabled() const
00112 {
00113     if(!impl) return 0;
00114     return !((ElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
00115 }
00116 
00117 void HTMLLinkElement::setDisabled( bool _disabled )
00118 {
00119     if(impl)
00120         ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);
00121 }
00122 
00123 DOMString HTMLLinkElement::charset() const
00124 {
00125     if(!impl) return DOMString();
00126     return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
00127 }
00128 
00129 void HTMLLinkElement::setCharset( const DOMString &value )
00130 {
00131     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
00132 }
00133 
00134 DOMString HTMLLinkElement::href() const
00135 {
00136     if(!impl) return DOMString();
00137     return ((ElementImpl *)impl)->getAttribute(ATTR_HREF);
00138 }
00139 
00140 void HTMLLinkElement::setHref( const DOMString &value )
00141 {
00142     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
00143 }
00144 
00145 DOMString HTMLLinkElement::hreflang() const
00146 {
00147     if(!impl) return DOMString();
00148     return ((ElementImpl *)impl)->getAttribute(ATTR_HREFLANG);
00149 }
00150 
00151 void HTMLLinkElement::setHreflang( const DOMString &value )
00152 {
00153     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREFLANG, value);
00154 }
00155 
00156 DOMString HTMLLinkElement::media() const
00157 {
00158     if(!impl) return DOMString();
00159     return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
00160 }
00161 
00162 void HTMLLinkElement::setMedia( const DOMString &value )
00163 {
00164     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
00165 }
00166 
00167 DOMString HTMLLinkElement::rel() const
00168 {
00169     if(!impl) return DOMString();
00170     return ((ElementImpl *)impl)->getAttribute(ATTR_REL);
00171 }
00172 
00173 void HTMLLinkElement::setRel( const DOMString &value )
00174 {
00175     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REL, value);
00176 }
00177 
00178 DOMString HTMLLinkElement::rev() const
00179 {
00180     if(!impl) return DOMString();
00181     return ((ElementImpl *)impl)->getAttribute(ATTR_REV);
00182 }
00183 
00184 void HTMLLinkElement::setRev( const DOMString &value )
00185 {
00186     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REV, value);
00187 }
00188 
00189 DOMString HTMLLinkElement::target() const
00190 {
00191     if(!impl) return DOMString();
00192     return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
00193 }
00194 
00195 void HTMLLinkElement::setTarget( const DOMString &value )
00196 {
00197     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
00198 }
00199 
00200 DOMString HTMLLinkElement::type() const
00201 {
00202     if(!impl) return DOMString();
00203     return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
00204 }
00205 
00206 void HTMLLinkElement::setType( const DOMString &value )
00207 {
00208     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
00209 }
00210 
00211 StyleSheet HTMLLinkElement::sheet() const
00212 {
00213     if(!impl) return 0;
00214     return ((HTMLLinkElementImpl *)impl)->sheet();
00215 }
00216 
00217 // --------------------------------------------------------------------------
00218 
00219 HTMLMetaElement::HTMLMetaElement() : HTMLElement()
00220 {
00221 }
00222 
00223 HTMLMetaElement::HTMLMetaElement(const HTMLMetaElement &other) : HTMLElement(other)
00224 {
00225 }
00226 
00227 HTMLMetaElement::HTMLMetaElement(HTMLMetaElementImpl *impl) : HTMLElement(impl)
00228 {
00229 }
00230 
00231 HTMLMetaElement &HTMLMetaElement::operator = (const Node &other)
00232 {
00233     assignOther( other, ID_META );
00234     return *this;
00235 }
00236 
00237 HTMLMetaElement &HTMLMetaElement::operator = (const HTMLMetaElement &other)
00238 {
00239     HTMLElement::operator = (other);
00240     return *this;
00241 }
00242 
00243 HTMLMetaElement::~HTMLMetaElement()
00244 {
00245 }
00246 
00247 DOMString HTMLMetaElement::content() const
00248 {
00249     if(!impl) return DOMString();
00250     return ((ElementImpl *)impl)->getAttribute(ATTR_CONTENT);
00251 }
00252 
00253 void HTMLMetaElement::setContent( const DOMString &value )
00254 {
00255     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CONTENT, value);
00256 }
00257 
00258 DOMString HTMLMetaElement::httpEquiv() const
00259 {
00260     if(!impl) return DOMString();
00261     return ((ElementImpl *)impl)->getAttribute(ATTR_HTTP_EQUIV);
00262 }
00263 
00264 void HTMLMetaElement::setHttpEquiv( const DOMString &value )
00265 {
00266     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HTTP_EQUIV, value);
00267 }
00268 
00269 DOMString HTMLMetaElement::name() const
00270 {
00271     if(!impl) return DOMString();
00272     return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
00273 }
00274 
00275 void HTMLMetaElement::setName( const DOMString &value )
00276 {
00277     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
00278 }
00279 
00280 DOMString HTMLMetaElement::scheme() const
00281 {
00282     if(!impl) return DOMString();
00283     return ((ElementImpl *)impl)->getAttribute(ATTR_SCHEME);
00284 }
00285 
00286 void HTMLMetaElement::setScheme( const DOMString &value )
00287 {
00288     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCHEME, value);
00289 }
00290 
00291 // --------------------------------------------------------------------------
00292 
00293 HTMLScriptElement::HTMLScriptElement() : HTMLElement()
00294 {
00295 }
00296 
00297 HTMLScriptElement::HTMLScriptElement(const HTMLScriptElement &other) : HTMLElement(other)
00298 {
00299 }
00300 
00301 HTMLScriptElement::HTMLScriptElement(HTMLScriptElementImpl *impl) : HTMLElement(impl)
00302 {
00303 }
00304 
00305 HTMLScriptElement &HTMLScriptElement::operator = (const Node &other)
00306 {
00307     assignOther( other, ID_SCRIPT );
00308     return *this;
00309 }
00310 
00311 HTMLScriptElement &HTMLScriptElement::operator = (const HTMLScriptElement &other)
00312 {
00313     HTMLElement::operator = (other);
00314     return *this;
00315 }
00316 
00317 HTMLScriptElement::~HTMLScriptElement()
00318 {
00319 }
00320 
00321 DOMString HTMLScriptElement::text() const
00322 {
00323     if(!impl) return DOMString();
00324     return ((HTMLScriptElementImpl *)impl)->text();
00325 }
00326 
00327 void HTMLScriptElement::setText( const DOMString &value )
00328 {
00329     if(impl) ((HTMLScriptElementImpl *)impl)->setText(value);
00330 }
00331 
00332 DOMString HTMLScriptElement::htmlFor() const
00333 {
00334     // DOM Level 1 says: reserved for future use...
00335     return DOMString();
00336 }
00337 
00338 void HTMLScriptElement::setHtmlFor( const DOMString &/*value*/ )
00339 {
00340     // DOM Level 1 says: reserved for future use...
00341 }
00342 
00343 DOMString HTMLScriptElement::event() const
00344 {
00345     // DOM Level 1 says: reserved for future use...
00346     return DOMString();
00347 }
00348 
00349 void HTMLScriptElement::setEvent( const DOMString &/*value*/ )
00350 {
00351     // DOM Level 1 says: reserved for future use...
00352 }
00353 
00354 DOMString HTMLScriptElement::charset() const
00355 {
00356     if(!impl) return DOMString();
00357     return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
00358 }
00359 
00360 void HTMLScriptElement::setCharset( const DOMString &value )
00361 {
00362     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
00363 }
00364 
00365 bool HTMLScriptElement::defer() const
00366 {
00367     if(!impl) return 0;
00368     return !((ElementImpl *)impl)->getAttribute(ATTR_DEFER).isNull();
00369 }
00370 
00371 void HTMLScriptElement::setDefer( bool _defer )
00372 {
00373 
00374     if(impl)
00375         ((ElementImpl *)impl)->setAttribute(ATTR_DEFER,_defer ? "" : 0);
00376 }
00377 
00378 DOMString HTMLScriptElement::src() const
00379 {
00380     if(!impl) return DOMString();
00381     return ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
00382 }
00383 
00384 void HTMLScriptElement::setSrc( const DOMString &value )
00385 {
00386     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
00387 }
00388 
00389 DOMString HTMLScriptElement::type() const
00390 {
00391     if(!impl) return DOMString();
00392     return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
00393 }
00394 
00395 void HTMLScriptElement::setType( const DOMString &value )
00396 {
00397     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
00398 }
00399 
00400 // --------------------------------------------------------------------------
00401 
00402 HTMLStyleElement::HTMLStyleElement() : HTMLElement()
00403 {
00404 }
00405 
00406 HTMLStyleElement::HTMLStyleElement(const HTMLStyleElement &other) : HTMLElement(other)
00407 {
00408 }
00409 
00410 HTMLStyleElement::HTMLStyleElement(HTMLStyleElementImpl *impl) : HTMLElement(impl)
00411 {
00412 }
00413 
00414 HTMLStyleElement &HTMLStyleElement::operator = (const Node &other)
00415 {
00416     assignOther( other, ID_STYLE );
00417     return *this;
00418 }
00419 
00420 HTMLStyleElement &HTMLStyleElement::operator = (const HTMLStyleElement &other)
00421 {
00422     HTMLElement::operator = (other);
00423     return *this;
00424 }
00425 
00426 HTMLStyleElement::~HTMLStyleElement()
00427 {
00428 }
00429 
00430 bool HTMLStyleElement::disabled() const
00431 {
00432     if(!impl) return 0;
00433     return !((HTMLStyleElementImpl *)impl)->getAttribute(ATTR_DISABLED).isNull();
00434 }
00435 
00436 void HTMLStyleElement::setDisabled( bool _disabled )
00437 {
00438 
00439     if(impl)
00440         ((ElementImpl *)impl)->setAttribute(ATTR_DISABLED,_disabled ? "" : 0);
00441 }
00442 
00443 DOMString HTMLStyleElement::media() const
00444 {
00445     if(!impl) return DOMString();
00446     return ((ElementImpl *)impl)->getAttribute(ATTR_MEDIA);
00447 }
00448 
00449 void HTMLStyleElement::setMedia( const DOMString &value )
00450 {
00451     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MEDIA, value);
00452 }
00453 
00454 DOMString HTMLStyleElement::type() const
00455 {
00456     if(!impl) return DOMString();
00457     return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
00458 }
00459 
00460 void HTMLStyleElement::setType( const DOMString &value )
00461 {
00462     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
00463 }
00464 
00465 StyleSheet HTMLStyleElement::sheet() const
00466 {
00467     if(!impl) return 0;
00468     return ((HTMLStyleElementImpl *)impl)->sheet();
00469 }
00470 
00471 
00472 // --------------------------------------------------------------------------
00473 
00474 HTMLTitleElement::HTMLTitleElement() : HTMLElement()
00475 {
00476 }
00477 
00478 HTMLTitleElement::HTMLTitleElement(const HTMLTitleElement &other) : HTMLElement(other)
00479 {
00480 }
00481 
00482 HTMLTitleElement::HTMLTitleElement(HTMLTitleElementImpl *impl) : HTMLElement(impl)
00483 {
00484 }
00485 
00486 HTMLTitleElement &HTMLTitleElement::operator = (const Node &other)
00487 {
00488     assignOther( other, ID_TITLE );
00489     return *this;
00490 }
00491 
00492 HTMLTitleElement &HTMLTitleElement::operator = (const HTMLTitleElement &other)
00493 {
00494     HTMLElement::operator = (other);
00495     return *this;
00496 }
00497 
00498 HTMLTitleElement::~HTMLTitleElement()
00499 {
00500 }
00501 
00502 DOMString HTMLTitleElement::text() const
00503 {
00504     if(!impl) return DOMString();
00505     return ((HTMLTitleElementImpl *)impl)->text();
00506 }
00507 
00508 void HTMLTitleElement::setText( const DOMString &value )
00509 {
00510     if(impl) ((HTMLTitleElementImpl *)impl)->setText(value);
00511 }
00512 
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:37 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001