Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-flowregion.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
/*
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 SEEN_SP_ITEM_FLOWREGION_H
11#define SEEN_SP_ITEM_FLOWREGION_H
12
13#include "livarot/Shape.h"
14#include "sp-item.h"
15
16class SPFlowregion final : public SPItem
17{
18public:
19 SPFlowregion() = default;
20 ~SPFlowregion() override = default;
21 int tag() const override { return tag_of<decltype(*this)>; }
22
23 std::vector<std::unique_ptr<Shape>> computed;
24
25 void updateComputed();
26
29 void update(SPCtx *ctx, unsigned int flags) override;
30 void modified(guint flags) override;
32 unsigned int flags) override;
33 const char *typeName() const override;
34 const char *displayName() const override;
35};
36
37class SPFlowregionExclude final : public SPItem
38{
39public:
41 ~SPFlowregionExclude() override = default;
42 int tag() const override { return tag_of<decltype(*this)>; }
43
46 void update(SPCtx *ctx, unsigned int flags) override;
47 void modified(guint flags) override;
49 unsigned int flags) override;
50 const char *typeName() const override;
51 const char *displayName() const override;
52 Shape *getComputed() { return _computed.get(); }
53
54private:
55 std::unique_ptr<Shape> _computed;
56 void _updateComputed();
57};
58
59#endif
TODO: insert short description here.
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
std::unique_ptr< Shape > _computed
const char * typeName() const override
The item's type name, not node tag name.
const char * displayName() const override
The item's type name as a translated human string.
void remove_child(Inkscape::XML::Node *child) override
int tag() const override
~SPFlowregionExclude() override=default
void child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
SPFlowregionExclude()=default
void update(SPCtx *ctx, unsigned int flags) override
void modified(guint flags) override
void modified(guint flags) override
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
std::vector< std::unique_ptr< Shape > > computed
~SPFlowregion() override=default
SPFlowregion()=default
void updateComputed()
const char * typeName() const override
The item's type name, not node tag name.
const char * displayName() const override
The item's type name as a translated human string.
void remove_child(Inkscape::XML::Node *child) override
void child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override
int tag() const override
void update(SPCtx *ctx, unsigned int flags) override
Base class for visual SVG elements.
Definition sp-item.h:109
Inkscape::XML::Node * repr
Definition sp-object.h:193
A class to store/manipulate directed graphs.
Definition Shape.h:65
Ocnode * child[8]
Definition quantize.cpp:33
Ocnode ** ref
Definition quantize.cpp:32
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94