path.h revision c0cd5511d3b975ebe07d019c1f5528108725e438
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#ifndef INKSCAPE_LIVEPATHEFFECT_PARAMETER_PATH_H
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#define INKSCAPE_LIVEPATHEFFECT_PARAMETER_PATH_H
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm/*
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm * Inkscape::LivePathEffectParameters
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm *
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm *
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm * Released under GNU GPL, read the file 'COPYING' for more information
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm */
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#include <glib/gtypes.h>
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#include <2geom/path.h>
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#include "ui/widget/registry.h"
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#include <gtkmm/tooltips.h>
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#include "live_effects/parameter/parameter.h"
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#include <sigc++/sigc++.h>
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
0fc5ce7045233dae7e15fdc86774370f1b1d73cbjohanengelennamespace Gtk {
0fc5ce7045233dae7e15fdc86774370f1b1d73cbjohanengelen class Button;
0fc5ce7045233dae7e15fdc86774370f1b1d73cbjohanengelen}
0fc5ce7045233dae7e15fdc86774370f1b1d73cbjohanengelen
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmnamespace Inkscape {
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmnamespace LivePathEffect {
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmclass PathParam : public Geom::Piecewise<Geom::D2<Geom::SBasis> >, public Parameter {
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmpublic:
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm PathParam ( const Glib::ustring& label,
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm const Glib::ustring& tip,
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm const Glib::ustring& key,
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm Inkscape::UI::Widget::Registry* wr,
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm Effect* effect,
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm const gchar * default_value = "M0,0 L1,1");
62d835b4bbb0f1f046e30d9b67f8e9517cc6175cjohanengelen virtual ~PathParam();
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
c0cd5511d3b975ebe07d019c1f5528108725e438johanengelen virtual Gtk::Widget * param_newWidget(Gtk::Tooltips * tooltips);
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm bool param_readSVGValue(const gchar * strvalue);
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm gchar * param_writeSVGValue() const;
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm void param_set_default();
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
42e99769805c14a5cc01c805faa3c3b03f9dd1c0johanengelen void param_set_and_write_new_value (Geom::Piecewise<Geom::D2<Geom::SBasis> > newpath);
42e99769805c14a5cc01c805faa3c3b03f9dd1c0johanengelen
fb5a72174252e0e79107dcad3bf5a2bbd73e349cjohanengelen void param_editOncanvas(SPItem * item, SPDesktop * dt);
a797dcb8e284cab19f60b3eff93a53a62abda263johanengelen void param_setup_nodepath(Inkscape::NodePath::Path *np);
fb5a72174252e0e79107dcad3bf5a2bbd73e349cjohanengelen
0903335a0099bd7ee779925f43a15a2216a0e863johanengelen virtual void param_transform_multiply(Geom::Matrix const& /*postmul*/, bool /*set*/);
bdd7add6c064afee52d2eabeaa18f745430e5a4djohanengelen
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm sigc::signal <void> signal_path_pasted;
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm sigc::signal <void> signal_path_changed;
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmprivate:
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm PathParam(const PathParam&);
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm PathParam& operator=(const PathParam&);
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm void on_edit_button_click();
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm void on_paste_button_click();
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm gchar * defvalue;
0fc5ce7045233dae7e15fdc86774370f1b1d73cbjohanengelen
0fc5ce7045233dae7e15fdc86774370f1b1d73cbjohanengelen Gtk::Button * edit_button;
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm};
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm} //namespace LivePathEffect
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm} //namespace Inkscape
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm#endif