1
#ifndef SEEN_SP_TREF_REFERENCE_H
2
#define SEEN_SP_TREF_REFERENCE_H
5
* The reference corresponding to href of <tref> element.
7
* This file was created based on sp-use-reference.h
9
* Copyright (C) 2007 Gail Banaszkiewicz
11
* Released under GNU GPL, read the file 'COPYING' for more information.
15
#include <uri-references.h>
16
#include <sigc++/sigc++.h>
18
#include "util/share.h"
19
#include "xml/node-observer.h"
20
#include "xml/subtree.h"
23
class SPTRefReference : public Inkscape::URIReference,
24
public Inkscape::XML::NodeObserver {
26
SPTRefReference(SPObject *owner) : URIReference(owner), subtreeObserved(NULL) {
30
virtual ~SPTRefReference() {
31
if (subtreeObserved) {
32
subtreeObserved->removeObserver(*this);
33
delete subtreeObserved;
37
SPItem *getObject() const {
38
return (SPItem *)URIReference::getObject();
41
void updateObserver();
43
/////////////////////////////////////////////////////////////////////
44
// Node Observer Functions
45
// -----------------------
46
virtual void notifyChildAdded(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev);
47
virtual void notifyChildRemoved(Inkscape::XML::Node &node, Inkscape::XML::Node &child, Inkscape::XML::Node *prev);
48
virtual void notifyChildOrderChanged(Inkscape::XML::Node &node, Inkscape::XML::Node &child,
49
Inkscape::XML::Node *old_prev, Inkscape::XML::Node *new_prev);
50
virtual void notifyContentChanged(Inkscape::XML::Node &node,
51
Inkscape::Util::ptr_shared<char> old_content,
52
Inkscape::Util::ptr_shared<char> new_content);
53
virtual void notifyAttributeChanged(Inkscape::XML::Node &node, GQuark name,
54
Inkscape::Util::ptr_shared<char> old_value,
55
Inkscape::Util::ptr_shared<char> new_value);
56
/////////////////////////////////////////////////////////////////////
59
virtual bool _acceptObject(SPObject * obj) const;
61
Inkscape::XML::Subtree *subtreeObserved;
64
#endif /* !SEEN_SP_TREF_REFERENCE_H */
69
c-file-style:"stroustrup"
70
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
75
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :