Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
repr.h File Reference

C facade to Inkscape::XML::Node. More...

Go to the source code of this file.

Namespaces

namespace  Inkscape
 Helper class to stream background task notifications as a series of messages.
 
namespace  Inkscape::IO
 Low-level IO code.
 
namespace  Geom
 Various utility functions.
 

Functions

char const * sp_xml_ns_uri_prefix (char const *uri, char const *suggested)
 
char const * sp_xml_ns_prefix_uri (char const *prefix)
 
Inkscape::XML::Documentsp_repr_document_new (char const *rootname)
 Returns new document having as first child a node named rootname.
 
Inkscape::XML::Documentsp_repr_read_file (char const *filename, char const *default_ns, bool xinclude=false)
 
Inkscape::XML::Documentsp_repr_read_mem (char const *buffer, int length, char const *default_ns)
 
void sp_repr_write_stream (Inkscape::XML::Node *repr, Inkscape::IO::Writer &out, int indent_level, bool add_whitespace, Glib::QueryQuark elide_prefix, int inlineattrs, int indent, char const *old_href_base=nullptr, char const *new_href_base=nullptr)
 
Glib::ustring sp_repr_write_buf (Inkscape::XML::Node *repr, int indent_level, bool add_whitespace, Glib::QueryQuark elide_prefix, int inlineattrs, int indent, char const *old_href_base=nullptr, char const *new_href_base=nullptr)
 
Inkscape::XML::Documentsp_repr_read_buf (const Glib::ustring &buf, const char *default_ns)
 
Glib::ustring sp_repr_save_buf (Inkscape::XML::Document *doc)
 
void sp_repr_save_stream (Inkscape::XML::Document *doc, FILE *to_file, char const *default_ns=nullptr, bool compress=false, char const *old_href_base=nullptr, char const *new_href_base=nullptr)
 
bool sp_repr_save_file (Inkscape::XML::Document *doc, char const *filename, char const *default_ns=nullptr)
 
bool sp_repr_save_rebased_file (Inkscape::XML::Document *doc, char const *filename_utf8, char const *default_ns, char const *old_base, char const *new_base_filename)
 
SPCSSAttrsp_repr_css_attr_new ()
 Creates an empty SPCSSAttr (a class for manipulating CSS style properties).
 
void sp_repr_css_attr_unref (SPCSSAttr *css)
 Unreferences an SPCSSAttr (will be garbage collected if no references remain).
 
SPCSSAttrsp_repr_css_attr (Inkscape::XML::Node const *repr, char const *attr)
 
SPCSSAttrsp_repr_css_attr_inherited (Inkscape::XML::Node const *repr, char const *attr)
 
SPCSSAttrsp_repr_css_attr_unset_all (SPCSSAttr *css)
 Return a new SPCSSAttr with all the properties found in the input SPCSSAttr unset.
 
char const * sp_repr_css_property (SPCSSAttr *css, char const *name, char const *defval)
 
Glib::ustring sp_repr_css_property (SPCSSAttr *css, Glib::ustring const &name, Glib::ustring const &defval)
 Returns a character string of the value of a given style property or a default value if the attribute is not found.
 
void sp_repr_css_set_property (SPCSSAttr *css, char const *name, char const *value)
 
void sp_repr_css_unset_property (SPCSSAttr *css, char const *name)
 
bool sp_repr_css_property_is_unset (SPCSSAttr *css, char const *name)
 
double sp_repr_css_double_property (SPCSSAttr *css, char const *name, double defval)
 
void sp_repr_css_set_property_double (SPCSSAttr *css, char const *name, double value)
 
void sp_repr_css_set_property_string (SPCSSAttr *css, char const *name, std::string const &value)
 Set a style property to a standard string.
 
void sp_repr_css_write_string (SPCSSAttr *css, Glib::ustring &str)
 Write a style attribute string from a list of properties stored in an SPCSAttr object.
 
void sp_repr_css_set (Inkscape::XML::Node *repr, SPCSSAttr *css, char const *key)
 
void sp_repr_css_merge (SPCSSAttr *dst, SPCSSAttr *src)
 Merges two SPCSSAttr's.
 
