khtml Library API Documentation

html_object.cpp

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