• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • khtml
 

khtml

  • khtml
  • dom
dom2_views.cpp
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::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

khtml

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

khtml

Skip menu "khtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for khtml by doxygen 1.8.6
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |