1 #ifndef INKSCAPE_LIVEPATHEFFECT_OBJECT_H
2 #define INKSCAPE_LIVEPATHEFFECT_OBJECT_H
4 /*
5 * Inkscape::LivePathEffect
6 *
7 * Copyright (C) Johan Engelen 2007-2008 <j.b.c.engelen@utwente.nl>
8 *
9 * Released under GNU GPL, read the file 'COPYING' for more information
10 */
12 #include "sp-object.h"
13 #include "effect-enum.h"
15 namespace Inkscape {
16 namespace XML {
17 class Node;
18 class Document;
19 }
20 namespace LivePathEffect {
21 class Effect;
22 }
23 }
25 #define TYPE_LIVEPATHEFFECT (LivePathEffectObject::livepatheffect_get_type())
26 #define LIVEPATHEFFECT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), TYPE_LIVEPATHEFFECT, LivePathEffectObject))
27 #define IS_LIVEPATHEFFECT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), TYPE_LIVEPATHEFFECT))
29 /// The LivePathEffect vtable.
30 struct LivePathEffectObjectClass {
31 SPObjectClass parent_class;
32 };
34 class LivePathEffectObject : public SPObject {
35 public:
36 Inkscape::LivePathEffect::EffectType effecttype;
38 bool effecttype_set;
40 LivePathEffectObject * fork_private_if_necessary(unsigned int nr_of_allowed_users = 1);
42 /* Note that the returned pointer can be NULL in a valid LivePathEffectObject contained in a valid list of lpeobjects in an lpeitem!
43 * So one should always check whether the returned value is NULL or not */
44 Inkscape::LivePathEffect::Effect * get_lpe() { return lpe; };
46 private:
47 Inkscape::LivePathEffect::Effect *lpe; // this can be NULL in a valid LivePathEffectObject
49 /* C-style class functions: */
50 public:
51 static GType livepatheffect_get_type();
52 private:
53 static void livepatheffect_class_init(LivePathEffectObjectClass *klass);
54 static void livepatheffect_init(LivePathEffectObject *stop);
55 static void livepatheffect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
56 static void livepatheffect_release(SPObject *object);
57 static void livepatheffect_set(SPObject *object, unsigned key, gchar const *value);
58 static Inkscape::XML::Node *livepatheffect_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
59 };
62 #endif
64 /*
65 Local Variables:
66 mode:c++
67 c-file-style:"stroustrup"
68 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
69 indent-tabs-mode:nil
70 fill-column:99
71 End:
72 */
73 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :