Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-tag.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SP_TAG_H_SEEN
3#define SP_TAG_H_SEEN
4
16#include "sp-object.h"
17
18/* Skeleton base class */
19
20class SPTag final : public SPObject {
21public:
22 SPTag() = default;
23 ~SPTag() override = default;
24 int tag() const override { return tag_of<decltype(*this)>; }
25
26 void build(SPDocument * doc, Inkscape::XML::Node *repr) override;
27 //virtual void release();
28 void set(SPAttr key, const gchar* value) override;
29 void update(SPCtx * ctx, unsigned flags) override;
30
32
33 bool expanded() const { return _expanded; }
34 void setExpanded(bool isexpanded);
35
36 void moveTo(SPObject *target, gboolean intoafter);
37
38private:
40};
41
42#endif /* !SP_SKELETON_H_SEEN */
43
44/*
45 Local Variables:
46 mode:c++
47 c-file-style:"stroustrup"
48 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
49 indent-tabs-mode:nil
50 fill-column:99
51 End:
52*/
53// 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
Definition sp-tag.h:20
bool expanded() const
Definition sp-tag.h:33
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
Reads the Inkscape::XML::Node, and initializes SPTag variables.
Definition sp-tag.cpp:70
Inkscape::XML::Node * write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags) override
Writes its settings to an incoming repr object, if any.
Definition sp-tag.cpp:121
int tag() const override
Definition sp-tag.h:24
void update(SPCtx *ctx, unsigned flags) override
Receives update notifications.
Definition sp-tag.cpp:106
bool _expanded
Definition sp-tag.h:39
void setExpanded(bool isexpanded)
Definition sp-tag.cpp:96
SPTag()=default
~SPTag() override=default
void moveTo(SPObject *target, gboolean intoafter)
Definition sp-tag.cpp:30
static cairo_user_data_key_t key
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94