html_misc.cpp
// --------------------------------------------------------------------------
#include "dom/html_misc.h"
#include "html/html_miscimpl.h"
#include "misc/htmlhashes.h"
using namespace DOM;
HTMLBaseFontElement::HTMLBaseFontElement() : HTMLElement()
{
}
HTMLBaseFontElement::HTMLBaseFontElement(const HTMLBaseFontElement &other) : HTMLElement(other)
{
}
HTMLBaseFontElement::HTMLBaseFontElement(HTMLBaseFontElementImpl *impl) : HTMLElement(impl)
{
}
HTMLBaseFontElement &HTMLBaseFontElement::operator = (const Node &other)
{
assignOther( other, ID_BASEFONT );
return *this;
}
HTMLBaseFontElement &HTMLBaseFontElement::operator = (const HTMLBaseFontElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLBaseFontElement::~HTMLBaseFontElement()
{
}
DOMString HTMLBaseFontElement::color() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_COLOR);
}
void HTMLBaseFontElement::setColor( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLOR, value);
}
DOMString HTMLBaseFontElement::face() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_FACE);
}
void HTMLBaseFontElement::setFace( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FACE, value);
}
DOMString HTMLBaseFontElement::size() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
}
void HTMLBaseFontElement::setSize( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
}
long HTMLBaseFontElement::getSize() const
{
if(!impl) return 0;
return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE).toInt();
}
void HTMLBaseFontElement::setSize( long _value )
{
if ( impl )
{
DOMString value( QString::number( _value ) );
((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
}
}
// --------------------------------------------------------------------------
HTMLCollection::HTMLCollection()
: impl(0)
{
}
HTMLCollection::HTMLCollection(const HTMLCollection &other)
{
impl = other.impl;
if(impl) impl->ref();
}
HTMLCollection::HTMLCollection(NodeImpl *base, int type)
{
impl = new HTMLCollectionImpl(base, type);
impl->ref();
}
HTMLCollection &HTMLCollection::operator = (const HTMLCollection &other)
{
if(impl != other.impl) {
if(impl) impl->deref();
impl = other.impl;
if(impl) impl->ref();
}
return *this;
}
HTMLCollection::~HTMLCollection()
{
if(impl) impl->deref();
}
unsigned long HTMLCollection::length() const
{
if(!impl) return 0;
return ((HTMLCollectionImpl *)impl)->length();
}
Node HTMLCollection::item( unsigned long index ) const
{
if(!impl) return 0;
return ((HTMLCollectionImpl *)impl)->item( index );
}
Node HTMLCollection::namedItem( const DOMString &name ) const
{
if(!impl) return 0;
return ((HTMLCollectionImpl *)impl)->namedItem( name );
}
Node HTMLCollection::base() const
{
if ( !impl )
return 0;
return static_cast<HTMLCollectionImpl*>( impl )->m_refNode;
}
Node HTMLCollection::firstItem() const
{
if ( !impl )
return 0;
return static_cast<HTMLCollectionImpl*>( impl )->firstItem();
}
Node HTMLCollection::nextItem() const
{
if ( !impl )
return 0;
return static_cast<HTMLCollectionImpl*>( impl )->nextItem();
}
Node HTMLCollection::nextNamedItem( const DOMString &name ) const
{
if ( !impl )
return 0;
return static_cast<HTMLCollectionImpl*>( impl )->nextNamedItem( name );
}
HTMLCollectionImpl *HTMLCollection::handle() const
{
return impl;
}
bool HTMLCollection::isNull() const
{
return (impl == 0);
}
// -----------------------------------------------------------------------------
HTMLFormCollection::HTMLFormCollection(NodeImpl *base)
: HTMLCollection()
{
impl = new HTMLFormCollectionImpl(base);
impl->ref();
}
// -----------------------------------------------------------------------------
HTMLMappedNameCollection::HTMLMappedNameCollection(NodeImpl *base, int type, const DOMString &name )
{
impl = new HTMLMappedNameCollectionImpl(base, type, name);
impl->ref();
}
DOM::HTMLBaseFontElement::setFace
void setFace(const DOMString &)
see face
Definition: html_misc.cpp:75
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::HTMLBaseFontElement::getSize
long getSize() const
Computed Font size.
Definition: html_misc.cpp:91
DOM::HTMLBaseFontElement::setColor
void setColor(const DOMString &)
see color
Definition: html_misc.cpp:64
DOM::HTMLBaseFontElement::setSize
void setSize(long)
see size
Definition: html_misc.cpp:97
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:126
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLBaseFontElement::face
DOMString face() const
Font face identifier.
Definition: html_misc.cpp:69
DOM::HTMLCollection::length
unsigned long length() const
This attribute specifies the length or size of the list.
Definition: html_misc.cpp:141
DOM::HTMLBaseFontElement::color
DOMString color() const
Font color.
Definition: html_misc.cpp:58
DOM::HTMLBaseFontElement
Base font.
Definition: html_misc.h:48
DOM::HTMLCollection::item
Node item(unsigned long index) const
This method retrieves a node specified by ordinal index.
Definition: html_misc.cpp:147
DOM::HTMLCollection::namedItem
Node namedItem(const DOMString &name) const
This method retrieves a Node using a name.
Definition: html_misc.cpp:153
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69
DOM::HTMLBaseFontElement::size
DOMString size() const KDE_DEPRECATED
Definition: html_misc.cpp:80

KDE Home | KDE Accessibility Home | Description of Access Keys