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

int sp_desktop_query_style ( SPDesktop desktop,
SPStyle style,
int  property 
)

Query selection on desktop for property.

Definition at line 733 of file desktop-style.cpp.

References SPDesktop::_query_style_signal, Inkscape::Selection::itemList(), objects_query_fillstroke(), objects_query_fontfamily(), objects_query_fontnumbers(), objects_query_fontstyle(), and SPDesktop::selection.

Referenced by sp_desktop_query_style_all().

{
    int ret = desktop->_query_style_signal.emit(style, property);

    if (ret != QUERY_STYLE_NOTHING)  
        return ret; // subselection returned a style, pass it on

    // otherwise, do querying and averaging over selection
    if (property == QUERY_STYLE_PROPERTY_FILL) {
        return objects_query_fillstroke ((GSList *) desktop->selection->itemList(), style, true);
    } else if (property == QUERY_STYLE_PROPERTY_STROKE) {
        return objects_query_fillstroke ((GSList *) desktop->selection->itemList(), style, false);

    } else if (property == QUERY_STYLE_PROPERTY_FONTFAMILY) {
        return objects_query_fontfamily ((GSList *) desktop->selection->itemList(), style);
    } else if (property == QUERY_STYLE_PROPERTY_FONTSTYLE) {
        return objects_query_fontstyle ((GSList *) desktop->selection->itemList(), style);
    } else if (property == QUERY_STYLE_PROPERTY_FONTNUMBERS) {
        return objects_query_fontnumbers ((GSList *) desktop->selection->itemList(), style);
    }

    return QUERY_STYLE_NOTHING;
}


Generated by  Doxygen 1.6.0   Back to index