Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-script.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_SP_SCRIPT_H
3#define SEEN_SP_SCRIPT_H
4
5/*
6 * SVG <script> implementation
7 *
8 * Author:
9 * Felipe C. da S. Sanches <juca@members.fsf.org>
10 * Jon A. Cruz <jon@joncruz.org>
11 *
12 * Copyright (C) 2008 Author
13 *
14 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
15 */
16
17#include "sp-object.h"
18#include "document.h"
19
20/* SPScript */
21class SPScript final : public SPObject {
22public:
23 SPScript();
24 ~SPScript() override;
25 int tag() const override { return tag_of<decltype(*this)>; }
26
27 char *xlinkhref;
28
29protected:
30 void build(SPDocument* doc, Inkscape::XML::Node* repr) override;
31 void release() override;
32 void set(SPAttr key, char const* value) override;
33 void update(SPCtx* ctx, unsigned int flags) override;
34 void modified(unsigned int flags) override;
35 Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags) override;
36};
37
38#endif
39
40/*
41 Local Variables:
42 mode:c++
43 c-file-style:"stroustrup"
44 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
45 indent-tabs-mode:nil
46 fill-column:99
47 End:
48*/
49// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
SPAttr
Definition attributes.h:27
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
Definition cast.h:26
Interface for refcounted XML nodes.
Definition node.h:80
Typed SVG document implementation.
Definition document.h:101
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
Inkscape::XML::Node * repr
Definition sp-object.h:193
int tag() const override
Definition sp-script.h:25
~SPScript() override
Inkscape::XML::Node * write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags) override
Definition sp-script.cpp:72
void release() override
Reads the Inkscape::XML::Node, and initializes SPScript variables.
Definition sp-script.cpp:39
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
Definition sp-script.cpp:24
char * xlinkhref
Definition sp-script.h:27
void update(SPCtx *ctx, unsigned int flags) override
Definition sp-script.cpp:48
void modified(unsigned int flags) override
Definition sp-script.cpp:52
static cairo_user_data_key_t key
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94