15#include <glibmm/i18n.h>
17#include <gtkmm/button.h>
28namespace LivePathEffect {
32 Effect* effect,
const Glib::ustring default_value )
34 , value(default_value)
35 , defvalue(default_value)
53 defvalue = (Glib::ustring)default_value;
73 const double t,
const double length,
bool )
78 double t_reparam = pwd2_reparam.
cuts.back() * t;
121 Glib::ustring str(rsu->
getText());
129 auto const rsu = Gtk::make_managed<UI::Widget::RegisteredText>(
132 rsu->setProgrammatically =
false;
133 rsu->set_undo_parameters(_(
"Change text parameter"), INKSCAPE_ICON(
"dialog-path-effects"));
134 auto const text_container = Gtk::make_managed<Gtk::Box>();
135 auto const set = Gtk::make_managed<Gtk::Button>(Glib::ustring(
"✔"));
136 set->signal_clicked()
140 text_container->set_halign(Gtk::Align::END);
141 return text_container;
146 if (
value != newvalue) {
149 value = std::move(newvalue);
Adaptor that creates 2D functions from 1D ones.
Function defined as discrete pieces.
output_type valueAt(double t) const
std::vector< double > cuts
Two-dimensional point that doubles as a vector.
Inkscape::XML::Node * getRepr()
Inkscape::UI::Widget::Registry * param_wr
Glib::ustring param_tooltip
Glib::ustring param_label
void param_hide_canvas_text()
TextParam(const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect, const Glib::ustring default_value="")
Gtk::Widget * param_newWidget() override
void setPosAndAnchor(const Geom::Piecewise< Geom::D2< Geom::SBasis > > &pwd2, const double t, const double length, bool use_curvature=false)
void param_setValue(Glib::ustring newvalue)
CanvasItemPtr< CanvasItemText > canvas_text
Glib::ustring param_getDefaultSVGValue() const override
void param_set_default() override
bool param_readSVGValue(const gchar *strvalue) override
void param_update_default(const gchar *default_value) override
Glib::ustring param_getSVGValue() const override
void setTextParam(Inkscape::UI::Widget::RegisteredText *rsu)
void setAnchor(double x_value, double y_value)
void setPos(Geom::Point pos)
Glib::ustring const getText() const
Get the text in the entry.
To do: update description of desktop.
Inkscape::CanvasItemGroup * getCanvasTemp() const
Macro for icon names used in Inkscape.
Various utility functions.
Coord length(LineSegment const &seg)
double angle_between(Line const &l1, Line const &l2)
Bezier derivative(Bezier const &a)
Piecewise< D2< SBasis > > arc_length_parametrization(D2< SBasis > const &M, unsigned order=3, double tol=.01)
Point unit_vector(Point const &a)
D2< T > rot90(D2< T > const &a)
void pack_start(Gtk::Box &box, Gtk::Widget &child, bool const expand, bool const fill, unsigned const padding)
Adds child to box, packed with reference to the start of box.
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key
Helpers for using Gtk::Boxes, encapsulating large changes between GTK3 & GTK4.
two-dimensional geometric operators.