14387f4194c7aad942c3febfe840c0bf3fec164f
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 sigc::signal <void> signal_path_pasted;
48 sigc::signal <void> signal_path_changed;
50 private:
51 PathParam(const PathParam&);
52 PathParam& operator=(const PathParam&);
54 Gtk::Widget * _widget;
55 Gtk::Tooltips * _tooltips;
57 void param_write_to_repr(const char * svgd);
59 void on_edit_button_click();
60 void on_paste_button_click();
62 gchar * defvalue;
64 Gtk::Button * edit_button;
65 };
68 } //namespace LivePathEffect
70 } //namespace Inkscape
72 #endif