void sp_repr_css_attr_add_from_string (SPCSSAttr *css, const char *data)
 
void sp_repr_css_change (Inkscape::XML::Node *repr, SPCSSAttr *css, char const *key)
 
void sp_repr_css_change_recursive (Inkscape::XML::Node *repr, SPCSSAttr *css, char const *key)
 
void sp_repr_css_print (SPCSSAttr *css)
 Loops through a List of style properties, printing key/value pairs.
 
void sp_repr_unparent (Inkscape::XML::Node *repr)
 Remove repr from children of its parent node.
 
bool sp_repr_is_meta_element (const Inkscape::XML::Node *node)
 Determine if the node is a 'title', 'desc' or 'metadata' element.
 
int sp_repr_compare_position (Inkscape::XML::Node const *first, Inkscape::XML::Node const *second)
 Works for different-parent objects, so long as they have a common ancestor.
 
bool sp_repr_compare_position_bool (Inkscape::XML::Node const *first, Inkscape::XML::Node const *second)
 
Inkscape::XML::Nodesp_repr_lookup_name (Inkscape::XML::Node *repr, char const *name, int maxdepth=-1)
 Find an element node with the given name.
 
Inkscape::XML::Node const * sp_repr_lookup_name (Inkscape::XML::Node const *repr, char const *name, int maxdepth=-1)
 
Glib::ustring sp_repr_lookup_content (Inkscape::XML::Node const *repr, gchar const *name, Glib::ustring otherwise={})
 
std::vector< Inkscape::XML::Node const * > sp_repr_lookup_name_many (Inkscape::XML::Node const *repr, char const *name, int maxdepth=-1)
 
Inkscape::XML::Nodesp_repr_lookup_child (Inkscape::XML::Node *repr, char const *key, char const *value)
 
Inkscape::XML::Nodesp_repr_lookup_descendant (Inkscape::XML::Node *repr, char const *key, char const *value)
 
Inkscape::XML::Node const * sp_repr_lookup_descendant (Inkscape::XML::Node const *repr, char const *key, char const *value)
 
std::vector< Inkscape::XML::Node * > sp_repr_lookup_property_many (Inkscape::XML::Node *repr, Glib::ustring const &property, Glib::ustring const &value, int maxdepth=-1)
 
Inkscape::XML::Nodesp_repr_document_first_child (Inkscape::XML::Document const *doc)
 
bool sp_repr_is_def (Inkscape::XML::Node const *node)
 
bool sp_repr_is_layer (Inkscape::XML::Node const *node)
 
template<typename Visitor >
void sp_repr_visit_descendants (Inkscape::XML::Node *node, Visitor visitor)
 Visit all descendants recursively.
 
template<typename Visitor >
void sp_repr_visit_descendants (Inkscape::XML::Node *a, Inkscape::XML::Node *b, Visitor visitor)
 Visit descendants of 2 nodes in parallel.
 

Detailed Description

C facade to Inkscape::XML::Node.

Definition in file repr.h.

Function Documentation

◆ sp_repr_compare_position()

int sp_repr_compare_position ( Inkscape::XML::Node const *  first,
Inkscape::XML::Node const *  second 
)

Works for different-parent objects, so long as they have a common ancestor.

Return value: 0 positions are equivalent 1 first object's position is greater than the second -1 first object's position is less than the second

Todo:
Rewrite this function's description to be understandable

Definition at line 249 of file repr-util.cpp.

References find_containing_child(), lowest_common_ancestor(), Inkscape::XML::Node::parent(), and Inkscape::XML::Node::position().

Referenced by sp_item_repr_compare_position(), sp_item_repr_compare_position_bool(), sp_object_compare_position(), and sp_repr_compare_position_bool().

◆ sp_repr_compare_position_bool()

◆ sp_repr_css_attr()

SPCSSAttr * sp_repr_css_attr ( Inkscape::XML::Node const *  repr,
char const *  attr 
)

◆ sp_repr_css_attr_add_from_string()

void sp_repr_css_attr_add_from_string ( SPCSSAttr css,
const char *  data 
)

◆ sp_repr_css_attr_inherited()

