Logo Search packages:      
Sourcecode: inkscape version File versions

SPItem * SPSelection::singleItem (  ) 

Returns a single selected item.

Returns:
NULL unless exactly one object is selected

Definition at line 277 of file selection.cpp.

References itemList().

                                {
    GSList const *items=itemList();
    if ( items != NULL && items->next == NULL ) {
        return reinterpret_cast<SPItem *>(items->data);
    } else {
        return NULL;
    }
}


Generated by  Doxygen 1.6.0   Back to index