dom2_views.cpp
#include "dom/dom2_views.h"
#include "dom/dom_exception.h"
#include "dom/dom_doc.h"
#include "xml/dom_elementimpl.h"
#include "xml/dom2_viewsimpl.h"
using namespace DOM;
AbstractView::AbstractView()
{
impl = 0;
}
AbstractView::AbstractView(const AbstractView &other)
{
impl = other.impl;
if (impl) impl->ref();
}
AbstractView::AbstractView(AbstractViewImpl *i)
{
impl = i;
if (impl) impl->ref();
}
AbstractView::~AbstractView()
{
if (impl)
impl->deref();
}
AbstractView &AbstractView::operator = (const AbstractView &other)
{
if ( impl != other.impl ) {
if(impl) impl->deref();
impl = other.impl;
if(impl) impl->ref();
}
return *this;
}
Document AbstractView::document() const
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
return impl->document();
}
CSSStyleDeclaration AbstractView::getComputedStyle(const Element &elt, const DOMString &pseudoElt)
{
if (!impl)
throw DOMException(DOMException::INVALID_STATE_ERR);
return impl->getComputedStyle(static_cast<ElementImpl*>(elt.handle()),pseudoElt.implementation());
}
AbstractViewImpl *AbstractView::handle() const
{
return impl;
}
bool AbstractView::isNull() const
{
return (impl == 0);
}
DOM::CSSStyleDeclaration
The CSSStyleDeclaration interface represents a single CSS declaration block .
Definition: css_value.h:60
DOM::AbstractView
Introduced in DOM Level 2.
Definition: dom2_views.h:41
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:57
DOM::Element
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: dom_element.h:210
DOM::AbstractView::getComputedStyle
CSSStyleDeclaration getComputedStyle(const Element &elt, const DOMString &pseudoElt)
Introduced in DOM Level 2 This method is from the ViewCSS interface.
Definition: dom2_views.cpp:75
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::Document
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:245
DOM::AbstractView::document
Document document() const
The source DocumentView of which this is an AbstractView.
Definition: dom2_views.cpp:67

KDE Home | KDE Accessibility Home | Description of Access Keys