# khtml Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# html_object.cpp

    00001
    00024 #include "dom/dom_doc.h"
    00025 #include "dom/html_object.h"
    00026 #include "html/html_objectimpl.h"
    00027 #include "misc/htmlhashes.h"
    00028
    00029 HTMLAppletElement::HTMLAppletElement() : HTMLElement()
    00030 {
    00031 }
    00032
    00033 HTMLAppletElement::HTMLAppletElement(const HTMLAppletElement &other)
    00034     : HTMLElement(other)
    00035 {
    00036 }
    00037
    00038 HTMLAppletElement::HTMLAppletElement(HTMLAppletElementImpl *impl)
    00039     : HTMLElement(impl)
    00040 {
    00041 }
    00042
    00043 HTMLAppletElement &HTMLAppletElement::operator = (const Node &other)
    00044 {
    00045     assignOther( other, ID_APPLET );
    00046     return *this;
    00047 }
    00048
    00049 HTMLAppletElement &HTMLAppletElement::operator = (const HTMLAppletElement &other)
    00050 {
    00051     HTMLElement::operator = (other);
    00052     return *this;
    00053 }
    00054
    00055 HTMLAppletElement::~HTMLAppletElement()
    00056 {
    00057 }
    00058
    00059 DOMString HTMLAppletElement::align() const
    00060 {
    00061     if(!impl) return DOMString();
    00062     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00063 }
    00064
    00065 void HTMLAppletElement::setAlign( const DOMString &value )
    00066 {
    00067     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00068 }
    00069
    00070 DOMString HTMLAppletElement::alt() const
    00071 {
    00072     if(!impl) return DOMString();
    00073     return ((ElementImpl *)impl)->getAttribute(ATTR_ALT);
    00074 }
    00075
    00076 void HTMLAppletElement::setAlt( const DOMString &value )
    00077 {
    00078     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALT, value);
    00079 }
    00080
    00081 DOMString HTMLAppletElement::archive() const
    00082 {
    00083     if(!impl) return DOMString();
    00084     return ((ElementImpl *)impl)->getAttribute(ATTR_ARCHIVE);
    00085 }
    00086
    00087 void HTMLAppletElement::setArchive( const DOMString &value )
    00088 {
    00089     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ARCHIVE, value);
    00090 }
    00091
    00092 DOMString HTMLAppletElement::code() const
    00093 {
    00094     if(!impl) return DOMString();
    00095     return ((ElementImpl *)impl)->getAttribute(ATTR_CODE);
    00096 }
    00097
    00098 void HTMLAppletElement::setCode( const DOMString &value )
    00099 {
    00100     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CODE, value);
    00101 }
    00102
    00103 DOMString HTMLAppletElement::codeBase() const
    00104 {
    00105     if(!impl) return DOMString();
    00106     return ((ElementImpl *)impl)->getAttribute(ATTR_CODEBASE);
    00107 }
    00108
    00109 void HTMLAppletElement::setCodeBase( const DOMString &value )
    00110 {
    00111     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CODEBASE, value);
    00112 }
    00113
    00114 DOMString HTMLAppletElement::height() const
    00115 {
    00116     if(!impl) return DOMString();
    00117     return ((ElementImpl *)impl)->getAttribute(ATTR_HEIGHT);
    00118 }
    00119
    00120 void HTMLAppletElement::setHeight( const DOMString &value )
    00121 {
    00122     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, value);
    00123 }
    00124
    00125 DOMString HTMLAppletElement::hspace() const
    00126 {
    00127     if(!impl) return DOMString();
    00128     return ((ElementImpl *)impl)->getAttribute(ATTR_HSPACE);
    00129 }
    00130
    00131 void HTMLAppletElement::setHspace( const DOMString &value )
    00132 {
    00133     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, value);
    00134 }
    00135
    00136 long HTMLAppletElement::getHspace() const
    00137 {
    00138     if(!impl) return 0;
    00139     return ((ElementImpl *)impl)->getAttribute(ATTR_HSPACE).toInt();
    00140 }
    00141
    00142 void HTMLAppletElement::setHspace( long value )
    00143 {
    00144     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, QString::number(value));
    00145 }
    00146
    00147 DOMString HTMLAppletElement::name() const
    00148 {
    00149     if(!impl) return DOMString();
    00150     return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
    00151 }
    00152
    00153 void HTMLAppletElement::setName( const DOMString &value )
    00154 {
    00155     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
    00156 }
    00157
    00158 DOMString HTMLAppletElement::object() const
    00159 {
    00160     if(!impl) return DOMString();
    00161     return ((ElementImpl *)impl)->getAttribute(ATTR_OBJECT);
    00162 }
    00163
    00164 void HTMLAppletElement::setObject( const DOMString &value )
    00165 {
    00166     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_OBJECT, value);
    00167 }
    00168
    00169 DOMString HTMLAppletElement::vspace() const
    00170 {
    00171     if(!impl) return DOMString();
    00172     return ((ElementImpl *)impl)->getAttribute(ATTR_VSPACE);
    00173 }
    00174
    00175 void HTMLAppletElement::setVspace( const DOMString &value )
    00176 {
    00177     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VSPACE, value);
    00178 }
    00179
    00180 long HTMLAppletElement::getVspace() const
    00181 {
    00182     if(!impl) return 0;
    00183     return ((ElementImpl *)impl)->getAttribute(ATTR_VSPACE).toInt();
    00184 }
    00185
    00186 void HTMLAppletElement::setVspace( long value )
    00187 {
    00188     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VSPACE, QString::number(value));
    00189 }
    00190
    00191
    00192 DOMString HTMLAppletElement::width() const
    00193 {
    00194     if(!impl) return DOMString();
    00195     return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
    00196 }
    00197
    00198 void HTMLAppletElement::setWidth( const DOMString &value )
    00199 {
    00200     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
    00201 }
    00202
    00203 // --------------------------------------------------------------------------
    00204
    00205 HTMLObjectElement::HTMLObjectElement() : HTMLElement()
    00206 {
    00207 }
    00208
    00209 HTMLObjectElement::HTMLObjectElement(const HTMLObjectElement &other) : HTMLElement(other)
    00210 {
    00211 }
    00212
    00213 HTMLObjectElement::HTMLObjectElement(HTMLObjectElementImpl *impl) : HTMLElement(impl)
    00214 {
    00215 }
    00216
    00217 HTMLObjectElement &HTMLObjectElement::operator = (const Node &other)
    00218 {
    00219     assignOther( other, ID_OBJECT );
    00220     return *this;
    00221 }
    00222
    00223 HTMLObjectElement &HTMLObjectElement::operator = (const HTMLObjectElement &other)
    00224 {
    00225     HTMLElement::operator = (other);
    00226     return *this;
    00227 }
    00228
    00229 HTMLObjectElement::~HTMLObjectElement()
    00230 {
    00231 }
    00232
    00233 HTMLFormElement HTMLObjectElement::form() const
    00234 {
    00235     if(!impl) return 0;
    00236     return ((HTMLObjectElementImpl *)impl)->form();
    00237 }
    00238
    00239 DOMString HTMLObjectElement::code() const
    00240 {
    00241     if(!impl) return DOMString();
    00242     return ((ElementImpl *)impl)->getAttribute(ATTR_CODE);
    00243 }
    00244
    00245 void HTMLObjectElement::setCode( const DOMString &value )
    00246 {
    00247     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CODE, value);
    00248 }
    00249
    00250 DOMString HTMLObjectElement::align() const
    00251 {
    00252     if(!impl) return DOMString();
    00253     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00254 }
    00255
    00256 void HTMLObjectElement::setAlign( const DOMString &value )
    00257 {
    00258     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00259 }
    00260
    00261 DOMString HTMLObjectElement::archive() const
    00262 {
    00263     if(!impl) return DOMString();
    00264     return ((ElementImpl *)impl)->getAttribute(ATTR_ARCHIVE);
    00265 }
    00266
    00267 void HTMLObjectElement::setArchive( const DOMString &value )
    00268 {
    00269     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ARCHIVE, value);
    00270 }
    00271
    00272 DOMString HTMLObjectElement::border() const
    00273 {
    00274     if(!impl) return DOMString();
    00275     return ((ElementImpl *)impl)->getAttribute(ATTR_BORDER);
    00276 }
    00277
    00278 void HTMLObjectElement::setBorder( const DOMString &value )
    00279 {
    00280     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BORDER, value);
    00281 }
    00282
    00283 DOMString HTMLObjectElement::codeBase() const
    00284 {
    00285     if(!impl) return DOMString();
    00286     return ((ElementImpl *)impl)->getAttribute(ATTR_CODEBASE);
    00287 }
    00288
    00289 void HTMLObjectElement::setCodeBase( const DOMString &value )
    00290 {
    00291     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CODEBASE, value);
    00292 }
    00293
    00294 DOMString HTMLObjectElement::codeType() const
    00295 {
    00296     if(!impl) return DOMString();
    00297     return ((ElementImpl *)impl)->getAttribute(ATTR_CODETYPE);
    00298 }
    00299
    00300 void HTMLObjectElement::setCodeType( const DOMString &value )
    00301 {
    00302     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CODETYPE, value);
    00303 }
    00304
    00305 DOMString HTMLObjectElement::data() const
    00306 {
    00307     if(!impl) return DOMString();
    00308     return ((ElementImpl *)impl)->getAttribute(ATTR_DATA);
    00309 }
    00310
    00311 void HTMLObjectElement::setData( const DOMString &value )
    00312 {
    00313     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_DATA, value);
    00314 }
    00315
    00316 bool HTMLObjectElement::declare() const
    00317 {
    00318     if(!impl) return 0;
    00319     return !((ElementImpl *)impl)->getAttribute(ATTR_DECLARE).isNull();
    00320 }
    00321
    00322 void HTMLObjectElement::setDeclare( bool _declare )
    00323 {
    00324    if(impl)
    00325     {
    00326         DOMString str;
    00327         if( _declare )
    00328             str = "";
    00329         ((ElementImpl *)impl)->setAttribute(ATTR_DECLARE, str);
    00330     }
    00331 }
    00332
    00333 DOMString HTMLObjectElement::height() const
    00334 {
    00335     if(!impl) return DOMString();
    00336     return ((ElementImpl *)impl)->getAttribute(ATTR_HEIGHT);
    00337 }
    00338
    00339 void HTMLObjectElement::setHeight( const DOMString &value )
    00340 {
    00341     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, value);
    00342 }
    00343
    00344 DOMString HTMLObjectElement::hspace() const
    00345 {
    00346     if(!impl) return DOMString();
    00347     return ((ElementImpl *)impl)->getAttribute(ATTR_HSPACE);
    00348 }
    00349
    00350 void HTMLObjectElement::setHspace( const DOMString &value )
    00351 {
    00352     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, value);
    00353 }
    00354
    00355 long HTMLObjectElement::getHspace() const
    00356 {
    00357     if(!impl) return 0;
    00358     return ((ElementImpl *)impl)->getAttribute(ATTR_HSPACE).toInt();
    00359 }
    00360
    00361 void HTMLObjectElement::setHspace( long value )
    00362 {
    00363     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HSPACE, QString::number(value));
    00364 }
    00365
    00366 DOMString HTMLObjectElement::name() const
    00367 {
    00368     if(!impl) return DOMString();
    00369     return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
    00370 }
    00371
    00372 void HTMLObjectElement::setName( const DOMString &value )
    00373 {
    00374     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
    00375 }
    00376
    00377 DOMString HTMLObjectElement::standby() const
    00378 {
    00379     if(!impl) return DOMString();
    00380     return ((ElementImpl *)impl)->getAttribute(ATTR_STANDBY);
    00381 }
    00382
    00383 void HTMLObjectElement::setStandby( const DOMString &value )
    00384 {
    00385     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_STANDBY, value);
    00386 }
    00387
    00388 long HTMLObjectElement::tabIndex() const
    00389 {
    00390     if(!impl) return 0;
    00391     return ((ElementImpl *)impl)->getAttribute(ATTR_TABINDEX).toInt();
    00392 }
    00393
    00394 void HTMLObjectElement::setTabIndex( long _tabIndex )
    00395 {
    00396     if(impl) {
    00397         DOMString value(QString::number(_tabIndex));
    00398         ((ElementImpl *)impl)->setAttribute(ATTR_TABINDEX,value);
    00399     }
    00400 }
    00401
    00402 DOMString HTMLObjectElement::type() const
    00403 {
    00404     if(!impl) return DOMString();
    00405     return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
    00406 }
    00407
    00408 void HTMLObjectElement::setType( const DOMString &value )
    00409 {
    00410     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
    00411 }
    00412
    00413 DOMString HTMLObjectElement::useMap() const
    00414 {
    00415     if(!impl) return DOMString();
    00416     return ((ElementImpl *)impl)->getAttribute(ATTR_USEMAP);
    00417 }
    00418
    00419 void HTMLObjectElement::setUseMap( const DOMString &value )
    00420 {
    00421     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_USEMAP, value);
    00422 }
    00423
    00424 DOMString HTMLObjectElement::vspace() const
    00425 {
    00426     if(!impl) return DOMString();
    00427     return ((ElementImpl *)impl)->getAttribute(ATTR_VSPACE);
    00428 }
    00429
    00430 void HTMLObjectElement::setVspace( const DOMString &value )
    00431 {
    00432     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VSPACE, value);
    00433 }
    00434
    00435 long HTMLObjectElement::getVspace() const
    00436 {
    00437     if(!impl) return 0;
    00438     return ((ElementImpl *)impl)->getAttribute(ATTR_VSPACE).toInt();
    00439 }
    00440
    00441 void HTMLObjectElement::setVspace( long value )
    00442 {
    00443     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VSPACE, QString::number(value));
    00444 }
    00445
    00446 DOMString HTMLObjectElement::width() const
    00447 {
    00448     if(!impl) return DOMString();
    00449     return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
    00450 }
    00451
    00452 void HTMLObjectElement::setWidth( const DOMString &value )
    00453 {
    00454     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
    00455 }
    00456
    00457 Document HTMLObjectElement::contentDocument() const
    00458 {
    00459     if (impl) return static_cast<HTMLObjectElementImpl*>(impl)->contentDocument();
    00460     return Document();
    00461 }
    00462
    00463 // --------------------------------------------------------------------------
    00464
    00465 HTMLParamElement::HTMLParamElement() : HTMLElement()
    00466 {
    00467 }
    00468
    00469 HTMLParamElement::HTMLParamElement(const HTMLParamElement &other) : HTMLElement(other)
    00470 {
    00471 }
    00472
    00473 HTMLParamElement::HTMLParamElement(HTMLParamElementImpl *impl) : HTMLElement(impl)
    00474 {
    00475 }
    00476
    00477 HTMLParamElement &HTMLParamElement::operator = (const Node &other)
    00478 {
    00479     assignOther( other, ID_PARAM );
    00480     return *this;
    00481 }
    00482
    00483 HTMLParamElement &HTMLParamElement::operator = (const HTMLParamElement &other)
    00484 {
    00485     HTMLElement::operator = (other);
    00486     return *this;
    00487 }
    00488
    00489 HTMLParamElement::~HTMLParamElement()
    00490 {
    00491 }
    00492
    00493 DOMString HTMLParamElement::name() const
    00494 {
    00495     if(!impl) return DOMString();
    00496     return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
    00497 }
    00498
    00499 void HTMLParamElement::setName( const DOMString &value )
    00500 {
    00501     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
    00502 }
    00503
    00504 DOMString HTMLParamElement::type() const
    00505 {
    00506     if(!impl) return DOMString();
    00507     return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
    00508 }
    00509
    00510 void HTMLParamElement::setType( const DOMString &value )
    00511 {
    00512     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
    00513 }
    00514
    00515 DOMString HTMLParamElement::value() const
    00516 {
    00517     if(!impl) return DOMString();
    00518     return ((ElementImpl *)impl)->getAttribute(ATTR_VALUE);
    00519 }
    00520
    00521 void HTMLParamElement::setValue( const DOMString &value )
    00522 {
    00523     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALUE, value);
    00524 }
    00525
    00526 DOMString HTMLParamElement::valueType() const
    00527 {
    00528     if(!impl) return DOMString();
    00529     return ((ElementImpl *)impl)->getAttribute(ATTR_VALUETYPE);
    00530 }
    00531
    00532 void HTMLParamElement::setValueType( const DOMString &value )
    00533 {
    00534     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALUETYPE, value);
    00535 }
    00536

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:33:56 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001