Inkscape
Vector Graphics Editor
|
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::Document * | sp_repr_document_new (char const *rootname) |
Returns new document having as first child a node named rootname. | |
Inkscape::XML::Document * | sp_repr_read_file (char const *filename, char const *default_ns, bool xinclude=false) |
Inkscape::XML::Document * | sp_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::Document * | sp_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) |
SPCSSAttr * | sp_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). | |
SPCSSAttr * | sp_repr_css_attr (Inkscape::XML::Node const *repr, char const *attr) |
SPCSSAttr * | sp_repr_css_attr_inherited (Inkscape::XML::Node const *repr, char const *attr) |
SPCSSAttr * | sp_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::Node * | sp_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::Node * | sp_repr_lookup_child (Inkscape::XML::Node *repr, char const *key, char const *value) |
Inkscape::XML::Node * | sp_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::Node * | sp_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. | |
C facade to Inkscape::XML::Node.
Definition in file repr.h.
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
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().
bool sp_repr_compare_position_bool | ( | Inkscape::XML::Node const * | first, |
Inkscape::XML::Node const * | second | ||
) |
Definition at line 299 of file repr-util.cpp.
References sp_repr_compare_position().
Referenced by Inkscape::ObjectSet::_pathBoolOp(), Inkscape::ObjectSet::clone(), Inkscape::ObjectSet::duplicate(), Inkscape::ObjectSet::group(), Inkscape::ObjectSet::lowerToBottom(), Inkscape::ObjectSet::raiseToTop(), Inkscape::ObjectSet::setClipGroup(), and Inkscape::ObjectSet::topRepr().
SPCSSAttr * sp_repr_css_attr | ( | Inkscape::XML::Node const * | repr, |
char const * | attr | ||
) |
void sp_repr_css_attr_add_from_string | ( | SPCSSAttr * | css, |
const char * | data | ||
) |
SPCSSAttr * sp_repr_css_attr_inherited | ( | Inkscape::XML::Node const * | repr, |
char const * | attr | ||
) |
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().
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().
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().
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 | ||
) |
double sp_repr_css_double_property | ( | SPCSSAttr * | css, |
char const * | name, | ||
double | defval | ||
) |
Merges two SPCSSAttr's.
Properties in src overwrite properties in dst if present in both.
Definition at line 298 of file repr-css.cpp.
References Inkscape::XML::Node::mergeFrom().
Referenced by Inkscape::Extension::Internal::SvgBuilder::_setTextStyle(), Inkscape::Extension::Internal::SvgBuilder::addChar(), apply_css_recursive(), Inkscape::UI::Toolbar::TextToolbar::lineheight_unit_changed(), Inkscape::Preferences::mergeStyle(), Inkscape::UI::Widget::StyleSwatch::setStyle(), sp_desktop_apply_css_recursive(), sp_desktop_get_style(), sp_desktop_set_style(), sp_repr_css_change(), sp_te_apply_style(), take_style_from_item(), and Inkscape::UI::Toolbar::TextToolbar::text_outer_set_style().
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.
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.
Definition at line 162 of file repr-css.cpp.
bool sp_repr_css_property_is_unset | ( | SPCSSAttr * | css, |
char const * | name | ||
) |
void sp_repr_css_set | ( | Inkscape::XML::Node * | repr, |
SPCSSAttr * | css, | ||
char const * | key | ||
) |
void sp_repr_css_set_property | ( | SPCSSAttr * | css, |
char const * | name, | ||
char const * | value | ||
) |
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.
Definition at line 234 of file repr-css.cpp.
References css, name, and sp_repr_css_set_property().
Referenced by Inkscape::UI::Widget::SelectedStyle::_on_paste_callback(), Inkscape::ObjectSet::chameleonFill(), Inkscape::UI::Widget::RotateableSwatch::color_adjust(), convert_fill_color(), convert_stroke_color(), Inkscape::LivePathEffect::LPEMeasureSegments::createArrowMarker(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), Inkscape::UI::Tools::fit_item(), Inkscape::UI::Dialog::ColorItem::on_click(), 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_stroke_invert(), Inkscape::UI::Widget::SelectedStyle::on_stroke_lastselected(), Inkscape::UI::Widget::SelectedStyle::on_stroke_lastused(), revert_stroke_color(), Inkscape::UI::Widget::SelectedStyle::SelectedStyle(), Inkscape::UI::Tools::MeasureTool::setLabelText(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), Inkscape::UI::Tools::MeasureTool::setMeasureItem(), sp_desktop_set_color(), sp_pattern_set_color(), Inkscape::UI::Tools::spdc_apply_style(), Inkscape::UI::Tools::spdc_create_single_dot(), Inkscape::ObjectSet::swapFillStroke(), and SPMeshNodeArray::write().
void sp_repr_css_unset_property | ( | SPCSSAttr * | css, |
char const * | name | ||
) |
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.
Definition at line 242 of file repr-css.cpp.
References css.
Referenced by Inkscape::UI::Dialog::SelectorsDialog::_addToSelector(), Inkscape::Extension::Internal::SvgBuilder::_setBlendMode(), Inkscape::UI::Dialog::StyleDialog::_valueEdited(), Inkscape::LivePathEffect::LPECloneOriginal::cloneAttributes(), Inkscape::LivePathEffect::Effect::doOnBeforeCommit(), fix_ref(), SPStyle::mergeCSS(), Inkscape::Preferences::mergeStyle(), Inkscape::LivePathEffect::LPEMeasureSegments::processObjects(), Inkscape::UI::Tools::MeasureTool::setLabelText(), Inkscape::UI::Tools::MeasureTool::setMarker(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), Inkscape::UI::Tools::MeasureTool::setMeasureItem(), Inkscape::Preferences::setStyle(), Inkscape::UI::Widget::StyleSwatch::setStyle(), sp_attribute_clean_style(), sp_attribute_clean_style(), sp_attribute_sort_style(), and sp_repr_css_set().
|
inline |
Definition at line 169 of file repr.h.
References Inkscape::XML::Node::firstChild().
Referenced by sp_repr_save_writer().
Inkscape::XML::Document * sp_repr_document_new | ( | char const * | rootname | ) |
Returns new document having as first child a node named rootname.
Definition at line 32 of file repr.cpp.
References Inkscape::XML::Node::appendChild(), Inkscape::XML::Document::createComment(), Inkscape::XML::Document::createElement(), Inkscape::GC::release(), root, and Inkscape::XML::Node::setAttribute().
Referenced by active_window_start_helper(), Inkscape::UI::Dialog::CPHistoryXML::CPHistoryXML(), SPDocument::createNewDoc(), and XmlReprActionTest::XmlReprActionTest().
|
inline |
Definition at line 173 of file repr.h.
References Inkscape::XML::Node::name(), node, and Inkscape::XML::Node::parent().
Referenced by Inkscape::ObjectSet::duplicate(), and text_categorize_refs().
|
inline |
Definition at line 179 of file repr.h.
References Inkscape::XML::Node::attribute(), and node.
Referenced by Inkscape::ObjectSet::duplicate().
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().
Inkscape::XML::Node * sp_repr_lookup_child | ( | Inkscape::XML::Node * | repr, |
char const * | key, | ||
char const * | value | ||
) |
Glib::ustring sp_repr_lookup_content | ( | Inkscape::XML::Node const * | repr, |
gchar const * | name, | ||
Glib::ustring | otherwise = {} |
||
) |
Definition at line 384 of file repr-util.cpp.
References Inkscape::XML::Node::content(), Inkscape::XML::Node::firstChild(), name, node, and sp_repr_lookup_name().
Referenced by Inkscape::Extension::Internal::TemplatePresetFile::_load_data(), and Inkscape::Extension::Template::Template().
Inkscape::XML::Node * sp_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 | ||
) |
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.
repr | The node to start from |
name | The name of the element node to find |
maxdepth | Maximum search depth, or -1 for an unlimited depth |
Inkscape::XML::Node const * sp_repr_lookup_name | ( | Inkscape::XML::Node const * | repr, |
char const * | name, | ||
int | maxdepth = -1 |
||
) |
std::vector< Inkscape::XML::Node const * > sp_repr_lookup_name_many | ( | Inkscape::XML::Node const * | repr, |
char const * | name, | ||
int | maxdepth = -1 |
||
) |
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 |
||
) |
Definition at line 429 of file repr-util.cpp.
References child, css, Inkscape::XML::Node::firstChild(), sp_repr_css_attr(), sp_repr_css_property(), and sp_repr_lookup_property_many().
Referenced by remove_marker_context_paint(), and sp_repr_lookup_property_many().
Inkscape::XML::Document * sp_repr_read_buf | ( | const Glib::ustring & | buf, |
const char * | default_ns | ||
) |
Inkscape::XML::Document * sp_repr_read_file | ( | char const * | filename, |
char const * | default_ns, | ||
bool | xinclude = false |
||
) |
Inkscape::XML::Document * sp_repr_read_mem | ( | char const * | buffer, |
int | length, | ||
char const * | default_ns | ||
) |
Glib::ustring sp_repr_save_buf | ( | Inkscape::XML::Document * | doc | ) |
Definition at line 631 of file repr-io.cpp.
References buf, Inkscape::IO::OutputStreamWriter::close(), Inkscape::IO::StringOutputStream::getString(), and sp_repr_save_writer().
Referenced by Inkscape::Colors::paint_to_xml_string().
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 | ||
) |
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 |
||
) |
|
inline |
Remove repr from children of its parent node.
Definition at line 107 of file repr.h.
References parent, Inkscape::XML::Node::parent(), and Inkscape::XML::Node::removeChild().
Referenced by Inkscape::UI::Tools::EraserTool::_doWork(), Inkscape::UI::Dialog::XmlTree::cmd_delete_node(), SPObject::deleteObject(), Inkscape::ObjectSet::group(), ink_file_new(), Inkscape::UI::Dialog::FilterEffectsDialog::PrimitiveList::on_click_released(), SPGuide::remove(), Inkscape::UI::Dialog::FilterEffectsDialog::FilterModifier::remove_filter(), remove_filter_gaussian_blur(), Inkscape::UI::Dialog::FilterEffectsDialog::PrimitiveList::remove_selected(), Inkscape::UI::Dialog::SvgFontsDialog::remove_selected_font(), Inkscape::UI::Dialog::SvgFontsDialog::remove_selected_glyph(), Inkscape::UI::Dialog::SvgFontsDialog::remove_selected_kerning_pair(), Inkscape::UI::Dialog::DocumentProperties::removeEmbeddedScript(), Inkscape::UI::Dialog::DocumentProperties::removeExternalScript(), SPGradient::repr_clear_vector(), Inkscape::UI::Tools::CalligraphicTool::set_to_accumulated(), Inkscape::ObjectSet::setClipGroup(), Inkscape::ObjectSet::setMask(), Inkscape::BooleanBuilder::shape_commit(), Inkscape::UI::Dialog::XmlTree::stopNodeEditing(), XmlReprActionTest::testRollbackOfNodeRemoval(), and XmlReprActionTest::testRollbackOfNodeReordering().
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).
a | first node tree root |
b | second node tree root |
visitor | The visitor lambda (Node *, Node *) -> bool If visitor returns false child nodes are not visited. |
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
node | The root node to start visiting |
visitor | The 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().
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 |
||
) |
Definition at line 934 of file repr-io.cpp.
References Inkscape::IO::OutputStreamWriter::close(), Inkscape::IO::StringOutputStream::getString(), indent_level, and sp_repr_write_stream().
Referenced by Inkscape::Extension::Implementation::Script::PreviewObserver::createAndSendEvent().
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 |
||
) |
char const * sp_xml_ns_prefix_uri | ( | char const * | prefix | ) |
char const * sp_xml_ns_uri_prefix | ( | char const * | uri, |
char const * | suggested | ||
) |