Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
repr-css.cpp File Reference

TODO: insert short description here. More...

Go to the source code of this file.

Functions

static void sp_repr_css_add_components (SPCSSAttr *css, Node const *repr, gchar const *attr)
 Adds components (style properties) to an existing SPCSAttr from the specified attribute's data (nominally a style attribute).
 
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 (Node const *repr, gchar const *attr)
 Creates a new SPCSSAttr with one attribute (i.e.
 
static void sp_repr_css_attr_inherited_recursive (SPCSSAttr *css, Node const *repr, gchar const *attr)
 Adds an attribute to an existing SPCSAttr with the cascaded value including all parents.
 
SPCSSAttrsp_repr_css_attr_inherited (Node const *repr, gchar const *attr)
 Creates a new SPCSSAttr with one attribute whose value is determined by cascading.
 
char const * sp_repr_css_property (SPCSSAttr *css, gchar const *name, gchar const *defval)
 Returns a character string of the value of a given style property or a default value if the attribute is not found.
 
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.
 
bool sp_repr_css_property_is_unset (SPCSSAttr *css, gchar const *name)
 Returns true if a style property is present and its value is unset.
 
void sp_repr_css_set_property (SPCSSAttr *css, gchar const *name, gchar const *value)
 Set a style property to a new value (e.g.
 
void sp_repr_css_unset_property (SPCSSAttr *css, gchar const *name)
 Set a style property to "inkscape:unset".
 
double sp_repr_css_double_property (SPCSSAttr *css, gchar const *name, double defval)
 Return the value of a style property if property define, or a default value if not.
 
void sp_repr_css_set_property_double (SPCSSAttr *css, gchar const *name, double value)
 Set a style property to a new float value (e.g.
 
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 (Node *repr, SPCSSAttr *css, gchar const *attr)
 Sets an attribute (e.g.
 
void sp_repr_css_print (SPCSSAttr *css)
 Loops through a List of style properties, printing key/value pairs.
 
void sp_repr_css_merge (SPCSSAttr *dst, SPCSSAttr *src)
 Merges two SPCSSAttr's.
 
static void sp_repr_css_merge_from_decl (SPCSSAttr *css, CRDeclaration const *const decl)
 Merges style properties as parsed by libcroco into an existing SPCSSAttr.
 
static void sp_repr_css_merge_from_decl_list (SPCSSAttr *css, CRDeclaration const *const decl_list)
 Merges style properties as parsed by libcroco into an existing SPCSSAttr.
 
void sp_repr_css_attr_add_from_string (SPCSSAttr *css, gchar const *p)
 Use libcroco to parse a string for CSS properties and then merge them into an existing SPCSSAttr.
 
void sp_repr_css_change (Node *repr, SPCSSAttr *css, gchar const *attr)
 Creates a new SPCSAttr with the values filled from a repr, merges in properties from the given SPCSAttr, and then replaces that SPCSAttr with the new one.
 
void sp_repr_css_change_recursive (Node *repr, SPCSSAttr *css, gchar const *attr)
 
SPCSSAttrsp_repr_css_attr_unset_all (SPCSSAttr *css)
 Return a new SPCSSAttr with all the properties found in the input SPCSSAttr unset.
 

Detailed Description

TODO: insert short description here.

Definition in file repr-css.cpp.

Function Documentation

◆ sp_repr_css_add_components()

static void sp_repr_css_add_components ( SPCSSAttr css,
Node const *  repr,
gchar const *  attr 
)
static

Adds components (style properties) to an existing SPCSAttr from the specified attribute's data (nominally a style attribute).

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

References Inkscape::XML::Node::attribute(), css, data, and sp_repr_css_attr_add_from_string().

Referenced by sp_repr_css_attr(), and sp_repr_css_attr_inherited_recursive().

◆ sp_repr_css_attr()

SPCSSAttr * sp_repr_css_attr ( Node const *  repr,
gchar const *  attr 
)

Creates a new SPCSSAttr with one attribute (i.e.

style) copied from an existing repr (node). The repr attribute data is in the form of a char const * string (e.g. fill:#00ff00;stroke:none). The string is parsed by libcroco which returns a CRDeclaration list (a typical C linked list) of properties and values. This list is then used to fill the attributes of the new SPCSSAttr.

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

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

Referenced by Inkscape::Extension::Internal::SvgBuilder::_getGradientNode(), Inkscape::Extension::Internal::SvgBuilder::_setBlendMode(), Inkscape::Extension::Internal::SvgBuilder::applyOptionalMask(), SPPath::build(), Inkscape::Extension::Internal::Filter::create_and_apply_filter(), create_text_with_rectangle(), delete_line_break(), GrDrag::deleteSelected(), Inkscape::Extension::Internal::BlurEdge::effect(), Inkscape::Extension::Internal::Filter::Filter::effect(), find_references(), fix_ref(), Inkscape::LivePathEffect::GetFillTyp(), insert_text_fallback(), Inkscape::load_svg_cursor(), refresh_offset_source(), remove_marker_auto_start_reverse(), remove_marker_context_paint(), remove_marker_context_paint(), SPFlowtext::set(), Inkscape::svg_renderer::set_style(), Inkscape::Extension::Internal::SvgBuilder::shouldMergePath(), sp_attribute_clean_style(), sp_attribute_sort_style(), Inkscape::LivePathEffect::sp_get_fill_rule(), sp_repr_css_change(), sp_repr_lookup_property_many(), sp_selected_path_create_offset_object(), sp_selected_path_do_offset(), Inkscape::UI::Tools::sp_tweak_dilate_recursive(), and text_unflow().

◆ sp_repr_css_attr_add_from_string()

◆ sp_repr_css_attr_inherited()

SPCSSAttr * sp_repr_css_attr_inherited ( Node const *  repr,
gchar const *  attr 
)

◆ sp_repr_css_attr_inherited_recursive()

static void sp_repr_css_attr_inherited_recursive ( SPCSSAttr css,
Node const *  repr,
gchar const *  attr 
)
static

Adds an attribute to an existing SPCSAttr with the cascaded value including all parents.

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

References css, parent, Inkscape::XML::Node::parent(), sp_repr_css_add_components(), and sp_repr_css_attr_inherited_recursive().

Referenced by sp_repr_css_attr_inherited(), and sp_repr_css_attr_inherited_recursive().

◆ 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(), SPPattern::clone_if_necessary(), SPHatch::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(), 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::load_svg_cursor(), 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 387 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 ( Node repr,
SPCSSAttr css,
gchar const *  attr 
)

Creates a new SPCSAttr with the values filled from a repr, merges in properties from the given SPCSAttr, and then replaces that SPCSAttr with the new one.

This is called, for example, for each object in turn when a selection's style is updated via sp_desktop_set_style().

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

References css, current, sp_repr_css_attr(), sp_repr_css_attr_unref(), sp_repr_css_merge(), and sp_repr_css_set().

Referenced by Inkscape::Extension::Internal::SvgBuilder::_addStopToGradient(), Inkscape::Extension::Internal::SvgBuilder::_createImage(), Inkscape::Extension::Internal::SvgBuilder::_flushTextText(), Inkscape::ObjectSet::_pathBoolOp(), Inkscape::Extension::Internal::SvgBuilder::_setTextStyle(), Inkscape::LivePathEffect::LPEBool::add_filter(), Inkscape::Extension::Internal::SvgBuilder::addImageMask(), Inkscape::Extension::Internal::SvgBuilder::addPath(), Inkscape::Extension::Internal::SvgBuilder::addShadedFill(), apply_css_recursive(), Inkscape::Extension::Internal::SvgBuilder::applyOptionalMask(), SPObject::changeCSS(), Inkscape::LivePathEffect::LPEMeasureSegments::createArrowMarker(), Inkscape::LivePathEffect::LPEMeasureSegments::createLine(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), delete_line_break(), GrDrag::deleteSelected(), GrDrag::dropColor(), Inkscape::Extension::Internal::BlurEdge::effect(), item_to_paths(), Inkscape::Extension::Internal::SvgBuilder::mergePath(), new_filter(), new_filter_blend_gaussian_blur(), new_filter_gaussian_blur(), remove_filter(), Inkscape::LivePathEffect::LPEBool::remove_filter(), Inkscape::Extension::Internal::SvgBuilder::setAsLayer(), Inkscape::LivePathEffect::LPEPowerMask::setMask(), sp_item_gradient_stop_set_style(), sp_repr_css_change_recursive(), sp_style_set_property_url(), text_unflow(), and Inkscape::ObjectSet::untile().

◆ sp_repr_css_change_recursive()

◆ sp_repr_css_double_property()

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

Return the value of a style property if property define, or a default value if not.

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

References css, and name.

Referenced by Inkscape::Extension::Internal::BlurEdge::effect(), and sp_item_gradient_stop_set_style().

◆ sp_repr_css_merge()

◆ sp_repr_css_merge_from_decl()

static void sp_repr_css_merge_from_decl ( SPCSSAttr css,
CRDeclaration const *const  decl 
)
static

Merges style properties as parsed by libcroco into an existing SPCSSAttr.

libcroco converts all single quotes to double quotes, which needs to be undone as we always use single quotes inside our 'style' strings since double quotes are used outside: e.g.: style="font-family:'DejaVu Sans'"

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

References cr_term_to_string(), css, and _CRDeclaration::value.

Referenced by sp_repr_css_merge_from_decl_list().

◆ sp_repr_css_merge_from_decl_list()

static void sp_repr_css_merge_from_decl_list ( SPCSSAttr css,
CRDeclaration const *const  decl_list 
)
static

Merges style properties as parsed by libcroco into an existing SPCSSAttr.

Precondition
decl_list != NULL

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

References css, _CRDeclaration::next, sp_repr_css_merge_from_decl(), and sp_repr_css_merge_from_decl_list().

Referenced by sp_repr_css_attr_add_from_string(), and sp_repr_css_merge_from_decl_list().

◆ 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 286 of file repr-css.cpp.

References css, and key.

◆ sp_repr_css_property() [1/2]

char const * sp_repr_css_property ( SPCSSAttr css,
gchar const *  name,
gchar 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,
gchar const *  name 
)

Returns true if a style property is present and its value is unset.

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

References css, and name.

Referenced by sp_desktop_set_style(), and GrDrag::styleSet().

◆ sp_repr_css_set()

◆ sp_repr_css_set_property()

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

Set a style property to a new value (e.g.

fill to #ffff00).

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

References css, and name.

Referenced by Inkscape::Extension::Internal::SvgBuilder::_addStopToGradient(), Inkscape::Extension::Internal::SvgBuilder::_createImage(), Inkscape::Extension::Internal::SvgBuilder::_flushTextText(), Inkscape::UI::Tools::EraserTool::_handleStrokeStyle(), Inkscape::UI::Widget::ObjectCompositeSettings::_opacityValueChanged(), Inkscape::ObjectSet::_pathBoolOp(), Inkscape::Extension::Internal::SvgBuilder::_setBlendMode(), Inkscape::Extension::Internal::SvgBuilder::_setFillStyle(), Inkscape::Extension::Internal::SvgBuilder::_setStrokeStyle(), Inkscape::Extension::Internal::SvgBuilder::_setStyle(), Inkscape::LivePathEffect::LPEBool::add_filter(), GrDrag::addColorToDragger(), Inkscape::Extension::Internal::SvgBuilder::addShadedFill(), Inkscape::UI::Toolbar::TextToolbar::align_mode_changed(), apply_css_recursive(), Inkscape::Extension::Internal::SvgBuilder::applyOptionalMask(), Inkscape::UI::Widget::StrokeStyle::buttonToggledCB(), SPPattern::clone_if_necessary(), SPHatch::clone_if_necessary(), Inkscape::LivePathEffect::LPECloneOriginal::cloneAttributes(), convert_fill_server(), convert_stroke_server(), Inkscape::Extension::Internal::Filter::create_and_apply_filter(), create_text_with_rectangle(), Inkscape::LivePathEffect::LPEMeasureSegments::createTextLabel(), GrDrag::deleteSelected(), Inkscape::UI::Toolbar::TextToolbar::direction_changed(), Inkscape::LivePathEffect::LPEShowHandles::doOnApply(), Inkscape::UI::Tools::GradientTool::drag(), GrDrag::dropColor(), Inkscape::Extension::Internal::BlurEdge::effect(), Inkscape::UI::Widget::FontVariants::fill_css(), Inkscape::UI::Widget::FontVariations::fill_css(), Inkscape::FontLister::fill_css(), Inkscape::UI::Dialog::TextEdit::fillTextStyle(), Inkscape::UI::Tools::fit_item(), fix_ref(), Inkscape::UI::Toolbar::TextToolbar::fontsize_value_changed(), 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_opaque(), Inkscape::UI::Widget::SelectedStyle::on_fill_remove(), 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_opaque(), Inkscape::UI::Widget::SelectedStyle::on_stroke_remove(), 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::LPEBool::remove_filter(), remove_marker_auto_start_reverse(), remove_marker_context_paint(), revert_stroke_server(), Inkscape::UI::Tools::TextTool::root_handler(), Inkscape::UI::Toolbar::TextToolbar::script_changed(), Inkscape::svg_renderer::set_style(), 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::setScaledDash(), Inkscape::UI::Widget::StrokeStyle::setStrokeWidth(), sp_attribute_clean_style(), sp_attribute_purge_default_style(), sp_attribute_sort_style(), sp_css_attr_scale_property_list(), sp_css_attr_scale_property_single(), sp_css_attr_unset_blacklist(), sp_css_attr_unset_text(), sp_css_attr_unset_uris(), sp_desktop_apply_css_recursive(), sp_repr_css_attr_unset_all(), sp_repr_css_set_property_string(), sp_style_set_property_url(), sp_te_adjust_tspan_letterspacing_screen(), Inkscape::UI::Tools::spdc_apply_style(), Inkscape::UI::Tools::spdc_check_for_and_apply_waiting_LPE(), GrDrag::styleSet(), Inkscape::ObjectSet::swapFillStroke(), text_relink_refs(), 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(), and Inkscape::UI::Toolbar::TextToolbar::writing_mode_changed().

◆ sp_repr_css_set_property_double()

◆ 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()

◆ sp_repr_css_write_string()