html_inline.cpp
// --------------------------------------------------------------------------
#include "dom/dom_doc.h"
#include "dom/html_inline.h"
#include "html/html_inlineimpl.h"
#include "html/html_baseimpl.h"
#include "xml/dom_docimpl.h"
#include "misc/htmlhashes.h"
using namespace DOM;
HTMLAnchorElement::HTMLAnchorElement() : HTMLElement()
{
}
HTMLAnchorElement::HTMLAnchorElement(const HTMLAnchorElement &other) : HTMLElement(other)
{
}
HTMLAnchorElement::HTMLAnchorElement(HTMLAnchorElementImpl *impl) : HTMLElement(impl)
{
}
HTMLAnchorElement &HTMLAnchorElement::operator = (const Node &other)
{
assignOther( other, ID_A );
return *this;
}
HTMLAnchorElement &HTMLAnchorElement::operator = (const HTMLAnchorElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLAnchorElement::~HTMLAnchorElement()
{
}
DOMString HTMLAnchorElement::accessKey() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_ACCESSKEY);
}
void HTMLAnchorElement::setAccessKey( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ACCESSKEY, value);
}
DOMString HTMLAnchorElement::charset() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
}
void HTMLAnchorElement::setCharset( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
}
DOMString HTMLAnchorElement::coords() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_COORDS);
}
void HTMLAnchorElement::setCoords( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COORDS, value);
}
DOMString HTMLAnchorElement::href() const
{
if(!impl) return DOMString();
DOMString href = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_HREF);
return !href.isNull() ? impl->getDocument()->completeURL(href.string()) : href;
}
void HTMLAnchorElement::setHref( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
}
DOMString HTMLAnchorElement::hreflang() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_HREFLANG);
}
void HTMLAnchorElement::setHreflang( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREFLANG, value);
}
DOMString HTMLAnchorElement::name() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
}
void HTMLAnchorElement::setName( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
}
DOMString HTMLAnchorElement::rel() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_REL);
}
void HTMLAnchorElement::setRel( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REL, value);
}
DOMString HTMLAnchorElement::rev() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_REV);
}
void HTMLAnchorElement::setRev( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REV, value);
}
DOMString HTMLAnchorElement::shape() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_SHAPE);
}
void HTMLAnchorElement::setShape( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SHAPE, value);
}
long HTMLAnchorElement::tabIndex() const
{
if(!impl) return 0;
return ((ElementImpl *)impl)->getAttribute(ATTR_TABINDEX).toInt();
}
void HTMLAnchorElement::setTabIndex( long _tabIndex )
{
if(impl) {
DOMString value(QString::number(_tabIndex));
((ElementImpl *)impl)->setAttribute(ATTR_TABINDEX,value);
}
}
DOMString HTMLAnchorElement::target() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
}
void HTMLAnchorElement::setTarget( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
}
DOMString HTMLAnchorElement::type() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
}
void HTMLAnchorElement::setType( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
}
void HTMLAnchorElement::blur( )
{
if(impl && impl->getDocument()->focusNode()==impl)
impl->getDocument()->setFocusNode(0);
}
void HTMLAnchorElement::focus( )
{
if(impl)
impl->getDocument()->setFocusNode(static_cast<ElementImpl*>(impl));
}
void HTMLAnchorElement::click( )
{
if(impl) ((HTMLAnchorElement *)impl)->click();
}
// --------------------------------------------------------------------------
HTMLBRElement::HTMLBRElement() : HTMLElement()
{
}
HTMLBRElement::HTMLBRElement(const HTMLBRElement &other) : HTMLElement(other)
{
}
HTMLBRElement::HTMLBRElement(HTMLBRElementImpl *impl) : HTMLElement(impl)
{
}
HTMLBRElement &HTMLBRElement::operator = (const Node &other)
{
assignOther( other, ID_BR );
return *this;
}
HTMLBRElement &HTMLBRElement::operator = (const HTMLBRElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLBRElement::~HTMLBRElement()
{
}
DOMString HTMLBRElement::clear() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_CLEAR);
}
void HTMLBRElement::setClear( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CLEAR, value);
}
// --------------------------------------------------------------------------
HTMLFontElement::HTMLFontElement() : HTMLElement()
{
}
HTMLFontElement::HTMLFontElement(const HTMLFontElement &other) : HTMLElement(other)
{
}
HTMLFontElement::HTMLFontElement(HTMLFontElementImpl *impl) : HTMLElement(impl)
{
}
HTMLFontElement &HTMLFontElement::operator = (const Node &other)
{
assignOther( other, ID_FONT );
return *this;
}
HTMLFontElement &HTMLFontElement::operator = (const HTMLFontElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLFontElement::~HTMLFontElement()
{
}
DOMString HTMLFontElement::color() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_COLOR);
}
void HTMLFontElement::setColor( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLOR, value);
}
DOMString HTMLFontElement::face() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_FACE);
}
void HTMLFontElement::setFace( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FACE, value);
}
DOMString HTMLFontElement::size() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
}
void HTMLFontElement::setSize( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
}
// --------------------------------------------------------------------------
HTMLModElement::HTMLModElement() : HTMLElement()
{
}
HTMLModElement::HTMLModElement(const HTMLModElement &other) : HTMLElement(other)
{
}
HTMLModElement::HTMLModElement(HTMLElementImpl *_impl)
: HTMLElement()
{
if (_impl && (_impl->id() == ID_INS || _impl->id() == ID_DEL))
impl = _impl;
else
impl = 0;
if ( impl ) impl->ref();
}
HTMLModElement &HTMLModElement::operator = (const Node &other)
{
if (other.handle() != handle()) {
if( other.elementId() != ID_INS &&
other.elementId() != ID_DEL )
{
if ( impl ) impl->deref();
impl = 0;
} else {
Node::operator = (other);
}
}
return *this;
}
HTMLModElement &HTMLModElement::operator = (const HTMLModElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLModElement::~HTMLModElement()
{
}
DOMString HTMLModElement::cite() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
}
void HTMLModElement::setCite( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
}
DOMString HTMLModElement::dateTime() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_DATETIME);
}
void HTMLModElement::setDateTime( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_DATETIME, value);
}
// --------------------------------------------------------------------------
HTMLQuoteElement::HTMLQuoteElement() : HTMLElement()
{
}
HTMLQuoteElement::HTMLQuoteElement(const HTMLQuoteElement &other) : HTMLElement(other)
{
}
HTMLQuoteElement::HTMLQuoteElement(HTMLGenericElementImpl *_impl)
: HTMLElement()
{
if (_impl && _impl->id() == ID_Q)
impl = _impl;
else
impl = 0;
if ( impl ) impl->ref();
}
HTMLQuoteElement &HTMLQuoteElement::operator = (const Node &other)
{
assignOther( other, ID_Q );
return *this;
}
HTMLQuoteElement &HTMLQuoteElement::operator = (const HTMLQuoteElement &other)
{
HTMLElement::operator = (other);
return *this;
}
HTMLQuoteElement::~HTMLQuoteElement()
{
}
DOMString HTMLQuoteElement::cite() const
{
if(!impl) return DOMString();
return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
}
void HTMLQuoteElement::setCite( const DOMString &value )
{
if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
}
DOM::HTMLModElement
Notice of modification to part of a document.
Definition: html_inline.h:372
DOM::HTMLAnchorElement::rel
DOMString rel() const
Forward link type.
Definition: html_inline.cpp:129
DOM::HTMLAnchorElement::setName
void setName(const DOMString &)
see name
Definition: html_inline.cpp:124
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
DOM::HTMLModElement::dateTime
DOMString dateTime() const
The date and time of the change.
Definition: html_inline.cpp:377
DOM::HTMLAnchorElement::setRel
void setRel(const DOMString &)
see rel
Definition: html_inline.cpp:135
DOM::HTMLAnchorElement::target
DOMString target() const
Frame to render the resource in.
Definition: html_inline.cpp:176
DOM::HTMLAnchorElement::setRev
void setRev(const DOMString &)
see rev
Definition: html_inline.cpp:146
DOM::HTMLAnchorElement::rev
DOMString rev() const
Reverse link type.
Definition: html_inline.cpp:140
DOM::HTMLAnchorElement::name
DOMString name() const
Anchor name.
Definition: html_inline.cpp:118
DOM::HTMLAnchorElement::setType
void setType(const DOMString &)
see type
Definition: html_inline.cpp:193
DOM::HTMLAnchorElement::href
DOMString href() const
The URI of the linked resource.
Definition: html_inline.cpp:95
DOM::HTMLQuoteElement::cite
DOMString cite() const
A URI designating a document that designates a source document or message.
Definition: html_inline.cpp:424
DOM::HTMLAnchorElement::setHref
void setHref(const DOMString &)
see href
Definition: html_inline.cpp:102
DOM::HTMLAnchorElement::tabIndex
long tabIndex() const
Index that represents the element's position in the tabbing order.
Definition: html_inline.cpp:162
DOM::HTMLAnchorElement::setShape
void setShape(const DOMString &)
see shape
Definition: html_inline.cpp:157
DOM::HTMLQuoteElement
For the Q and BLOCKQUOTE elements.
Definition: html_inline.h:430
DOM::HTMLAnchorElement::hreflang
DOMString hreflang() const
Language code of the linked resource.
Definition: html_inline.cpp:107
DOM::HTMLFontElement::face
DOMString face() const
Font face identifier.
Definition: html_inline.cpp:298
DOM::HTMLBRElement::clear
DOMString clear() const
Control flow of text around floats.
Definition: html_inline.cpp:246
DOM::HTMLAnchorElement::setTarget
void setTarget(const DOMString &)
see target
Definition: html_inline.cpp:182
DOM::HTMLAnchorElement::blur
void blur()
Removes keyboard focus from this element.
Definition: html_inline.cpp:198
DOM::HTMLAnchorElement
The anchor element.
Definition: html_inline.h:47
DOM::HTMLModElement::cite
DOMString cite() const
A URI designating a document that describes the reason for the change.
Definition: html_inline.cpp:366
DOM::HTMLAnchorElement::accessKey
DOMString accessKey() const
A single character access key to give access to the form control.
Definition: html_inline.cpp:62
DOM::HTMLModElement::setCite
void setCite(const DOMString &)
see cite
Definition: html_inline.cpp:372
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLFontElement::setColor
void setColor(const DOMString &)
see color
Definition: html_inline.cpp:293
DOM::HTMLQuoteElement::setCite
void setCite(const DOMString &)
see cite
Definition: html_inline.cpp:430
DOM::HTMLAnchorElement::setCoords
void setCoords(const DOMString &)
see coords
Definition: html_inline.cpp:90
DOM::HTMLFontElement::size
DOMString size() const
Font size.
Definition: html_inline.cpp:309
DOM::HTMLAnchorElement::setHreflang
void setHreflang(const DOMString &)
see hreflang
Definition: html_inline.cpp:113
DOM::HTMLAnchorElement::coords
DOMString coords() const
Comma-separated list of lengths, defining an active region geometry.
Definition: html_inline.cpp:84
DOM::HTMLFontElement::setSize
void setSize(const DOMString &)
see size
Definition: html_inline.cpp:315
DOM::HTMLBRElement::setClear
void setClear(const DOMString &)
see clear
Definition: html_inline.cpp:252
DOM::HTMLFontElement::setFace
void setFace(const DOMString &)
see face
Definition: html_inline.cpp:304
DOM::HTMLAnchorElement::shape
DOMString shape() const
The shape of the active area.
Definition: html_inline.cpp:151
DOM::HTMLAnchorElement::charset
DOMString charset() const
The character encoding of the linked resource.
Definition: html_inline.cpp:73
DOM::HTMLModElement::setDateTime
void setDateTime(const DOMString &)
see dateTime
Definition: html_inline.cpp:383
DOM::HTMLAnchorElement::type
DOMString type() const
Advisory content type.
Definition: html_inline.cpp:187
DOM::Element::getAttribute
DOMString getAttribute(const DOMString &name)
Retrieves an attribute value by name.
Definition: dom_element.cpp:147
DOM::HTMLAnchorElement::setAccessKey
void setAccessKey(const DOMString &)
see accessKey
Definition: html_inline.cpp:68
DOM::HTMLAnchorElement::focus
void focus()
Gives keyboard focus to this element.
Definition: html_inline.cpp:204
DOM::HTMLAnchorElement::setTabIndex
void setTabIndex(long)
see tabIndex
Definition: html_inline.cpp:168
DOM::HTMLAnchorElement::click
void click()
Simulate a mouse-click.
Definition: html_inline.cpp:210
DOM::HTMLFontElement::color
DOMString color() const
Font color.
Definition: html_inline.cpp:287
DOM::HTMLFontElement
Local change to font.
Definition: html_inline.h:302
DOM::HTMLAnchorElement::setCharset
void setCharset(const DOMString &)
see charset
Definition: html_inline.cpp:79
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69
DOM::HTMLBRElement
Force a line break.
Definition: html_inline.h:259

KDE Home | KDE Accessibility Home | Description of Access Keys