1 // SPDX-License-Identifier: GPL-2.0-or-later
2 #ifndef SEEN_PERSP3D_REFERENCE_H
3 #define SEEN_PERSP3D_REFERENCE_H
4 
5 /*
6  * The reference corresponding to the inkscape:perspectiveID attribute
7  *
8  * Copyright (C) 2007 Johan Engelen
9  * Copyright (C) 2007 Maximilian Albert
10  *
11  * Released under GNU GPL v2+, read the file 'COPYING' for more information.
12  */
13 
14 #include <cstddef>
15 #include <sigc++/sigc++.h>
16 
17 #include "uri-references.h"
18 #include "persp3d.h"
19 
20 class SPObject;
21 
22 namespace Inkscape {
23 namespace XML {
24 class Node;
25 }
26 }
27 
28 class Persp3DReference : public Inkscape::URIReference {
29 public:
30     Persp3DReference(SPObject *obj);
31     ~Persp3DReference() override;
32 
getObject()33     Persp3D *getObject() const {
34         return SP_PERSP3D(URIReference::getObject());
35     }
36 
37     SPObject *owner;
38 
39     // concerning the Persp3D (we only use SPBox3D) that is referred to:
40     char *persp_href;
41     Inkscape::XML::Node *persp_repr;
42     Persp3D *persp;
43 
44     sigc::connection _changed_connection;
45     sigc::connection _modified_connection;
46     sigc::connection _delete_connection;
47 
48     void link(char* to);
49     void unlink();
50     void start_listening(Persp3D* to);
51     void quit_listening();
52 
53 protected:
54     bool _acceptObject(SPObject *obj) const override;
55 };
56 
57 
58 #endif /* !SEEN_PERSP3D_REFERENCE_H */
59 
60 /*
61   Local Variables:
62   mode:c++
63   c-file-style:"stroustrup"
64   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
65   indent-tabs-mode:nil
66   fill-column:99
67   End:
68 */
69 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
70