point.cpp revision cbff03643467232537259e0f72dd6c196f9cffa5
e781423d621c888bfbcfab74512d797385606aa1dvlierop * Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
e781423d621c888bfbcfab74512d797385606aa1dvlierop * Released under GNU GPL, read the file 'COPYING' for more information
71c8857afc501c5e737bce6022fd9ac810d94c05dvlierop// needed for on-canvas editting:
e781423d621c888bfbcfab74512d797385606aa1dvlieropPointParam::PointParam( const Glib::ustring& label, const Glib::ustring& tip,
e781423d621c888bfbcfab74512d797385606aa1dvlierop const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr,
e781423d621c888bfbcfab74512d797385606aa1dvlierop Effect* effect, const gchar *htip, Geom::Point default_value)
4c8b4484d62b2a47d96b62a8dff90e2b9124edcaDiederik van LieropPointParam::param_set_and_write_default()
e781423d621c888bfbcfab74512d797385606aa1dvlieropPointParam::param_update_default(Geom::Point newpoint)
e781423d621c888bfbcfab74512d797385606aa1dvlieropPointParam::param_readSVGValue(const gchar * strvalue)
e781423d621c888bfbcfab74512d797385606aa1dvlierop unsigned int success = sp_svg_number_read_d(strarray[0], &newx);
e781423d621c888bfbcfab74512d797385606aa1dvlierop success += sp_svg_number_read_d(strarray[1], &newy);
e781423d621c888bfbcfab74512d797385606aa1dvlierop return true;
5b4319e0715220ba39530755e9d971cbf7fee47fDiederik van Lierop os << *dynamic_cast<Geom::Point const *>( this );
5b4319e0715220ba39530755e9d971cbf7fee47fDiederik van Lierop gchar * str = g_strdup(os.str().c_str());
71c8857afc501c5e737bce6022fd9ac810d94c05dvlierop Inkscape::UI::Widget::RegisteredTransformedPoint * pointwdg = Gtk::manage(
71c8857afc501c5e737bce6022fd9ac810d94c05dvlierop new Inkscape::UI::Widget::RegisteredTransformedPoint( param_label,
11614aeee42f0b626bd7e3f929d9119c59f7c3bddvlierop // TODO: fix to get correct desktop (don't use SP_ACTIVE_DESKTOP)
e781423d621c888bfbcfab74512d797385606aa1dvlierop pointwdg->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change point parameter"));
e781423d621c888bfbcfab74512d797385606aa1dvlierop static_cast<Gtk::HBox*>(hbox)->pack_start(*pointwdg, true, true);
71c8857afc501c5e737bce6022fd9ac810d94c05dvlierop static_cast<Gtk::HBox*>(hbox)->show_all_children();
cd8e8082c747cc529d5bf595b4102e88224a1811Krzysztof Kosiński return dynamic_cast<Gtk::Widget *> (hbox);
e781423d621c888bfbcfab74512d797385606aa1dvlieropPointParam::param_set_and_write_new_value(Geom::Point newpoint)
e781423d621c888bfbcfab74512d797385606aa1dvlieropPointParam::param_transform_multiply(Geom::Affine const& postmul, bool /*set*/)
71c8857afc501c5e737bce6022fd9ac810d94c05dvlierop param_set_and_write_new_value( (*this) * postmul );
4c8b4484d62b2a47d96b62a8dff90e2b9124edcaDiederik van LieropPointParam::set_oncanvas_looks(SPKnotShapeType shape, SPKnotModeType mode, guint32 color)
4c8b4484d62b2a47d96b62a8dff90e2b9124edcaDiederik van Lieropclass PointParamKnotHolderEntity : public KnotHolderEntity {
4c8b4484d62b2a47d96b62a8dff90e2b9124edcaDiederik van Lierop PointParamKnotHolderEntity(PointParam *p) { this->pparam = p; }
4c8b4484d62b2a47d96b62a8dff90e2b9124edcaDiederik van Lierop virtual ~PointParamKnotHolderEntity() {}
4c8b4484d62b2a47d96b62a8dff90e2b9124edcaDiederik van Lierop virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
e781423d621c888bfbcfab74512d797385606aa1dvlieropPointParamKnotHolderEntity::knot_set(Geom::Point const &p, Geom::Point const &origin, guint state)
return *pparam;
e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN, handleTip(), knot_shape, knot_mode, knot_color);