11#include <glibmm/i18n.h>
13#include <gtkmm/button.h>
14#include <gtkmm/image.h>
15#include <gtkmm/label.h>
29namespace LivePathEffect {
44 std::vector<SPObject *> objs;
52 objs.push_back(linked_obj);
59 if (strvalue && strvalue[0] ==
'#' &&
lperef->getObject() && std::strcmp(strvalue + 1,
lperef->getObject()->getId()) == 0) {
75 if (tmpsuccessor && tmpsuccessor->
getId()) {
76 id_tmp = tmpsuccessor->
getId();
77 id_tmp.insert(id_tmp.begin(),
'#');
80 strvalue = id_tmp.c_str();
87 if (strvalue[0] ==
'#') {
97 g_warning(
"%s", e.what());
114 return lperef->isAttached();
119 return lperef->isAttached() ?
lperef->getObject() :
nullptr;
125 return lperef->getURI()->str();
150 if (itemid.empty()) {
154 SPObject *
object = document->getObjectById(itemid);
156 itemid.insert(itemid.begin(),
'#');
173 auto item = cast<SPItem>(to);
220 if (!
_updating && flags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG |
221 SP_OBJECT_CHILD_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) {
250 Glib::ustring itemid;
252 std::vector<Glib::ustring> clones = cm->
getElementsOfType(
nullptr,
"svg:use", 2);
253 if (!clones.empty()) {
257 if (itemid.empty()) {
260 if (itemid.empty()) {
269 auto const _widget = Gtk::make_managed<Gtk::Box>(Gtk::Orientation::HORIZONTAL);
270 Gtk::Image *pIcon = Gtk::manage(
sp_get_icon_image(
"edit-clone", Gtk::IconSize::NORMAL));
271 auto const pButton = Gtk::make_managed<Gtk::Button>();
272 auto const pLabel = Gtk::make_managed<Gtk::Label>(
param_label);
275 pButton->set_has_frame(
false);
276 pButton->set_child(*pIcon);
279 pButton->set_tooltip_text(_(
"Link to item on clipboard"));
TODO: insert short description here.
3x3 matrix representing an affine transformation.
virtual void processObjects(LPEAction lpe_action)
std::vector< SPLPEItem * > getCurrrentLPEItems() const
void makeUndoDone(Glib::ustring message)
LivePathEffectObject * getLPEObj()
EffectType effectType() const
Inkscape::Display::TemporaryItem * ownerlocator
Glib::ustring param_tooltip
void param_write_to_repr(const char *svgd)
Glib::ustring param_label
bool param_readSVGValue(const gchar *strvalue) override
void on_link_button_click()
std::vector< SPObject * > param_get_satellites() override
void link(Glib::ustring itemid)
sigc::connection linked_changed_connection
sigc::connection linked_transformed_connection
Glib::ustring param_getSVGValue() const override
void linked_modified(SPObject *linked_obj, guint flags)
sigc::connection linked_released_connection
~SatelliteParam() override
Glib::ustring param_getDefaultSVGValue() const override
void linked_changed(SPObject *old_obj, SPObject *new_obj)
std::shared_ptr< SatelliteReference > lperef
SatelliteParam(const Glib::ustring &label, const Glib::ustring &tip, const Glib::ustring &key, Inkscape::UI::Widget::Registry *wr, Effect *effect)
void param_set_default() override
void linked_released(SPObject *released_item)
void linked_transformed(Geom::Affine const *rel_transf, SPItem *moved_item)
void addCanvasIndicators(SPLPEItem const *lpeitem, std::vector< Geom::PathVector > &hp_vec) override
void start_listening(SPObject *to)
SPObject * getObject() const
Gtk::Widget * param_newWidget() override
sigc::connection linked_modified_connection
Geom::Affine last_transform
System-wide clipboard manager.
virtual std::vector< Glib::ustring > getElementsOfType(SPDesktop *desktop, gchar const *type="*", gint maxdepth=-1)=0
static ClipboardManager * get()
virtual Glib::ustring getFirstObjectID()=0
Represents an URI as per RFC 2396.
SPObject * getObjectByHref(std::string const &href) const
Base class for visual SVG elements.
sigc::connection connectTransformed(sigc::slot< void(Geom::Affine const *, SPItem *)> slot)
SPObject is an abstract base class of all of the document nodes at the SVG document level.
void requestModified(unsigned int flags)
Requests that a modification notification signal be emitted later (e.g.
char const * getId() const
Returns the objects current ID string.
sigc::connection connectRelease(sigc::slot< void(SPObject *)> slot)
Connects to the release request signal.
char const * getAttribute(char const *name) const
sigc::connection connectModified(sigc::slot< void(SPObject *, unsigned int)> slot)
Connects to the modification notification signal.
System-wide clipboard management - class declaration.
Gtk::Image * sp_get_icon_image(Glib::ustring const &icon_name, int size)
Various utility functions.
Affine identity()
Create an identity matrix.
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.
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.