12#include <glibmm/i18n.h>
28#define noLPEREALPARAM_DEBUG
34 : param_key(
std::move(
key))
37 , oncanvas_editable(false)
38 , widget_is_visible(true)
39 , widget_is_enabled(true)
40 , param_tooltip(
std::move(tip))
41 , param_effect(effect)
95 std::vector<Geom::PathVector> cs;
100 for (
auto iter : satellites) {
101 auto satelliteitem = cast<SPItem>(iter);
103 bbox.
unionWith(lpeitems[0]->documentVisualBounds());
113 for (
auto &p2 : cs) {
120 tmpitem->set_stroke(0x0000ff9a);
158 if (lpeitems.size() == 1){
170 for (
auto iter : satellites) {
174 auto rootsatellites = cast<SPItem>(iter)->rootsatellites;
176 Glib::ustring itemid = Glib::ustring(lpeitems[0]->getId());
177 std::pair<Glib::ustring, Glib::ustring> rootsatellite = std::make_pair(itemid, lpeid);
178 if (! (std::find(rootsatellites.begin(), rootsatellites.end(), rootsatellite) != rootsatellites.end()) ) {
179 cast<SPItem>(iter)->rootsatellites.push_back(rootsatellite);
199 std::vector<SPObject *> objs;
208 double const default_value)
210 , value(default_value)
214 , defvalue(default_value)
220 , _no_leading_zeros(false)
267 bool transform_stroke = prefs ? prefs->
getBool(
"/options/transform/stroke",
true) :
true;
268 if (transform_stroke ||
set) {
326 auto const rsu = Gtk::make_managed<UI::Widget::RegisteredScalar>(
328 rsu->setValue(
value);
332 rsu->setProgrammatically =
false;
334 rsu->setNoLeadingZeros();
343 rsu->set_undo_parameters(_(
"Change scalar parameter"), INKSCAPE_ICON(
"dialog-path-effects"));
3x3 matrix representing an affine transformation.
Coord descrim() const
Calculate the descriminant.
void unionWith(CRect const &b)
Enlarge the rectangle to contain the argument.
Axis-aligned rectangle that can be empty.
void push_back(Path const &path)
Append a path at the end.
Sequence of contiguous curves, aka spline.
RAII-style mechanism for creating a temporary undo-insensitive context.
Inkscape::XML::Node * getRepr()
bool isOnClipboard()
The lpe is on clipboard.
std::vector< SPLPEItem * > getCurrrentLPEItems() const
EffectType effectType() const
LivePathEffectObject * getLPEObj()
bool helperLineSatellites
virtual bool param_readSVGValue(char const *strvalue)=0
EffectType effectType() const
Inkscape::Display::TemporaryItem * ownerlocator
Parameter(Glib::ustring label, Glib::ustring tip, Glib::ustring key, Inkscape::UI::Widget::Registry *wr, Effect *effect)
Inkscape::UI::Widget::Registry * param_wr
virtual ParamType paramType() const =0
Glib::ustring param_tooltip
sigc::scoped_connection selection_changed_connection
void connect_selection_changed()
void param_write_to_repr(const char *svgd)
virtual std::vector< SPObject * > param_get_satellites()
void change_selection(Inkscape::Selection *selection)
Glib::ustring param_label
virtual Glib::ustring param_getSVGValue() const =0
void param_higlight(bool highlight)
void param_set_digits(unsigned digits)
void param_transform_multiply(Geom::Affine const &postmul, bool set) override
void param_set_range(double min, double max)
void param_set_undo(bool set_undo)
bool param_readSVGValue(char const *strvalue) override
void param_set_increments(double step, double page)
void param_set_no_leading_zeros()
void param_set_default() override
void param_update_default(double default_value)
Glib::ustring param_getDefaultSVGValue() const override
void param_set_width_chars(int width_chars)
Gtk::Widget * param_newWidget() override
void param_make_integer(bool yes=true)
void param_set_value(double val)
ScalarParam(const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect, double default_value=1.0)
Glib::ustring param_getSVGValue() const override
SPItem * singleItem()
Returns a single selected item.
Preference storage class.
bool getBool(Glib::ustring const &pref_path, bool def=false)
Retrieve a Boolean value.
static Preferences * get()
Access the singleton Preferences object.
The set of selected SPObjects for a given document and layer model.
bool includes(XML::Node *repr, bool anyAncestor=false)
Returns true if the given item is selected.
sigc::connection connectChangedFirst(sigc::slot< void(Selection *)> slot)
Similar to connectChanged, but will be run first.
void setAttribute(Util::const_char_ptr key, Util::const_char_ptr value)
Change an attribute of this node.
virtual char const * attribute(char const *key) const =0
Get the string representation of a node's attribute.
Wrapper around a Geom::PathVector object.
To do: update description of desktop.
SPDocument * getDocument() const
Inkscape::Display::TemporaryItem * add_temporary_canvasitem(Inkscape::CanvasItem *item, int lifetime_msecs, bool move_to_bottom=true)
One should not keep a reference to the SPCanvasItem, the temporary item code will delete the object f...
Inkscape::CanvasItemGroup * getCanvasTemp() const
Geom::Affine const & dt2doc() const
Inkscape::Selection * getSelection() const
void remove_temporary_canvasitem(Inkscape::Display::TemporaryItem *tempitem)
It is perfectly safe to call this function while the object has already been deleted due to a timeout...
char const * getId() const
Returns the objects current ID string.
Macro for icon names used in Inkscape.
constexpr double SCALARPARAM_G_MAXDOUBLE
MultiDegree< n > max(MultiDegree< n > const &p, MultiDegree< n > const &q)
Returns the maximal degree appearing in the two arguments for each variables.
Piecewise< SBasis > min(SBasis const &f, SBasis const &g)
Return the more negative of the two functions pointwise.
static cairo_user_data_key_t key
Singleton class to access the preferences file in a convenient way.
Base class for live path effect items.
unsigned int sp_svg_number_read_d(gchar const *str, double *val)
TODO: insert short description here.