SPCSSAttr * sp_repr_css_attr_inherited ( Inkscape::XML::Node const *  repr,
char const *  attr 
)

◆ sp_repr_css_attr_new()

SPCSSAttr * sp_repr_css_attr_new ( )

Creates an empty SPCSSAttr (a class for manipulating CSS style properties).

Definition at line 67 of file repr-css.cpp.

Referenced by Inkscape::Extension::Internal::SvgBuilder::_addStopToGradient(), Inkscape::UI::Dialog::SelectorsDialog::_addToSelector(), Inkscape::Extension::Internal::SvgBuilder::_createImage(), Inkscape::Extension::Internal::SvgBuilder::_flushTextText(), Inkscape::UI::Tools::EraserTool::_handleStrokeStyle(), Inkscape::UI::Widget::SelectedStyle::_on_paste_callback(), Inkscape::UI::Widget::ObjectCompositeSettings::_opacityValueChanged(), Inkscape::ObjectSet::_pathBoolOp(), Inkscape::Extension::Internal::SvgBuilder::_setStyle(), Inkscape::UI::Dialog::StyleDialog::_valueEdited(), Inkscape::LivePathEffect::LPEBool::add_filter(), Inkscape::Extension::Internal::SvgBuilder::addChar(), GrDrag::addColorToDragger(), Inkscape::Extension::Internal::SvgBuilder::addImageMask(), Inkscape::Extension::Internal::SvgBuilder::addShadedFill(), Inkscape::UI::Toolbar::TextToolbar::align_mode_changed(), apply_css_recursive(), Inkscape::UI::Widget::StrokeStyle::buttonToggledCB(), Inkscape::ObjectSet::chameleonFill(), SPHatch::clone_if_necessary(), SPPattern::clone_if_necessary(), Inkscape::LivePathEffect::LPECloneOriginal::cloneAttributes(), Inkscape::UI::Widget::RotateableSwatch::color_adjust(), Inkscape::LivePathEffect::LPEMeasureSegments::createArrowMarker(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), GrDrag::deleteSelected(), Inkscape::UI::Toolbar::TextToolbar::direction_changed(), Inkscape::LivePathEffect::LPEShowHandles::doOnApply(), Inkscape::LivePathEffect::Effect::doOnBeforeCommit(), Inkscape::UI::Tools::GradientTool::drag(), GrDrag::dropColor(), Inkscape::UI::Dialog::TextEdit::fillTextStyle(), Inkscape::UI::Toolbar::TextToolbar::fontfamily_value_changed(), Inkscape::UI::Toolbar::TextToolbar::fontsize_value_changed(), Inkscape::UI::Toolbar::TextToolbar::fontstyle_value_changed(), Inkscape::Preferences::Entry::getInheritedStyle(), Inkscape::Preferences::Entry::getStyle(), item_to_paths(), Inkscape::UI::Toolbar::TextToolbar::letterspacing_value_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_value_changed(), Inkscape::LivePathEffect::lpe_shape_convert_stroke_and_fill(), Inkscape::LivePathEffect::lpe_shape_revert_stroke_and_fill(), Inkscape::UI::Widget::StrokeStyle::markerSelectCB(), Inkscape::Extension::Internal::SvgBuilder::mergePath(), Inkscape::UI::Tools::MeshTool::new_default(), new_filter(), new_filter_blend_gaussian_blur(), new_filter_gaussian_blur(), Inkscape::UI::Dialog::ObjectsPanel::ObjectsPanel(), Inkscape::UI::Dialog::ColorItem::on_click(), Inkscape::UI::Widget::SelectedStyle::on_fill_black(), Inkscape::UI::Widget::SelectedStyle::on_fill_invert(), Inkscape::UI::Widget::SelectedStyle::on_fill_lastselected(), Inkscape::UI::Widget::SelectedStyle::on_fill_lastused(), Inkscape::UI::Widget::SelectedStyle::on_fill_opaque(), Inkscape::UI::Widget::SelectedStyle::on_fill_remove(), Inkscape::UI::Widget::SelectedStyle::on_fill_unset(), Inkscape::UI::Widget::SelectedStyle::on_fill_white(), Inkscape::UI::Widget::SelectedStyle::on_opacity_changed(), Inkscape::UI::Widget::SelectedStyle::on_opacity_click(), Inkscape::UI::Widget::SelectedStyle::on_popup_preset(), Inkscape::UI::Widget::SelectedStyle::on_stroke_black(), Inkscape::UI::Widget::SelectedStyle::on_stroke_invert(), Inkscape::UI::Widget::SelectedStyle::on_stroke_lastselected(), Inkscape::UI::Widget::SelectedStyle::on_stroke_lastused(), Inkscape::UI::Widget::SelectedStyle::on_stroke_opaque(), Inkscape::UI::Widget::SelectedStyle::on_stroke_remove(), Inkscape::UI::Widget::SelectedStyle::on_stroke_unset(), Inkscape::UI::Widget::SelectedStyle::on_stroke_white(), Inkscape::Extension::Internal::GdkpixbufInput::open(), Inkscape::Extension::Internal::Svg::open(), Inkscape::UI::Toolbar::TextToolbar::orientation_changed(), Inkscape::LivePathEffect::LPEMeasureSegments::processObjects(), redundant_semi_nesting_processor(), remove_filter(), Inkscape::LivePathEffect::LPEBool::remove_filter(), Inkscape::ObjectSet::removeFilter(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Toolbar::TextToolbar::script_changed(), Inkscape::UI::Widget::SelectedStyle::SelectedStyle(), Inkscape::Extension::Internal::SvgBuilder::setAsLayer(), Inkscape::UI::Widget::FillNStroke::setFillrule(), Inkscape::UI::Tools::MeasureTool::setLabelText(), Inkscape::UI::Tools::MeasureTool::setMarker(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), Inkscape::UI::Tools::MeasureTool::setMeasureItem(), Inkscape::UI::Widget::StrokeStyle::setStrokeDash(), Inkscape::UI::Widget::StrokeStyle::setStrokeMiter(), Inkscape::UI::Widget::StrokeStyle::setStrokeWidth(), Inkscape::UI::Widget::StyleSwatch::setStyle(), sp_attribute_clean_style(), sp_css_attr_from_style(), sp_desktop_apply_css_recursive(), sp_desktop_get_style(), sp_desktop_set_color(), sp_desktop_set_style(), sp_pattern_set_color(), sp_repr_css_attr(), sp_repr_css_attr_inherited(), sp_repr_css_attr_unset_all(), Inkscape::UI::Tools::sp_spray_recursive(), sp_style_set_property_url(), sp_te_adjust_tspan_letterspacing_screen(), sp_te_apply_style(), Inkscape::UI::Tools::spdc_apply_style(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), Inkscape::UI::Tools::spdc_create_single_dot(), GrDrag::styleSet(), Inkscape::ObjectSet::swapFillStroke(), Inkscape::UI::Toolbar::TextToolbar::text_outer_set_style(), Inkscape::UI::Widget::StrokeStyle::unitChangedCB(), Inkscape::ObjectSet::untile(), Inkscape::Extension::Internal::SvgBuilder::updateFont(), Inkscape::UI::Widget::FillNStroke::updateFromPaint(), Inkscape::UI::Widget::RotateableStrokeWidth::value_adjust(), Inkscape::UI::Toolbar::TextToolbar::wordspacing_value_changed(), SPMeshNodeArray::write(), and Inkscape::UI::Toolbar::TextToolbar::writing_mode_changed().

◆ sp_repr_css_attr_unref()

void sp_repr_css_attr_unref ( SPCSSAttr css)

Unreferences an SPCSSAttr (will be garbage collected if no references remain).

Definition at line 76 of file repr-css.cpp.

References css, and Inkscape::GC::release().

Referenced by Inkscape::Extension::Internal::SvgBuilder::_addStopToGradient(), Inkscape::UI::Dialog::SelectorsDialog::_addToSelector(), Inkscape::Extension::Internal::SvgBuilder::_createImage(), Inkscape::Extension::Internal::SvgBuilder::_flushTextText(), Inkscape::UI::Tools::EraserTool::_handleStrokeStyle(), Inkscape::UI::Widget::SelectedStyle::_on_paste_callback(), Inkscape::UI::Widget::ObjectCompositeSettings::_opacityValueChanged(), Inkscape::ObjectSet::_pathBoolOp(), Inkscape::Extension::Internal::SvgBuilder::_setBlendMode(), Inkscape::Extension::Internal::SvgBuilder::_setTextStyle(), Inkscape::LivePathEffect::LPEBool::add_filter(), GrDrag::addColorToDragger(), Inkscape::Extension::Internal::SvgBuilder::addImageMask(), Inkscape::UI::Dialog::InkscapePreferences::AddNewObjectsStyle(), Inkscape::Extension::Internal::SvgBuilder::addPath(), Inkscape::Extension::Internal::SvgBuilder::addShadedFill(), Inkscape::UI::Toolbar::TextToolbar::align_mode_changed(), Inkscape::UI::Dialog::TextEdit::apply_changes(), apply_css_recursive(), SPDesktop::applyCurrentOrToolStyle(), SPPath::build(), Inkscape::UI::Widget::StrokeStyle::buttonToggledCB(), Inkscape::ObjectSet::chameleonFill(), SPHatch::clone_if_necessary(), Inkscape::UI::Widget::RotateableSwatch::color_adjust(), copy_style_links(), create_text_with_rectangle(), Inkscape::LivePathEffect::LPEMeasureSegments::createArrowMarker(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), delete_line_break(), GrDrag::deleteSelected(), Inkscape::UI::Toolbar::TextToolbar::direction_changed(), Inkscape::LivePathEffect::LPEShowHandles::doOnApply(), Inkscape::LivePathEffect::Effect::doOnBeforeCommit(), Inkscape::UI::Tools::GradientTool::drag(), GrDrag::dropColor(), file_import(), Inkscape::UI::Toolbar::TextToolbar::fontfamily_value_changed(), Inkscape::UI::Toolbar::TextToolbar::fontsize_value_changed(), Inkscape::UI::Toolbar::TextToolbar::fontstyle_value_changed(), SPText::hide_shape_inside(), insert_text_fallback(), item_to_paths(), Inkscape::UI::Toolbar::TextToolbar::letterspacing_value_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::UI::Toolbar::TextToolbar::lineheight_value_changed(), Inkscape::LivePathEffect::lpe_shape_convert_stroke_and_fill(), Inkscape::LivePathEffect::lpe_shape_revert_stroke_and_fill(), Inkscape::UI::Widget::StrokeStyle::markerSelectCB(), Inkscape::Extension::Internal::SvgBuilder::mergePath(), Inkscape::Preferences::mergeStyle(), Inkscape::UI::Tools::MeshTool::new_default(), new_filter(), new_filter_blend_gaussian_blur(), new_filter_gaussian_blur(), Inkscape::UI::Dialog::ObjectsPanel::ObjectsPanel(), Inkscape::UI::Dialog::ColorItem::on_click(), Inkscape::UI::Widget::SelectedStyle::on_fill_black(), Inkscape::UI::Widget::SelectedStyle::on_fill_invert(), Inkscape::UI::Widget::SelectedStyle::on_fill_lastselected(), Inkscape::UI::Widget::SelectedStyle::on_fill_lastused(), Inkscape::UI::Widget::SelectedStyle::on_fill_opaque(), Inkscape::UI::Widget::SelectedStyle::on_fill_remove(), Inkscape::UI::Widget::SelectedStyle::on_fill_unset(), Inkscape::UI::Widget::SelectedStyle::on_fill_white(), Inkscape::UI::Widget::SelectedStyle::on_opacity_changed(), Inkscape::UI::Widget::SelectedStyle::on_opacity_click(), Inkscape::UI::Widget::SelectedStyle::on_popup_preset(), Inkscape::UI::Widget::SelectedStyle::on_stroke_black(), Inkscape::UI::Widget::SelectedStyle::on_stroke_invert(), Inkscape::UI::Widget::SelectedStyle::on_stroke_lastselected(), Inkscape::UI::Widget::SelectedStyle::on_stroke_lastused(), Inkscape::UI::Widget::SelectedStyle::on_stroke_opaque(), Inkscape::UI::Widget::SelectedStyle::on_stroke_remove(), Inkscape::UI::Widget::SelectedStyle::on_stroke_unset(), Inkscape::UI::Widget::SelectedStyle::on_stroke_white(), Inkscape::UI::Dialog::TextEdit::onSetDefault(), Inkscape::Extension::Internal::GdkpixbufInput::open(), Inkscape::Extension::Internal::Svg::open(), Inkscape::UI::Toolbar::TextToolbar::orientation_changed(), Inkscape::LivePathEffect::LPEMeasureSegments::processObjects(), redundant_semi_nesting_processor(), remove_filter(), Inkscape::LivePathEffect::LPEBool::remove_filter(), remove_marker_context_paint(), remove_marker_context_paint(), Inkscape::ObjectSet::removeFilter(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Widget::SelectedStyle::SelectedStyle(), SPFlowtext::set(), Inkscape::svg_renderer::set_style(), Inkscape::UI::Widget::FillNStroke::setFillrule(), Inkscape::UI::Tools::MeasureTool::setLabelText(), Inkscape::UI::Tools::MeasureTool::setMarker(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), Inkscape::UI::Tools::MeasureTool::setMeasureItem(), Inkscape::UI::Widget::StrokeStyle::setStrokeDash(), Inkscape::UI::Widget::StrokeStyle::setStrokeMiter(), Inkscape::UI::Widget::StrokeStyle::setStrokeWidth(), Inkscape::UI::Widget::StyleSwatch::setStyle(), sp_attribute_clean_style(), sp_attribute_clean_style(), sp_attribute_sort_style(), sp_desktop_apply_css_recursive(), sp_desktop_apply_style_tool(), sp_desktop_get_color_tool(), sp_desktop_get_master_opacity_tool(), sp_desktop_get_opacity_tool(), sp_desktop_get_style(), sp_desktop_set_color(), sp_desktop_set_style(), Inkscape::LivePathEffect::sp_get_fill_rule(), sp_pattern_set_color(), sp_repr_css_change(), sp_selection_copy_one(), sp_style_set_property_url(), sp_te_adjust_tspan_letterspacing_screen(), sp_te_apply_style(), Inkscape::UI::Tools::spdc_apply_style(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), Inkscape::UI::Tools::spdc_create_single_dot(), Inkscape::UI::Widget::style_obs_callback(), Inkscape::UI::Dialog::StyleFromSelectionToTool(), GrDrag::styleSet(), Inkscape::ObjectSet::swapFillStroke(), take_style_from_item(), Inkscape::UI::Toolbar::TextToolbar::text_outer_set_style(), text_unflow(), Inkscape::UI::Widget::StrokeStyle::unitChangedCB(), Inkscape::Extension::Internal::SvgBuilder::updateFont(), Inkscape::UI::Widget::FillNStroke::updateFromPaint(), Inkscape::UI::Widget::RotateableStrokeWidth::value_adjust(), Inkscape::UI::Toolbar::TextToolbar::wordspacing_value_changed(), SPMeshNodeArray::write(), Inkscape::UI::Toolbar::TextToolbar::writing_mode_changed(), SPText::~SPText(), and Inkscape::UI::Widget::StyleSwatch::~StyleSwatch().

◆ sp_repr_css_attr_unset_all()

SPCSSAttr * sp_repr_css_attr_unset_all ( SPCSSAttr css)

Return a new SPCSSAttr with all the properties found in the input SPCSSAttr unset.

Definition at line 386 of file repr-css.cpp.

References css, sp_repr_css_attr_new(), and sp_repr_css_set_property().

◆ sp_repr_css_change()

void sp_repr_css_change ( Inkscape::XML::Node repr,
SPCSSAttr css,
char const *  key 
)

◆ sp_repr_css_change_recursive()

void sp_repr_css_change_recursive ( Inkscape::XML::Node repr,
SPCSSAttr css,
char const *  key 
)

◆ sp_repr_css_double_property()

double sp_repr_css_double_property ( SPCSSAttr css,
char const *  name,
double  defval 
)

◆ sp_repr_css_merge()

◆ sp_repr_css_print()

void sp_repr_css_print ( SPCSSAttr css)

Loops through a List of style properties, printing key/value pairs.

Definition at line 285 of file repr-css.cpp.

References css, and key.

◆ sp_repr_css_property() [1/2]

char const * sp_repr_css_property ( SPCSSAttr css,
char const *  name,
char const *  defval 
)

◆ sp_repr_css_property() [2/2]

Glib::ustring sp_repr_css_property ( SPCSSAttr css,
Glib::ustring const &  name,
Glib::ustring const &  defval 
)

Returns a character string of the value of a given style property or a default value if the attribute is not found.

Definition at line 162 of file repr-css.cpp.

References css, and name.

◆ sp_repr_css_property_is_unset()

bool sp_repr_css_property_is_unset ( SPCSSAttr css,
char const *  name 
)

◆ sp_repr_css_set()

void sp_repr_css_set ( Inkscape::XML::Node repr,
SPCSSAttr css,
char const *  key 
)

◆ sp_repr_css_set_property()

void sp_repr_css_set_property ( SPCSSAttr css,
char const *  name,
char const *  value 
)

◆ sp_repr_css_set_property_double()

void sp_repr_css_set_property_double ( SPCSSAttr css,
char const *  name,
double  value 
)

◆ sp_repr_css_set_property_string()

void sp_repr_css_set_property_string ( SPCSSAttr css,
char const *  name,
std::string const &  value 
)

◆ sp_repr_css_unset_property()

void sp_repr_css_unset_property ( SPCSSAttr css,
char const *  name 
)

◆ sp_repr_css_write_string()

◆ sp_repr_document_first_child()

Inkscape::XML::Node * sp_repr_document_first_child ( Inkscape::XML::Document const *  doc)
inline

Definition at line 169 of file repr.h.

References Inkscape::XML::Node::firstChild().

Referenced by sp_repr_save_writer().

◆ sp_repr_document_new()

◆ sp_repr_is_def()

bool sp_repr_is_def ( Inkscape::XML::Node const *  node)
inline

◆ sp_repr_is_layer()

bool sp_repr_is_layer ( Inkscape::XML::Node const *  node)
inline

Definition at line 179 of file repr.h.

References Inkscape::XML::Node::attribute(), and node.

Referenced by Inkscape::ObjectSet::duplicate().

◆ sp_repr_is_meta_element()

bool sp_repr_is_meta_element ( const Inkscape::XML::Node node)

Determine if the node is a 'title', 'desc' or 'metadata' element.

Definition at line 459 of file repr-util.cpp.

References Inkscape::XML::ELEMENT_NODE, name, Inkscape::XML::Node::name(), node, and Inkscape::XML::Node::type().

Referenced by SPText::_buildLayoutInput(), SPFlowtext::_buildLayoutInput(), sp_item_group_ungroup(), and tidy_operator_inexplicable_spans().

◆ sp_repr_lookup_child()

Inkscape::XML::Node * sp_repr_lookup_child ( Inkscape::XML::Node repr,
char const *  key,
char const *  value 
)

◆ sp_repr_lookup_content()

Glib::ustring sp_repr_lookup_content ( Inkscape::XML::Node const *  repr,
gchar const *  name,
Glib::ustring  otherwise = {} 
)

◆ sp_repr_lookup_descendant() [1/2]

Inkscape::XML::Node * sp_repr_lookup_descendant ( Inkscape::XML::Node repr,
char const *  key,
char const *  value 
)

◆ sp_repr_lookup_descendant() [2/2]

Inkscape::XML::Node const * sp_repr_lookup_descendant ( Inkscape::XML::Node const *  repr,
char const *  key,
char const *  value 
)

◆ sp_repr_lookup_name() [1/2]

Inkscape::XML::Node * sp_repr_lookup_name ( Inkscape::XML::Node repr,
char const *  name,
int  maxdepth = -1 
)

Find an element node with the given name.

This function searches the descendants of the specified node depth-first for the first XML node with the specified name.

Parameters
reprThe node to start from
nameThe name of the element node to find
maxdepthMaximum search depth, or -1 for an unlimited depth
Returns
A pointer to the matching Inkscape::XML::Node

◆ sp_repr_lookup_name() [2/2]

Inkscape::XML::Node const * sp_repr_lookup_name ( Inkscape::XML::Node const *  repr,
char const *  name,
int  maxdepth = -1 
)

◆ sp_repr_lookup_name_many()

std::vector< Inkscape::XML::Node const * > sp_repr_lookup_name_many ( Inkscape::XML::Node const *  repr,
char const *  name,
int  maxdepth = -1 
)

◆ sp_repr_lookup_property_many()

std::vector< Inkscape::XML::Node * > sp_repr_lookup_property_many ( Inkscape::XML::Node repr,
Glib::ustring const &  property,
Glib::ustring const &  value,
int  maxdepth = -1 
)

◆ sp_repr_read_buf()

Inkscape::XML::Document * sp_repr_read_buf ( const Glib::ustring &  buf,
const char *  default_ns 
)

◆ sp_repr_read_file()

Inkscape::XML::Document * sp_repr_read_file ( char const *  filename,
char const *  default_ns,
bool  xinclude = false 
)

◆ sp_repr_read_mem()

Inkscape::XML::Document * sp_repr_read_mem ( char const *  buffer,
int  length,
char const *  default_ns 
)

◆ sp_repr_save_buf()

◆ sp_repr_save_file()

bool sp_repr_save_file ( Inkscape::XML::Document doc,
char const *  filename,
char const *  default_ns = nullptr 
)

◆ sp_repr_save_rebased_file()

bool sp_repr_save_rebased_file ( Inkscape::XML::Document doc,
char const *  filename_utf8,
char const *  default_ns,
char const *  old_base,
char const *  new_base_filename 
)

◆ sp_repr_save_stream()

void sp_repr_save_stream ( Inkscape::XML::Document doc,
FILE *  to_file,
char const *  default_ns = nullptr,
bool  compress = false,
char const *  old_href_base = nullptr,
char const *  new_href_base = nullptr 
)

◆ sp_repr_unparent()

◆ sp_repr_visit_descendants() [1/2]

template<typename Visitor >
void sp_repr_visit_descendants ( Inkscape::XML::Node a,
Inkscape::XML::Node b,
Visitor  visitor 
)

Visit descendants of 2 nodes in parallel.

The assumption is that one a and b trees are the same in terms of structure (like one is a duplicate of the other).

Parameters
afirst node tree root
bsecond node tree root
visitorThe visitor lambda (Node *, Node *) -> bool If visitor returns false child nodes are not visited.

Definition at line 219 of file repr.h.

◆ sp_repr_visit_descendants() [2/2]

template<typename Visitor >
void sp_repr_visit_descendants ( Inkscape::XML::Node node,
Visitor  visitor 
)

Visit all descendants recursively.

Traverse all descendants of node and call visitor on it. Stop descending when visitor returns false

Parameters
nodeThe root node to start visiting
visitorThe visitor lambda (Node *) -> bool If visitor returns false child nodes of current node are not visited.

Definition at line 196 of file repr.h.

Referenced by Inkscape::XML::rebase_hrefs(), Inkscape::XML::Node::sp_repr_visit_descendants(), Inkscape::XML::Node::sp_repr_visit_descendants(), text_categorize_refs(), and text_relink_refs().

◆ sp_repr_write_buf()

Glib::ustring sp_repr_write_buf ( Inkscape::XML::Node repr,
int  indent_level,
bool  add_whitespace,
Glib::QueryQuark  elide_prefix,
int  inlineattrs,
int  indent,
char const *  old_href_base = nullptr,
char const *  new_href_base = nullptr 
)

◆ sp_repr_write_stream()

void sp_repr_write_stream ( Inkscape::XML::Node repr,
Inkscape::IO::Writer out,
int  indent_level,
bool  add_whitespace,
Glib::QueryQuark  elide_prefix,
int  inlineattrs,
int  indent,
char const *  old_href_base = nullptr,
char const *  new_href_base = nullptr 
)

◆ sp_xml_ns_prefix_uri()

char const * sp_xml_ns_prefix_uri ( char const *  prefix)

◆ sp_xml_ns_uri_prefix()

char const * sp_xml_ns_uri_prefix ( char const *  uri,
char const *  suggested 
)