Logo Search packages:      
Sourcecode: inkscape version File versions

bool item_is_in_group ( SPItem item,
SPGroup *  group 

Returns true if an item is among the descendants of group (recursively).

Definition at line 898 of file document.cpp.

Referenced by find_item_at_point().

    for (SPObject *o = sp_object_first_child(SP_OBJECT(group)) ; o != NULL ; o = SP_OBJECT_NEXT(o) ) {
        if (!SP_IS_ITEM(o)) continue;
        if (SP_ITEM(o) == item)
            return true;
        if (SP_IS_GROUP(o))
            if (item_is_in_group(item, SP_GROUP(o)))
                return true;
    return false;

Generated by  Doxygen 1.6.0   Back to index