• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 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 
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 
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Mon Jul 15 2013 13:08:43 by doxygen 1.8.3.1 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.10.5 API Reference

Skip menu "kdelibs-4.10.5 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