本文整理汇总了C++中SPDesktop::isLayer方法的典型用法代码示例。如果您正苦于以下问题:C++ SPDesktop::isLayer方法的具体用法?C++ SPDesktop::isLayer怎么用?C++ SPDesktop::isLayer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SPDesktop
的用法示例。
在下文中一共展示了SPDesktop::isLayer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
GSList *
all_selection_items (Inkscape::Selection *s, GSList *l, SPObject *ancestor, bool hidden, bool locked)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
for (GSList *i = (GSList *) s->itemList(); i != NULL; i = i->next) {
if (SP_IS_ITEM (i->data) && !SP_OBJECT_IS_CLONED (i->data) && !desktop->isLayer(SP_ITEM(i->data))) {
if (!ancestor || ancestor->isAncestorOf(SP_OBJECT (i->data))) {
if ((hidden || !desktop->itemIsHidden(SP_ITEM(i->data))) && (locked || !SP_ITEM(i->data)->isLocked())) {
l = g_slist_prepend (l, i->data);
}
}
}
if (!ancestor || ancestor->isAncestorOf(SP_OBJECT (i->data))) {
l = all_items (SP_OBJECT (i->data), l, hidden, locked);
}
}
return l;
}
示例2: return
bool
item_type_match (SPItem *item, GtkWidget *widget)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (SP_IS_RECT(item)) {
return (type_checkbox (widget, "shapes") || type_checkbox (widget, "rects"));
} else if (SP_IS_GENERICELLIPSE(item) || SP_IS_ELLIPSE(item) || SP_IS_ARC(item) || SP_IS_CIRCLE(item)) {
return (type_checkbox (widget, "shapes") || type_checkbox (widget, "ellipses"));
} else if (SP_IS_STAR(item) || SP_IS_POLYGON(item)) {
return (type_checkbox (widget, "shapes") || type_checkbox (widget, "stars"));
} else if (SP_IS_SPIRAL(item)) {
return (type_checkbox (widget, "shapes") || type_checkbox (widget, "spirals"));
} else if (SP_IS_PATH(item) || SP_IS_LINE(item) || SP_IS_POLYLINE(item)) {
return (type_checkbox (widget, "paths"));
} else if (SP_IS_TEXT(item) || SP_IS_TSPAN(item) || SP_IS_TREF(item) || SP_IS_STRING(item)) {
return (type_checkbox (widget, "texts"));
} else if (SP_IS_GROUP(item) && !desktop->isLayer(item) ) { // never select layers!
return (type_checkbox (widget, "groups"));
} else if (SP_IS_USE(item)) {
return (type_checkbox (widget, "clones"));
} else if (SP_IS_IMAGE(item)) {
return (type_checkbox (widget, "images"));
} else if (SP_IS_OFFSET(item)) {
return (type_checkbox (widget, "offsets"));
}
return false;
}