Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-root.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
5/*
6 * Authors:
7 * Lauris Kaplinski <lauris@kaplinski.com>
8 *
9 * Copyright (C) 1999-2002 Lauris Kaplinski
10 * Copyright (C) 2000-2001 Ximian, Inc.
11 *
12 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
13 */
14
15#ifndef SP_ROOT_H_SEEN
16#define SP_ROOT_H_SEEN
17
18#include "display/drawing-item.h" // for DrawingItem
19#include "sp-dimensions.h" // for SPDimensions
20#include "sp-item-group.h" // for SPGroup
21#include "util/cast.h" // for tag_of
22#include "version.h" // for Version
23#include "viewbox.h" // for SPViewBox
24#include "xml/node.h" // for Node
25
26class SPDefs;
27class SPDocument;
28enum class SPAttr;
29
31class SPRoot final : public SPGroup, public SPViewBox, public SPDimensions {
32public:
33 SPRoot();
34 ~SPRoot() override;
35 int tag() const override { return tag_of<decltype(*this)>; }
36
37 char *onload;
38
46
48 void release() override;
49 void set(SPAttr key, char const* value) override;
50 void update(SPCtx *ctx, unsigned int flags) override;
52
53 void modified(unsigned int flags) override;
56
57 Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) override;
58 void print(SPPrintContext *ctx) override;
59 const char* typeName() const override;
60 const char* displayName() const override;
61
62 // Copy out the x/y coordinates for editing
65
66 // Version information
69private:
70 void unset_x_and_y();
71 void setRootDimensions();
72};
73
74#endif /* !SP_ROOT_H_SEEN */
75
76/*
77 Local Variables:
78 mode:c++
79 c-file-style:"stroustrup"
80 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
81 indent-tabs-mode:nil
82 fill-column:99
83 End:
84*/
85// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
SPAttr
Definition attributes.h:27
Hand-rolled LLVM-style RTTI system for class hierarchies where dynamic_cast isn't fast enough.
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
Definition cast.h:26
SVG drawing item for display.
Interface for refcounted XML nodes.
Definition node.h:80
SVGLength x
Typed SVG document implementation.
Definition document.h:101
Inkscape::XML::Node * repr
Definition sp-object.h:193
SPDocument * document
Definition sp-object.h:188
<svg> element
Definition sp-root.h:31
Inkscape::Version inkscape_version
Definition sp-root.h:68
void build(SPDocument *document, Inkscape::XML::Node *repr) override
Definition sp-root.cpp:63
void release() override
Definition sp-root.cpp:95
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
Definition sp-root.cpp:312
Inkscape::Version svg_version
Definition sp-root.h:67
void setRootDimensions()
Definition sp-root.cpp:221
~SPRoot() override
char * onload
Definition sp-root.h:37
void remove_child(Inkscape::XML::Node *child) override
Definition sp-root.cpp:198
SVGLength root_y
Definition sp-root.h:64
Inkscape::DrawingItem * show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) override
Definition sp-root.cpp:353
void print(SPPrintContext *ctx) override
Definition sp-root.cpp:374
void unset_x_and_y()
Definition sp-root.cpp:57
void child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override
Definition sp-root.cpp:177
void update(SPCtx *ctx, unsigned int flags) override
Definition sp-root.cpp:268
const char * displayName() const override
The item's type name as a translated human string.
Definition sp-root.cpp:387
SVGLength root_x
Definition sp-root.h:63
void modified(unsigned int flags) override
Definition sp-root.cpp:301
const char * typeName() const override
The item's type name, not node tag name.
Definition sp-root.cpp:383
SPDefs * defs
Primary <defs> element where we put new defs (patterns, gradients etc.).
Definition sp-root.h:45
SPRoot()
Definition sp-root.cpp:43
int tag() const override
Definition sp-root.h:35
SVG length type.
Definition svg-length.h:22
Canvas item belonging to an SVG drawing element.
static cairo_user_data_key_t key
Ocnode * child[8]
Definition quantize.cpp:33
Ocnode ** ref
Definition quantize.cpp:32
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94
Interface for XML nodes.