1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /** @file
3  * TODO: insert short description here
4  *//*
5  * Authors: see git history
6  *
7  * Copyright (C) 2018 Authors
8  * Released under GNU GPL v2+, read the file 'COPYING' for more information.
9  */
10 #ifndef INKSCAPE_SP_TSPAN_H
11 #define INKSCAPE_SP_TSPAN_H
12 
13 /*
14  * tspan and textpath, based on the flowtext routines
15  */
16 
17 #include "sp-item.h"
18 #include "text-tag-attributes.h"
19 
20 #define SP_TSPAN(obj) (dynamic_cast<SPTSpan*>((SPObject*)obj))
21 #define SP_IS_TSPAN(obj) (dynamic_cast<const SPTSpan*>((SPObject*)obj) != NULL)
22 
23 enum {
24     SP_TSPAN_ROLE_UNSPECIFIED,
25     SP_TSPAN_ROLE_PARAGRAPH,
26     SP_TSPAN_ROLE_LINE
27 };
28 
29 class SPTSpan : public SPItem {
30 public:
31 	SPTSpan();
32 	~SPTSpan() override;
33 
34     unsigned int role : 2;
35     TextTagAttributes attributes;
36 
37 	void build(SPDocument* doc, Inkscape::XML::Node* repr) override;
38 	void release() override;
39 	void set(SPAttr key, const char* value) override;
40 	void update(SPCtx* ctx, unsigned int flags) override;
41 	void modified(unsigned int flags) override;
42 	Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags) override;
43 
44 	Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const override;
45         const char* displayName() const override;
46 };
47 
48 #endif /* !INKSCAPE_SP_TSPAN_H */
49 
50 /*
51   Local Variables:
52   mode:c++
53   c-file-style:"stroustrup"
54   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
55   indent-tabs-mode:nil
56   fill-column:99
57   End:
58 */
59 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
60