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.h"
15 namespace Inkscape {
16 namespace XML {
17 class Node;
18 class Document;
19 }
20 }
22 #define TYPE_LIVEPATHEFFECT (LivePathEffectObject::livepatheffect_get_type())
23 #define LIVEPATHEFFECT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), TYPE_LIVEPATHEFFECT, LivePathEffectObject))
24 #define IS_LIVEPATHEFFECT(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), TYPE_LIVEPATHEFFECT))
26 /// The LivePathEffect vtable.
27 struct LivePathEffectObjectClass {
28 SPObjectClass parent_class;
29 };
31 class LivePathEffectObject : public SPObject {
32 public:
33 Inkscape::LivePathEffect::EffectType effecttype;
35 bool effecttype_set;
37 LivePathEffectObject * fork_private_if_necessary(unsigned int nr_of_allowed_users = 1);
39 /* Note that the returned pointer can be NULL in a valid LivePathEffectObject contained in a valid list of lpeobjects in an lpeitem!
40 * So one should always check whether the returned value is NULL or not */
41 Inkscape::LivePathEffect::Effect * get_lpe() { return lpe; };
43 private:
44 Inkscape::LivePathEffect::Effect *lpe; // this can be NULL in a valid LivePathEffectObject
46 /* C-style class functions: */
47 public:
48 static GType livepatheffect_get_type();
49 private:
50 static void livepatheffect_class_init(LivePathEffectObjectClass *klass);
51 static void livepatheffect_init(LivePathEffectObject *stop);
52 static void livepatheffect_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
53 static void livepatheffect_release(SPObject *object);
54 static void livepatheffect_set(SPObject *object, unsigned key, gchar const *value);
55 static Inkscape::XML::Node *livepatheffect_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
56 };
59 #endif
61 /*
62 Local Variables:
63 mode:c++
64 c-file-style:"stroustrup"
65 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
66 indent-tabs-mode:nil
67 fill-column:99
68 End:
69 */
70 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :