Code

688a50d4abe9d53d5e835498dae5f72328f1e3e0
[inkscape.git] / src / live_effects / parameter / point.h
1 #ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_POINT_H
2 #define INKSCAPE_LIVEPATHEFFECT_PARAMETER_POINT_H
4 /*
5  * Inkscape::LivePathEffectParameters
6  *
7 * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
8  *
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
12 #include <glib/gtypes.h>
13 #include <2geom/point.h>
15 #include "ui/widget/registry.h"
16 #include "ui/widget/registered-widget.h"
17 #include <gtkmm/tooltips.h>
19 #include "live_effects/parameter/parameter.h"
21 struct SPKnot;
23 namespace Inkscape {
25 namespace LivePathEffect {
28 class PointParam : public Geom::Point, public Parameter {
29 public:
30     PointParam( const Glib::ustring& label,
31                 const Glib::ustring& tip,
32                 const Glib::ustring& key,
33                 Inkscape::UI::Widget::Registry* wr,
34                 Effect* effect,
35                 Geom::Point default_value = Geom::Point(0,0));
36     virtual ~PointParam();
38     Gtk::Widget * param_getWidget();
40     bool param_readSVGValue(const gchar * strvalue);
41     gchar * param_writeSVGValue() const;
43     void param_setValue(Geom::Point newpoint);
44     void param_set_default();
46     void param_set_and_write_new_value(Geom::Point newpoint);
48     virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/);
50 private:
51     PointParam(const PointParam&);
52     PointParam& operator=(const PointParam&);
54     Gtk::Widget * _widget;
55     Gtk::Tooltips * _tooltips;
56     Inkscape::UI::Widget::RegisteredPoint * pointwdg;
57     void on_button_click();
59     SPKnot *knot;
61     Geom::Point defvalue;
62 };
65 } //namespace LivePathEffect
67 } //namespace Inkscape
69 #endif