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

# html_block.cpp

    00001
    00023 // --------------------------------------------------------------------------
    00024
    00025
    00026 #include "dom/html_block.h"
    00027 #include "html/html_blockimpl.h"
    00028
    00029 using namespace DOM;
    00030
    00031 #include "misc/htmlhashes.h"
    00032
    00033 HTMLBlockquoteElement::HTMLBlockquoteElement()
    00034     : HTMLElement()
    00035 {
    00036 }
    00037
    00038 HTMLBlockquoteElement::HTMLBlockquoteElement(const HTMLBlockquoteElement &other)
    00039     : HTMLElement(other)
    00040 {
    00041 }
    00042
    00043 HTMLBlockquoteElement::HTMLBlockquoteElement(HTMLElementImpl *impl)
    00044     : HTMLElement(impl)
    00045 {
    00046 }
    00047
    00048 HTMLBlockquoteElement &HTMLBlockquoteElement::operator = (const Node &other)
    00049 {
    00050     assignOther( other, ID_BLOCKQUOTE );
    00051     return *this;
    00052 }
    00053
    00054 HTMLBlockquoteElement &HTMLBlockquoteElement::operator = (const HTMLBlockquoteElement &other)
    00055 {
    00056     HTMLElement::operator = (other);
    00057     return *this;
    00058 }
    00059
    00060 HTMLBlockquoteElement::~HTMLBlockquoteElement()
    00061 {
    00062 }
    00063
    00064 DOMString HTMLBlockquoteElement::cite() const
    00065 {
    00066     if(!impl) return DOMString();
    00067     return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
    00068 }
    00069
    00070 void HTMLBlockquoteElement::setCite( const DOMString &value )
    00071 {
    00072     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
    00073 }
    00074
    00075 // --------------------------------------------------------------------------
    00076
    00077 HTMLDivElement::HTMLDivElement() : HTMLElement()
    00078 {
    00079 }
    00080
    00081 HTMLDivElement::HTMLDivElement(const HTMLDivElement &other) : HTMLElement(other)
    00082 {
    00083 }
    00084
    00085 HTMLDivElement::HTMLDivElement(HTMLDivElementImpl *impl) : HTMLElement(impl)
    00086 {
    00087 }
    00088
    00089 HTMLDivElement &HTMLDivElement::operator = (const Node &other)
    00090 {
    00091     assignOther( other, ID_DIV );
    00092     return *this;
    00093 }
    00094
    00095 HTMLDivElement &HTMLDivElement::operator = (const HTMLDivElement &other)
    00096 {
    00097     HTMLElement::operator = (other);
    00098     return *this;
    00099 }
    00100
    00101 HTMLDivElement::~HTMLDivElement()
    00102 {
    00103 }
    00104
    00105 DOMString HTMLDivElement::align() const
    00106 {
    00107     if(!impl) return DOMString();
    00108     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00109 }
    00110
    00111 void HTMLDivElement::setAlign( const DOMString &value )
    00112 {
    00113     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00114 }
    00115
    00116 // --------------------------------------------------------------------------
    00117
    00118 HTMLHRElement::HTMLHRElement() : HTMLElement()
    00119 {
    00120 }
    00121
    00122 HTMLHRElement::HTMLHRElement(const HTMLHRElement &other) : HTMLElement(other)
    00123 {
    00124 }
    00125
    00126 HTMLHRElement::HTMLHRElement(HTMLHRElementImpl *impl) : HTMLElement(impl)
    00127 {
    00128 }
    00129
    00130 HTMLHRElement &HTMLHRElement::operator = (const Node &other)
    00131 {
    00132     assignOther( other, ID_HR );
    00133     return *this;
    00134 }
    00135
    00136 HTMLHRElement &HTMLHRElement::operator = (const HTMLHRElement &other)
    00137 {
    00138     HTMLElement::operator = (other);
    00139     return *this;
    00140 }
    00141
    00142 HTMLHRElement::~HTMLHRElement()
    00143 {
    00144 }
    00145
    00146 DOMString HTMLHRElement::align() const
    00147 {
    00148     if(!impl) return DOMString();
    00149     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00150 }
    00151
    00152 void HTMLHRElement::setAlign( const DOMString &value )
    00153 {
    00154     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00155 }
    00156
    00157 bool HTMLHRElement::noShade() const
    00158 {
    00159     if(!impl) return false;
    00160     return !((ElementImpl *)impl)->getAttribute(ATTR_NOSHADE).isNull();
    00161 }
    00162
    00163 void HTMLHRElement::setNoShade( bool _noShade )
    00164 {
    00165     if(impl)
    00166     {
    00167         DOMString str;
    00168         if( _noShade )
    00169             str = "";
    00170         ((ElementImpl *)impl)->setAttribute(ATTR_NOSHADE, str);
    00171     }
    00172 }
    00173
    00174 DOMString HTMLHRElement::size() const
    00175 {
    00176     if(!impl) return DOMString();
    00177     return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
    00178 }
    00179
    00180 void HTMLHRElement::setSize( const DOMString &value )
    00181 {
    00182     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
    00183 }
    00184
    00185 DOMString HTMLHRElement::width() const
    00186 {
    00187     if(!impl) return DOMString();
    00188     return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
    00189 }
    00190
    00191 void HTMLHRElement::setWidth( const DOMString &value )
    00192 {
    00193     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
    00194 }
    00195
    00196 // --------------------------------------------------------------------------
    00197
    00198 HTMLHeadingElement::HTMLHeadingElement() : HTMLElement()
    00199 {
    00200 }
    00201
    00202 HTMLHeadingElement::HTMLHeadingElement(const HTMLHeadingElement &other) : HTMLElement(other)
    00203 {
    00204 }
    00205
    00206 HTMLHeadingElement::HTMLHeadingElement(HTMLElementImpl *impl) : HTMLElement(impl)
    00207 {
    00208 }
    00209
    00210 HTMLHeadingElement &HTMLHeadingElement::operator = (const Node &other)
    00211 {
    00212     if(other.elementId() != ID_H1 &&
    00213        other.elementId() != ID_H2 &&
    00214        other.elementId() != ID_H3 &&
    00215        other.elementId() != ID_H4 &&
    00216        other.elementId() != ID_H5 &&
    00217        other.elementId() != ID_H6 )
    00218     {
    00219         if ( impl ) impl->deref();
    00220         impl = 0;
    00221     } else {
    00222     Node::operator = (other);
    00223     }
    00224     return *this;
    00225 }
    00226
    00227 HTMLHeadingElement &HTMLHeadingElement::operator = (const HTMLHeadingElement &other)
    00228 {
    00229     HTMLElement::operator = (other);
    00230     return *this;
    00231 }
    00232
    00233 HTMLHeadingElement::~HTMLHeadingElement()
    00234 {
    00235 }
    00236
    00237 DOMString HTMLHeadingElement::align() const
    00238 {
    00239     if(!impl) return DOMString();
    00240     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00241 }
    00242
    00243 void HTMLHeadingElement::setAlign( const DOMString &value )
    00244 {
    00245     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00246 }
    00247
    00248 // --------------------------------------------------------------------------
    00249
    00250 HTMLParagraphElement::HTMLParagraphElement() : HTMLElement()
    00251 {
    00252 }
    00253
    00254 HTMLParagraphElement::HTMLParagraphElement(const HTMLParagraphElement &other) : HTMLElement(other)
    00255 {
    00256 }
    00257
    00258 HTMLParagraphElement::HTMLParagraphElement(HTMLElementImpl *impl) : HTMLElement(impl)
    00259 {
    00260 }
    00261
    00262 HTMLParagraphElement &HTMLParagraphElement::operator = (const Node &other)
    00263 {
    00264     assignOther( other, ID_P );
    00265     return *this;
    00266 }
    00267
    00268 HTMLParagraphElement &HTMLParagraphElement::operator = (const HTMLParagraphElement &other)
    00269 {
    00270     HTMLElement::operator = (other);
    00271     return *this;
    00272 }
    00273
    00274 HTMLParagraphElement::~HTMLParagraphElement()
    00275 {
    00276 }
    00277
    00278 DOMString HTMLParagraphElement::align() const
    00279 {
    00280     if(!impl) return DOMString();
    00281     return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
    00282 }
    00283
    00284 void HTMLParagraphElement::setAlign( const DOMString &value )
    00285 {
    00286     if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
    00287 }
    00288
    00289 // --------------------------------------------------------------------------
    00290
    00291 HTMLPreElement::HTMLPreElement() : HTMLElement()
    00292 {
    00293 }
    00294
    00295 HTMLPreElement::HTMLPreElement(const HTMLPreElement &other) : HTMLElement(other)
    00296 {
    00297 }
    00298
    00299 HTMLPreElement::HTMLPreElement(HTMLPreElementImpl *impl) : HTMLElement(impl)
    00300 {
    00301 }
    00302
    00303 HTMLPreElement &HTMLPreElement::operator = (const Node &other)
    00304 {
    00305     assignOther( other, ID_PRE );
    00306     return *this;
    00307 }
    00308
    00309 HTMLPreElement &HTMLPreElement::operator = (const HTMLPreElement &other)
    00310 {
    00311     HTMLElement::operator = (other);
    00312     return *this;
    00313 }
    00314
    00315 HTMLPreElement::~HTMLPreElement()
    00316 {
    00317 }
    00318
    00319 long HTMLPreElement::width() const
    00320 {
    00321     if(!impl) return 0;
    00322     DOMString w = ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
    00323     return w.toInt();
    00324 }
    00325
    00326 void HTMLPreElement::setWidth( long _width )
    00327 {
    00328     if(!impl) return;
    00329
    00330     QString aStr;
    00331     aStr.sprintf("%ld", _width);
    00332     DOMString value(aStr);
    00333     ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
    00334 }
    00335

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:50 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001