Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

SPItem * Inkscape::Selection::singleItem (  )

Returns a single selected item.

Returns:
NULL unless exactly one object is selected

Definition at line 350 of file selection.cpp.

References itemList().

Referenced by _onSelectionChanged(), box3d_toolbox_selection_changed(), Inkscape::Trace::Tracer::getSelectedSPImage(), pen_handle_button_press(), pen_handle_button_release(), sp_arc_context_selection_changed(), sp_event_root_menu_popup(), sp_flood_context_selection_changed(), and sp_item_widget_setup().

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

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index