6ba6e7e4b77417326f4e11aa13ca4317ec00b270
1 #ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_PATH_H
2 #define INKSCAPE_LIVEPATHEFFECT_PARAMETER_PATH_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/path.h>
15 #include "ui/widget/registry.h"
16 #include <gtkmm/tooltips.h>
18 #include "live_effects/parameter/parameter.h"
20 #include <sigc++/sigc++.h>
22 namespace Gtk {
23 class Button;
24 }
26 namespace Inkscape {
28 namespace LivePathEffect {
30 class PathParam : public Geom::Piecewise<Geom::D2<Geom::SBasis> >, public Parameter {
31 public:
32 PathParam ( const Glib::ustring& label,
33 const Glib::ustring& tip,
34 const Glib::ustring& key,
35 Inkscape::UI::Widget::Registry* wr,
36 Effect* effect,
37 const gchar * default_value = "M0,0 L1,1");
38 ~PathParam();
40 Gtk::Widget * param_getWidget();
42 bool param_readSVGValue(const gchar * strvalue);
43 gchar * param_writeSVGValue() const;
45 void param_set_default();
47 void param_editOncanvas(SPItem * item, SPDesktop * dt);
49 sigc::signal <void> signal_path_pasted;
50 sigc::signal <void> signal_path_changed;
52 private:
53 PathParam(const PathParam&);
54 PathParam& operator=(const PathParam&);
56 Gtk::Widget * _widget;
57 Gtk::Tooltips * _tooltips;
59 void param_write_to_repr(const char * svgd);
61 void on_edit_button_click();
62 void on_paste_button_click();
64 gchar * defvalue;
66 Gtk::Button * edit_button;
67 };
70 } //namespace LivePathEffect
72 } //namespace Inkscape
74 #endif