Code

RegisteredWidget has been renamed to RegisteredWdg. This is a deprecated class, all...
[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 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     virtual ~PathParam();
40     virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips);
42     bool param_readSVGValue(const gchar * strvalue);
43     gchar * param_writeSVGValue() const;
45     void param_set_default();
47     void param_set_and_write_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis> > newpath);
49     void param_editOncanvas(SPItem * item, SPDesktop * dt);
50     void param_setup_nodepath(Inkscape::NodePath::Path *np);
52     virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/);
54     sigc::signal <void> signal_path_pasted;
55     sigc::signal <void> signal_path_changed;
57 private:
58     PathParam(const PathParam&);
59     PathParam& operator=(const PathParam&);
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