| # khtml Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# html_base.cpp

    00001
    00021 // --------------------------------------------------------------------------
    00022
    00023 #include "xml/dom_docimpl.h"
    00024 #include "dom/html_base.h"
    00025 #include "dom/dom_doc.h"
    00026 #include "html/html_baseimpl.h"
    00027 #include "misc/htmlhashes.h"
    00028
    00029 using namespace DOM;
    00030
    00031 HTMLBodyElement::HTMLBodyElement() : HTMLElement()
    00032 {
    00033 }
    00034
    00035 HTMLBodyElement::HTMLBodyElement(const HTMLBodyElement &other) : HTMLElement(other)
    00036 {
    00037 }
    00038
    00039 HTMLBodyElement::HTMLBodyElement(HTMLBodyElementImpl *impl) : HTMLElement(impl)
    00040 {
    00041 }
    00042
    00043 HTMLBodyElement &HTMLBodyElement::operator = (const Node &other)
    00044 {
    00045     assignOther( other, ID_BODY );
    00046     return *this;
    00047 }
    00048
    00049 HTMLBodyElement &HTMLBodyElement::operator = (const HTMLBodyElement &other)
    00050 {
    00051     HTMLElement::operator = (other);
    00052     return *this;
    00053 }
    00054
    00055 HTMLBodyElement::~HTMLBodyElement()
    00056 {
    00057 }
    00058
    00059 DOMString HTMLBodyElement::aLink() const
    00060 {
    00061     return impl ? ((ElementImpl *)impl)->getAttribute(ATTR_ALINK) : DOMString();
    00062 }
    00063
    00064 void HTMLBodyElement::setALink( const DOMString &value )
    00065 {
    00066     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALINK, value);
    00067 }
    00068
    00069 DOMString HTMLBodyElement::background() const
    00070 {
    00071     return impl ? ((ElementImpl *)impl)->getAttribute(ATTR_BACKGROUND) : DOMString();
    00072 }
    00073
    00074 void HTMLBodyElement::setBackground( const DOMString &value )
    00075 {
    00076     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BACKGROUND, value);
    00077 }
    00078
    00079 DOMString HTMLBodyElement::bgColor() const
    00080 {
    00081     if(!impl) return DOMString();
    00082     return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
    00083 }
    00084
    00085 void HTMLBodyElement::setBgColor( const DOMString &value )
    00086 {
    00087     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
    00088 }
    00089
    00090 DOMString HTMLBodyElement::link() const
    00091 {
    00092     if(!impl) return DOMString();
    00093     return ((ElementImpl *)impl)->getAttribute(ATTR_LINK);
    00094 }
    00095
    00096 void HTMLBodyElement::setLink( const DOMString &value )
    00097 {
    00098     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LINK, value);
    00099 }
    00100
    00101 DOMString HTMLBodyElement::text() const
    00102 {
    00103     if(!impl) return DOMString();
    00104     return ((ElementImpl *)impl)->getAttribute(ATTR_TEXT);
    00105 }
    00106
    00107 void HTMLBodyElement::setText( const DOMString &value )
    00108 {
    00109     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TEXT, value);
    00110 }
    00111
    00112 DOMString HTMLBodyElement::vLink() const
    00113 {
    00114     if(!impl) return DOMString();
    00115     return ((ElementImpl *)impl)->getAttribute(ATTR_VLINK);
    00116 }
    00117
    00118 void HTMLBodyElement::setVLink( const DOMString &value )
    00119 {
    00120     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VLINK, value);
    00121 }
    00122
    00123 // --------------------------------------------------------------------------
    00124
    00125 HTMLFrameElement::HTMLFrameElement() : HTMLElement()
    00126 {
    00127 }
    00128
    00129 HTMLFrameElement::HTMLFrameElement(const HTMLFrameElement &other) : HTMLElement(other)
    00130 {
    00131 }
    00132
    00133 HTMLFrameElement::HTMLFrameElement(HTMLFrameElementImpl *impl) : HTMLElement(impl)
    00134 {
    00135 }
    00136
    00137 HTMLFrameElement &HTMLFrameElement::operator = (const Node &other)
    00138 {
    00139     assignOther( other, ID_FRAME );
    00140     return *this;
    00141 }
    00142
    00143 HTMLFrameElement &HTMLFrameElement::operator = (const HTMLFrameElement &other)
    00144 {
    00145     HTMLElement::operator = (other);
    00146     return *this;
    00147 }
    00148
    00149 HTMLFrameElement::~HTMLFrameElement()
    00150 {
    00151 }
    00152
    00153 DOMString HTMLFrameElement::frameBorder() const
    00154 {
    00155     if(!impl) return DOMString();
    00156     return ((ElementImpl *)impl)->getAttribute(ATTR_FRAMEBORDER);
    00157 }
    00158
    00159 void HTMLFrameElement::setFrameBorder( const DOMString &value )
    00160 {
    00161     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAMEBORDER, value);
    00162 }
    00163
    00164 DOMString HTMLFrameElement::longDesc() const
    00165 {
    00166     if(!impl) return DOMString();
    00167     return ((ElementImpl *)impl)->getAttribute(ATTR_LONGDESC);
    00168 }
    00169
    00170 void HTMLFrameElement::setLongDesc( const DOMString &value )
    00171 {
    00172     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LONGDESC, value);
    00173 }
    00174
    00175 DOMString HTMLFrameElement::marginHeight() const
    00176 {
    00177     if(!impl) return DOMString();
    00178     return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINHEIGHT);
    00179 }
    00180
    00181 void HTMLFrameElement::setMarginHeight( const DOMString &value )
    00182 {
    00183     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINHEIGHT, value);
    00184 }
    00185
    00186 DOMString HTMLFrameElement::marginWidth() const
    00187 {
    00188     if(!impl) return DOMString();
    00189     return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINWIDTH);
    00190 }
    00191
    00192 void HTMLFrameElement::setMarginWidth( const DOMString &value )
    00193 {
    00194     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINWIDTH, value);
    00195 }
    00196
    00197 DOMString HTMLFrameElement::name() const
    00198 {
    00199     if(!impl) return DOMString();
    00200     return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
    00201 }
    00202
    00203 void HTMLFrameElement::setName( const DOMString &value )
    00204 {
    00205     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
    00206 }
    00207
    00208 bool HTMLFrameElement::noResize() const
    00209 {
    00210     if(!impl) return false;
    00211     return !((ElementImpl *)impl)->getAttribute(ATTR_NORESIZE).isNull();
    00212 }
    00213
    00214 void HTMLFrameElement::setNoResize( bool _noResize )
    00215 {
    00216     if(impl)
    00217     {
    00218     DOMString str;
    00219     if( _noResize )
    00220         str = "";
    00221     ((ElementImpl *)impl)->setAttribute(ATTR_NORESIZE, str);
    00222     }
    00223 }
    00224
    00225 DOMString HTMLFrameElement::scrolling() const
    00226 {
    00227     if(!impl) return DOMString();
    00228     return ((ElementImpl *)impl)->getAttribute(ATTR_SCROLLING);
    00229 }
    00230
    00231 void HTMLFrameElement::setScrolling( const DOMString &value )
    00232 {
    00233     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCROLLING, value);
    00234 }
    00235
    00236 DOMString HTMLFrameElement::src() const
    00237 {
    00238     if(!impl) return DOMString();
    00239     return ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
    00240 }
    00241
    00242 void HTMLFrameElement::setSrc( const DOMString &value )
    00243 {
    00244     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
    00245 }
    00246
    00247 Document HTMLFrameElement::contentDocument() const
    00248 {
    00249     if (impl) return static_cast<HTMLFrameElementImpl*>(impl)->contentDocument();
    00250     return Document();
    00251 }
    00252
    00253 // --------------------------------------------------------------------------
    00254
    00255 HTMLIFrameElement::HTMLIFrameElement() : HTMLElement()
    00256 {
    00257 }
    00258
    00259 HTMLIFrameElement::HTMLIFrameElement(const HTMLIFrameElement &other) : HTMLElement(other)
    00260 {
    00261 }
    00262
    00263 HTMLIFrameElement::HTMLIFrameElement(HTMLIFrameElementImpl *impl) : HTMLElement(impl)
    00264 {
    00265 }
    00266
    00267 HTMLIFrameElement &HTMLIFrameElement::operator = (const Node &other)
    00268 {
    00269     assignOther( other, ID_IFRAME );
    00270     return *this;
    00271 }
    00272
    00273 HTMLIFrameElement &HTMLIFrameElement::operator = (const HTMLIFrameElement &other)
    00274 {
    00275     HTMLElement::operator = (other);
    00276     return *this;
    00277 }
    00278
    00279 HTMLIFrameElement::~HTMLIFrameElement()
    00280 {
    00281 }
    00282
    00283 DOMString HTMLIFrameElement::align() const
    00284 {
    00285     if(!impl) return DOMString();
    00286     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00287 }
    00288
    00289 void HTMLIFrameElement::setAlign( const DOMString &value )
    00290 {
    00291     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00292 }
    00293
    00294 DOMString HTMLIFrameElement::frameBorder() const
    00295 {
    00296     if(!impl) return DOMString();
    00297     return ((ElementImpl *)impl)->getAttribute(ATTR_FRAMEBORDER);
    00298 }
    00299
    00300 void HTMLIFrameElement::setFrameBorder( const DOMString &value )
    00301 {
    00302     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAMEBORDER, value);
    00303 }
    00304
    00305 DOMString HTMLIFrameElement::height() const
    00306 {
    00307     if(!impl) return DOMString();
    00308     return ((ElementImpl *)impl)->getAttribute(ATTR_HEIGHT);
    00309 }
    00310
    00311 void HTMLIFrameElement::setHeight( const DOMString &value )
    00312 {
    00313     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, value);
    00314 }
    00315
    00316 DOMString HTMLIFrameElement::longDesc() const
    00317 {
    00318     if(!impl) return DOMString();
    00319     return ((ElementImpl *)impl)->getAttribute(ATTR_LONGDESC);
    00320 }
    00321
    00322 void HTMLIFrameElement::setLongDesc( const DOMString &value )
    00323 {
    00324     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_LONGDESC, value);
    00325 }
    00326
    00327 DOMString HTMLIFrameElement::marginHeight() const
    00328 {
    00329     if(!impl) return DOMString();
    00330     return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINHEIGHT);
    00331 }
    00332
    00333 void HTMLIFrameElement::setMarginHeight( const DOMString &value )
    00334 {
    00335     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINHEIGHT, value);
    00336 }
    00337
    00338 DOMString HTMLIFrameElement::marginWidth() const
    00339 {
    00340     if(!impl) return DOMString();
    00341     return ((ElementImpl *)impl)->getAttribute(ATTR_MARGINWIDTH);
    00342 }
    00343
    00344 void HTMLIFrameElement::setMarginWidth( const DOMString &value )
    00345 {
    00346     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_MARGINWIDTH, value);
    00347 }
    00348
    00349 DOMString HTMLIFrameElement::name() const
    00350 {
    00351     if(!impl) return DOMString();
    00352     return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
    00353 }
    00354
    00355 void HTMLIFrameElement::setName( const DOMString &value )
    00356 {
    00357     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
    00358 }
    00359
    00360 DOMString HTMLIFrameElement::scrolling() const
    00361 {
    00362     if(!impl) return DOMString();
    00363     return ((ElementImpl *)impl)->getAttribute(ATTR_SCROLLING);
    00364 }
    00365
    00366 void HTMLIFrameElement::setScrolling( const DOMString &value )
    00367 {
    00368     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCROLLING, value);
    00369 }
    00370
    00371 DOMString HTMLIFrameElement::src() const
    00372 {
    00373     if(!impl) return DOMString();
    00374     DOMString s = ((ElementImpl *)impl)->getAttribute(ATTR_SRC);
    00375     return !s.isNull() ? impl->getDocument()->completeURL( s.string() ) : s;
    00376 }
    00377
    00378 void HTMLIFrameElement::setSrc( const DOMString &value )
    00379 {
    00380     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SRC, value);
    00381 }
    00382
    00383 DOMString HTMLIFrameElement::width() const
    00384 {
    00385     if(!impl) return DOMString();
    00386     return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
    00387 }
    00388
    00389 void HTMLIFrameElement::setWidth( const DOMString &value )
    00390 {
    00391     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
    00392 }
    00393
    00394 Document HTMLIFrameElement::contentDocument() const
    00395 {
    00396     if (impl) return static_cast<HTMLIFrameElementImpl*>(impl)->contentDocument();
    00397     return Document();
    00398 }
    00399
    00400 // --------------------------------------------------------------------------
    00401
    00402 HTMLFrameSetElement::HTMLFrameSetElement() : HTMLElement()
    00403 {
    00404 }
    00405
    00406 HTMLFrameSetElement::HTMLFrameSetElement(const HTMLFrameSetElement &other) : HTMLElement(other)
    00407 {
    00408 }
    00409
    00410 HTMLFrameSetElement::HTMLFrameSetElement(HTMLFrameSetElementImpl *impl) : HTMLElement(impl)
    00411 {
    00412 }
    00413
    00414 HTMLFrameSetElement &HTMLFrameSetElement::operator = (const Node &other)
    00415 {
    00416     assignOther( other, ID_FRAMESET );
    00417     return *this;
    00418 }
    00419
    00420 HTMLFrameSetElement &HTMLFrameSetElement::operator = (const HTMLFrameSetElement &other)
    00421 {
    00422     HTMLElement::operator = (other);
    00423     return *this;
    00424 }
    00425
    00426 HTMLFrameSetElement::~HTMLFrameSetElement()
    00427 {
    00428 }
    00429
    00430 DOMString HTMLFrameSetElement::cols() const
    00431 {
    00432     if(!impl) return DOMString();
    00433     return ((ElementImpl *)impl)->getAttribute(ATTR_COLS);
    00434 }
    00435
    00436 void HTMLFrameSetElement::setCols( const DOMString &value )
    00437 {
    00438     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLS, value);
    00439 }
    00440
    00441 DOMString HTMLFrameSetElement::rows() const
    00442 {
    00443     if(!impl) return DOMString();
    00444     return ((ElementImpl *)impl)->getAttribute(ATTR_ROWS);
    00445 }
    00446
    00447 void HTMLFrameSetElement::setRows( const DOMString &value )
    00448 {
    00449     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ROWS, value);
    00450 }
    00451
    00452 // --------------------------------------------------------------------------
    00453
    00454 HTMLHeadElement::HTMLHeadElement() : HTMLElement()
    00455 {
    00456 }
    00457
    00458 HTMLHeadElement::HTMLHeadElement(const HTMLHeadElement &other) : HTMLElement(other)
    00459 {
    00460 }
    00461
    00462 HTMLHeadElement::HTMLHeadElement(HTMLHeadElementImpl *impl) : HTMLElement(impl)
    00463 {
    00464 }
    00465
    00466 HTMLHeadElement &HTMLHeadElement::operator = (const Node &other)
    00467 {
    00468     assignOther( other, ID_HEAD );
    00469     return *this;
    00470 }
    00471
    00472 HTMLHeadElement &HTMLHeadElement::operator = (const HTMLHeadElement &other)
    00473 {
    00474     HTMLElement::operator = (other);
    00475     return *this;
    00476 }
    00477
    00478 HTMLHeadElement::~HTMLHeadElement()
    00479 {
    00480 }
    00481
    00482 DOMString HTMLHeadElement::profile() const
    00483 {
    00484     if(!impl) return DOMString();
    00485     return ((ElementImpl *)impl)->getAttribute(ATTR_PROFILE);
    00486 }
    00487
    00488 void HTMLHeadElement::setProfile( const DOMString &value )
    00489 {
    00490     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_PROFILE, value);
    00491 }
    00492
    00493 // --------------------------------------------------------------------------
    00494
    00495 HTMLHtmlElement::HTMLHtmlElement() : HTMLElement()
    00496 {
    00497 }
    00498
    00499 HTMLHtmlElement::HTMLHtmlElement(const HTMLHtmlElement &other) : HTMLElement(other)
    00500 {
    00501 }
    00502
    00503 HTMLHtmlElement::HTMLHtmlElement(HTMLHtmlElementImpl *impl) : HTMLElement(impl)
    00504 {
    00505 }
    00506
    00507 HTMLHtmlElement &HTMLHtmlElement::operator = (const Node &other)
    00508 {
    00509     assignOther( other, ID_HTML );
    00510     return *this;
    00511 }
    00512
    00513 HTMLHtmlElement &HTMLHtmlElement::operator = (const HTMLHtmlElement &other)
    00514 {
    00515     HTMLElement::operator = (other);
    00516     return *this;
    00517 }
    00518
    00519 HTMLHtmlElement::~HTMLHtmlElement()
    00520 {
    00521 }
    00522
    00523 DOMString HTMLHtmlElement::version() const
    00524 {
    00525     if(!impl) return DOMString();
    00526     return ((ElementImpl *)impl)->getAttribute(ATTR_VERSION);
    00527 }
    00528
    00529 void HTMLHtmlElement::setVersion( const DOMString &value )
    00530 {
    00531     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VERSION, value);
    00532 }
    00533

This file is part of the documentation for khtml Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:33:10 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003