00001
00022
00023
00024
#include "dom/html_misc.h"
00025
#include "html/html_miscimpl.h"
00026
#include "misc/htmlhashes.h"
00027
00028
using namespace DOM;
00029
00030 HTMLBaseFontElement::HTMLBaseFontElement() :
HTMLElement()
00031 {
00032 }
00033
00034 HTMLBaseFontElement::HTMLBaseFontElement(
const HTMLBaseFontElement &other) :
HTMLElement(other)
00035 {
00036 }
00037
00038 HTMLBaseFontElement::HTMLBaseFontElement(HTMLBaseFontElementImpl *impl) :
HTMLElement(impl)
00039 {
00040 }
00041
00042
HTMLBaseFontElement &HTMLBaseFontElement::operator = (
const Node &other)
00043 {
00044 assignOther( other, ID_BASEFONT );
00045
return *
this;
00046 }
00047
00048
HTMLBaseFontElement &HTMLBaseFontElement::operator = (
const HTMLBaseFontElement &other)
00049 {
00050 HTMLElement::operator = (other);
00051
return *
this;
00052 }
00053
00054 HTMLBaseFontElement::~HTMLBaseFontElement()
00055 {
00056 }
00057
00058 DOMString HTMLBaseFontElement::color()
const
00059
{
00060
if(!impl)
return DOMString();
00061
return ((ElementImpl *)impl)->getAttribute(ATTR_COLOR);
00062 }
00063
00064 void HTMLBaseFontElement::setColor(
const DOMString &value )
00065 {
00066
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLOR, value);
00067 }
00068
00069 DOMString HTMLBaseFontElement::face()
const
00070
{
00071
if(!impl)
return DOMString();
00072
return ((ElementImpl *)impl)->getAttribute(ATTR_FACE);
00073 }
00074
00075 void HTMLBaseFontElement::setFace(
const DOMString &value )
00076 {
00077
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FACE, value);
00078 }
00079
00080 DOMString HTMLBaseFontElement::size()
const
00081
{
00082
if(!impl)
return DOMString();
00083
return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
00084 }
00085
00086 void HTMLBaseFontElement::setSize(
const DOMString &value )
00087 {
00088
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
00089 }
00090
00091 long HTMLBaseFontElement::getSize()
const
00092
{
00093
if(!impl)
return 0;
00094
return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE).toInt();
00095 }
00096
00097 void HTMLBaseFontElement::setSize(
long _value )
00098 {
00099
if ( impl )
00100 {
00101
DOMString value( QString::number( _value ) );
00102 ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
00103 }
00104 }
00105
00106
00107
00108
00109 HTMLCollection::HTMLCollection()
00110 : impl(0)
00111 {
00112 }
00113
00114 HTMLCollection::HTMLCollection(
const HTMLCollection &other)
00115 {
00116 impl = other.
impl;
00117
if(impl) impl->ref();
00118 }
00119
00120 HTMLCollection::HTMLCollection(NodeImpl *base,
int type)
00121 {
00122 impl =
new HTMLCollectionImpl(base, type);
00123 impl->ref();
00124 }
00125
00126
HTMLCollection &HTMLCollection::operator = (
const HTMLCollection &other)
00127 {
00128
if(impl != other.
impl) {
00129
if(impl) impl->deref();
00130 impl = other.
impl;
00131
if(impl) impl->ref();
00132 }
00133
return *
this;
00134 }
00135
00136 HTMLCollection::~HTMLCollection()
00137 {
00138
if(impl) impl->deref();
00139 }
00140
00141 unsigned long HTMLCollection::length()
const
00142
{
00143
if(!impl)
return 0;
00144
return ((HTMLCollectionImpl *)impl)->length();
00145 }
00146
00147 Node HTMLCollection::item(
unsigned long index )
const
00148
{
00149
if(!impl)
return 0;
00150
return ((HTMLCollectionImpl *)impl)->item( index );
00151 }
00152
00153 Node HTMLCollection::namedItem(
const DOMString &name )
const
00154
{
00155
if(!impl)
return 0;
00156
return ((HTMLCollectionImpl *)impl)->namedItem( name );
00157 }
00158
00159
Node HTMLCollection::base()
const
00160
{
00161
if ( !impl )
00162
return 0;
00163
00164
return static_cast<HTMLCollectionImpl*>( impl )->base;
00165 }
00166
00167
Node HTMLCollection::firstItem()
const
00168
{
00169
if ( !impl )
00170
return 0;
00171
return static_cast<HTMLCollectionImpl*>( impl )->firstItem();
00172 }
00173
00174
Node HTMLCollection::nextItem()
const
00175
{
00176
if ( !impl )
00177
return 0;
00178
return static_cast<HTMLCollectionImpl*>( impl )->nextItem();
00179 }
00180
00181
Node HTMLCollection::nextNamedItem(
const DOMString &name )
const
00182
{
00183
if ( !impl )
00184
return 0;
00185
return static_cast<HTMLCollectionImpl*>( impl )->nextNamedItem( name );
00186 }
00187
00188 HTMLCollectionImpl *HTMLCollection::handle()
const
00189
{
00190
return impl;
00191 }
00192
00193
bool HTMLCollection::isNull()
const
00194
{
00195
return (impl == 0);
00196 }
00197
00198
00199
00200
00201 HTMLFormCollection::HTMLFormCollection(NodeImpl *base)
00202 :
HTMLCollection()
00203 {
00204 impl =
new HTMLFormCollectionImpl(base);
00205 impl->ref();
00206 }
00207