• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • dom
dom2_views.cpp
Go to the documentation of this file.
1
23#include "dom/dom2_views.h"
24#include "dom/dom_exception.h"
25#include "dom/dom_doc.h"
26#include "xml/dom_elementimpl.h"
27#include "xml/dom2_viewsimpl.h"
28
29using namespace DOM;
30
31
32AbstractView::AbstractView()
33{
34 impl = 0;
35}
36
37
38AbstractView::AbstractView(const AbstractView &other)
39{
40 impl = other.impl;
41 if (impl) impl->ref();
42}
43
44
45AbstractView::AbstractView(AbstractViewImpl *i)
46{
47 impl = i;
48 if (impl) impl->ref();
49}
50
51AbstractView::~AbstractView()
52{
53 if (impl)
54 impl->deref();
55}
56
57AbstractView &AbstractView::operator = (const AbstractView &other)
58{
59 if ( impl != other.impl ) {
60 if(impl) impl->deref();
61 impl = other.impl;
62 if(impl) impl->ref();
63 }
64 return *this;
65}
66
67Document AbstractView::document() const
68{
69 if (!impl)
70 throw DOMException(DOMException::INVALID_STATE_ERR);
71
72 return impl->document();
73}
74
75CSSStyleDeclaration AbstractView::getComputedStyle(const Element &elt, const DOMString &pseudoElt)
76{
77 if (!impl)
78 throw DOMException(DOMException::INVALID_STATE_ERR);
79
80 return impl->getComputedStyle(static_cast<ElementImpl*>(elt.handle()),pseudoElt.implementation());
81}
82
83
84AbstractViewImpl *AbstractView::handle() const
85{
86 return impl;
87}
88
89bool AbstractView::isNull() const
90{
91 return (impl == 0);
92}
93
94
95
DOM::AbstractView
Introduced in DOM Level 2.
Definition: dom2_views.h:41
DOM::AbstractView::isNull
bool isNull() const
Definition: dom2_views.cpp:89
DOM::AbstractView::~AbstractView
virtual ~AbstractView()
Definition: dom2_views.cpp:51
DOM::AbstractView::AbstractView
AbstractView()
Definition: dom2_views.cpp:32
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::AbstractView::impl
AbstractViewImpl * impl
Definition: dom2_views.h:85
DOM::AbstractView::document
Document document() const
The source DocumentView of which this is an AbstractView.
Definition: dom2_views.cpp:67
DOM::AbstractView::handle
AbstractViewImpl * handle() const
Definition: dom2_views.cpp:84
DOM::AbstractView::operator=
AbstractView & operator=(const AbstractView &other)
Definition: dom2_views.cpp:57
DOM::CSSStyleDeclaration
The CSSStyleDeclaration interface represents a single CSS declaration block .
Definition: css_value.h:61
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:59
DOM::DOMException::INVALID_STATE_ERR
@ INVALID_STATE_ERR
Definition: dom_exception.h:83
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::DOMString::implementation
DOMStringImpl * implementation() const
Definition: dom_string.h:147
DOM::Document
The Document interface represents the entire HTML or XML document.
Definition: dom_doc.h:246
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::Node::handle
NodeImpl * handle() const
Definition: dom_node.h:925
dom2_views.h
dom_doc.h
dom_exception.h
DOM
This library provides a full-featured HTML parser and widget.
Definition: design.h:55
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal