summaryrefslogtreecommitdiffstats
path: root/src/sp-flowregion.h
blob: e9461e82b23411444162de9ae4aca034e62f61c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef __SP_ITEM_FLOWREGION_H__
#define __SP_ITEM_FLOWREGION_H__

/*
 */

#include "sp-item.h"

#define SP_TYPE_FLOWREGION            (sp_flowregion_get_type ())
#define SP_FLOWREGION(obj) ((SPFlowregion*)obj)
#define SP_IS_FLOWREGION(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPFlowregion)))

#define SP_TYPE_FLOWREGIONEXCLUDE            (sp_flowregionexclude_get_type ())
#define SP_FLOWREGIONEXCLUDE(obj) ((SPFlowregionExclude*)obj)
#define SP_IS_FLOWREGIONEXCLUDE(obj) (obj != NULL && static_cast<const SPObject*>(obj)->typeHierarchy.count(typeid(SPFlowregionExclude)))

class Path;
class Shape;
class flow_dest;
class FloatLigne;
class CFlowregion;
class CFlowregionExclude;

class SPFlowregion : public SPItem {
public:
	CFlowregion* cflowregion;

	std::vector<Shape*>     computed;
	
	void             UpdateComputed(void);
};

struct SPFlowregionClass {
	SPItemClass parent_class;
};

class CFlowregion : public CItem {
public:
	CFlowregion(SPFlowregion* flowregion);
	virtual ~CFlowregion();

	virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
	virtual void remove_child(Inkscape::XML::Node *child);
	virtual void update(SPCtx *ctx, unsigned int flags);
	virtual void modified(guint flags);
	virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
	virtual gchar *description();

protected:
	SPFlowregion* spflowregion;
};

GType sp_flowregion_get_type (void);

class SPFlowregionExclude : public SPItem {
public:
	CFlowregionExclude* cflowregionexclude;

	Shape            *computed;
	
	void             UpdateComputed(void);
};

struct SPFlowregionExcludeClass {
	SPItemClass parent_class;
};

class CFlowregionExclude : public CItem {
public:
	CFlowregionExclude(SPFlowregionExclude* flowregionexclude);
	virtual ~CFlowregionExclude();

	virtual void child_added(Inkscape::XML::Node* child, Inkscape::XML::Node* ref);
	virtual void remove_child(Inkscape::XML::Node *child);
	virtual void update(SPCtx *ctx, unsigned int flags);
	virtual void modified(guint flags);
	virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags);
	virtual gchar *description();

protected:
	SPFlowregionExclude* spflowregionexclude;
};

GType sp_flowregionexclude_get_type (void);

#endif