summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/pointparam-knotholder.h
blob: 156bcaf64f7163d076fb809bb068f75cd0ff3b0c (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
#ifndef INKSCAPE_LPE_POINTPARAM_KNOTHOLDER_H
#define INKSCAPE_LPE_POINTPARAM_KNOTHOLDER_H

/*
 * PointParamKnotHolder - Hold SPKnot list and manage signals for LPE PointParam
 *
 * Author:
 *   Johan Engelen <goejendaagh@zonnet.nl>
 *
 * Copyright (C) 2008 Johan Engelen
 *
 * Released under GNU GPL
 *
 */

#include "knotholder.h"
#include <glib/gtypes.h>
#include "knot-enums.h"
#include "forward.h"
#include "libnr/nr-forward.h"
#include <2geom/point.h>
#include "live_effects/lpeobject.h"

namespace Inkscape {
namespace XML {
class Node;
}



typedef void (* PointParamKnotHolderSetFunc) (SPItem *item, NR::Point const &p, NR::Point const &origin, guint state);
typedef NR::Point (* PointParamKnotHolderGetFunc) (SPItem *item);
typedef void (* PointParamKnotHolderClickedFunc) (SPItem *item, guint state);

class PointParamKnotHolder : public SPKnotHolder {
public:
    LivePathEffectObject * lpeobject;
    Inkscape::XML::Node  * repr;
    const gchar          * repr_key;

    void add_knot ( Geom::Point         & p,
                    PointParamKnotHolderClickedFunc knot_click,
                    SPKnotShapeType     shape,
                    SPKnotModeType      mode,
                    guint32             color,
                    const gchar *tip );
};

struct PointParamKnotHolderClass : SPKnotHolderClass {
};

PointParamKnotHolder *pointparam_knot_holder_new(SPDesktop *desktop, SPObject *lpeobject, const gchar * key, SPItem *item);

GType pointparam_knot_holder_get_type();


#define INKSCAPE_TYPE_POINTPARAM_KNOT_HOLDER      (Inkscape::pointparam_knot_holder_get_type())


} // namespace Inkscape


#endif /* INKSCAPE_LPE_POINTPARAM_KNOTHOLDER_H */

/*
  Local Variables:
  mode:c++
  c-file-style:"stroustrup"
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
  indent-tabs-mode:nil
  fill-column:99
  End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :