Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
attributes.cpp File Reference

Go to the source code of this file.

Functions

SPAttr sp_attribute_lookup (gchar const *key)
 Get attribute id by name.
 
gchar const * sp_attribute_name (SPAttr id)
 Get attribute name by id.
 
std::vector< Glib::ustring > sp_attribute_name_list (bool css_only)
 Get sorted attribute name list.
 
bool SP_ATTRIBUTE_IS_CSS (SPAttr k)
 True iff k is a property in SVG, i.e.
 

Variables

static SPStyleProp const props []
 Lookup dictionary for attributes/properties.
 

Function Documentation

◆ SP_ATTRIBUTE_IS_CSS()

bool SP_ATTRIBUTE_IS_CSS ( SPAttr  k)

True iff k is a property in SVG, i.e.

something that can be written either in a style attribute or as its own XML attribute. This must be kept in sync with SPAttr.

Definition at line 665 of file attributes.cpp.

References D, and SYSTEM_LANGUAGE.

Referenced by SPClipPath::set(), SPHatch::set(), SPItem::set(), SPSolidColor::set(), SPStop::set(), SPHatchPath::set(), and sp_attribute_name_list().

◆ sp_attribute_lookup()

SPAttr sp_attribute_lookup ( gchar const *  key)

Get attribute id by name.

Return INVALID for invalid names.

Definition at line 634 of file attributes.cpp.

References _instance, INVALID, key, and sp_attribute_lookup().

Referenced by SPStyle::_mergeDecl(), SPPath::build(), cmp(), and sp_attribute_lookup().

◆ sp_attribute_name()

◆ sp_attribute_name_list()

std::vector< Glib::ustring > sp_attribute_name_list ( bool  css_only = false)

Get sorted attribute name list.

Parameters
css_onlyIf true, only return CSS properties

Definition at line 653 of file attributes.cpp.

References props, result, and SP_ATTRIBUTE_IS_CSS().

Referenced by Inkscape::UI::Dialog::StyleDialog::_startNameEdit().

Variable Documentation

◆ props