12#include <glibmm/i18n.h>
36 g_warning(
"File (%s) is not parseable as XML. Ignored.", filename.c_str());
41 if (strcmp(
root->name(),
"svg:svg")) {
43 g_warning(
"File (%s) is not SVG. Ignored.", filename.c_str());
49 if (!strcmp(
child->name(),
"svg:defs")) {
51 defs !=
nullptr; defs = defs->
next()) {
52 if (!strcmp(defs->name(),
"svg:filter")) {
82 void close()
override;
83 void flush()
override;
84 void put (
char ch)
override;
85 gchar
const * c_str () {
return _str.c_str(); }
88void mywriter::close () {
return; }
89void mywriter::flush () {
return; }
90void mywriter::put (
char ch) { _str += ch; }
98 gchar
const * menu_tooltip =
node->
attribute(
"inkscape:menu-tooltip");
101 if (
label ==
nullptr) {
106 gchar * xml_str = g_strdup_printf(
107 "<inkscape-extension xmlns=\"" INKSCAPE_EXTENSION_URI
"\">\n"
109 "<id>org.inkscape.effect.filter.%s</id>\n"
111 "<object-type>all</object-type>\n"
113 "<submenu name=\"" N_(
"Filters")
"\">\n"
114 "<submenu name=\"%s\"/>\n"
117 "<menu-tip>%s</menu-tip>\n"
119 "</inkscape-extension>\n",
label,
id, menu? menu : menuname, menu_tooltip? menu_tooltip :
label);
static void filters_all_files()
static void filters_load_node(Inkscape::XML::Node *node, gchar *menuname)
This class and its descendants are for unicode character-oriented output.
Interface for refcounted XML nodes.
virtual Node * next()=0
Get the next sibling of this node.
void setAttribute(Util::const_char_ptr key, Util::const_char_ptr value)
Change an attribute of this node.
virtual Node * firstChild()=0
Get the first child of this node.
virtual char const * attribute(char const *key) const =0
Get the string representation of a node's attribute.
virtual Node * root()=0
Get the root node of this node's document.
A way to clear the N_ macro, which is defined as an inline function.
Inkscape::Extension::Extension: Frontend to certain, possibly pluggable, actions.
Inkscape::XML::Node * node
void filters_load_file(Glib::ustring filename, gchar *menuname)
void build_from_mem(gchar const *buffer, std::unique_ptr< Implementation::Implementation > in_imp)
Create a module from a buffer holding an XML description.
static R & release(R &r)
Decrements the reference count of a anchored object.
std::vector< std::string > get_filenames(Type type, std::vector< const char * > const &extensions, std::vector< const char * > const &exclusions)
Helper class to stream background task notifications as a series of messages.
Document * sp_repr_read_file(const gchar *filename, const gchar *default_ns, bool xinclude)
Reads XML from a file, and returns the Document.
void sp_repr_write_stream(Node *repr, Writer &out, gint indent_level, bool add_whitespace, Glib::QueryQuark elide_prefix, int inlineattrs, int indent, gchar const *const old_href_base, gchar const *const new_href_base)
C facade to Inkscape::XML::Node.
Inkscape::IO::Resource - simple resource API.
Interface for XML documents.