16#define noSP_ANCHOR_VERBOSE
18#include <glibmm/i18n.h>
52 this->
title =
nullptr;
66 this->
href = g_strdup(value);
72 this->
type = g_strdup(value);
80 this->
title = g_strdup(value);
100 if (this->
type && !strcmp(this->
type,
"page")) {
105 }
else if (this->
href) {
106 local_link = std::make_unique<Inkscape::URIReference>(
this);
111#define COPY_ATTR(rd,rs,key) (rd)->setAttribute((key), rs->attribute(key));
114 if ((flags & SP_OBJECT_WRITE_BUILD) && !
repr) {
142 return C_(
"Hyperlink|Noun",
"Link");
148 char *ret = g_strdup_printf(_(
"to %s"), quoted_href);
152 return g_strdup (_(
"without URI"));
160 objects.emplace_back(linked);
Lookup dictionary for attributes/properties.
Interface for refcounted XML nodes.
void setAttribute(Util::const_char_ptr key, Util::const_char_ptr value)
Change an attribute of this node.
void set(SPAttr key, char const *value) override
const char * typeName() const override
The item's type name, not node tag name.
void build(SPDocument *document, Inkscape::XML::Node *repr) override
void getLinked(std::vector< SPObject * > &objects, LinkedObjectNature direction) const override
Get objects which are linked to this object as either a source or a target.
char * description() const override
const char * displayName() const override
The item's type name as a translated human string.
std::unique_ptr< Inkscape::URIReference > local_link
virtual void updatePageAnchor()
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned flags) override
Typed SVG document implementation.
SPDocument * createChildDoc(std::string const &filename)
Fetches a document and attaches it to the current document as a child href.
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
void set(SPAttr key, char const *value) override
void build(SPDocument *document, Inkscape::XML::Node *repr) override
Inkscape::XML::Node * repr
void requestModified(unsigned int flags)
Requests that a modification notification signal be emitted later (e.g.
void readAttr(char const *key)
Read value of key attribute from XML node into object.
Inkscape::XML::Node * getRepr()
Returns the XML representation of tree.
virtual void getLinked(std::vector< SPObject * > &objects, LinkedObjectNature direction=LinkedObjectNature::ANY) const
Get objects which are linked to this object as either a source or a target.
void setHrefAttribute(XML::Node &node, Util::const_char_ptr value)
If the 'href' attribute already exists for the given node, then set a new value for it.
static cairo_user_data_key_t key
char * xml_quote_strdup(char const *src)
TODO: insert short description here.
Interface for XML documents.
virtual Node * createElement(char const *name)=0
Interface for XML documents.