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

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • 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 
29 using namespace DOM;
30 
31 
32 AbstractView::AbstractView()
33 {
34  impl = 0;
35 }
36 
37 
38 AbstractView::AbstractView(const AbstractView &other)
39 {
40  impl = other.impl;
41  if (impl) impl->ref();
42 }
43 
44 
45 AbstractView::AbstractView(AbstractViewImpl *i)
46 {
47  impl = i;
48  if (impl) impl->ref();
49 }
50 
51 AbstractView::~AbstractView()
52 {
53  if (impl)
54  impl->deref();
55 }
56 
57 AbstractView &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 
67 Document AbstractView::document() const
68 {
69  if (!impl)
70  throw DOMException(DOMException::INVALID_STATE_ERR);
71 
72  return impl->document();
73 }
74 
75 CSSStyleDeclaration 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 
84 AbstractViewImpl *AbstractView::handle() const
85 {
86  return impl;
87 }
88 
89 bool AbstractView::isNull() const
90 {
91  return (impl == 0);
92 }
93 
94 
95 
dom_doc.h
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:58
DOM::Element
By far the vast majority of objects (apart from text) that authors encounter when traversing a docume...
Definition: dom_element.h:209
DOM::AbstractView::~AbstractView
virtual ~AbstractView()
Definition: dom2_views.cpp:51
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_exception.h
DOM::AbstractView::document
Document document() const
The source DocumentView of which this is an AbstractView.
Definition: dom2_views.cpp:67
dom2_views.h
DOM::AbstractView::impl
AbstractViewImpl * impl
Definition: dom2_views.h:85
DOM::AbstractView::isNull
bool isNull() const
Definition: dom2_views.cpp:89
DOM::DOMString::implementation
DOMStringImpl * implementation() const
Definition: dom_string.h:131
DOM::AbstractView::operator=
AbstractView & operator=(const AbstractView &other)
Definition: dom2_views.cpp:57
DOM::AbstractView::handle
AbstractViewImpl * handle() const
Definition: dom2_views.cpp:84
DOM::DOMException::INVALID_STATE_ERR
Definition: dom_exception.h:83
DOM::Node::handle
NodeImpl * handle() const
Definition: dom_node.h:925
DOM::AbstractView::AbstractView
AbstractView()
Definition: dom2_views.cpp:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:20 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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