Logo Search packages:      
Sourcecode: inkscape version File versions

void sp_object_attach ( SPObject parent,
SPObject object,
SPObject prev 

Put object into object tree, under parent, and behind prev; also update object's XML space.

Definition at line 565 of file sp-object.cpp.

References SPObject::_last_child, SPObject::_total_hrefcount, SPObject::_updateTotalHRefCount(), SPObject::children, SPObject::next, SPObject::parent, SPIXmlSpace::set, sp_object_ref(), SPIXmlSpace::value, and SPObject::xml_space.

Referenced by sp_object_build(), and sp_object_child_added().

    g_return_if_fail(parent != NULL);
    g_return_if_fail(object != NULL);
    g_return_if_fail(!prev || SP_IS_OBJECT(prev));
    g_return_if_fail(!prev || prev->parent == parent);

    sp_object_ref(object, parent);
    object->parent = parent;

    SPObject *next;
    if (prev) {
        next = prev->next;
        prev->next = object;
    } else {
        next = parent->children;
        parent->children = object;
    object->next = next;
    if (!next) {
        parent->_last_child = object;
    if (!object->xml_space.set)
        object->xml_space.value = parent->xml_space.value;

Generated by  Doxygen 1.6.0   Back to index