Code

add copy button to LPE pathparam
[inkscape.git] / src / live_effects / parameter / path.h
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 Inkscape {
24 namespace LivePathEffect {
26 class PathParam : public Geom::Piecewise<Geom::D2<Geom::SBasis> >, public Parameter {
27 public:
28     PathParam ( const Glib::ustring& label,
29                 const Glib::ustring& tip,
30                 const Glib::ustring& key,
31                 Inkscape::UI::Widget::Registry* wr,
32                 Effect* effect,
33                 const gchar * default_value = "M0,0 L1,1");
34     virtual ~PathParam();
36     virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips);
38     bool param_readSVGValue(const gchar * strvalue);
39     gchar * param_writeSVGValue() const;
41     void param_set_default();
43     void param_set_and_write_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis> > newpath);
45     void param_editOncanvas(SPItem * item, SPDesktop * dt);
46     void param_setup_nodepath(Inkscape::NodePath::Path *np);
48     virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/);
50     sigc::signal <void> signal_path_pasted;
51     sigc::signal <void> signal_path_changed;
53 private:
54     PathParam(const PathParam&);
55     PathParam& operator=(const PathParam&);
57     void on_edit_button_click();
58     void on_paste_button_click();
59     void on_copy_button_click();
61     gchar * defvalue;
62 };
65 } //namespace LivePathEffect
67 } //namespace Inkscape
69 #endif