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 SEEN_SP_ITEM_FLOWREGION_H
11 #define SEEN_SP_ITEM_FLOWREGION_H
12 
13 /*
14  */
15 
16 #include "sp-item.h"
17 
18 #define SP_FLOWREGION(obj) (dynamic_cast<SPFlowregion*>((SPObject*)obj))
19 #define SP_IS_FLOWREGION(obj) (dynamic_cast<const SPFlowregion*>((SPObject*)obj) != NULL)
20 
21 #define SP_FLOWREGIONEXCLUDE(obj) (dynamic_cast<SPFlowregionExclude*>((SPObject*)obj))
22 #define SP_IS_FLOWREGIONEXCLUDE(obj) (dynamic_cast<const SPFlowregionExclude*>((SPObject*)obj) != NULL)
23 
24 class Path;
25 class Shape;
26 class flow_dest;
27 
28 class SPFlowregion : public SPItem {
29 public:
30 	SPFlowregion();
31 	~SPFlowregion() override;
32 
33 	std::vector<Shape*>     computed;
34 
35 	void             UpdateComputed();
36 
37 	void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) override;
38 	void remove_child(Inkscape::XML::Node *child) override;
39 	void update(SPCtx *ctx, unsigned int flags) override;
40 	void modified(guint flags) override;
41 	Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override;
42 	const char* displayName() const override;
43 };
44 
45 class SPFlowregionExclude : public SPItem {
46 public:
47 	SPFlowregionExclude();
48 	~SPFlowregionExclude() override;
49 
50 	Shape            *computed;
51 
52 	void             UpdateComputed();
53 
54 	void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref) override;
55 	void remove_child(Inkscape::XML::Node *child) override;
56 	void update(SPCtx *ctx, unsigned int flags) override;
57 	void modified(guint flags) override;
58 	Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override;
59 	const char* displayName() const override;
60 };
61 
62 #endif
63